Skip to content

Commit

Permalink
Add 'optional' to the list of supported values
Browse files Browse the repository at this point in the history
Porting #44622
  • Loading branch information
aristath committed Oct 3, 2022
1 parent 2497b63 commit e3f4d4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/experimental/class-wp-webfonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ private function validate_variation( $variation ) {
}

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

$valid_props = array(
Expand Down

0 comments on commit e3f4d4e

Please sign in to comment.