WP_REST_Controller::get_object_type

Advertisement

Summery Summery

Retrieves the object type this controller is responsible for managing.

Syntax Syntax

WP_REST_Controller::get_object_type()

Return Return

(string) Object type for the controller.

Source Source

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

		foreach ( $additional_fields as $field_name => $field_options ) {
			// For back-compat, include any field with an empty schema
			// because it won't be present in $this->get_item_schema().
			if ( is_null( $field_options['schema'] ) ) {
				$properties[ $field_name ] = $field_options;
			}
		}

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply