Skip to:
Content

BuddyPress.org

Changeset 10001


Ignore:
Timestamp:
07/08/2015 01:40:01 AM (9 years ago)
Author:
dcavins
Message:

Finish removing extract in bp_core_new_subnav().

Fixes if condition for a subnavigation item that
is currently being requested.

See #6503.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-buddybar.php

    r9997 r10001  
    398398 */
    399399function bp_core_register_subnav_screen_function( $args = '' ) {
     400    $bp = buddypress();
     401
    400402    $r = wp_parse_args( $args, array(
    401403        'slug'              => false, // URL slug for the screen
     
    430432
    431433    // If we *do* meet condition (2), then the added subnav item is currently being requested
    432     if ( ( bp_current_action() && bp_is_current_action( $r['slug'] ) ) || ( bp_is_user() && ! bp_current_action() && ( $r['screen_function'] == $bp->bp_nav[$parent_slug]['screen_function'] ) ) ) {
     434    if ( ( bp_current_action() && bp_is_current_action( $r['slug'] ) ) || ( bp_is_user() && ! bp_current_action() && ( $r['screen_function'] == $bp->bp_nav[$r['parent_slug']]['screen_function'] ) ) ) {
    433435
    434436        // If this is for site admins only and the user is not one, don't create the subnav item
Note: See TracChangeset for help on using the changeset viewer.