Make WordPress Core


Ignore:
Timestamp:
06/11/2012 08:49:45 PM (13 years ago)
Author:
nacin
Message:

Theme Customizer: Remove background_image_thumb when saving settings. fixes #20871.

This prevents the background_image and background_image_thumb settings from getting out of sync.
In 3.5 we can consider using background-size on Appearance > Background, eliminating _thumb.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize-setting.php

    r21037 r21053  
    383383 * Results should be properly handled using another setting or callback.
    384384 */
    385 class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
     385final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
    386386    public $id = 'header_image_data';
    387387
     
    400400    }
    401401}
     402
     403final class WP_Customize_Background_Image_Setting extends WP_Customize_Setting {
     404    public $id = 'background_image_thumb';
     405
     406    public function update( $value ) {
     407        remove_theme_mod( 'background_image_thumb' );
     408    }
     409}
Note: See TracChangeset for help on using the changeset viewer.