mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
Themes: Make sure the current_theme_supports-{$feature} filter is consistently applied.
Previously, the filter was not applied if there are no arguments passed to `current_theme_supports()`. Follow-up to [12350], [19682]. Props helgatheviking, azouamauriac, pavanpatil1, SergeyBiryukov. Fixes #55219. git-svn-id: https://develop.svn.wordpress.org/trunk@52812 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -167,6 +167,17 @@ class Tests_Theme_Support extends WP_UnitTestCase {
|
||||
$this->assertFalse( current_theme_supports( 'foobar', 'bar' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 55219
|
||||
*/
|
||||
public function test_plugin_hook_with_no_args() {
|
||||
add_theme_support( 'foobar' );
|
||||
|
||||
add_filter( 'current_theme_supports-foobar', '__return_false' );
|
||||
|
||||
$this->assertFalse( current_theme_supports( 'foobar' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 26900
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user