__construct()
column_ID_parent()
column_alt_text()
column_attached_to()
column_author()
column_base_file()
column_caption()
column_categories()
column_cb()
column_date()
column_default()
column_description()
column_featured()
column_icon()
column_inserted()
column_parent()
column_post_name()
column_post_title()
column_tags()
column_title_name()
extra_tablenav()
get_bulk_actions()
get_columns()
get_hidden_columns()
get_sortable_columns()
get_views()
mla_manage_columns()
mla_manage_hidden_columns()
prepare_items()
_avail_mime_types()
_build_rollover_actions()
_count_list_table_items()
_default_hidden_columns()
_mime_types()
$currently_hidden
$default_columns
$default_hidden_columns
$default_sortable_columns
$rollover_id
Class MLA (Media Library Assistant) List Table extends the core WP_List_Table class
package | Media Library Assistant |
---|---|
since | 0.1 |
__construct()
since | 0.1 |
---|
column_ID_parent(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_alt_text(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_attached_to(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_base_file(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_caption(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_categories(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_cb(array $item) : string
The 'cb' column is given special treatment when columns are processed.
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_date(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_default(array $item, array $column_name) : string
All our columns should have a specific method, so this function returns a troubleshooting message.
since | 0.1 |
---|
array
A singular item (one full row's worth of data)
array
The name/slug of the column to be processed
string
Text or HTML to be placed inside the columncolumn_description(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_featured(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_icon(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_inserted(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_parent(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_post_name(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_post_title(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columncolumn_title_name(array $item) : string
since | 0.1 |
---|
array
A singular attachment (post) object
string
HTML markup to be placed inside the columnextra_tablenav(string $which) : array
Modeled after class-wp-posts-list-table.php in wp-admin/includes
since | 0.1 |
---|
string
'top' or 'bottom', i.e., above or below the table rows
array
Contains all the bulk actions: 'slugs'=>'Visible Titles'get_bulk_actions() : array
since | 0.1 |
---|
array
Contains all the bulk actions: 'slugs'=>'Visible Titles'get_columns() : array
since | 0.1 |
---|
array
Column information: 'slugs'=>'Visible Titles'get_hidden_columns() : array
since | 0.1 |
---|
array
Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')get_sortable_columns() : array
Also notes the current sort column, if set.
since | 0.1 |
---|
array
Sortable column information,e.g., 'slugs'=>array('data_values',bool)get_views() : array
These are listed across the top of the page and managed by WordPress.
since | 0.1 |
---|
array
View information,e.g., array ( id => link )mla_manage_columns() : 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 | 0.1 |
---|
array
list of table columnsmla_manage_hidden_columns(string $result, string $option, object $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 | 0.1 |
---|
string
current list of hidden columns, if any
string
'managemedia_page_mla-menucolumnshidden'
object
WP_User object, if logged in
array
updated list of hidden columnsprepare_items()
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 | 0.1 |
---|
_avail_mime_types(array $num_posts) : array
Modeled after get_available_post_mime_types in wp-admin/includes/post.php, with additional entries.
since | 0.1 |
---|
array
Number of posts for each mime type
array
Mime type names_build_rollover_actions(array $item, string $column) : array
since | 0.1 |
---|
array
A singular attachment (post) object
string
Current column name
array
Names and URLs of row-level actions_count_list_table_items(array $request) : int
since | 0.1 |
---|
array
Query variables, e.g., from $_REQUEST
int
Number of attachment posts_default_hidden_columns() : array
since | 0.1 |
---|
array
default list of hidden columns_mime_types() : array
Modeled after get_post_mime_types in wp-admin/includes/post.php, with additional entries.
since | 0.1 |
---|
array
Mime type names and HTML markup for views$currently_hidden : array
Records hidden columns so row-level actions are not assigned to them.
since | 0.1 |
---|
$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. If you need a checkbox for bulk actions, use the special slug "cb".
The 'cb' column is treated differently than the rest. If including a checkbox column in your table you must create a column_cb() method. If you don't need bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
since | 0.1 |
---|
$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 | 0.1 |
---|
$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 data is currently sorted by that column. This is computed each time the table is displayed.
since | 0.1 |
---|
$rollover_id : int
Set to the current Post-ID when row-level actions are output for the row.
since | 0.1 |
---|