Ticket #22030: 22030.1.2.diff
| File 22030.1.2.diff, 815 bytes (added by obenland, 9 months ago) |
|---|
-
wp-admin/custom-background.php
169 169 if ( isset($_POST['background-color']) ) { 170 170 check_admin_referer('custom-background'); 171 171 $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['background-color']); 172 if ( strlen($color) == 6 || strlen($color) == 3)173 set_theme_mod( 'background_color', $color);172 if ( ( strlen( $color ) == 6 || strlen( $color ) == 3 ) && get_theme_support( 'custom-background', 'default-color' ) != $color ) 173 set_theme_mod( 'background_color', $color ); 174 174 else 175 set_theme_mod('background_color', '');175 remove_theme_mod( 'background_color' ); 176 176 } 177 177 178 178 $this->updated = true;