Class MLA (Media Library Assistant) Example List Table implements the searchable database of example plugins for the "Documentation" admin settings tab
Extends the core WP_List_Table class.
| package |
Media Library Assistant |
|---|---|
| since | 2.32 |
__construct() : void
| since | 2.32 |
|---|---|
_build_rollover_actions( $item, $column) : array
| since | 2.32 |
|---|
arrayNames and URLs of row-level actions
_count_example_items( $request) : integer
| since | 2.32 |
|---|
integerNumber of MLA example_plugin objects
_default_hidden_columns() : array
| since | 2.32 |
|---|---|
arraydefault list of hidden columns
_execute_example_items_query( $request) : array
| since | 2.32 |
|---|
arrayquery results; array of MLA post_mime_type objects
_get_example_plugin_items( $force_refresh = false) : boolean
| since | 2.32 |
|---|
booleanSuccess (true) or failure (false) of the operation
_get_view( $view_slug, $example_item, $current_view) : string
| since | 2.32 |
|---|
string| false HTML for link to display the view, false if count = zero
_localize_default_columns_array() : void
| since | 2.32 |
|---|---|
_prepare_example_items_query( $raw_request, $offset, $count) : array
| since | 2.32 |
|---|
arrayrevised arguments suitable for query
_process_example_plugin( $ID, $update = false) : string
| since | 2.32 |
|---|
stringempty or error message
_query_example_items( $request, $offset, $count) : array
| since | 2.32 |
|---|
arrayMLA example_plugin objects
_sort_uname_callback( $a, $b) : integer
| since | 2.32 |
|---|
integerThe comparison result
_tabulate_example_items( $s = '') : array
| since | 2.32 |
|---|
array( 'singular' label, 'plural' label, 'count' of items )
_update_example_plugin( $ID, $key, $value) : boolean
| since | 2.32 |
|---|
booleantrue if object exists else false
column_cb( $item) : string
| since | 2.32 |
|---|
stringHTML markup to be placed inside the column
column_default( $item, $column_name) : string
Called when the parent class can't find a method specifically built for a given column. All columns should have a specific method, so this function returns a troubleshooting message.
| since | 2.32 |
|---|
stringText or HTML to be placed inside the column
column_description( $item) : string
| since | 2.32 |
|---|
stringHTML markup to be placed inside the column
column_file( $item) : string
| since | 2.32 |
|---|
stringHTML markup to be placed inside the column
column_installed_version( $item) : string
| since | 2.32 |
|---|
stringHTML markup to be placed inside the column
column_name( $item) : string
| since | 2.32 |
|---|
stringHTML markup to be placed inside the column
column_version( $item) : string
| since | 2.32 |
|---|
stringHTML markup to be placed inside the column
get_bulk_actions() : array
| since | 2.32 |
|---|---|
arrayContains all the bulk actions: 'slugs'=>'Visible Titles'
get_columns() : array
| since | 2.32 |
|---|---|
arrayColumn information: 'slugs'=>'Visible Titles'
get_default_primary_column_name() : string
| since | 2.32 |
|---|---|
| access |
protected |
stringName of the default primary column
get_hidden_columns() : array
| since | 2.32 |
|---|---|
arrayColumn information,e.g., array(0 => 'ID_parent, 1 => 'title_name')
get_sortable_columns() : array
| since | 2.32 |
|---|---|
arraySortable column information,e.g., 'slugs'=>array('data_values',boolean)
get_views() : array
These are listed across the top of the page and managed by WordPress.
| since | 2.32 |
|---|---|
arrayView information,e.g., array ( id => link )
mla_admin_init() : void
| since | 2.32 |
|---|---|
mla_admin_print_styles_action()
| since | 2.32 |
|---|---|
mla_find_example_plugin( $ID) : mixed
| since | 2.32 |
|---|
mixedMLA example_plugin object if it exists else false
mla_get_sortable_columns() : array
| since | 2.32 |
|---|---|
arrayname => array( orderby value, heading ) for sortable columns
mla_install_example_plugin( $ID) : string
| since | 2.32 |
|---|
stringstatus/error messages
mla_manage_columns_filter() : array
This required filter dictates the table's columns and titles. Set when the file is loaded because the list_table object isn't created in time to affect the "screen options" setup.
| since | 2.32 |
|---|---|
arraylist of table columns
mla_manage_hidden_columns_filter( $result, $option, $user_data) : array
Required because the screen.php get_hidden_columns function only uses the get_user_option result. Set when the file is loaded because the object is not created in time for the call from screen.php.
| since | 2.32 |
|---|
arrayupdated list of hidden columns
mla_update_example_plugin( $ID) : string
| since | 2.32 |
|---|
stringstatus/error messages
prepare_items() : void
This is where you prepare your data for display. This method will usually be used to query the database, sort and filter the data, and generally get it ready to be displayed. At a minimum, we should set $this->items and $this->set_pagination_args().
| since | 2.32 |
|---|---|
single_row( $item) : void
| since | 2.32 |
|---|
default_columns : array
This array defines table columns and titles where the key is the column slug (and class) and the value is the column's title text.
All of the columns are added to this array by MLA_Example_List_Table::_localize_default_columns_array.
| since | |
|---|---|
| var |
array
default_hidden_columns : array
This array is used when the user-level option is not set, i.e., the user has not altered the selection of hidden columns.
The value on the right-hand side must match the column slug, e.g., array(0 => 'ID_parent, 1 => 'title_name').
| since | |
|---|---|
| var |
array
default_sortable_columns : array
This array defines the table columns that can be sorted. The array key is the column slug that needs to be sortable, and the value is database column to sort by. Often, the key and value will be the same, but this is not always the case (as the value is a column name from the database, not the list table).
The array value also contains a boolean which is 'true' if the initial sort order for the column is DESC/Descending.
| since | |
|---|---|
| var |
array
_example_plugin_items : array
| since | |
|---|---|
| var |
ID => ( post_ID, name, version, description, file, tags ) |
array
_example_plugin_highest_ID : integer
| since | |
|---|---|
| var |
integer