Make WordPress Core


Ignore:
Timestamp:
12/03/2016 04:49:37 AM (8 years ago)
Author:
pento
Message:

Docs: Add missing REST API-related args to register_post_type() and register_taxonomy().

These functions now accept the show_in_rest, rest_base, and rest_controller_class args.

Merges [39462] to the 4.7 branch.

Props ketuchetan, rahulsprajapati.
Fixes #39023.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/taxonomy.php

    r39454 r39463  
    295295 * @since 4.4.0 The `public` argument now controls whether the taxonomy can be queried on the front end.
    296296 * @since 4.5.0 Introduced `publicly_queryable` argument.
     297 * @since 4.7.0 Introduced `show_in_rest`, 'rest_base' and 'rest_controller_class'
     298 *              arguments to register the Taxonomy in REST API.
    297299 *
    298300 * @global array $wp_taxonomies Registered taxonomies.
     
    324326 *     @type bool          $show_in_nav_menus     Makes this taxonomy available for selection in navigation menus. If not
    325327 *                                                set, the default is inherited from `$public` (default true).
     328 *     @type bool          $show_in_rest          Whether to include the taxonomy in the REST API.
     329 *     @type string        $rest_base             To change the base url of REST API route. Default is $taxonomy.
     330 *     @type string        $rest_controller_class REST API Controller class name. Default is 'WP_REST_Terms_Controller'.
    326331 *     @type bool          $show_tagcloud         Whether to list the taxonomy in the Tag Cloud Widget controls. If not set,
    327332 *                                                the default is inherited from `$show_ui` (default true).
Note: See TracChangeset for help on using the changeset viewer.