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:
scribu
2010-09-05 21:26:27 +00:00
parent 5339a2f2f4
commit 25677d588c
9 changed files with 297 additions and 255 deletions
+31
View File
@@ -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.