Make WordPress Core


Ignore:
Timestamp:
09/11/2012 01:38:26 AM (12 years ago)
Author:
nacin
Message:

Remove 'hwstring_small' from attachment metadata and deprecate get_udims(). props SergeyBiryukov. fixes #21518.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image.php

    r21039 r21808  
    118118        $metadata['width'] = $imagesize[0];
    119119        $metadata['height'] = $imagesize[1];
    120         list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96);
    121         $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";
    122120
    123121        // Make the file path relative to the upload dir
     
    159157
    160158    return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
    161 }
    162 
    163 /**
    164  * Calculated the new dimensions for a downsampled image.
    165  *
    166  * @since 2.0.0
    167  * @see wp_constrain_dimensions()
    168  *
    169  * @param int $width Current width of the image
    170  * @param int $height Current height of the image
    171  * @return mixed Array(height,width) of shrunk dimensions.
    172  */
    173 function get_udims( $width, $height) {
    174     return wp_constrain_dimensions( $width, $height, 128, 96 );
    175159}
    176160
Note: See TracChangeset for help on using the changeset viewer.