[wp-trac] [WordPress Trac] #21222: Unable to add columns to the Terms List table
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 11 22:50:23 UTC 2012
#21222: Unable to add columns to the Terms List table
--------------------------+-----------------------------
Reporter: dglingren | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 3.4.1
Severity: normal | Keywords:
--------------------------+-----------------------------
The base class `WP_List_Table` and its extended family is a great addition
to the WordPress administration API. The `WP_Posts_List_Table` class has
well-documented filters that support adding custom columns to the default
table.
However, custom column support in the `WP_Terms_List_Table` class is
incomplete. There is a filter in the `column_default` method, but it is
useless because there is no filter in the `get_columns` method to allow
expanding the column array.
Please consider changing the last line of the `get_columns` method to
something like:
`return apply_filters( "manage_{$taxonomy}_custom_get_columns", $columns
);`
or
`return apply_filters( "manage_{$taxonomy}_columns", $columns );`
The affected file is `wp-admin/includes/class-terms-list-table.php`. The
choice for the filter name depends on whether you want to follow the
convention used in the `WP_Terms_List_Table` class (first alternative) or
the convention used in the `WP_Posts_List_Table` class (second
alternative).
This one-line change would finish the job of making the default table
expandable. Thank you for your consideration.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21222>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list