• Resolved Space

    (@bkno)


    Impressed with Black Bar.

    Is it possible to restrict visibility to admins only?

    Although probably intended to just be installed on dev environments, it would be good to have the option of using it to debug something quickly on a live site without it being visible to all users.

Viewing 1 replies (of 1 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Hi @bkno

    Please update to v2.1.0

    Once you have updated, you can add the following code to your theme’s functions.php file:

    add_filter( 'blackbar/enabled', function( $result ) {
        return is_user_logged_in()
            ? current_user_can('administrator')
            : false;
    });
Viewing 1 replies (of 1 total)
  • The topic ‘Restrict debug bar to admins only?’ is closed to new replies.