video_runtime_to_seconds( int $post_ID )


Parameters

$post_ID

(int) (Required)


Return

(float|int) Get runtime format to seconds video length


Source

File: includes/core-functions.php

	function video_runtime_to_seconds($post_ID = 0)
	{
		$post_ID = dozent_get_post_id($post_ID);

		if ($post_ID) {
			$runtime = dozent_get_video($post_ID, 'runtime');

			$hours = (int) dozent_array_get('hours', $runtime) * 3600;
			$mins = (int) dozent_array_get('mins', $runtime) * 60;
			$secs = (int) dozent_array_get('secs', $runtime);

			return $hours + $mins + $secs;
		}

		return 0;
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.