🔥 HOT: Changeset/ - Collection

Changeset 37283


Ignore:
Timestamp:
04/21/2016 07:21:40 PM (10 years ago)
Author:
westonruter
Message:

Customize/Formatting: Move sanitize_hex_color(), sanitize_hex_color_no_hash(), and maybe_hash_hex_color() from class-wp-customize-manager.php into formatting.php.

Adds missing braces.

See #33413.
Props downstairsdev, tollmanz.
Fixes #27583.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r37197 r37283  
    22372237    }
    22382238}
    2239 
    2240 /**
    2241  * Sanitizes a hex color.
    2242  *
    2243  * Returns either '', a 3 or 6 digit hex color (with #), or nothing.
    2244  * For sanitizing values without a #, see sanitize_hex_color_no_hash().
    2245  *
    2246  * @since 3.4.0
    2247  *
    2248  * @param string $color
    2249  * @return string|void
    2250  */
    2251 function sanitize_hex_color( $color ) {
    2252     if ( '' === $color )
    2253         return '';
    2254 
    2255     // 3 or 6 hex digits, or the empty string.