Changeset 1759 for trunk/bp-core.php
- Timestamp:
- 09/02/2009 05:32:54 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-core.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r1755 r1759 277 277 278 278 /* Add the administration tab under the "Site Admin" tab for site administrators */ 279 bp_core_add_admin_menu_page( array( 'menu_title' => __( 'BuddyPress', 'buddypress' ), 'page_title' => __( 'BuddyPress', 'buddypress' ), 'access_level' => 10, 'file' => 'bp-core.php', 'function' => 'bp_core_admin_settings', 'position' => 2 ) ); 279 bp_core_add_admin_menu_page( array( 280 'menu_title' => __( 'BuddyPress', 'buddypress' ), 281 'page_title' => __( 'BuddyPress', 'buddypress' ), 282 'access_level' => 10, 'file' => 'bp-core.php', 283 'function' => 'bp_core_admin_settings', 284 'position' => 2 285 ) ); 286 280 287 add_submenu_page( 'bp-core.php', __( 'General Settings', 'buddypress'), __( 'General Settings', 'buddypress' ), 1, 'bp-core.php', 'bp_core_admin_settings' ); 281 288 add_submenu_page( 'bp-core.php', __( 'Component Setup', 'buddypress'), __( 'Component Setup', 'buddypress' ), 2, __FILE__, 'bp_core_admin_component_setup' ); … … 322 329 323 330 /* Add the subnav items to the profile */ 324 bp_core_new_subnav_item( array( 'name' => __( 'Public', 'buddypress' ), 'slug' => 'public', 'parent_url' => $profile_link, 'parent_slug' => 'profile', 'screen_function' => 'xprofile_screen_display_profile', 'position' => 10 ) ); 331 bp_core_new_subnav_item( array( 332 'name' => __( 'Public', 'buddypress' ), 333 'slug' => 'public', 334 'parent_url' => $profile_link, 335 'parent_slug' => 'profile', 336 'screen_function' => 'xprofile_screen_display_profile', 337 'position' => 10 338 ) ); 325 339 326 340 if ( 'profile' == $bp->current_component ) { … … 572 586 return false; 573 587 574 /* If the logged in user does not have access */575 if ( !$user_has_access )576 return false;577 578 588 /* If this is for site admins only and the user is not one, don't create the subnav item */ 579 589 if ( $site_admin_only && !is_site_admin() ) … … 588 598 'slug' => $slug, 589 599 'css_id' => $item_css_id, 590 'position' => $position 600 'position' => $position, 601 'user_has_access' => $user_has_access 591 602 ); 592 603 593 if ( $bp->current_action == $slug && $bp->current_component == $parent_slug) {604 if ( ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) && $user_has_access ) { 594 605 if ( !is_object($screen_function[0]) ) 595 606 add_action( 'wp', $screen_function, 3 );
Note: See TracChangeset
for help on using the changeset viewer.