Properties

$version

$version : string

Type

string — Class version.

$domain

$domain : string

Type

string — Class text domain.

$url

$url : string

Type

string — fluent url.

$args

$args : array

Type

array — Class args to be run attached after <code>parse_args</code>.

$assets_loaded

$assets_loaded : bool

Type

bool — determine if the assets have been loaded via shortcodes.

Methods

__construct()

__construct() : \none

Add shortcodes and register assets

Returns

\none

register_assets()

register_assets() : \none

Register asset urls and add dynamic inline styles

Returns

\none

shortcode()

shortcode( $atts,  $content) : \none

Main shortcode function, displays the contents and content.

Parameters

$atts
$content

Returns

\none

contents()

contents( $atts,  $content) : \none

Contents list shortcode, contains mpdf markup

Parameters

$atts
$content

Returns

\none

content()

content( $atts,  $content) : \none

Content shortcode, contains mpdf markup

Parameters

$atts
$content

Returns

\none

online()

online( $atts,  $content) : \none

Conditionallu displays content online

Parameters

$atts
$content

Returns

\none

offline()

offline( $atts,  $content) : \none

Conditionallu displays content offline

Parameters

$atts
$content

Returns

\none

page_break()

page_break( $atts,  $content)

Parameters

$atts
$content

parse_args()

parse_args(array $a, array $b, string $filter) : array

Recursive array merging from a default and supplied array.

Very similar function to wp_parse_args except it filters through the whole array tree.

Parameters

array $a

supplied value array.

array $b

default value array.

string $filter

optionally run the array through apply_filters before returning.

Returns

array

provide()

provide(string $key) : array

The provide function is just a shorthand wrapper for suppling a class object and method as array in WordPress actions and filters.

Parameters

string $key

the method name to be added to the array: array( &$this, $key ).

Returns

array

random_string()

random_string(string $length) : string

Helper function used inside the <code>guid()</code> function to generate random strings.

Parameters

string $length

the number of characters to return.

Returns

string

guid()

guid() : string

Guid function used to reformat array index values before sedning them to the fields.

Simply replicates the behaviour found in framework javascript.

Returns

string

maybe_enqueue_assets()

maybe_enqueue_assets() : \none

Conditionally enqueue assets if they havent already been.

Returns

\none

sub_articles_contents()

sub_articles_contents( $mainlink,  $key,  $article)

Parameters

$mainlink
$key
$article

sub_articles()

sub_articles( $mainlink,  $key,  $parent,  $level)

Parameters

$mainlink
$key
$parent
$level

default_args()

default_args() : array

Function used across extended classes used in conjunction with <code>parse_args</code> to format supplied arrays and ensure all keys are supplied.

Returns

array