Skip to:
Content

BuddyPress.org

Changeset 4920


Ignore:
Timestamp:
08/03/2011 09:03:41 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Add bp-pages admin interface for all components. Rename bp-pages related functions to match existing nomenclature. Introduce 'has_directory' variable in BP_Component class to assist in pairing page slugs to component directories. Set 'path' variable in components that were missing them. Clean up white space where tabs were used instead of spaces. See #3428. Props boonebgorges.

Location:
trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-loader.php

    r4907 r4920  
    7777            'slug'                  => BP_ACTIVITY_SLUG,
    7878            'root_slug'             => isset( $bp->pages->activity->slug ) ? $bp->pages->activity->slug : BP_ACTIVITY_SLUG,
     79            'has_directory'         => true,
    7980            'search_string'         => __( 'Search Activity...', 'buddypress' ),
    8081            'global_tables'         => $global_tables,
  • trunk/bp-blogs/bp-blogs-loader.php

    r4907 r4920  
    5454            'slug'                  => BP_BLOGS_SLUG,
    5555            'root_slug'             => isset( $bp->pages->blogs->slug ) ? $bp->pages->blogs->slug : BP_BLOGS_SLUG,
     56            'has_directory'         => true,
    5657            'notification_callback' => 'bp_blogs_format_notifications',
    5758            'search_string'         => __( 'Search sites...', 'buddypress' ),
  • trunk/bp-core/admin/bp-core-admin.php

    r4907 r4920  
    212212                }
    213213            }
    214             bp_core_update_page_meta( $directory_pages );
     214            bp_core_update_directory_page_ids( $directory_pages );
    215215        }
    216216
     
    353353        ),
    354354        'messages' => array(
    355             'title'       => __( 'Private Messaging', 'buddypress' ),
     355            'title'       => __( 'Private Messaging', 'buddypress' ),
    356356            'description' => __( 'Allow your users to talk to each other directly and in private. They are not just limited to one-on-one discussions, and can send messages to multiple recipients.', 'buddypress' )
    357357        ),
     
    372372    if ( is_multisite() ) {
    373373        $optional_components['blogs'] = array(
    374             'title'       => __( 'Site Tracking', 'buddypress' ),
     374            'title'       => __( 'Site Tracking', 'buddypress' ),
    375375            'description' => __( 'Track new sites, new posts and new comments across your entire network.', 'buddypress' )
    376376        );
     
    482482   
    483483    // Get the existing WP pages
    484     $existing_pages = bp_core_get_page_meta();
    485 
    486     // An array of strings looped over to create component setup markup
    487     $directory_pages = array(
    488         'members'  => __( 'Community Members', 'buddypress' ),
    489         'activity' => __( 'Activity Streams',  'buddypress' ),
    490         'groups'   => __( 'User Groups',       'buddypress' ),
    491         'forums'   => __( 'Discussion Forums', 'buddypress' ),
    492     );
    493 
    494     if ( is_multisite() )
    495         $directory_pages['blogs'] = __( "Site Directory", 'buddypress' ); ?>
     484    $existing_pages = bp_core_get_directory_page_ids();
     485
     486    // Set up an array of components (along with component names) that have
     487    // directory pages.
     488    $directory_pages = array();
     489
     490    foreach( $bp->loaded_components as $component_id => $data ) {
     491
     492        // Only components that need directories should be listed here
     493        if ( isset( $bp->{$component_id} ) && !empty( $bp->{$component_id}->has_directory ) ) {
     494           
     495            // component->name was introduced in BP 1.5, so we must provide a fallback
     496            $component_name = !empty( $bp->{$component_id}->name ) ? $bp->{$component_id}->name : ucwords( $component_id );
     497           
     498            $directory_pages[$component_id] = $component_name;
     499        }
     500    }
     501   
     502    $directory_pages = apply_filters( 'bp_directory_pages', $directory_pages );
     503   
     504    ?>
    496505   
    497506    <h3><?php _e( 'Directories', 'buddypress' ); ?></h3>
    498507   
    499     <p><?php _e( 'Choose a WordPress Page to associate with each available BuddyPress Component directory.', 'buddypress' ); ?></p>
     508    <p><?php _e( 'Associate a WordPress Page with each BuddyPress component directory.', 'buddypress' ); ?></p>
    500509
    501510    <table class="form-table">
  • trunk/bp-core/admin/bp-core-update.php

    r4907 r4920  
    8585                $steps[] = __( 'Database Update', 'buddypress' );
    8686
    87             if ( $this->database_version < 1801 || !bp_core_get_page_meta() )
     87            if ( $this->database_version < 1801 || !bp_core_get_directory_page_ids() )
    8888                $steps[] = __( 'Pages', 'buddypress' );
    8989
  • trunk/bp-core/bp-core-buddybar.php

    r4907 r4920  
    242242                // Off-limits to this user. Throw an error and redirect to the displayed user's domain
    243243                bp_core_no_access( array(
    244                     'message'   => __( 'You do not have access to this page.', 'buddypress' ),
    245                     'root'      => bp_displayed_user_domain(),
    246                     'redirect'  => false
     244                    'message'  => __( 'You do not have access to this page.', 'buddypress' ),
     245                    'root'     => bp_displayed_user_domain(),
     246                    'redirect' => false
    247247                ) );
    248248            } else {
  • trunk/bp-core/bp-core-catchuri.php

    r4907 r4920  
    3838
    3939    // Don't catch URIs on non-root blogs unless multiblog mode is on
    40     if ( !bp_is_root_blog() && !bp_is_multiblog_mode() ) {
     40    if ( !bp_is_root_blog() && !bp_is_multiblog_mode() )
    4141        return false;
    42     }
    4342
    4443    // Fetch all the WP page names for each component
    4544    if ( empty( $bp->pages ) )
    46         $bp->pages = bp_core_get_page_names();
     45        $bp->pages = bp_core_get_directory_pages();
    4746
    4847    // Ajax or not?
     
    7877                $bkey = array_search( $chunk, $bp_uri );
    7978
    80                 if ( $bkey !== false )
     79                if ( $bkey !== false ) {
    8180                    unset( $bp_uri[$bkey] );
     81                }
    8282
    8383                $bp_uri = array_values( $bp_uri );
     
    115115    if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_on_front' ) && empty( $bp_uri ) ) {
    116116        $post = get_post( get_option( 'page_on_front' ) );
    117         if ( !empty( $post ) )
     117        if ( !empty( $post ) ) {
    118118            $bp_uri[0] = $post->post_name;
     119        }
    119120    }
    120121
     
    311312    $object_id = 0;
    312313    foreach ( (array)$bp->pages as $page ) {
    313         if ( isset( $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) && $page->name == $bp_unfiltered_uri[$bp_unfiltered_uri_offset] )
     314        if ( isset( $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) && $page->name == $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) {
    314315            $object_id = $page->id;
     316        }
    315317    }
    316318
     
    397399
    398400    $defaults = array(
    399         'mode'      => '1',         // 1 = $root, 2 = wp-login.php
    400         'message'   => __( 'You must log in to access the page you requested.', 'buddypress' ),
    401         'redirect'  => wp_guess_url(),  // the URL you get redirected to when a user successfully logs in
    402         'root'      => $bp->root_domain // the landing page you get redirected to when a user doesn't have access
     401        'mode'     => '1',              // 1 = $root, 2 = wp-login.php
     402        'message'  => __( 'You must log in to access the page you requested.', 'buddypress' ),
     403        'redirect' => wp_guess_url(),   // the URL you get redirected to when a user successfully logs in
     404        'root'     => $bp->root_domain  // the landing page you get redirected to when a user doesn't have access
    403405    );
    404406
     
    421423                bp_core_redirect( $root );
    422424            }
    423         break;
     425
     426            break;
    424427
    425428        // Redirect to root with "redirect_to" parameter
     
    438441
    439442            bp_core_redirect( $url );
    440         break;
     443
     444            break;
    441445    }
    442446}
  • trunk/bp-core/bp-core-component.php

    r4912 r4920  
    3434     */
    3535    var $slug;
     36   
     37    /**
     38     * @var bool Does this component need a top-level directory?
     39     */
     40    var $has_directory;
    3641
    3742    /**
     
    108113            'slug'                  => '',
    109114            'root_slug'             => '',
     115            'has_directory'         => false,
    110116            'notification_callback' => '',
    111117            'search_string'         => '',
     
    114120        $r = wp_parse_args( $args, $defaults );
    115121
    116         // Slug used for permalinks
     122        // Slug used for permalink URI chunk after root
    117123        $this->slug          = apply_filters( 'bp_' . $this->id . '_slug',          $r['slug']          );
    118124
    119125        // Slug used for root directory
    120126        $this->root_slug     = apply_filters( 'bp_' . $this->id . '_root_slug',     $r['root_slug']     );
     127
     128        // Does this component have a top-level directory?
     129        $this->has_directory = apply_filters( 'bp_' . $this->id . '_has_directory', $r['has_directory'] );
    121130
    122131        // Search string
     
    133142        /** BuddyPress ********************************************************/
    134143
    135         // Register this component in the active components array
     144        // Register this component in the loaded components array
    136145        $bp->loaded_components[$this->slug] = $this->id;
    137146
     
    183192     */
    184193    function setup_actions() {
    185         // Register post types
    186         add_action( 'bp_setup_globals',            array ( $this, 'setup_globals'            ), 10 );
    187 
    188         // Include required files. Called early to ensure that BP core components are
    189         // loaded before plugins that hook their loader functions to bp_include with
    190         // the default priority of 10. This is for backwards compatibility; henceforth,
    191         // plugins should register themselves by extending this base class.
    192         add_action( 'bp_include',                  array ( $this, 'includes'                 ), 8 );
    193 
    194         // Register post types
    195         add_action( 'bp_setup_nav',                array ( $this, 'setup_nav'                ), 10 );
    196 
    197         // Register post types
    198         add_action( 'bp_setup_admin_bar',          array ( $this, 'setup_admin_bar'          ), 10 );
    199 
    200         // Register post types
    201         add_action( 'bp_setup_title',              array ( $this, 'setup_title'              ), 10 );
    202 
    203         // Register post types
    204         add_action( 'bp_register_post_types',      array ( $this, 'register_post_types'      ), 10 );
     194
     195        // Register post types
     196        add_action( 'bp_setup_globals',          array ( $this, 'setup_globals'          ), 10 );
     197
     198        // Include required files. Called early to ensure that BP core
     199        // components are loaded before plugins that hook their loader functions
     200        // to bp_include with the default priority of 10. This is for backwards
     201        // compatibility; henceforth, plugins should register themselves by
     202        // extending this base class.
     203        add_action( 'bp_include',                array ( $this, 'includes'               ), 8 );
     204
     205        // Register post types
     206        add_action( 'bp_setup_nav',              array ( $this, 'setup_nav'              ), 10 );
     207
     208        // Register post types
     209        add_action( 'bp_setup_admin_bar',        array ( $this, 'setup_admin_bar'        ), 10 );
     210
     211        // Register post types
     212        add_action( 'bp_setup_title',            array ( $this, 'setup_title'            ), 10 );
     213
     214        // Register post types
     215        add_action( 'bp_register_post_types',    array ( $this, 'register_post_types'    ), 10 );
    205216
    206217        // Register taxonomies
    207         add_action( 'bp_register_taxonomies',      array ( $this, 'register_taxonomies'      ), 10 );
     218        add_action( 'bp_register_taxonomies',    array ( $this, 'register_taxonomies'    ), 10 );
    208219
    209220        // Add the rewrite tags
    210         add_action( 'bp_add_rewrite_tags',         array ( $this, 'add_rewrite_tags'         ), 10 );
     221        add_action( 'bp_add_rewrite_tags',       array ( $this, 'add_rewrite_tags'       ), 10 );
    211222
    212223        // Generate rewrite rules
    213         add_action( 'bp_generate_rewrite_rules',   array ( $this, 'generate_rewrite_rules'  ), 10 );
     224        add_action( 'bp_generate_rewrite_rules', array ( $this, 'generate_rewrite_rules' ), 10 );
    214225
    215226        // Additional actions can be attached here
  • trunk/bp-core/bp-core-functions.php

    r4919 r4920  
    7979 *       people running trunk installations. Leave for a version or two, then remove.
    8080 */
    81 function bp_core_get_page_meta() {
     81function bp_core_get_directory_page_ids() {
    8282    $page_ids = bp_get_option( 'bp-pages' );
    8383
     
    9393    }
    9494
    95     return apply_filters( 'bp_core_get_page_meta', $page_ids );
     95    foreach( $page_ids as $component_name => $page_id ) {
     96        if ( empty( $component_name ) || empty( $page_id ) ) {
     97            unset( $page_ids[$component_name] );
     98        }
     99    }
     100
     101    return apply_filters( 'bp_core_get_directory_page_ids', $page_ids );
    96102}
    97103
     
    107113 * @param array $blog_page_ids The IDs of the WP pages corresponding to BP component directories
    108114 */
    109 function bp_core_update_page_meta( $blog_page_ids ) {
     115function bp_core_update_directory_page_ids( $blog_page_ids ) {
    110116    bp_update_option( 'bp-pages', $blog_page_ids );
    111117}
     
    119125 * @return obj $pages Page names, IDs, and slugs
    120126 */
    121 function bp_core_get_page_names() {
     127function bp_core_get_directory_pages() {
    122128    global $wpdb, $bp;
    123129
    124     // Set pages as standard class
    125     $pages = new stdClass;
    126 
    127130    // Get pages and IDs
    128     if ( $page_ids = bp_core_get_page_meta() ) {
     131    if ( $page_ids = bp_core_get_directory_page_ids() ) {
     132
     133        // Set pages as standard class
     134        $pages = new stdClass;
    129135
    130136        $posts_table_name = bp_is_multiblog_mode() ? $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts' : $wpdb->posts;
     
    132138        $page_names       = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent, post_title FROM {$posts_table_name} WHERE ID IN ({$page_ids_sql}) AND post_status = 'publish' " ) );
    133139
    134         foreach ( (array)$page_ids as $key => $page_id ) {
     140        foreach ( (array)$page_ids as $component_id => $page_id ) {
    135141            foreach ( (array)$page_names as $page_name ) {
    136142                if ( $page_name->ID == $page_id ) {
    137                     $pages->{$key}->name  = $page_name->post_name;
    138                     $pages->{$key}->id    = $page_name->ID;
    139                     $pages->{$key}->title = $page_name->post_title;
    140                     $slug[]               = $page_name->post_name;
     143                    $pages->{$component_id}->name  = $page_name->post_name;
     144                    $pages->{$component_id}->id    = $page_name->ID;
     145                    $pages->{$component_id}->title = $page_name->post_title;
     146                    $slug[]                        = $page_name->post_name;
    141147
    142148                    // Get the slug
     
    147153                    }
    148154
    149                     $pages->{$key}->slug = implode( '/', array_reverse( (array)$slug ) );
     155                    $pages->{$component_id}->slug = implode( '/', array_reverse( (array)$slug ) );
    150156                }
    151157
     
    155161    }
    156162
    157     return apply_filters( 'bp_core_get_page_names', $pages );
     163    return apply_filters( 'bp_core_get_directory_pages', $pages );
    158164}
    159165
     
    392398
    393399            $orphaned_pages[] = array(
    394                 'id'    => $page_data->ID,
    395                 'title' => $page_data->post_title
     400                'id'    => $page_data->ID,
     401                'title' => $page_data->post_title
    396402            );
    397403        }
     
    420426    $wp_page_components  = array();
    421427
    422     // Only some BP components require a WP page to function - those with a non-empty root_slug
    423     foreach( $bp->active_components as $component_id => $is_active ) {
    424         if ( !empty( $bp->{$component_id}->root_slug ) ) {
     428    // Only components with 'has_directory' require a WP page to function
     429    foreach( $bp->loaded_components as $component_id => $is_active ) {
     430        if ( !empty( $bp->{$component_id}->has_directory ) ) {
    425431            $wp_page_components[] = array(
    426                 'id'    => $component_id,
    427                 'name'  => $bp->{$component_id}->name
     432                'id'   => $component_id,
     433                'name' => isset( $bp->{$component_id}->name ) ? $bp->{$component_id}->name : ucwords( $bp->{$component_id}->id )
    428434            );
    429435        }
     
    434440    if ( isset( $bp->site_options['registration'] ) && ( 'user' == $bp->site_options['registration'] || ( 'all' == $bp->site_options['registration'] ) ) ) {
    435441        $wp_page_components[] = array(
    436             'id'    => 'activate',
    437             'name'  => __( 'Activate', 'buddypress' )
     442            'id'   => 'activate',
     443            'name' => __( 'Activate', 'buddypress' )
    438444        );
    439445
    440446        $wp_page_components[] = array(
    441             'id'    => 'register',
    442             'name'  => __( 'Register', 'buddypress' )
     447            'id'   => 'register',
     448            'name' => __( 'Register', 'buddypress' )
    443449        );
    444450    }
     
    10001006    if ( is_multisite() ) {
    10011007        $network_options = apply_filters( 'bp_core_network_options', array(
    1002             'tags_blog_id'    => '0',
     1008            'tags_blog_id'    => '0',
    10031009            'registration'    => '0',
    10041010            'fileupload_maxk' => '1500'
     
    10681074
    10691075    if ( empty( $bp->pages ) )
    1070         $bp->pages = bp_core_get_page_names();
     1076        $bp->pages = bp_core_get_directory_pages();
    10711077
    10721078    $match = false;
     
    10811087    if ( empty( $match ) ) {
    10821088        $bp->add_root[] = $slug;
    1083         add_action( 'bp_init', 'bp_core_create_root_component_page' );
     1089    }
     1090   
     1091    // Make sure that this component is registered as requiring a top-level directory
     1092    if ( isset( $bp->{$slug} ) ) {
     1093        $bp->loaded_components[$bp->{$slug}->slug] = $bp->{$slug}->id;
     1094        $bp->{$slug}->has_directory = true;
    10841095    }
    10851096}
     
    10931104        $new_page_ids[$slug] = wp_insert_post( array( 'comment_status' => 'closed', 'ping_status' => 'closed', 'post_title' => ucwords( $slug ), 'post_status' => 'publish', 'post_type' => 'page' ) );
    10941105
    1095     $page_ids = array_merge( (array) $new_page_ids, (array) bp_core_get_page_meta() );
    1096     bp_core_update_page_meta( $page_ids );
     1106    $page_ids = array_merge( (array) $new_page_ids, (array) bp_core_get_directory_page_ids() );
     1107    bp_core_update_directory_page_ids( $page_ids );
    10971108}
    10981109
  • trunk/bp-core/bp-core-loader.php

    r4907 r4920  
    5858
    5959        // Set the included and optional components.
    60         $bp->optional_components = array( 'activity', 'forums', 'friends', 'groups', 'messages', 'settings', 'xprofile', );
     60        $bp->optional_components = array( 'activity', 'forums', 'friends', 'groups', 'messages', 'settings', 'xprofile' );
    6161
    6262        // Blogs component only available for multisite
     
    140140        // The names of the core WordPress pages used to display BuddyPress content
    141141        if ( empty( $bp->pages ) )
    142             $bp->pages = bp_core_get_page_names();
     142            $bp->pages = bp_core_get_directory_pages();
    143143
    144144        /** Admin Bar *********************************************************/
  • trunk/bp-forums/bp-forums-admin.php

    r4821 r4920  
    180180            "define( 'BB_NONCE_KE"  => array( "'put your unique phrase here'",  "'" . addslashes( NONCE_KEY ) . "'" ),
    181181            "\$bb_table_prefix = '" => array( "'bb_'",                          "'" . $bp->table_prefix . "bb_'" ),
    182             "define( 'BB_LANG', '"  => array( "''",                             "'" . WPLANG . "'" )
     182            "define( 'BB_LANG', '"  => array( "''",                             "'" . WPLANG . "'" )
    183183        )
    184184    );
  • trunk/bp-forums/bp-forums-functions.php

    r4907 r4920  
    5454
    5555    $defaults = array(
    56         'forum_id'          => '',
    57         'forum_name'        => '',
    58         'forum_desc'        => '',
    59         'forum_slug'        => '',
    60         'forum_parent_id'   => bp_forums_parent_forum_id(),
    61         'forum_order'       => false,
    62         'forum_is_category' => 0
     56        'forum_id'          => '',
     57        'forum_name'        => '',
     58        'forum_desc'        => '',
     59        'forum_slug'        => '',
     60        'forum_parent_id'   => bp_forums_parent_forum_id(),
     61        'forum_order'       => false,
     62        'forum_is_category' => 0
    6363    );
    6464
     
    8282        'page'          => 1,
    8383        'per_page'      => 15,
    84         'offset'    => false,
    85         'number'    => false,
     84        'offset'        => false,
     85        'number'        => false,
    8686        'exclude'       => false,
    8787        'show_stickies' => 'all',
  • trunk/bp-forums/bp-forums-loader.php

    r4907 r4920  
    5454        // Note that global_tables is included in this array.
    5555        $globals = array(
     56            'path'                  => BP_PLUGIN_DIR,
    5657            'slug'                  => BP_FORUMS_SLUG,
    5758            'root_slug'             => isset( $bp->pages->forums->slug ) ? $bp->pages->forums->slug : BP_FORUMS_SLUG,
     59            'has_directory'         => true,
    5860            'notification_callback' => 'messages_format_notifications',
    5961            'search_string'         => __( 'Search Forums...', 'buddypress' ),
  • trunk/bp-friends/bp-friends-loader.php

    r4907 r4920  
    7575            'path'                  => BP_PLUGIN_DIR,
    7676            'slug'                  => BP_FRIENDS_SLUG,
     77            'has_directory'         => false,
    7778            'search_string'         => __( 'Search Friends...', 'buddypress' ),
    7879            'notification_callback' => 'friends_format_notifications',
     
    197198                    'type'    => 'thumb'
    198199                ) );
    199                 $bp->bp_options_title   = $bp->displayed_user->fullname;
     200                $bp->bp_options_title  = $bp->displayed_user->fullname;
    200201            }
    201202        }
  • trunk/bp-groups/bp-groups-loader.php

    r4907 r4920  
    7777        // Note that global_tables is included in this array.
    7878        $globals = array(
     79            'path'                  => BP_PLUGIN_DIR,
    7980            'slug'                  => BP_GROUPS_SLUG,
    8081            'root_slug'             => isset( $bp->pages->groups->slug ) ? $bp->pages->groups->slug : BP_GROUPS_SLUG,
     82            'has_directory'         => true,
    8183            'notification_callback' => 'groups_format_notifications',
    8284            'search_string'         => __( 'Search Groups...', 'buddypress' ),
     
    168170                // group's home page           
    169171                bp_core_no_access( array(
    170                     'message'   => __( 'You do not have access to this group.', 'buddypress' ),
    171                     'root'      => bp_get_group_permalink( $bp->groups->current_group ),
    172                     'redirect'  => false
     172                    'message'  => __( 'You do not have access to this group.', 'buddypress' ),
     173                    'root'     => bp_get_group_permalink( $bp->groups->current_group ),
     174                    'redirect' => false
    173175                ) );
    174176            } else {
  • trunk/bp-members/bp-members-adminbar.php

    r4907 r4920  
    187187        $wp_admin_bar->add_menu( array(
    188188            'parent' => 'bp-notifications',
    189             'id'    => 'no-notifications',
     189            'id'    => 'no-notifications',
    190190            'title'  => __( 'No new notifications', 'buddypress' ),
    191             'href'  => bp_loggedin_user_domain()
     191            'href'  => bp_loggedin_user_domain()
    192192        ) );
    193193    }
  • trunk/bp-members/bp-members-functions.php

    r4907 r4920  
    7676        'exclude'         => false,    // Users to exclude from results
    7777        'search_terms'    => false,    // Limit to users that match these search terms
    78         'meta_key'    => false,    // Limit to users who have this piece of usermeta
    79         'meta_value'      => false,    // With meta_key, limit to users where usermeta matches this value
     78        'meta_key'        => false,    // Limit to users who have this piece of usermeta
     79        'meta_value'      => false,    // With meta_key, limit to users where usermeta matches this value
    8080
    8181        'include'         => false,    // Pass comma separated list of user_ids to limit to only these users
  • trunk/bp-members/bp-members-loader.php

    r4907 r4920  
    6464
    6565        $globals = array(
     66            'path'          => BP_PLUGIN_DIR,
    6667            'slug'          => BP_MEMBERS_SLUG,
    6768            'root_slug'     => isset( $bp->pages->members->slug ) ? $bp->pages->members->slug : BP_MEMBERS_SLUG,
     69            'has_directory' => true,
    6870            'search_string' => __( 'Search Members...', 'buddypress' ),
    6971        );
  • trunk/bp-members/bp-members-template.php

    r4910 r4920  
    298298        'search_terms'    => $search_terms, // Pass search_terms to filter users by their profile data
    299299       
    300         'meta_key'    => false,     // Only return users with this usermeta
    301         'meta_value'      => false,     // Only return users where the usermeta value matches. Requires meta_key
     300        'meta_key'        => false,         // Only return users with this usermeta
     301        'meta_value'      => false,         // Only return users where the usermeta value matches. Requires meta_key
    302302
    303303        'populate_extras' => true           // Fetch usermeta? Friend count, last active etc.
  • trunk/bp-messages/bp-messages-loader.php

    r4907 r4920  
    7272        // Note that global_tables is included in this array.
    7373        $globals = array(
     74            'path'                  => BP_PLUGIN_DIR,
    7475            'slug'                  => BP_MESSAGES_SLUG,
     76            'has_directory'         => false,
    7577            'notification_callback' => 'messages_format_notifications',
    7678            'search_string'         => __( 'Search Messages...', 'buddypress' ),
     
    9799            'name'                    => $name,
    98100            'slug'                    => $this->slug,
    99             'root_slug'               => $this->root_slug,
    100101            'position'                => 50,
    101102            'show_for_displayed_user' => false,
  • trunk/bp-settings/bp-settings-loader.php

    r4907 r4920  
    5353        // All globals for settings component.
    5454        $globals = array(
    55             'slug'      => BP_SETTINGS_SLUG,
     55            'slug'          => BP_SETTINGS_SLUG,
     56            'has_directory' => false,
    5657        );
    5758
  • trunk/bp-themes/bp-default/_inc/ajax.php

    r4907 r4920  
    331331function bp_dtheme_get_single_activity_content() {
    332332    $activity_array = bp_activity_get_specific( array(
    333         'activity_ids'      => $_POST['activity_id'],
    334         'display_comments'  => 'stream'
     333        'activity_ids'     => $_POST['activity_id'],
     334        'display_comments' => 'stream'
    335335    ) );
    336336
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r4905 r4920  
    918918            foreach( (array) $results as $field ) {
    919919                $profile_data[$field->field_name] = array(
    920                     'field_group_id'    => $field->field_group_id,
    921                     'field_group_name'  => $field->field_group_name,
    922                     'field_id'          => $field->field_id,
    923                     'field_type'        => $field->field_type,
    924                     'field_data'        => $field->field_data
     920                    'field_group_id'   => $field->field_group_id,
     921                    'field_group_name' => $field->field_group_name,
     922                    'field_id'         => $field->field_id,
     923                    'field_type'       => $field->field_type,
     924                    'field_data'       => $field->field_data
    925925                );
    926926            }
  • trunk/bp-xprofile/bp-xprofile-loader.php

    r4907 r4920  
    8888            'table_name_groups' => $bp->table_prefix . 'bp_xprofile_groups',
    8989            'table_name_fields' => $bp->table_prefix . 'bp_xprofile_fields',
    90             'table_name_meta'   => $bp->table_prefix . 'bp_xprofile_meta',
     90            'table_name_meta'   => $bp->table_prefix . 'bp_xprofile_meta',
    9191        );
    9292
    9393        $globals = array(
    9494            'slug'                  => BP_XPROFILE_SLUG,
    95             'root_slug'             => isset( $bp->pages->xprofile->slug ) ? $bp->pages->xprofile->slug : BP_XPROFILE_SLUG,
     95            'has_directory'         => false,
    9696            'notification_callback' => 'xprofile_format_notifications',
    9797            'global_tables'         => $global_tables
Note: See TracChangeset for help on using the changeset viewer.