Changeset 55234 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
- Timestamp:
- 02/06/2023 07:38:08 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
r55132 r55234 104 104 'slug' => true, 105 105 ); 106 $query_args = array_intersect_key( $request->get_params(), $valid_query_args );106 $query_args = array_intersect_key( $request->get_params(), $valid_query_args ); 107 107 108 108 $query_args['locale'] = get_user_locale(); … … 203 203 'description' => sanitize_text_field( $raw_pattern->meta->wpop_description ), 204 204 'viewport_width' => absint( $raw_pattern->meta->wpop_viewport_width ), 205 'block_types' => array_map( 'sanitize_text_field', $raw_pattern->meta->wpop_block_types ), 205 206 ); 206 207 … … 225 226 * 226 227 * @since 5.8.0 228 * @since 6.2.0 Added `'block_types'` to schema. 227 229 * 228 230 * @return array Item schema data. … … 286 288 'type' => 'integer', 287 289 'context' => array( 'view', 'edit', 'embed' ), 290 ), 291 292 'block_types' => array( 293 'description' => __( 'The block types which can use this pattern.' ), 294 'type' => 'array', 295 'uniqueItems' => true, 296 'items' => array( 'type' => 'string' ), 297 'context' => array( 'view', 'embed' ), 288 298 ), 289 299 ),
Note: See TracChangeset
for help on using the changeset viewer.