CURRENT_MLA_VERSION
CURRENT_MLA_VERSION
Current version number (moved from class-mla-main.php)
Class MLA (Media Library Assistant) Core is the minimum support required for all other MLA features
mla_get_option( $option, $get_default = false, $get_stored = false, $option_table = NULL) : mixed
Return the stored value or default value of a defined MLA option
$option | ||
$get_default | ||
$get_stored | ||
$option_table |
Value(s) for the option or false if the option is not a defined MLA option
mla_load_template( $source, $type = 'file') : string|array|false|NULL
Load an HTML template from a file
Loads a template to a string or a multi-part template to an array. Multi-part templates are divided by comments of the form , where "key" becomes the key part of the array.
$source | ||
$type |
string for files that do not contain template divider comments, array for files containing template divider comments, false if file or option does not exist, NULL if file could not be loaded.
mla_taxonomy_support( $tax_name, $support_type = 'support') : boolean|string
Determine MLA support for a taxonomy, handling the special case where the settings are being updated or reset.
$tax_name | ||
$support_type |
true if the taxonomy is supported in this way else false. string if $tax_name is '' and $support_type is 'filter', returns the taxonomy to filter by. string if $support_type is 'metakey', returns the custom field to filter by.
mla_supported_taxonomies( $support_type = 'support') : array|string
Returns an array of taxonomy names assigned to $support_type
$support_type |
array taxonomies assigned to $support_type; can be empty. string if $support_type is 'metakey', returns the custom field to filter by.
mla_parse_view_specification( $specification) : array
Analyze a Library View/Post MIME Type specification, returning an array of the placeholders it contains
$specification |
( ['prefix'] => string, ['name'] => string, ['value'] => string, ['option'] => string, optional ['error'] => string )
mla_checklist_meta_box( $target_post, $box) : void
Display taxonomy "checklist" form fields
Adapted from /wp-admin/includes/ajax-actions.php function _wp_ajax_add_hierarchical_term(). Includes the "? Search" area to filter the term checklist by entering part or all of a word/phrase in the term label. Output to the Media/Edit Media screen and to the Media Manager Modal Window.
$target_post | ||
$box |
mla_debug_file(string $file = NULL) : string
Get/Set debug information collection output file for mode = 'log'
Note that WP_CONTENT_DIR will be pre-pended to the value, and a slash will be added to the front of the value if necessary.
string | $file | Optional. The (optional path and) file name, relative to WP_CONTENT_DIR, or false/empty string to clear the value. |
The previous file value, i.e., before the update, relative to WP_CONTENT_DIR
mla_debug_content(string $format = 'string', string $glue = '<p>') : boolean
Get debug information without clearing the buffer
string | $format | Return data type: 'string' (default) or 'array' |
string | $glue | Join array elements with '\n' or ' ' (default) |
true if success else false
mla_debug_flush(string $destination = 'buffer', boolean $stop_collecting = true) : string
Flush debug information and clear buffer
string | $destination | Destination: 'buffer' (default), 'console', 'log' or 'none' |
boolean | $stop_collecting | true (default) to stop, false to continue collection |
debug content if $destination == 'buffer' else empty string
admin_columns_support(array $storage_models, object $cpac)
Define the Media/Assistant submenu screen to the Admin Columns plugin
array | $storage_models | List of storage model class instances ( [key] => [CPAC_Storage_Model object] ) |
object | $cpac | CPAC, the root CodePress Admin Columns object |