Skip to content

Commit

Permalink
Update REST API field schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Sep 14, 2023
1 parent 67135e3 commit 49bf14e
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -707,15 +707,17 @@ public function get_item_schema() {
'keywords' => $keywords_definition,
'example' => $example_definition,
'block_hooks' => array(
'description' => __( 'Block hooks.' ),
'type' => 'object',
'properties' => array(),
'additionalProperties' => array(
'type' => 'string',
'description' => __( 'This block is automatically inserted near any occurence of the block types used as keys of this map, into a relative position given by the corresponding value.' ),
'type' => 'object',
'patternProperties' => array(
'^[a-zA-Z0-9-]+/[a-zA-Z0-9-]+$' => array(
'type' => 'string',
'enum' => array( 'before', 'after', 'first_child', 'last_child' ),
),
),
'default' => array(),
'context' => array( 'embed', 'view', 'edit' ),
'readonly' => true,
'default' => array(),
'context' => array( 'embed', 'view', 'edit' ),
'readonly' => true,
),
),
);
Expand Down

0 comments on commit 49bf14e

Please sign in to comment.