[wp-trac] [WordPress Trac] #25408: Ability to specify that a list table column is "primary"

WordPress Trac noreply at wordpress.org
Wed May 27 14:09:30 UTC 2015


#25408: Ability to specify that a list table column is "primary"
-----------------------------------------------+-----------------------
 Reporter:  helen                              |       Owner:  stephdau
     Type:  enhancement                        |      Status:  assigned
 Priority:  normal                             |   Milestone:  4.3
Component:  Administration                     |     Version:
 Severity:  normal                             |  Resolution:
 Keywords:  has-patch needs-testing 4.1-early  |     Focuses:
-----------------------------------------------+-----------------------

Comment (by stephdau):

 [attachment:25408.10.diff] implements most of what @helen and I discussed
 on Slack:
 * also adds `column-primary` when applying `has-row-actions`,except for
 the `blogs` column in `WP_MS_Users_List_Table`, which needs the latter at
 all times, but not the former.
 * only implements a statically-named filter in
 `WP_List_Table::get_primary_column_name()`, with context as argument.
 Dynamically-named filters are needlessly difficult to document/use, and we
 don't really implement new ones.

 One thing I did not do is renaming `*::handle_row_actions()` to
 `*::row_actions()` because they are both implemented in the parent class,
 are different enough (args, etc), and both are valuable as is. Opened to
 renaming it, just not to that.

 Also switched `WP_Comments_List_Table::handle_row_actions()` to return and
 not echo, for consistency.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25408#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list