Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: header_video_settings

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1389           ),
1390      );
1391
1392      if ( preg_match( '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#', $video_url ) ) {
1393           $settings['mimeType'] = 'video/x-youtube';
1394      } elseif ( ! empty( $video_type['type'] ) ) {
1395           $settings['mimeType'] = $video_type['type'];
1396      }
1397
1398      return apply_filters( 'header_video_settings', $settings );
1399 }
1400
1401 /**
1402  * Check whether a custom header is set or not.
1403  *
1404  * @since 4.7.0
1405  *
1406  * @return bool True if a custom header is set. False if not.
1407  */