Functions

Retrieve URL headers and content using WP HTTP Request API.

_fetch_remote_file(string $url, array $headers = "") : \Snoopy
package External
package External
since 1.5.0
subpackage MagpieRSS

Parameters

$url

string

URL to retrieve

$headers

array

Optional. Headers to send to the URL.

Returns

\Snoopystyle response

Retrieve

_response_to_rss(array $resp) : \MagpieRSS | boolean
package External
package External
since 1.5.0
subpackage MagpieRSS

Parameters

$resp

array

Returns

\MagpieRSSboolean

Build Magpie object based on RSS from URL.

fetch_rss(string $url) : boolean | \MagpieRSS
package External
package External
since 1.5.0
subpackage MagpieRSS

Parameters

$url

string

URL to retrieve feed

Returns

boolean\MagpieRSSfalse on failure or MagpieRSS object on success.

Display RSS items in HTML list items.

get_rss(string $url, integer $num_items = 5) : boolean

You have to specify which HTML list you want, either ordered or unordered before using the function. You also have to specify how many items you wish to display. You can't display all of them like you can with wp_rss() function.

package External
package External
since 1.5.0
subpackage MagpieRSS

Parameters

$url

string

URL of feed to display. Will not auto sense feed URL.

$num_items

integer

Optional. Number of items to display, default is all.

Returns

booleanFalse on failure.

Set up constants with default values, unless user overrides.

init() 
package External
package External
since 1.5.0
subpackage MagpieRSS

Display all RSS items in a HTML ordered list.

wp_rss(string $url, integer $num_items = -1
package External
package External
since 1.5.0
subpackage MagpieRSS

Parameters

$url

string

URL of feed to display. Will not auto sense feed URL.

$num_items

integer

Optional. Number of items to display, default is all.