Make WordPress Core

Opened 3 months ago

Last modified 2 months ago

#58824 new enhancement

Add a filter to change the classes in posts list table in admin

Reported by: zahardoc's profile zahardoc Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: good-first-bug has-patch
Focuses: ui, css, administration Cc:

Description

Currently, there is no way to change the classes in the posts list table, and the posts list table template is hardcoded. So there is no way to add any classes, for example, specific classes for custom post types there.

Proposal:

Add a filter to "WP_List_Table::get_table_classes()" function, like this:

<?php
return apply_filters( 'post_list_table_classes', array( 'widefat', 'fixed', 'striped', $mode_class, $this->_args['plural'] ), $this );

Change History (2)

#1 @Hareesh Pillai
2 months ago

  • Keywords good-first-bug added

This ticket was mentioned in PR #4885 on WordPress/wordpress-develop by @pamprn.


2 months ago
#2

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.