bp_core_add_nav_default()

bp_core_add_nav_default()

Codex Home → Developer Resources → Deprecated → bp_core_add_nav_default()
bp_core_add_nav_default()

Deprecated
This function is deprecated in BuddyPress 1.1. Please refer to bp_core_new_nav_item() going forward.
Description
Set a default action for a nav item, when a sub nav item has not yet been selected.
Usage

Parameters
$parent_idString | Required | The id of the parent navigation item (usually the slug, or the css_id if set)
$function String | Required | The name of the screen function that will display the sub-nav item screen.
$slugString | Optional | Default: false | By setting a slug you can override the $bp[‘current_action’] variable. Can be used to change which navigation item is highlighted.
$user_has_access Bool | Optional | Default: true | Does the logged in user have access to this sub-nav item? You can use bp_is_home() to limit a sub-nav item to only the logged in user.
$admin_only Bool | Optional | Default: false | Can this item only be access by site administrators?
Return Values
N/A
Examples

Notes

上次修改 2021.12.31