WordPress at Your Fingertips
function is not described

SimplePie_Item::get_enclosure() public WP 2

Get an enclosure from the item

Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS.

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

No Hooks.




$SimplePie_Item = new SimplePie_Item();
$SimplePie_Item->get_enclosure( $key, $prefer );
The enclosure that you want to return. Remember that arrays begin with 0, not 1
$prefer **
Default: null


Since 2 Introduced.
Since Beta 2

Code of SimplePie_Item::get_enclosure() WP 5.8.2

public function get_enclosure($key = 0, $prefer = null)
	$enclosures = $this->get_enclosures();
	if (isset($enclosures[$key]))
		return $enclosures[$key];

	return null;