Properties

$_shortcode_template_items

$_shortcode_template_items : array

In-memory representation of the template items

Type

array — { Items by ID. Key $$ID is an index number starting with 1. @type array $$ID { Template elements. @type integer $post_ID Template ID; equal to $$ID. @type string $type Template type; style or markup. @type string $shortcode Shortcode slug this template applies to. @type boolean $default True if a default template, false if a custom template. @type string $name Template name/slug. @type array $sections { Template content by section. Key $$section_name is the section name/slug. @type string $$section_name HTML markup/CSS styles for the template section. } @type boolean $changed True if the template has changed since loading. @type boolean $deleted True if the template has been deleted since loading.

$_shortcode_template_highest_ID

$_shortcode_template_highest_ID : integer

Highest existing template ID value

Type

integer

Methods

mla_put_shortcode_template_items()

mla_put_shortcode_template_items() 

Flush the in-memory representation of the templates items to option values

mla_count_template_items()

mla_count_template_items(  $request) : integer

Get the total number of MLA shortcode_template objects

Parameters

$request

Returns

integer —

Number of MLA shortcode_template objects

mla_query_template_items()

mla_query_template_items(  $request,   $offset,   $count) : array

Retrieve MLA shortcode_template objects for list table display

Parameters

$request
$offset
$count

Returns

array —

MLA shortcode_template objects

mla_find_shortcode_template_ID()

mla_find_shortcode_template_ID(string  $type, string  $name) : integer

Find a Shortcode Template ID given its type and name

Parameters

string $type

MLA Shortcode Template type; style or markup.

string $name

MLA Shortcode Template name.

Returns

integer —

Template ID if the template exists else zero (0).

mla_find_shortcode_template()

mla_find_shortcode_template(integer  $ID) : array

Find an Shortcode Template given its ID

Parameters

integer $ID

MLA Shortcode Template ID

Returns

array —

MLA shortcode_template array

mla_update_shortcode_template()

mla_update_shortcode_template(integer  $ID, string  $key, string  $value) : boolean

Update a Shortcode Template field given its ID and key.

Parameters

integer $ID

MLA Shortcode Template ID.

string $key

MLA Shortcode Template property.

string $value

MLA Shortcode Template new value.

Returns

boolean —

true if object exists else false.

mla_replace_shortcode_template()

mla_replace_shortcode_template(array  $value) : boolean

Replace a Shortcode Template given its value array.

Parameters

array $value

MLA Shortcode Template new value.

Returns

boolean —

true if object exists else false.

mla_add_shortcode_template()

mla_add_shortcode_template(array  $value) 

Insert a Shortcode Template given its value array.

Parameters

array $value

MLA Shortcode Template new value.

mla_tabulate_template_items()

mla_tabulate_template_items(  $s = '') : array

Tabulate MLA shortcode_template objects by view for list table display

Parameters

$s

Returns

array —

( 'singular' label, 'plural' label, 'count' of items )

_sort_uname_callback()

_sort_uname_callback(array  $a, array  $b) : integer

Callback to sort array by a 'name' key.

Parameters

array $a

The first array.

array $b

The second array.

Returns

integer —

The comparison result.

_get_shortcode_template_items()

_get_shortcode_template_items(boolean  $force_refresh = false) : boolean

Assemble the in-memory representation of the templates items

Parameters

boolean $force_refresh

Optional. Force a reload of items. Default false.

Returns

boolean —

Success (true) or failure (false) of the operation

_prepare_template_items_query()

_prepare_template_items_query(  $raw_request,   $offset,   $count) : array

Sanitize and expand query arguments from request variables

Parameters

$raw_request
$offset
$count

Returns

array —

revised arguments suitable for query

_execute_template_items_query()

_execute_template_items_query(  $request) : array

Query the plugin_examples items

Parameters

$request

Returns

array —

query results; array of MLA post_mime_type objects