/** * Returns an associative array listing all the views that can be used with this table. * These are listed across the top of the page and managed by WordPress. * * @since 1.40 * * @return array View information,e.g., array ( id => link ) */ function get_views() { /* * Find current view */ $current_view = isset($_REQUEST['mla_upload_view']) ? $_REQUEST['mla_upload_view'] : 'all'; /* * Generate the list of views, retaining keyword search criterion */ $s = isset($_REQUEST['s']) ? $_REQUEST['s'] : ''; $upload_items = MLAMime::mla_tabulate_upload_items($s); $view_links = array(); foreach ($upload_items as $slug => $item) { $view_links[$slug] = self::_get_view($slug, $item, $current_view); } return $view_links; }