When your website means business.

WP/CP | Type: PHPDisplay Debugging status on Admin Bar

Code shared by CodePotent; goes in your theme functions file.

function codepotent_debug_notifier_register_admin_bar() {
   if (!current_user_can('manage_options')) {
   global $wp_admin_bar;
   $label = esc_html__(' Debugging DISABLED ', 'codepotent-debug-notifier');
   if (defined('WP_DEBUG')) {
      if (WP_DEBUG == true) { // Loose comparison is intentional here.
         $label = '<div style="color: #f00;">'.esc_html__('  Debugging ENABLED  ', 'codepotent-debug-notifier').'</div>';
      'parent' => false,
      'id' => 'codepotent-debug-notifier',
      'title' => $label
add_action('wp_before_admin_bar_render', 'codepotent_debug_notifier_register_admin_bar');
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Cookies Notice