Class MLA (Media Library Assistant) Core is the minimum support required for all other MLA features
|
package
|
Media Library Assistant
|
|
since
|
2.20
|
Methods
Write a debug message to the appropriate log file
_debug_log(string $message)
static
Arguments
$message
stringMessage text
Set MLA-specific inline editing strategy
add_editing_strategy(\ACP_Editing_Model $model)
static
Arguments
$model
\ACP_Editing_Model
Define the Media/Assistant submenu screen to the (old) Admin Columns plugin
admin_columns_support_deprecated(array $storage_models, object $cpac)
static
Arguments
$storage_models
arrayList of storage model class instances ( [key] => [CPAC_Storage_Model object] )
$cpac
objectCPAC, the root CodePress Admin Columns object
Initialization function, similar to __construct()
initialize() : void
static
Evaluate support information for custom field mapping
mla_custom_field_support( $support_type = 'default_columns') : array
static
Arguments
Response
arraydefault, hidden, sortable quick_edit or bulk_edit colums in appropriate format
Add a debug message to the collection
mla_debug_add(string $message, integer $debug_level = NULL)
static
Arguments
$message
stringMessage text
$debug_level
integerOptional. Debug category.
Get debug information without clearing the buffer
mla_debug_content(string $format = 'string', string $glue = '<p>') : boolean
static
Arguments
$format
stringReturn data type: 'string' (default) or 'array'
$glue
stringJoin array elements with '\n' or '
' (default)
Response
booleantrue if success else false
Get/Set debug information collection output file for mode = 'log'
mla_debug_file(string $file = NULL) : string
static
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.
Arguments
$file
stringOptional. The (optional path and) file name, relative to WP_CONTENT_DIR,
or false/empty string to clear the value.
Response
stringThe previous file value, i.e., before the update, relative to WP_CONTENT_DIR
Flush debug information and clear buffer
mla_debug_flush(string $destination = 'buffer', boolean $stop_collecting = true) : string
static
Arguments
$destination
stringDestination: 'buffer' (default), 'console', 'log' or 'none'
$stop_collecting
booleantrue (default) to stop, false to continue collection
Response
stringdebug content if $destination == 'buffer' else empty string
Get/Set debug information collection mode
mla_debug_mode(string $mode = false) : string
static
Arguments
$mode
stringOptional. New collection mode: 'none' (default), 'buffer', 'console' or 'log'
Response
stringThe previous mode value, i.e., before the update
Delete the stored value of a defined MLA option
mla_delete_option( $option, &$option_table = NULL) : boolean
static
Arguments
Response
booleanTrue if the option was deleted, otherwise false
Return the stored value or default value of a defined MLA option
mla_get_option( $option, $get_default = false, $get_stored = false, &$option_table = NULL) : mixed
static
Arguments
Response
mixedValue(s) for the option or false if the option is not a defined MLA option
Initialize "tax_checked_on_top" => "checked" default for all supported taxonomies
mla_initialize_tax_checked_on_top() : void
static
Called after all taxonomies are registered, e.g., in MLAObjects::_build_taxonomies.
Load an HTML template from a file
mla_load_template( $source, $type = 'file') : string|array|false|NULL
static
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.
Arguments
Response
string|array|false|NULLstring 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.
Analyze a Library View/Post MIME Type specification, returning an array of the placeholders it contains
mla_parse_view_specification( $specification) : array
static
Arguments
Response
array( ['prefix'] => string, ['name'] => string, ['value'] => string, ['option'] => string, optional ['error'] => string )
Load a plugin text domain and alternate debug file
mla_plugins_loaded_action() : void
static
The "add_action" for this function is in mla-plugin-loader.php, because the "initialize"
function above doesn't run in time.
Defined as public because it's an action.
Add the WPML suppress All languages filter
mla_plugins_loaded_action_wpml() : void
static
The "add_action" for this function is in mla-plugin-loader.php, because the "initialize"
function above doesn't run in time.
Defined as public because it's an action.
Convert a Library View/Post MIME Type specification to WP_Query parameters
mla_prepare_view_query( $slug, $specification) : array
static
Arguments
Response
arraypost_mime_type specification or custom field query
Returns an array of taxonomy names assigned to $support_type
mla_supported_taxonomies( $support_type = 'support') : array|string
static
Arguments
Response
array|stringarray taxonomies assigned to $support_type; can be empty.
string if $support_type is 'metakey', returns the custom field to filter by.
Determine MLA support for a taxonomy, handling the special case where the
settings are being updated or reset.
mla_taxonomy_support( $tax_name, $support_type = 'support') : boolean|string
static
Arguments
Response
boolean|stringtrue 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.
Add or update the stored value of a defined MLA option
mla_update_option( $option, $newvalue, &$option_table = NULL) : boolean
static
Arguments
Response
booleanTrue if the value was changed or false if the update failed
Filter the redirect location.
mla_wp_redirect_filter(string $location, integer $status)
static
Arguments
$location
stringThe path to redirect to.
$status
integerStatus code to use.
Create and register MLA-specific list screen handler for Admin Columns
register_list_screen()
static
Restores All languages view to Media/Assistant submenu screen
wpml_unset_lang_admin_bar( $suppress_all_languages)
static
Constants
Current version number (moved from class-mla-main.php)
CURRENT_MLA_VERSION
Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)
STYLESHEET_SLUG
Constant to log "any" debug activity
MLA_DEBUG_CATEGORY_ANY
Constant to log Ajax debug activity
MLA_DEBUG_CATEGORY_AJAX
Constant to log WPML/Polylang action/filter activity
MLA_DEBUG_CATEGORY_LANGUAGE
Constant to log Ghostscript/Imagick activity
MLA_DEBUG_CATEGORY_THUMBNAIL
Slug for adding plugin submenu
ADMIN_PAGE_SLUG
mla_admin_action value to display a single item for editing/viewing
MLA_ADMIN_SINGLE_EDIT_DISPLAY
mla_admin_action value to install an example plugin
MLA_ADMIN_SINGLE_EDIT_INSTALL
mla_admin_action value for updating a single item
MLA_ADMIN_SINGLE_EDIT_UPDATE
mla_admin_action value for mapping Custom Field metadata
MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP
mla_admin_action value for purging Custom Field values
MLA_ADMIN_SINGLE_CUSTOM_FIELD_PURGE
mla_admin_action value for mapping IPTC/EXIF metadata
MLA_ADMIN_SINGLE_MAP
mla_admin_action value for purging IPTC/EXIF metadata
MLA_ADMIN_SINGLE_PURGE
mla_admin_action value for setting an item's parent object
MLA_ADMIN_SET_PARENT
mla_admin_action value for searching taxonomy terms
MLA_ADMIN_TERMS_SEARCH
mla_admin_action value for permanently deleting a single item
MLA_ADMIN_SINGLE_DELETE
mla_admin_action value for moving a single item to the trash
MLA_ADMIN_SINGLE_TRASH
mla_admin_action value for restoring a single item from the trash
MLA_ADMIN_SINGLE_RESTORE
mla_admin_action value for copying a single item
MLA_ADMIN_SINGLE_COPY
mla_admin_action value for copying a single item
MLA_ADMIN_SINGLE_ADD
Action name; gives a context for the nonce
MLA_ADMIN_NONCE_ACTION
Nonce name; uniquely identifies the nonce
MLA_ADMIN_NONCE_NAME
Slug for localizing and enqueueing JavaScript - MLA List Table
JAVASCRIPT_INLINE_EDIT_SLUG
Slug for the "query attachments" action - Add Media and related dialogs
JAVASCRIPT_QUERY_ATTACHMENTS_ACTION
Slug for the "fill compat-attachment-fields" action - Add Media and related dialogs
JAVASCRIPT_FILL_COMPAT_ACTION
Slug for the "update compat-attachment-fields" action - Add Media and related dialogs
JAVASCRIPT_UPDATE_COMPAT_ACTION
Properties
Original PHP error_log path and file
original_php_log : string
static
Original PHP error_reporting value
original_php_reporting : string
static
Option setting for "Featured in" reporting
process_featured_in : boolean
static
This setting is false if the "Featured in" database access setting is "disabled", else true.
Type(s)
boolean
Option setting for "Inserted in" reporting
process_inserted_in : boolean
static
This setting is false if the "Inserted in" database access setting is "disabled", else true.
Type(s)
boolean
Option setting for "Gallery in" reporting
process_gallery_in : boolean
static
This setting is false if the "Gallery in" database access setting is "disabled", else true.
Type(s)
boolean
Option setting for "MLA Gallery in" reporting
process_mla_gallery_in : boolean
static
This setting is false if the "MLA Gallery in" database access setting is "disabled", else true.
Type(s)
boolean
Effective MLA Debug Level, from MLA_DEBUG_LEVEL or override option
mla_debug_level : integer
static
Accumulates debug messages
mla_debug_messages : string
static
Debug information collection mode
mla_debug_mode : string
static
Collection mode: 'buffer', 'console', 'log' or 'none' (default).
Type(s)
string
Debug information output file for mode = 'log'
mla_debug_file : string
static
Admin Columns support storage model object for the Media/Assistant submenu
admin_columns_storage_model : object
static