Make WordPress Core

Changeset 53302


Ignore:
Timestamp:
04/28/2022 09:57:51 AM (4 years ago)
Author:
johnbillion
Message:

Docs: Various docblock corrections and improvements for changes introduced in 6.0.

See #54729

Location:
trunk/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r52950 r53302  
    510510
    511511                /**
    512                  * Filters the published time of the post.
     512                 * Filters the published time of an attachment displayed in the Media list table.
    513513                 *
    514514                 * @since 6.0.0
    515515                 *
    516516                 * @param string  $h_time      The published time.
    517                  * @param WP_Post $post        Post object.
     517                 * @param WP_Post $post        Attachment object.
    518518                 * @param string  $column_name The column name.
    519519                 */
  • trunk/src/wp-admin/includes/image-edit.php

    r53161 r53302  
    5050         * @since 6.0.0
    5151         *
    52          * @param bool|array $edit_custom_sizes True if custom sizes can be edited or array of custom sizes.
     52         * @param bool|string[] $edit_custom_sizes True if custom sizes can be edited or array of custom size names.
    5353         */
    5454        $edit_custom_sizes = apply_filters( 'edit_custom_thumbnail_sizes', $edit_custom_sizes );
  • trunk/src/wp-includes/block-editor.php

    r53299 r53302  
    296296 * @global string $pagenow The filename of the current screen.
    297297 *
    298  * @return array The block editor assets: styles and scripts.
     298 * @return array {
     299 *     The block editor assets.
     300 *
     301 *     @type string|false $styles  String containing the HTML for styles.
     302 *     @type string|false $scripts String containing the HTML for scripts.
     303 * }
    299304 */
    300305function _wp_get_iframed_editor_assets() {
  • trunk/src/wp-includes/blocks.php

    r53298 r53302  
    11941194
    11951195/**
    1196  * Helper function that returns the proper pagination arrow html for
     1196 * Helper function that returns the proper pagination arrow HTML for
    11971197 * `QueryPaginationNext` and `QueryPaginationPrevious` blocks based
    11981198 * on the provided `paginationArrow` from `QueryPagination` context.
     
    12051205 * @param boolean  $is_next Flag for handling `next/previous` blocks.
    12061206 *
    1207  * @return string|null Returns the constructed WP_Query arguments.
     1207 * @return string|null The pagination arrow HTML or null if there is none.
    12081208 */
    12091209function get_query_pagination_arrow( $block, $is_next ) {
     
    12831283 *
    12841284 * @return array Returns the comment query parameters to use with the
    1285  * WP_Comment_Query constructor.
     1285 *               WP_Comment_Query constructor.
    12861286 */
    12871287function build_comment_query_vars_from_block( $block ) {
     
    13401340
    13411341/**
    1342  * Helper function that returns the proper pagination arrow html for
     1342 * Helper function that returns the proper pagination arrow HTML for
    13431343 * `CommentsPaginationNext` and `CommentsPaginationPrevious` blocks based on the
    13441344 * provided `paginationArrow` from `CommentsPagination` context.
     
    13521352 *                                  Default 'next'. Accepts 'next' or 'previous'.
    13531353 *
    1354  * @return string|null Returns the constructed WP_Query arguments.
     1354 * @return string|null The pagination arrow HTML or null if there is none.
    13551355 */
    13561356function get_comments_pagination_arrow( $block, $pagination_type = 'next' ) {
  • trunk/src/wp-includes/class-wp-term-query.php

    r53299 r53302  
    952952         *
    953953         * @param WP_Term[] $term_objects Array of term objects.
    954          * @param string $_fields Field to format.
     954         * @param string    $_fields      Field to format.
    955955         *
    956956         * @return WP_Term[]|int[]|string[] Array of terms / strings / ints depending on field requested.
  • trunk/src/wp-includes/class-wp-theme-json-resolver.php

    r53177 r53302  
    152152         * @since 5.8.0
    153153         * @since 5.9.0 Theme supports have been inlined and the `$theme_support_data` argument removed.
    154          * @since 6.0.0 Adds a second parameter to allow the theme data to be returned without theme supports.
     154         * @since 6.0.0 Added an `$options` parameter to allow the theme data to be returned without theme supports.
    155155         *
    156156         * @param array $deprecated Deprecated. Not used.
    157          * @param array $options Contains a key called with_supports to determine whether to include theme supports in the data.
     157         * @param array $options {
     158         *     Options arguments.
     159         *
     160         *     @type bool $with_supports Whether to include theme supports in the data. Default true.
     161         * }
    158162         * @return WP_Theme_JSON Entity that holds theme data.
    159163         */
  • trunk/src/wp-includes/class-wp-theme-json.php

    r53129 r53302  
    15391539         * @since 6.0.0
    15401540         *
    1541          * @param array      $data The data to inspect.
    1542          * @param bool|array $path Boolean or path to a boolean.
     1541         * @param array      $data    The data to inspect.
     1542         * @param bool|array $path    Boolean or path to a boolean.
    15431543         * @param bool       $default Default value if the referenced path is missing.
    1544          * @return boolean
     1544         *                            Default false.
     1545         * @return bool Value of boolean metadata.
    15451546         */
    15461547        protected static function get_metadata_boolean( $data, $path, $default = false ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-pattern-categories-controller.php

    r53152 r53302  
    9797         * @since 6.0.0
    9898         *
    99          * @param object          $item    Raw category as registered, before any changes.
     99         * @param array           $item    Raw category as registered, before any changes.
    100100         * @param WP_REST_Request $request Request object.
    101101         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-patterns-controller.php

    r53210 r53302  
    113113         * @since 6.0.0
    114114         *
    115          * @param object          $item    Raw pattern as registered, before any changes.
     115         * @param array           $item    Raw pattern as registered, before any changes.
    116116         * @param WP_REST_Request $request Request object.
    117117         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
  • trunk/src/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php

    r52834 r53302  
    119119                                 *
    120120                                 * @since 5.5.0
    121                                  * @since 6.0.0 Added fourth argument for the term object.
     121                                 * @since 6.0.0 Added `$term` argument containing the term object.
    122122                                 *
    123123                                 * @param array   $sitemap_entry Sitemap entry for the term.
  • trunk/src/wp-includes/widgets/class-wp-widget-media.php

    r53158 r53302  
    468468         * @since 6.0.0
    469469         *
    470          * @var string
     470         * @return string
    471471         */
    472472        protected static function get_default_description() {
     
    484484         * @since 6.0.0
    485485         *
    486          * @return string[]
     486         * @return (string|array)[]
    487487         */
    488488        protected static function get_l10n_defaults() {
Note: See TracChangeset for help on using the changeset viewer.