Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/10/2012 06:47:31 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Toggle displayed/logged-in user for sub-nav. Bail if no menu should be available. Add 'user_has_access' checks where applicable. Reverts r6519. Fixes #4661.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-loader.php

    r6342 r6622  
    117117        );
    118118
    119         $parent_url = trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() );
     119        // Determine user to use
     120        if ( bp_displayed_user_domain() ) {
     121            $user_domain = bp_displayed_user_domain();
     122        } elseif ( bp_loggedin_user_domain() ) {
     123            $user_domain = bp_loggedin_user_domain();
     124        } else {
     125            return;
     126        }
     127
     128        $parent_url = trailingslashit( $user_domain . bp_get_blogs_slug() );
    120129
    121130        $sub_nav[] = array(
Note: See TracChangeset for help on using the changeset viewer.