mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 08:37:55 +02: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. Built from https://develop.svn.wordpress.org/trunk@54387 git-svn-id: http://core.svn.wordpress.org/trunk@53946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
436bf77300
commit
a8af293608
@ -57,6 +57,12 @@ function wp_register_typography_support( $block_type ) {
|
|||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $has_font_family_support && ! array_key_exists( 'fontFamily', $block_type->attributes ) ) {
|
||||||
|
$block_type->attributes['fontFamily'] = array(
|
||||||
|
'type' => 'string',
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.1-beta2-54386';
|
$wp_version = '6.1-beta2-54387';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user