Skip to content

Commit

Permalink
Format php.
Browse files Browse the repository at this point in the history
  • Loading branch information
jffng committed Sep 19, 2023
1 parent 18b3ec8 commit 87a6834
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -819,11 +819,10 @@ protected static function sanitize( $input, $valid_block_names, $valid_element_n
$schema['settings'] = static::VALID_SETTINGS;
$schema['settings']['blocks'] = $schema_settings_blocks;


// For settings.typography.fontFamilies, make the $schema have all indexes present in the $input.
if ( isset( $input['settings']['typography']['fontFamilies'] ) ) {
// Do not handle the cases where the sanitization is called before font families are merged, since it will be handled again later.
if ( isset( $input['settings']['typography']['fontFamilies']['theme']) || isset( $input['settings']['typography']['fontFamilies']['custom'] ) ) {
if ( isset( $input['settings']['typography']['fontFamilies']['theme'] ) || isset( $input['settings']['typography']['fontFamilies']['custom'] ) ) {
return $output;
}
foreach ( $input['settings']['typography']['fontFamilies'] as $font_family_key => $value ) {
Expand Down

0 comments on commit 87a6834

Please sign in to comment.