mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Block Editor: Add a type property to allow Core to identify the source of the editor styles.
Gutenberg plugin need to override the editor styles provided by core selectively, this added property allows it to do so without committing to a public API. Props nosolosw, jorgefilipecosta. See #53175. git-svn-id: https://develop.svn.wordpress.org/trunk@51090 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -283,10 +283,14 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
|
||||
$theme_json = WP_Theme_JSON_Resolver::get_merged_data( $editor_settings );
|
||||
|
||||
if ( WP_Theme_JSON_Resolver::theme_has_support() ) {
|
||||
$editor_settings['styles'][] = array( 'css' => $theme_json->get_stylesheet( 'block_styles' ) );
|
||||
$editor_settings['styles'][] = array(
|
||||
'css' => $theme_json->get_stylesheet( 'block_styles' ),
|
||||
'__unstableType' => 'globalStyles',
|
||||
);
|
||||
$editor_settings['styles'][] = array(
|
||||
'css' => $theme_json->get_stylesheet( 'css_variables' ),
|
||||
'__experimentalNoWrapper' => true,
|
||||
'__unstableType' => 'globalStyles',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user