[Plugin: Debug Bar] Using Debug Bar with custom User Bar (or none)
-
This was a bit tricky, but thought I’d show my code if anyone else bumps into this.
Just add a div element with the ID of “wp-admin-bar-debug-bar” for the “Debug” button wherever you want it, and this code wherever you see fit (functions.php works)
if ( is_super_admin() ) { global $debug_bar; add_action('init', array(&$debug_bar, 'init')); add_filter('show_admin_bar', 'show_admin_bar_maybe'); add_action( 'wp_footer', array(&$debug_bar, 'render')); } function show_admin_bar_maybe($bool) { global $bt; $bt = debug_backtrace(); if( $bt[4]['function'] == "init" && $bt[4]['class'] == "Debug_Bar" ) return true; else return $bool; }
- The topic ‘[Plugin: Debug Bar] Using Debug Bar with custom User Bar (or none)’ is closed to new replies.