\MLASettings_CustomFields

Class MLA (Media Library Assistant) Settings Custom Fields implements the Settings/Media Library Assistant Custom Fields tab

Summary

Methods
Properties
Constants
mla_admin_enqueue_scripts()
mla_compose_custom_field_tab()
mla_inline_mapping_custom_action()
mla_inline_edit_custom_action()
No public properties found
JAVASCRIPT_INLINE_EDIT_CUSTOM_OBJECT
No protected methods found
No protected properties found
N/A
_save_custom_field_settings()
_process_custom_field_mapping()
_add_custom_field_rule()
_update_custom_field_rule()
_delete_custom_field_rule()
_bulk_update_custom_field_rule()
_compose_edit_custom_field_rule_tab()
_purge_custom_field_values()
No private properties found
N/A

Constants

JAVASCRIPT_INLINE_EDIT_CUSTOM_OBJECT

JAVASCRIPT_INLINE_EDIT_CUSTOM_OBJECT

Object name for localizing JavaScript - MLA Custom Fields List Table

Methods

mla_admin_enqueue_scripts()

mla_admin_enqueue_scripts(string  $page_hook) 

Load the tab's Javascript files

Parameters

string $page_hook

Name of the page being loaded

mla_compose_custom_field_tab()

mla_compose_custom_field_tab() : array

Compose the Custom Field tab content for the Settings subpage

Returns

array —

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

mla_inline_mapping_custom_action()

mla_inline_mapping_custom_action() : void

Ajax handler for Custom Fields tab inline mapping

mla_inline_edit_custom_action()

mla_inline_edit_custom_action() : void

Ajax handler for Custom Fields inline editing (quick edit)

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

_save_custom_field_settings()

_save_custom_field_settings(  $new_values = NULL) : array

Save custom field settings to the options table

Parameters

$new_values

Returns

array —

Message(s) reflecting the results of the operation

_process_custom_field_mapping()

_process_custom_field_mapping(  $settings = NULL,   $offset,   $length) : array

Process custom field settings against all image attachments

Parameters

$settings
$offset
$length

Returns

array —

Message(s) reflecting the results of the operation

_add_custom_field_rule()

_add_custom_field_rule() : string

Add a custom field rule from values in $_REQUEST

Returns

string —

Message(s) reflecting the results of the operation

_update_custom_field_rule()

_update_custom_field_rule(integer  $post_id,   $template) : array

Update a custom field rule from full-screen Edit Rule values in $_REQUEST

Parameters

integer $post_id

ID value of rule to update

$template

Returns

array —

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

_delete_custom_field_rule()

_delete_custom_field_rule(integer  $post_id) : array

Delete a custom field rule

Parameters

integer $post_id

ID value of rule to delete

Returns

array —

Message(s) reflecting the results of the operation

_bulk_update_custom_field_rule()

_bulk_update_custom_field_rule(integer  $post_id) : string

Update a custom field rule from Bulk Edit action values in $_REQUEST

Parameters

integer $post_id

ID value of rule to update

Returns

string —

status/error message

_compose_edit_custom_field_rule_tab()

_compose_edit_custom_field_rule_tab(array  $item,   $template) : array

Compose the Edit Custom Field Rule tab content for the Settings/Custom Field subpage

Parameters

array $item

Data values for the item.

$template

Returns

array —

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

_purge_custom_field_values()

_purge_custom_field_values(array  $rule_ids) : array

Purge one or more custom field vaues for Bulk action

Parameters

array $rule_ids

ID value of rule(s), to get field names

Returns

array —

Message(s) reflecting the results of the operation