mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Add fields to WP_Block_Type
As part of #47620 and the RFC for block registeration. Server registered blocks are missing some fields. These changeset includes them. Props spacedmonkey, aduth. Fixes #48529. git-svn-id: https://develop.svn.wordpress.org/trunk@47875 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2234,7 +2234,7 @@ function get_block_categories( $post ) {
|
||||
function get_block_editor_server_block_settings() {
|
||||
$block_registry = WP_Block_Type_Registry::get_instance();
|
||||
$blocks = array();
|
||||
$keys_to_pick = array( 'title', 'description', 'icon', 'category', 'keywords', 'parent', 'supports', 'attributes', 'styles' );
|
||||
$keys_to_pick = array( 'title', 'description', 'icon', 'category', 'keywords', 'parent', 'supports', 'attributes', 'styles', 'textdomain', 'example' );
|
||||
|
||||
foreach ( $block_registry->get_all_registered() as $block_name => $block_type ) {
|
||||
foreach ( $keys_to_pick as $key ) {
|
||||
|
||||
Reference in New Issue
Block a user