Make WordPress Core

Ticket #38558: 38558.diff

File 38558.diff, 1.2 KB (added by bradyvercher, 8 years ago)
  • src/wp-includes/js/customize-models.js

     
    3838                hide: function() {
    3939                        this.set('choice', '');
    4040                        api('header_image').set('remove-header');
    41                         api('header_image_data').set('remove-header');
     41                        api('header_image_data').set('');
    4242                },
    4343
    4444                destroy: function() {
     
    6464                save: function() {
    6565                        if (this.get('random')) {
    6666                                api('header_image').set(this.get('header').random);
    67                                 api('header_image_data').set(this.get('header').random);
     67                                api('header_image_data').set('');
    6868                        } else {
    69                                 if (this.get('header').defaultName) {
    70                                         api('header_image').set(this.get('header').url);
    71                                         api('header_image_data').set(this.get('header').defaultName);
    72                                 } else {
    73                                         api('header_image').set(this.get('header').url);
    74                                         api('header_image_data').set(this.get('header'));
    75                                 }
     69                                api('header_image').set(this.get('header').url);
     70                                api('header_image_data').set(this.get('header'));
    7671                        }
    7772
    7873                        api.HeaderTool.combinedList.trigger('control:setImage', this);