Editor: output palette presets when appearance tools or border are enabled.
Adds color palette presets to global styles output if current theme supports either appearance tools or border. Props andrewserong, noisysocks. Fixes #60134. Built from https://develop.svn.wordpress.org/trunk@57259 git-svn-id: http://core.svn.wordpress.org/trunk@56765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c4c8ae426d
commit
c8dc74b0bc
|
@ -222,7 +222,13 @@ function wp_get_global_stylesheet( $types = array() ) {
|
|||
* @see wp_add_global_styles_for_blocks
|
||||
*/
|
||||
$origins = array( 'default', 'theme', 'custom' );
|
||||
if ( ! $supports_theme_json ) {
|
||||
/*
|
||||
* If the theme doesn't have theme.json but supports both appearance tools and color palette,
|
||||
* the 'theme' origin should be included so color palette presets are also output.
|
||||
*/
|
||||
if ( ! $supports_theme_json && ( current_theme_supports( 'appearance-tools' ) || current_theme_supports( 'border' ) ) && current_theme_supports( 'editor-color-palette' ) ) {
|
||||
$origins = array( 'default', 'theme' );
|
||||
} elseif ( ! $supports_theme_json ) {
|
||||
$origins = array( 'default' );
|
||||
}
|
||||
$styles_rest = $tree->get_stylesheet( $types, $origins );
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57258';
|
||||
$wp_version = '6.5-alpha-57259';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue