mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Editor: Fix server-side attribute registration via typography support.
Ensures the `fontFamily` attribute is registered for block types on the server side. This change resolves a `400` error when attempting to change the font family for a server-side rendered block in the editor. Props aaronrobertshaw, mamaduka, wildworks, upadalavipul. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54387 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ad31d53c64
commit
eb2d907b3e
@ -57,6 +57,12 @@ function wp_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',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user