Changeset 7119 for branches/0.9/bb-includes/wp-functions.php
- Timestamp:
- 08/11/2020 05:48:29 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9/bb-includes/wp-functions.php
r7117 r7119 884 884 endif; 885 885 886 if ( !function_exists('_wp_filter_build_unique_id') ) : // [WP 6025]886 if ( !function_exists('_wp_filter_build_unique_id') ) : // [WP38282] 887 887 function _wp_filter_build_unique_id($tag, $function, $priority = 10) 888 888 { 889 889 global $wp_filter; 890 891 // If function then just skip all of the tests and not overwrite the following. 892 // Static Calling 890 static $filter_id_count = 0; 891 893 892 if( is_string($function) ) 894 893 return $function; 895 894 896 895 if ( is_object( $function ) ) { 897 896 // Closures are currently implemented as objects. 898 897 $function = array( $function, '' ); 899 898 } else { 900 899 $function = (array) $function; 901 900 } 902 901 903 // Object Class Calling 904 if(is_object($function[0]) ) 902 if ( is_object($function[0]) ) 905 903 { 904 // Object Class Calling 906 905 if ( function_exists('spl_object_hash') ) { 907 906 return spl_object_hash($function[0]) . $function[1]; 908 907 } else { 909 908 $obj_idx = get_class($function[0]).$function[1]; 910 if( is_null($function[0]->wp_filter_id) ) { 911 $count = count((array)$wp_filter[$tag][$priority]); 912 $function[0]->wp_filter_id = $count; 913 $obj_idx .= $count; 914 unset($count); 915 } else 909 if ( !isset($function[0]->wp_filter_id) ) { 910 if ( false === $priority ) 911 return false; 912 $obj_idx .= isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : $filter_id_count; 913 $function[0]->wp_filter_id = $filter_id_count; 914 ++$filter_id_count; 915 } else { 916 916 $obj_idx .= $function[0]->wp_filter_id; 917 } 917 918 return $obj_idx; 918 919 }
Note: See TracChangeset
for help on using the changeset viewer.