WP_REST_Meta_Fields::get_rest_field_type()protectedWP 4.7.0

Retrieves the object type for register_rest_field().

Method of the class: WP_REST_Meta_Fields{}

No Hooks.

Return

String. The REST field type, such as post type name, taxonomy name, 'comment', or user.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_rest_field_type();

Changelog

Since 4.7.0 Introduced.

WP_REST_Meta_Fields::get_rest_field_type() code WP 6.4.3

abstract protected function get_rest_field_type();