From 7546fcc64ae998ae14ca6c18bf035f47ca3fa88f Mon Sep 17 00:00:00 2001 From: Mike Schroder Date: Fri, 9 Mar 2018 03:21:40 +0000 Subject: [PATCH] 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 --- wp-admin/includes/image.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 90fa2942c4..596aa7961e 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -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" ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 649d090904..db627e99c0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.