public static function tick($input = null)
{
global $wp_filter;
$filter = current_filter();
$priority = key($wp_filter[$filter]);
if ('callbacks' === $priority) {
// Fails on WP 4.7, see https://core.trac.wordpress.org/ticket/39007
return $input;
}
$event = wp_parse_args(self::$events[$filter][$priority], array('action' => 'start', 'category' => null));
if ('stop' === $event['action'] && !self::$stopwatch->isStarted($event['event'])) {
return $input;
}
self::$stopwatch->{$event['action']}($event['event'], $event['category']);
return $input;
}