~canonical-sysadmins/wordpress/4.8.3

« back to all changes in this revision

Viewing changes to wp-includes/theme.php

  • Committer: axino
  • Date: 2017-03-07 07:21:12 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: axino@canonical.com-20170307072112-9g3xb2f6bb0skh02
Merge WP4.7.3 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1337
1337
        $id = absint( get_theme_mod( 'header_video' ) );
1338
1338
        $url = esc_url( get_theme_mod( 'external_header_video' ) );
1339
1339
 
1340
 
        if ( ! $id && ! $url ) {
1341
 
                return false;
1342
 
        }
1343
 
 
1344
1340
        if ( $id ) {
1345
1341
                // Get the file URL from the attachment ID.
1346
1342
                $url = wp_get_attachment_url( $id );
1347
1343
        }
1348
1344
 
 
1345
        /**
 
1346
         * Filters the header video URL.
 
1347
         *
 
1348
         * @since 4.7.3
 
1349
         *
 
1350
         * @param string $url Header video URL, if available.
 
1351
         */
 
1352
        $url = apply_filters( 'get_header_video_url', $url );
 
1353
 
 
1354
        if ( ! $id && ! $url ) {
 
1355
                return false;
 
1356
        }
 
1357
 
1349
1358
        return esc_url_raw( set_url_scheme( $url ) );
1350
1359
}
1351
1360