Browse: Home / Hooks /

learndash_lesson_video_data

apply_filters( 'learndash_lesson_video_data',  array $video_data,  array $settings )

Filters content video data.


Description #


Parameters #

$video_data

(array) An array of video data.

$settings

(array) An array of LearnDash settings for a post.


Source #

File: includes/course/ld-course-video.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for learndash_lesson_video_data filter.
 */
add_filter(
	'learndash_lesson_video_data',
	function( $video_data, $settings ) {
		// Turn off auto-play for mobile devices
		if ( wp_is_mobile() ) {
			$video_data['videos_auto_start'] = false;
		}

		return $video_data;
	},
	10,
	2
);