WP_REST_Controller::get_object_type(): string

Retrieves the object type this controller is responsible for managing.


Return

string Object type for the controller.


Top ↑

Source

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

protected function get_object_type() {
	$schema = $this->get_item_schema();

	if ( ! $schema || ! isset( $schema['title'] ) ) {
		return null;
	}

	return $schema['title'];
}


Top ↑

Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.