Make WordPress Core

Ticket #28687: 28687.diff

File 28687.diff, 681 bytes (added by slobodanmanic, 12 years ago)
  • custom-background.php

     
    204204                        set_theme_mod('background_attachment', $attachment);
    205205                }
    206206
    207                 if ( isset($_POST['background-color']) ) {
    208                         check_admin_referer('custom-background');
    209                         $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['background-color']);
     207                if ( get_theme_support( 'custom-background', 'default-color' ) == $color ) {
     208                        remove_theme_mod( 'background_color' );
     209                } else {
    210210                        if ( strlen($color) == 6 || strlen($color) == 3 )
    211211                                set_theme_mod('background_color', $color);
    212212                        else