Use get_column_count() instead of manual logic. props scribu, fixes #16279.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f8c83ed7d3
commit
385ac2ef74
|
@ -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