Make WordPress Core

Changeset 17339


Ignore:
Timestamp:
01/20/2011 10:19:34 PM (14 years ago)
Author:
nacin
Message:

Properly account for columns shown in the list table display_rows_or_placeholder methods. props garyc40, fixes #16279.

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

Legend:

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

    r17322 r17339  
    772772            $this->display_rows();
    773773        } else {
    774             echo '<tr class="no-items"><td colspan="2">';
     774            list( $columns, $hidden ) = $this->get_column_info();
     775            echo '<tr class="no-items"><td class="colspanchange" colspan="' . ( count( $columns ) - count( array_filter( $hidden ) ) ) . '">';
    775776            $this->no_items();
    776777            echo '</td></tr>';
  • trunk/wp-admin/includes/class-wp-terms-list-table.php

    r17322 r17339  
    164164
    165165        if ( empty( $terms ) ) {
    166             echo '<tr class="no-items"><td colspan="2">';
     166            list( $columns, $hidden ) = $this->get_column_info();
     167            echo '<tr class="no-items"><td class="colspanchange" colspan="' . ( count( $columns ) - count( array_filter( $hidden ) ) ) . '">';
    167168            $this->no_items();
    168169            echo '</td></tr>';
Note: See TracChangeset for help on using the changeset viewer.