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

Parameters

$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

since 2.11

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

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

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

since 2.11

Parameters

$content

string

NULL, indicating no default content

$item

array

A singular item (one full row's worth of data)

$column_name

array

The name/slug of the column to be processed

Returns

stringText or HTML to be placed inside the column

Filter the MLA_List_Table columns

mla_list_table_get_columns(array $columns) : array

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

Parameters

$columns

array

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

Returns

arrayupdated array of columns.

Extend the MLA_List_Table class

mla_list_table_new_instance(object $mla_list_table) : object

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

Parameters

$mla_list_table

object

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

Returns

objectupdated mla_list_table object.

Filter the MLA_List_Table columns

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

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

Parameters

$submenu_arguments

array

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

$include_filters

boolean

Include the "click filter" values in the results

Returns

arrayupdated 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(array $views) : array

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

since 2.11

Parameters

$views

array

A list of available list table views

Returns

arrayUpdated 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(NULL $count, string $key, string $view, string $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

Parameters

$count

NULL

default return value if not replacing count

$key

string

key/slug value for the selected view

$view

string

HTML tag for the link to the selected view

$lang

string

language code, e.g., 'en', 'es'

Returns

mixedNULL 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(NULL $count, string $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

Parameters

$count

NULL

default return value if not replacing count

$lang

string

language code, e.g., 'en', 'es'

Returns

mixedNULL 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(string $sql, string $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

Parameters

$sql

string

SQL query string

$lang

string

language code, e.g., 'en', 'es'

Returns

mixedupdated 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(string $sql, string $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

Parameters

$sql

string

SQL query string

$lang

string

language code, e.g., 'en', 'es'

Returns

mixedupdated SQL query string

 Properties

 

Table language column definitions

$language_columns : array

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

since 2.11
 

Reference to the MLA_List_Table object this object supports

$mla_list_table : object

since 2.11