WP_Customize_Manager::_sanitize_header_textcolor( string $color )

Callback for validating the header_textcolor value.


Description Description

Accepts ‘blank’, and otherwise uses sanitize_hex_color_no_hash(). Returns default text color if hex color is empty.


Parameters Parameters

$color

(string) (Required)


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: wp-includes/class-wp-customize-manager.php

	public function _sanitize_header_textcolor( $color ) {
		if ( 'blank' === $color ) {
			return 'blank';
		}

		$color = sanitize_hex_color_no_hash( $color );
		if ( empty( $color ) ) {
			$color = get_theme_support( 'custom-header', 'default-text-color' );
		}

		return $color;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.