Skip to:
Content

BuddyPress.org

Changeset 1755


Ignore:
Timestamp:
09/01/2009 07:20:58 PM (17 years ago)
Author:
apeatling
Message:

Fixed subnav item $user_has_access checking so that sub nav items will not show up if the logged in user does not have access to them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1740 r1755  
    572572                return false;
    573573       
     574        /* If the logged in user does not have access */
     575        if ( !$user_has_access )
     576                return false;
     577       
    574578        /* If this is for site admins only and the user is not one, don't create the subnav item */
    575579        if ( $site_admin_only && !is_site_admin() )
    … …  
    587591        );
    588592               
    589         if ( $bp->current_action == $slug && $bp->current_component == $parent_slug && $user_has_access ) {
     593        if ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) {
    590594                if ( !is_object($screen_function[0]) )
    591595                        add_action( 'wp', $screen_function, 3 );
Note: See TracChangeset for help on using the changeset viewer.