Ticket #10535: 10535.2.diff
File 10535.2.diff, 1.5 KB (added by , 15 years ago) |
---|
-
wp-includes/plugin.php
675 675 global $wp_filter; 676 676 static $filter_id_count = 0; 677 677 678 // If function then just skip all of the tests and not overwrite the following. 679 if ( is_string($function) ) 678 if ( is_string($function) ) { // If function then just skip all of the tests and not overwrite the following. 680 679 return $function; 681 // Object Class Calling 682 else if (is_object($function[0]) ) { 680 } else if (is_object($function[0]) ) { // Object Class Calling 681 if ( function_exists('spl_object_hash') ) 682 return spl_object_hash($function[0]) . $function[1]; 683 683 $obj_idx = get_class($function[0]).$function[1]; 684 684 if ( !isset($function[0]->wp_filter_id) ) { 685 685 if ( false === $priority ) 686 686 return false; 687 $obj_idx .= isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : 0; 688 $function[0]->wp_filter_id = $filter_id_count++; 689 } else 687 $obj_idx .= isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : $filter_id_count; 688 $function[0]->wp_filter_id = $filter_id_count; 689 ++$filter_id_count; 690 } else { 690 691 $obj_idx .= $function[0]->wp_filter_id; 692 } 693 691 694 return $obj_idx; 695 } else if ( is_string($function[0]) ) { // Static Calling 696 return $function[0].$function[1]; 692 697 } 693 // Static Calling694 else if ( is_string($function[0]) )695 return $function[0].$function[1];696 698 } 697 699 698 700 ?>