Media: fix support for arrays for the crop
setting for registered image sub-sizes in wp_get_registered_image_subsizes()
.
See #40439. git-svn-id: https://develop.svn.wordpress.org/trunk@45541 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
815e3ffbe6
commit
31d865271b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user