Customize: Add support for flex sizes in `CustomizeImageCropper`.
Ensures that `$flex_width` and `$flex_height` as specified on `WP_Customize_Cropped_Image_Control` will be honored when a crop is saved. See #36255. Fixes #34851. Built from https://develop.svn.wordpress.org/trunk@37042 git-svn-id: http://core.svn.wordpress.org/trunk@37009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a07988c1c5
commit
d1ae0642cf
|
@ -402,8 +402,12 @@ CustomizeImageCropper = Controller.Cropper.extend({
|
||||||
var cropDetails = attachment.get( 'cropDetails' ),
|
var cropDetails = attachment.get( 'cropDetails' ),
|
||||||
control = this.get( 'control' );
|
control = this.get( 'control' );
|
||||||
|
|
||||||
cropDetails.dst_width = control.params.width;
|
if ( ! control.params.flex_width ) {
|
||||||
cropDetails.dst_height = control.params.height;
|
cropDetails.dst_width = control.params.width;
|
||||||
|
}
|
||||||
|
if ( ! control.params.flex_height ) {
|
||||||
|
cropDetails.dst_height = control.params.height;
|
||||||
|
}
|
||||||
|
|
||||||
return wp.ajax.post( 'crop-image', {
|
return wp.ajax.post( 'crop-image', {
|
||||||
wp_customize: 'on',
|
wp_customize: 'on',
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-beta4-37041';
|
$wp_version = '4.5-beta4-37042';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue