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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-01-20 22:19:34 +00:00
parent 7061e7efe0
commit 8dc4329246
2 changed files with 4 additions and 2 deletions

View File

@ -771,7 +771,8 @@ class WP_List_Table {
if ( $this->has_items() ) {
$this->display_rows();
} else {
echo '<tr class="no-items"><td colspan="2">';
list( $columns, $hidden ) = $this->get_column_info();
echo '<tr class="no-items"><td class="colspanchange" colspan="' . ( count( $columns ) - count( array_filter( $hidden ) ) ) . '">';
$this->no_items();
echo '</td></tr>';
}

View File

@ -163,7 +163,8 @@ class WP_Terms_List_Table extends WP_List_Table {
}
if ( empty( $terms ) ) {
echo '<tr class="no-items"><td colspan="2">';
list( $columns, $hidden ) = $this->get_column_info();
echo '<tr class="no-items"><td class="colspanchange" colspan="' . ( count( $columns ) - count( array_filter( $hidden ) ) ) . '">';
$this->no_items();
echo '</td></tr>';
} else {