SimplePie::__construct

Advertisement

Summery Summery

The SimplePie class contains feed level data and options

Syntax Syntax

SimplePie::__construct()

Description Description

To use SimplePie, create the SimplePie object with no parameters. You can then set configuration options using the provided methods. After setting them, you must initialise the feed using $feed->init(). At that point the object’s methods and properties will be available to you.

Previously, it was possible to pass in the feed URL along with cache options directly into the constructor. This has been removed as of 1.3 as it caused a lot of confusion.

Source Source

File: wp-includes/class-simplepie.php

	/**
	 * @var array Stores the default attributes to be stripped by strip_attributes().
	 * @see SimplePie::strip_attributes()
	 * @access private
	 */
	public $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc');

	/**
	 * @var array Stores the default attributes to add to different tags by add_attributes().
	 * @see SimplePie::add_attributes()
	 * @access private
	 */
	public $add_attributes = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none'));

	/**
	 * @var array Stores the default tags to be stripped by strip_htmltags().
	 * @see SimplePie::strip_htmltags()
	 * @access private
	 */
	public $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style');

	/**
	 * @var bool Should we throw exceptions, or use the old-style error property?
	 * @access private
	 */
	public $enable_exceptions = false;

	/**
	 * The SimplePie class contains feed level data and options

Advertisement

Changelog Changelog

Changelog
Version Description
1.0 Introduced.

Advertisement

Leave a Reply