Skip to:
Content
Pages
Categories
Search
Top
Bottom
Codex HomeDeveloper ResourcesDeprecated → 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

<?php bp_core_add_subnav_item( $parent_id, $slug, $name, $link, $function [, $css_id, $user_has_access, $admin_only ] ); ?>

Parameters

$parent_id
String | 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

<?php bp_core_add_nav_default( 'flickr-photos', 'bp_flickr_my_photos' ); ?>

Notes

Skip to toolbar