Changeset 56676
- Timestamp:
- 09/25/2023 10:00:33 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
r56668 r56676 16 16 */ 17 17 class WP_REST_Block_Types_Controller extends WP_REST_Controller { 18 19 const NAME_PATTERN = '^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$'; 18 20 19 21 /** … … 403 405 'description' => __( 'The name of the inner block.' ), 404 406 'type' => 'string', 407 'pattern' => self::NAME_PATTERN, 408 'required' => true, 405 409 ), 406 410 'attributes' => array( … … 480 484 'description' => __( 'Unique name identifying the block type.' ), 481 485 'type' => 'string', 482 'default' => '', 486 'pattern' => self::NAME_PATTERN, 487 'required' => true, 483 488 'context' => array( 'embed', 'view', 'edit' ), 484 489 'readonly' => true, … … 690 695 'type' => array( 'array', 'null' ), 691 696 'items' => array( 692 'type' => 'string', 697 'type' => 'string', 698 'pattern' => self::NAME_PATTERN, 693 699 ), 694 700 'default' => null, … … 700 706 'type' => array( 'array', 'null' ), 701 707 'items' => array( 702 'type' => 'string', 708 'type' => 'string', 709 'pattern' => self::NAME_PATTERN, 703 710 ), 704 711 'default' => null, … … 712 719 'type' => 'object', 713 720 'patternProperties' => array( 714 '^[a-zA-Z0-9-]+/[a-zA-Z0-9-]+$'=> array(721 self::NAME_PATTERN => array( 715 722 'type' => 'string', 716 723 'enum' => array( 'before', 'after', 'first_child', 'last_child' ),
Note: See TracChangeset
for help on using the changeset viewer.