MLA_WPML_Table

Class MLA (Media Library Assistant) WPML Table provides support for the WPML Multilingual CMS family of plugins, including WPML Media, for an MLA_List_Table object.

An instance of this class is created in the class MLA_List_Table constructor (class-mla-list-table.php).

package

Media Library Assistant

since 2.11

Methods

The constructor contains add_action and add_filter calls.

__construct(object $table) : void
since 2.11

Arguments

$table

object

The MLA_List_Table object this object supports

Add styles for the icl_translations table column

mla_list_table_add_icl_styles() : void
static
since 2.11

Filter the data for inline (Quick and Bulk) editing

mla_list_table_build_inline_data(string $inline_data, object $item) : string
static

Adds a 'lang' value for the JS Quick Edit function.

since 2.15

Arguments

$inline_data

string

The HTML markup for inline data.

$item

object

The current Media Library item.

Response

string

updated HTML markup for inline data.

Supply a column value if no column-specific function has been defined

mla_list_table_column_default( $content,  $item,  $column_name) : string

Fills in the Language columns with the item's translation status values.

since 2.11

Arguments

$content

$item

$column_name

Response

string

Text or HTML to be placed inside the column

Filter the MLA_List_Table columns

mla_list_table_get_columns(array $columns) : array
static

Inserts the language columns just after the item thumbnail column. Defined as static because it is called before the List_Table object is created. Added as a filter when the file is loaded.

since 2.11

Arguments

$columns

array

An array of columns. format: column_slug => Column Label

Response

array

updated array of columns.

Extend the MLA_List_Table class

mla_list_table_new_instance(object $mla_list_table) : object
static

Adds a protected variable holding a reference to the WPML_List_Table object, then creates the WPML_List_Table passing it a reference to the new "parent" object.

since 2.11

Arguments

$mla_list_table

object

NULL, to indicate no extension/use the base class.

Response

object

updated mla_list_table object.

Filter the "sticky" submenu URL parameters

mla_list_table_submenu_arguments(array $submenu_arguments,  $include_filters) : array
static

Adds a language ('lang') parameter to the URL parameters that will be retained when the submenu page refreshes.

since 2.11

Arguments

$submenu_arguments

array

An array of query arguments. format: attribute => value

$include_filters

Response

array

updated array of query arguments.

Handler for filter "views_{$this->screen->id}" in /wp-admin/includes/class-wp-list-table.php

mla_views_media_page_mla_menu_filter( $views) : array
static

Filter the list of available list table views, calling the WPML filter that adds language-specific views.

since 2.11

Arguments

$views

Response

array

Updated list of available list table views

Handler for filter "wpml-media_view-upload-count" in /plugins/wpml-media/inc/wpml-media.class.php

mla_wpml_media_view_upload_count_filter( $count,  $key,  $view,  $lang) : mixed

Computes the number of attachments that satisfy a meta_query specification. The count is automatically made language-specific by WPML filters.

since 2.11

Arguments

$count

$key

$view

$lang

Response

mixed

NULL to allow SQL query or replacement count value

Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php

mla_wpml_media_view_upload_page_count_filter( $count,  $lang) : mixed

Computes the number of language-specific attachments that satisfy a meta_query specification. The count is made language-specific by WPML filters when the current_language is set.

since 2.11

Arguments

$count

$lang

Response

mixed

NULL to allow SQL query or replacement count value

Handler for filter "wpml-media_view-upload-page-sql" in /plugins/wpml-media/inc/wpml-media.class.php

mla_wpml_media_view_upload_page_sql_filter( $sql,  $lang) : mixed

Computes the number of language-specific attachments that satisfy a meta_query specification. The count is made language-specific by WPML filters when the current_language is set.

since 2.11

Arguments

$sql

$lang

Response

mixed

updated SQL query string

Handler for filter "wpml-media_view-upload-sql" in /plugins/wpml-media/inc/wpml-media.class.php

mla_wpml_media_view_upload_sql_filter( $sql,  $lang) : mixed

Computes the number of language-specific attachments that satisfy a meta_query specification. The count is made language-specific by WPML filters when the current_language is set.

since 2.11

Arguments

$sql

$lang

Response

mixed

updated SQL query string

Properties

Reference to the MLA_List_Table object this object supports

mla_list_table : object
since
var

Type(s)

object

Table language column definitions

language_columns : array
static

Defined as static because it is used before the List_Table object is created.

since
var

Type(s)

array