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-admin/includes/image.php

    r49020 r49021  
    918918 * @since 2.9.0
    919919 *
    920  * @param int    $attachment_id Attachment ID.
    921  * @param string $mime_type     Image mime type.
    922  * @param string $size          Optional. Image size. Default 'full'.
     920 * @param int          $attachment_id Attachment ID.
     921 * @param string       $mime_type     Image mime type.
     922 * @param string|int[] $size          Optional. Image size. Accepts any registered image size name, or an array
     923 *                                    of width and height values in pixels (in that order). Default 'full'.
    923924 * @return resource|GdImage|false The resulting image resource or GdImage instance on success,
    924925 *                                false on failure.
     
    953954         * @param resource|GdImage $image         Current image.
    954955         * @param int              $attachment_id Attachment ID.
    955          * @param string           $size          Image size.
     956         * @param string|int[]     $size          Requested image size. Can be any registered image size name, or
     957         *                                        an array of width and height values in pixels (in that order).
    956958         */
    957959        $image = apply_filters( 'load_image_to_edit', $image, $attachment_id, $size );
     
    975977 * @access private
    976978 *
    977  * @param int    $attachment_id Attachment ID.
    978  * @param string $size          Optional. Image size. Default 'full'.
    979  * @return string|false File path or url on success, false on failure.
     979 * @param int          $attachment_id Attachment ID.
     980 * @param string|int[] $size          Optional. Image size. Accepts any registered image size name, or an array
     981 *                                    of width and height values in pixels (in that order). Default 'full'.
     982 * @return string|false File path or URL on success, false on failure.
    980983 */
    981984function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
     
    996999                 * @since 3.1.0
    9971000                 *
    998                  * @param string $path          Path to the current image.
    999                  * @param int    $attachment_id Attachment ID.
    1000                  * @param string $size          Size of the image.
     1001                 * @param string       $path          Path to the current image.
     1002                 * @param int          $attachment_id Attachment ID.
     1003                 * @param string|int[] $size          Requested image size. Can be any registered image size name, or
     1004                 *                                    an array of width and height values in pixels (in that order).
    10011005                 */
    10021006                $filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size );
     
    10111015         * @since 3.1.0
    10121016         *
    1013          * @param string $image_url     Current image URL.
    1014          * @param int    $attachment_id Attachment ID.
    1015          * @param string $size          Size of the image.
     1017         * @param string       $image_url     Current image URL.
     1018         * @param int          $attachment_id Attachment ID.
     1019         * @param string|int[] $size          Requested image size. Can be any registered image size name, or
     1020         *                                    an array of width and height values in pixels (in that order).
    10161021         */
    10171022        $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size );
     
    10231028     * @since 2.9.0
    10241029     *
    1025      * @param string|bool $filepath      File path or URL to current image, or false.
    1026      * @param int         $attachment_id Attachment ID.
    1027      * @param string      $size          Size of the image.
     1030     * @param string|bool  $filepath      File path or URL to current image, or false.
     1031     * @param int          $attachment_id Attachment ID.
     1032     * @param string|int[] $size          Requested image size. Can be any registered image size name, or
     1033     *                                    an array of width and height values in pixels (in that order).
    10281034     */
    10291035    return apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size );
Note: See TracChangeset for help on using the changeset viewer.