Changeset 38571 for trunk/tests/phpunit/includes/functions.php
- Timestamp:
- 09/08/2016 03:54:13 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/functions.php
r38445 r38571 22 22 // For adding hooks before loading WP 23 23 function tests_add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) { 24 global $wp_filter , $merged_filters;24 global $wp_filter; 25 25 26 26 $idx = _test_filter_build_unique_id($tag, $function_to_add, $priority); 27 27 $wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args); 28 unset( $merged_filters[ $tag ] );29 28 return true; 30 29 } 31 30 32 31 function _test_filter_build_unique_id($tag, $function, $priority) { 33 global $wp_filter;34 static $filter_id_count = 0;35 36 32 if ( is_string($function) ) 37 33 return $function;
Note: See TracChangeset
for help on using the changeset viewer.