Make WordPress Core

Changeset 40303


Ignore:
Timestamp:
03/18/2017 03:24:18 PM (9 years ago)
Author:
swissspidy
Message:

Taxonomy: Add missing REST API properties to WP_Taxonomy class.

Props danielbachhuber.
Fixes #39987.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-taxonomy.php

    r40049 r40303  
    186186         */
    187187        public $update_count_callback;
     188
     189        /**
     190         * Whether this taxonomy should appear in the REST API.
     191         *
     192         * Default false. If true, standard endpoints will be registered with
     193         * respect to $rest_base and $rest_controller_class.
     194         *
     195         * @since 4.7.4
     196         * @access public
     197         * @var bool $show_in_rest
     198         */
     199        public $show_in_rest;
     200
     201        /**
     202         * The base path for this taxonomy's REST API endpoints.
     203         *
     204         * @since 4.7.4
     205         * @access public
     206         * @var string|bool $rest_base
     207         */
     208        public $rest_base;
     209
     210        /**
     211         * The controller for this taxonomy's REST API endpoints.
     212         *
     213         * Custom controllers must extend WP_REST_Controller.
     214         *
     215         * @since 4.7.4
     216         * @access public
     217         * @var string|bool $rest_controller_class
     218         */
     219        public $rest_controller_class;
    188220
    189221        /**
     
    255287                        'query_var'             => $this->name,
    256288                        'update_count_callback' => '',
     289                        'show_in_rest'          => false,
     290                        'rest_base'             => false,
     291                        'rest_controller_class' => false,
    257292                        '_builtin'              => false,
    258293                );
Note: See TracChangeset for help on using the changeset viewer.