673 */ |
673 */ |
674 function _wp_filter_build_unique_id($tag, $function, $priority) { |
674 function _wp_filter_build_unique_id($tag, $function, $priority) { |
675 global $wp_filter; |
675 global $wp_filter; |
676 static $filter_id_count = 0; |
676 static $filter_id_count = 0; |
677 |
677 |
678 // If function then just skip all of the tests and not overwrite the following. |
678 if ( is_string($function) ) { |
679 if ( is_string($function) ) |
|
680 return $function; |
679 return $function; |
681 // Object Class Calling |
680 } else if (is_object($function[0]) ) { |
682 else if (is_object($function[0]) ) { |
681 // Object Class Calling |
683 $obj_idx = get_class($function[0]).$function[1]; |
682 if ( function_exists('spl_object_hash') ) { |
684 if ( !isset($function[0]->wp_filter_id) ) { |
683 return spl_object_hash($function[0]) . $function[1]; |
685 if ( false === $priority ) |
684 } else { |
686 return false; |
685 $obj_idx = get_class($function[0]).$function[1]; |
687 $obj_idx .= isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : 0; |
686 if ( !isset($function[0]->wp_filter_id) ) { |
688 $function[0]->wp_filter_id = $filter_id_count++; |
687 if ( false === $priority ) |
689 } else |
688 return false; |
690 $obj_idx .= $function[0]->wp_filter_id; |
689 $obj_idx .= isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : $filter_id_count; |
691 return $obj_idx; |
690 $function[0]->wp_filter_id = $filter_id_count; |
692 } |
691 ++$filter_id_count; |
693 // Static Calling |
692 } else { |
694 else if ( is_string($function[0]) ) |
693 $obj_idx .= $function[0]->wp_filter_id; |
|
694 } |
|
695 |
|
696 return $obj_idx; |
|
697 } |
|
698 } else if ( is_string($function[0]) ) { |
|
699 // Static Calling |
695 return $function[0].$function[1]; |
700 return $function[0].$function[1]; |
|
701 } |
696 } |
702 } |
697 |
703 |
698 ?> |
704 ?> |