Ticket #32783: 32783.2.diff
| File 32783.2.diff, 1.5 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/js/customize-controls.js
2331 2331 api.HeaderTool.UploadsList, 2332 2332 api.HeaderTool.DefaultsList 2333 2333 ]); 2334 2335 //Add extra params to doCrop args for customizer 2336 wp.media.controller.Cropper.prototype.defaults.doCropArgs.wp_customize = 'on'; 2337 wp.media.controller.Cropper.prototype.defaults.doCropArgs.theme = api.settings.theme.stylesheet; 2334 2338 }, 2335 2339 2336 2340 /** -
src/wp-includes/js/media-views.js
283 283 content: 'crop', 284 284 router: false, 285 285 286 canSkipCrop: false 286 canSkipCrop: false, 287 //Default doCrop ajax arguments, which allow other to extend it 288 doCropArgs: {}, 287 289 }, 288 290 289 291 activate: function() { … … 367 369 }, 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 //clone the default args 373 var data = _.clone( this.defaults.doCropArgs ); 374 //Assign crop data 375 data.nonce = attachment.get('nonces').edit; 376 data.id = attachment.get('id'); 377 data.cropDetails = attachment.get('cropDetails'); 378 379 return wp.ajax.post( 'custom-header-crop', data ); 375 380 } 376 381 }); 377 382
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)