Changeset 11409
- Timestamp:
- 05/20/2009 04:59:01 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r11072 r11409 666 666 * @global array $wp_filter Storage for all of the filters and actions 667 667 * @param string $tag Used in counting how many hooks were applied 668 * @param string|array$function Used for creating unique id668 * @param callback $function Used for creating unique id 669 669 * @param int|bool $priority Used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise. 670 670 * @param string $type filter or action 671 * @return string Unique ID for usage as array key671 * @return string|bool Unique ID for usage as array key or false if $priority === false and $function is an object reference, and it does not already have a uniqe id. 672 672 */ 673 673 function _wp_filter_build_unique_id($tag, $function, $priority) { 674 674 global $wp_filter; 675 static $filter_id_count = 0; 675 676 676 677 // If function then just skip all of the tests and not overwrite the following. … … 683 684 if ( false === $priority ) 684 685 return false; 685 $count = isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : 0; 686 $function[0]->wp_filter_id = $count; 687 $obj_idx .= $count; 688 unset($count); 686 $obj_idx .= isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : 0; 687 $function[0]->wp_filter_id = $filter_id_count++; 689 688 } else 690 689 $obj_idx .= $function[0]->wp_filter_id;
Note: See TracChangeset
for help on using the changeset viewer.