is_header_video_active
Filter HookDescription
Filters whether the custom header video is eligible to show on the current page.Hook Information
File Location |
wp-includes/theme.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1784 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$show_video
|
Whether the custom header video should be shown. Returns the value of the theme setting for the `custom-header`'s `video-active-callback`. If no callback is set, the default value is that of `is_front_page()`. |
Usage Examples
Basic Usage
<?php
// Hook into is_header_video_active
add_filter('is_header_video_active', 'my_custom_filter', 10, 1);
function my_custom_filter($show_video) {
// Your custom filtering logic here
return $show_video;
}
Source Code Context
wp-includes/theme.php:1784
- How this hook is used in WordPress core
<?php
1779 *
1780 * @param bool $show_video Whether the custom header video should be shown. Returns the value
1781 * of the theme setting for the `custom-header`'s `video-active-callback`.
1782 * If no callback is set, the default value is that of `is_front_page()`.
1783 */
1784 return apply_filters( 'is_header_video_active', $show_video );
1785 }
1786
1787 /**
1788 * Retrieves the markup for a custom header.
1789 *
PHP Documentation
<?php
/**
* Filters whether the custom header video is eligible to show on the current page.
*
* @since 4.7.0
*
* @param bool $show_video Whether the custom header video should be shown. Returns the value
* of the theme setting for the `custom-header`'s `video-active-callback`.
* If no callback is set, the default value is that of `is_front_page()`.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/theme.php
Related Hooks
Related hooks will be displayed here in future updates.