mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Editor: Add selectors field to block type definition
Adds support for the new selectors property for block types. It adds it to the allowed metadata when registering a block type, makes the WP_Block_Type class aware of it, exposes it through the block types REST API, and the get_block_editor_server_block_settings function. Corresponding work in the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/46496. Fixes #57585. Props aaronrobertshaw, hellofromTonya. git-svn-id: https://develop.svn.wordpress.org/trunk@55673 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2178,6 +2178,7 @@ function taxonomy_meta_box_sanitize_cb_input( $taxonomy, $terms ) {
|
||||
* of a block relevant for client registration.
|
||||
*
|
||||
* @since 5.0.0
|
||||
* @since 6.3.0 Added `selectors` field.
|
||||
*
|
||||
* @return array An associative array of registered block data.
|
||||
*/
|
||||
@@ -2192,6 +2193,7 @@ function get_block_editor_server_block_settings() {
|
||||
'attributes' => 'attributes',
|
||||
'provides_context' => 'providesContext',
|
||||
'uses_context' => 'usesContext',
|
||||
'selectors' => 'selectors',
|
||||
'supports' => 'supports',
|
||||
'category' => 'category',
|
||||
'styles' => 'styles',
|
||||
|
||||
Reference in New Issue
Block a user