wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
is_header_video_active › WordPress Function
Seit4.7.0
Veraltetn/v
› is_header_video_active ( Keine Parameter )
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Checks whether the custom header video is eligible to show on the current page.
Ähnliche Funktionen: has_header_video, get_header_video_settings, the_header_video_url, get_header_video_url, has_header_image
Quellcode
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 ); }