initialize()
mla_add_attachment_action()
mla_attachment_display_settings_option_handler()
mla_custom_field_option_handler()
mla_custom_field_option_value()
mla_custom_field_support()
mla_delete_option()
mla_evaluate_custom_field_mapping()
mla_evaluate_iptc_exif_mapping()
mla_fetch_gallery_template()
mla_get_data_source()
mla_get_markup_templates()
mla_get_option()
mla_get_style_templates()
mla_iptc_exif_option_handler()
mla_is_data_source()
mla_localize_option_definitions_array()
mla_put_markup_templates()
mla_put_style_templates()
mla_search_option_handler()
mla_supported_taxonomies()
mla_taxonomy_option_handler()
mla_taxonomy_support()
mla_update_attachment_metadata_filter()
mla_update_option()
mla_wp_handle_upload_filter()
mla_wp_handle_upload_prefilter_filter()
_compose_custom_field_option_list()
_compose_data_source_option_list()
_compose_iptc_option_list()
_compose_parent_option_list()
_evaluate_array_result()
_evaluate_data_source()
_evaluate_file_information()
_evaluate_post_information()
_get_custom_field_names()
_load_option_templates()
_update_attachment_metadata()
_update_custom_field_mapping()
_update_iptc_exif_custom_mapping()
_update_iptc_exif_standard_mapping()
_update_iptc_exif_taxonomy_mapping()
$mla_option_definitions
$process_featured_in
$process_gallery_in
$process_inserted_in
$process_mla_gallery_in
$add_attachment_id
$custom_field_data_sources
$mla_option_templates
MLA_COUNT_TERM_ATTACHMENTS
MLA_DEFAULT_ORDER
MLA_DEFAULT_ORDERBY
MLA_EDIT_MEDIA_META_BOXES
MLA_EDIT_MEDIA_SEARCH_TAXONOMY
MLA_ENABLE_MLA_ICONS
MLA_ENABLE_POST_MIME_TYPES
MLA_ENABLE_UPLOAD_MIMES
MLA_EXCLUDE_REVISIONS
MLA_EXIF_SIZE
MLA_FEATURED_IN_TUNING
MLA_GALLERY_IN_TUNING
MLA_INSERTED_IN_TUNING
MLA_MEDIA_GRID_TOOLBAR
MLA_MEDIA_MODAL_DETAILS_AUTOFILL
MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX
MLA_MEDIA_MODAL_DETAILS_TAG_METABOX
MLA_MEDIA_MODAL_MIMETYPES
MLA_MEDIA_MODAL_MONTHS
MLA_MEDIA_MODAL_ORDER
MLA_MEDIA_MODAL_ORDERBY
MLA_MEDIA_MODAL_SEARCHBOX
MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS
MLA_MEDIA_MODAL_TERMS
MLA_MEDIA_MODAL_TERMS_SEARCH
MLA_MEDIA_MODAL_TOOLBAR
MLA_MLA_GALLERY_IN_TUNING
MLA_NEW_CUSTOM_FIELD
MLA_NEW_CUSTOM_RULE
MLA_POST_MIME_TYPES
MLA_SCREEN_DISPLAY_LIBRARY
MLA_SCREEN_MENU_TITLE
MLA_SCREEN_ORDER
MLA_SCREEN_PAGE_TITLE
MLA_SEARCH_MEDIA_FILTER_DEFAULTS
MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS
MLA_TABLE_ICON_SIZE
MLA_TABLE_VIEWS_WIDTH
MLA_TAXONOMY_FILTER_DEPTH
MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN
MLA_TAXONOMY_SUPPORT
MLA_UPLOAD_MIMES
MLA_VERSION_OPTION
Class MLA (Media Library Assistant) Options manages the plugin option settings and provides functions to get and put them from/to WordPress option variables
Separated from class MLASettings in version 1.00
package | Media Library Assistant |
---|---|
since | 1.00 |
initialize() : void
since | 1.00 |
---|
mla_custom_field_option_handler(string $action, string $key, array $value, array $args) : string
since | 1.10 |
---|---|
uses | \global\$mla_option_templates |
string
'render', 'update', 'delete', or 'reset'
string
option name, e.g., 'custom_field_mapping'
array
option parameters
array
Optional. null (default) for 'render' else option data, e.g., $_REQUEST
string
HTML table row markup for 'render' else message(s) reflecting the results of the operation.mla_custom_field_option_value(string $slug) : array
since | 1.10 |
---|
string
slug, e.g., 'c_file-size' for the 'File Size' field
array
option value, e.g., array( 'name' => 'File Size', ... )mla_custom_field_support(string $support_type) : array
since | 1.10 |
---|
string
array format; 'default_columns' (default), 'default_hidden_columns', 'default_sortable_columns', 'quick_edit' or 'bulk_edit'
array
default, hidden, sortable quick_edit or bulk_edit colums in appropriate formatmla_delete_option(string $option) : boolean
since | 0.1 |
---|
string
Name of the desired option
boolean
True if the option was deleted, otherwise falsemla_evaluate_custom_field_mapping(integer $post_id, string $category, array $settings, array $attachment_metadata) : array
since | 1.10 |
---|
integer
post ID to be evaluated
string
category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
array
(optional) custom_field_mapping values, default NULL (use current option value)
array
(optional) attachment_metadata, default NULL (use current postmeta database value)
array
Updates suitable for MLAData::mla_update_single_item, if anymla_evaluate_iptc_exif_mapping(object $post, string $category, array $settings, array $attachment_metadata) : array
since | 1.00 |
---|
object
post object with current values
string
category to evaluate against, e.g., iptc_exif_standard_mapping or iptc_exif_mapping
array
(optional) iptc_exif_mapping values, default - current option value
array
(optional) _wp_attachment_metadata, for MLAOptions::mla_update_attachment_metadata_filter
array
Updates suitable for MLAData::mla_update_single_item, if anymla_fetch_gallery_template(string $key, string $type) : string | boolean | null
since | 0.80 |
---|
string
Template name
string
Template type; 'style' (default) or 'markup'
string
boolean
null
requested template, false if not found or null if no templatesmla_get_data_source(integer $post_id, string $category, array $data_value, array $attachment_metadata) : string | array
Defined as public so MLA Mapping Hooks clients can call it. Isolates clients from changes to _evaluate_data_source().
since | 1.70 |
---|
integer
post->ID of attachment
string
category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
array
data source specification ( name, *data_source, *keep_existing, *format, mla_column, quick_edit, bulk_edit, *meta_name, *option, no_null )
array
(optional) _wp_attachment_metadata, default NULL (use current postmeta database value)
string
array
data source valuemla_get_markup_templates() : array | null
since | 0.80 |
---|
array
null
name => value for all markup templates or null if no templatesmla_get_option(string $option, boolean $get_default, boolean $get_stored) : mixed
since | 0.1 |
---|
string
Name of the desired option
boolean
True to ignore current setting and return default values
boolean
True to ignore default values and return only stored values
mixed
Value(s) for the option or false if the option is not a defined MLA optionmla_get_style_templates() : array | null
since | 0.80 |
---|
array
null
name => value for all style templates or null if no templatesmla_iptc_exif_option_handler(string $action, string $key, array $value, array $args) : string
since | 1.00 |
---|---|
uses | \global\$mla_option_templates |
string
'render', 'update', 'delete', or 'reset'
string
option name, e.g., 'iptc_exif_mapping'
array
option parameters
array
Optional. null (default) for 'render' else option data, e.g., $_REQUEST
string
HTML table row markup for 'render' else message(s) reflecting the results of the operation.mla_is_data_source(string $candidate_name) : boolean
Determines whether a name matches any of the element-level data source dropdown options, i.e., excludes "template:" and "meta:" values.
since | 1.80 |
---|
string
candidate data source name
boolean
true if candidate name matches a data sourcemla_localize_option_definitions_array() : void
Localization must be done at runtime, and these calls cannot be placed in the "public static" array definition itself.
since | 1.70 |
---|
mla_put_markup_templates(array $templates) : boolean
since | 0.80 |
---|
array
name => value for all user-defined markup templates
boolean
true if success, false if failuremla_put_style_templates(array $templates) : boolean
since | 0.80 |
---|
array
name => value for all user-defined style templates
boolean
true if success, false if failuremla_search_option_handler(string $action, string $key, array $value, array $args) : string
since | 1.90 |
---|---|
uses | \global\$mla_option_templates |
string
'render', 'update', 'delete', or 'reset'
string
option name; 'search_connector' or 'search_fields'
array
option parameters
array
Optional. null (default) for 'render' else option data, e.g., $_REQUEST
string
HTML table row markup for 'render' else message(s) reflecting the results of the operation.mla_supported_taxonomies(string $support_type) : array
since | 1.90 |
---|
string
Optional. 'support' (default), 'quick-edit', 'flat-checklist', 'term-search' or 'filter'
array
taxonomies assigned to $support_type; can be empty.mla_taxonomy_option_handler(string $action, string $key, array $value, array $args) : string
since | 0.30 |
---|---|
uses | \global\$mla_option_templates |
string
'render', 'update', 'delete', or 'reset'
string
option name, e.g., 'tax_support', or 'tax_flat_checklist'
array
option parameters
array
Optional. null (default) for 'render' else option data, e.g., $_REQUEST
string
HTML table row markup for 'render' else message(s) reflecting the results of the operation.mla_taxonomy_support(string $tax_name, string $support_type) : boolean | string
since | 0.30 |
---|
string
Taxonomy name, e.g., attachment_category
string
Optional. 'support' (default), 'quick-edit' or 'filter'
boolean
string
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.mla_update_option(string $option, mixed $newvalue) : boolean
since | 0.1 |
---|
string
Name of the desired option
mixed
New value for the desired option
boolean
True if the value was changed or false if the update failedmla_wp_handle_upload_filter(array $file) : array
since | 1.70 |
---|
array
file parameters ( 'name' )
array
updated file parametersmla_wp_handle_upload_prefilter_filter(array $file) : array
since | 1.70 |
---|
array
file parameters ( 'name' )
array
updated file parameters_compose_custom_field_option_list(string $selection, array $blacklist) : string
since | 1.10 |
---|---|
uses | \global\$mla_option_templates |
string
current selection or 'none' (default)
array
optional list of terms to exclude from the list
string
HTML markup with select field options_compose_data_source_option_list(string $selection) : string
since | 1.10 |
---|---|
uses | \global\$mla_option_templates |
string
current selection or 'none' (default)
string
HTML markup with select field options_compose_iptc_option_list(string $selection) : string
since | 1.00 |
---|---|
uses | \global\$mla_option_templates |
string
current selection or 'none' (default)
string
HTML markup with select field options_compose_parent_option_list(string $taxonomy, integer $selection) : string
since | 1.00 |
---|---|
uses | \global\$mla_option_templates |
string
taxonomy slug
integer
current selection or 0 (zero, default)
string
HTML markup with select field options_evaluate_array_result(array $value, string $option, boolean $keep_existing) : mixed
since | 1.40 |
---|
array
field value(s)
string
format option text|single|export|array|multi
boolean
keep existing value(s) - for 'multi' option
mixed
array for option = array|multi else string_evaluate_data_source(integer $post_id, string $category, array $data_value, array $attachment_metadata) : string | array
since | 1.10 |
---|
integer
post->ID of attachment
string
category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
array
data source specification ( name, *data_source, *keep_existing, *format, mla_column, quick_edit, bulk_edit, *meta_name, *option, no_null )
array
(optional) _wp_attachment_metadata, default NULL (use current postmeta database value)
string
array
data source value_evaluate_file_information(string $upload_dir, array $wp_attached_files, array $wp_attachment_metadata, integer $post_id) : array
since | 1.10 |
---|
string
absolute path the the uploads base directory
array
_wp_attached_file meta_value array, indexed by post_id
array
_wp_attachment_metadata meta_value array, indexed by post_id
integer
post->ID of attachment
array
absolute_path_raw, absolute_path, absolute_file_name_raw, absolute_file_name, absolute_file, base_file, path, file_name, extension, dimensions, width, height, hwstring_small, array of intermediate sizes_evaluate_post_information(integer $post_id, string $category, string $data_source) : mixed
since | 1.40 |
---|
integer
post->ID of attachment
string
category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
string
data source name ( post_date or post_parent )
mixed
'post_date' => (string) upload date, 'post_parent' => (integer) ID of parent or zero )_get_custom_field_names() : array
The list will include any Custom Field and IPTC/EXIF rules that haven't been mapped to any attachments, yet.
since | 1.00 |
---|
array
Custom field names from the postmeta table and MLA rules_load_option_templates() : void
since | 0.80 |
---|
_update_custom_field_mapping(array $current_values, array $new_values) : array
since | 1.10 |
---|
array
current custom_field_mapping values
array
new values
array
( 'message' => HTML message(s) reflecting results, 'values' => updated custom_field_mapping values, 'changed' => true if any changes detected else false )_update_iptc_exif_custom_mapping(array $current_values, array $new_values) : array
since | 1.00 |
---|
array
current iptc_exif_mapping values
array
new values
array
( 'message' => HTML message(s) reflecting results, 'values' => updated iptc_exif_mapping values, 'changed' => true if any changes detected else false )_update_iptc_exif_standard_mapping(array $current_values, array $new_values) : array
since | 1.00 |
---|
array
current iptc_exif_mapping values
array
new values
array
( 'message' => HTML message(s) reflecting results, 'values' => updated iptc_exif_mapping values, 'changed' => true if any changes detected else false )_update_iptc_exif_taxonomy_mapping(array $current_values, array $new_values) : array
since | 1.00 |
---|
array
current iptc_exif_mapping values
array
new values
array
( 'message' => HTML message(s) reflecting results, 'values' => updated iptc_exif_mapping values, 'changed' => true if any changes detected else false )$mla_option_definitions
The array must be populated at runtime in MLAOptions::mla_localize_option_definitions_array(), because Localization calls cannot be placed in the "public static" array definition itself.
Each option is defined by an array with the following elements:
array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
tab => Settings page tab id for the option name => admin page label or heading text type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden' std => default value help => help text size => text size, default 40 cols => textbox columns, default 90 rows => textbox rows, default 5 options => array of radio or select option values texts => array of radio or select option display texts render => rendering function for 'custom' options. Usage: $options_list .= ['render']( 'render', $key, $value ); update => update function for 'custom' options; returns nothing. Usage: $message = ['update']( 'update', $key, $value, $_REQUEST ); delete => delete function for 'custom' options; returns nothing. Usage: $message = ['delete']( 'delete', $key, $value, $_REQUEST ); reset => reset function for 'custom' options; returns nothing. Usage: $message = ['reset']( 'reset', $key, $value, $_REQUEST );
$process_featured_in : boolean
This setting is false if the "Featured in" database access setting is "disabled", else true.
since | 1.00 |
---|
$process_gallery_in : boolean
This setting is false if the "Gallery in" database access setting is "disabled", else true.
since | 1.00 |
---|
$process_inserted_in : boolean
This setting is false if the "Inserted in" database access setting is "disabled", else true.
since | 1.00 |
---|
$process_mla_gallery_in : boolean
This setting is false if the "MLA Gallery in" database access setting is "disabled", else true.
since | 1.00 |
---|
$custom_field_data_sources : array
since | 1.10 |
---|
$mla_option_templates : array
since | 0.80 |
---|
MLA_COUNT_TERM_ATTACHMENTS
MLA_DEFAULT_ORDER
MLA_DEFAULT_ORDERBY
MLA_EDIT_MEDIA_META_BOXES
MLA_EDIT_MEDIA_SEARCH_TAXONOMY
MLA_ENABLE_MLA_ICONS
MLA_ENABLE_POST_MIME_TYPES
MLA_ENABLE_UPLOAD_MIMES
MLA_EXCLUDE_REVISIONS
MLA_EXIF_SIZE
MLA_FEATURED_IN_TUNING
MLA_GALLERY_IN_TUNING
MLA_INSERTED_IN_TUNING
MLA_MEDIA_GRID_TOOLBAR
MLA_MEDIA_MODAL_DETAILS_AUTOFILL
MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX
Categories".
MLA_MEDIA_MODAL_DETAILS_TAG_METABOX
Tags".
MLA_MEDIA_MODAL_MIMETYPES
MLA_MEDIA_MODAL_MONTHS
MLA_MEDIA_MODAL_ORDER
MLA_MEDIA_MODAL_ORDERBY
MLA_MEDIA_MODAL_SEARCHBOX
MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS
MLA_MEDIA_MODAL_TERMS
MLA_MEDIA_MODAL_TERMS_SEARCH
MLA_MEDIA_MODAL_TOOLBAR
MLA_MLA_GALLERY_IN_TUNING
MLA_NEW_CUSTOM_FIELD
MLA_NEW_CUSTOM_RULE
MLA_POST_MIME_TYPES
MLA_SCREEN_DISPLAY_LIBRARY
MLA_SCREEN_MENU_TITLE
MLA_SCREEN_ORDER
MLA_SCREEN_PAGE_TITLE
MLA_SEARCH_MEDIA_FILTER_DEFAULTS
MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS
MLA_TABLE_ICON_SIZE
MLA_TABLE_VIEWS_WIDTH
MLA_TAXONOMY_FILTER_DEPTH
MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN
MLA_TAXONOMY_SUPPORT
MLA_UPLOAD_MIMES
MLA_VERSION_OPTION