mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Themes: Allow non-block themes to add theme support for border settings.
This changeset allows themes without `theme.json` to opt-in to block border tools via `add_theme_support( 'border' );`. Follow-up to [55067], [55273]. Props poena, audrasjb. Fixes #58598. git-svn-id: https://develop.svn.wordpress.org/trunk@55995 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
11df92738b
commit
43e382ba7e
@ -314,6 +314,14 @@ class WP_Theme_JSON_Resolver {
|
||||
|
||||
// Classic themes without a theme.json don't support global duotone.
|
||||
$theme_support_data['settings']['color']['defaultDuotone'] = false;
|
||||
|
||||
// Allow themes to enable all border settings via theme_support.
|
||||
if ( current_theme_supports( 'border' ) ) {
|
||||
$theme_support_data['settings']['border']['color'] = true;
|
||||
$theme_support_data['settings']['border']['radius'] = true;
|
||||
$theme_support_data['settings']['border']['style'] = true;
|
||||
$theme_support_data['settings']['border']['width'] = true;
|
||||
}
|
||||
}
|
||||
$with_theme_supports = new WP_Theme_JSON( $theme_support_data );
|
||||
$with_theme_supports->merge( static::$theme );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user