Unit tests for has_filter() not resetting the array pointer.
props pento. fixes #29070. see [29472]. Built from https://develop.svn.wordpress.org/trunk@29665 git-svn-id: http://core.svn.wordpress.org/trunk@29439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
53f1ba51e4
commit
b5f0a32baa
|
@ -105,6 +105,7 @@ function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1
|
|||
* return value.
|
||||
*/
|
||||
function has_filter($tag, $function_to_check = false) {
|
||||
// Don't reset the internal array pointer
|
||||
$wp_filter = $GLOBALS['wp_filter'];
|
||||
|
||||
$has = ! empty( $wp_filter[ $tag ] );
|
||||
|
|
Loading…
Reference in New Issue