if ( isset( $_POST['removeheader'
] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options'
);
$this->
remove_header_image();
return;
} if ( isset( $_POST['text-color'
] ) && !
isset( $_POST['display-header-text'
] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options'
);
set_theme_mod( 'header_textcolor', 'blank'
);
} elseif ( isset( $_POST['text-color'
] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options'
);
$_POST['text-color'
] =
str_replace( '#', '',
$_POST['text-color'
] );
$color =
preg_replace( '/[^0-9a-fA-F]/', '',
$_POST['text-color'
] );
if ( strlen( $color ) === 6 ||
strlen( $color ) === 3
) { set_theme_mod( 'header_textcolor',
$color );
} elseif ( !
$color ) { set_theme_mod( 'header_textcolor', 'blank'
);
}