WordPress at Your Fingertips
function is not described

SimplePie_Enclosure::get_duration() public WP 1.0

Get the duration of the enclosure

{} It's a method of the class: SimplePie_Enclosure{}

No Hooks.


String|Int|null. 'hh:mm:ss' string if $convert was specified, otherwise integer (or null if none found)


$SimplePie_Enclosure = new SimplePie_Enclosure();
$SimplePie_Enclosure->get_duration( $convert );
Convert seconds into hh:mm:ss
Default: false

Code of SimplePie_Enclosure::get_duration() WP 5.9

public function get_duration($convert = false)
	if ($this->duration !== null)
		if ($convert)
			$time = SimplePie_Misc::time_hms($this->duration);
			return $time;

		return $this->duration;

	return null;