WordPress at a glance
function is not described

WP_REST_Attachments_Controller::get_edit_media_item_args() protected WP 5.5.0

Gets the request args for the edit item route.

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

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_edit_media_item_args();

Changelog

Since 5.5.0 Introduced.

Code of WP_REST_Attachments_Controller::get_edit_media_item_args() WP 5.5.1

<?php
protected function get_edit_media_item_args() {
	return array(
		'rotation' => array(
			'description'      => __( 'The amount to rotate the image clockwise in degrees.' ),
			'type'             => 'integer',
			'minimum'          => 0,
			'exclusiveMinimum' => true,
			'maximum'          => 360,
			'exclusiveMaximum' => true,
		),
		'x'        => array(
			'description' => __( 'As a percentage of the image, the x position to start the crop from.' ),
			'type'        => 'number',
			'minimum'     => 0,
			'maximum'     => 100,
		),
		'y'        => array(
			'description' => __( 'As a percentage of the image, the y position to start the crop from.' ),
			'type'        => 'number',
			'minimum'     => 0,
			'maximum'     => 100,
		),
		'width'    => array(
			'description' => __( 'As a percentage of the image, the width to crop the image to.' ),
			'type'        => 'number',
			'minimum'     => 0,
			'maximum'     => 100,
		),
		'height'   => array(
			'description' => __( 'As a percentage of the image, the height to crop the image to.' ),
			'type'        => 'number',
			'minimum'     => 0,
			'maximum'     => 100,
		),
		'src'      => array(
			'description' => __( 'URL to the edited image file.' ),
			'type'        => 'string',
			'format'      => 'uri',
			'required'    => true,
		),
	);
}