has_header_video() WP 1.0
Check whether a header video is set or not.
Works based on: get_header_video_url()
Basis of: has_custom_header()
1 time = 0.000058s = very fast | 50000 times = 0.70s = very fast | PHP 7.1.1, WP 4.7.1
No Hooks.
Return
true/false. Whether a header video is set or not.
Usage
has_header_video();
Notes
- See: get_header_video_url()
Changelog
Since 4.7.0 | Introduced. |
Code of has_header_video() has header video WP 5.6
function has_header_video() {
return (bool) get_header_video_url();
}Related Functions
From tag: custom_header (theme options: video color image)
More from category: Other Theme Functions
- add_theme_support()
- bloginfo()
- body_class()
- current_theme_supports()
- get_custom_logo()
- get_page_templates()
- get_post_class()
- get_query_template()
- get_stylesheet()
- get_template()
- get_theme_mod()
- get_theme_mods()
- get_theme_root()
- has_custom_logo()