Create a gist now

Instantly share code, notes, and snippets.

WordPress - Debug Bar Panel class
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() {
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>
/* Plugin name: Custom Debug Bar Panel */
add_filter('debug_bar_panels', function($panels) {
$panels[] = new CustomDebugBarPanel();
return $panels;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment