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:
parent
859cf639a6
commit
55a90c82d5
|
@ -3399,7 +3399,7 @@ function _wp_theme_json_webfonts_handler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the font-display.
|
// 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';
|
$webfont['font-display'] = 'fallback';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue