Use get_column_count() instead of manual logic. props scribu, fixes #16279.

git-svn-id: https://develop.svn.wordpress.org/trunk@17342 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-01-21 07:39:21 +00:00
parent b5d92c4354
commit 04f552b7d5
2 changed files with 2 additions and 2 deletions

View File

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

View File

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