浏览代码

Remove reference to HEADER_TEXT constant to meet dotorg theme review standards.

Jeffrey Ong 5 年之前
父节点
当前提交
a0abf4029b
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      canard/inc/custom-header.php

+ 3 - 2
canard/inc/custom-header.php

@@ -33,9 +33,10 @@ if ( ! function_exists( 'canard_header_style' ) ) :
 function canard_header_style() {
 	$header_text_color = get_header_textcolor();
 
+	preg_match( '/^(?:[0-9a-fA-F]{3}){1,2}$/', $header_text_color, $hex_match );
+
 	// If no custom options for text are set, let's bail
-	// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
-	if ( HEADER_TEXTCOLOR == $header_text_color ) {
+	if ( 'blank' !== $header_text_color && count( $hex_match ) === 0 ) {
 		return;
 	}