[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/ -> bp-core-buddybar.php (summary)

Core BuddyPress Navigational Functions.

File Size: 945 lines (39 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 13 functions

  bp_core_new_nav_item()
  bp_core_create_nav_link()
  bp_core_register_nav_screen_function()
  bp_core_new_nav_default()
  bp_core_new_subnav_item()
  bp_core_create_subnav_link()
  bp_core_register_subnav_screen_function()
  bp_core_maybe_hook_new_subnav_screen_function()
  bp_nav_item_has_subnav()
  bp_core_remove_nav_item()
  bp_core_remove_subnav_item()
  bp_core_reset_subnav_items()
  bp_get_admin_bar_pref()

Functions
Functions that are not part of a class:

bp_core_new_nav_item( $args, $component = 'members' )   X-Ref
Add an item to the primary navigation of the specified component.

param: array|string $args {
param: string       $component The component the navigation is attached to. Defaults to 'members'.
since: 1.1.0
since: 2.6.0 Introduced the `$component` parameter.
since: 4.0.0 Introduced the `$component_id` argument.
return: null|false Returns false on failure.

bp_core_create_nav_link( $args = '', $component = 'members' )   X-Ref
Add a link to the main BuddyPress navigation.

param: array|string $args {
param: string       $component Optional. Component that the nav belongs to.
since: 2.4.0
since: 2.6.0 Introduced the `$component` parameter. Began returning a BP_Core_Nav_Item
since: 4.0.0 Introduced `$component_id` argument.
return: false|array Returns false on failure, new nav item on success.

bp_core_register_nav_screen_function( $args = '' )   X-Ref
Register a screen function for an item in the main nav array.

param: array|string $args {
since: 2.4.0
return: false|null Returns false on failure.

bp_core_new_nav_default( $args = '' )   X-Ref
Modify the default subnav item that loads when a top level nav item is clicked.

param: array|string $args {
since: 1.1.0

bp_core_new_subnav_item( $args, $component = null )   X-Ref
Add an item to secondary navigation of the specified component.

param: array|string $args {
param: string|null    $component The component the navigation is attached to. Defaults to 'members'.
since: 1.1.0
since: 2.6.0 Introduced the `$component` parameter.
return: null|false Returns false on failure.

bp_core_create_subnav_link( $args = '', $component = 'members' )   X-Ref
Add a subnav link to the BuddyPress navigation.

param: array|string $args {
param: string       $component The component the navigation is attached to. Defaults to 'members'.
since: 2.4.0
since: 2.6.0 Introduced the `$component` parameter. Began returning a BP_Core_Nav_Item object on success.
return: false|array Returns false on failure, new BP_Core_Nav_Item instance on success.

bp_core_register_subnav_screen_function( $args = '', $component = 'members' )   X-Ref
Register a screen function, whether or not a related subnav link exists.

param: array|string $args {
param: string       $component The component the navigation is attached to. Defaults to 'members'.
since: 2.4.0
since: 2.6.0 Introduced the `$component` parameter.
return: null|false Returns false on failure.

bp_core_maybe_hook_new_subnav_screen_function( $subnav_item, $component = 'members' )   X-Ref
For a given subnav item, either hook the screen function or generate redirect arguments, as necessary.

param: array  $subnav_item The subnav array added to the secondary navigation of
param: string $component   The component the navigation is attached to. Defaults to 'members'.
since: 2.1.0
since: 2.6.0 Introduced the `$component` parameter.
return: array

bp_nav_item_has_subnav( $nav_item = '', $component = 'members' )   X-Ref
Check whether a given nav item has subnav items.

param: string $nav_item  The slug of the top-level nav item whose subnav items you're checking.
param: string $component The component the navigation is attached to. Defaults to 'members'.
since: 1.5.0
since: 2.6.0 Introduced the `$component` parameter.
return: bool $has_subnav True if the nav item is found and has subnav items; false otherwise.

bp_core_remove_nav_item( $slug, $component = null )   X-Ref
Deletes an item from the primary navigation of the specified component.

param: string      $slug      The slug of the primary navigation item.
param: string|null $component The component the navigation is attached to. Defaults to 'members'.
since: 1.0.0
since: 2.6.0 Introduced the `$component` parameter.
return: bool Returns false on failure, True on success.

bp_core_remove_subnav_item( $parent_slug, $slug, $component = null )   X-Ref
Deletes an item from the secondary navigation of the specified component.

param: string      $parent_slug The slug of the primary navigation item.
param: string      $slug        The slug of the secondary item to be removed.
param: string|null $component   The component the navigation is attached to. Defaults to 'members'.
since: 1.0.0
since: 2.6.0 Introduced the `$component` parameter.
return: bool Returns false on failure, True on success.

bp_core_reset_subnav_items( $parent_slug, $component = 'members' )   X-Ref
Clear all subnav items from a specific nav item.

param: string $parent_slug The slug of the parent navigation item.
param: string $component   The component the navigation is attached to. Defaults to 'members'.
since: 1.0.0
since: 2.6.0 Introduced the `$component` parameter.

bp_get_admin_bar_pref( $context, $user = 0 )   X-Ref
Retrieve the Toolbar display preference of a user based on context.

This is a direct copy of WP's private _get_admin_bar_pref()

param: string $context Context of this preference check. 'admin' or 'front'.
param: int    $user    Optional. ID of the user to check. Default: 0 (which falls back to the logged-in user's ID).
since: 1.5.0
return: bool True if the toolbar should be showing for this user.



Generated: Sun Nov 17 01:01:36 2019 Cross-referenced by PHPXref 0.7.1