MLASettings

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

Response

string

HTML 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
since 2.14

Arguments

$label

string

Display name for the setting

$value

string

Current value for the setting

Response

string

HTML 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

$active_tab

Response

string

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

since 1.50

Response

array

Message(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
since 1.82

Arguments

$tab

Response

array|false

The 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
since 1.50

Response

array

Message(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.

since 1.70

Delete saved settings, restoring default values

_reset_general_settings() : array
static
since 0.1

Response

array

Message(s) reflecting the results of the operation

Save Debug settings to the options table

_save_debug_settings() : array
static
since 2.10
uses

Response

array

Message(s) reflecting the results of the operation

Save General settings to the options table

_save_general_settings() : array
static
since 0.1
uses

Response

array

Message(s) reflecting the results of the operation

Database and option update check, for installing new versions

_version_upgrade() : void
static
since 0.30

Initialization function, similar to __construct()

initialize() : void
static
since 0.1

Perform one-time actions on plugin activation

mla_activation_hook() : void
static
since 0.40

Add contextual help tabs to all the MLA pages

mla_add_help_tab_action() : void
static
since 1.40

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

mla_add_menu_options_action() : void
static
since 1.40

Load the plugin's Style Sheet and Javascript files

mla_admin_enqueue_scripts_action( $page_hook) : void
static
since 1.40

Arguments

$page_hook

Load the plugin's Ajax handler

mla_admin_init_action() : void
static
since 1.40

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

mla_admin_menu_action() : void
static
since 0.1

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

$key

$value

$option_table

Response

string

HTML markup for the option's table row

Get the current action selected from the bulk actions dropdown

mla_current_bulk_action() : string|false
static
since 1.40

Response

string|false

The action name or False if no action was selected

Perform one-time actions on plugin deactivation

mla_deactivation_hook() : void
static
since 0.40

Delete a custom field from the wp_postmeta table

mla_delete_custom_field( $value) : array
static
since 1.10

Arguments

$value

Response

array

Message(s) reflecting the results of the operation

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

mla_render_settings_page() : void
static
since 0.1

Only show screen options on the View and Upload tabs

mla_screen_options_show_screen_filter( $show_screen,  $this_screen) : boolean
static
since 1.40

Arguments

$show_screen

$this_screen

Response

boolean

True 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
since 1.40

Arguments

$status

$option

$value

Response

mixed

New 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
since 0.80
uses

Arguments

$key

$value

$option_table

Response

string

HTML markup for the option's table row

Constants

Slug for localizing and enqueueing JavaScript - MLA View List Table

JAVASCRIPT_INLINE_EDIT_VIEW_SLUG
since
var

Slug for localizing and enqueueing JavaScript - MLA Upload List Table

JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG
since
var

Slug for localizing and enqueueing JavaScript - MLA Custom Fields List Table

JAVASCRIPT_INLINE_EDIT_CUSTOM_SLUG
since
var

Slug for localizing and enqueueing JavaScript - MLA Custom tab

JAVASCRIPT_INLINE_MAPPING_CUSTOM_SLUG
since
var

Slug for localizing and enqueueing JavaScript - MLA IPTC/EXIF List Table

JAVASCRIPT_INLINE_EDIT_IPTC_EXIF_SLUG
since
var

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

JAVASCRIPT_INLINE_MAPPING_IPTC_EXIF_SLUG
since
var

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

JAVASCRIPT_INLINE_MAPPING_OBJECT
since
var

Properties

Holds screen id to match help text to corresponding screen

current_page_hook : array
static
since
var

Type(s)

array

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.

since
var

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.

since
var

Type(s)

array