Editor: Add missing block data fields for blocks registered server side.
In [44122], the `styles` and `parent` block fields were omitted on accident. This change makes it possible to reuse them on the client. Props gziolo. Fixes #47017. git-svn-id: https://develop.svn.wordpress.org/trunk@46091 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8005d291a3
commit
bc052559e4
@ -2201,7 +2201,7 @@ function get_block_categories( $post ) {
|
|||||||
function get_block_editor_server_block_settings() {
|
function get_block_editor_server_block_settings() {
|
||||||
$block_registry = WP_Block_Type_Registry::get_instance();
|
$block_registry = WP_Block_Type_Registry::get_instance();
|
||||||
$blocks = array();
|
$blocks = array();
|
||||||
$keys_to_pick = array( 'title', 'description', 'icon', 'category', 'keywords', 'supports', 'attributes' );
|
$keys_to_pick = array( 'title', 'description', 'icon', 'category', 'keywords', 'parent', 'supports', 'attributes', 'styles' );
|
||||||
|
|
||||||
foreach ( $block_registry->get_all_registered() as $block_name => $block_type ) {
|
foreach ( $block_registry->get_all_registered() as $block_name => $block_type ) {
|
||||||
foreach ( $keys_to_pick as $key ) {
|
foreach ( $keys_to_pick as $key ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user