is_header_video_active

The timeline below displays how wordpress function is_header_video_active has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.5

/**
 * Checks whether the custom header video is eligible to show on the current page.
 *
 * @since 4.7.0
 *
 * @return bool True if the custom header video should be shown. False if not.
 */
function is_header_video_active()
{
    if (!get_theme_support('custom-header', 'video')) {
        return false;
    }
    $video_active_cb = get_theme_support('custom-header', 'video-active-callback');
    if (empty($video_active_cb) || !is_callable($video_active_cb)) {
        $show_video = true;
    } else {
        $show_video = call_user_func($video_active_cb);
    }
    /**
     * 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()`.
     */
    return apply_filters('is_header_video_active', $show_video);
}

WordPress Version: 4.7

/**
 * Checks whether the custom header video is eligible to show on the current page.
 *
 * @since 4.7.0
 *
 * @return bool True if the custom header video should be shown. False if not.
 */
function is_header_video_active()
{
    if (!get_theme_support('custom-header', 'video')) {
        return false;
    }
    $video_active_cb = get_theme_support('custom-header', 'video-active-callback');
    if (empty($video_active_cb) || !is_callable($video_active_cb)) {
        $show_video = true;
    } else {
        $show_video = call_user_func($video_active_cb);
    }
    /**
     * Modify 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()`.
     */
    return apply_filters('is_header_video_active', $show_video);
}