函数原型
has_custom_header(): bool
函数描述
Checks whether a custom header is set or not.
是否弃用
未弃用
函数参数
无
函数返回值
bool True if a custom header is set. False if not.
函数位置
File: wp-includes/theme.php.
函数源码
function has_custom_header() {
if ( has_header_image() || ( has_header_video() && is_header_video_active() ) ) {
return true;
}
return false;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |

