Changeset 43739 for branches/5.0
- Timestamp:
- 10/17/2018 05:02:04 PM (6 years ago)
- Location:
- branches/5.0
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/rest-api.php
r43734 r43739 229 229 // Comments. 230 230 $controller = new WP_REST_Comments_Controller; 231 $controller->register_routes(); 232 233 /** 234 * Filters the search handlers to use in the REST search controller. 235 * 236 * @since 5.0.0 237 * 238 * @param array $search_handlers List of search handlers to use in the controller. Each search 239 * handler instance must extend the `WP_REST_Search_Handler` class. 240 * Default is only a handler for posts. 241 */ 242 $search_handlers = apply_filters( 'wp_rest_search_handlers', array( new WP_REST_Post_Search_Handler() ) ); 243 244 $controller = new WP_REST_Search_Controller( $search_handlers ); 231 245 $controller->register_routes(); 232 246 -
branches/5.0/src/wp-settings.php
r43734 r43739 234 234 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' ); 235 235 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' ); 236 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php' ); 236 237 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' ); 237 238 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' ); … … 241 242 require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php' ); 242 243 require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php' ); 244 require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php' ); 245 require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php' ); 243 246 244 247 $GLOBALS['wp_embed'] = new WP_Embed(); -
branches/5.0/tests/phpunit/includes/bootstrap.php
r43316 r43739 118 118 require dirname( __FILE__ ) . '/utils.php'; 119 119 require dirname( __FILE__ ) . '/spy-rest-server.php'; 120 require dirname( __FILE__ ) . '/class-wp-rest-test-search-handler.php'; 120 121 121 122 /** -
branches/5.0/tests/phpunit/tests/rest-api/rest-schema-setup.php
r43734 r43739 111 111 '/wp/v2/comments', 112 112 '/wp/v2/comments/(?P<id>[\\d]+)', 113 '/wp/v2/search', 113 114 '/wp/v2/settings', 114 115 '/wp/v2/themes', -
branches/5.0/tests/qunit/fixtures/wp-api-generated.js
r43734 r43739 3406 3406 } 3407 3407 ] 3408 }, 3409 "/wp/v2/search": { 3410 "namespace": "wp/v2", 3411 "methods": [ 3412 "GET" 3413 ], 3414 "endpoints": [ 3415 { 3416 "methods": [ 3417 "GET" 3418 ], 3419 "args": { 3420 "context": { 3421 "required": false, 3422 "default": "view", 3423 "enum": [ 3424 "view", 3425 "embed" 3426 ], 3427 "description": "Scope under which the request is made; determines fields present in response.", 3428 "type": "string" 3429 }, 3430 "page": { 3431 "required": false, 3432 "default": 1, 3433 "description": "Current page of the collection.", 3434 "type": "integer" 3435 }, 3436 "per_page": { 3437 "required": false, 3438 "default": 10, 3439 "description": "Maximum number of items to be returned in result set.", 3440 "type": "integer" 3441 }, 3442 "search": { 3443 "required": false, 3444 "description": "Limit results to those matching a string.", 3445 "type": "string" 3446 }, 3447 "type": { 3448 "required": false, 3449 "default": "post", 3450 "enum": [ 3451 "post" 3452 ], 3453 "description": "Limit results to items of an object type.", 3454 "type": "string" 3455 }, 3456 "subtype": { 3457 "required": false, 3458 "default": "any", 3459 "description": "Limit results to items of one or more object subtypes.", 3460 "type": "array", 3461 "items": { 3462 "enum": [ 3463 "post", 3464 "page", 3465 "any" 3466 ], 3467 "type": "string" 3468 } 3469 } 3470 } 3471 } 3472 ], 3473 "_links": { 3474 "self": "http://example.org/index.php?rest_route=/wp/v2/search" 3475 } 3408 3476 }, 3409 3477 "/wp/v2/settings": {
Note: See TracChangeset
for help on using the changeset viewer.