wppaste
WordPress

WP_Theme_Install_List_Table

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

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

Properties · 1

$featurespublic

Methods · 12

Source code

class WP_Theme_Install_List_Table extends WP_Themes_List_Table { 	public $features = array(); 	/**	 * @return bool Whether the user can install themes.	 */	public function ajax_user_can() {		return current_user_can( 'install_themes' );	} 	/**	 * @global array  $tabs	 * @global string $tab	 * @global int    $paged	 * @global string $type	 * @global array  $theme_field_defaults	 */	public function prepare_items() {		require ABSPATH . 'wp-admin/includes/theme-install.php'; 		global $tabs, $tab, $paged, $type, $theme_field_defaults; 		$tab = ! empty( $_REQUEST['tab'] ) ? sanitize_text_field( $_REQUEST['tab'] ) : ''; 		$search_terms  = array();		$search_string = '';		if ( ! empty( $_REQUEST['s'] ) ) {			$search_string = strtolower( wp_unslash( $_REQUEST['s'] ) );			$search_terms  = array_unique( array_filter( array_map( 'trim', explode( ',', $search_string ) ) ) );		} 		if ( ! empty( $_REQUEST['features'] ) ) {			$this->features = $_REQUEST['features'];		} 		$paged = $this->get_pagenum(); 		$per_page = 36; 		// These are the tabs which are shown on the page,		$tabs              = array();		$tabs['dashboard'] = __( 'Search' );		if ( 'search' === $tab ) {			$tabs['search'] = __( 'Search Results' );		}		$tabs['upload']   = _x( 'Upload', 'noun' );		$tabs['featured'] = _x( 'Featured', 'themes' );		//$tabs['popular']  = _x( 'Popular', 'themes' );		$tabs['new']     = _x( 'Latest', 'themes' );		$tabs['updated'] = _x( 'Recently Updated', 'themes' ); 		$nonmenu_tabs = array( 'theme-information' ); // Valid actions to perform which do not have a Menu item. 		/** This filter is documented in wp-admin/theme-install.php */		$tabs = apply_filters( 'install_themes_tabs', $tabs ); 		/**		 * Filters tabs not associated with a menu item on the Install Themes screen.		 *		 * @since 2.8.0		 *		 * @param string[] $nonmenu_tabs The tabs that don't have a menu item on		 *                               the Install Themes screen.		 */		$nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs ); 		// If a non-valid menu tab has been selected, And it's not a non-menu action.		if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs, true ) ) ) {			$tab = key( $tabs );		} 		$args = array(			'page'     => $paged,			'per_page' => $per_page,			'fields'   => $theme_field_defaults,		); 		switch ( $tab ) {			case 'search':

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-theme-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.