From 96a589bf0d1cc4e9f2364b8e15228f77a175b2a1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 3 Dec 2023 19:59:10 +0000 Subject: [PATCH] Docs: Add missing argument type for `supports` in `register_post_type()`. If set to `false`, no feature support is registered for the post type. Follow-up to [12751], [20734], [29091], [37883]. Props jeremyfelt, swissspidy. Fixes #59690. git-svn-id: https://develop.svn.wordpress.org/trunk@57150 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index edad5218fa..d6b6bc6649 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -1623,7 +1623,8 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) * @type string $rest_controller_class REST API controller class name. Default is 'WP_REST_Posts_Controller'. * @type string|bool $autosave_rest_controller_class REST API controller class name. Default is 'WP_REST_Autosaves_Controller'. * @type string|bool $revisions_rest_controller_class REST API controller class name. Default is 'WP_REST_Revisions_Controller'. - * @type bool $late_route_registration A flag to direct the REST API controllers for autosave / revisions should be registered before/after the post type controller. + * @type bool $late_route_registration A flag to direct the REST API controllers for autosave / revisions + * should be registered before/after the post type controller. * @type int $menu_position The position in the menu order the post type should appear. To work, * $show_in_menu must be true. Default null (at the bottom). * @type string $menu_icon The URL to the icon to be used for this menu. Pass a base64-encoded @@ -1641,7 +1642,7 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) * See get_post_type_capabilities(). * @type bool $map_meta_cap Whether to use the internal default meta capability handling. * Default false. - * @type array $supports Core feature(s) the post type supports. Serves as an alias for calling + * @type array|false $supports Core feature(s) the post type supports. Serves as an alias for calling * add_post_type_support() directly. Core features include 'title', * 'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt', * 'page-attributes', 'thumbnail', 'custom-fields', and 'post-formats'. @@ -1651,6 +1652,7 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) * specified as an array of arguments to provide additional information * about supporting that feature. * Example: `array( 'my_feature', array( 'field' => 'value' ) )`. + * If false, no features will be added. * Default is an array containing 'title' and 'editor'. * @type callable $register_meta_box_cb Provide a callback function that sets up the meta boxes for the * edit form. Do remove_meta_box() and add_meta_box() calls in the