Documentation

MLASettings_Image

Class MLA (Media Library Assistant) Settings Image implements the Settings/Media Library Assistant Images tab

Tags
since
3.25

Table of Contents

Constants

JAVASCRIPT_INLINE_EDIT_IMAGE_OBJECT  = 'mla_inline_edit_settings_vars'
Object name for localizing JavaScript - MLA Image List Table

Methods

mla_admin_enqueue_scripts()  : mixed
Load the tab's Javascript files
mla_compose_image_tab()  : array<string|int, mixed>
Compose the Post MIME Type Images tab content for the Settings subpage
mla_inline_edit_image_action()  : void
Ajax handler for Post MIME Types inline editing (quick edit)
_compose_edit_image_tab()  : array<string|int, mixed>
Compose the Edit Image tab content for the Settings subpage
_get_crop_location_dropdown()  : string
Get an HTML select element representing a crop location
_sanitize_image_item()  : array<string|int, mixed>
Validate an incoming $_REQUEST['mla_image_item']
_sanitize_inline_image_item()  : array<string|int, mixed>
Validate an incoming $_REQUEST for the Quick Edit area
_save_image_settings()  : array<string|int, mixed>
Save Image settings to the options table

Constants

JAVASCRIPT_INLINE_EDIT_IMAGE_OBJECT

Object name for localizing JavaScript - MLA Image List Table

public string JAVASCRIPT_INLINE_EDIT_IMAGE_OBJECT = 'mla_inline_edit_settings_vars'
Tags
since
3.25

Methods

mla_admin_enqueue_scripts()

Load the tab's Javascript files

public static mla_admin_enqueue_scripts(string $page_hook) : mixed
Parameters
$page_hook : string

Name of the page being loaded

Tags
since
3.25

mla_compose_image_tab()

Compose the Post MIME Type Images tab content for the Settings subpage

public static mla_compose_image_tab() : array<string|int, mixed>
Tags
since
3.25
Return values
array<string|int, mixed>

'message' => status/error messages, 'body' => tab content

mla_inline_edit_image_action()

Ajax handler for Post MIME Types inline editing (quick edit)

public static mla_inline_edit_image_action() : void

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

Tags
since
3.25
Return values
void

echo HTML markup for updated row or error message, then die()

_compose_edit_image_tab()

Compose the Edit Image tab content for the Settings subpage

private static _compose_edit_image_tab(mixed $item, mixed $templates) : array<string|int, mixed>
Parameters
$item : mixed
$templates : mixed
Tags
since
3.25
Return values
array<string|int, mixed>

'message' => status/error messages, 'body' => tab content

_get_crop_location_dropdown()

Get an HTML select element representing a crop location

private static _get_crop_location_dropdown(mixed $templates, mixed $name, mixed $dimension[, mixed $selection = 'center' ]) : string
Parameters
$templates : mixed
$name : mixed
$dimension : mixed
$selection : mixed = 'center'
Tags
since
3.25
Return values
string

HTML select element or empty string on failure.

_sanitize_image_item()

Validate an incoming $_REQUEST['mla_image_item']

private static _sanitize_image_item() : array<string|int, mixed>
Tags
since
3.25
Return values
array<string|int, mixed>

Sanitized image item

_sanitize_inline_image_item()

Validate an incoming $_REQUEST for the Quick Edit area

private static _sanitize_inline_image_item() : array<string|int, mixed>
Tags
since
3.25
Return values
array<string|int, mixed>

Sanitized image item

_save_image_settings()

Save Image settings to the options table

private static _save_image_settings() : array<string|int, mixed>
Tags
since
3.25
Return values
array<string|int, mixed>

Message(s) reflecting the results of the operation


        
On this page

Search results