Restored functionality on WP 4.7 beta with new current_priority() method.
This commit is contained in:
1 parent
67ad1370ef
commit
68302633c0
1 file changed
+4
-7
+4
-7
@@ -91,15 +91,12 @@ class Laps {
|
||||
|
||||
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;
|
||||
}
|
||||
$filter_name = current_filter();
|
||||
$filter_instance = $wp_filter[ $filter_name ];
|
||||
$priority = $filter_instance instanceof \WP_Hook ? $filter_instance->current_priority() : key( $filter_instance );
|
||||
|
||||
$event = wp_parse_args(
|
||||
self::$events[ $filter ][ $priority ],
|
||||
self::$events[ $filter_name ][ $priority ],
|
||||
array(
|
||||
'action' => 'start',
|
||||
'category' => null,
|
||||
|
||||
Reference in new issue
Block a user