Make WordPress Core

Changeset 56314


Ignore:
Timestamp:
07/26/2023 07:21:44 PM (15 months ago)
Author:
joemcgill
Message:

Script Loader: Add support for font-display: optional.

This adds optional to the list of valid font-display values that can be used when validating webfonts.

Props merel1988, asafm7, mukesh27.
Fixes #58454.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r56194 r56314  
    34003400
    34013401        // Check the font-display.
    3402         if ( ! in_array( $webfont['font-display'], array( 'auto', 'block', 'fallback', 'swap' ), true ) ) {
     3402        if ( ! in_array( $webfont['font-display'], array( 'auto', 'block', 'fallback', 'optional', 'swap' ), true ) ) {
    34033403            $webfont['font-display'] = 'fallback';
    34043404        }
Note: See TracChangeset for help on using the changeset viewer.