Skip to:
Content
Pages
Categories
Search
Top
Bottom

‘hide-loggedout-adminbar’ option not working


  • AaronNGray
    Member

    @aaronngray

    The ‘hide-loggedout-adminbar’ option does not seem to be working …

    bp-core/bp-core-buddybar.php:380 & 570

    function bp_core_load_admin_bar()
    ….
    // Don’t show if admin bar is disabled for non-logged in users
    if ( (int) bp_get_option( ‘hide-loggedout-adminbar’ ) && !is_user_logged_in() )
    return;

    replace with :-

    // Don’t show if admin bar is disabled for non-logged in users
    if ( strcmp( bp_get_option( ‘hide-loggedout-adminbar’ ), ‘1’) && !is_user_logged_in() )
    return;

    Allowing child theme to do the following :-

    /**
    * Hide admin bar when not logged in.
    **/

    function bp_childtheme_site_options( $options) {
    $options = ‘1’;

    return $options;
    }
    add_filter( ‘bp_core_site_options’, ‘bp_childtheme_site_options’ );

    AFAICS this or an equivalent change is needed to allow disabling of the buddybar if user is not logged in.

    Aaron

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘‘hide-loggedout-adminbar’ option not working’ is closed to new replies.
Skip to toolbar