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 Dec 6, 2022
1 parent 176eb29 commit 4e572a6
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 4e572a6

Please sign in to comment.