Changeset 5829 for trunk/bp-settings/bp-settings-loader.php
- Timestamp:
- 02/23/2012 06:18:39 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-settings/bp-settings-loader.php
r5704 r5829 50 50 * 51 51 * @since 1.5 52 * @global obj $bp53 52 */ 54 53 function setup_globals() { … … 69 68 /** 70 69 * Setup BuddyBar navigation 71 *72 * @global obj $bp73 70 */ 74 71 function setup_nav() { 75 global $bp;76 72 77 73 // Define local variable … … 84 80 'position' => 100, 85 81 'show_for_displayed_user' => bp_core_can_edit_settings(), 86 'screen_function' => 'bp_ core_screen_general_settings',82 'screen_function' => 'bp_settings_screen_general', 87 83 'default_subnav_slug' => 'general' 88 84 ); … … 104 100 'parent_url' => $settings_link, 105 101 'parent_slug' => $this->slug, 106 'screen_function' => 'bp_ core_screen_general_settings',102 'screen_function' => 'bp_settings_screen_general', 107 103 'position' => 10, 108 104 'user_has_access' => bp_core_can_edit_settings() … … 115 111 'parent_url' => $settings_link, 116 112 'parent_slug' => $this->slug, 117 'screen_function' => 'bp_ core_screen_notification_settings',113 'screen_function' => 'bp_settings_screen_notification', 118 114 'position' => 20, 119 115 'user_has_access' => bp_core_can_edit_settings() 120 116 ); 121 117 118 // Add Spam Account nav item 119 if ( bp_current_user_can( 'bp_moderate' ) ) { 120 $sub_nav[] = array( 121 'name' => __( 'Capabilities', 'buddypress' ), 122 'slug' => 'capabilities', 123 'parent_url' => $settings_link, 124 'parent_slug' => $this->slug, 125 'screen_function' => 'bp_settings_screen_capabilities', 126 'position' => 80, 127 'user_has_access' => ! bp_is_my_profile() 128 ); 129 } 130 122 131 // Add Delete Account nav item 123 if ( ! bp_current_user_can( 'bp_moderate' ) && empty( $bp->site_options['bp-disable-account-deletion']) ) {132 if ( ! bp_disable_account_deletion() ) { 124 133 $sub_nav[] = array( 125 134 'name' => __( 'Delete Account', 'buddypress' ), … … 127 136 'parent_url' => $settings_link, 128 137 'parent_slug' => $this->slug, 129 'screen_function' => 'bp_ core_screen_delete_account',138 'screen_function' => 'bp_settings_screen_delete_account', 130 139 'position' => 90, 131 'user_has_access' => bp_is_my_profile() 140 'user_has_access' => bp_is_my_profile() || !is_super_admin( bp_displayed_user_id() ) 132 141 ); 133 142 }
Note: See TracChangeset
for help on using the changeset viewer.