WordPress at Your Fingertips
function is not described

WP_REST_Request::set_attributes() public WP 4.4.0

Sets the attributes for the request.

{} It's a method of the class: WP_REST_Request{}

No Hooks.

Return

null. Nothing.

Usage

$WP_REST_Request = new WP_REST_Request();
$WP_REST_Request->set_attributes( $attributes );
$attributes(array) (required)
Attributes for the request.

Changelog

Since 4.4.0 Introduced.

Code of WP_REST_Request::set_attributes() WP 5.8

<?php
public function set_attributes( $attributes ) {
	$this->attributes = $attributes;
}