Constants

VERSION

VERSION

Plugin version.

Properties

$streams

$streams : object

Streams cache.

Type

object

$plugin_slug

$plugin_slug : string

Unique plugin identifier.

Type

string

$post_type_slug

$post_type_slug : string

Unique identifier for the stream post type.

This needs to avoid conflicting with other plugins.

Type

string

$instance

$instance : object

Instance of this class.

Type

object

Methods

get_plugin_slug()

get_plugin_slug() : \Plugin

Return the plugin slug.

Returns

\Plugin —

slug variable.

get_post_type_slug()

get_post_type_slug() : \Post

Return the post type slug.

Returns

\Post —

type slug variable.

get_instance()

get_instance() : object

Return an instance of this class.

Returns

object —

A single instance of this class.

check_dependencies()

check_dependencies() : boolean

Ensure that Timber is loaded. Depending on the order that the plugins are activated, Timber may be loaded after the Stream Manager and needs to be loaded manually.

Returns

boolean —

True if dependencies are met, false if not

define_post_types()

define_post_types() 

Create the Stream post type, add to admin

define_post_type_messages()

define_post_type_messages(  $messages) 

Add Stream post type messages.

Parameters

$messages

get_streams()

get_streams(  $query = array(),   $PostClass = 'TimberStream') : array

Retrieve all streams from the database.

Parameters

$query
$PostClass

Returns

array —

Collection of TimberStream objects

add_timber_filters_functions()

add_timber_filters_functions(  $twig) 

Parameters

$twig

__construct()

__construct() 

Initialize the plugin