MLAData_Source

Class MLA (Media Library Assistant) Data Source manages data sources for custom field mapping and shortcode execution

package

Media Library Assistant

since 2.20

Methods

Evaluate post information for custom field mapping

_evaluate_array_result( $value,  $option,  $keep_existing) : mixed
static
since 2.20

Arguments

$value

$option

$keep_existing

Response

mixed

array for option = array|multi else string

Evaluate custom field mapping data source

_evaluate_data_source( $post_id,  $category,  $data_value,  $attachment_metadata = NULL) : string|array
static
since 2.20

Arguments

$post_id

$category

$data_value

$attachment_metadata

Response

string|array

data source value

Evaluate file information for custom field mapping

_evaluate_file_information( $upload_dir,  &$wp_attached_files,  &$wp_attachment_metadata,  $post_id) : array
static
since 2.20

Arguments

$upload_dir

$wp_attached_files

$wp_attachment_metadata

$post_id

Response

array

absolute_path_raw, absolute_path, absolute_file_name_raw, absolute_file_name, absolute_file, base_file, path, file_name, extension, dimensions, width, height, hwstring_small, array of intermediate sizes

Get IPTC/EXIF or custom field mapping data source

mla_get_data_source( $post_id,  $category,  $data_value,  $attachment_metadata = NULL) : string|array
static

Defined as public so MLA Mapping Hooks clients can call it. Isolates clients from changes to _evaluate_data_source().

since 2.20

Arguments

$post_id

$category

$data_value

$attachment_metadata

Response

string|array

data source value

Identify custom field mapping data source

mla_is_data_source( $candidate_name) : boolean
static

Determines whether a name matches any of the element-level data source dropdown options, i.e., excludes "template:" and "meta:" values.

since 2.20

Arguments

$candidate_name

Response

boolean

true if candidate name matches a data source

Properties

Array of Data Source names for custom field mapping

custom_field_data_sources : array
static
since
var

Type(s)

array