wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
get_header_video_url › WordPress Function
Da4.7.0
Deprecaton/a
› get_header_video_url ( Nessun parametro )
Ritorna: |
|
Definito a: |
|
Codex: |
Retrieves header video URL for custom header.
Uses a local video if present, or falls back to an external video.Funzioni correlate: the_header_video_url, get_header_video_settings, get_header_image, has_header_video, get_header_image_tag
Sorgenti
function get_header_video_url() { $id = absint( get_theme_mod( 'header_video' ) ); if ( $id ) { // Get the file URL from the attachment ID. $url = wp_get_attachment_url( $id ); } else { $url = get_theme_mod( 'external_header_video' ); } /** * Filters the header video URL. * * @since 4.7.3 * * @param string $url Header video URL, if available. */ $url = apply_filters( 'get_header_video_url', $url ); if ( ! $id && ! $url ) { return false; } return sanitize_url( set_url_scheme( $url ) ); }