Make WordPress Core


Ignore:
Timestamp:
02/20/2017 06:47:39 AM (8 years ago)
Author:
dd32
Message:

Customize: Introduce get_header_video_url filter for the return value of get_header_video_url().

Props sanket.parmar, celloexpressions, SergeyBiryukov.
Merges [40045], [40086] to the 4.7 branch.
Fixes #39512.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/theme.php

    r39694 r40087  
    13381338    $url = esc_url( get_theme_mod( 'external_header_video' ) );
    13391339
    1340     if ( ! $id && ! $url ) {
    1341         return false;
    1342     }
    1343 
    13441340    if ( $id ) {
    13451341        // Get the file URL from the attachment ID.
    13461342        $url = wp_get_attachment_url( $id );
     1343    }
     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;
    13471356    }
    13481357
Note: See TracChangeset for help on using the changeset viewer.