Constants

JAVASCRIPT_INLINE_EDIT_VIEW_SLUG

JAVASCRIPT_INLINE_EDIT_VIEW_SLUG

Slug for localizing and enqueueing JavaScript - MLA View List Table

JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG

JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG

Slug for localizing and enqueueing JavaScript - MLA Upload List Table

JAVASCRIPT_INLINE_MAPPING_CUSTOM_SLUG

JAVASCRIPT_INLINE_MAPPING_CUSTOM_SLUG

Slug for localizing and enqueueing JavaScript - MLA Custom tab

JAVASCRIPT_INLINE_MAPPING_IPTC_EXIF_SLUG

JAVASCRIPT_INLINE_MAPPING_IPTC_EXIF_SLUG

Slug for localizing and enqueueing JavaScript - MLA IPTC/EXIF tab

JAVASCRIPT_INLINE_MAPPING_OBJECT

JAVASCRIPT_INLINE_MAPPING_OBJECT

Object name for localizing JavaScript - MLA Custom and IPTC/EXIF tabs

Properties

$page_template_array

$page_template_array : array

Template file for the Settings page(s) and parts

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.

Type

array

$current_page_hook

$current_page_hook : array

Holds screen id to match help text to corresponding screen

Type

array

$mla_tablist

$mla_tablist : array

Definitions for Settings page tab ids, titles and handlers Each tab is defined by an array with the following elements:

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']( );

The array must be populated at runtime in MLASettings::_localize_tablist(); localization calls cannot be placed in the "public static" array definition itself.

Type

array

Methods

initialize()

initialize() : void

Initialization function, similar to __construct()

mla_activation_hook()

mla_activation_hook() : void

Perform one-time actions on plugin activation

mla_deactivation_hook()

mla_deactivation_hook() : void

Perform one-time actions on plugin deactivation

mla_admin_init_action()

mla_admin_init_action() : void

Load the plugin's Ajax handler

mla_admin_enqueue_scripts_action()

mla_admin_enqueue_scripts_action(  $page_hook) : void

Load the plugin's Style Sheet and Javascript files

Parameters

$page_hook

mla_admin_menu_action()

mla_admin_menu_action() : void

Add settings page in the "Settings" section, add screen options and help tabs, add settings link in the Plugins section entry for MLA.

mla_add_menu_options_action()

mla_add_menu_options_action() : void

Add the "XX Entries per page" filter to the Screen Options tab

mla_add_help_tab_action()

mla_add_help_tab_action() : void

Add contextual help tabs to all the MLA pages

mla_screen_options_show_screen_filter()

mla_screen_options_show_screen_filter(  $show_screen,   $this_screen) : boolean

Only show screen options on the View and Upload tabs

Parameters

$show_screen
$this_screen

Returns

boolean —

True to display "Screen Options", false to suppress them

mla_set_screen_option_filter()

mla_set_screen_option_filter(  $status,   $option,   $value) : string|void

Save the "Views/Uploads per page" option set by this user

Parameters

$status
$option
$value

Returns

string|void —

New value if this is our option, otherwise nothing

mla_add_plugin_settings_link_filter()

mla_add_plugin_settings_link_filter(  $links,   $file) : array

Add the "Settings" link to the MLA entry in the Plugins section

Parameters

$links
$file

Returns

array —

Updated array of links for the Plugin

mla_update_option_row()

mla_update_option_row(  $key,   $value,   $option_table = NULL) : string

Update or delete a single MLA option value

Parameters

$key
$value
$option_table

Returns

string —

HTML markup for the option's table row

mla_compose_option_row()

mla_compose_option_row(  $key,   $value,   $option_table = NULL) : string

Compose the table row for a single MLA option

Parameters

$key
$value
$option_table

Returns

string —

HTML markup for the option's table row

mla_current_bulk_action()

mla_current_bulk_action() : string|false

Get the current action selected from the bulk actions dropdown

Returns

string|false —

The action name or False if no action was selected

mla_render_settings_page()

mla_render_settings_page() : void

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

mla_delete_custom_field()

mla_delete_custom_field(  $value) : array

Delete a custom field from the wp_postmeta table

Parameters

$value

Returns

array —

Message(s) reflecting the results of the operation

_version_upgrade()

_version_upgrade() : void

Database and option update check, for installing new versions

_localize_tablist()

_localize_tablist() : void

Localize $mla_tablist array

Localization must be done at runtime; these calls cannot be placed in the "public static" array definition itself. Called from MLATest::initialize.

_get_options_tablist()

_get_options_tablist(  $tab = NULL) : array|false

Retrieve the list of options tabs or a specific tab value

Parameters

$tab

Returns

array|false —

The entire tablist ( $tab = NULL ), a single tab entry or false if not found/not allowed

_compose_settings_tabs()

_compose_settings_tabs(  $active_tab = 'general') : string

Compose the navigation tabs for the Settings subpage

Parameters

$active_tab

Returns

string —

HTML markup for the Settings subpage navigation tabs

_compose_general_tab()

_compose_general_tab() : array

Compose the General tab content for the Settings subpage

Returns

array —

'message' => status/error messages, 'body' => tab content

_save_debug_settings()

_save_debug_settings() : array

Save Debug settings to the options table

Returns

array —

Message(s) reflecting the results of the operation

_compose_settings_row()

_compose_settings_row(string  $label, string  $value) : string

Compose the Debug tab Debug Settings content for one setting

Parameters

string $label

Display name for the setting

string $value

Current value for the setting

Returns

string —

HTML table row markup for the label setting pair

_compose_debug_tab()

_compose_debug_tab() : array

Compose the Debug tab content for the Settings subpage

Returns

array —

'message' => status/error messages, 'body' => tab content

_save_general_settings()

_save_general_settings() : array

Save General settings to the options table

Returns

array —

Message(s) reflecting the results of the operation

_reset_general_settings()

_reset_general_settings() : array

Delete saved settings, restoring default values

Returns

array —

Message(s) reflecting the results of the operation

_compose_import_settings()

_compose_import_settings() : string

Compose HTML markup for the import settings if any settings files exist

Returns

string —

HTML markup for the Import All Settings button and dropdown list, if any

_export_settings()

_export_settings() : array

Serialize option settings and write them to a file

Options with a default value, i.e., not stored in the database are NOT written to the file.

Returns

array —

Message(s) reflecting the results of the operation

_import_settings()

_import_settings() : array

Read a serialized file of option settings and write them to the database

Returns

array —

Message(s) reflecting the results of the operation