[wp-trac] [WordPress Trac] #25408: Ability to specify that a list table column is "primary"
WordPress Trac
noreply at wordpress.org
Tue Jun 9 16:10:46 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 | Focuses:
-------------------------------------+-----------------------
Comment (by georgestephanis):
Re @jeherve's remark above, yeah --
The changed line in `WP_List_Table::single_row_columns` from
{{{
list( $columns, $hidden ) = $this->get_column_info();
}}}
to
{{{
list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
}}}
is causing a notice (not an error) if `get_column_info()` doesn't return
four indexes in the array.
I suspect it's the initial failout clause in `get_column_info()` that is
causing it --
{{{
if ( isset( $this->_column_headers ) )
return $this->_column_headers;
}}}
I'd suggest that for backcompat, if `$this->_column_headers` doesn't
contain four array items, we add on a fourth with a value of
`$this->get_primary_column_name()`
Unless there's objections, I'll try to get a patch inbound.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25408#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list