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.
WP_Terms_List_Table::prepare_items()
- apply_filters( edit_tags_per_page )filter line 90
- do_action( tagsperpage )filter_deprecated line 100
- apply_filters( edit_categories_per_page )filter line 109
WP_Terms_List_Table::column_name()
- apply_filters( term_name )filter line 401
- apply_filters( quick_edit_enabled_for_taxonomy )filter line 430
- apply_filters( editable_slug )filter line 437
WP_Terms_List_Table::handle_row_actions()
- apply_filters( quick_edit_enabled_for_taxonomy )filter line 503
- apply_filters( tag_row_actions )filter line 546
- apply_filters( {$taxonomy}_row_actions )filter line 564
Properties · 2
$callback_argspublic$levelprivate
Methods · 21
- __construct()Constructor.
- ajax_user_can()
- prepare_items()
- no_items()
- get_bulk_actions()
- current_action()
- get_columns()
- get_sortable_columns()
- display_rows_or_placeholder()
- _rows()
- single_row()
- column_cb()
- column_name()
- get_default_primary_column_name()Gets the name of the default primary column.
- handle_row_actions()Generates and displays row action links.
- column_description()
- column_slug()
- column_posts()
- column_links()
- column_default()
- inline_edit()Outputs the hidden row displayed when inline editing
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 object $tax * * @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.
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-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.