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:
parent
b5d92c4354
commit
04f552b7d5
@ -772,7 +772,7 @@ class WP_List_Table {
|
|||||||
$this->display_rows();
|
$this->display_rows();
|
||||||
} else {
|
} else {
|
||||||
list( $columns, $hidden ) = $this->get_column_info();
|
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();
|
$this->no_items();
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
if ( empty( $terms ) ) {
|
if ( empty( $terms ) ) {
|
||||||
list( $columns, $hidden ) = $this->get_column_info();
|
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();
|
$this->no_items();
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user