mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Introduce WP_List_Table::get_column_count() and take care of update notice <tr>. Props ocean90 for initial patch. Fixes #15318
git-svn-id: https://develop.svn.wordpress.org/trunk@16368 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -549,6 +549,20 @@ class WP_List_Table {
|
||||
return $this->_column_headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return number of visible columns
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access public
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function get_column_count() {
|
||||
list ( $columns, $hidden ) = $this->get_column_info();
|
||||
$hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
|
||||
return count( $columns ) - count( $hidden );
|
||||
}
|
||||
|
||||
/**
|
||||
* Print column headers, accounting for hidden and sortable columns.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user