SimplePie::get_link()publicWP 1.0

Get a single link for the feed

Method of the class: SimplePie{}

No Hooks.

Return

String|null. Link URL

Usage

$SimplePie = new SimplePie();
$SimplePie->get_link( $key, $rel );
$key(int)
The link that you want to return. Remember that arrays begin with 0, not 1
$rel(string)
The relationship of the link to return
Default: 'alternate'

Changelog

Since 1.0 Introduced.
Since 1.0 (previously called get_feed_link since Preview Release, get_feed_permalink() since 0.8)

SimplePie::get_link() code WP 6.5.2

public function get_link($key = 0, $rel = 'alternate')
{
	$links = $this->get_links($rel);
	if (isset($links[$key]))
	{
		return $links[$key];
	}

	return null;
}