Constants

MLA_DEVELOPMENT_VERSION

MLA_DEVELOPMENT_VERSION

Current date for Development Version, empty for production versions

JAVASCRIPT_INLINE_EDIT_OBJECT

JAVASCRIPT_INLINE_EDIT_OBJECT

Object name for localizing JavaScript - MLA List Table

MLA_ADMIN_SINGLE_EDIT_DISPLAY

MLA_ADMIN_SINGLE_EDIT_DISPLAY

mla_admin_action value to display a single item for editing

Used by class-mla-view-list-table.php and class-mla-upload-list-table.php

MLA_ADMIN_SINGLE_EDIT_UPDATE

MLA_ADMIN_SINGLE_EDIT_UPDATE

mla_admin_action value for updating a single item

Used by class-mla-view-list-table.php and class-mla-upload-list-table.php

MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP

MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP

mla_admin_action value for mapping Custom Field metadata

MLA_ADMIN_SINGLE_MAP

MLA_ADMIN_SINGLE_MAP

mla_admin_action value for mapping IPTC/EXIF metadata

MLA_ADMIN_SET_PARENT

MLA_ADMIN_SET_PARENT

mla_admin_action value for setting an item's parent object

Properties

$page_hooks

$page_hooks : array

Holds screen ids to match help text to corresponding screen

Type

array

$mla_language_support_error_messages

$mla_language_support_error_messages : 

Accumulates error messages from name conflict tests

Type

Methods

mla_name_conflict_reporting_action()

mla_name_conflict_reporting_action() 

Displays name conflict error messages at the top of the Dashboard

initialize()

initialize() : void

Initialization function, similar to __construct()

This function contains add_action and add_filter calls to set up the Ajax handlers, enqueue JavaScript and CSS files, and set up the Assistant submenu.

mla_admin_init_action()

mla_admin_init_action() : void

Load the plugin's Ajax handler or process Edit Media update actions

mla_admin_print_styles_action()

mla_admin_print_styles_action() 

Print optional in-lne styles for Media/Assistant submenu table

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 the submenu pages

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

mla_load_media_action()

mla_load_media_action() : void

Redirect to Media/Assistant if Media/Library is hidden or a trash/delete returns from Media/Edit Media initiated from Media/Assistant

mla_add_menu_options()

mla_add_menu_options() : void

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

mla_add_help_tab()

mla_add_help_tab() : 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 table-list screen

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 "Entries per page" option set by this user

Parameters

$status
$option
$value

Returns

string|void —

New value if this is our option, otherwise nothing

mla_parent_file_filter()

mla_parent_file_filter(  $parent_file) : string

Cleanup menus for Edit Tags/Categories page

Fixes the submenu bolding when going to the Edit Media screen.

Parameters

$parent_file

Returns

string —

The updated top-level menu page

mla_prepare_bulk_edits()

mla_prepare_bulk_edits(integer  $post_id, array  $request, array  $custom_field_map) : array

Prepare Bulk Edit field-level updates

Parameters

integer $post_id

Current post ID

array $request

Form elements, e.g., from $_REQUEST

array $custom_field_map

Form id to field name mapping

Returns

array —

Non-empty form elements

mla_process_bulk_action()

mla_process_bulk_action(  $bulk_action,   $request = NULL) : array

Process bulk action for one or more attachments

Parameters

$bulk_action
$request

Returns

array —

messages and page content: ( 'message', 'body', 'unchanged', 'success', 'failure', 'item_results' )

mla_clear_filter_by()

mla_clear_filter_by(array  $preserves = array()) : void

Clear the Media/Assistant submenu Filter-by variables

Parameters

array $preserves

Filters to be retained

mla_render_admin_page()

mla_render_admin_page() : void

Render the "Assistant" subpage in the Media section, using the list_table package

mla_inline_edit_ajax_action()

mla_inline_edit_ajax_action() : void

Ajax handler for inline editing

Adapted for Quick Edit from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php

mla_set_parent_form()

mla_set_parent_form(  $return_form = true) : string

Build the hidden form for the "Set Parent" popup modal window

Parameters

$return_form

Returns

string —

HTML

markup for hidden form

mla_authors_dropdown()

mla_authors_dropdown(  $author,   $name = 'post_author',   $class = 'authors') : string|false

Get the edit Authors dropdown box, if user has suitable permissions

Parameters

$author
$name
$class

Returns

string|false —

HTML markup for the dropdown field or False

_process_mla_download_file()

_process_mla_download_file() : void

Process secure file download

Requires _wpnonce, mla_download_file and mla_download_type in $_REQUEST; mla_download_disposition is optional.

_process_bulk_value()

_process_bulk_value(  $post_id,   $bulk_value) : string

Process bulk edit area fields, which may contain a Content Template

Parameters

$post_id
$bulk_value

Returns

string —

Empty, or new value for the field

_bulk_edit_ajax_handler()

_bulk_edit_ajax_handler() : void

Ajax handler for bulk editing and mapping

_compose_post_type_select()

_compose_post_type_select(  $templates,   $selection = 'all') : string

Compose a Post Type Options list with current selection

Parameters

$templates
$selection

Returns

string —

HTML markup with select field options

_build_inline_edit_form()

_build_inline_edit_form(  $MLAListTable) : string

Build the hidden row templates for inline editing (quick and bulk edit)

inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.

Parameters

$MLAListTable

Returns

string —

HTML markup for hidden rows

_current_bulk_action()

_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

_delete_single_item()

_delete_single_item(  $post_id) : array

Delete a single item permanently

Parameters

$post_id

Returns

array —

success/failure message and NULL content

_restore_single_item()

_restore_single_item(  $post_id) : array

Restore a single item from the Trash

Parameters

$post_id

Returns

array —

success/failure message and NULL content

_trash_single_item()

_trash_single_item(  $post_id) : array

Move a single item to Trash

Parameters

$post_id

Returns

array —

success/failure message and NULL content