Tests: Use add_filter() when it's available.

The `tests_add_filter()` helper function directly manipulates the `$wp_filter` global, instead of using `add_filter()`. We can use `add_filter()` when it's available, and fall back to manipulating `$wp_filter` when it isn't, relying on the `$wp_filter` bootstrap code at the top of `plugin.php` to handle conversion.

Props boonebgorges, dd32 and pento: WordPress Thought Leadership Triumvirate.
Fixes #17817.


Built from https://develop.svn.wordpress.org/trunk@38582


git-svn-id: http://core.svn.wordpress.org/trunk@38525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2016-09-09 00:34:31 +00:00
parent 2dee7cdffc
commit f54dafc2b7

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38580';
$wp_version = '4.7-alpha-38582';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.