WP_REST_Request::offsetUnset()publicWP 4.4.0ReturnTypeWillChange

Removes a parameter from the request.

Метод класса: WP_REST_Request{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$WP_REST_Request = new WP_REST_Request();
$WP_REST_Request->offsetUnset( $offset );
$offset(строка) (обязательный)
Parameter name.

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

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

Код WP_REST_Request::offsetUnset() WP 6.4.3

public function offsetUnset( $offset ) {
	$order = $this->get_parameter_order();

	// Remove the offset from every group.
	foreach ( $order as $type ) {
		unset( $this->params[ $type ][ $offset ] );
	}
}