Skip to:
Content

BuddyPress.org

Changeset 6161


Ignore:
Timestamp:
06/30/2012 02:44:30 PM (9 years ago)
Author:
djpaul
Message:

Stop the Toolbar showing when the user is logged in and the BuddyBar is enabled. Fixes #3661 again.

Location:
trunk/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-settings.php

    r6159 r6161  
    2929
    3030    <input id="hide-loggedout-adminbar" name="hide-loggedout-adminbar" type="checkbox" value="1" <?php checked( !bp_hide_loggedout_adminbar( false ) ); ?> />
    31     <label for="hide-loggedout-adminbar"><?php _e( 'Show the admin bar for logged out users', 'buddypress' ); ?></label>
     31    <label for="hide-loggedout-adminbar"><?php _e( 'Show the Toolbar for logged out users', 'buddypress' ); ?></label>
    3232
    3333<?php
  • trunk/bp-core/bp-core-buddybar.php

    r6093 r6161  
    632632
    633633    // Don't show if Toolbar is disabled for non-logged in users
    634     if ( (int) bp_get_option( 'hide-loggedout-adminbar' ) )
     634    if ( (int) bp_get_option( 'hide-loggedout-adminbar' ) && ! is_user_logged_in() )
    635635        return;
    636636
    637637    // Show the WordPress Toolbar
    638638    if ( bp_use_wp_admin_bar() && $wp_version >= 3.1 ) {
     639
    639640        // Respect user's Toolbar display preferences
    640641        if ( is_user_logged_in() && ( bp_get_admin_bar_pref( 'front', bp_loggedin_user_id() ) || bp_get_admin_bar_pref( 'admin', bp_loggedin_user_id() ) ) )
     
    645646    // Hide the WordPress Toolbar
    646647    } elseif ( !bp_use_wp_admin_bar() ) {
    647 
    648648        // Keep the WP Toolbar from loading
    649649        show_admin_bar( false );
Note: See TracChangeset for help on using the changeset viewer.