WP_REST_Controller::get_object_type
Retrieves the object type this controller is responsible for managing.
Метод класса: WP_REST_Controller{}
Хуков нет.
Возвращает
Строку. Object type for the controller.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_object_type();
Список изменений
| С версии 4.7.0 | Введена. |
Код WP_REST_Controller::get_object_type() WP REST Controller::get object type WP 6.8.3
protected function get_object_type() {
$schema = $this->get_item_schema();
if ( ! $schema || ! isset( $schema['title'] ) ) {
return null;
}
return $schema['title'];
}