\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).

Summary

Methods
Properties
Constants
__construct()
mla_views_media_page_mla_menu_filter()
mla_list_table_new_instance()
mla_wpml_media_view_upload_sql_filter()
mla_wpml_media_view_upload_count_filter()
mla_wpml_media_view_upload_page_sql_filter()
mla_wpml_media_view_upload_page_count_filter()
mla_list_table_submenu_arguments()
mla_list_table_get_columns()
mla_list_table_add_icl_styles()
mla_list_table_column_default()
mla_list_table_build_inline_data()
No public properties found
No constants found
No protected methods found
$mla_list_table
$language_columns
N/A
No private methods found
No private properties found
N/A

Properties

$mla_list_table

$mla_list_table : object

Reference to the MLA_List_Table object this object supports

Type

object

$language_columns

$language_columns : array

Table language column definitions

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

Type

array

Methods

__construct()

__construct(object  $table) : void

The constructor contains add_action and add_filter calls.

Parameters

object $table

The MLA_List_Table object this object supports

mla_views_media_page_mla_menu_filter()

mla_views_media_page_mla_menu_filter(  $views) : array

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

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

Parameters

$views

Returns

array —

Updated list of available list table views

mla_list_table_new_instance()

mla_list_table_new_instance(object  $mla_list_table) : object

Extend the MLA_List_Table class

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.

Parameters

object $mla_list_table

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

Returns

object —

updated mla_list_table object.

mla_wpml_media_view_upload_sql_filter()

mla_wpml_media_view_upload_sql_filter(  $sql,   $lang) : mixed

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

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.

Parameters

$sql
$lang

Returns

mixed —

updated SQL query string

mla_wpml_media_view_upload_count_filter()

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

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

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

Parameters

$count
$key
$view
$lang

Returns

mixed —

NULL to allow SQL query or replacement count value

mla_wpml_media_view_upload_page_sql_filter()

mla_wpml_media_view_upload_page_sql_filter(  $sql,   $lang) : mixed

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

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.

Parameters

$sql
$lang

Returns

mixed —

updated SQL query string

mla_wpml_media_view_upload_page_count_filter()

mla_wpml_media_view_upload_page_count_filter(  $count,   $lang) : mixed

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

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.

Parameters

$count
$lang

Returns

mixed —

NULL to allow SQL query or replacement count value

mla_list_table_submenu_arguments()

mla_list_table_submenu_arguments(array  $submenu_arguments,   $include_filters) : array

Filter the "sticky" submenu URL parameters

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

Parameters

array $submenu_arguments

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

$include_filters

Returns

array —

updated array of query arguments.

mla_list_table_get_columns()

mla_list_table_get_columns(array  $columns) : array

Filter the MLA_List_Table columns

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.

Parameters

array $columns

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

Returns

array —

updated array of columns.

mla_list_table_add_icl_styles()

mla_list_table_add_icl_styles() : void

Add styles for the icl_translations table column

mla_list_table_column_default()

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

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

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

Parameters

$content
$item
$column_name

Returns

string —

Text or HTML to be placed inside the column

mla_list_table_build_inline_data()

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

Filter the data for inline (Quick and Bulk) editing

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

Parameters

string $inline_data

The HTML markup for inline data.

object $item

The current Media Library item.

Returns

string —

updated HTML markup for inline data.