• Resolved xclamation

    (@xclamation)


    Hi Greg,

    First off, thanks for creating such a great plugin and releasing it for free.

    I use your plugin on my clients websites while the sites are in development to help me debug. However, sometimes I use your plugin on live websites in order to debug issues too.

    Could you possibly look at adding a conditional statement to only display the debug bar if the user is logged in as admin? I really don’t see the point of displaying the debug bar to non-logged in users or basic ‘subscribers’.

    Thanks,

    Matthew

    http://wordpress.org/extend/plugins/blackbox-debug-bar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I had the same issue and I modified the plugin myself. The patched version can be found in my forked Git Repository.

    Plugin Author Greg Winiarski

    (@gwin)

    You can add following code in theme functions.php file (or put it in a new plugin)

    add_action("init", "blackbox_disable");
    function blackbox_disable() {
        if(!current_user_can("edit_plugins")) {
            remove_action('admin_footer', array("BlackBox_Hook", "footer"));
            remove_action('wp_footer', array("BlackBox_Hook", "footer"));
        }
    }

    this will disable BlackBox for all users except Administrators.

    Thread Starter xclamation

    (@xclamation)

    Thanks to both daigo75 and Greg! I went with Gregs solution in the end.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display debug bar only to admins’ is closed to new replies.