Changeset 4867
- Timestamp:
- 07/26/2011 01:25:17 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-buddybar.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-buddybar.php
r4833 r4867 285 285 286 286 /** 287 * Determines whether a given nav item has subnav items 288 * 289 * @package BuddyPress 290 * @since 1.3 291 * 292 * @param str $nav_item The id of the top-level nav item whose nav items you're checking 293 * @return bool $has_subnav True if the nav item is found and has subnav items; false otherwise 294 */ 295 function bp_nav_item_has_subnav( $nav_item = '' ) { 296 global $bp; 297 298 if ( !$nav_item ) 299 $nav_item = bp_current_component(); 300 301 $has_subnav = isset( $bp->bp_options_nav[$nav_item] ) && count( $bp->bp_options_nav[$nav_item] ) > 0; 302 303 return apply_filters( 'bp_nav_item_has_subnav', $has_subnav, $nav_item ); 304 } 305 306 /** 287 307 * Removes a navigation item from the sub navigation array used in BuddyPress themes. 288 308 *
Note: See TracChangeset
for help on using the changeset viewer.