WP_REST_Controller::get_object_type() WordPress Method
The WP_REST_Controller::get_object_type() method is used to get the object type for a given controller.
WP_REST_Controller::get_object_type() #
Retrieves the object type this controller is responsible for managing.
Return
(string) Object type for the controller.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-controller.php
protected function get_object_type() { $schema = $this->get_item_schema(); if ( ! $schema || ! isset( $schema['title'] ) ) { return null; } return $schema['title']; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |