diff --git a/wp-admin/js/customize-controls.js b/wp-admin/js/customize-controls.js index a1ef1e58eb..60a88c8b6d 100644 --- a/wp-admin/js/customize-controls.js +++ b/wp-admin/js/customize-controls.js @@ -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 );