Changeset 9131 for trunk/src/bp-core/bp-core-buddybar.php
- Timestamp:
- 11/10/2014 07:13:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-buddybar.php
r8568 r9131 254 254 * @type string $link Optional. The URL that the subnav item should point 255 255 * to. Defaults to a value generated from the $parent_url + $slug. 256 * @type bool $show_in_admin_bar Optional. Whether the nav item should be 257 * added into the group's "Edit" Admin Bar menu for group admins. 258 * Default: false. 256 259 * } 257 260 * @return bool|null Returns false on failure. … … 261 264 262 265 $r = wp_parse_args( $args, array( 263 'name' => false, // Display name for the nav item 264 'slug' => false, // URL slug for the nav item 265 'parent_slug' => false, // URL slug of the parent nav item 266 'parent_url' => false, // URL of the parent item 267 'item_css_id' => false, // The CSS ID to apply to the HTML of the nav item 268 'user_has_access' => true, // Can the logged in user see this nav item? 269 'no_access_url' => '', 270 'site_admin_only' => false, // Can only site admins see this nav item? 271 'position' => 90, // Index of where this nav item should be positioned 272 'screen_function' => false, // The name of the function to run when clicked 273 'link' => '' // The link for the subnav item; optional, not usually required. 266 'name' => false, // Display name for the nav item 267 'slug' => false, // URL slug for the nav item 268 'parent_slug' => false, // URL slug of the parent nav item 269 'parent_url' => false, // URL of the parent item 270 'item_css_id' => false, // The CSS ID to apply to the HTML of the nav item 271 'user_has_access' => true, // Can the logged in user see this nav item? 272 'no_access_url' => '', 273 'site_admin_only' => false, // Can only site admins see this nav item? 274 'position' => 90, // Index of where this nav item should be positioned 275 'screen_function' => false, // The name of the function to run when clicked 276 'link' => '', // The link for the subnav item; optional, not usually required. 277 'show_in_admin_bar' => false, // Show the Manage link in the current group's "Edit" Admin Bar menu 274 278 ) ); 275 279 … … 298 302 299 303 $subnav_item = array( 300 'name' => $name, 301 'link' => trailingslashit( $link ), 302 'slug' => $slug, 303 'css_id' => $item_css_id, 304 'position' => $position, 305 'user_has_access' => $user_has_access, 306 'no_access_url' => $no_access_url, 307 'screen_function' => &$screen_function 304 'name' => $name, 305 'link' => trailingslashit( $link ), 306 'slug' => $slug, 307 'css_id' => $item_css_id, 308 'position' => $position, 309 'user_has_access' => $user_has_access, 310 'no_access_url' => $no_access_url, 311 'screen_function' => &$screen_function, 312 'show_in_admin_bar' => (bool) $r['show_in_admin_bar'], 308 313 ); 314 309 315 $bp->bp_options_nav[$parent_slug][$slug] = $subnav_item; 310 316
Note: See TracChangeset
for help on using the changeset viewer.