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_initialize_tax_checked_on_top()
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()
_get_term_id()
_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_ADD_NEW_BULK_EDIT
MLA_BULK_CHUNK_SIZE
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'
stringoption name, e.g., 'custom_field_mapping'
arrayoption parameters
arrayOptional. null (default) for 'render' else option data, e.g., $_REQUEST
stringHTML 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 |
|---|
stringslug, e.g., 'c_File Size' for the 'File Size' field
arrayoption value, e.g., array( 'name' => 'File Size', ... )mla_custom_field_support(string $support_type) : array
| since | 1.10 |
|---|
stringarray format; 'default_columns' (default), 'default_hidden_columns', 'default_sortable_columns', 'quick_edit' or 'bulk_edit'
arraydefault, hidden, sortable quick_edit or bulk_edit colums in appropriate formatmla_delete_option(string $option) : boolean
| since | 0.1 |
|---|
stringName of the desired option
booleanTrue 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 |
|---|
integerpost ID to be evaluated
stringcategory/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)
arrayUpdates suitable for MLAData::mla_update_single_item, if anymla_evaluate_iptc_exif_mapping(object $post, string $category, array $settings, array $attachment_metadata, boolean $is_upload) : array
| since | 1.00 |
|---|
objectpost object with current values
stringcategory 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
boolean(optional) true if uploading a new item else false (default)
arrayUpdates suitable for MLAData::mla_update_single_item, if anymla_fetch_gallery_template(string $key, string $type) : string | boolean | null
| since | 0.80 |
|---|
stringTemplate name
stringTemplate type; 'style' (default) or 'markup'
stringbooleannullrequested 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 |
|---|
integerpost->ID of attachment
stringcategory/scope to evaluate against: custom_field_mapping or single_attachment_mapping
arraydata 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)
stringarraydata source valuemla_get_markup_templates() : array | null
| since | 0.80 |
|---|
arraynullname => value for all markup templates or null if no templatesmla_get_option(string $option, boolean $get_default, boolean $get_stored) : mixed
| since | 0.1 |
|---|
stringName of the desired option
booleanTrue to ignore current setting and return default values
booleanTrue to ignore default values and return only stored values
mixedValue(s) for the option or false if the option is not a defined MLA optionmla_get_style_templates() : array | null
| since | 0.80 |
|---|
arraynullname => value for all style templates or null if no templatesmla_initialize_tax_checked_on_top() : void
Called after all taxonomies are registered, e.g., in MLAObjects::_build_taxonomies.
| since | 2.02 |
|---|
mla_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'
stringoption name, e.g., 'iptc_exif_mapping'
arrayoption parameters
arrayOptional. null (default) for 'render' else option data, e.g., $_REQUEST
stringHTML 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 |
|---|
stringcandidate data source name
booleantrue 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 |
|---|
arrayname => value for all user-defined markup templates
booleantrue if success, false if failuremla_put_style_templates(array $templates) : boolean
| since | 0.80 |
|---|
arrayname => value for all user-defined style templates
booleantrue 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'
stringoption name; 'search_connector' or 'search_fields'
arrayoption parameters
arrayOptional. null (default) for 'render' else option data, e.g., $_REQUEST
stringHTML table row markup for 'render' else message(s) reflecting the results of the operation.mla_supported_taxonomies(string $support_type) : array
| since | 1.90 |
|---|
stringOptional. 'support' (default), 'quick-edit', 'flat-checklist', 'term-search' or 'filter'
arraytaxonomies 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'
stringoption name, e.g., 'tax_support', or 'tax_flat_checklist'
arrayoption parameters
arrayOptional. null (default) for 'render' else option data, e.g., $_REQUEST
stringHTML 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 |
|---|
stringTaxonomy name, e.g., attachment_category
stringOptional. 'support' (default), 'quick-edit' or 'filter'
booleanstringtrue 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 |
|---|
stringName of the desired option
mixedNew value for the desired option
booleanTrue if the value was changed or false if the update failedmla_wp_handle_upload_filter(array $file) : array
| since | 1.70 |
|---|
arrayfile parameters ( 'name' )
arrayupdated file parametersmla_wp_handle_upload_prefilter_filter(array $file) : array
| since | 1.70 |
|---|
arrayfile parameters ( 'name' )
arrayupdated file parameters_compose_custom_field_option_list(string $selection, array $blacklist) : string
| since | 1.10 |
|---|---|
| uses | \global\$mla_option_templates |
stringcurrent selection or 'none' (default)
arrayoptional list of terms to exclude from the list
stringHTML markup with select field options_compose_data_source_option_list(string $selection) : string
| since | 1.10 |
|---|---|
| uses | \global\$mla_option_templates |
stringcurrent selection or 'none' (default)
stringHTML markup with select field options_compose_iptc_option_list(string $selection) : string
| since | 1.00 |
|---|---|
| uses | \global\$mla_option_templates |
stringcurrent selection or 'none' (default)
stringHTML markup with select field options_compose_parent_option_list(string $taxonomy, integer $selection) : string
| since | 1.00 |
|---|---|
| uses | \global\$mla_option_templates |
stringtaxonomy slug
integercurrent selection or 0 (zero, default)
stringHTML markup with select field options_evaluate_array_result(array $value, string $option, boolean $keep_existing) : mixed
| since | 1.40 |
|---|
arrayfield value(s)
stringformat option text|single|export|array|multi
booleankeep existing value(s) - for 'multi' option
mixedarray 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 |
|---|
integerpost->ID of attachment
stringcategory/scope to evaluate against: custom_field_mapping or single_attachment_mapping
arraydata 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)
stringarraydata source value_evaluate_file_information(string $upload_dir, array $wp_attached_files, array $wp_attachment_metadata, integer $post_id) : array
| since | 1.10 |
|---|
stringabsolute 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
integerpost->ID of attachment
arrayabsolute_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 |
|---|
integerpost->ID of attachment
stringcategory/scope to evaluate against: custom_field_mapping or single_attachment_mapping
stringdata source name ( post_date or post_parent )
mixed(string)/'' or (integer)/0 depending on $data_source type_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 |
|---|
arrayCustom field names from the postmeta table and MLA rules_get_term_id(string $term_name, integer $term_parent, string $taxonomy, array $post_terms) : integer
| since | 2.01 |
|---|
stringterm name (not slug)
integerzero or term's parent term_id
stringtaxonomy slug
arrayterm objects currently assigned to the item
integerterm_id for the term name_load_option_templates() : void
| since | 0.80 |
|---|
_update_custom_field_mapping(array $current_values, array $new_values) : array
| since | 1.10 |
|---|
arraycurrent custom_field_mapping values
arraynew 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 |
|---|
arraycurrent iptc_exif_mapping values
arraynew 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 |
|---|
arraycurrent iptc_exif_mapping values
arraynew 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 |
|---|
arraycurrent iptc_exif_mapping values
arraynew 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_ADD_NEW_BULK_EDIT
MLA_BULK_CHUNK_SIZE
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