[wp-trac] [WordPress Trac] #57536: Add support for global styles custom css
WordPress Trac
noreply at wordpress.org
Thu Feb 2 18:51:09 UTC 2023
#57536: Add support for global styles custom css
-------------------------------------------------+-------------------------
Reporter: glendaviesnz | Owner: flixos90
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.2
Component: Editor | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch gutenberg-merge has-unit- | Focuses: rest-api,
tests commit | performance
-------------------------------------------------+-------------------------
Changes (by flixos90):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"55192" 55192]:
{{{
#!CommitTicketReference repository="" revision="55192"
Editor: Add support for custom CSS in global styles.
This changeset introduces functions `wp_get_global_styles_custom_css()`
and `wp_enqueue_global_styles_custom_css()`, which allow accessing and
enqueuing custom CSS added via global styles.
Custom CSS via global styles is handled separately from custom CSS via the
Customizer. If a site uses both features, the custom CSS from both sources
will be loaded. The global styles custom CSS is then loaded after the
Customizer custom CSS, so if there are any conflicts between the rules,
the global styles take precedence.
Similarly to e.g. [55185], the result is cached in a non-persistent cache,
except when `WP_DEBUG` is on to avoid interrupting the theme developer's
workflow.
Props glendaviesnz, oandregal, ntsekouras, mamaduka, davidbaumwald,
hellofromtonya, flixos90.
Fixes #57536.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57536#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list