[wp-trac] [WordPress Trac] #33308: Responsive list tables don't handle primary columns that are not the first non-checkbox one

WordPress Trac noreply at wordpress.org
Wed Aug 12 19:34:34 UTC 2015


#33308: Responsive list tables don't handle primary columns that are not the first
non-checkbox one
--------------------------+---------------------------------
 Reporter:  helen         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  ui, administration
--------------------------+---------------------------------

Comment (by wonderboymusic):

 I had to create this is an intermediary when subclassing List Tables

 {{{
 namespace NYT;

 class ListTable extends \WP_List_Table {
         protected function set_column_headers() {
                 $columns = $this->get_columns();
                 $hidden = [];
                 $sortable = $this->get_sortable_columns();
                 $this->_column_headers = [ $columns, $hidden, $sortable ];
         }
 }

 }}}

 The reason: those column values are only otherwise available from the
 `WP_Screen` object

 See, `WP_List_Table->get_col_info()`:

 {{{
 $columns = get_column_headers( $this->screen );
 $hidden = get_hidden_columns( $this->screen );

 $sortable_columns = $this->get_sortable_columns();
 }}}

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


More information about the wp-trac mailing list