Properly set upload context when uploading a background image through the customizer. props kovshenin. fixes #22215.

git-svn-id: https://develop.svn.wordpress.org/trunk@22484 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-09 03:02:54 +00:00
parent eecbac5ca5
commit a4c23b9423
1 changed files with 6 additions and 6 deletions

View File

@ -144,15 +144,15 @@
container: this.container,
browser: this.container.find('.upload'),
dropzone: this.container.find('.upload-dropzone'),
success: this.success
success: this.success,
params: {}
}, this.uploader || {} );
if ( this.uploader.supported ) {
if ( control.params.context )
control.uploader.param( 'post_data[context]', this.params.context );
if ( control.params.context )
control.uploader.params['post_data[context]'] = this.params.context;
control.uploader.param( 'post_data[theme]', api.settings.theme.stylesheet );
}
if ( api.settings.theme.stylesheet )
control.uploader.params['post_data[theme]'] = api.settings.theme.stylesheet;
this.uploader = new wp.Uploader( this.uploader );