WordPress.org

Make WordPress Core

Ticket #10493: closures.diff

File closures.diff, 555 bytes (added by scribu, 9 years ago)
  • wp-includes/plugin.php

     
    678678        // If function then just skip all of the tests and not overwrite the following.
    679679        if ( is_string($function) )
    680680                return $function;
     681       
     682        // Closure Calling
     683        if ( is_a($function, 'Closure') )
     684                return spl_object_hash($function);
     685
    681686        // Object Class Calling
    682687        else if (is_object($function[0]) ) {
    683688                $obj_idx = get_class($function[0]).$function[1];