is_header_video_active хук-фильтрWP 4.7.0

Filters whether the custom header video is eligible to show on the current page.

Использование

add_filter( 'is_header_video_active', 'wp_kama_is_header_video_active_filter' );

/**
 * Function for `is_header_video_active` filter-hook.
 * 
 * @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 bool
 */
function wp_kama_is_header_video_active_filter( $show_video ){

	// filter...
	return $show_video;
}
$show_video(true|false)
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().

Список изменений

С версии 4.7.0 Введена.

Где вызывается хук

is_header_video_active()
is_header_video_active
wp-includes/theme.php 1710
return apply_filters( 'is_header_video_active', $show_video );

Где используется хук в WordPress

Использование не найдено.