[wp-trac] [WordPress Trac] #34508: list_table_primary_column doesn't work following some manage_$screen_columns

WordPress Trac noreply at wordpress.org
Sat Nov 7 15:26:07 UTC 2015


#34508: list_table_primary_column doesn't work following some
manage_$screen_columns
----------------------------+-----------------------------
 Reporter:  soulseekah      |       Owner:  wonderboymusic
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:  4.4
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |     Focuses:  administration
----------------------------+-----------------------------
Changes (by wonderboymusic):

 * owner:   => wonderboymusic
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"35565"]:
 {{{
 #!CommitTicketReference repository="" revision="35565"
 List Tables: to ensure that `get_primary_column_name()` can match columns
 that were added via the `"manage_{$screen->id}_columns"` filer, call
 `get_column_headers()` instead of `$this->get_columns()`.

 List Table classes and `WP_Screen` are already tangled together. The
 parent list table constructor adds a filter that is called by a function
 that references the instance globally, even though we have access to it
 via composition directly in the class that is adding the filter. So the
 fact that functions here have to be called that reference a screen
 instance we already have access to is what one might call... less than
 elegant.

 #OOP

 Props SergeyBiryukov.
 Fixes #34508.
 }}}

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


More information about the wp-trac mailing list