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:
parent
da7839dc45
commit
6b74e27d04
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue