wppaste
WordPress

WP_Terms_List_Table

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

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

Properties · 2

$callback_argspublic
$levelprivate

Methods · 21

Source code

class WP_Terms_List_Table extends WP_List_Table { 	public $callback_args; 	private $level; 	/**	 * Constructor.	 *	 * @since 3.1.0	 *	 * @see WP_List_Table::__construct() for more information on default arguments.	 *	 * @global string      $post_type Global post type.	 * @global string      $taxonomy  Global taxonomy.	 * @global string      $action	 * @global WP_Taxonomy $tax       Global taxonomy object.	 *	 * @param array $args An associative array of arguments.	 */	public function __construct( $args = array() ) {		global $post_type, $taxonomy, $action, $tax; 		parent::__construct(			array(				'plural'   => 'tags',				'singular' => 'tag',				'screen'   => isset( $args['screen'] ) ? $args['screen'] : null,			)		); 		$action    = $this->screen->action;		$post_type = $this->screen->post_type;		$taxonomy  = $this->screen->taxonomy; 		if ( empty( $taxonomy ) ) {			$taxonomy = 'post_tag';		} 		if ( ! taxonomy_exists( $taxonomy ) ) {			wp_die( __( 'Invalid taxonomy.' ) );		} 		$tax = get_taxonomy( $taxonomy ); 		// @todo Still needed? Maybe just the show_ui part.		if ( empty( $post_type ) || ! in_array( $post_type, get_post_types( array( 'show_ui' => true ) ), true ) ) {			$post_type = 'post';		}	} 	/**	 * @return bool	 */	public function ajax_user_can() {		return current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->manage_terms );	} 	/**	 */	public function prepare_items() {		$taxonomy = $this->screen->taxonomy; 		$tags_per_page = $this->get_items_per_page( "edit_{$taxonomy}_per_page" ); 		if ( 'post_tag' === $taxonomy ) {			/**			 * Filters the number of terms displayed per page for the Tags list table.			 *			 * @since 2.8.0			 *			 * @param int $tags_per_page Number of tags to be displayed. Default 20.			 */			$tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); 			/**			 * Filters the number of terms displayed per page for the Tags list table.			 *			 * @since 2.7.0			 * @deprecated 2.8.0 Use {@see 'edit_tags_per_page'} instead.

Changelog

Introduced in 3.1.0. One change between 6.7.7 and 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.

7.1.0
Method get_primary_column_aria_label() added.verified against source
3.1.0
Introduced.from the docblock

About this page

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