Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
WordPress - Debug Bar Panel class
<?php
Class CustomDebugBarPanel extends Debug_Bar_Panel {
public function init() {
$this->title(__('Custom Debug Bar Panel', 'debug-bar'));
add_action('wp_print_styles', array( $this, 'print_styles'));
add_action('admin_print_styles', array( $this, 'print_styles'));
}
public function prerender() {
$this->set_visible(true);
}
public function print_styles() {
wp_enqueue_style('custom-debug-bar-panel', plugins_url('css/custom-debug-bar-panel.css', __FILE__));
}
public function render() {
?>
<div class="debug-bar-cron">
<p>Content goes here</p>
</div>
<?php
}
}
<?php
/* Plugin name: Custom Debug Bar Panel */
add_filter('debug_bar_panels', function($panels) {
include_once('custom-debug-bar-panel-class.php');
$panels[] = new CustomDebugBarPanel();
return $panels;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.