Make WordPress Core

Changeset 46196


Ignore:
Timestamp:
09/20/2019 01:04:50 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify that $show_in_rest parameter of register_post_type() and register_taxonomy() should be enabled for the post type or taxonomy to be available in the block editor.

Props ramon-fincken.
Fixes #48084.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r46178 r46196  
    13141314 *                                              Default is value of $show_ui.
    13151315 *     @type bool        $show_in_nav_menus     Makes this post type available for selection in navigation menus.
    1316  *                                              Default is value $public.
     1316 *                                              Default is value of $public.
    13171317 *     @type bool        $show_in_admin_bar     Makes this post type available via the admin bar. Default is value
    13181318 *                                              of $show_in_menu.
    1319  *     @type bool        $show_in_rest          Whether to add the post type route in the REST API 'wp/v2' namespace.
     1319 *     @type bool        $show_in_rest          Whether to include the post type in the REST API. Set this to true
     1320 *                                              for the post type to be available in the block editor.
    13201321 *     @type string      $rest_base             To change the base url of REST API route. Default is $post_type.
    13211322 *     @type string      $rest_controller_class REST API Controller class name. Default is 'WP_REST_Posts_Controller'.
  • trunk/src/wp-includes/taxonomy.php

    r45932 r46196  
    364364 *     @type bool          $show_in_nav_menus     Makes this taxonomy available for selection in navigation menus. If not
    365365 *                                                set, the default is inherited from `$public` (default true).
    366  *     @type bool          $show_in_rest          Whether to include the taxonomy in the REST API.
     366 *     @type bool          $show_in_rest          Whether to include the taxonomy in the REST API. Set this to true
     367 *                                                for the taxonomy to be available in the block editor.
    367368 *     @type string        $rest_base             To change the base url of REST API route. Default is $taxonomy.
    368369 *     @type string        $rest_controller_class REST API Controller class name. Default is 'WP_REST_Terms_Controller'.
Note: See TracChangeset for help on using the changeset viewer.