apply_filters( 'learndash_responsive_video', boolean $is_responsive, string|false $post_type, int|false $post_id )
Filters whether to make videos responsive or not.
Description #
Parameters #
- $is_responsive
-
(boolean) Whether to make videos responsive.
- $post_type
-
(string|false) Post Type slug.
- $post_id
-
(int|false) Post ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_responsive_video filter.
*/
add_filter(
'learndash_responsive_video',
function( $is_responsive, $post_type, $post_id ) {
// May add any custom logic using $is_responsive, $post_type, $post_id.
// Always return $is_responsive.
return $is_responsive;
},
10,
3
);