admin_init()
attachment_fields_to_save()
edit_attachment()
initialize()
mla_get_options_tablist()
mla_get_terms_clauses()
mla_get_terms_query_arguments()
mla_list_table_bulk_action_initial_request()
mla_list_table_bulk_action_item_request()
mla_list_table_custom_admin_action()
mla_list_table_inline_action()
mla_localize_language_option_definitions()
mla_media_modal_begin_update_compat_fields()
mla_media_modal_end_update_compat_fields()
mla_media_modal_update_compat_fields_terms()
mla_render_language_tab()
post_updated_messages()
wpml_media_create_duplicate_attachment()
_add_relevant_term()
_apply_synch_input()
_apply_tax_input()
_build_existing_terms()
_build_tax_input()
_get_relevant_term()
_reset_language_settings()
_save_language_settings()
_update_existing_terms()
$mla_language_option_definitions
$all_query_parameters
$duplicate_attachments
$existing_terms
$relevant_terms
$tax_input
$upload_bulk_edit_args
$upload_bulk_edit_map
Class MLA (Media Library Assistant) WPML provides support for the WPML Multilingual CMS family of plugins, including WPML Media
package | Media Library Assistant |
---|---|
since | 2.11 |
admin_init() : void
since | 2.11 |
---|
initialize() : void
This function contains add_action and add_filter calls.
since | 2.11 |
---|
mla_get_terms_clauses(array $clauses) : array
Adds language-specific clauses to filter the cloud terms.
since | 2.11 |
---|
array
SQL clauses ( 'fields', 'join', 'where', 'order', 'orderby', 'limits' )
array
updated SQL clausesmla_get_terms_query_arguments(array $all_query_parameters) : array
Saves [mla_tag_cloud] query parameters for use in MLA_WPML::mla_get_terms_clauses.
since | 2.11 |
---|---|
uses | \global\MLA_WPML::$all_query_parameters |
array
shortcode arguments merged with attachment selection defaults, so every possible parameter is present
array
updated attachment query argumentsmla_list_table_bulk_action_initial_request(array $request, string $bulk_action, array $custom_field_map) : array
since | 2.11 |
---|
array
bulk action request parameters, including ['mla_bulk_action_do_cleanup'].
string
the requested action.
array
[ slug => field_name ]
array
updated bulk action request parametersmla_list_table_bulk_action_item_request(array $request, string $bulk_action, integer $post_id, array $custom_field_map) : array
since | 2.11 |
---|
array
bulk action request parameters, including ['mla_bulk_action_do_cleanup'].
string
the requested action.
integer
the affected attachment.
array
[ slug => field_name ]
array
updated bulk action request parametersmla_list_table_custom_admin_action(string $mla_admin_action, integer $mla_item_ID)
since | 2.11 |
---|
string
the requested action.
integer
zero (0), or the affected attachment.
mla_list_table_inline_action(array $item_content, integer $post_id) : object
since | 2.11 |
---|
array
NULL, to indicate no handler.
integer
the affected attachment.
object
updated $item_content. NULL if no handler, otherwise ( 'message' => error or status message(s), 'body' => '', 'prevent_default' => true to bypass the MLA handler )mla_localize_language_option_definitions() : void
Localization must be done at runtime, and these calls cannot be placed in the "public static" array definition itself.
since | 2.11 |
---|
mla_media_modal_begin_update_compat_fields(object $post)
since | 2.11 |
---|
object
the current post
mla_media_modal_end_update_compat_fields(string $results, array $taxonomies, object $post)
since | 2.11 |
---|
string
HTML markup for the taxonomy meta box elements
array
supported taxonomy objects
object
current post object
mla_media_modal_update_compat_fields_terms(array $terms, string $key, object $value, integer $post_id)
since | 2.11 |
---|
array
assigned term id/name values
string
taxonomy slug
object
taxonomy object
integer
current post ID
mla_render_language_tab() : array
since | 2.11 |
---|
array
( 'message' => '', 'body' => '' )_add_relevant_term(object $term, object $translations)
since | 2.11 |
---|---|
uses | \global\MLA_WPML::$relevant_terms |
object
WordPress term object
object
Sitepress translations object; optional
_apply_synch_input(string $language) : array
Assumes the "current post" in $existing_terms is the source and $existing_terms contains the target translation
since | 2.11 |
---|---|
uses | \global\MLA_WPML::$existing_terms |
string
the target translation code
array
$tax_inputs for Term Synchronization_apply_tax_input(integer $post_id, string $post_language) : array
since | 2.11 |
---|---|
uses | \global\MLA_WPML::$tax_input |
uses | \global\MLA_WPML::$existing_terms |
integer
ID of the post to be updated
string
explicit language_code; optional
array
language-specific $tax_inputs_build_existing_terms(integer $post_id)
Takes each translatable taxonomy and builds an array of language-specific term_id to term_id/term_name mappings for terms already assigned to the item translation.
since | 2.11 |
---|---|
uses | \global\MLA_WPML::$existing_terms |
uses | \global\MLA_WPML::$relevant_terms |
integer
ID of the current post
_build_tax_input(integer $post_id, array $tax_inputs, array $tax_actions)
Takes each term from the $tax_inputs parameter and builds an array of language-specific term_id to term_id/term_name mappings for all languages.
since | 2.11 |
---|---|
uses | \global\MLA_WPML::$tax_input |
uses | \global\MLA_WPML::$existing_terms |
integer
ID of the current post
array
'tax_input' request parameter
array
'tax_action' request parameter
_get_relevant_term(string $field, mixed $value, string $taxonomy, string $language, boolean $test_only)
since | 2.11 |
---|---|
uses | \global\MLA_WPML::$relevant_terms |
string
to search in; 'id', 'name', or 'term_taxonomy_id'
mixed
to search for; integer, string or integer
string
to search in; slug
string
code; string; optional
boolean
false (default) to add missing term, true to leave term out
_reset_language_settings() : array
since | 2.11 |
---|
array
Message(s) reflecting the results of the operation_save_language_settings() : array
since | 2.11 |
---|---|
uses | \global\$_REQUEST |
array
Message(s) reflecting the results of the operation_update_existing_terms(integer $post_id) : array
Takes each translatable taxonomy and rebuilds the array of language-specific term_id to term_id/term_name mappings for the "current translation" represented by the $post_id.
since | 2.11 |
---|---|
uses | \global\MLA_WPML::$existing_terms |
uses | \global\MLA_WPML::$relevant_terms |
integer
ID of the current post
array
( taxonomy => term assignments ) before the update$mla_language_option_definitions
The array must be populated at runtime in MLA_WPML::mla_localize_language_option_definitions(), because localization calls cannot be placed in the "public static" array definition itself.
Each option is defined by an array with the elements documented in class-mla-options.php
$all_query_parameters : array
since | 2.11 |
---|
$existing_terms : array
since | 2.11 |
---|
$relevant_terms : array
NOTE: WPML uses term_taxonomy_id as the "element_id" in its translations; Polylang uses term_id as the "element_id".
since | 2.11 |
---|
$tax_input : array
since | 2.11 |
---|
$upload_bulk_edit_args : array
since | 2.11 |
---|
$upload_bulk_edit_map : array
since | 2.11 |
---|