WordPress.org

Make WordPress Core

Changeset 35696


Ignore:
Timestamp:
11/18/2015 10:43:05 PM (5 years ago)
Author:
DrewAPicture
Message:

Docs: Clarify some parameter and return descriptions in the DocBlocks for wp_get_attachment_image_srcset() and wp_calculate_image_srcset(), wp_get_attachment_image_sizes(), and the wp_calculate_image_srcset filter.

Props joemcgill.
See #34733.

File:
1 edited

Legend:

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

    r35678 r35696  
    937937 *                                    width and height values in pixels (in that order). Default 'medium'.
    938938 * @param array        $image_meta    Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
     939 *                                    Default null.
    939940 * @return string|bool A 'srcset' value string or false.
    940941 */
     
    965966 * @param string $image_src     The 'src' of the image.
    966967 * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
    967  * @param int    $attachment_id Optional. The image attachment ID to pass to the filter.
     968 * @param int    $attachment_id Optional. The image attachment ID to pass to the filter. Default 0.
    968969 * @return string|bool          The 'srcset' attribute value. False on error or when only one source exists.
    969970 */
     
    10891090     * @param string $image_src     The 'src' of the image.
    10901091     * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
    1091      * @param int    $attachment_id Image attachment ID.
     1092     * @param int    $attachment_id Image attachment ID or 0.
    10921093     */
    10931094    $sources = apply_filters( 'wp_calculate_image_srcset', $sources, $size_array, $image_src, $image_meta, $attachment_id );
     
    11161117 *                                    and height values in pixels (in that order). Default 'medium'.
    11171118 * @param array        $image_meta    Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
    1118  * @return string|bool A 'srcset' value string or false.
     1119 *                                    Default null.
     1120 * @return string|bool A valid source size value for use in a 'sizes' attribute or false.
    11191121 */
    11201122function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image_meta = null ) {
Note: See TracChangeset for help on using the changeset viewer.