rest_request_parameter_order WordPress Filter Hook

The rest_request_parameter_order filter hook allows you to change the order of the parameters that are sent to the REST API.

apply_filters( 'rest_request_parameter_order', string[] $order, WP_REST_Request $request ) #

Filters the parameter priority order for a REST API request.


Description

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.


Top ↑

Parameters

$order

(string[])Array of types to check, in order of priority.

$request

(WP_REST_Request)The request object.


Top ↑

Source

File: wp-includes/rest-api/class-wp-rest-request.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.