mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56314 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user