Changeset 1767
- Timestamp:
- 09/02/2009 09:52:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r1762 r1767 534 534 * bp_core_remove_nav_item() 535 535 * 536 * Removes a navigation item from the navigation array used in BuddyPress themes. 537 * 538 * @package BuddyPress Core 539 * @param $parent_id The id of the parent navigation item. 536 * Removes a navigation item from the main navigation array. 537 * 538 * @package BuddyPress Core 540 539 * @param $slug The slug of the sub navigation item. 541 540 */ 542 function bp_core_remove_nav_item( $name ) { 543 global $bp; 544 545 foreach( (array) $bp->bp_nav as $item_key => $item_value ) { 546 if ( $item_value['name'] == $name ) { 547 unset( $bp->bp_nav[$item_key] ); 548 } 549 } 550 551 foreach( (array) $bp->bp_users_nav as $item_key => $item_value ) { 552 if ( $item_value['name'] == $name ) { 553 unset( $bp->bp_nav[$item_key] ); 554 } 555 } 541 function bp_core_remove_nav_item( $slug ) { 542 global $bp; 543 544 unset( $bp->bp_nav[$slug] ); 556 545 } 557 546
Note: See TracChangeset
for help on using the changeset viewer.