List tables:

* Avoid notices in custom list tables that manually set `$_column_headers`. Any plugins using this for a specific purpose should update.
* Restore a special class name in the users list table.

props georgestephanis, stephdau.
see #25408.

Built from https://develop.svn.wordpress.org/trunk@32717


git-svn-id: http://core.svn.wordpress.org/trunk@32687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2015-06-10 01:46:27 +00:00
parent bafb008be1
commit 005d937ce2
3 changed files with 6 additions and 3 deletions

View File

@ -850,8 +850,9 @@ class WP_List_Table {
* @return array
*/
protected function get_column_info() {
if ( isset( $this->_column_headers ) )
if ( isset( $this->_column_headers ) && is_array( $this->_column_headers ) && count( $this->_column_headers ) >= 4 ) {
return $this->_column_headers;
}
$columns = get_column_headers( $this->screen );
$hidden = get_hidden_columns( $this->screen );

View File

@ -411,6 +411,9 @@ class WP_Users_List_Table extends WP_List_Table {
if ( $primary === $column_name ) {
$classes .= ' has-row-actions column-primary';
}
if ( 'posts' === $column_name ) {
$classes .= ' num'; // Special case for that column
}
$style = '';
if ( in_array( $column_name, $hidden ) ) {
@ -437,7 +440,6 @@ class WP_Users_List_Table extends WP_List_Table {
$r .= $role_name;
break;
case 'posts':
$attributes = 'class="posts column-posts num"' . $style;
if ( $numposts > 0 ) {
$r .= "<a href='edit.php?author=$user_object->ID' class='edit'>";
$r .= '<span aria-hidden="true">' . $numposts . '</span>';

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32716';
$wp_version = '4.3-alpha-32717';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.