Changeset 38582
- Timestamp:
- 09/09/2016 12:33:52 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/functions.php
r38571 r38582 24 24 global $wp_filter; 25 25 26 $idx = _test_filter_build_unique_id($tag, $function_to_add, $priority); 27 $wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args); 26 if ( function_exists( 'add_filter' ) ) { 27 add_filter( $tag, $function_to_add, $priority, $accepted_args ); 28 } else { 29 $idx = _test_filter_build_unique_id($tag, $function_to_add, $priority); 30 $wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args); 31 } 28 32 return true; 29 33 }
Note: See TracChangeset
for help on using the changeset viewer.