src/wp-includes/plugin.php 1 location
|
@@ 881-886 (lines=6) @@
|
| 878 |
|
if ( is_string($function) ) |
| 879 |
|
return $function; |
| 880 |
|
|
| 881 |
|
if ( is_object($function) ) { |
| 882 |
|
// Closures are currently implemented as objects |
| 883 |
|
$function = array( $function, '' ); |
| 884 |
|
} else { |
| 885 |
|
$function = (array) $function; |
| 886 |
|
} |
| 887 |
|
|
| 888 |
|
if (is_object($function[0]) ) { |
| 889 |
|
// Object Class Calling |
tests/phpunit/includes/functions.php 1 location
|
@@ 39-44 (lines=6) @@
|
| 36 |
|
if ( is_string($function) ) |
| 37 |
|
return $function; |
| 38 |
|
|
| 39 |
|
if ( is_object($function) ) { |
| 40 |
|
// Closures are currently implemented as objects |
| 41 |
|
$function = array( $function, '' ); |
| 42 |
|
} else { |
| 43 |
|
$function = (array) $function; |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
if (is_object($function[0]) ) { |
| 47 |
|
return spl_object_hash($function[0]) . $function[1]; |