mla_get_data_source()
mla_is_data_source()
_evaluate_array_result()
_evaluate_data_source()
_evaluate_file_information()
_evaluate_post_information()
$custom_field_data_sources
Class MLA (Media Library Assistant) Data Source manages data sources for custom field mapping and shortcode execution
package | Media Library Assistant |
---|---|
since | 2.20 |
mla_get_data_source(integer $post_id, string $category, array $data_value, array $attachment_metadata) : string | array
Defined as public so MLA Mapping Hooks clients can call it. Isolates clients from changes to _evaluate_data_source().
since | 2.20 |
---|
integer
post->ID of attachment
string
category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
array
data source specification ( name, *data_source, *keep_existing, *format, mla_column, quick_edit, bulk_edit, *meta_name, *option, no_null )
array
(optional) _wp_attachment_metadata, default NULL (use current postmeta database value)
string
array
data source valuemla_is_data_source(string $candidate_name) : boolean
Determines whether a name matches any of the element-level data source dropdown options, i.e., excludes "template:" and "meta:" values.
since | 2.20 |
---|
string
candidate data source name
boolean
true if candidate name matches a data source_evaluate_array_result(array $value, string $option, boolean $keep_existing) : mixed
since | 2.20 |
---|
array
field value(s)
string
format option text|single|export|array|multi
boolean
keep existing value(s) - for 'multi' option
mixed
array for option = array|multi else string_evaluate_data_source(integer $post_id, string $category, array $data_value, array $attachment_metadata) : string | array
since | 2.20 |
---|
integer
post->ID of attachment
string
category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
array
data source specification ( name, *data_source, *keep_existing, *format, mla_column, quick_edit, bulk_edit, *meta_name, *option, no_null )
array
(optional) _wp_attachment_metadata, default NULL (use current postmeta database value)
string
array
data source value_evaluate_file_information(string $upload_dir, array $wp_attached_files, array $wp_attachment_metadata, integer $post_id) : array
since | 2.20 |
---|
string
absolute path the the uploads base directory
array
_wp_attached_file meta_value array, indexed by post_id
array
_wp_attachment_metadata meta_value array, indexed by post_id
integer
post->ID of attachment
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_evaluate_post_information(integer $post_id, string $category, string $data_source) : mixed
since | 2.20 |
---|
integer
post->ID of attachment
string
category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
string
data source name ( post_date or post_parent )
mixed
(string)/'' or (integer)/0 depending on $data_source type$custom_field_data_sources : array
since | 2.20 |
---|