WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/08/2014 06:13:27 AM (6 years ago)
Author:
nacin
Message:

Allow $crop in add_image_size() to receive crop anchors (top, left, right, bottom, center).

This also applies to set_post_thumbnail_size() and image_resize_dimensions().

props bradt, wonderboymusic, DH-Shredder.
fixes #19393.

File:
1 edited

Legend:

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

    r27202 r27472  
    9898                $sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
    9999            if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
    100                 $sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
     100                $sizes[$s]['crop'] = $_wp_additional_image_sizes[$s]['crop']; // For theme-added sizes
    101101            else
    102102                $sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
Note: See TracChangeset for help on using the changeset viewer.