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
Ajax handler for bulk editing and mapping
_bulk_edit_ajax_handler() : void
static
Compose a Post Type Options list with current selection
_compose_post_type_select( &$templates, $selection = 'all') : string
static
Arguments
Response
stringHTML markup with select field options
Get the current action selected from the bulk actions dropdown
_current_bulk_action() : string|false
static
Response
string|falseThe action name or False if no action was selected
Delete a single item permanently
_delete_single_item( $post_id) : array
static
Arguments
Response
arraysuccess/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
Arguments
Response
stringEmpty, 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.
Restore a single item from the Trash
_restore_single_item( $post_id) : array
static
Arguments
Response
arraysuccess/failure message and NULL content
Move a single item to Trash
_trash_single_item( $post_id) : array
static
Arguments
Response
arraysuccess/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.
Add contextual help tabs to all the MLA pages
mla_add_help_tab() : void
static
Load the plugin's Style Sheet and Javascript files
mla_admin_enqueue_scripts_action( $page_hook) : void
static
Load the plugin's Ajax handler or process Edit Media update actions
mla_admin_init_action() : void
static
Print optional in-lne styles for Media/Assistant submenu table
mla_admin_print_styles_action()
static
Get the edit Authors dropdown box, if user has suitable permissions
mla_authors_dropdown( $author, $name = 'post_author', $class = 'authors') : string|false
static
Arguments
Response
string|falseHTML markup for the dropdown field or False
Clear the Media/Assistant submenu Filter-by variables
mla_clear_filter_by(array $preserves = array()) : void
static
Arguments
$preserves
arrayFilters 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
Displays name conflict error messages at the top of the Dashboard
mla_name_conflict_reporting_action()
static
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.
Arguments
Response
stringThe 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
Arguments
$post_id
integerCurrent post ID
$request
arrayForm elements, e.g., from $_REQUEST
$custom_field_map
arrayForm id to field name mapping
Response
arrayNon-empty form elements
Process bulk action for one or more attachments
mla_process_bulk_action( $bulk_action, $request = NULL) : array
static
Arguments
Response
arraymessages 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
Only show screen options on the table-list screen
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 "Entries 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
Constants
Current date for Development Version, empty for production versions
MLA_DEVELOPMENT_VERSION
Object name for localizing JavaScript - MLA List Table
JAVASCRIPT_INLINE_EDIT_OBJECT
Properties
Holds screen ids to match help text to corresponding screen
page_hooks : array
static
Accumulates error messages from name conflict tests
mla_language_support_error_messages :
static
Holds [+index+] and [+found_rows+] values for MLAData_Source::_evaluate_data_source
bulk_edit_data_source : array
static