WP_List_Table
- Since
- 3.1.0
- Source
wp-admin/includes/class-wp-list-table.php:15
Base class for displaying a list of items in an ajaxified HTML table.
Compatibility
- WordPress
- since 3.1.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Hooks and filters fired · 8
Every hook that fires from inside WP_List_Table, in the order it appears in the class, grouped by the method that fires it.
WP_List_Table::months_dropdown()
- apply_filters( disable_months_dropdown )filter line 716
- apply_filters( pre_months_dropdown_query )filter line 728
- apply_filters( months_dropdown_results )filter line 758
WP_List_Table::get_items_per_page()
- apply_filters( {$option} )filter line 1013
Properties · 10
$itemsarraypublic- The current list of items.
$_argsarrayprotected- Various information about the current table.
$_pagination_argsarrayprotected- Various information needed for displaying the pagination.
$screenWP_Screenprotected- The current screen.
$_actionsarrayprivate- Cached bulk actions.
$_paginationstringprivate- Cached pagination output.
$modesarrayprotected- The view switcher modes.
$_column_headersarrayprotected- Stores the value returned by ->get_column_info().
$compat_fieldsarrayprotected$compat_methodsarrayprotected
Methods · 48
- __construct()Constructor.
- __get()Makes private properties readable for backward compatibility.
- __set()Makes private properties settable for backward compatibility.
- __isset()Makes private properties checkable for backward compatibility.
- __unset()Makes private properties un-settable for backward compatibility.
- __call()Makes private/protected methods readable for backward compatibility.
- ajax_user_can()Checks the current user's permissions
- prepare_items()Prepares the list of items for displaying.
- set_pagination_args()Sets all the necessary pagination arguments.
- get_pagination_arg()Access the pagination args.
- has_items()Determines whether the table has items to display or not
- no_items()Message to be displayed when there are no items
- search_box()Displays the search box.
- get_views_links()Generates views links.
- get_views()Gets the list of views available on this table.
- views()Displays the list of views available on this table.
- get_bulk_actions()Retrieves the list of bulk actions available for this table.
- bulk_actions()Displays the bulk actions dropdown.
- current_action()Gets the current action selected from the bulk actions dropdown.
- row_actions()Generates the required HTML for a list of row action links.
- months_dropdown()Displays a dropdown for filtering items in the list table by month.
- view_switcher()Displays a view switcher.
- comments_bubble()Displays a comment count bubble.
- get_pagenum()Gets the current page number.
- get_items_per_page()Gets the number of items to display on a single page.
- pagination()Displays the pagination.
- get_columns()Gets a list of columns.
- get_sortable_columns()Gets a list of sortable columns.
- get_default_primary_column_name()Gets the name of the default primary column.
- get_primary_column()Gets the name of the primary column.
- get_primary_column_name()Gets the name of the primary column.
- get_column_info()Gets a list of all, hidden, and sortable columns, with filter applied.
- get_column_count()Returns the number of visible columns.
- print_column_headers()Prints column headers, accounting for hidden and sortable columns.
- print_table_description()Print a table description with information about current sorting and order.
- display()Displays the table.
- get_table_classes()Gets a list of CSS classes for the WP_List_Table table tag.
- display_tablenav()Generates the table navigation above or below the table
- extra_tablenav()Displays extra controls between bulk actions and pagination.
- display_rows_or_placeholder()Generates the tbody element for the list table.
- display_rows()Generates the list table rows.
- single_row()Generates content for a single row of the table.
- column_default()
- column_cb()
- single_row_columns()Generates the columns for a single row of the table.
- handle_row_actions()Generates and display row actions links for the list table.
- ajax_response()Handles an incoming ajax request (called from admin-ajax.php)
- _js_vars()Sends required variables to JavaScript land.
Source code
#[AllowDynamicProperties]class WP_List_Table { /** * The current list of items. * * @since 3.1.0 * @var array */ public $items; /** * Various information about the current table. * * @since 3.1.0 * @var array */ protected $_args; /** * Various information needed for displaying the pagination. * * @since 3.1.0 * @var array */ protected $_pagination_args = array(); /** * The current screen. * * @since 3.1.0 * @var WP_Screen */ protected $screen; /** * Cached bulk actions. * * @since 3.1.0 * @var array */ private $_actions; /** * Cached pagination output. * * @since 3.1.0 * @var string */ private $_pagination; /** * The view switcher modes. * * @since 4.1.0 * @var array */ protected $modes = array(); /** * Stores the value returned by ->get_column_info(). * * @since 4.1.0 * @var array */ protected $_column_headers; /** * {@internal Missing Summary} * * @var array */ protected $compat_fields = array( '_args', '_pagination_args', 'screen', '_actions', '_pagination' ); /** * {@internal Missing Summary} * * @var array */ protected $compat_methods = array(Changelog
Introduced in 3.1.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
7.1.0
Method
get_primary_column_aria_label() added.verified against source3.1.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-admin/includes/class-wp-list-table.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.