Media: Correctly allow changing PDF thumbnail crop value.
Corrects logic that kept plugins from setting crop value of intermediate image sizes for rendered PDFs. Adds test. Props leemon, SergeyBiryukov, chetan200891, birgire. Merges [42792] to the 4.9 branch. Fixes #43226. Built from https://develop.svn.wordpress.org/branches/4.9@42813 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a91c3fbdc0
commit
7546fcc64a
|
@ -241,7 +241,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
|||
$sizes[ $s ]['crop'] = $_wp_additional_image_sizes[ $s ]['crop'];
|
||||
} else {
|
||||
// Force thumbnails to be soft crops.
|
||||
if ( ! 'thumbnail' === $s ) {
|
||||
if ( 'thumbnail' !== $s ) {
|
||||
$sizes[ $s ]['crop'] = get_option( "{$s}_crop" );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9.5-alpha-42811';
|
||||
$wp_version = '4.9.5-alpha-42813';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue