WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/31/2019 10:09:39 AM (4 months ago)
Author:
flixos90
Message:

Bundled Theme: Load Google fonts with display=fallback parameter for better UX in case the font cannot be loaded.

Providing this query parameter ensures the stylesheet contains the font-display: fallback rule. This changeset also updates the Open Sans font used by core accordingly.

Props westonruter.
Fixes #47282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/functions.php

    r45218 r45485  
    332332            $fonts_url = add_query_arg(
    333333                array(
    334                     'family' => urlencode( implode( '|', $fonts ) ),
    335                     'subset' => urlencode( $subsets ),
     334                    'family'  => urlencode( implode( '|', $fonts ) ),
     335                    'subset'  => urlencode( $subsets ),
     336                    'display' => urlencode( 'fallback' ),
    336337                ),
    337338                'https://fonts.googleapis.com/css'
Note: See TracChangeset for help on using the changeset viewer.