SimplePie::store_links

Advertisement

Private Access Private Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Summery Summery

Store PubSubHubbub links as headers

Syntax Syntax

SimplePie::store_links( SimplePie_File $file, string $hub, string $self )

Description Description

There is no way to find PuSH links in the body of a microformats feed, so they are added to the headers when found, to be used later by get_links.

Parameters Parameters

$file

(SimplePie_File) (Required)

$hub

(string) (Required)

$self

(string) (Required)

Source Source

File: wp-includes/class-simplepie.php

	private function store_links(&$file, $hub, $self) {
		if (isset($file->headers['link']['hub']) ||
			  (isset($file->headers['link']) &&
			   preg_match('/rel=hub/', $file->headers['link'])))
		{
			return;
		}

		if ($hub)
		{
			if (isset($file->headers['link']))
			{
				if ($file->headers['link'] !== '')
				{
					$file->headers['link'] = ', ';
				}
			}
			else
			{
				$file->headers['link'] = '';
			}
			$file->headers['link'] .= '<'.$hub.'>; rel=hub';
			if ($self)
			{
				$file->headers['link'] .= ', <'.$self.'>; rel=self';
			}
		}
	}

Advertisement

Advertisement

Leave a Reply

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

What are you looking for?