diff --git a/wp-includes/theme.php b/wp-includes/theme.php index da7fd65548..bc4e57f61c 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1338,15 +1338,24 @@ function get_header_video_url() { $id = absint( get_theme_mod( 'header_video' ) ); $url = esc_url( get_theme_mod( 'external_header_video' ) ); - if ( ! $id && ! $url ) { - return false; - } - if ( $id ) { // Get the file URL from the attachment ID. $url = wp_get_attachment_url( $id ); } + /** + * Filters the header video URL. + * + * @since 4.8.0 + * + * @param string $url Header video URL, if available. + */ + $url = apply_filters( 'get_header_video_url', $url ); + + if ( ! $id && ! $url ) { + return false; + } + return esc_url_raw( set_url_scheme( $url ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index d9a67acb9d..56905e4d60 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40044'; +$wp_version = '4.8-alpha-40045'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.