Changeset 54688
- Timestamp:
- 10/25/2022 01:43:49 PM (23 months ago)
- Location:
- branches/6.1/src
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1/src/wp-content/themes/twentytwelve/css/editor-blocks.css
r48459 r54688 370 370 background-image: linear-gradient(to bottom, #f4f4f4, #e6e6e6); 371 371 background-repeat: repeat-x; 372 color: #7c7c7c; 372 373 } 373 374 -
branches/6.1/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css
r54418 r54688 921 921 /* Block: Button ----------------------------- */ 922 922 923 .editor-styles-wrapper .wp-block-button__link,924 .editor-styles-wrapper .wp-block-file__button {923 :root .editor-styles-wrapper .wp-block-button__link, 924 :root .editor-styles-wrapper .wp-block-file__button { 925 925 background: #cd2653; 926 926 border-radius: 0; … … 938 938 } 939 939 940 .editor-styles-wrapper .wp-block-button__link:hover, 941 .editor-styles-wrapper .wp-block-file__button:hover { 942 text-decoration: underline; 943 } 944 940 945 /* BUTTON STYLE: OUTLINE */ 941 946 … … 1302 1307 /* BLOCK: BUTTON */ 1303 1308 1304 .editor-styles-wrapper .wp-block-button__link,1305 .editor-styles-wrapper .wp-block-file__button {1309 :root .editor-styles-wrapper .wp-block-button__link, 1310 :root .editor-styles-wrapper .wp-block-file__button { 1306 1311 font-size: 17px; 1307 1312 } -
branches/6.1/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css
r54418 r54688 925 925 /* Block: Button ----------------------------- */ 926 926 927 .editor-styles-wrapper .wp-block-button__link,928 .editor-styles-wrapper .wp-block-file__button {927 :root .editor-styles-wrapper .wp-block-button__link, 928 :root .editor-styles-wrapper .wp-block-file__button { 929 929 background: #cd2653; 930 930 border-radius: 0; … … 942 942 } 943 943 944 .editor-styles-wrapper .wp-block-button__link:hover, 945 .editor-styles-wrapper .wp-block-file__button:hover { 946 text-decoration: underline; 947 } 948 944 949 /* BUTTON STYLE: OUTLINE */ 945 950 … … 1306 1311 /* BLOCK: BUTTON */ 1307 1312 1308 .editor-styles-wrapper .wp-block-button__link,1309 .editor-styles-wrapper .wp-block-file__button {1313 :root .editor-styles-wrapper .wp-block-button__link, 1314 :root .editor-styles-wrapper .wp-block-file__button { 1310 1315 font-size: 17px; 1311 1316 } -
branches/6.1/src/wp-includes/default-filters.php
r54497 r54688 561 561 add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); 562 562 add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); 563 add_action( 'admin_enqueue_scripts', 'wp_enqueue_classic_theme_styles' );564 563 add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); 565 564 add_action( 'enqueue_block_assets', 'enqueue_block_styles_assets', 30 ); … … 573 572 add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 ); 574 573 add_action( 'admin_head', 'wp_check_widget_editor_deps' ); 574 add_filter( 'block_editor_settings_all', 'wp_add_editor_classic_theme_styles' ); 575 575 576 576 // Global styles can be enqueued in both the header and the footer. See https://core.trac.wordpress.org/ticket/53494. -
branches/6.1/src/wp-includes/script-loader.php
r54501 r54688 3659 3659 3660 3660 /** 3661 * Loads classic theme styles on classic themes .3661 * Loads classic theme styles on classic themes in the frontend. 3662 3662 * 3663 3663 * This is needed for backwards compatibility for button blocks specifically. … … 3666 3666 */ 3667 3667 function wp_enqueue_classic_theme_styles() { 3668 if ( ! wp_is_block_theme() ) {3668 if ( ! WP_Theme_JSON_Resolver::theme_has_support() ) { 3669 3669 $suffix = wp_scripts_get_suffix(); 3670 wp_register_style( 'classic-theme-styles', "/wp-includes/css/dist/block-library/classic$suffix.css", array(), true );3670 wp_register_style( 'classic-theme-styles', '/' . WPINC . "/css/classic-themes$suffix.css", array(), true ); 3671 3671 wp_enqueue_style( 'classic-theme-styles' ); 3672 3672 } 3673 3673 } 3674 3675 /** 3676 * Loads classic theme styles on classic themes in the editor. 3677 * 3678 * This is needed for backwards compatibility for button blocks specifically. 3679 * 3680 * @since 6.1.0 3681 * 3682 * @param array $editor_settings The array of editor settings. 3683 * @return array A filtered array of editor settings. 3684 */ 3685 function wp_add_editor_classic_theme_styles( $editor_settings ) { 3686 if ( WP_Theme_JSON_Resolver::theme_has_support() ) { 3687 return $editor_settings; 3688 } 3689 $suffix = wp_scripts_get_suffix(); 3690 $classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css"; 3691 3692 // This follows the pattern of get_block_editor_theme_styles, 3693 // but we can't use get_block_editor_theme_styles directly as it 3694 // only handles external files or theme files. 3695 $classic_theme_styles_settings = array( 3696 'css' => file_get_contents( $classic_theme_styles ), 3697 '__unstableType' => 'core', 3698 'isGlobalStyles' => false, 3699 ); 3700 3701 // Add these settings to the start of the array so that themes can override them. 3702 array_unshift( $editor_settings['styles'], $classic_theme_styles_settings ); 3703 3704 return $editor_settings; 3705 }
Note: See TracChangeset
for help on using the changeset viewer.