WP_REST_Controller::get_endpoint_args_for_item_schema() WordPress Method

The WP_REST_Controller::get_endpoint_args_for_item_schema() method is used to get the endpoint arguments for an item schema.

WP_REST_Controller::get_endpoint_args_for_item_schema( string $method = WP_REST_Server::CREATABLE ) #

Retrieves an array of endpoint arguments from the item schema for the controller.


Parameters

$method

(string)(Optional) HTTP method of the request. The arguments for CREATABLE requests are checked for required values and may fall-back to a given default, this is not done on EDITABLE requests.

Default value: WP_REST_Server::CREATABLE


Top ↑

Return

(array) Endpoint arguments.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-controller.php

	public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) {
		return rest_get_endpoint_args_for_schema( $this->get_item_schema(), $method );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.7.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.