[wp-trac] [WordPress Trac] #54954: --wp--preset-- variables defaults not being updated by add_theme_support() 'editor-font-sizes' or 'editor-color-palette'
WordPress Trac
noreply at wordpress.org
Thu Jan 27 20:38:49 UTC 2022
#54954: --wp--preset-- variables defaults not being updated by add_theme_support()
'editor-font-sizes' or 'editor-color-palette'
--------------------------+------------------------------
Reporter: tommusrhodus | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.9
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by tommusrhodus):
I have tracked down the issue to {{{wp_get_global_stylesheet()}}}
https://github.com/tommusrhodus/WordPress/blob/master/wp-includes/global-
styles-and-settings.php#L107-L117
In the above lines, the function checks if the theme has {{{theme.json}}}
and if it declares {{{add_theme_support( 'experimental-link-color' )}}},
if a theme does neither the function does not merge the theme variables
into the default variables.
The result is that theme declared variables which share names with WP
Presets, do not overwrite those presets unless {{{add_theme_support(
'experimental-link-color' )}}} is declared in the theme.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54954#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list