Make WordPress Core


Ignore:
Timestamp:
05/14/2025 01:15:28 PM (9 months ago)
Author:
johnbillion
Message:

Docs: Declare the object shapes for some return values.

Props swissspidy

See #63166

File:
1 edited

Legend:

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

    r60235 r60236  
    19071907 * registration, capability_type will always be a string of the singular value.
    19081908 *
    1909  * By default, eight keys are accepted as part of the capabilities array:
     1909 * By default, the following keys are accepted as part of the capabilities array:
    19101910 *
    19111911 * - edit_post, read_post, and delete_post are meta capabilities, which are then
     
    19221922 * - publish_posts - Controls publishing objects of this post type.
    19231923 * - read_private_posts - Controls whether private objects can be read.
    1924  *
    1925  * These five primitive capabilities are checked in core in various locations.
     1924 * - create_posts - Controls whether objects of this post type can be created.
     1925 *
     1926 * These primitive capabilities are checked in core in various locations.
    19261927 * There are also six other primitive capabilities which are not referenced
    19271928 * directly in core, except in map_meta_cap(), which takes the three aforementioned
     
    19491950 *
    19501951 * @param object $args Post type registration arguments.
    1951  * @return object Object with all the capabilities as member variables.
     1952 * @return object {
     1953 *     Object with all the capabilities as member variables.
     1954 *
     1955 *     @type string $edit_post              Capability to edit a post.
     1956 *     @type string $read_post              Capability to read a post.
     1957 *     @type string $delete_post            Capability to delete a post.
     1958 *     @type string $edit_posts             Capability to edit posts.
     1959 *     @type string $edit_others_posts      Capability to edit others' posts.
     1960 *     @type string $delete_posts           Capability to delete posts.
     1961 *     @type string $publish_posts          Capability to publish posts.
     1962 *     @type string $read_private_posts     Capability to read private posts.
     1963 *     @type string $create_posts           Capability to create posts.
     1964 *     @type string $read                   Optional. Capability to read a post.
     1965 *     @type string $delete_private_posts   Optional. Capability to delete private posts.
     1966 *     @type string $delete_published_posts Optional. Capability to delete published posts.
     1967 *     @type string $delete_others_posts    Optional. Capability to delete others' posts.
     1968 *     @type string $edit_private_posts     Optional. Capability to edit private posts.
     1969 *     @type string $edit_published_posts   Optional. Capability to edit published posts.
     1970 * }
    19521971 */
    19531972function get_post_type_capabilities( $args ) {
Note: See TracChangeset for help on using the changeset viewer.