Class MLA (Media Library Assistant) Settings provides the settings page to edit the plugin option settings
Methods
Initialization function, similar to __construct()
initialize() : void
Perform one-time actions on plugin activation
mla_activation_hook() : void
Adds a view to the database to support sorting the listing on 'ALT Text'.
Add the "Settings" link to the MLA entry in the Plugins section
mla_add_plugin_settings_link(array $links, string $file) : array
Parameters
$links
array
array of links for the Plugin, e.g., "Activate"
$file
string
Directory and name of the plugin Index file
Returns
array
Updated array of links for the Plugin
Perform one-time actions on plugin deactivation
mla_deactivation_hook() : void
Removes (if present) a view from the database that supports sorting the listing on 'ALT Text'.
Render (echo) the "Media Library Assistant" subpage in the Settings section
mla_render_settings_page() : void
Compose the Custom Field tab content for the Settings subpage
_compose_custom_field_tab() : array
since |
1.10 |
uses |
\global\$page_template_array |
Returns
array
'message' => status/error messages, 'body' => tab content
Compose the Documentation tab content for the Settings subpage
_compose_documentation_tab() : array
since |
0.80 |
uses |
\global\$page_template_array |
Returns
array
'message' => status/error messages, 'body' => tab content
Compose the General tab content for the Settings subpage
_compose_general_tab() : array
since |
0.80 |
uses |
\global\$page_template_array |
Returns
array
'message' => status/error messages, 'body' => tab content
Compose the IPTC/EXIF tab content for the Settings subpage
_compose_iptc_exif_tab() : array
since |
1.00 |
uses |
\global\$page_template_array |
Returns
array
'message' => status/error messages, 'body' => tab content
Compose the MLA Gallery tab content for the Settings subpage
_compose_mla_gallery_tab() : array
since |
0.80 |
uses |
\global\$page_template_array |
Returns
array
'message' => status/error messages, 'body' => tab content
Compose the table row for a single MLA option
_compose_option_row(string $key, array $value) : string
since |
0.80 |
uses |
\global\$page_template_array |
Parameters
$key
string
HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
$value
array
Option parameters, e.g., 'type', 'std'
Returns
string
HTML markup for the option's table row
Compose the navigation tabs for the Settings subpage
_compose_settings_tabs(string $active_tab) : string
since |
0.80 |
uses |
\global\$page_template_array |
Parameters
$active_tab
string
Optional data-tab-id value for the active tab, default 'general'
Returns
string
HTML markup for the Settings subpage navigation tabs
Delete a custom field from the wp_postmeta table
_delete_custom_field(array $value) : array
Parameters
$value
array
specific custom_field_mapping rule
Returns
array
Message(s) reflecting the results of the operation
Process custom field settings against all image attachments
without saving the settings to the mla_option
_process_custom_field_mapping(array $settings) : array
since |
1.10 |
uses |
\global\$_REQUEST |
Parameters
$settings
array
| NULL specific custom_field_mapping values
Returns
array
Message(s) reflecting the results of the operation
Process IPTC/EXIF custom field settings against all image attachments
without saving the settings to the mla_option
_process_iptc_exif_custom() : array
since |
1.00 |
uses |
\global\$_REQUEST |
Returns
array
Message(s) reflecting the results of the operation
Process IPTC/EXIF standard field settings against all image attachments
without saving the settings to the mla_option
_process_iptc_exif_standard() : array
since |
1.00 |
uses |
\global\$_REQUEST |
Returns
array
Message(s) reflecting the results of the operation
Process IPTC/EXIF taxonomy term settings against all image attachments
without saving the settings to the mla_option
_process_iptc_exif_taxonomy() : array
since |
1.00 |
uses |
\global\$_REQUEST |
Returns
array
Message(s) reflecting the results of the operation
Delete saved settings, restoring default values
_reset_general_settings() : array
Returns
array
Message(s) reflecting the results of the operation
Save custom field settings to the options table
_save_custom_field_settings(array $new_values) : array
since |
1.10 |
uses |
\global\$_REQUEST |
Parameters
$new_values
array
| NULL specific custom_field_mapping values
Returns
array
Message(s) reflecting the results of the operation
Save MLA Gallery settings to the options table
_save_gallery_settings() : array
since |
0.80 |
uses |
\global\$_REQUEST |
Returns
array
Message(s) reflecting the results of the operation
Save General settings to the options table
_save_general_settings() : array
since |
0.1 |
uses |
\global\$_REQUEST |
Returns
array
Message(s) reflecting the results of the operation
Save IPTC/EXIF settings to the options table
_save_iptc_exif_settings() : array
since |
1.00 |
uses |
\global\$_REQUEST |
Returns
array
Message(s) reflecting the results of the operation
Update or delete a single MLA option value
_update_option_row(string $key, array $value) : string
since |
0.80 |
uses |
\global\$_REQUEST |
Parameters
$key
string
HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
$value
array
Option parameters, e.g., 'type', 'std'
Returns
string
HTML markup for the option's table row
Database and option update check, for installing new versions
_version_upgrade() : void
Properties
Definitions for Settings page tab ids, titles and handlers
Each tab is defined by an array with the following elements:
$mla_tablist : array
array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
title => tab label / heading text
render => rendering function for tab messages and content. Usage:
$tab_content = 'render';
Template file for the Settings page(s) and parts
$page_template_array : array
This array contains all of the template parts for the Settings page(s). The array is built once
each page load and cached for subsequent use.
Constants
Provides a unique name for the settings page
MLA_SETTINGS_SLUG