Changeset 52042 for trunk/src/wp-includes/block-editor.php
- Timestamp:
- 11/08/2021 02:26:27 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-editor.php
r51611 r52042 188 188 } 189 189 190 // These styles are used if the "no theme styles" options is triggered or on 191 // themes without their own editor styles. 192 $default_editor_styles_file = ABSPATH . WPINC . '/css/dist/block-editor/default-editor-styles.css'; 193 if ( file_exists( $default_editor_styles_file ) ) { 194 $default_editor_styles = array( 195 array( 'css' => file_get_contents( $default_editor_styles_file ) ), 196 ); 197 } else { 198 $default_editor_styles = array(); 199 } 200 190 201 $editor_settings = array( 191 202 'alignWide' => get_theme_support( 'align-wide' ), 192 203 'allowedBlockTypes' => true, 193 204 'allowedMimeTypes' => get_allowed_mime_types(), 205 'defaultEditorStyles' => $default_editor_styles, 194 206 'blockCategories' => get_default_block_categories(), 195 207 'disableCustomColors' => get_theme_support( 'disable-custom-colors' ), … … 465 477 * @global array $editor_styles 466 478 * 467 * @return array An array of theme styles for the block editor. Includes default font family 468 * style and theme stylesheets. 479 * @return array An array of theme styles for the block editor. 469 480 */ 470 481 function get_block_editor_theme_styles() { 471 482 global $editor_styles; 472 483 473 if ( ! WP_Theme_JSON_Resolver::theme_has_support() ) { 474 $styles = array( 475 array( 476 'css' => 'body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif }', 477 '__unstableType' => 'core', 478 ), 479 ); 480 } else { 481 $styles = array(); 482 } 484 $styles = array(); 483 485 484 486 if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.