Make WordPress Core

Changeset 20915


Ignore:
Timestamp:
05/25/2012 08:58:49 PM (12 years ago)
Author:
koopersmith
Message:

Theme Customizer: Allow sanitize_hexcolor to accept the empty string. Fixes default assignment on save and bug where header textcolor would remain hidden if loaded hidden. see #19910.

File:
1 edited

Legend:

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

    r20913 r20915  
    861861    $color = preg_replace( '/[^0-9a-fA-F]/', '', $color );
    862862
    863     // 3 or 6 hex digits.
    864     if ( preg_match('|^([A-Fa-f0-9]{3}){1,2}$|', $color ) )
     863    // 3 or 6 hex digits, or the empty string.
     864    if ( preg_match('|^([A-Fa-f0-9]{3}){0,2}$|', $color ) )
    865865        return $color;
    866866
Note: See TracChangeset for help on using the changeset viewer.