Media: fix support for arrays for the `crop` setting for registered image sub-sizes in `wp_get_registered_image_subsizes()`.

See #40439.
Built from https://develop.svn.wordpress.org/trunk@45541


git-svn-id: http://core.svn.wordpress.org/trunk@45352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2019-06-15 17:17:52 +00:00
parent da7839dc45
commit 6b74e27d04
2 changed files with 7 additions and 3 deletions

View File

@ -864,9 +864,13 @@ function wp_get_registered_image_subsizes() {
}
if ( isset( $additional_sizes[ $size_name ]['crop'] ) ) {
$size_data['crop'] = (bool) $additional_sizes[ $size_name ]['crop'];
$size_data['crop'] = $additional_sizes[ $size_name ]['crop'];
} else {
$size_data['crop'] = (bool) get_option( "{$size_name}_crop" );
$size_data['crop'] = get_option( "{$size_name}_crop" );
}
if ( ! is_array( $size_data['crop'] ) || empty( $size_data['crop'] ) ) {
$size_data['crop'] = (bool) $size_data['crop'];
}
$all_sizes[ $size_name ] = $size_data;

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45540';
$wp_version = '5.3-alpha-45541';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.