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

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

$rel

(string) (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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What are you looking for?