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:
Weston Ruter 2016-03-22 03:55:29 +00:00
parent a07988c1c5
commit d1ae0642cf
3 changed files with 11 additions and 7 deletions

View File

@ -402,8 +402,12 @@ CustomizeImageCropper = Controller.Cropper.extend({
var cropDetails = attachment.get( 'cropDetails' ),
control = this.get( 'control' );
if ( ! control.params.flex_width ) {
cropDetails.dst_width = control.params.width;
}
if ( ! control.params.flex_height ) {
cropDetails.dst_height = control.params.height;
}
return wp.ajax.post( 'crop-image', {
wp_customize: 'on',

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @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.