Fix notices/usage of closures as action/filter handlers. Fixes #10493 based on patch from scribu.
git-svn-id: https://develop.svn.wordpress.org/trunk@14690 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
542dea5b25
commit
bfb56d204b
|
@ -737,7 +737,12 @@ function _wp_filter_build_unique_id($tag, $function, $priority) {
|
||||||
if ( is_string($function) )
|
if ( is_string($function) )
|
||||||
return $function;
|
return $function;
|
||||||
|
|
||||||
|
// Closures are currently implemented as objects
|
||||||
|
if ( is_object($function) ) {
|
||||||
|
$function = array( $function );
|
||||||
|
} else {
|
||||||
$function = (array) $function;
|
$function = (array) $function;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_object($function[0]) ) {
|
if (is_object($function[0]) ) {
|
||||||
// Object Class Calling
|
// Object Class Calling
|
||||||
|
|
Loading…
Reference in New Issue