3 * REST API: WP_REST_Term_Meta_Fields class
11 * Core class used to manage meta values for terms via the REST API.
15 * @see WP_REST_Meta_Fields
17 class WP_REST_Term_Meta_Fields extends WP_REST_Meta_Fields {
20 * Taxonomy to register fields for.
34 * @param string $taxonomy Taxonomy to register fields for.
36 public function __construct( $taxonomy ) {
37 $this->taxonomy = $taxonomy;
41 * Retrieves the object meta type.
46 * @return string The meta type.
48 protected function get_meta_type() {
53 * Retrieves the type for register_rest_field().
58 * @return string The REST field type.
60 public function get_rest_field_type() {
61 return 'post_tag' === $this->taxonomy ? 'tag' : $this->taxonomy;