WordPress.org

Make WordPress Core

Changeset 35465


Ignore:
Timestamp:
10/30/2015 11:35:14 PM (6 years ago)
Author:
azaozz
Message:

Responsive images: few more inline docs fixes.

Props jaspermdegroot.
See #34430.

File:
1 edited

Legend:

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

    r35464 r35465  
    896896 * @access private
    897897 *
    898  * @param string $size_name  Image size. Accepts any valid image size name (thumbnail, medium, etc.).
     898 * @param string $size_name  Image size. Accepts any valid image size name ('thumbnail', 'medium', etc.).
    899899 * @param array  $image_meta The image meta data.
    900900 * @return array|bool Array of width and height values in pixels (in that order)
     
    922922 * @since 4.4.0
    923923 *
    924 
    925924 * @param int          $attachment_id Optional. Image attachment ID.
    926925 * @param array|string $size          Image size. Accepts any valid image size, or an array of width and height
     
    974973    }
    975974
    976     // Add full size to the '$img_sizes' array.
     975    // Add full size to the '$image_sizes' array.
    977976    $image_sizes['full'] = array(
    978977        'width'  => $image_meta['width'],
     
    11001099
    11011100        if ( is_array( $image_meta ) ) {
    1102             $width = _wp_get_image_size_from_meta( $size, $image_meta );
    1103             if ( $width ) {
    1104                 $width = absint( $width[0] );
     1101            $size_array = _wp_get_image_size_from_meta( $size, $image_meta );
     1102            if ( $size_array ) {
     1103                $width = absint( $size_array[0] );
    11051104            }
    11061105        }
Note: See TracChangeset for help on using the changeset viewer.