diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
index 0122f9a..966fec8 100644
--- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
+++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
@@ -148,37 +148,15 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 
 		// Retrieve the list of registered collection query parameters.
 		$registered = $this->get_collection_params();
-		$args = array();
-
-		/*
-		 * This array defines mappings between public API query parameters whose
-		 * values are accepted as-passed, and their internal WP_Query parameter
-		 * name equivalents (some are the same). Only values which are also
-		 * present in $registered will be set.
-		 */
-		$parameter_mappings = array(
-			'author'         => 'author__in',
-			'author_exclude' => 'author__not_in',
-			'exclude'        => 'post__not_in',
-			'include'        => 'post__in',
-			'menu_order'     => 'menu_order',
-			'offset'         => 'offset',
-			'order'          => 'order',
-			'orderby'        => 'orderby',
-			'page'           => 'paged',
-			'parent'         => 'post_parent__in',
-			'parent_exclude' => 'post_parent__not_in',
-			'search'         => 's',
-			'slug'           => 'post_name__in',
-			'status'         => 'post_status',
-		);
 
 		/*
 		 * For each known parameter which is both registered and present in the request,
 		 * set the parameter's value on the query $args.
 		 */
-		foreach ( $parameter_mappings as $api_param => $wp_param ) {
-			if ( isset( $registered[ $api_param ], $request[ $api_param ] ) ) {
+		$args = array();
+		foreach( $registered as $api_param => $meta ) {
+			if ( isset( $request[ $api_param ] ) ) {
+				$wp_param = isset( $meta['query_var'] ) ? $meta['query_var'] : $api_param;
 				$args[ $wp_param ] = $request[ $api_param ];
 			}
 		}
@@ -2022,12 +2000,14 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 				'type'                => 'array',
 				'default'             => array(),
 				'sanitize_callback'   => 'wp_parse_id_list',
+				'query_var'            => 'author__in',
 			);
 			$params['author_exclude'] = array(
 				'description'         => __( 'Ensure result set excludes posts assigned to specific authors.' ),
 				'type'                => 'array',
 				'default'             => array(),
 				'sanitize_callback'   => 'wp_parse_id_list',
+				'query_var'            => 'author__not_in',
 			);
 		}
 
@@ -2043,6 +2023,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 			'type'               => 'array',
 			'default'            => array(),
 			'sanitize_callback'  => 'wp_parse_id_list',
+			'query_var'           => 'post__not_in',
 		);
 
 		$params['include'] = array(
@@ -2050,6 +2031,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 			'type'               => 'array',
 			'default'            => array(),
 			'sanitize_callback'  => 'wp_parse_id_list',
+			'query_var'           => 'post__in',
 		);
 
 		if ( 'page' === $this->post_type || post_type_supports( $this->post_type, 'page-attributes' ) ) {
@@ -2095,6 +2077,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 			$params['orderby']['enum'][] = 'menu_order';
 		}
 
+		// Defined by the parent class.
+		$params['page']['query_var'] = 'paged';
+
 		$post_type_obj = get_post_type_object( $this->post_type );
 
 		if ( $post_type_obj->hierarchical || 'attachment' === $this->post_type ) {
@@ -2103,19 +2088,25 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 				'type'              => 'array',
 				'sanitize_callback' => 'wp_parse_id_list',
 				'default'           => array(),
+				'query_var'          => 'post_parent__in',
 			);
 			$params['parent_exclude'] = array(
 				'description'       => __( 'Limit result set to all items except those of a particular parent id.' ),
 				'type'              => 'array',
 				'sanitize_callback' => 'wp_parse_id_list',
 				'default'           => array(),
+				'query_var'          => 'post_parent__not_in',
 			);
 		}
 
+		// Defined by the parent class.
+		$params['search']['query_var'] = 's';
+
 		$params['slug'] = array(
 			'description'       => __( 'Limit result set to posts with one or more specific slugs.' ),
 			'type'              => 'array',
 			'sanitize_callback' => 'wp_parse_slug_list',
+			'query_var'          => 'post_name__in',
 		);
 
 		$params['status'] = array(
@@ -2125,6 +2116,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 			'sanitize_callback' => 'sanitize_key',
 			'type'              => 'string',
 			'validate_callback' => array( $this, 'validate_user_can_query_private_statuses' ),
+			'query_var'          => 'post_status',
 		);
 
 		$taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
@@ -2148,6 +2140,16 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
 			);
 		}
 
+		/**
+		 * Filters the collection parameters for the controller.
+		 *
+		 * Enables adding or removing collection parameters from the endpoint.
+		 *
+		 * @since 4.7.0
+		 *
+		 * @param array $params Key value array of the collection params.
+		 */
+		$params = apply_filters( "rest_{$this->post_type}_collection_params", $params );
 		return $params;
 	}
 
