wordpress-website-lifecycle/debug/debug-qm-filter.php
2025-04-25 17:07:49 +02:00

22 lines
568 B
PHP

<?php
/*
* Insert this snippet in WP_Hook::apply_filters()
*
* wp-includes/class-wp-hook.php:328
*/
global $wp_filter;
// EDIT filter name here!
$_do_debug_filter = ($wp_filter['wp_head'] ?? null) === $this;
if ($_do_debug_filter) do_action('qm/start', 'filter');
// foreach ( $this->callbacks[ $priority ] as $the_ ) {
// call_user_func calls ...
if ($_do_debug_filter)
do_action('qm/lap', 'filter', QM_Util::populate_callback(['function' => $the_['function']])['name'] ?? 'N/A');
// }
if ($_do_debug_filter) do_action('qm/stop', 'filter');