wppaste
WordPress

WP_Plugin_Install_List_Table

Since
3.1.0
Source
wp-admin/includes/class-wp-plugin-install-list-table.php:17
Core class used to implement displaying plugins to install in a list 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 · 7

Every hook that fires from inside WP_Plugin_Install_List_Table, in the order it appears in the class, grouped by the method that fires it.

Properties · 4

$orderpublic
$orderbypublic
$groupspublic
$errorprivate

Methods · 15

Source code

class WP_Plugin_Install_List_Table extends WP_List_Table { 	public $order   = 'ASC';	public $orderby = null;	public $groups  = array(); 	private $error; 	/**	 * @return bool	 */	public function ajax_user_can() {		return current_user_can( 'install_plugins' );	} 	/**	 * Returns the list of known plugins.	 *	 * Uses the transient data from the updates API to determine the known	 * installed plugins.	 *	 * @since 4.9.0	 *	 * @return array	 */	protected function get_installed_plugins() {		$plugins = array(); 		$plugin_info = get_site_transient( 'update_plugins' );		if ( isset( $plugin_info->no_update ) ) {			foreach ( $plugin_info->no_update as $plugin ) {				if ( isset( $plugin->slug ) ) {					$plugin->upgrade          = false;					$plugins[ $plugin->slug ] = $plugin;				}			}		} 		if ( isset( $plugin_info->response ) ) {			foreach ( $plugin_info->response as $plugin ) {				if ( isset( $plugin->slug ) ) {					$plugin->upgrade          = true;					$plugins[ $plugin->slug ] = $plugin;				}			}		} 		return $plugins;	} 	/**	 * Returns a list of slugs of installed plugins, if known.	 *	 * Uses the transient data from the updates API to determine the slugs of	 * known installed plugins. This might be better elsewhere, perhaps even	 * within get_plugins().	 *	 * @since 4.0.0	 *	 * @return array	 */	protected function get_installed_plugin_slugs() {		return array_keys( $this->get_installed_plugins() );	} 	/**	 * @global array  $tabs	 * @global string $tab	 * @global int    $paged	 * @global string $type	 * @global string $term	 */	public function prepare_items() {		require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; 		global $tabs, $tab, $paged, $type, $term; 		$tab = ! empty( $_REQUEST['tab'] ) ? sanitize_text_field( $_REQUEST['tab'] ) : ''; 		$paged = $this->get_pagenum();

Changelog

Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-admin/includes/class-wp-plugin-install-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.