WP_REST_Controller::get_public_item_schema() WordPress Method

The WP_REST_Controller::get_public_item_schema() method returns the publicly accessible schema for a single item.

WP_REST_Controller::get_public_item_schema() #

Retrieves the item’s schema for display / public consumption purposes.


Return

(array) Public item schema data.


Top ↑

Source

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

	public function get_public_item_schema() {

		$schema = $this->get_item_schema();

		if ( ! empty( $schema['properties'] ) ) {
			foreach ( $schema['properties'] as &$property ) {
				unset( $property['arg_options'] );
			}
		}

		return $schema;
	}


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.