initialize()
mla_attachment_list_shortcode()
mla_gallery_shortcode()
mla_get_shortcode_attachments()
mla_shortcode_query_posts_clauses_filter()
mla_shortcode_query_posts_clauses_request_filter()
mla_shortcode_query_posts_orderby_filter()
mla_shortcode_query_posts_where_filter()
_process_shortcode_parameter()
_sanitize_query_specification()
_validate_sql_orderby()
$mla_debug_messages
$mla_iptc_keys
$data_selection_parameters
$mla_debug
$mla_iptc_descriptions
$mla_iptc_formats
$mla_iptc_image_types
$mla_iptc_records
$query_parameters
Class MLA (Media Library Assistant) Shortcodes defines the shortcodes available to MLA users
package | Media Library Assistant |
---|---|
since | 0.20 |
initialize() : void
since | 0.20 |
---|
mla_gallery_shortcode(array $attr) : string
This is a superset of the WordPress Gallery shortcode for displaying images on a post, page or custom post type. It is adapted from /wp-includes/media.php gallery_shortcode. Enhancements include many additional selection parameters and full taxonomy support.
since | .50 |
---|
array
Attributes of the shortcode.
string
HTML content to display gallery.mla_shortcode_query_posts_clauses_filter(array $pieces) : array
This is for debug purposes only. Defined as public because it's a filter.
since | 1.30 |
---|
array
query clauses before modification
array
query clauses after modification (none)mla_shortcode_query_posts_clauses_request_filter(array $pieces) : array
This is for debug purposes only. Defined as public because it's a filter.
since | 1.30 |
---|
array
query clauses before modification
array
query clauses after modification (none)mla_shortcode_query_posts_orderby_filter(string $orderby_clause) : string
This is an enhanced version of the code found in wp-includes/query.php, function get_posts. Defined as public because it's a filter.
since | 1.20 |
---|
string
query clause before modification
string
query clause after modificationmla_shortcode_query_posts_where_filter(string $where_clause) : string
Captures debug information. Adds whitespace to the post_type = 'attachment' phrase to circumvent subsequent Role Scoper modification of the clause. Handles post_parent "any" and "none" cases. Defined as public because it's a filter.
since | 0.70 |
---|
string
query clause before modification
string
query clause after modification_process_shortcode_parameter(string $text, string $markup_values) : string
since | 1.14 |
---|
string
raw shortcode parameter, e.g., "text {+field+} {brackets} \{braces\}"
string
template substitution values, e.g., ('instance' => '1', ... )
string
query specification with HTML escape sequences and line breaks removed_sanitize_query_specification(string $specification) : string
since | 1.14 |
---|
string
query specification; PHP nested arrays
string
query specification with HTML escape sequences and line breaks removed_validate_sql_orderby(array $query_parameters) : string | bool
Accepts one or more valid columns, with or without ASC/DESC. Enhanced version of /wp-includes/formatting.php function sanitize_sql_orderby().
since | 1.20 |
---|
array
Validated query parameters
string
bool
Returns the orderby clause if present, false otherwise.$mla_iptc_keys : array
This array contains the sanitized names and identifiers of Datasets defined in the "IPTC-NAA Information Interchange Model Version No. 4.1".
since | 0.90 |
---|
$data_selection_parameters : array
since | 1.30 |
---|
$mla_debug : boolean
since | 0.70 |
---|
$mla_iptc_descriptions : array
This array contains the descriptions of Datasets defined in the "IPTC-NAA Information Interchange Model Version No. 4.1".
since | 0.90 |
---|
$mla_iptc_formats : array
This array contains the file format identifiers and descriptions defined in the "IPTC-NAA Information Interchange Model Version No. 4.1" for dataset 1#020.
since | 0.90 |
---|
$mla_iptc_image_types : array
This array contains the image type identifiers and descriptions defined in the "IPTC-NAA Information Interchange Model Version No. 4.1" for dataset 2#130, octet 2.
since | 0.90 |
---|
$mla_iptc_records : array
This array contains the identifiers and names of Datasets defined in the "IPTC-NAA Information Interchange Model Version No. 4.1".
since | 0.90 |
---|
$query_parameters : array
This array defines parameters for the query's where and orderby filters, mla_shortcode_query_posts_where_filter and mla_shortcode_query_posts_orderby_filter. The parameters are set up in the mla_get_shortcode_attachments function, and any further logic required to translate those values is contained in the filter.
Array index values are: orderby, post_parent
since | 1.13 |
---|