is_header_video_active

Modify whether the custom header video is eligible to show on the current page.

Description

apply_filters( 'is_header_video_active', (bool) $show_video ); 

Parameters (1)

0. $show_video (bool)
Whether the custom header video should be shown. Returns the value of the theme setting for the custom-header's video-active-callback.. If no callback is set, the default value is that of is_front_page().

Usage

To run the hook, copy the example below.
  1. $show_video = apply_filters( 'is_header_video_active', $show_video ); 
  2.  
  3. if ( !empty( $show_video ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the is_header_video_active callback 
  2. function filter_is_header_video_active( $show_video ) { 
  3. // make filter magic happen here... 
  4. return $show_video
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'is_header_video_active', 'filter_is_header_video_active', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'is_header_video_active', 'filter_is_header_video_active', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/theme.php  
  1. return apply_filters( 'is_header_video_active', $show_video );