Skip to content

Commit

Permalink
Docs: Add missing argument type for supports in `register_post_type…
Browse files Browse the repository at this point in the history
…()`.

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
  • Loading branch information
SergeyBiryukov committed Dec 3, 2023
1 parent 76ab1b8 commit 96a589b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'.
Expand All @@ -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
Expand Down

0 comments on commit 96a589b

Please sign in to comment.