Customize: Update cropper.js
to match changes in [36866].
`media-views.js` was updated, but the changes weren't added to `cropper.js`, which caused the `grunt precommit:js` job to incorrectly remove the changes from `media-views.js`. Fixes #32783. git-svn-id: https://develop.svn.wordpress.org/trunk@36931 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6abfb7a92a
commit
ad57f8d6f9
@ -18,8 +18,10 @@ Cropper = wp.media.controller.State.extend({
|
||||
toolbar: 'crop',
|
||||
content: 'crop',
|
||||
router: false,
|
||||
canSkipCrop: false,
|
||||
|
||||
canSkipCrop: false
|
||||
// Default doCrop Ajax arguments to allow the Customizer (for example) to inject state.
|
||||
doCropArgs: {}
|
||||
},
|
||||
|
||||
activate: function() {
|
||||
@ -103,11 +105,15 @@ Cropper = wp.media.controller.State.extend({
|
||||
},
|
||||
|
||||
doCrop: function( attachment ) {
|
||||
return wp.ajax.post( 'custom-header-crop', {
|
||||
nonce: attachment.get('nonces').edit,
|
||||
id: attachment.get('id'),
|
||||
cropDetails: attachment.get('cropDetails')
|
||||
} );
|
||||
return wp.ajax.post( 'custom-header-crop', _.extend(
|
||||
{},
|
||||
this.defaults.doCropArgs,
|
||||
{
|
||||
nonce: attachment.get( 'nonces' ).edit,
|
||||
id: attachment.get( 'id' ),
|
||||
cropDetails: attachment.get( 'cropDetails' )
|
||||
}
|
||||
) );
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user