mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
introduce WP_List_Table::views(). See #14579
git-svn-id: https://develop.svn.wordpress.org/trunk@15578 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -173,6 +173,37 @@ class WP_List_Table {
|
||||
_e( 'No items found.' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an associative array ( id => link ) with the list
|
||||
* of views available on this table.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access protected
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function get_views() {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the bulk actions dropdown.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access public
|
||||
*/
|
||||
function views() {
|
||||
$views = $this->get_views();
|
||||
$views = apply_filters( 'views_' . $this->_screen->base, $views );
|
||||
|
||||
if ( empty( $views ) )
|
||||
return;
|
||||
|
||||
echo "<ul class='subsubsub'>\n";
|
||||
echo implode( " |</li>\n", $views ) . "</li>\n";
|
||||
echo "</ul>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an associative array ( option_name => option_title ) with the list
|
||||
* of bulk actions available on this table.
|
||||
|
||||
Reference in New Issue
Block a user