[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-admin/includes/ -> class-wp-plugins-list-table.php (summary)

List Table API: WP_Plugins_List_Table class

File Size: 1743 lines (62 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Plugins_List_Table:: (22 methods):
  __construct()
  get_table_classes()
  ajax_user_can()
  prepare_items()
  _search_callback()
  _order_callback()
  no_items()
  search_box()
  get_columns()
  get_sortable_columns()
  get_views()
  get_bulk_actions()
  bulk_actions()
  extra_tablenav()
  current_action()
  display_rows()
  single_row()
  get_primary_column_name()
  add_dependents_to_dependency_plugin_row()
  add_dependencies_to_dependent_plugin_row()
  get_dependency_view_details_link()
  get_view_details_link()


Class: WP_Plugins_List_Table  - X-Ref

Core class used to implement displaying installed plugins in a list table.

__construct( $args = array()   X-Ref
Constructor.

param: array $args An associative array of arguments.

get_table_classes()   X-Ref
Gets the CSS classes for the list table element.

return: string[] Array of CSS classes for the table tag.

ajax_user_can()   X-Ref
Checks whether the current user can activate plugins for this screen.

return: bool Whether the current user can activate plugins.

prepare_items()   X-Ref
Prepares the list of items for displaying.


_search_callback( $plugin )   X-Ref
Callback to filter plugins by a search term.

param: array<string, mixed> $plugin Plugin data array to check against the search term.
return: bool True if the plugin matches the search term, false otherwise.

_order_callback( $plugin_a, $plugin_b )   X-Ref
Callback to sort plugins by a given column.

param: array<string, mixed> $plugin_a First plugin data array to compare.
param: array<string, mixed> $plugin_b Second plugin data array to compare.
return: int Negative if $plugin_a sorts before $plugin_b, positive if after, 0 if equal.

no_items()   X-Ref
Message to be displayed when there are no items.


search_box( $text, $input_id )   X-Ref
Displays the search box.

param: string $text     The 'submit' button label.
param: string $input_id ID attribute value for the search input field.

get_columns()   X-Ref
Gets the list of columns for this list table.

return: array<string, string> An associative array of column titles keyed by their column name.

get_sortable_columns()   X-Ref
Gets the list of sortable columns for this list table.

return: array<string, array<int, string|bool>|string> An associative array of sortable columns.

get_views()   X-Ref
Gets an associative array of status filter links for the views area.

return: array<string, string> An associative array of views.

get_bulk_actions()   X-Ref
Gets the available bulk actions for the plugins list table.

return: array<string, string> An associative array of bulk actions.

bulk_actions( $which = '' )   X-Ref
Displays the bulk actions dropdown.

param: string $which The location of the bulk actions: Either 'top' or 'bottom'.

extra_tablenav( $which )   X-Ref
Displays extra table navigation for the plugins list table.

param: string $which The location: 'top' or 'bottom'.

current_action()   X-Ref
Gets the current action selected from the bulk actions dropdown.

Also handles the 'clear-recent-list' action from the Recently Active plugins screen.

return: string|false The action name. False if no action was selected.

display_rows()   X-Ref
Generates the list table rows.


single_row( $item )   X-Ref
Generates the markup for a single plugin row.

param: array $item The current item. An array containing the plugin file path and plugin data.

get_primary_column_name()   X-Ref
Gets the name of the primary column for this specific list table.

return: string Unalterable name for the primary column, in this case, 'name'.

add_dependents_to_dependency_plugin_row( $dependency )   X-Ref
Prints a list of other plugins that depend on the plugin.

param: string $dependency The dependency's filepath, relative to the plugins directory.

add_dependencies_to_dependent_plugin_row( $dependent )   X-Ref
Prints a list of other plugins that the plugin depends on.

param: string $dependent The dependent plugin's filepath, relative to the plugins directory.

get_dependency_view_details_link( $name, $slug )   X-Ref
Returns a 'View details' like link for a dependency.

param: string $name The dependency's name.
param: string $slug The dependency's slug.
return: string A 'View details' link for the dependency.

get_view_details_link( $name, $slug )   X-Ref
Returns a 'View details' link for the plugin.

param: string $name The plugin's name.
param: string $slug The plugin's slug.
return: string A 'View details' link for the plugin.



Generated : Fri Jun 26 08:20:11 2026 Cross-referenced by PHPXref