WordPress.org

Make WordPress Core

Ticket #34430: 34430.docs.diff

File 34430.docs.diff, 1.9 KB (added by swissspidy, 6 years ago)
  • src/wp-includes/media.php

    diff --git src/wp-includes/media.php src/wp-includes/media.php
    index fc69bdc..6072b35 100644
    function wp_get_attachment_image_url( $attachment_id, $size = 'thumbnail', $icon 
    865865}
    866866
    867867/**
    868  * Private, do not use
     868 * Get the base URL of the uploads directory.
     869 *
     870 * @since 4.4.0
     871 * @access private
     872 *
     873 * @return string The base URL.
    869874 */
    870875function _wp_upload_dir_baseurl() {
    871876        static $baseurl = null;
    function _wp_upload_dir_baseurl() { 
    879884}
    880885
    881886/**
    882  * Private, do not use
     887 * Get the image's size from its meta data.
     888 *
     889 * Used for responsive images.
     890 *
     891 * @since 4.4.0
     892 * @access private
     893 *
     894 * @param string $size       Image size. Accepts any valid image size name (thumbnail, medium, etc.),
     895 *                           or an array of width and height values in pixels (in that order).
     896 * @param array  $image_meta The image meta data.
     897 * @return array|false Array of width and height values in pixels (in that order)
     898 *                     or false if the size doesn't exist.
    883899 */
    884900function _wp_get_image_size_from_meta( $size, $image_meta ) {
    885901        if ( $size === 'full' ) {
    function _wp_get_image_size_from_meta( $size, $image_meta ) { 
    902918 *
    903919 * @since 4.4.0
    904920 *
    905 
    906  * @param int          $attachment_id Optional. Image attachment ID.
    907  * @param array|string $size          Image size. Accepts any valid image size, or an array of width and height
    908  *                                    values in pixels (in that order). Default 'medium'.
     921 * @param int          $attachment_id Image attachment ID.
     922 * @param array|string $size          Optional. Image size. Accepts any valid image size, or an array of
     923 *                                    width and height values in pixels (in that order). Default 'medium'.
    909924 * @param array        $image_meta    Optional. The image meta data.
    910925 * @return string|bool A 'srcset' value string or false.
    911926 */