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. Built from https://develop.svn.wordpress.org/trunk@27472 git-svn-id: http://core.svn.wordpress.org/trunk@27317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -97,7 +97,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
||||
else
|
||||
$sizes[$s]['height'] = get_option( "{$s}_size_h" ); // For default sizes set in options
|
||||
if ( isset( $_wp_additional_image_sizes[$s]['crop'] ) )
|
||||
$sizes[$s]['crop'] = intval( $_wp_additional_image_sizes[$s]['crop'] ); // For theme-added sizes
|
||||
$sizes[$s]['crop'] = $_wp_additional_image_sizes[$s]['crop']; // For theme-added sizes
|
||||
else
|
||||
$sizes[$s]['crop'] = get_option( "{$s}_crop" ); // For default sizes set in options
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user