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

package Media Library Assistant
since 0.20

 Methods

Initialization function, similar to __construct()

initialize() : void

since 0.20

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

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

Compatibility shim for MLAData_Source::mla_get_data_source.

since 1.70

Parameters

$post_id

integer

post->ID of attachment

$category

string

category/scope to evaluate against: custom_field_mapping or single_attachment_mapping

$data_value

array

data source specification ( name, *data_source, *keep_existing, *format, mla_column, quick_edit, bulk_edit, *meta_name, *option, no_null )

$attachment_metadata

array

(optional) _wp_attachment_metadata, default NULL (use current postmeta database value)

Returns

stringarraydata source value

Parses shortcode parameters and returns the gallery objects

mla_get_shortcode_attachments(int $post_parent, array $attr, boolean $return_found_rows) : array

Compatibility shim for MLAShortcode_Support::mla_get_shortcode_attachments

since .50

Parameters

$post_parent

int

Post ID of the parent

$attr

array

Attributes of the shortcode

$return_found_rows

boolean

true to calculate and return ['found_posts'] as an array element

Returns

arrayList of attachments returned from WP_Query

Retrieve the terms in one or more taxonomies.

mla_get_terms(array $attr) : array

Compatibility shim for MLAShortcode_Support::mla_get_terms

since 1.60

Parameters

$attr

array

taxonomies to search and query parameters

Returns

arrayarray of term objects, empty if none found

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

mla_is_data_source(string $candidate_name) : boolean

Compatibility shim for MLAData_Source::mla_is_data_source.

since 1.80

Parameters

$candidate_name

string

candidate data source name

Returns

booleantrue if candidate name matches a data source

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

mla_no_texturize_shortcodes_filter(array $no_texturize_shortcodes) : array

Defined as public because it's a filter.

since 1.94

Parameters

$no_texturize_shortcodes

array

list of "do not texturize" shortcodes

Returns

arrayupdated list of "do not texturize" shortcodes

The MLA Tag Cloud shortcode.

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

Compatibility shim for MLAShortcode_Support::mla_tag_cloud_shortcode

since 1.60

Parameters

$attr

array

Attributes of the shortcode.

$content

string

Optional content for enclosing shortcodes

Returns

stringHTML content to display the tag cloud.

The MLA Term List shortcode.

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

Compatibility shim for MLAShortcode_Support::mla_term_list_shortcode

since 2.25

Parameters

$attr

array

Attributes of the shortcode.

$content

string

Optional content for enclosing shortcodes

Returns

stringHTML content to display the tag cloud.

 Properties