diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index d6afdef470..11bc499fc6 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -337,6 +337,13 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { } } + if ( + isset( $registered['search_semantics'], $request['search_semantics'] ) + && 'exact' === $request['search_semantics'] + ) { + $args['exact'] = true; + } + $args = $this->prepare_tax_query( $args, $request ); // Force the post_type argument, since it's not a user input variable. @@ -2886,6 +2893,12 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { ); } + $query_params['search_semantics'] = array( + 'description' => __( 'How to interpret the search input.' ), + 'type' => 'string', + 'enum' => array( 'exact' ), + ); + $query_params['offset'] = array( 'description' => __( 'Offset the result set by a specific number of items.' ), 'type' => 'integer', diff --git a/wp-includes/version.php b/wp-includes/version.php index 5a02630db2..b251507a86 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-59033'; +$wp_version = '6.7-alpha-59034'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.