wppaste
WordPress

WP_Posts_List_Table

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

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

Properties · 6

$hierarchical_displayboolprotected
Whether the items should be displayed hierarchically or linearly.
$comment_pending_countarrayprotected
Holds the number of pending comments for each post.
$user_posts_countintprivate
Holds the number of posts for this user.
$sticky_posts_countintprivate
Holds the number of posts which are sticky.
$is_trashprivate
$current_levelintprotected
Current level for output.

Methods · 32

Source code

<?phpclass WP_Posts_List_Table extends WP_List_Table { 	/**	 * Whether the items should be displayed hierarchically or linearly.	 *	 * @since 3.1.0	 * @var bool	 */	protected $hierarchical_display; 	/**	 * Holds the number of pending comments for each post.	 *	 * @since 3.1.0	 * @var array	 */	protected $comment_pending_count; 	/**	 * Holds the number of posts for this user.	 *	 * @since 3.1.0	 * @var int	 */	private $user_posts_count; 	/**	 * Holds the number of posts which are sticky.	 *	 * @since 3.1.0	 * @var int	 */	private $sticky_posts_count = 0; 	private $is_trash; 	/**	 * Current level for output.	 *	 * @since 4.3.0	 * @var int	 */	protected $current_level = 0; 	/**	 * Constructor.	 *	 * @since 3.1.0	 *	 * @see WP_List_Table::__construct() for more information on default arguments.	 *	 * @global WP_Post_Type $post_type_object Global post type object.	 * @global wpdb         $wpdb             WordPress database abstraction object.	 *	 * @param array $args An associative array of arguments.	 */	public function __construct( $args = array() ) {		global $post_type_object, $wpdb; 		parent::__construct(			array(				'plural' => 'posts',				'screen' => isset( $args['screen'] ) ? $args['screen'] : null,			)		); 		$post_type        = $this->screen->post_type;		$post_type_object = get_post_type_object( $post_type ); 		$exclude_states = get_post_stati(			array(				'show_in_admin_all_list' => false,			)		); 		$this->user_posts_count = (int) $wpdb->get_var(			$wpdb->prepare(				"SELECT COUNT( 1 )				FROM $wpdb->posts				WHERE post_type = %s

Changelog

Introduced in 3.1.0. 2 changes 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_no_title_excerpt() added.verified against source
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.7.7 tag, from src/wp-admin/includes/class-wp-posts-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.