\MLAShortcodes

Class MLA (Media Library Assistant) Shortcodes defines the shortcodes available to MLA users and loads the support class if the shortcodes are executed.

Summary

Methods
Properties
Constants
initialize()
mla_no_texturize_shortcodes_filter()
mla_gallery_shortcode()
mla_tag_cloud_shortcode()
mla_term_list_shortcode()
mla_get_shortcode_attachments()
mla_get_terms()
mla_get_data_source()
mla_is_data_source()
$mla_gallery_wp_query_object
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$mla_gallery_wp_query_object

$mla_gallery_wp_query_object : object

The WP_Query object used to select items for the gallery.

Defined as a public, static variable so it can be inspected from the "mla_gallery_wp_query_object" action. Set to NULL at all other times.

Type

object

Methods

initialize()

initialize() : void

Initialization function, similar to __construct()

mla_no_texturize_shortcodes_filter()

mla_no_texturize_shortcodes_filter(  $no_texturize_shortcodes) : array

Prevents wptexturizing of the [mla_gallery] shortcode, avoiding a bug in WP 4.0.

Defined as public because it's a filter.

Parameters

$no_texturize_shortcodes

Returns

array —

updated list of "do not texturize" shortcodes

mla_gallery_shortcode()

mla_gallery_shortcode(array  $attr, string  $content = NULL) : string

The MLA Gallery shortcode.

Compatibility shim for MLAShortcode_Support::mla_gallery_shortcode

Parameters

array $attr

Attributes of the shortcode

string $content

Optional content for enclosing shortcodes; used with mla_alt_shortcode

Returns

string —

HTML content to display gallery.

mla_tag_cloud_shortcode()

mla_tag_cloud_shortcode(array  $attr, string  $content = NULL) : string

The MLA Tag Cloud shortcode.

Compatibility shim for MLAShortcode_Support::mla_tag_cloud_shortcode

Parameters

array $attr

Attributes of the shortcode.

string $content

Optional content for enclosing shortcodes

Returns

string —

HTML content to display the tag cloud.

mla_term_list_shortcode()

mla_term_list_shortcode(array  $attr, string  $content = NULL) : string

The MLA Term List shortcode.

Compatibility shim for MLAShortcode_Support::mla_term_list_shortcode

Parameters

array $attr

Attributes of the shortcode.

string $content

Optional content for enclosing shortcodes

Returns

string —

HTML content to display the tag cloud.

mla_get_shortcode_attachments()

mla_get_shortcode_attachments(  $post_parent,   $attr,   $return_found_rows = NULL) : array

Parses shortcode parameters and returns the gallery objects

Compatibility shim for MLAShortcode_Support::mla_get_shortcode_attachments

Parameters

$post_parent
$attr
$return_found_rows

Returns

array —

List of attachments returned from WP_Query

mla_get_terms()

mla_get_terms(  $attr) : array

Retrieve the terms in one or more taxonomies.

Compatibility shim for MLAShortcode_Support::mla_get_terms

Parameters

$attr

Returns

array —

array of term objects, empty if none found

mla_get_data_source()

mla_get_data_source(  $post_id,   $category,   $data_value,   $attachment_metadata = NULL) : string|array

Get IPTC/EXIF or custom field mapping data source; front end posts/pages mode

Compatibility shim for MLAData_Source::mla_get_data_source.

Parameters

$post_id
$category
$data_value
$attachment_metadata

Returns

string|array —

data source value

mla_is_data_source()

mla_is_data_source(  $candidate_name) : boolean

Identify custom field mapping data source; front end posts/pages mode

Compatibility shim for MLAData_Source::mla_is_data_source.

Parameters

$candidate_name

Returns

boolean —

true if candidate name matches a data source