Make WordPress Core


Ignore:
Timestamp:
09/20/2020 04:21:42 PM (4 years ago)
Author:
johnbillion
Message:

Media: Standardise the description for image size parameters.

This brings continuity to all the image related functions and filters which accept or pass a size parameter.

Props dilipbheda, johnbillion

Fixes #47364

File:
1 edited

Legend:

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

    r49016 r49021  
    7575 * @see get_the_post_thumbnail()
    7676 *
    77  * @param string|array $size Optional. Image size to use. Accepts any valid image size, or
    78  *                           an array of width and height values in pixels (in that order).
    79  *                           Default 'post-thumbnail'.
     77 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of
     78 *                           width and height values in pixels (in that order). Default 'post-thumbnail'.
    8079 * @param string|array $attr Optional. Query string or array of attributes. Default empty.
    8180 */
     
    132131 *
    133132 * @param int|WP_Post  $post Optional. Post ID or WP_Post object.  Default is global `$post`.
    134  * @param string|array $size Optional. Image size to use. Accepts any valid image size, or
    135  *                           an array of width and height values in pixels (in that order).
    136  *                           Default 'post-thumbnail'.
     133 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of
     134 *                           width and height values in pixels (in that order). Default 'post-thumbnail'.
    137135 * @param string|array $attr Optional. Query string or array of attributes. Default empty.
    138136 * @return string The post thumbnail image tag.
     
    153151     * @since 4.9.0 Added the `$post_id` parameter.
    154152     *
    155      * @param string|array $size    The post thumbnail size. Image size or array of width and height
    156      *                              values (in that order). Default 'post-thumbnail'.
     153     * @param string|int[] $size    Requested image size. Can be any registered image size name, or
     154     *                              an array of width and height values in pixels (in that order).
    157155     * @param int          $post_id The post ID.
    158156     */
     
    170168         * @param int          $post_id           The post ID.
    171169         * @param int          $post_thumbnail_id The post thumbnail ID.
    172          * @param string|array $size              The post thumbnail size. Image size or array of width
    173          *                                        and height values (in that order). Default 'post-thumbnail'.
     170         * @param string|int[] $size              Requested image size. Can be any registered image size name, or
     171         *                                        an array of width and height values in pixels (in that order).
    174172         */
    175173        do_action( 'begin_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size );
     
    188186         * @param int          $post_id           The post ID.
    189187         * @param int          $post_thumbnail_id The post thumbnail ID.
    190          * @param string|array $size              The post thumbnail size. Image size or array of width
    191          *                                        and height values (in that order). Default 'post-thumbnail'.
     188         * @param string|int[] $size              Requested image size. Can be any registered image size name, or
     189         *                                        an array of width and height values in pixels (in that order).
    192190         */
    193191        do_action( 'end_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size );
     
    205203     * @param int          $post_id           The post ID.
    206204     * @param int          $post_thumbnail_id The post thumbnail ID.
    207      * @param string|array $size              The post thumbnail size. Image size or array of width and height
    208      *                                        values (in that order). Default 'post-thumbnail'.
     205     * @param string|int[] $size              Requested image size. Can be any registered image size name, or
     206     *                                        an array of width and height values in pixels (in that order).
    209207     * @param string       $attr              Query string of attributes.
    210208     */
Note: See TracChangeset for help on using the changeset viewer.