initialize()
mla_add_attachment_action()
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_markup_templates()
mla_get_option()
mla_get_style_templates()
mla_iptc_exif_option_handler()
mla_put_markup_templates()
mla_put_style_templates()
mla_taxonomy_option_handler()
mla_taxonomy_support()
mla_update_attachment_metadata_filter()
mla_update_option()
_compose_custom_field_option_list()
_compose_data_source_option_list()
_compose_iptc_option_list()
_compose_parent_option_list()
_evaluate_data_source()
_evaluate_file_information()
_get_custom_field_names()
_load_option_templates()
_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
$custom_field_data_sources
$mla_option_templates
MLA_FEATURED_IN_TUNING
MLA_GALLERY_IN_TUNING
MLA_INSERTED_IN_TUNING
MLA_MEDIA_MODAL_MIMETYPES
MLA_MEDIA_MODAL_MONTHS
MLA_MEDIA_MODAL_SEARCHBOX
MLA_MEDIA_MODAL_TERMS
MLA_MEDIA_MODAL_TOOLBAR
MLA_MLA_GALLERY_IN_TUNING
MLA_NEW_CUSTOM_FIELD
MLA_NEW_CUSTOM_RULE
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
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
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_markup_templates() : array | null
since | 0.80 |
---|
array
null
name => value for all markup templates or null if no templatesmla_get_option(string $option) : mixed
since | 0.1 |
---|
string
Name of the desired option
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_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_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., 'taxonomy_support'
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 bymla_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 failed_compose_custom_field_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_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_data_source(integer $post_id, string $category, string $data_source, string $format, array $attachment_metadata) : string
since | 1.10 |
---|
integer
post->ID of attachment
string
category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
string
data source name
string
desired results format, default 'native'
array
(optional) attachment_metadata, default NULL (use current postmeta database value)
string
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, base_file, path, file_name, extension, dimensions, width, height, hwstring_small, array of intermediate sizes_get_custom_field_names() : array
since | 1.00 |
---|
array
Custom field names from the postmeta table_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 iptc_exif_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
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_FEATURED_IN_TUNING
MLA_GALLERY_IN_TUNING
MLA_INSERTED_IN_TUNING
MLA_MEDIA_MODAL_MIMETYPES
MLA_MEDIA_MODAL_MONTHS
MLA_MEDIA_MODAL_SEARCHBOX
MLA_MEDIA_MODAL_TERMS
MLA_MEDIA_MODAL_TOOLBAR
MLA_MLA_GALLERY_IN_TUNING
MLA_NEW_CUSTOM_FIELD
MLA_NEW_CUSTOM_RULE
MLA_VERSION_OPTION