WordPress.org

Make WordPress Core

Changeset 32717


Ignore:
Timestamp:
06/10/2015 01:45:11 AM (6 years ago)
Author:
helen
Message:

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.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r32693 r32717  
    851851     */
    852852    protected function get_column_info() {
    853         if ( isset( $this->_column_headers ) )
     853        if ( isset( $this->_column_headers ) && is_array( $this->_column_headers ) && count( $this->_column_headers ) >= 4 ) {
    854854            return $this->_column_headers;
     855        }
    855856
    856857        $columns = get_column_headers( $this->screen );
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r32694 r32717  
    411411            if ( $primary === $column_name ) {
    412412                $classes .= ' has-row-actions column-primary';
     413            }
     414            if ( 'posts' === $column_name ) {
     415                $classes .= ' num'; // Special case for that column
    413416            }
    414417
     
    438441                        break;
    439442                    case 'posts':
    440                         $attributes = 'class="posts column-posts num"' . $style;
    441443                        if ( $numposts > 0 ) {
    442444                            $r .= "<a href='edit.php?author=$user_object->ID' class='edit'>";
Note: See TracChangeset for help on using the changeset viewer.