Class MLA (Media Library Assistant) Settings provides the settings page to edit the plugin option settings
|
package
|
Media Library Assistant
|
|
since
|
0.1
|
Methods
Compose the Debug tab content for the Settings subpage
_compose_debug_tab() : array
static
|
since
|
2.10
|
|
uses
|
contains tab content template(s)
|
|
|
|
Response
array'message' => status/error messages, 'body' => tab content
Compose the General tab content for the Settings subpage
_compose_general_tab() : array
static
|
since
|
0.80
|
|
uses
|
contains tab content template(s)
|
|
|
|
Response
array'message' => status/error messages, 'body' => tab content
Compose HTML markup for the import settings if any settings files exist
_compose_import_settings() : string
static
Response
stringHTML markup for the Import All Settings button and dropdown list, if any
Compose the Debug tab Debug Settings content for one setting
_compose_settings_row(string $label, string $value) : string
static
Arguments
$label
stringDisplay name for the setting
$value
stringCurrent value for the setting
Response
stringHTML table row markup for the label setting pair
Compose the navigation tabs for the Settings subpage
_compose_settings_tabs( $active_tab = 'general') : string
static
|
since
|
0.80
|
|
uses
|
contains tablist and tablist-item templates
|
Arguments
Response
stringHTML markup for the Settings subpage navigation tabs
Serialize option settings and write them to a file
_export_settings() : array
static
Options with a default value, i.e., not stored in the database are NOT written to the file.
Response
arrayMessage(s) reflecting the results of the operation
Retrieve the list of options tabs or a specific tab value
_get_options_tablist( $tab = NULL) : array|false
static
Arguments
Response
array|falseThe entire tablist ( $tab = NULL ), a single tab entry or false if not found/not allowed
Read a serialized file of option settings and write them to the database
_import_settings() : array
static
Response
arrayMessage(s) reflecting the results of the operation
Localize $mla_tablist array
_localize_tablist() : void
static
Localization must be done at runtime; these calls cannot be placed in the
"public static" array definition itself. Called from MLATest::initialize.
Delete saved settings, restoring default values
_reset_general_settings() : array
static
Response
arrayMessage(s) reflecting the results of the operation
Save Debug settings to the options table
_save_debug_settings() : array
static
Response
arrayMessage(s) reflecting the results of the operation
Save General settings to the options table
_save_general_settings() : array
static
Response
arrayMessage(s) reflecting the results of the operation
Database and option update check, for installing new versions
_version_upgrade() : void
static
Initialization function, similar to __construct()
initialize() : void
static
Perform one-time actions on plugin activation
mla_activation_hook() : void
static
Add contextual help tabs to all the MLA pages
mla_add_help_tab_action() : void
static
Add the "Settings" link to the MLA entry in the Plugins section
mla_add_plugin_settings_link_filter( $links, $file) : array
static
Arguments
Response
arrayUpdated array of links for the Plugin
Load the plugin's Style Sheet and Javascript files
mla_admin_enqueue_scripts_action( $page_hook) : void
static
Load the plugin's Ajax handler
mla_admin_init_action() : void
static
Compose the table row for a single MLA option
mla_compose_option_row( $key, $value, $option_table = NULL) : string
static
|
since
|
0.80
|
|
uses
|
contains option and option-item templates
|
Arguments
Response
stringHTML markup for the option's table row
Get the current action selected from the bulk actions dropdown
mla_current_bulk_action() : string|false
static
Response
string|falseThe action name or False if no action was selected
Perform one-time actions on plugin deactivation
mla_deactivation_hook() : void
static
Delete a custom field from the wp_postmeta table
mla_delete_custom_field( $value) : array
static
Arguments
Response
arrayMessage(s) reflecting the results of the operation
Render (echo) the "Media Library Assistant" subpage in the Settings section
mla_render_settings_page() : void
static
Only show screen options on the View and Upload tabs
mla_screen_options_show_screen_filter( $show_screen, $this_screen) : boolean
static
Arguments
Response
booleanTrue to display "Screen Options", false to suppress them
Save the "Views/Uploads per page" option set by this user
mla_set_screen_option_filter( $status, $option, $value) : mixed
static
Arguments
Response
mixedNew value if this is our option, otherwise original status
Update or delete a single MLA option value
mla_update_option_row( $key, $value, $option_table = NULL) : string
static
Arguments
Response
stringHTML markup for the option's table row
Constants
Slug for localizing and enqueueing JavaScript - MLA View List Table
JAVASCRIPT_INLINE_EDIT_VIEW_SLUG
Slug for localizing and enqueueing JavaScript - MLA Upload List Table
JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG
Slug for localizing and enqueueing JavaScript - MLA Custom Fields List Table
JAVASCRIPT_INLINE_EDIT_CUSTOM_SLUG
Slug for localizing and enqueueing JavaScript - MLA Custom tab
JAVASCRIPT_INLINE_MAPPING_CUSTOM_SLUG
Slug for localizing and enqueueing JavaScript - MLA IPTC/EXIF List Table
JAVASCRIPT_INLINE_EDIT_IPTC_EXIF_SLUG
Slug for localizing and enqueueing JavaScript - MLA IPTC/EXIF tab
JAVASCRIPT_INLINE_MAPPING_IPTC_EXIF_SLUG
Object name for localizing JavaScript - MLA Custom and IPTC/EXIF tabs
JAVASCRIPT_INLINE_MAPPING_OBJECT
Properties
Holds screen id to match help text to corresponding screen
current_page_hook : array
static
Template file for the Settings page(s) and parts
page_template_array : array
static
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(s)
array
Definitions for Settings page tab ids, titles and handlers
Each tab is defined by an array with the following elements:
mla_tablist : array
static
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(s)
array