Class MLA (Media Library Assistant) Settings provides the settings page to edit the plugin option settings

package Media Library Assistant
since 0.1

 Methods

Initialization function, similar to __construct()

initialize() : void

since 0.1

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'.

since 0.40

Add settings page in the "Settings" section, add settings link in the Plugins section entry for MLA.

mla_admin_menu_action() : void

since 0.1

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'.

since 0.40

Render (echo) the "Media Library Assistant" subpage in the Settings section

mla_render_settings_page() : void

since 0.1

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 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

stringHTML 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

stringHTML markup for the Settings subpage navigation tabs

Delete a custom field from the wp_postmeta table

_delete_custom_field(array $value) : array

since 1.10

Parameters

$value

array

specific custom_field_mapping rule

Returns

arrayMessage(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

arrayMessage(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

arrayMessage(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

arrayMessage(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

arrayMessage(s) reflecting the results of the operation

Delete saved settings, restoring default values

_reset_general_settings() : array

since 0.1

Returns

arrayMessage(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

arrayMessage(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

arrayMessage(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

arrayMessage(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

stringHTML markup for the option's table row

Database and option update check, for installing new versions

_version_upgrade() : void

since 0.30

 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';

since 0.80
 

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.

since 0.80

 Constants

 

Provides a unique name for the settings page

MLA_SETTINGS_SLUG