函数文档

header_textcolor()

💡 云策文档标注

概述

header_textcolor() 函数用于在 WordPress 主题中输出自定义标题文本颜色,以 3 位或 6 位十六进制格式(不带 # 符号)显示。

关键要点

  • 函数直接调用 get_header_textcolor() 来获取颜色值并输出。
  • 颜色格式为十六进制,省略前导的 # 符号,适用于主题开发中的样式设置。
  • 该函数自 WordPress 2.1.0 版本引入,位于 wp-includes/theme.php 文件中。

📄 原文内容

Displays the custom header text color in 3- or 6-digit hexadecimal form (minus the hash symbol).

Source

function header_textcolor() {
	echo get_header_textcolor();
}

Changelog

Version Description
2.1.0 Introduced.