Skip to:
Content

BuddyPress.org

Changeset 3603


Ignore:
Timestamp:
12/28/2010 07:08:02 PM (14 years ago)
Author:
djpaul
Message:

Create BP's Pages with pingbacks and comments disabled to prevent RSS links being output in <head>. Fixes #2977

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r3592 r3603  
    21492149
    21502150    foreach ( (array)$bp->add_root as $slug )
    2151         $new_page_ids[$slug] = wp_insert_post( array( 'post_title' => ucwords( $slug ), 'post_status' => 'publish', 'post_type' => 'page' ) );
     2151        $new_page_ids[$slug] = wp_insert_post( array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_title' => ucwords( $slug ), 'post_status' => 'publish', 'post_type' => 'page' ) );
    21522152
    21532153    $page_ids = bp_core_get_page_meta();
  • trunk/bp-core/admin/bp-core-upgrade.php

    r3592 r3603  
    10531053                    $bp_pages[$key] = (int)$_POST['bp-' . $key . '-page'];
    10541054                else
    1055                     $bp_pages[$key] = wp_insert_post( array( 'post_title' => ucwords( $key ), 'post_status' => 'publish', 'post_type' => 'page' ) );
     1055                    $bp_pages[$key] = wp_insert_post( array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_title' => ucwords( $key ), 'post_status' => 'publish', 'post_type' => 'page' ) );
    10561056            } else {
    10571057                /* Create a new page */
    1058                 $bp_pages[$key] = wp_insert_post( array( 'post_title' => ucwords( $value ), 'post_status' => 'publish', 'post_type' => 'page' ) );
     1058                $bp_pages[$key] = wp_insert_post( array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_title' => ucwords( $value ), 'post_status' => 'publish', 'post_type' => 'page' ) );
    10591059            }
    10601060        }
Note: See TracChangeset for help on using the changeset viewer.