# MLA

Class MLA (Media Library Assistant) provides several enhancements to the handling of images and files held in the WordPress Media Library.

package | Media Library Assistant
since | 0.1

### Methods

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

    _build_inline_edit_form( $MLAListTable) : string

static

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

since | 0.20

### Arguments

#### $MLAListTable

``

### Response

`string`

HTML markup for hidden rows

## Ajax handler for bulk editing and mapping

    _bulk_edit_ajax_handler() : void

static

since | 2.00

## Compose a Post Type Options list with current selection

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

static

since | 1.90

### Arguments

#### $templates

``

#### $selection

``

### Response

`string`

HTML markup with select field options

## Get the current action selected from the bulk actions dropdown

    _current_bulk_action() : string|false

static

since | 0.1

### Response

`string|false`

The action name or False if no action was selected

## Delete a single item permanently

    _delete_single_item( $post_id) : array

static

since | 0.1

### Arguments

#### $post_id

``

### Response

`array`

success/failure message and NULL content

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

    _process_bulk_value( $post_id,  $bulk_value) : string

static

since | 1.80

### Arguments

#### $post_id

``

#### $bulk_value

``

### Response

`string`

Empty, or new value for the field

## Process secure file download

    _process_mla_download_file() : void

static

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

since | 2.00

## Restore a single item from the Trash

    _restore_single_item( $post_id) : array

static

since | 0.1

### Arguments

#### $post_id

``

### Response

`array`

success/failure message and NULL content

## Move a single item to Trash

    _trash_single_item( $post_id) : array

static

since | 0.1

### Arguments

#### $post_id

``

### Response

`array`

success/failure message and NULL content

## Initialization function, similar to __construct()

    initialize() : void

static

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.

since | 0.1

## Add contextual help tabs to all the MLA pages

    mla_add_help_tab() : void

static

since | 0.1

## Load the plugin's Style Sheet and Javascript files

    mla_admin_enqueue_scripts_action( $page_hook) : void

static

since | 0.1

### Arguments

#### $page_hook

``

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

    mla_admin_init_action() : void

static

since | 0.20

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

    mla_admin_print_styles_action()

static

since | 2.13

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

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

static

since | 0.20

### Arguments

#### $author

``

#### $name

``

#### $class

``

### Response

`string|false`

HTML markup for the dropdown field or False

## Clear the Media/Assistant submenu Filter-by variables

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

static

since | 2.13

### Arguments

#### $preserves

`array`

Filters to be retained

## Ajax handler for inline editing

    mla_inline_edit_ajax_action() : void

static

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

since | 0.20

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

    mla_load_media_action() : void

static

since | 1.60

## Displays name conflict error messages at the top of the Dashboard

    mla_name_conflict_reporting_action()

static

since | 2.11

## Cleanup menus for Edit Tags/Categories page

    mla_parent_file_filter( $parent_file) : string

static

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

since | 0.1

### Arguments

#### $parent_file

``

### Response

`string`

The updated top-level menu page

## Prepare Bulk Edit field-level updates

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

static

since | 2.11

### Arguments

#### $post_id

`integer`

Current post ID

#### $request

`array`

Form elements, e.g., from $_REQUEST

#### $custom_field_map

`array`

Form id to field name mapping

### Response

`array`

Non-empty form elements

## Process bulk action for one or more attachments

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

static

since | 2.00

### Arguments

#### $bulk_action

``

#### $request

``

### Response

`array`

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

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

    mla_render_admin_page() : void

static

since | 0.1

## Only show screen options on the table-list screen

    mla_screen_options_show_screen_filter( $show_screen,  $this_screen) : boolean

static

since | 0.1

### Arguments

#### $show_screen

``

#### $this_screen

``

### Response

`boolean`

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

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

    mla_set_parent_form( $return_form = true) : string

static

since | 1.90

### Arguments

#### $return_form

``

### Response

`string`

HTML markup for hidden form

## Save the "Entries per page" option set by this user

    mla_set_screen_option_filter( $status,  $option,  $value) : mixed

static

since | 0.1

### Arguments

#### $status

``

#### $option

``

#### $value

``

### Response

`mixed`

New value if this is our option, otherwise original status

### Constants

## Current date for Development Version, empty for production versions

    MLA_DEVELOPMENT_VERSION

since |
var |

## Object name for localizing JavaScript - MLA List Table

    JAVASCRIPT_INLINE_EDIT_OBJECT

since |
var |

### Properties

## Holds screen ids to match help text to corresponding screen

    page_hooks : array

static

since |
var |

### Type(s)

`array`

## Accumulates error messages from name conflict tests

    mla_language_support_error_messages :

static

since |

### Type(s)

``

## Holds [+index+] and [+found_rows+] values for MLAData_Source::_evaluate_data_source

    bulk_edit_data_source : array

static

since |
var |

### Type(s)

`array`