SimplePie_Item::get_link

Advertisement

Summery Summery

Get a single link for the item

Syntax Syntax

SimplePie_Item::get_link( int $key, string $rel = 'alternate' )

Parameters Parameters

$key

(Required) The link that you want to return. Remember that arrays begin with 0, not 1

$rel

(Optional) The relationship of the link to return

Default value: 'alternate'

Return Return

(string|null) Link URL

Source Source

File: wp-includes/SimplePie/Item.php

	 * @since Beta 3
	 * @param int $key The link that you want to return.  Remember that arrays begin with 0, not 1
	 * @param string $rel The relationship of the link to return
	 * @return string|null Link URL
	 */
	public function get_link($key = 0, $rel = 'alternate')
	{
		$links = $this->get_links($rel);
		if ($links && $links[$key] !== null)
		{
			return $links[$key];
		}

Advertisement

Changelog Changelog

Changelog
Version Description
Beta 3 Introduced.

Advertisement

Leave a Reply