On this page
has_custom_header(): bool
Checks whether a custom header is set or not.
Return
bool True if a custom header is set. False if not.
Source
File: wp-includes/theme.php. View all references
function has_custom_header() {
if ( has_header_image() || ( has_header_video() && is_header_video_active() ) ) {
return true;
}
return false;
}
Related
Uses
| Uses | Description |
|---|---|
| has_header_video() wp-includes/theme.php | Checks whether a header video is set or not. |
| is_header_video_active() wp-includes/theme.php | Checks whether the custom header video is eligible to show on the current page. |
| has_header_image() wp-includes/theme.php | Checks whether a header image is set or not. |
Used By
| Used By | Description |
|---|---|
| get_custom_header_markup() wp-includes/theme.php | Retrieves the markup for a custom header. |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/has_custom_header