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 #

 <?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
);