WordPress.org

Make WordPress Core

Ticket #20871: 20871.7.diff

File 20871.7.diff, 1.5 KB (added by nacin, 3 years ago)
  • wp-includes/class-wp-customize-setting.php

     
    382382 * 
    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 
    388388        public function update( $value ) { 
     
    398398                else 
    399399                        $custom_image_header->set_header_image( $value ); 
    400400        } 
    401 } 
    402  No newline at end of file 
     401} 
     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} 
  • wp-includes/class-wp-customize-manager.php

     
    781781                        'theme_supports' => 'custom-background', 
    782782                ) ); 
    783783 
     784                $this->add_setting( new WP_Customize_Background_Image_Setting( $this, 'background_image_thumb', array( 
     785                        'theme_supports' => 'custom-background', 
     786                ) ) ); 
     787 
    784788                $this->add_control( new WP_Customize_Background_Image_Control( $this ) ); 
    785789 
    786790                $this->add_setting( 'background_repeat', array(