WordPress.org

Make WordPress Core

Changeset 40045


Ignore:
Timestamp:
02/06/2017 02:51:20 AM (3 years ago)
Author:
SergeyBiryukov
Message:

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

Props sanket.parmar, celloexpressions.
Fixes #39512.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r39888 r40045  
    13391339    $url = esc_url( get_theme_mod( 'external_header_video' ) );
    13401340
    1341     if ( ! $id && ! $url ) {
    1342         return false;
    1343     }
    1344 
    13451341    if ( $id ) {
    13461342        // Get the file URL from the attachment ID.
    13471343        $url = wp_get_attachment_url( $id );
     1344    }
     1345
     1346    /**
     1347     * Filters the header video URL.
     1348     *
     1349     * @since 4.8.0
     1350     *
     1351     * @param string $url Header video URL, if available.
     1352     */
     1353    $url = apply_filters( 'get_header_video_url', $url );
     1354
     1355    if ( ! $id && ! $url ) {
     1356        return false;
    13481357    }
    13491358
Note: See TracChangeset for help on using the changeset viewer.