[wp-trac] [WordPress Trac] #25408: Ability to specify that a list table column is "primary"
noreply at wordpress.org
Mon Sep 30 07:34:39 UTC 2013
#25408: Ability to specify that a list table column is "primary"
Reporter: helen | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.7
Component: Administration | Version:
Severity: normal | Resolution:
Comment (by DaveAl):
I'm new to WP coding, and arbitrarily chose this ticket to look into, in
part to familiarize myself with the WP codebase, and because it looks like
an interesting project.
As a temporary hack/proof of concept, I extracted the action functionality
from single_row in the posts list table into a separate function, which is
a crucial first step to get this working. Of course, the same thing would
have to be done in all list tables having row actions.
Since defining and displaying the row actions is screen specific, I don't
think it would make sense, nor is it necessary, to alter the WP_List_Table
class itself. It can really only be done in each class that extends it,
wherever row actions are applicable.
I have a question and observation regarding this functionality:
* When you mention "via API", do you mean a way to set and get the primary
column has to be done with a filter hook such as ''manage_posts_columns''?
At least in the posts list table, in the single_row switch ( $column_name
), each case would have to test for primary and, if true, then call the
function to display the row actions for that column. [[br]] In the
customization example you mention above, a developer would have directly
modify an existing list table extended class, or create an extended class
from scratch, so doing this with hooks would seem, to me at least, only to
complicate the functionality, especially if the customization involved
removing the title column entirely.
* The targeting of a new selector such as .has-row-actions seems to be a
separate - albeit related - issue that can be addressed apart from the
main primary column functionality.
Please share your thoughts as to the best way to approach this, and let me
know if you think I'm going in the right direction.
Since nobody else has commented, I'm assuming that no one else is looking
into it, so I'm volunteering to jump in.
Ticket URL: <http://core.trac.wordpress.org/ticket/25408#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac