Changeset 36931
- Timestamp:
- 03/10/2016 05:41:04 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media/controllers/cropper.js
r33337 r36931 19 19 content: 'crop', 20 20 router: false, 21 canSkipCrop: false, 21 22 22 canSkipCrop: false 23 // Default doCrop Ajax arguments to allow the Customizer (for example) to inject state. 24 doCropArgs: {} 23 25 }, 24 26 … … 104 106 105 107 doCrop: function( attachment ) { 106 return wp.ajax.post( 'custom-header-crop', { 107 nonce: attachment.get('nonces').edit, 108 id: attachment.get('id'), 109 cropDetails: attachment.get('cropDetails') 110 } ); 108 return wp.ajax.post( 'custom-header-crop', _.extend( 109 {}, 110 this.defaults.doCropArgs, 111 { 112 nonce: attachment.get( 'nonces' ).edit, 113 id: attachment.get( 'id' ), 114 cropDetails: attachment.get( 'cropDetails' ) 115 } 116 ) ); 111 117 } 112 118 });
Note: See TracChangeset
for help on using the changeset viewer.