bp_core_add_subnav_item()

bp_core_add_subnav_item()

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

Deprecated
This function is deprecated in BuddyPress 1.1. Please refer to bp_core_new_subnav_item() going forward.
Description
Adds a navigation item to the sub navigation array used in BuddyPress themes.
Usage

Parameters
$parent_idString | Required | The id of the parent navigation item (usually the slug, or the css_id if set)
$slug String | Required | The URL slug for the sub-nav item.
$name String | Required | The display name for the sub-nav item.
$link String | Required | The URL of the sub-nav item, without the slug. This is basically the URL of the main nav item.
$function String | Required | The name of the screen function that will display the sub-nav item screen.
$css_id String | Optional | Default: $slug value | The ID to give the navigation item in HTML for CSS styling.
$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 sub-nav item only be access by site administrators?.
Return Values
N/A
Examples

Notes

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注