Skip to content

Commit

Permalink
FontFamily: Fix server-side attribute registration via typography sup…
Browse files Browse the repository at this point in the history
…port (#43937)
  • Loading branch information
aaronrobertshaw committed Sep 7, 2022
1 parent 2254c63 commit d605cd4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/block-supports/typography.php
Expand Up @@ -53,6 +53,12 @@ function gutenberg_register_typography_support( $block_type ) {
'type' => 'string',
);
}

if ( $has_font_family_support && ! array_key_exists( 'fontFamily', $block_type->attributes ) ) {
$block_type->attributes['fontFamily'] = array(
'type' => 'string',
);
}
}

/**
Expand Down

0 comments on commit d605cd4

Please sign in to comment.