WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_REST_Request::get_parameter_order() WP 4.4.0

Retrieves the parameter priority order.

Used when checking parameters in get_param().

Это метод класса: WP_REST_Request

Хуки из метода
Возвращает

Строку[]. Array of types to check, in order of priority.

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

$WP_REST_Request = new WP_REST_Request();
$var = $WP_REST_Request->get_parameter_order();

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

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

Код WP REST Request::get parameter order: wp-includes/rest-api/class-wp-rest-request.php WP 5.4.1

<?php
protected function get_parameter_order() {
	$order = array();

	$content_type = $this->get_content_type();
	if ( isset( $content_type['value'] ) && 'application/json' === $content_type['value'] ) {
		$order[] = 'JSON';
	}

	$this->parse_json_params();

	// Ensure we parse the body data.
	$body = $this->get_body();

	if ( 'POST' !== $this->method && ! empty( $body ) ) {
		$this->parse_body_params();
	}

	$accepts_body_data = array( 'POST', 'PUT', 'PATCH', 'DELETE' );
	if ( in_array( $this->method, $accepts_body_data, true ) ) {
		$order[] = 'POST';
	}

	$order[] = 'GET';
	$order[] = 'URL';
	$order[] = 'defaults';

	/**
	 * Filters the parameter order.
	 *
	 * The order affects which parameters are checked when using get_param() and family.
	 * This acts similarly to PHP's `request_order` setting.
	 *
	 * @since 4.4.0
	 *
	 * @param string[]        $order Array of types to check, in order of priority.
	 * @param WP_REST_Request $this  The request object.
	 */
	return apply_filters( 'rest_request_parameter_order', $order, $this );
}