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.

Built from https://develop.svn.wordpress.org/trunk@56314


git-svn-id: http://core.svn.wordpress.org/trunk@55826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill 2023-07-26 19:23:21 +00:00
parent 859cf639a6
commit 55a90c82d5
2 changed files with 2 additions and 2 deletions

View File

@ -3399,7 +3399,7 @@ function _wp_theme_json_webfonts_handler() {
}
// Check the font-display.
if ( ! in_array( $webfont['font-display'], array( 'auto', 'block', 'fallback', 'swap' ), true ) ) {
if ( ! in_array( $webfont['font-display'], array( 'auto', 'block', 'fallback', 'optional', 'swap' ), true ) ) {
$webfont['font-display'] = 'fallback';
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56313';
$wp_version = '6.4-alpha-56314';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.