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
<?php bp_core_add_nav_default( $parent_id, $function [, $slug, $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)
$function
String | Required | The name of the screen function that will display the sub-nav item screen.
$slug
String | 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
<?php bp_core_add_nav_default( 'flickr-photos', 'bp_flickr_my_photos' ); ?>