RSS
in package
Site RSS functionality.
Tags
Table of Contents
Constants
- BACKLINK_CONTAINER = 'rss-backlink.php'
- The backlink container partial filename.
- IMAGE_CONTAINER = 'rss-image.php'
- Image content html.
- IMAGE_SIZE = 'medium'
- Default image size to use in feed.
Properties
- $backlink_container : string
- The fully qualified path to the backlink container partial.
- $image_container : string
- The fully qualified path to the featured image container partial.
- $instances : array<string|int, object>
- The array of instances of this class and sub-classes.
- $site_name : string
- Site name.
- $site_url : string
- Site url.
Methods
- add_media_thumbnail() : void
- Add featured image to RSS2 feed items as media:thumbnail meta data.
- append_backlink() : string
- Append backlink to feed contents - not excerpts.
- disable_comments_feed() : bool
- Disable comment feeds.
- do_custom_feed() : void
- Callback to render custom RSS2 feeds.
- get_instance() : object
- Creates and/or returns the instance of this class.
- prepend_featured_image() : string
- Prepend featured image to feed contents and excepts.
- __construct() : void
- Initialise the class.
Constants
BACKLINK_CONTAINER
The backlink container partial filename.
protected
string
BACKLINK_CONTAINER
= 'rss-backlink.php'
This contains the text to be appended to an RSS entry with a backlink to the site home page.
Tags
IMAGE_CONTAINER
Image content html.
protected
string
IMAGE_CONTAINER
= 'rss-image.php'
This contains the markup for the featured image to be prepended to an RSS entry.
Tags
IMAGE_SIZE
Default image size to use in feed.
protected
string
IMAGE_SIZE
= 'medium'
Tags
Properties
$backlink_container
The fully qualified path to the backlink container partial.
protected
string
$backlink_container
= ''
Tags
$image_container
The fully qualified path to the featured image container partial.
protected
string
$image_container
= ''
Tags
$instances
The array of instances of this class and sub-classes.
protected
static array<string|int, object>
$instances
= array()
Tags
$site_name
Site name.
protected
string
$site_name
= ''
Used to create feed title.
Tags
$site_url
Site url.
protected
string
$site_url
= ''
Used to set backlink in feed items.
Tags
Methods
add_media_thumbnail()
Add featured image to RSS2 feed items as media:thumbnail meta data.
public
add_media_thumbnail() : void
Tags
append_backlink()
Append backlink to feed contents - not excerpts.
public
append_backlink(string $content) : string
Parameters
- $content : string
-
The feed content.
Tags
Return values
string —The content with appended backlink info.
disable_comments_feed()
Disable comment feeds.
public
disable_comments_feed(bool $show) : bool
Parameters
- $show : bool
-
Whether to show comment feeds.
Tags
Return values
bool —Always false to disable comment feeds.
do_custom_feed()
Callback to render custom RSS2 feeds.
public
do_custom_feed() : void
Tags
get_instance()
Creates and/or returns the instance of this class.
public
static get_instance() : object
Tags
Return values
object —The instance of this class.
prepend_featured_image()
Prepend featured image to feed contents and excepts.
public
prepend_featured_image(string $content) : string
Parameters
- $content : string
-
The feed content.
Tags
Return values
string —The content with (possibly) prepended image markup.
__construct()
Initialise the class.
protected
__construct() : void