Changes between Version 10 and Version 11 of Ticket #25408, comment 3
- Timestamp:
- 10/20/2013 05:01:35 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25408, comment 3
v10 v11 5 5 6 6 In essence: 7 I've added two new functions to class WP_List_Table, both intended to be over-ridden, but not abstract:7 I've added two new methods to class WP_List_Table, both intended to be over-ridden, but not abstract: 8 8 1. get_primary_column(): Takes no arguments, returns the name of the desired primary column. Hardcoded much the same way as get_columns, but just one string. 9 9 2. handle_actions( $item, $column_name, $primary ): Takes three arguments: the item - whether post, user, comment, etc. - the current column_name, and the name of the primary column. If the column name matches the primary, then the function returns the actions to be displayed. … … 11 11 I've also modified the various list tables that display row actions to use this new functionality. Some have single_row over-ridden, some don't. Some override the row_actions function, others just directly created and displayed their row actions in the default primary. The latter ones are where I extracted that code to override handle_actions. 12 12 13 The only one I didn't touch was class-wp-links-list-table.php because I don't have the links manager plugin yet, so I left that one alone.13 The only one I didn't touch was class-wp-links-list-table.php because I don't have the links manager plugin to test it with yet, so I left that one alone. 14 14 15 15 Here's a list of the files I modified, which will now have the class "has-row-actions" in the primary cells.