Changeset 36866
- Timestamp:
- 03/06/2016 01:44:53 AM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r36851 r36866 2347 2347 api.HeaderTool.DefaultsList 2348 2348 ]); 2349 2350 // Ensure custom-header-crop Ajax requests bootstrap the Customizer to activate the previewed theme. 2351 wp.media.controller.Cropper.prototype.defaults.doCropArgs.wp_customize = 'on'; 2352 wp.media.controller.Cropper.prototype.defaults.doCropArgs.theme = api.settings.theme.stylesheet; 2349 2353 }, 2350 2354 -
trunk/src/wp-includes/js/media-views.js
r36575 r36866 283 283 content: 'crop', 284 284 router: false, 285 286 canSkipCrop: false 285 canSkipCrop: false, 286 287 // Default doCrop Ajax arguments to allow the Customizer (for example) to inject state. 288 doCropArgs: {} 287 289 }, 288 290 … … 368 370 369 371 doCrop: function( attachment ) { 370 return wp.ajax.post( 'custom-header-crop', { 371 nonce: attachment.get('nonces').edit, 372 id: attachment.get('id'), 373 cropDetails: attachment.get('cropDetails') 374 } ); 372 return wp.ajax.post( 'custom-header-crop', _.extend( 373 {}, 374 this.defaults.doCropArgs, 375 { 376 nonce: attachment.get( 'nonces' ).edit, 377 id: attachment.get( 'id' ), 378 cropDetails: attachment.get( 'cropDetails' ) 379 } 380 ) ); 375 381 } 376 382 });
Note: See TracChangeset
for help on using the changeset viewer.