- Timestamp:
- 08/23/2021 02:03:02 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-settings/classes/class-bp-settings-component.php
r13090 r13091 99 99 * @since 1.5.0 100 100 * 101 * @param array $args Array of arguments. 101 * @see BP_Component::setup_globals() for a description of arguments. 102 * 103 * @param array $args See BP_Component::setup_globals() for a description. 102 104 */ 103 105 public function setup_globals( $args = array() ) { … … 120 122 * @since 1.5.0 121 123 * 122 * @param array $main_nav Array of main nav items. 123 * @param array $sub_nav Array of sub nav items. 124 * @see BP_Component::setup_nav() for a description of arguments. 125 * 126 * @param array $main_nav Optional. See BP_Component::setup_nav() for 127 * description. 128 * @param array $sub_nav Optional. See BP_Component::setup_nav() for 129 * description. 124 130 */ 125 131 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { … … 145 151 'show_for_displayed_user' => $access, 146 152 'screen_function' => 'bp_settings_screen_general', 147 'default_subnav_slug' => 'general' 153 'default_subnav_slug' => 'general', 148 154 ); 149 155 … … 156 162 'screen_function' => 'bp_settings_screen_general', 157 163 'position' => 10, 158 'user_has_access' => $access 164 'user_has_access' => $access, 159 165 ); 160 166 … … 168 174 'screen_function' => 'bp_settings_screen_notification', 169 175 'position' => 20, 170 'user_has_access' => $access 176 'user_has_access' => $access, 171 177 ); 172 178 … … 180 186 'screen_function' => 'bp_settings_screen_capabilities', 181 187 'position' => 80, 182 'user_has_access' => ! bp_is_my_profile() 188 'user_has_access' => ! bp_is_my_profile(), 183 189 ); 184 190 } … … 223 229 224 230 /** 225 * Set up the Toolbar. 226 * 227 * @since 1.5.0 228 * 229 * @param array $wp_admin_nav Array of Admin Bar items. 231 * Set up the component entries in the WordPress Admin Bar. 232 * 233 * @since 1.5.0 234 * 235 * @see BP_Component::setup_nav() for a description of the $wp_admin_nav 236 * parameter array. 237 * 238 * @param array $wp_admin_nav See BP_Component::setup_admin_bar() for a 239 * description. 230 240 */ 231 241 public function setup_admin_bar( $wp_admin_nav = array() ) { … … 242 252 'id' => 'my-account-' . $this->id, 243 253 'title' => __( 'Settings', 'buddypress' ), 244 'href' => $settings_link 254 'href' => $settings_link, 245 255 ); 246 256 … … 251 261 'title' => __( 'General', 'buddypress' ), 252 262 'href' => $settings_link, 253 'position' => 10 263 'position' => 10, 254 264 ); 255 265 … … 261 271 'title' => __( 'Email', 'buddypress' ), 262 272 'href' => trailingslashit( $settings_link . 'notifications' ), 263 'position' => 20 273 'position' => 20, 264 274 ); 265 275 } … … 286 296 'title' => __( 'Delete Account', 'buddypress' ), 287 297 'href' => trailingslashit( $settings_link . 'delete-account' ), 288 'position' => 90 298 'position' => 90, 289 299 ); 290 300 }
Note: See TracChangeset
for help on using the changeset viewer.