<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[15578] trunk/wp-admin: introduce WP_List_Table::views().</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15578">15578</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-09-05 21:26:27 +0000 (Sun, 05 Sep 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>introduce WP_List_Table::views(). See <a href="http://trac.wordpress.org/ticket/14579">#14579</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditcommentsphp">trunk/wp-admin/edit-comments.php</a></li>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminincludesdefaultlisttablesphp">trunk/wp-admin/includes/default-list-tables.php</a></li>
<li><a href="#trunkwpadminincludeslisttablephp">trunk/wp-admin/includes/list-table.php</a></li>
<li><a href="#trunkwpadminplugininstallphp">trunk/wp-admin/plugin-install.php</a></li>
<li><a href="#trunkwpadminpluginsphp">trunk/wp-admin/plugins.php</a></li>
<li><a href="#trunkwpadminthemeinstallphp">trunk/wp-admin/theme-install.php</a></li>
<li><a href="#trunkwpadminuploadphp">trunk/wp-admin/upload.php</a></li>
<li><a href="#trunkwpadminusersphp">trunk/wp-admin/users.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-comments.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-comments.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/edit-comments.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -194,54 +194,9 @@
</span><span class="cx"> }
</span><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><del>-&lt;form id=&quot;comments-form&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
-&lt;ul class=&quot;subsubsub&quot;&gt;
-&lt;?php
-$status_links = array();
-$num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
-//, number_format_i18n($num_comments-&gt;moderated) ), &quot;&lt;span class='comment-count'&gt;&quot; . number_format_i18n($num_comments-&gt;moderated) . &quot;&lt;/span&gt;&quot;),
-//, number_format_i18n($num_comments-&gt;spam) ), &quot;&lt;span class='spam-comment-count'&gt;&quot; . number_format_i18n($num_comments-&gt;spam) . &quot;&lt;/span&gt;&quot;)
-$stati = array(
-                'all' =&gt; _nx_noop('All', 'All', 'comments'), // singular not used
-                'moderated' =&gt; _n_noop('Pending &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;pending-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;', 'Pending &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;pending-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;'),
-                'approved' =&gt; _n_noop('Approved', 'Approved'), // singular not used
-                'spam' =&gt; _n_noop('Spam &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;spam-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;', 'Spam &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;spam-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;'),
-                'trash' =&gt; _n_noop('Trash &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;trash-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;', 'Trash &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;trash-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;')
-        );
</del><ins>+&lt;?php $wp_list_table-&gt;views(); ?&gt;
</ins><span class="cx"> 
</span><del>-if ( !EMPTY_TRASH_DAYS )
-        unset($stati['trash']);
-
-$link = 'edit-comments.php';
-if ( !empty($comment_type) &amp;&amp; 'all' != $comment_type )
-        $link = add_query_arg( 'comment_type', $comment_type, $link );
-
-foreach ( $stati as $status =&gt; $label ) {
-        $class = ( $status == $comment_status ) ? ' class=&quot;current&quot;' : '';
-
-        if ( !isset( $num_comments-&gt;$status ) )
-                $num_comments-&gt;$status = 10;
-        $link = add_query_arg( 'comment_status', $status, $link );
-        if ( $post_id )
-                $link = add_query_arg( 'p', absint( $post_id ), $link );
-        /*
-        // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark
-        if ( !empty( $_REQUEST['s'] ) )
-                $link = add_query_arg( 's', esc_attr( stripslashes( $_REQUEST['s'] ) ), $link );
-        */
-        $status_links[] = &quot;&lt;li class='$status'&gt;&lt;a href='$link'$class&gt;&quot; . sprintf(
-                _n( $label[0], $label[1], $num_comments-&gt;$status ),
-                number_format_i18n( $num_comments-&gt;$status )
-        ) . '&lt;/a&gt;';
-}
-
-$status_links = apply_filters( 'comment_status_links', $status_links );
-
-echo implode( &quot; |&lt;/li&gt;\n&quot;, $status_links) . '&lt;/li&gt;';
-unset($status_links);
-?&gt;
-&lt;/ul&gt;
-
</del><ins>+&lt;form id=&quot;comments-form&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
</ins><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;comment-search-input&quot;&gt;&lt;?php _e( 'Search Comments' ); ?&gt;:&lt;/label&gt;
</span><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;comment-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php _admin_search_query(); ?&gt;&quot; /&gt;
</span></span></pre></div>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/edit.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -207,68 +207,9 @@
</span><span class="cx"> &lt;/p&gt;&lt;/div&gt;
</span><span class="cx"> &lt;?php } ?&gt;
</span><span class="cx"> 
</span><del>-&lt;form id=&quot;posts-filter&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
</del><ins>+&lt;?php $wp_list_table-&gt;views(); ?&gt;
</ins><span class="cx"> 
</span><del>-&lt;ul class=&quot;subsubsub&quot;&gt;
-&lt;?php
-if ( empty($locked_post_status) ) :
-$status_links = array();
-$num_posts = wp_count_posts( $post_type, 'readable' );
-$class = '';
-$allposts = '';
-
-$user_posts = false;
-if ( !current_user_can( $post_type_object-&gt;cap-&gt;edit_others_posts ) ) {
-        $user_posts = true;
-
-        $user_posts_count = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;
-                SELECT COUNT( 1 ) FROM $wpdb-&gt;posts
-                WHERE post_type = '%s' AND post_status NOT IN ( 'trash', 'auto-draft' )
-                AND post_author = %d
-        &quot;, $post_type, get_current_user_id() ) );
-
-        if ( $user_posts_count &amp;&amp; empty( $_REQUEST['post_status'] ) &amp;&amp; empty( $_REQUEST['all_posts'] ) &amp;&amp; empty( $_REQUEST['author'] ) )
-                $_REQUEST['author'] = get_current_user_id();
-}
-
-if ( $user_posts ) {
-        if ( isset( $_REQUEST['author'] ) &amp;&amp; ( $_REQUEST['author'] == $current_user-&gt;ID ) )
-                $class = ' class=&quot;current&quot;';
-        $status_links[] = &quot;&lt;li&gt;&lt;a href='edit.php?post_type=$post_type&amp;author=$current_user-&gt;ID'$class&gt;&quot; . sprintf( _nx( 'Mine &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Mine &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $user_posts_count, 'posts' ), number_format_i18n( $user_posts_count ) ) . '&lt;/a&gt;';
-        $allposts = '&amp;all_posts=1';
-}
-
-$total_posts = array_sum( (array) $num_posts );
-
-// Subtract post types that are not included in the admin all list.
-foreach ( get_post_stati( array('show_in_admin_all_list' =&gt; false) ) as $state )
-        $total_posts -= $num_posts-&gt;$state;
-
-$class = empty($class) &amp;&amp; empty($_REQUEST['post_status']) ? ' class=&quot;current&quot;' : '';
-$status_links[] = &quot;&lt;li&gt;&lt;a href='edit.php?post_type=$post_type{$allposts}'$class&gt;&quot; . sprintf( _nx( 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '&lt;/a&gt;';
-
-foreach ( get_post_stati(array('show_in_admin_status_list' =&gt; true), 'objects') as $status ) {
-        $class = '';
-
-        $status_name = $status-&gt;name;
-
-        if ( !in_array( $status_name, $avail_post_stati ) )
-                continue;
-
-        if ( empty( $num_posts-&gt;$status_name ) )
-                continue;
-
-        if ( isset($_REQUEST['post_status']) &amp;&amp; $status_name == $_REQUEST['post_status'] )
-                $class = ' class=&quot;current&quot;';
-
-        $status_links[] = &quot;&lt;li&gt;&lt;a href='edit.php?post_status=$status_name&amp;amp;post_type=$post_type'$class&gt;&quot; . sprintf( _n( $status-&gt;label_count[0], $status-&gt;label_count[1], $num_posts-&gt;$status_name ), number_format_i18n( $num_posts-&gt;$status_name ) ) . '&lt;/a&gt;';
-}
-echo implode( &quot; |&lt;/li&gt;\n&quot;, $status_links ) . '&lt;/li&gt;';
-unset( $status_links );
-endif;
-?&gt;
-&lt;/ul&gt;
-
</del><ins>+&lt;form id=&quot;posts-filter&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
</ins><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;post-search-input&quot;&gt;&lt;?php echo $post_type_object-&gt;labels-&gt;search_items; ?&gt;:&lt;/label&gt;
</span><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;post-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php the_search_query(); ?&gt;&quot; /&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/default-list-tables.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/default-list-tables.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/includes/default-list-tables.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -96,6 +96,67 @@
</span><span class="cx">                         echo $post_type_object-&gt;labels-&gt;not_found;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        function get_views() {
+                global $post_type, $post_type_object, $locked_post_status, $avail_post_stati;
+        
+                if ( !empty($locked_post_status) )
+                        return array();
+
+                $status_links = array();
+                $num_posts = wp_count_posts( $post_type, 'readable' );
+                $class = '';
+                $allposts = '';
+
+                $user_posts = false;
+                if ( !current_user_can( $post_type_object-&gt;cap-&gt;edit_others_posts ) ) {
+                        $user_posts = true;
+
+                        $user_posts_count = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;
+                                SELECT COUNT( 1 ) FROM $wpdb-&gt;posts
+                                WHERE post_type = '%s' AND post_status NOT IN ( 'trash', 'auto-draft' )
+                                AND post_author = %d
+                        &quot;, $post_type, get_current_user_id() ) );
+
+                        if ( $user_posts_count &amp;&amp; empty( $_REQUEST['post_status'] ) &amp;&amp; empty( $_REQUEST['all_posts'] ) &amp;&amp; empty( $_REQUEST['author'] ) )
+                                $_REQUEST['author'] = get_current_user_id();
+                }
+
+                if ( $user_posts ) {
+                        if ( isset( $_REQUEST['author'] ) &amp;&amp; ( $_REQUEST['author'] == $current_user-&gt;ID ) )
+                                $class = ' class=&quot;current&quot;';
+                        $status_links['author'] = &quot;&lt;li&gt;&lt;a href='edit.php?post_type=$post_type&amp;author=$current_user-&gt;ID'$class&gt;&quot; . sprintf( _nx( 'Mine &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Mine &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $user_posts_count, 'posts' ), number_format_i18n( $user_posts_count ) ) . '&lt;/a&gt;';
+                        $allposts = '&amp;all_posts=1';
+                }
+
+                $total_posts = array_sum( (array) $num_posts );
+
+                // Subtract post types that are not included in the admin all list.
+                foreach ( get_post_stati( array('show_in_admin_all_list' =&gt; false) ) as $state )
+                        $total_posts -= $num_posts-&gt;$state;
+
+                $class = empty($class) &amp;&amp; empty($_REQUEST['post_status']) ? ' class=&quot;current&quot;' : '';
+                $status_links['all'] = &quot;&lt;li&gt;&lt;a href='edit.php?post_type=$post_type{$allposts}'$class&gt;&quot; . sprintf( _nx( 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '&lt;/a&gt;';
+
+                foreach ( get_post_stati(array('show_in_admin_status_list' =&gt; true), 'objects') as $status ) {
+                        $class = '';
+
+                        $status_name = $status-&gt;name;
+
+                        if ( !in_array( $status_name, $avail_post_stati ) )
+                                continue;
+
+                        if ( empty( $num_posts-&gt;$status_name ) )
+                                continue;
+
+                        if ( isset($_REQUEST['post_status']) &amp;&amp; $status_name == $_REQUEST['post_status'] )
+                                $class = ' class=&quot;current&quot;';
+
+                        $status_links[$status_name] = &quot;&lt;li&gt;&lt;a href='edit.php?post_status=$status_name&amp;amp;post_type=$post_type'$class&gt;&quot; . sprintf( _n( $status-&gt;label_count[0], $status-&gt;label_count[1], $num_posts-&gt;$status_name ), number_format_i18n( $num_posts-&gt;$status_name ) ) . '&lt;/a&gt;';
+                }
+                
+                return $status_links;
+        }
+
</ins><span class="cx">         function get_bulk_actions() {
</span><span class="cx">                 $actions = array();
</span><span class="cx"> 
</span><span class="lines">@@ -943,6 +1004,40 @@
</span><span class="cx">                 ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        function get_views() {
+                global $wpdb, $post_mime_types, $detached, $avail_post_mime_types;
+
+                $type_links = array();
+                $_num_posts = (array) wp_count_attachments();
+                $_total_posts = array_sum($_num_posts) - $_num_posts['trash'];
+                if ( !isset( $total_orphans ) )
+                                $total_orphans = $wpdb-&gt;get_var( &quot;SELECT COUNT( * ) FROM $wpdb-&gt;posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent &lt; 1&quot; );
+                $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
+                foreach ( $matches as $type =&gt; $reals )
+                        foreach ( $reals as $real )
+                                $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
+
+                $class = ( empty($_GET['post_mime_type']) &amp;&amp; !$detached &amp;&amp; !isset($_GET['status']) ) ? ' class=&quot;current&quot;' : '';
+                $type_links['all'] = &quot;&lt;li&gt;&lt;a href='upload.php'$class&gt;&quot; . sprintf( _nx( 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '&lt;/a&gt;';
+                foreach ( $post_mime_types as $mime_type =&gt; $label ) {
+                        $class = '';
+
+                        if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) )
+                                continue;
+
+                        if ( !empty($_GET['post_mime_type']) &amp;&amp; wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
+                                $class = ' class=&quot;current&quot;';
+                        if ( !empty( $num_posts[$mime_type] ) )
+                                $type_links[$mime_type] = &quot;&lt;li&gt;&lt;a href='upload.php?post_mime_type=$mime_type'$class&gt;&quot; . sprintf( _n( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '&lt;/a&gt;';
+                }
+                $type_links['detached'] = '&lt;li&gt;&lt;a href=&quot;upload.php?detached=1&quot;' . ( $detached ? ' class=&quot;current&quot;' : '' ) . '&gt;' . sprintf( _nx( 'Unattached &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Unattached &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '&lt;/a&gt;';
+
+                if ( !empty($_num_posts['trash']) )
+                        $type_links['trash'] = '&lt;li&gt;&lt;a href=&quot;upload.php?status=trash&quot;' . ( (isset($_GET['status']) &amp;&amp; $_GET['status'] == 'trash' ) ? ' class=&quot;current&quot;' : '') . '&gt;' . sprintf( _nx( 'Trash &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Trash &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '&lt;/a&gt;';
+
+                return $type_links;
+        }
+
</ins><span class="cx">         function get_bulk_actions() {
</span><span class="cx">                 global $detached;
</span><span class="cx"> 
</span><span class="lines">@@ -1651,8 +1746,6 @@
</span><span class="cx"> class WP_Users_Table extends WP_List_Table {
</span><span class="cx"> 
</span><span class="cx">         function WP_Users_Table() {
</span><del>-                global $role, $usersearch;
-
</del><span class="cx">                 parent::WP_List_Table( array(
</span><span class="cx">                         'screen' =&gt; 'users',
</span><span class="cx">                         'plural' =&gt; 'users'
</span><span class="lines">@@ -1665,6 +1758,8 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function prepare_items() {
</span><ins>+                global $role, $usersearch;
+
</ins><span class="cx">                 $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
</span><span class="cx"> 
</span><span class="cx">                 $role = isset( $_REQUEST['role'] ) ? $_REQUEST['role'] : '';
</span><span class="lines">@@ -1701,6 +1796,38 @@
</span><span class="cx">                 _e( 'No matching users were found.' );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        function get_views() {
+                global $wp_roles, $role;
+
+                $users_of_blog = count_users();
+                $total_users = $users_of_blog['total_users'];
+                $avail_roles =&amp; $users_of_blog['avail_roles'];
+                unset($users_of_blog);
+
+                $current_role = false;
+                $class = empty($role) ? ' class=&quot;current&quot;' : '';
+                $role_links = array();
+                $role_links['all'] = &quot;&lt;li&gt;&lt;a href='users.php'$class&gt;&quot; . sprintf( _nx( 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '&lt;/a&gt;';
+                foreach ( $wp_roles-&gt;get_names() as $this_role =&gt; $name ) {
+                        if ( !isset($avail_roles[$this_role]) )
+                                continue;
+
+                        $class = '';
+
+                        if ( $this_role == $role ) {
+                                $current_role = $role;
+                                $class = ' class=&quot;current&quot;';
+                        }
+
+                        $name = translate_user_role( $name );
+                        /* translators: User role name with count */
+                        $name = sprintf( __('%1$s &lt;span class=&quot;count&quot;&gt;(%2$s)&lt;/span&gt;'), $name, $avail_roles[$this_role] );
+                        $role_links[$this_role] = &quot;&lt;li&gt;&lt;a href='users.php?role=$this_role'$class&gt;$name&lt;/a&gt;&quot;;
+                }
+
+                return $role_links;
+        }
+
</ins><span class="cx">         function get_bulk_actions() {
</span><span class="cx">                 $actions = array();
</span><span class="cx"> 
</span><span class="lines">@@ -1957,6 +2084,51 @@
</span><span class="cx">                 ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        function get_views() {
+                global $post_id, $comment_status;
+
+                $status_links = array();
+                $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
+                //, number_format_i18n($num_comments-&gt;moderated) ), &quot;&lt;span class='comment-count'&gt;&quot; . number_format_i18n($num_comments-&gt;moderated) . &quot;&lt;/span&gt;&quot;),
+                //, number_format_i18n($num_comments-&gt;spam) ), &quot;&lt;span class='spam-comment-count'&gt;&quot; . number_format_i18n($num_comments-&gt;spam) . &quot;&lt;/span&gt;&quot;)
+                $stati = array(
+                                'all' =&gt; _nx_noop('All', 'All', 'comments'), // singular not used
+                                'moderated' =&gt; _n_noop('Pending &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;pending-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;', 'Pending &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;pending-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;'),
+                                'approved' =&gt; _n_noop('Approved', 'Approved'), // singular not used
+                                'spam' =&gt; _n_noop('Spam &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;spam-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;', 'Spam &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;spam-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;'),
+                                'trash' =&gt; _n_noop('Trash &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;trash-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;', 'Trash &lt;span class=&quot;count&quot;&gt;(&lt;span class=&quot;trash-count&quot;&gt;%s&lt;/span&gt;)&lt;/span&gt;')
+                        );
+
+                if ( !EMPTY_TRASH_DAYS )
+                        unset($stati['trash']);
+
+                $link = 'edit-comments.php';
+                if ( !empty($comment_type) &amp;&amp; 'all' != $comment_type )
+                        $link = add_query_arg( 'comment_type', $comment_type, $link );
+
+                foreach ( $stati as $status =&gt; $label ) {
+                        $class = ( $status == $comment_status ) ? ' class=&quot;current&quot;' : '';
+
+                        if ( !isset( $num_comments-&gt;$status ) )
+                                $num_comments-&gt;$status = 10;
+                        $link = add_query_arg( 'comment_status', $status, $link );
+                        if ( $post_id )
+                                $link = add_query_arg( 'p', absint( $post_id ), $link );
+                        /*
+                        // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark
+                        if ( !empty( $_REQUEST['s'] ) )
+                                $link = add_query_arg( 's', esc_attr( stripslashes( $_REQUEST['s'] ) ), $link );
+                        */
+                        $status_links[$status] = &quot;&lt;li class='$status'&gt;&lt;a href='$link'$class&gt;&quot; . sprintf(
+                                _n( $label[0], $label[1], $num_comments-&gt;$status ),
+                                number_format_i18n( $num_comments-&gt;$status )
+                        ) . '&lt;/a&gt;';
+                }
+
+                $status_links = apply_filters( 'comment_status_links', $status_links );
+                return $status_links;
+        }
+
</ins><span class="cx">         function get_bulk_actions() {
</span><span class="cx">                 global $comment_status;
</span><span class="cx"> 
</span><span class="lines">@@ -3169,6 +3341,54 @@
</span><span class="cx">                         parent::display_tablenav( $which );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        function get_views() {
+                global $totals, $status;
+        
+                $status_links = array();
+                foreach ( $totals as $type =&gt; $count ) {
+                        if ( !$count )
+                                continue;
+
+                        switch ( $type ) {
+                                case 'all':
+                                        $text = _nx( 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count, 'plugins' );
+                                        break;
+                                case 'active':
+                                        $text = _n( 'Active &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Active &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
+                                        break;
+                                case 'recently_activated':
+                                        $text = _n( 'Recently Active &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Recently Active &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
+                                        break;
+                                case 'inactive':
+                                        $text = _n( 'Inactive &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Inactive &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
+                                        break;
+                                case 'network':
+                                        $text = _n( 'Network &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Network &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
+                                        break;
+                                case 'mustuse':
+                                        $text = _n( 'Must-Use &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Must-Use &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
+                                        break;
+                                case 'dropins':
+                                        $text = _n( 'Drop-ins &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Drop-ins &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
+                                        break;
+                                case 'upgrade':
+                                        $text = _n( 'Upgrade Available &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Upgrade Available &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
+                                        break;
+                                case 'search':
+                                        $text = _n( 'Search Results &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Search Results &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
+                                        break;
+                        }
+
+                        $status_links[$type] = sprintf( &quot;&lt;li&gt;&lt;a href='%s' %s&gt;%s&lt;/a&gt;&quot;, 
+                                add_query_arg('plugin_status', $type, 'plugins.php'),
+                                ( $type == $status ) ? ' class=&quot;current&quot;' : '',
+                                sprintf( $text, number_format_i18n( $count ) )
+                        );
+                }
+
+                return $status_links;
+        }
+
</ins><span class="cx">         function get_bulk_actions() {
</span><span class="cx">                 global $status;
</span><span class="cx"> 
</span><span class="lines">@@ -3427,6 +3647,19 @@
</span><span class="cx">                 _e( 'No plugins match your request.' );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        function get_views() {
+                global $tabs, $tab;
+
+                $display_tabs = array();
+                foreach ( (array) $tabs as $action =&gt; $text ) {
+                        $class = ( $action == $tab ) ? ' class=&quot;current&quot;' : '';
+                        $href = admin_url('plugin-install.php?tab=' . $action);
+                        $display_tabs[$action] = &quot;&lt;a href='$href'$class&gt;$text&lt;/a&gt;&quot;;
+                }
+
+                return $display_tabs;
+        }
+
</ins><span class="cx">         function display_tablenav( $which ) {
</span><span class="cx">                 if ( 'top' ==  $which ) { ?&gt;
</span><span class="cx">                         &lt;div class=&quot;tablenav&quot;&gt;
</span><span class="lines">@@ -3799,7 +4032,20 @@
</span><span class="cx">         function no_items() {
</span><span class="cx">                 _e( 'No themes match your request.' );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
+        function get_views() {
+                global $tabs, $tab;
+
+                $display_tabs = array();
+                foreach ( (array) $tabs as $action =&gt; $text ) {
+                        $class = ( $action == $tab ) ? ' class=&quot;current&quot;' : '';
+                        $href = admin_url('theme-install.php?tab=' . $action);
+                        $display_tabs[$action] = &quot;&lt;a href='$href'$class&gt;$text&lt;/a&gt;&quot;;
+                }
+
+                return $display_tabs;
+        }
+
</ins><span class="cx">         function get_columns() {
</span><span class="cx">                 return array();
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpadminincludeslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/list-table.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/includes/list-table.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -174,6 +174,37 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><ins>+         * Get an associative array ( id =&gt; 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-&gt;get_views();
+                $views = apply_filters( 'views_' . $this-&gt;_screen-&gt;base, $views );
+
+                if ( empty( $views ) )
+                        return;
+
+                echo &quot;&lt;ul class='subsubsub'&gt;\n&quot;;
+                echo implode( &quot; |&lt;/li&gt;\n&quot;, $views ) . &quot;&lt;/li&gt;\n&quot;;
+                echo &quot;&lt;/ul&gt;&quot;;
+        }
+
+        /**
</ins><span class="cx">          * Get an associative array ( option_name =&gt; option_title ) with the list
</span><span class="cx">          * of bulk actions available on this table.
</span><span class="cx">          *
</span></span></pre></div>
<a id="trunkwpadminplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugin-install.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugin-install.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/plugin-install.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -41,19 +41,11 @@
</span><span class="cx"> &lt;?php screen_icon(); ?&gt;
</span><span class="cx"> &lt;h2&gt;&lt;?php echo esc_html( $title ); ?&gt;&lt;/h2&gt;
</span><span class="cx"> 
</span><del>-        &lt;ul class=&quot;subsubsub&quot;&gt;
-&lt;?php
-$display_tabs = array();
-foreach ( (array) $tabs as $action =&gt; $text ) {
-        $sep = ( end($tabs) != $text ) ? ' | ' : '';
-        $class = ( $action == $tab ) ? ' class=&quot;current&quot;' : '';
-        $href = admin_url('plugin-install.php?tab=' . $action);
-        echo &quot;\t\t&lt;li&gt;&lt;a href='$href'$class&gt;$text&lt;/a&gt;$sep&lt;/li&gt;\n&quot;;
-}
-?&gt;
-        &lt;/ul&gt;
-        &lt;br class=&quot;clear&quot; /&gt;
-        &lt;?php do_action('install_plugins_' . $tab, $paged); ?&gt;
</del><ins>+&lt;?php $wp_list_table-&gt;views(); ?&gt;
+
+&lt;br class=&quot;clear&quot; /&gt;
+&lt;?php do_action('install_plugins_' . $tab, $paged); ?&gt;
</ins><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;?php
</span><span class="cx"> include('./admin-footer.php');
</span><ins>+
</ins></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/plugins.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -367,60 +367,13 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?&gt;
</span><span class="cx"> 
</span><ins>+&lt;?php $wp_list_table-&gt;views(); ?&gt;
+
</ins><span class="cx"> &lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;plugin_status&quot; value=&quot;&lt;?php echo esc_attr($status) ?&gt;&quot; /&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;paged&quot; value=&quot;&lt;?php echo esc_attr($page) ?&gt;&quot; /&gt;
</span><span class="cx"> 
</span><del>-&lt;ul class=&quot;subsubsub&quot;&gt;
</del><span class="cx"> &lt;?php
</span><del>-
-$status_links = array();
-foreach ( $totals as $type =&gt; $count ) {
-        if ( !$count )
-                continue;
-
-        switch ( $type ) {
-                case 'all':
-                        $text = _nx( 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count, 'plugins' );
-                        break;
-                case 'active':
-                        $text = _n( 'Active &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Active &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
-                        break;
-                case 'recently_activated':
-                        $text = _n( 'Recently Active &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Recently Active &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
-                        break;
-                case 'inactive':
-                        $text = _n( 'Inactive &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Inactive &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
-                        break;
-                case 'network':
-                        $text = _n( 'Network &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Network &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
-                        break;
-                case 'mustuse':
-                        $text = _n( 'Must-Use &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Must-Use &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
-                        break;
-                case 'dropins':
-                        $text = _n( 'Drop-ins &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Drop-ins &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
-                        break;
-                case 'upgrade':
-                        $text = _n( 'Upgrade Available &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Upgrade Available &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
-                        break;
-                case 'search':
-                        $text = _n( 'Search Results &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Search Results &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $count );
-                        break;
-        }
-
-        $status_links[] = sprintf( &quot;&lt;li&gt;&lt;a href='%s' %s&gt;%s&lt;/a&gt;&quot;, 
-                add_query_arg('plugin_status', $type, 'plugins.php'),
-                ( $type == $status ) ? ' class=&quot;current&quot;' : '',
-                sprintf( $text, number_format_i18n( $count ) )
-        );
-}
-echo implode( &quot; |&lt;/li&gt;\n&quot;, $status_links ) . '&lt;/li&gt;';
-unset( $status_links );
-?&gt;
-&lt;/ul&gt;
-
-&lt;?php
</del><span class="cx"> if ( 'mustuse' == $status )
</span><span class="cx">         echo '&lt;br class=&quot;clear&quot;&gt;&lt;p&gt;' . __( 'Files in the &lt;code&gt;/wp-content/mu-plugins&lt;/code&gt; directory are executed automatically.' ) . '&lt;/p&gt;';
</span><span class="cx"> elseif ( 'dropins' == $status )
</span></span></pre></div>
<a id="trunkwpadminthemeinstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/theme-install.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/theme-install.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/theme-install.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -41,19 +41,10 @@
</span><span class="cx"> &lt;?php screen_icon(); ?&gt;
</span><span class="cx"> &lt;h2&gt;&lt;a href=&quot;themes.php&quot; class=&quot;nav-tab&quot;&gt;&lt;?php echo esc_html_x('Manage Themes', 'theme'); ?&gt;&lt;/a&gt;&lt;a href=&quot;theme-install.php&quot; class=&quot;nav-tab nav-tab-active&quot;&gt;&lt;?php echo esc_html( $title ); ?&gt;&lt;/a&gt;&lt;/h2&gt;
</span><span class="cx"> 
</span><del>-        &lt;ul class=&quot;subsubsub&quot;&gt;
-&lt;?php
-$display_tabs = array();
-foreach ( (array) $tabs as $action =&gt; $text ) {
-        $sep = ( end($tabs) != $text ) ? ' | ' : '';
-        $class = ( $action == $tab ) ? ' class=&quot;current&quot;' : '';
-        $href = admin_url('theme-install.php?tab='. $action);
-        echo &quot;\t\t&lt;li&gt;&lt;a href='$href'$class&gt;$text&lt;/a&gt;$sep&lt;/li&gt;\n&quot;;
-}
-?&gt;
-        &lt;/ul&gt;
-        &lt;br class=&quot;clear&quot; /&gt;
-        &lt;?php do_action('install_themes_' . $tab, $paged); ?&gt;
</del><ins>+&lt;?php $wp_list_table-&gt;views(); ?&gt;
+
+&lt;br class=&quot;clear&quot; /&gt;
+&lt;?php do_action('install_themes_' . $tab, $paged); ?&gt;
</ins><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;?php
</span><span class="cx"> include('./admin-footer.php');
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/upload.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -201,41 +201,8 @@
</span><span class="cx"> &lt;div id=&quot;message&quot; class=&quot;updated&quot;&gt;&lt;p&gt;&lt;?php echo $message; ?&gt;&lt;/p&gt;&lt;/div&gt;
</span><span class="cx"> &lt;?php } ?&gt;
</span><span class="cx"> 
</span><del>-&lt;ul class=&quot;subsubsub&quot;&gt;
-&lt;?php
-$type_links = array();
-$_num_posts = (array) wp_count_attachments();
-$_total_posts = array_sum($_num_posts) - $_num_posts['trash'];
-if ( !isset( $total_orphans ) )
-                $total_orphans = $wpdb-&gt;get_var( &quot;SELECT COUNT( * ) FROM $wpdb-&gt;posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent &lt; 1&quot; );
-$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
-foreach ( $matches as $type =&gt; $reals )
-        foreach ( $reals as $real )
-                $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
</del><ins>+&lt;?php $wp_list_table-&gt;views(); ?&gt;
</ins><span class="cx"> 
</span><del>-$class = ( empty($_GET['post_mime_type']) &amp;&amp; !$detached &amp;&amp; !isset($_GET['status']) ) ? ' class=&quot;current&quot;' : '';
-$type_links[] = &quot;&lt;li&gt;&lt;a href='upload.php'$class&gt;&quot; . sprintf( _nx( 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '&lt;/a&gt;';
-foreach ( $post_mime_types as $mime_type =&gt; $label ) {
-        $class = '';
-
-        if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) )
-                continue;
-
-        if ( !empty($_GET['post_mime_type']) &amp;&amp; wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
-                $class = ' class=&quot;current&quot;';
-        if ( !empty( $num_posts[$mime_type] ) )
-                $type_links[] = &quot;&lt;li&gt;&lt;a href='upload.php?post_mime_type=$mime_type'$class&gt;&quot; . sprintf( _n( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '&lt;/a&gt;';
-}
-$type_links[] = '&lt;li&gt;&lt;a href=&quot;upload.php?detached=1&quot;' . ( $detached ? ' class=&quot;current&quot;' : '' ) . '&gt;' . sprintf( _nx( 'Unattached &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Unattached &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '&lt;/a&gt;';
-
-if ( !empty($_num_posts['trash']) )
-        $type_links[] = '&lt;li&gt;&lt;a href=&quot;upload.php?status=trash&quot;' . ( (isset($_GET['status']) &amp;&amp; $_GET['status'] == 'trash' ) ? ' class=&quot;current&quot;' : '') . '&gt;' . sprintf( _nx( 'Trash &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Trash &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '&lt;/a&gt;';
-
-echo implode( &quot; |&lt;/li&gt;\n&quot;, $type_links) . '&lt;/li&gt;';
-unset($type_links);
-?&gt;
-&lt;/ul&gt;
-
</del><span class="cx"> &lt;form class=&quot;search-form&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
</span><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;media-search-input&quot;&gt;&lt;?php _e( 'Search Media' ); ?&gt;:&lt;/label&gt;
</span></span></pre></div>
<a id="trunkwpadminusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/users.php (15577 => 15578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/users.php        2010-09-05 19:26:01 UTC (rev 15577)
+++ trunk/wp-admin/users.php        2010-09-05 21:26:27 UTC (rev 15578)
</span><span class="lines">@@ -359,42 +359,8 @@
</span><span class="cx">         printf( '&lt;span class=&quot;subtitle&quot;&gt;' . __('Search results for &amp;#8220;%s&amp;#8221;') . '&lt;/span&gt;', esc_html( $usersearch ) ); ?&gt;
</span><span class="cx"> &lt;/h2&gt;
</span><span class="cx"> 
</span><del>-&lt;div class=&quot;filter&quot;&gt;
-&lt;form id=&quot;list-filter&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
-&lt;ul class=&quot;subsubsub&quot;&gt;
-&lt;?php
-$users_of_blog = count_users();
-$total_users = $users_of_blog['total_users'];
-$avail_roles =&amp; $users_of_blog['avail_roles'];
-unset($users_of_blog);
</del><ins>+&lt;?php $wp_list_table-&gt;views(); ?&gt;
</ins><span class="cx"> 
</span><del>-$current_role = false;
-$class = empty($role) ? ' class=&quot;current&quot;' : '';
-$role_links = array();
-$role_links[] = &quot;&lt;li&gt;&lt;a href='users.php'$class&gt;&quot; . sprintf( _nx( 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'All &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '&lt;/a&gt;';
-foreach ( $wp_roles-&gt;get_names() as $this_role =&gt; $name ) {
-        if ( !isset($avail_roles[$this_role]) )
-                continue;
-
-        $class = '';
-
-        if ( $this_role == $role ) {
-                $current_role = $role;
-                $class = ' class=&quot;current&quot;';
-        }
-
-        $name = translate_user_role( $name );
-        /* translators: User role name with count */
-        $name = sprintf( __('%1$s &lt;span class=&quot;count&quot;&gt;(%2$s)&lt;/span&gt;'), $name, $avail_roles[$this_role] );
-        $role_links[] = &quot;&lt;li&gt;&lt;a href='users.php?role=$this_role'$class&gt;$name&lt;/a&gt;&quot;;
-}
-echo implode( &quot; |&lt;/li&gt;\n&quot;, $role_links) . '&lt;/li&gt;';
-unset($role_links);
-?&gt;
-&lt;/ul&gt;
-&lt;/form&gt;
-&lt;/div&gt;
-
</del><span class="cx"> &lt;form class=&quot;search-form&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
</span><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;user-search-input&quot;&gt;&lt;?php _e( 'Search Users' ); ?&gt;:&lt;/label&gt;
</span></span></pre>
</div>
</div>

</body>
</html>