SimplePie::get_link()publicWP 1.0

Get a single link for the feed

Метод класса: SimplePie{}

Хуков нет.

Возвращает

Строку|null. Link URL

Использование

$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(строка)
The relationship of the link to return
По умолчанию: 'alternate'

Список изменений

С версии 1.0 Введена.
С версии 1.0 (previously called get_feed_link since Preview Release, get_feed_permalink() since 0.8)

Код SimplePie::get_link() 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;
}