WordPress.org

Make WordPress Core

Changeset 22484


Ignore:
Timestamp:
11/09/2012 03:02:54 AM (6 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/customize-controls.js

    r22400 r22484  
    145145                browser:   this.container.find('.upload'),
    146146                dropzone:  this.container.find('.upload-dropzone'),
    147                 success:   this.success
     147                success:   this.success,
     148                params:    {}
    148149            }, this.uploader || {} );
    149150
    150             if ( this.uploader.supported ) {
    151                 if ( control.params.context )
    152                     control.uploader.param( 'post_data[context]', this.params.context );
    153 
    154                 control.uploader.param( 'post_data[theme]', api.settings.theme.stylesheet );
    155             }
     151            if ( control.params.context )
     152                control.uploader.params['post_data[context]'] = this.params.context;
     153
     154            if ( api.settings.theme.stylesheet )
     155                control.uploader.params['post_data[theme]'] = api.settings.theme.stylesheet;
    156156
    157157            this.uploader = new wp.Uploader( this.uploader );
Note: See TracChangeset for help on using the changeset viewer.