[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/classes/ -> class-bp-core-nav.php (summary)

Core component class.

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

Defines 1 class

BP_Core_Nav:: (12 methods):
  __construct()
  __isset()
  __get()
  __set()
  get()
  add_nav()
  edit_nav()
  delete_nav()
  sort_nav()
  get_primary()
  get_secondary()
  get_item_nav()


Class: BP_Core_Nav  - X-Ref

BuddyPress Nav.

This class is used to build each component's navigation.

__construct( $object_id = 0 )   X-Ref
Initializes the Nav belonging to the specified object.

since: 2.6.0
param: int $object_id The item ID to build the nav for. Default is the displayed user ID.

__isset( $key )   X-Ref
Checks whether a nav item is set.

since: 2.6.0
return: bool True if the nav item is set, false otherwise.
param: string $key The requested nav slug.

__get( $key )   X-Ref
Gets a nav item.

since: 2.6.0
return: mixed The value corresponding to the requested nav item.
param: string $key The requested nav slug.

__set( $key, $value )   X-Ref
Sets a nav item.

since: 2.6.0
param: string $key   The requested nav slug.
param: mixed  $value The value of the nav item.

get( $key = '' )   X-Ref
Gets a specific nav item or array of nav items.

since: 2.6.0
return: mixed       An array of nav item, a single nav item, or null if none found.
param: string $key The nav item slug to get. Optional.

add_nav( $args )   X-Ref
Adds a new nav item.

since: 2.6.0
return: BP_Core_Nav_Item
param: array $args The nav item's arguments.

edit_nav( $args = array()   X-Ref
Edits a nav item.

since: 2.6.0
return: BP_Core_Nav_Item
param: array  $args        The nav item's arguments.
param: string $slug        The slug of the nav item.
param: string $parent_slug The slug of the parent nav item (required to edit a child).

delete_nav( $slug = '', $parent_slug = '' )   X-Ref
Unset an item or a subitem of the nav.

since: 2.6.0
return: false|callable|array False on failure, the screen function(s) on success.
param: string $slug        The slug of the main item.
param: string $parent_slug The slug of the sub item.

sort_nav( $items )   X-Ref
Sorts a list of nav items.

since: 2.6.0
return: array
param: array $items The nav items to sort.

get_primary( $args = array()   X-Ref
Gets the primary nav items.

since: 2.6.0
return: array The list of primary objects nav
param: array $args Filters to select the specific primary items. See wp_list_filter().
param: bool  $sort True to sort the nav items. False otherwise.

get_secondary( $args = array()   X-Ref
Gets the secondary nav items.

since: 2.6.0
return: bool|array The list of secondary objects nav, or false if none set.
param: array $args Filters to select the specific secondary items. See wp_list_filter().
param: bool  $sort True to sort the nav items. False otherwise.

get_item_nav()   X-Ref
Gets a nested list of visible nav items.

since: 2.6.0
return: array The list of visible nav items.



Generated: Fri Apr 26 01:01:11 2024 Cross-referenced by PHPXref 0.7.1