mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Twenty Fifteen: Use strict comparison in inc/custom-header.php.
Props kapilpaul. See #53359. git-svn-id: https://develop.svn.wordpress.org/trunk@51401 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ec70bebfb4
commit
e618a5b859
@ -58,11 +58,11 @@ add_action( 'after_setup_theme', 'twentyfifteen_custom_header_setup' );
|
||||
function twentyfifteen_hex2rgb( $color ) {
|
||||
$color = trim( $color, '#' );
|
||||
|
||||
if ( strlen( $color ) == 3 ) {
|
||||
if ( strlen( $color ) === 3 ) {
|
||||
$r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) );
|
||||
$g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) );
|
||||
$b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) );
|
||||
} elseif ( strlen( $color ) == 6 ) {
|
||||
} elseif ( strlen( $color ) === 6 ) {
|
||||
$r = hexdec( substr( $color, 0, 2 ) );
|
||||
$g = hexdec( substr( $color, 2, 2 ) );
|
||||
$b = hexdec( substr( $color, 4, 2 ) );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user