collector->get_panel()->title(); } /** * @return void */ public function output() { $class = get_class( $this->collector->get_panel() ); if ( ! $class ) { return; } $target = sanitize_html_class( $class ); $this->before_debug_bar_output(); echo '
'; ob_start(); $this->collector->render(); $panel = (string) ob_get_clean(); $panel = str_replace( array( '', '', '', '', ), array( '', '', '', '', ), $panel ); echo $panel; // phpcs:ignore echo '
'; $this->after_debug_bar_output(); } } /** * @param array $output * @param QM_Collectors $collectors * @return array */ function register_qm_output_html_debug_bar( array $output, QM_Collectors $collectors ) { global $debug_bar; if ( empty( $debug_bar ) ) { return $output; } foreach ( $debug_bar->panels as $panel ) { $class = get_class( $panel ); if ( ! $class ) { continue; } $panel_id = strtolower( sanitize_html_class( $class ) ); /** @var QM_Collector_Debug_Bar|null */ $collector = QM_Collectors::get( "debug_bar_{$panel_id}" ); if ( $collector && $collector->is_visible() ) { $output[ "debug_bar_{$panel_id}" ] = new QM_Output_Html_Debug_Bar( $collector ); } } return $output; } add_filter( 'qm/outputter/html', 'register_qm_output_html_debug_bar', 200, 2 );