Make WordPress Core

Changeset 46246


Ignore:
Timestamp:
09/23/2019 04:07:23 PM (5 years ago)
Author:
desrosj
Message:

Docs: Improve documentation for the supports argument in register_post_type()/add_post_type_support().

Follow up of [46160].

Fixes #40413.

File:
1 edited

Legend:

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

    r46232 r46246  
    12731273 * @since 4.7.0 Introduced `show_in_rest`, `rest_base` and `rest_controller_class`
    12741274 *              arguments to register the post type in REST API.
    1275  *
     1275 * @since 5.3.0 The `supports` argument will now accept an array of arguments for a feature.
     1276 * .
    12761277 * @global array $wp_post_types List of post types.
    12771278 *
     
    13441345 *                                              Additionally, the 'revisions' feature dictates whether the post type
    13451346 *                                              will store revisions, and the 'comments' feature dictates whether the
    1346  *                                              comments count will show on the edit screen. Defaults is an array
    1347  *                                              containing 'title' and 'editor'.
     1347 *                                              comments count will show on the edit screen. A feature can also be
     1348 *                                              specified as an array of arguments to provide additional information
     1349 *                                              about supporting that feature. Example: `array( 'my_feature', array(
     1350 *                                              'field' => 'value' ) )`. Default is an array containing 'title' and
     1351 *                                              'editor'.
    13481352 *     @type callable    $register_meta_box_cb  Provide a callback function that sets up the meta boxes for the
    13491353 *                                              edit form. Do remove_meta_box() and add_meta_box() calls in the
     
    18011805 * store revisions, and the 'comments' feature dictates whether the comments
    18021806 * count will show on the edit screen.
     1807 *
     1808 * A third, optional parameter can also be passed along with a feature to provide
     1809 * additional information about supporting that feature.
    18031810 *
    18041811 * Example usage:
Note: See TracChangeset for help on using the changeset viewer.