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. Built from https://develop.svn.wordpress.org/trunk@52812 git-svn-id: http://core.svn.wordpress.org/trunk@52401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4789371cfe
commit
257b634b92
|
@ -3037,9 +3037,10 @@ function current_theme_supports( $feature, ...$args ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no args passed then no extra checks need be performed.
|
// If no args passed then no extra checks need to be performed.
|
||||||
if ( ! $args ) {
|
if ( ! $args ) {
|
||||||
return true;
|
/** This filter is documented in wp-includes/theme.php */
|
||||||
|
return apply_filters( "current_theme_supports-{$feature}", true, $args, $_wp_theme_features[ $feature ] ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( $feature ) {
|
switch ( $feature ) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.0-alpha-52811';
|
$wp_version = '6.0-alpha-52812';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue