Make WordPress Core

Ticket #46169: 46169.diff

File 46169.diff, 1.8 KB (added by hellofromTonya, 4 years ago)

Restores $style->add() code for backwards compatibility, but adds notes for no longer used (similar to Open Sans).

  • src/wp-admin/edit-form-blocks.php

    diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php
    index 2c46e4d504..48a9ebd3dd 100644
    a b $styles = array( 
    193193        ),
    194194);
    195195
    196 /* translators: Use this to specify the CSS font family for the default font. */
    197 $locale_font_family = esc_html_x( 'Noto Serif', 'CSS Font Family for Editor Font' );
     196$locale_font_family = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif';
    198197$styles[]           = array(
    199198        'css' => "body { font-family: '$locale_font_family' }",
    200199);
  • src/wp-includes/script-loader.php

    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index 9d9fe39825..765d3e4808 100644
    a b function wp_default_styles( $styles ) { 
    14741474        $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle.
    14751475        $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6.
    14761476
    1477         // Packages styles.
     1477        // Noto Serif is no longer used by core, but may be relied upon by themes and plugins.
    14781478        $fonts_url = '';
    14791479
    14801480        /*
    function wp_default_styles( $styles ) { 
    14861486        if ( 'off' !== $font_family ) {
    14871487                $fonts_url = 'https://fonts.googleapis.com/css?family=' . urlencode( $font_family );
    14881488        }
    1489         $styles->add( 'wp-editor-font', $fonts_url );
     1489        $styles->add( 'wp-editor-font', $fonts_url ); // No longer used in core as of 5.7.
    14901490
    14911491        $styles->add( 'wp-block-library-theme', "/wp-includes/css/dist/block-library/theme$suffix.css" );
    14921492
    function wp_default_styles( $styles ) { 
    15051505        $package_styles = array(
    15061506                'block-editor'         => array(
    15071507                        'wp-components',
    1508                         'wp-editor-font',
    15091508                ),
    15101509                'block-library'        => array(),
    15111510                'block-directory'      => array(),