Changeset 1982 for trunk/bp-core.php
- Timestamp:
- 09/28/2009 10:49:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r1980 r1982 572 572 */ 573 573 function bp_core_get_displayed_userid( $user_login ) { 574 return apply_filters( 'bp_core_get_displayed_userid', bp_core_get_userid _from_user_login( $user_login ) );574 return apply_filters( 'bp_core_get_displayed_userid', bp_core_get_userid( $user_login ) ); 575 575 } 576 576 … … 584 584 */ 585 585 function bp_core_new_nav_item( $args = '' ) { 586 global $bp, $temp_nav; 587 588 $temp_nav[] = $args; 589 586 global $bp; 587 590 588 $defaults = array( 591 589 'name' => false, // Display name for the nav item … … 639 637 } 640 638 639 /** 640 * bp_core_new_nav_default() 641 * 642 * Modify the default subnav item to load when a top level nav item is clicked. 643 * 644 * @package BuddyPress Core 645 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 646 */ 647 function bp_core_new_nav_default( $args = '' ) { 648 global $bp; 649 650 $defaults = array( 651 'parent_slug' => false, // Slug of the parent 652 'screen_function' => false, // The name of the function to run when clicked 653 'subnav_slug' => false // The slug of the subnav item to select when clicked 654 ); 655 656 $r = wp_parse_args( $args, $defaults ); 657 extract( $r, EXTR_SKIP ); 658 659 if ( $bp->current_component == $parent_slug && !$bp->current_action ) { 660 if ( !is_object( $screen_function[0] ) ) 661 add_action( 'wp', $screen_function, 3 ); 662 else 663 add_action( 'wp', array( &$screen_function[0], $screen_function[1] ), 3 ); 664 665 if ( $subnav_slug ) 666 $bp->current_action = $subnav_slug; 667 } 668 } 641 669 642 670 /**
Note: See TracChangeset
for help on using the changeset viewer.