rest_request_parameter_order хук-фильтрWP 4.4.0

Filters the parameter priority order for a REST API request.

The order affects which parameters are checked when using WP_REST_Request::get_param() and family. This acts similarly to PHP's request_order setting.


add_filter( 'rest_request_parameter_order', 'wp_kama_rest_request_parameter_order_filter', 10, 2 );

 * Function for `rest_request_parameter_order` filter-hook.
 * @param string[]        $order   Array of types to check, in order of priority.
 * @param WP_REST_Request $request The request object.
 * @return string[]
function wp_kama_rest_request_parameter_order_filter( $order, $request ){

	// filter...
	return $order;
Array of types to check, in order of priority.
The request object.

Список изменений

С версии 4.4.0 Введена.

Где вызывается хук

wp-includes/rest-api/class-wp-rest-request.php 385
return apply_filters( 'rest_request_parameter_order', $order, $this );

Где используется хук в WordPress

Использование не найдено.