Changeset 53152 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
- Timestamp:
- 04/12/2022 09:24:51 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
r52236 r53152 81 81 * 82 82 * @since 5.8.0 83 * @since 6.0.0 Added 'slug' to request. 83 84 * 84 85 * @param WP_REST_Request $request Full details about the request. … … 101 102 $keyword_id = $request['keyword']; 102 103 $search_term = $request['search']; 104 $slug = $request['slug']; 103 105 104 106 if ( $category_id ) { … … 112 114 if ( $search_term ) { 113 115 $query_args['search'] = $search_term; 116 } 117 118 if ( $slug ) { 119 $query_args['slug'] = $slug; 114 120 } 115 121 … … 160 166 'pattern_api_failed', 161 167 sprintf( 162 /* translators: %s: Support forums URL. */168 /* translators: %s: Support forums URL. */ 163 169 __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), 164 170 __( 'https://wordpress.org/support/forums/' ) … … 256 262 'type' => 'integer', 257 263 'minimum' => 1, 258 'context' => array( 'view', 'e mbed' ),264 'context' => array( 'view', 'edit', 'embed' ), 259 265 ), 260 266 … … 263 269 'type' => 'string', 264 270 'minLength' => 1, 265 'context' => array( 'view', 'e mbed' ),271 'context' => array( 'view', 'edit', 'embed' ), 266 272 ), 267 273 … … 270 276 'type' => 'string', 271 277 'minLength' => 1, 272 'context' => array( 'view', 'e mbed' ),278 'context' => array( 'view', 'edit', 'embed' ), 273 279 ), 274 280 … … 278 284 'uniqueItems' => true, 279 285 'items' => array( 'type' => 'string' ), 280 'context' => array( 'view', 'e mbed' ),286 'context' => array( 'view', 'edit', 'embed' ), 281 287 ), 282 288 … … 286 292 'uniqueItems' => true, 287 293 'items' => array( 'type' => 'string' ), 288 'context' => array( 'view', 'e mbed' ),294 'context' => array( 'view', 'edit', 'embed' ), 289 295 ), 290 296 … … 293 299 'type' => 'string', 294 300 'minLength' => 1, 295 'context' => array( 'view', 'e mbed' ),301 'context' => array( 'view', 'edit', 'embed' ), 296 302 ), 297 303 … … 299 305 'description' => __( 'The preferred width of the viewport when previewing a pattern, in pixels.' ), 300 306 'type' => 'integer', 301 'context' => array( 'view', 'e mbed' ),307 'context' => array( 'view', 'edit', 'embed' ), 302 308 ), 303 309 ),
Note: See TracChangeset
for help on using the changeset viewer.