Ticket #40413: 40413.2.diff
File 40413.2.diff, 2.3 KB (added by , 5 years ago) |
---|
-
src/wp-includes/post.php
1272 1272 * @since 4.6.0 Post type object returned is now an instance of `WP_Post_Type`. 1273 1273 * @since 4.7.0 Introduced `show_in_rest`, `rest_base` and `rest_controller_class` 1274 1274 * 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 * . 1276 1277 * @global array $wp_post_types List of post types. 1277 1278 * 1278 1279 * @param string $post_type Post type key. Must not exceed 20 characters and may … … 1342 1343 * 'page-attributes', 'thumbnail', 'custom-fields', and 'post-formats'. 1343 1344 * Additionally, the 'revisions' feature dictates whether the post type 1344 1345 * will store revisions, and the 'comments' feature dictates whether the 1345 * comments count will show on the edit screen. Defaults is an array 1346 * comments count will show on the edit screen. A feature can also be 1347 * specified as an array of arguments to provide additional information 1348 * about supporting that feature. Example: `array( 'my_feature', array( 1349 * 'field' => 'value' ) )`. Default is an array. 1346 1350 * containing 'title' and 'editor'. 1347 1351 * @type callable $register_meta_box_cb Provide a callback function that sets up the meta boxes for the 1348 1352 * edit form. Do remove_meta_box() and add_meta_box() calls in the … … 1800 1804 * store revisions, and the 'comments' feature dictates whether the comments 1801 1805 * count will show on the edit screen. 1802 1806 * 1807 * A third, optional parameter can also be passed along with a feature to provide 1808 * additional information about supporting that feature. 1809 * 1803 1810 * Example usage: 1804 1811 * 1805 1812 * add_post_type_support( 'my_post_type', 'comments' );