Changeset 58452 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
- Timestamp:
- 06/21/2024 01:04:47 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
r56586 r58452 245 245 if ( rest_is_field_included( 'rest_namespace', $fields ) ) { 246 246 $data['rest_namespace'] = $namespace; 247 } 248 249 if ( rest_is_field_included( 'template', $fields ) ) { 250 $data['template'] = $post_type->template ?? array(); 251 } 252 253 if ( rest_is_field_included( 'template_lock', $fields ) ) { 254 $data['template_lock'] = ! empty( $post_type->template_lock ) ? $post_type->template_lock : false; 247 255 } 248 256 … … 408 416 'readonly' => true, 409 417 ), 418 'template' => array( 419 'type' => array( 'array' ), 420 'description' => __( 'The block template associated with the post type.' ), 421 'readonly' => true, 422 'context' => array( 'view', 'edit', 'embed' ), 423 ), 424 'template_lock' => array( 425 'type' => array( 'string', 'boolean' ), 426 'enum' => array( 'all', 'insert', 'contentOnly', false ), 427 'description' => __( 'The template_lock associated with the post type, or false if none.' ), 428 'readonly' => true, 429 'context' => array( 'view', 'edit', 'embed' ), 430 ), 410 431 ), 411 432 );
Note: See TracChangeset
for help on using the changeset viewer.