WordPress.org

Make WordPress Core

Ticket #39512: 39512.diff

File 39512.diff, 640 bytes (added by sanket.parmar, 3 years ago)

Adding a has_header_video filter.

  • src/wp-includes/theme.php

     
    13221322 * @return bool Whether a header video is set or not.
    13231323 */
    13241324function has_header_video() {
    1325         return (bool) get_header_video_url();
     1325        $has_header_video = (bool) get_header_video_url();
     1326
     1327        /**
     1328         * Modify whether a header video is set or not.
     1329         *
     1330         * @since 4.7.2
     1331         *
     1332         * @param bool $has_header_video Whether a header video is set or not.
     1333         */
     1334        return apply_filters( 'has_header_video', $has_header_video );
    13261335}
    13271336
    13281337/**