<!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>[15955] trunk/wp-admin/includes: Introduce require_list_table(),
  rework get_list_table() calls,
  split default-list-tables into individual files.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15955">15955</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-10-25 02:57:43 +0000 (Mon, 25 Oct 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Introduce require_list_table(), rework get_list_table() calls, split default-list-tables into individual files. see <a href="http://trac.wordpress.org/ticket/14579">#14579</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesclasswplisttablephp">trunk/wp-admin/includes/class-wp-list-table.php</a></li>
<li><a href="#trunkwpadminincludesmetaboxesphp">trunk/wp-admin/includes/meta-boxes.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpadminincludeslisttablecommentsphp">trunk/wp-admin/includes/list-table-comments.php</a></li>
<li><a href="#trunkwpadminincludeslisttablelinksphp">trunk/wp-admin/includes/list-table-links.php</a></li>
<li><a href="#trunkwpadminincludeslisttablemediaphp">trunk/wp-admin/includes/list-table-media.php</a></li>
<li><a href="#trunkwpadminincludeslisttablemsusersphp">trunk/wp-admin/includes/list-table-ms-users.php</a></li>
<li><a href="#trunkwpadminincludeslisttableplugininstallphp">trunk/wp-admin/includes/list-table-plugin-install.php</a></li>
<li><a href="#trunkwpadminincludeslisttablepluginsphp">trunk/wp-admin/includes/list-table-plugins.php</a></li>
<li><a href="#trunkwpadminincludeslisttablesitesphp">trunk/wp-admin/includes/list-table-sites.php</a></li>
<li><a href="#trunkwpadminincludeslisttabletermsphp">trunk/wp-admin/includes/list-table-terms.php</a></li>
<li><a href="#trunkwpadminincludeslisttablethemeinstallphp">trunk/wp-admin/includes/list-table-theme-install.php</a></li>
<li><a href="#trunkwpadminincludeslisttablethemesphp">trunk/wp-admin/includes/list-table-themes.php</a></li>
<li><a href="#trunkwpadminincludeslisttableusersphp">trunk/wp-admin/includes/list-table-users.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesdefaultlisttablesphp">trunk/wp-admin/includes/default-list-tables.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesclasswplisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-list-table.php (15954 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-list-table.php        2010-10-25 00:12:41 UTC (rev 15954)
+++ trunk/wp-admin/includes/class-wp-list-table.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -815,17 +815,41 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 3.1.0
</span><span class="cx">  *
</span><del>- * @param string $type The type of the list table
- * @return object
</del><ins>+ * @param string $class The type of the list table, which is the class name except for core list tables.
+ * @return object|bool Object on success, false if the class does not exist.
</ins><span class="cx">  */
</span><del>-function get_list_table( $type ) {
-        require_once( ABSPATH . '/wp-admin/includes/default-list-tables.php' );
-        // Temp
-        require_once( ABSPATH . '/wp-admin/includes/list-table-posts.php' );
</del><ins>+function get_list_table( $class ) {
+        $class = apply_filters( &quot;get_list_table_$class&quot;, $class );
</ins><span class="cx"> 
</span><del>-        $class = 'WP_' . strtr( ucwords( strtr( $type, '-', ' ') ), ' ', '_' ) . '_Table';
-        $class = apply_filters( &quot;get_list_table_$type&quot;, $class );
</del><ins>+        require_list_table( $class );
</ins><span class="cx"> 
</span><del>-        return new $class;
</del><ins>+        if ( class_exists( $class ) )
+                return new $class;
+        return false;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Include the proper file for a core list table.
+ *
+ * Useful for extending a core class that would not otherwise be required.
+ *
+ * @since 3.1.0
+ *
+ * @param string $table The core table to include.
+ * @return bool True on success, false on failure.
+ */
+function require_list_table( $class ) {
+        $core_classes = array( 'WP_Posts_Table' =&gt; 'posts', 'WP_Media_Table' =&gt; 'media', 'WP_Terms_Table' =&gt; 'terms',
+                'WP_Users_Table' =&gt; 'users', 'WP_Comments_Table' =&gt; 'comments', 'WP_Post_Comments_Table' =&gt; 'comments',
+                'WP_Links_Table' =&gt; 'links', 'WP_Sites_Table' =&gt; 'sites', 'WP_MS_Users_Table' =&gt; 'ms-users',
+                'WP_Plugins_Table' =&gt; 'plugins', 'WP_Plugin_Install_Table' =&gt; 'plugin-install', 'WP_Themes_Table' =&gt; 'themes',
+                'WP_Theme_Install_Table' =&gt; 'theme-install' );
+
+        if ( isset( $core_classes[ $class ] ) ) {
+                require_once( ABSPATH . '/wp-admin/includes/list-table-' . $core_classes[ $class ] . '.php' );
+                return true;
+        }
+        return false;
+}
+
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/includes/default-list-tables.php (15954 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/default-list-tables.php        2010-10-25 00:12:41 UTC (rev 15954)
+++ trunk/wp-admin/includes/default-list-tables.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -1,3279 +0,0 @@
</span><del>-&lt;?php
-
-/**
- * List table classes
- *
- * Each list-type admin screen has a class that handles the rendering of the list table.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-class WP_Media_Table extends WP_List_Table {
-
-        function WP_Media_Table() {
-                global $detached;
-
-                $detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] );
-
-                parent::WP_List_Table( array(
-                        'screen' =&gt; $detached ? 'upload-detached' : 'upload',
-                        'plural' =&gt; 'media'
-                ) );
-        }
-
-        function check_permissions() {
-                if ( !current_user_can('upload_files') )
-                        wp_die( __( 'You do not have permission to upload files.' ) );
-        }
-
-        function prepare_items() {
-                global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types;
-
-                $q = $_REQUEST;
-
-                if ( !empty( $lost ) )
-                        $q['post__in'] = implode( ',', $lost );
-
-                list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $q );
-
-                 $this-&gt;is_trash = isset( $_REQUEST['status'] ) &amp;&amp; 'trash' == $_REQUEST['status'];
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; $wp_query-&gt;found_posts,
-                        'total_pages' =&gt; $wp_query-&gt;max_num_pages,
-                        'per_page' =&gt; $wp_query-&gt;query_vars['posts_per_page'],
-                ) );
-        }
-
-        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;
-        }
-
-        function get_bulk_actions() {
-                global $detached;
-
-                $actions = array();
-                $actions['delete'] = __( 'Delete Permanently' );
-                if ( $detached )
-                        $actions['attach'] = __( 'Attach to a post' );
-
-                return $actions;
-        }
-
-        function extra_tablenav( $which ) {
-                global $post_type, $detached;
-?&gt;
-                &lt;div class=&quot;alignleft actions&quot;&gt;
-&lt;?php
-                if ( 'top' == $which &amp;&amp; !is_singular() &amp;&amp; !$detached &amp;&amp; !$this-&gt;is_trash ) {
-                        $this-&gt;months_dropdown( $post_type );
-
-                        do_action( 'restrict_manage_posts' );
-?&gt;
-                        &lt;input type=&quot;submit&quot; id=&quot;post-query-submit&quot; value=&quot;&lt;?php esc_attr_e( 'Filter' ); ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
-&lt;?php
-                }
-
-                if ( $detached ) { ?&gt;
-                        &lt;input type=&quot;submit&quot; id=&quot;find_detached&quot; name=&quot;find_detached&quot; value=&quot;&lt;?php esc_attr_e( 'Scan for lost attachments' ); ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
-                &lt;?php } elseif ( $this-&gt;is_trash &amp;&amp; current_user_can( 'edit_others_posts' ) ) { ?&gt;
-                        &lt;input type=&quot;submit&quot; id=&quot;delete_all&quot; name=&quot;delete_all&quot; value=&quot;&lt;?php esc_attr_e( 'Empty Trash' ); ?&gt;&quot; class=&quot;button-secondary apply&quot; /&gt;
-                &lt;?php } ?&gt;
-                &lt;/div&gt;
-&lt;?php
-        }
-
-        function current_action() {
-                if ( isset( $_REQUEST['find_detached'] ) )
-                        return 'find_detached';
-
-                if ( isset( $_REQUEST['found_post_id'] ) &amp;&amp; isset( $_REQUEST['media'] ) )
-                        return 'attach';
-
-                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
-                        return 'delete_all';
-
-                return parent::current_action();
-        }
-
-        function has_items() {
-                return have_posts();
-        }
-
-        function no_items() {
-                _e( 'No media attachments found.' );
-        }
-
-        function get_columns() {
-                $posts_columns = array();
-                $posts_columns['cb'] = '&lt;input type=&quot;checkbox&quot; /&gt;';
-                $posts_columns['icon'] = '';
-                /* translators: column name */
-                $posts_columns['title'] = _x( 'File', 'column name' );
-                $posts_columns['author'] = __( 'Author' );
-                //$posts_columns['tags'] = _x( 'Tags', 'column name' );
-                /* translators: column name */
-                if ( 'upload' == $this-&gt;_screen-&gt;id ) {
-                        $posts_columns['parent'] = _x( 'Attached to', 'column name' );
-                        $posts_columns['comments'] = '&lt;div class=&quot;vers&quot;&gt;&lt;img alt=&quot;Comments&quot; src=&quot;' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '&quot; /&gt;&lt;/div&gt;';
-                }
-                /* translators: column name */
-                $posts_columns['date'] = _x( 'Date', 'column name' );
-                $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, 'upload' != $this-&gt;_screen-&gt;id );
-
-                return $posts_columns;
-        }
-
-        function get_sortable_columns() {
-                return array(
-                        'title'    =&gt; 'title',
-                        'author'   =&gt; 'author',
-                        'parent'   =&gt; 'parent',
-                        'comments' =&gt; 'comment_count',
-                        'date'     =&gt; 'date',
-                );
-        }
-
-        function display_rows() {
-                global $detached, $post, $id;
-
-                if ( $detached ) {
-                        $this-&gt;display_orphans();
-                        return;
-                }
-
-                add_filter( 'the_title','esc_html' );
-                $alt = '';
-
-                while ( have_posts() ) : the_post();
-
-                        if ( $this-&gt;is_trash &amp;&amp; $post-&gt;post_status != 'trash'
-                        ||  !$this-&gt;is_trash &amp;&amp; $post-&gt;post_status == 'trash' )
-                                continue;
-
-                        $alt = ( 'alternate' == $alt ) ? '' : 'alternate';
-                        $post_owner = ( get_current_user_id() == $post-&gt;post_author ) ? 'self' : 'other';
-                        $att_title = _draft_or_post_title();
-?&gt;
-        &lt;tr id='post-&lt;?php echo $id; ?&gt;' class='&lt;?php echo trim( $alt . ' author-' . $post_owner . ' status-' . $post-&gt;post_status ); ?&gt;' valign=&quot;top&quot;&gt;
-&lt;?php
-
-list( $columns, $hidden ) = $this-&gt;get_column_info();
-foreach ( $columns as $column_name =&gt; $column_display_name ) {
-        $class = &quot;class='$column_name column-$column_name'&quot;;
-
-        $style = '';
-        if ( in_array( $column_name, $hidden ) )
-                $style = ' style=&quot;display:none;&quot;';
-
-        $attributes = $class . $style;
-
-        switch ( $column_name ) {
-
-        case 'cb':
-?&gt;
-                &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;&lt;?php if ( current_user_can( 'edit_post', $post-&gt;ID ) ) { ?&gt;&lt;input type=&quot;checkbox&quot; name=&quot;media[]&quot; value=&quot;&lt;?php the_ID(); ?&gt;&quot; /&gt;&lt;?php } ?&gt;&lt;/th&gt;
-&lt;?php
-                break;
-
-        case 'icon':
-                $attributes = 'class=&quot;column-icon media-icon&quot;' . $style;
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php
-                        if ( $thumb = wp_get_attachment_image( $post-&gt;ID, array( 80, 60 ), true ) ) {
-                                if ( $this-&gt;is_trash ) {
-                                        echo $thumb;
-                                } else {
-?&gt;
-                                &lt;a href=&quot;&lt;?php echo get_edit_post_link( $post-&gt;ID, true ); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $att_title ) ); ?&gt;&quot;&gt;
-                                        &lt;?php echo $thumb; ?&gt;
-                                &lt;/a&gt;
-
-&lt;?php                        }
-                        }
-?&gt;
-                &lt;/td&gt;
-&lt;?php
-                break;
-
-        case 'title':
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;strong&gt;&lt;?php if ( $this-&gt;is_trash ) echo $att_title; else { ?&gt;&lt;a href=&quot;&lt;?php echo get_edit_post_link( $post-&gt;ID, true ); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $att_title ) ); ?&gt;&quot;&gt;&lt;?php echo $att_title; ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/strong&gt;
-                        &lt;p&gt;
-&lt;?php
-                        if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post-&gt;ID ), $matches ) )
-                                echo esc_html( strtoupper( $matches[1] ) );
-                        else
-                                echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) );
-?&gt;
-                        &lt;/p&gt;
-&lt;?php
-                $actions = array();
-                if ( current_user_can( 'edit_post', $post-&gt;ID ) &amp;&amp; !$this-&gt;is_trash )
-                        $actions['edit'] = '&lt;a href=&quot;' . get_edit_post_link( $post-&gt;ID, true ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
-                if ( current_user_can( 'delete_post', $post-&gt;ID ) ) {
-                        if ( $this-&gt;is_trash )
-                                $actions['untrash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=untrash&amp;amp;post=$post-&gt;ID&quot;, 'untrash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Restore' ) . &quot;&lt;/a&gt;&quot;;
-                        elseif ( EMPTY_TRASH_DAYS &amp;&amp; MEDIA_TRASH )
-                                $actions['trash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$post-&gt;ID&quot;, 'trash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
-                        if ( $this-&gt;is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) {
-                                $delete_ays = ( !$this-&gt;is_trash &amp;&amp; !MEDIA_TRASH ) ? &quot; onclick='return showNotice.warn();'&quot; : '';
-                                $actions['delete'] = &quot;&lt;a class='submitdelete'$delete_ays href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$post-&gt;ID&quot;, 'delete-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Delete Permanently' ) . &quot;&lt;/a&gt;&quot;;
-                        }
-                }
-                if ( !$this-&gt;is_trash ) {
-                        $title =_draft_or_post_title( $post-&gt;post_parent );
-                        $actions['view'] = '&lt;a href=&quot;' . get_permalink( $post-&gt;ID ) . '&quot; title=&quot;' . esc_attr( sprintf( __( 'View &amp;#8220;%s&amp;#8221;' ), $title ) ) . '&quot; rel=&quot;permalink&quot;&gt;' . __( 'View' ) . '&lt;/a&gt;';
-                }
-                $actions = apply_filters( 'media_row_actions', $actions, $post );
-                echo $this-&gt;row_actions( $actions );
-?&gt;
-                &lt;/td&gt;
-&lt;?php
-                break;
-
-        case 'author':
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php the_author() ?&gt;&lt;/td&gt;
-&lt;?php
-                break;
-
-        case 'tags':
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php
-                $tags = get_the_tags();
-                if ( !empty( $tags ) ) {
-                        $out = array();
-                        foreach ( $tags as $c )
-                                $out[] = &quot;&lt;a href='edit.php?tag=$c-&gt;slug'&gt; &quot; . esc_html( sanitize_term_field( 'name', $c-&gt;name, $c-&gt;term_id, 'post_tag', 'display' ) ) . &quot;&lt;/a&gt;&quot;;
-                        echo join( ', ', $out );
-                } else {
-                        _e( 'No Tags' );
-                }
-?&gt;
-                &lt;/td&gt;
-&lt;?php
-                break;
-
-        case 'desc':
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo has_excerpt() ? $post-&gt;post_excerpt : ''; ?&gt;&lt;/td&gt;
-&lt;?php
-                break;
-
-        case 'date':
-                if ( '0000-00-00 00:00:00' == $post-&gt;post_date &amp;&amp; 'date' == $column_name ) {
-                        $t_time = $h_time = __( 'Unpublished' );
-                } else {
-                        $t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
-                        $m_time = $post-&gt;post_date;
-                        $time = get_post_time( 'G', true, $post, false );
-                        if ( ( abs( $t_diff = time() - $time ) ) &lt; 86400 ) {
-                                if ( $t_diff &lt; 0 )
-                                        $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) );
-                                else
-                                        $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
-                        } else {
-                                $h_time = mysql2date( __( 'Y/m/d' ), $m_time );
-                        }
-                }
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo $h_time ?&gt;&lt;/td&gt;
-&lt;?php
-                break;
-
-        case 'parent':
-                if ( $post-&gt;post_parent &gt; 0 ) {
-                        if ( get_post( $post-&gt;post_parent ) ) {
-                                $title =_draft_or_post_title( $post-&gt;post_parent );
-                        }
-?&gt;
-                        &lt;td &lt;?php echo $attributes ?&gt;&gt;
-                                &lt;strong&gt;&lt;a href=&quot;&lt;?php echo get_edit_post_link( $post-&gt;post_parent ); ?&gt;&quot;&gt;&lt;?php echo $title ?&gt;&lt;/a&gt;&lt;/strong&gt;,
-                                &lt;?php echo get_the_time( __( 'Y/m/d' ) ); ?&gt;
-                        &lt;/td&gt;
-&lt;?php
-                } else {
-?&gt;
-                        &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php _e( '(Unattached)' ); ?&gt;&lt;br /&gt;
-                        &lt;a class=&quot;hide-if-no-js&quot; onclick=&quot;findPosts.open( 'media[]','&lt;?php echo $post-&gt;ID ?&gt;' );return false;&quot; href=&quot;#the-list&quot;&gt;&lt;?php _e( 'Attach' ); ?&gt;&lt;/a&gt;&lt;/td&gt;
-&lt;?php
-                }
-                break;
-
-        case 'comments':
-                $attributes = 'class=&quot;comments column-comments num&quot;' . $style;
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;
-                        &lt;div class=&quot;post-com-count-wrapper&quot;&gt;
-&lt;?php
-                $pending_comments = get_pending_comments_num( $post-&gt;ID );
-
-                $this-&gt;comments_bubble( $post-&gt;ID, $pending_comments );
-?&gt;
-                        &lt;/div&gt;
-                &lt;/td&gt;
-&lt;?php
-                break;
-
-        case 'actions':
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;
-                        &lt;a href=&quot;media.php?action=edit&amp;amp;attachment_id=&lt;?php the_ID(); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $att_title ) ); ?&gt;&quot;&gt;&lt;?php _e( 'Edit' ); ?&gt;&lt;/a&gt; |
-                        &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php _e( 'Get permalink' ); ?&gt;&lt;/a&gt;
-                &lt;/td&gt;
-                &lt;?php
-                break;
-
-        default:
-?&gt;
-                &lt;td &lt;?php echo $attributes ?&gt;&gt;
-                        &lt;?php do_action( 'manage_media_custom_column', $column_name, $id ); ?&gt;
-                &lt;/td&gt;
-&lt;?php
-                break;
-        }
-}
-?&gt;
-        &lt;/tr&gt;
-&lt;?php endwhile;
-        }
-
-        function display_orphans() {
-                global $post;
-
-                $class = '';
-
-                while ( have_posts() ) : the_post();
-
-                        $class = ( 'alternate' == $class ) ? '' : 'alternate';
-                        $att_title = esc_html( _draft_or_post_title( $post-&gt;ID ) );
-
-                        $edit_link = '&lt;a href=&quot;' . get_edit_post_link( $post-&gt;ID ) . '&quot; title=&quot;' . esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $att_title ) ) . '&quot;&gt;%s&lt;/a&gt;';
-?&gt;
-        &lt;tr id='post-&lt;?php echo $post-&gt;ID; ?&gt;' class='&lt;?php echo $class; ?&gt;' valign=&quot;top&quot;&gt;
-                &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;
-                &lt;?php if ( current_user_can( 'edit_post', $post-&gt;ID ) ) { ?&gt;
-                        &lt;input type=&quot;checkbox&quot; name=&quot;media[]&quot; value=&quot;&lt;?php echo esc_attr( $post-&gt;ID ); ?&gt;&quot; /&gt;
-                &lt;?php } ?&gt;
-                &lt;/th&gt;
-
-                &lt;td class=&quot;media-icon&quot;&gt;
-                &lt;?php if ( $thumb = wp_get_attachment_image( $post-&gt;ID, array( 80, 60 ), true ) ) {
-                        printf( $edit_link, $thumb );
-                } ?&gt;
-                &lt;/td&gt;
-
-                &lt;td class=&quot;media column-media&quot;&gt;
-                        &lt;strong&gt;&lt;?php printf( $edit_link, $att_title ); ?&gt;&lt;/strong&gt;&lt;br /&gt;
-&lt;?php
-                        if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post-&gt;ID ), $matches ) )
-                                echo esc_html( strtoupper( $matches[1] ) );
-                        else
-                                echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) );
-?&gt;
-&lt;?php
-                        $actions = array();
-                        if ( current_user_can( 'edit_post', $post-&gt;ID ) )
-                                $actions['edit'] = '&lt;a href=&quot;' . get_edit_post_link( $post-&gt;ID, true ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
-                        if ( current_user_can( 'delete_post', $post-&gt;ID ) )
-                                if ( EMPTY_TRASH_DAYS &amp;&amp; MEDIA_TRASH ) {
-                                        $actions['trash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$post-&gt;ID&quot;, 'trash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
-                                } else {
-                                        $delete_ays = !MEDIA_TRASH ? &quot; onclick='return showNotice.warn();'&quot; : '';
-                                        $actions['delete'] = &quot;&lt;a class='submitdelete'$delete_ays href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$post-&gt;ID&quot;, 'delete-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Delete Permanently' ) . &quot;&lt;/a&gt;&quot;;
-                                }
-                        $actions['view'] = '&lt;a href=&quot;' . get_permalink( $post-&gt;ID ) . '&quot; title=&quot;' . esc_attr( sprintf( __( 'View &amp;#8220;%s&amp;#8221;' ), $att_title ) ) . '&quot; rel=&quot;permalink&quot;&gt;' . __( 'View' ) . '&lt;/a&gt;';
-                        if ( current_user_can( 'edit_post', $post-&gt;ID ) )
-                                $actions['attach'] = '&lt;a href=&quot;#the-list&quot; onclick=&quot;findPosts.open( \'media[]\',\''.$post-&gt;ID.'\' );return false;&quot; class=&quot;hide-if-no-js&quot;&gt;'.__( 'Attach' ).'&lt;/a&gt;';
-                        $actions = apply_filters( 'media_row_actions', $actions, $post );
-
-                        echo $this-&gt;row_actions( $actions );
-?&gt;
-                &lt;/td&gt;
-                &lt;td class=&quot;author column-author&quot;&gt;
-                        &lt;?php $author = get_userdata( $post-&gt;post_author ); echo $author-&gt;display_name; ?&gt;
-                &lt;/td&gt;
-&lt;?php
-                if ( '0000-00-00 00:00:00' == $post-&gt;post_date &amp;&amp; 'date' == $column_name ) {
-                        $t_time = $h_time = __( 'Unpublished' );
-                } else {
-                        $t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
-                        $m_time = $post-&gt;post_date;
-                        $time = get_post_time( 'G', true );
-                        if ( ( abs( $t_diff = time() - $time ) ) &lt; 86400 ) {
-                                if ( $t_diff &lt; 0 )
-                                        $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) );
-                                else
-                                        $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
-                        } else {
-                                $h_time = mysql2date( __( 'Y/m/d' ), $m_time );
-                        }
-                }
-?&gt;
-                &lt;td class=&quot;date column-date&quot;&gt;&lt;?php echo $h_time ?&gt;&lt;/td&gt;
-        &lt;/tr&gt;
-&lt;?php
-                endwhile;
-        }
-}
-
-class WP_Terms_Table extends WP_List_Table {
-
-        var $callback_args;
-
-        function WP_Terms_Table() {
-                global $post_type, $taxonomy, $tax, $current_screen;
-
-                wp_reset_vars( array( 'action', 'taxonomy', 'post_type' ) );
-
-                if ( empty( $taxonomy ) )
-                        $taxonomy = 'post_tag';
-
-                if ( !taxonomy_exists( $taxonomy ) )
-                        wp_die( __( 'Invalid taxonomy' ) );
-
-                $tax = get_taxonomy( $taxonomy );
-
-                if ( empty( $post_type ) || !in_array( $post_type, get_post_types( array( 'public' =&gt; true ) ) ) )
-                        $post_type = 'post';
-
-                if ( !isset( $current_screen ) )
-                        set_current_screen( 'edit-' . $taxonomy );
-
-                parent::WP_List_Table( array(
-                        'screen' =&gt; $current_screen,
-                        'plural' =&gt; 'tags',
-                        'singular' =&gt; 'tag',
-                ) );
-        }
-
-        function check_permissions( $type = 'manage' ) {
-                global $tax;
-
-                $cap = 'manage' == $type ? $tax-&gt;cap-&gt;manage_terms : $tax-&gt;cap-&gt;edit_terms;
-
-                if ( !current_user_can( $tax-&gt;cap-&gt;manage_terms ) )
-                        wp_die( __( 'Cheatin&amp;#8217; uh?' ) );
-        }
-
-        function prepare_items() {
-                global $taxonomy;
-
-                $tags_per_page = $this-&gt;get_items_per_page( 'edit_' .  $taxonomy . '_per_page' );
-
-                if ( 'post_tag' == $taxonomy ) {
-                        $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page );
-                        $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); // Old filter
-                } elseif ( 'category' == $taxonomy ) {
-                        $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); // Old filter
-                }
-
-                $search = !empty( $_REQUEST['s'] ) ? trim( stripslashes( $_REQUEST['s'] ) ) : '';
-
-                $args = array(
-                        'search' =&gt; $search,
-                        'page' =&gt; $this-&gt;get_pagenum(),
-                        'number' =&gt; $tags_per_page,
-                );
-
-                if ( !empty( $_REQUEST['orderby'] ) )
-                        $args['orderby'] = trim( stripslashes( $_REQUEST['orderby'] ) );
-
-                if ( !empty( $_REQUEST['order'] ) )
-                        $args['order'] = trim( stripslashes( $_REQUEST['order'] ) );
-
-                $this-&gt;callback_args = $args;
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; wp_count_terms( $taxonomy, compact( 'search' ) ),
-                        'per_page' =&gt; $tags_per_page,
-                ) );
-        }
-
-        function get_bulk_actions() {
-                $actions = array();
-                $actions['delete'] = __( 'Delete' );
-
-                return $actions;
-        }
-
-        function current_action() {
-                if ( isset( $_REQUEST['action'] ) &amp;&amp; isset( $_REQUEST['delete_tags'] ) &amp;&amp; ( 'delete' == $_REQUEST['action'] || 'delete' == $_REQUEST['action2'] ) )
-                        return 'bulk-delete';
-
-                return parent::current_action();
-        }
-
-        function get_columns() {
-                global $taxonomy;
-
-                $columns = array(
-                        'cb'          =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
-                        'name'        =&gt; __( 'Name' ),
-                        'description' =&gt; __( 'Description' ),
-                        'slug'        =&gt; __( 'Slug' ),
-                );
-
-                if ( 'link_category' == $taxonomy )
-                        $columns['links'] = __( 'Links' );
-                else
-                        $columns['posts'] = __( 'Posts' );
-
-                return $columns;
-        }
-
-        function get_sortable_columns() {
-                return array(
-                        'name'        =&gt; 'name',
-                        'description' =&gt; 'description',
-                        'slug'        =&gt; 'slug',
-                        'posts'       =&gt; 'count',
-                        'links'       =&gt; 'count'
-                );
-        }
-
-        function display_rows() {
-                global $taxonomy;
-
-                $args = wp_parse_args( $this-&gt;callback_args, array(
-                        'page' =&gt; 1,
-                        'number' =&gt; 20,
-                        'search' =&gt; '',
-                        'hide_empty' =&gt; 0
-                ) );
-
-                extract( $args, EXTR_SKIP );
-
-                $args['offset'] = $offset = ( $page - 1 ) * $number;
-
-                // convert it to table rows
-                $out = '';
-                $count = 0;
-                if ( is_taxonomy_hierarchical( $taxonomy ) &amp;&amp; !isset( $orderby ) ) {
-                        // We'll need the full set of terms then.
-                        $args['number'] = $args['offset'] = 0;
-
-                        $terms = get_terms( $taxonomy, $args );
-                        if ( !empty( $search ) ) // Ignore children on searches.
-                                $children = array();
-                        else
-                                $children = _get_term_hierarchy( $taxonomy );
-
-                        // Some funky recursion to get the job done( Paging &amp; parents mainly ) is contained within, Skip it for non-hierarchical taxonomies for performance sake
-                        $out .= $this-&gt;_rows( $taxonomy, $terms, $children, $offset, $number, $count );
-                } else {
-                        $terms = get_terms( $taxonomy, $args );
-                        foreach ( $terms as $term )
-                                $out .= $this-&gt;single_row( $term, 0, $taxonomy );
-                        $count = $number; // Only displaying a single page.
-                }
-
-                echo $out;
-        }
-
-        function _rows( $taxonomy, $terms, &amp;$children, $start = 0, $per_page = 20, &amp;$count, $parent = 0, $level = 0 ) {
-
-                $end = $start + $per_page;
-
-                $output = '';
-                foreach ( $terms as $key =&gt; $term ) {
-
-                        if ( $count &gt;= $end )
-                                break;
-
-                        if ( $term-&gt;parent != $parent &amp;&amp; empty( $_REQUEST['s'] ) )
-                                continue;
-
-                        // If the page starts in a subtree, print the parents.
-                        if ( $count == $start &amp;&amp; $term-&gt;parent &gt; 0 &amp;&amp; empty( $_REQUEST['s'] ) ) {
-                                $my_parents = $parent_ids = array();
-                                $p = $term-&gt;parent;
-                                while ( $p ) {
-                                        $my_parent = get_term( $p, $taxonomy );
-                                        $my_parents[] = $my_parent;
-                                        $p = $my_parent-&gt;parent;
-                                        if ( in_array( $p, $parent_ids ) ) // Prevent parent loops.
-                                                break;
-                                        $parent_ids[] = $p;
-                                }
-                                unset( $parent_ids );
-
-                                $num_parents = count( $my_parents );
-                                while ( $my_parent = array_pop( $my_parents ) ) {
-                                        $output .=  &quot;\t&quot; . $this-&gt;single_row( $my_parent, $level - $num_parents, $taxonomy );
-                                        $num_parents--;
-                                }
-                        }
-
-                        if ( $count &gt;= $start )
-                                $output .= &quot;\t&quot; . $this-&gt;single_row( $term, $level, $taxonomy );
-
-                        ++$count;
-
-                        unset( $terms[$key] );
-
-                        if ( isset( $children[$term-&gt;term_id] ) &amp;&amp; empty( $_REQUEST['s'] ) )
-                                $output .= $this-&gt;_rows( $taxonomy, $terms, $children, $start, $per_page, $count, $term-&gt;term_id, $level + 1 );
-                }
-
-                return $output;
-        }
-
-        function single_row( $tag, $level = 0 ) {
-                static $row_class = '';
-                $row_class = ( $row_class == '' ? ' class=&quot;alternate&quot;' : '' );
-
-                $this-&gt;level = $level;
-
-                echo '&lt;tr id=&quot;tag-' . $tag-&gt;term_id . '&quot;' . $row_class . '&gt;';
-                echo $this-&gt;single_row_columns( $tag );
-                echo '&lt;/tr&gt;';
-        }
-
-        function column_cb( $tag ) {
-                global $taxonomy, $tax;
-
-                $default_term = get_option( 'default_' . $taxonomy );
-
-                if ( current_user_can( $tax-&gt;cap-&gt;delete_terms ) &amp;&amp; $tag-&gt;term_id != $default_term )
-                        return '&lt;input type=&quot;checkbox&quot; name=&quot;delete_tags[]&quot; value=&quot;' . $tag-&gt;term_id . '&quot; /&gt;';
-                else
-                        return '&amp;nbsp;';
-        }
-
-        function column_name( $tag ) {
-                global $taxonomy, $tax, $post_type;
-
-                $default_term = get_option( 'default_' . $taxonomy );
-
-                $pad = str_repeat( '&amp;#8212; ', max( 0, $this-&gt;level ) );
-                $name = apply_filters( 'term_name', $pad . ' ' . $tag-&gt;name, $tag );
-                $qe_data = get_term( $tag-&gt;term_id, $taxonomy, OBJECT, 'edit' );
-                $edit_link = get_edit_term_link( $tag-&gt;term_id, $taxonomy, $post_type );
-
-                $out = '&lt;strong&gt;&lt;a class=&quot;row-title&quot; href=&quot;' . $edit_link . '&quot; title=&quot;' . esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $name ) ) . '&quot;&gt;' . $name . '&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;';
-
-                $actions = array();
-                if ( current_user_can( $tax-&gt;cap-&gt;edit_terms ) ) {
-                        $actions['edit'] = '&lt;a href=&quot;' . $edit_link . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
-                        $actions['inline hide-if-no-js'] = '&lt;a href=&quot;#&quot; class=&quot;editinline&quot;&gt;' . __( 'Quick&amp;nbsp;Edit' ) . '&lt;/a&gt;';
-                }
-                if ( current_user_can( $tax-&gt;cap-&gt;delete_terms ) &amp;&amp; $tag-&gt;term_id != $default_term )
-                        $actions['delete'] = &quot;&lt;a class='delete-tag' href='&quot; . wp_nonce_url( &quot;edit-tags.php?action=delete&amp;amp;taxonomy=$taxonomy&amp;amp;tag_ID=$tag-&gt;term_id&quot;, 'delete-tag_' . $tag-&gt;term_id ) . &quot;'&gt;&quot; . __( 'Delete' ) . &quot;&lt;/a&gt;&quot;;
-
-                $actions = apply_filters( 'tag_row_actions', $actions, $tag );
-                $actions = apply_filters( &quot;${taxonomy}_row_actions&quot;, $actions, $tag );
-
-                $out .= $this-&gt;row_actions( $actions );
-                $out .= '&lt;div class=&quot;hidden&quot; id=&quot;inline_' . $qe_data-&gt;term_id . '&quot;&gt;';
-                $out .= '&lt;div class=&quot;name&quot;&gt;' . $qe_data-&gt;name . '&lt;/div&gt;';
-                $out .= '&lt;div class=&quot;slug&quot;&gt;' . apply_filters( 'editable_slug', $qe_data-&gt;slug ) . '&lt;/div&gt;';
-                $out .= '&lt;div class=&quot;parent&quot;&gt;' . $qe_data-&gt;parent . '&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;';
-
-                return $out;
-        }
-
-        function column_description( $tag ) {
-                return $tag-&gt;description;
-        }
-
-        function column_slug( $tag ) {
-                return apply_filters( 'editable_slug', $tag-&gt;slug );
-        }
-
-        function column_posts( $tag ) {
-                global $taxonomy, $post_type;
-
-                $count = number_format_i18n( $tag-&gt;count );
-
-                if ( 'post_tag' == $taxonomy ) {
-                        $tagsel = 'tag';
-                } elseif ( 'category' == $taxonomy ) {
-                        $tagsel = 'category_name';
-                } elseif ( ! empty( $tax-&gt;query_var ) ) {
-                        $tagsel = $tax-&gt;query_var;
-                } else {
-                        $tagsel = $taxonomy;
-                }
-
-                return &quot;&lt;a href='edit.php?$tagsel=$tag-&gt;slug&amp;amp;post_type=$post_type'&gt;$count&lt;/a&gt;&quot;;
-        }
-
-        function column_links( $tag ) {
-                $count = number_format_i18n( $tag-&gt;count );
-                return $count;
-        }
-
-        function column_default( $tag, $column_name ) {
-                global $taxonomy;
-
-                return apply_filters( &quot;manage_${taxonomy}_custom_column&quot;, '', $column_name, $tag-&gt;term_id );
-                $out .= &quot;&lt;/td&gt;&quot;;
-        }
-
-        /**
-         * Outputs the hidden row displayed when inline editing
-         *
-         * @since 3.1.0
-         */
-        function inline_edit() {
-                global $tax;
-
-                if ( ! current_user_can( $tax-&gt;cap-&gt;edit_terms ) )
-                        return;
-
-                list( $columns, $hidden ) = $this-&gt;get_column_info();
-
-                $col_count = count( $columns ) - count( $hidden );
-                ?&gt;
-
-        &lt;form method=&quot;get&quot; action=&quot;&quot;&gt;&lt;table style=&quot;display: none&quot;&gt;&lt;tbody id=&quot;inlineedit&quot;&gt;
-                &lt;tr id=&quot;inline-edit&quot; class=&quot;inline-edit-row&quot; style=&quot;display: none&quot;&gt;&lt;td colspan=&quot;&lt;?php echo $col_count; ?&gt;&quot;&gt;
-
-                        &lt;fieldset&gt;&lt;div class=&quot;inline-edit-col&quot;&gt;
-                                &lt;h4&gt;&lt;?php _e( 'Quick Edit' ); ?&gt;&lt;/h4&gt;
-
-                                &lt;label&gt;
-                                        &lt;span class=&quot;title&quot;&gt;&lt;?php _e( 'Name' ); ?&gt;&lt;/span&gt;
-                                        &lt;span class=&quot;input-text-wrap&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; class=&quot;ptitle&quot; value=&quot;&quot; /&gt;&lt;/span&gt;
-                                &lt;/label&gt;
-        &lt;?php if ( !global_terms_enabled() ) { ?&gt;
-                                &lt;label&gt;
-                                        &lt;span class=&quot;title&quot;&gt;&lt;?php _e( 'Slug' ); ?&gt;&lt;/span&gt;
-                                        &lt;span class=&quot;input-text-wrap&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;slug&quot; class=&quot;ptitle&quot; value=&quot;&quot; /&gt;&lt;/span&gt;
-                                &lt;/label&gt;
-        &lt;?php } ?&gt;
-
-                        &lt;/div&gt;&lt;/fieldset&gt;
-        &lt;?php
-
-                $core_columns = array( 'cb' =&gt; true, 'description' =&gt; true, 'name' =&gt; true, 'slug' =&gt; true, 'posts' =&gt; true );
-
-                foreach ( $columns as $column_name =&gt; $column_display_name ) {
-                        if ( isset( $core_columns[$column_name] ) )
-                                continue;
-                        do_action( 'quick_edit_custom_box', $column_name, $type, $tax-&gt;taxonomy );
-                }
-
-        ?&gt;
-
-                &lt;p class=&quot;inline-edit-save submit&quot;&gt;
-                        &lt;a accesskey=&quot;c&quot; href=&quot;#inline-edit&quot; title=&quot;&lt;?php _e( 'Cancel' ); ?&gt;&quot; class=&quot;cancel button-secondary alignleft&quot;&gt;&lt;?php _e( 'Cancel' ); ?&gt;&lt;/a&gt;
-                        &lt;?php $update_text = $tax-&gt;labels-&gt;update_item; ?&gt;
-                        &lt;a accesskey=&quot;s&quot; href=&quot;#inline-edit&quot; title=&quot;&lt;?php echo esc_attr( $update_text ); ?&gt;&quot; class=&quot;save button-primary alignright&quot;&gt;&lt;?php echo $update_text; ?&gt;&lt;/a&gt;
-                        &lt;img class=&quot;waiting&quot; style=&quot;display:none;&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;
-                        &lt;span class=&quot;error&quot; style=&quot;display:none;&quot;&gt;&lt;/span&gt;
-                        &lt;?php wp_nonce_field( 'taxinlineeditnonce', '_inline_edit', false ); ?&gt;
-                        &lt;input type=&quot;hidden&quot; name=&quot;taxonomy&quot; value=&quot;&lt;?php echo esc_attr( $tax-&gt;name ); ?&gt;&quot; /&gt;
-                        &lt;br class=&quot;clear&quot; /&gt;
-                &lt;/p&gt;
-                &lt;/td&gt;&lt;/tr&gt;
-                &lt;/tbody&gt;&lt;/table&gt;&lt;/form&gt;
-        &lt;?php
-        }
-}
-
-class WP_Users_Table extends WP_List_Table {
-
-        function WP_Users_Table() {
-                parent::WP_List_Table( array(
-                        'screen' =&gt; 'users',
-                        'plural' =&gt; 'users'
-                ) );
-        }
-
-        function check_permissions() {
-                if ( !current_user_can('list_users') )
-                        wp_die(__('Cheatin&amp;#8217; uh?'));
-        }
-
-        function prepare_items() {
-                global $role, $usersearch;
-
-                $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
-
-                $role = isset( $_REQUEST['role'] ) ? $_REQUEST['role'] : '';
-
-                $users_per_page = $this-&gt;get_items_per_page( 'users_per_page' );
-
-                $paged = $this-&gt;get_pagenum();
-
-                $args = array(
-                        'number' =&gt; $users_per_page,
-                        'offset' =&gt; ( $paged-1 ) * $users_per_page,
-                        'role' =&gt; $role,
-                        'search' =&gt; $usersearch
-                );
-
-                if ( isset( $_REQUEST['orderby'] ) )
-                        $args['orderby'] = $_REQUEST['orderby'];
-
-                if ( isset( $_REQUEST['order'] ) )
-                        $args['order'] = $_REQUEST['order'];
-
-                // Query the user IDs for this page
-                $wp_user_search = new WP_User_Query( $args );
-
-                $this-&gt;items = $wp_user_search-&gt;get_results();
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; $wp_user_search-&gt;get_total(),
-                        'per_page' =&gt; $users_per_page,
-                ) );
-        }
-
-        function no_items() {
-                _e( 'No matching users were found.' );
-        }
-
-        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;
-        }
-
-        function get_bulk_actions() {
-                $actions = array();
-
-                if ( !is_multisite() &amp;&amp; current_user_can( 'delete_users' ) )
-                        $actions['delete'] = __( 'Delete' );
-                else
-                        $actions['remove'] = __( 'Remove' );
-
-                return $actions;
-        }
-
-        function extra_tablenav( $which ) {
-                if ( 'top' != $which )
-                        return;
-?&gt;
-        &lt;div class=&quot;alignleft actions&quot;&gt;
-                &lt;label class=&quot;screen-reader-text&quot; for=&quot;new_role&quot;&gt;&lt;?php _e( 'Change role to&amp;hellip;' ) ?&gt;&lt;/label&gt;
-                &lt;select name=&quot;new_role&quot; id=&quot;new_role&quot;&gt;
-                        &lt;option value=''&gt;&lt;?php _e( 'Change role to&amp;hellip;' ) ?&gt;&lt;/option&gt;
-                        &lt;?php wp_dropdown_roles(); ?&gt;
-                &lt;/select&gt;
-                &lt;input type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e( 'Change' ); ?&gt;&quot; name=&quot;changeit&quot; class=&quot;button-secondary&quot; /&gt;
-        &lt;/div&gt;
-&lt;?php
-        }
-
-        function current_action() {
-                if ( isset($_REQUEST['changeit']) &amp;&amp; !empty($_REQUEST['new_role']) )
-                        return 'promote';
-
-                return parent::current_action();
-        }
-
-        function get_columns() {
-                return array(
-                        'cb'       =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
-                        'username' =&gt; __( 'Login' ),
-                        'name'     =&gt; __( 'Name' ),
-                        'email'    =&gt; __( 'E-mail' ),
-                        'role'     =&gt; __( 'Role' ),
-                        'posts'    =&gt; __( 'Posts' )
-                );
-        }
-
-        function get_sortable_columns() {
-                return array(
-                        'username' =&gt; 'login',
-                        'name'     =&gt; 'name',
-                        'email'    =&gt; 'email',
-                        'posts'    =&gt; 'post_count',
-                );
-        }
-
-        function display_rows() {
-                // Query the post counts for this page
-                $post_counts = count_many_users_posts( array_keys( $this-&gt;items ) );
-
-                $style = '';
-                foreach ( $this-&gt;items as $userid =&gt; $user_object ) {
-                        $role = reset( $user_object-&gt;roles );
-
-                        if ( is_multisite() &amp;&amp; empty( $role ) )
-                                continue;
-
-                        $style = ( ' class=&quot;alternate&quot;' == $style ) ? '' : ' class=&quot;alternate&quot;';
-                        echo &quot;\n\t&quot;, $this-&gt;single_row( $user_object, $style, $role, $post_counts[ $userid ] );
-                }
-        }
-
-        /**
-         * Generate HTML for a single row on the users.php admin panel.
-         *
-         * @since 2.1.0
-         *
-         * @param object $user_object
-         * @param string $style Optional. Attributes added to the TR element.  Must be sanitized.
-         * @param string $role Key for the $wp_roles array.
-         * @param int $numposts Optional. Post count to display for this user.  Defaults to zero, as in, a new user has made zero posts.
-         * @return string
-         */
-        function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
-                global $wp_roles;
-
-                if ( !( is_object( $user_object ) &amp;&amp; is_a( $user_object, 'WP_User' ) ) )
-                        $user_object = new WP_User( (int) $user_object );
-                $user_object = sanitize_user_object( $user_object, 'display' );
-                $email = $user_object-&gt;user_email;
-                $url = $user_object-&gt;user_url;
-                $short_url = str_replace( 'http://', '', $url );
-                $short_url = str_replace( 'www.', '', $short_url );
-                if ( '/' == substr( $short_url, -1 ) )
-                        $short_url = substr( $short_url, 0, -1 );
-                if ( strlen( $short_url ) &gt; 35 )
-                        $short_url = substr( $short_url, 0, 32 ).'...';
-                $checkbox = '';
-                // Check if the user for this row is editable
-                if ( current_user_can( 'list_users' ) ) {
-                        // Set up the user editing link
-                        // TODO: make profile/user-edit determination a separate function
-                        if ( get_current_user_id() == $user_object-&gt;ID ) {
-                                $edit_link = 'profile.php';
-                        } else {
-                                $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( esc_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), &quot;user-edit.php?user_id=$user_object-&gt;ID&quot; ) );
-                        }
-                        $edit = &quot;&lt;strong&gt;&lt;a href=\&quot;$edit_link\&quot;&gt;$user_object-&gt;user_login&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&quot;;
-
-                        // Set up the hover actions for this user
-                        $actions = array();
-
-                        if ( current_user_can( 'edit_user',  $user_object-&gt;ID ) ) {
-                                $edit = &quot;&lt;strong&gt;&lt;a href=\&quot;$edit_link\&quot;&gt;$user_object-&gt;user_login&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&quot;;
-                                $actions['edit'] = '&lt;a href=&quot;' . $edit_link . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
-                        } else {
-                                $edit = &quot;&lt;strong&gt;$user_object-&gt;user_login&lt;/strong&gt;&lt;br /&gt;&quot;;
-                        }
-
-                        if ( !is_multisite() &amp;&amp; get_current_user_id() != $user_object-&gt;ID &amp;&amp; current_user_can( 'delete_user', $user_object-&gt;ID ) )
-                                $actions['delete'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;users.php?action=delete&amp;amp;user=$user_object-&gt;ID&quot;, 'bulk-users' ) . &quot;'&gt;&quot; . __( 'Delete' ) . &quot;&lt;/a&gt;&quot;;
-                        if ( is_multisite() &amp;&amp; get_current_user_id() != $user_object-&gt;ID &amp;&amp; current_user_can( 'remove_user', $user_object-&gt;ID ) )
-                                $actions['remove'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;users.php?action=remove&amp;amp;user=$user_object-&gt;ID&quot;, 'bulk-users' ) . &quot;'&gt;&quot; . __( 'Remove' ) . &quot;&lt;/a&gt;&quot;;
-                        $actions = apply_filters( 'user_row_actions', $actions, $user_object );
-                        $edit .= $this-&gt;row_actions( $actions );
-
-                        // Set up the checkbox ( because the user is editable, otherwise its empty )
-                        $checkbox = &quot;&lt;input type='checkbox' name='users[]' id='user_{$user_object-&gt;ID}' class='$role' value='{$user_object-&gt;ID}' /&gt;&quot;;
-
-                } else {
-                        $edit = '&lt;strong&gt;' . $user_object-&gt;user_login . '&lt;/strong&gt;';
-                }
-                $role_name = isset( $wp_roles-&gt;role_names[$role] ) ? translate_user_role( $wp_roles-&gt;role_names[$role] ) : __( 'None' );
-                $r = &quot;&lt;tr id='user-$user_object-&gt;ID'$style&gt;&quot;;
-                $avatar = get_avatar( $user_object-&gt;ID, 32 );
-
-                list( $columns, $hidden ) = $this-&gt;get_column_info();
-
-                foreach ( $columns as $column_name =&gt; $column_display_name ) {
-                        $class = &quot;class=\&quot;$column_name column-$column_name\&quot;&quot;;
-
-                        $style = '';
-                        if ( in_array( $column_name, $hidden ) )
-                                $style = ' style=&quot;display:none;&quot;';
-
-                        $attributes = &quot;$class$style&quot;;
-
-                        switch ( $column_name ) {
-                                case 'cb':
-                                        $r .= &quot;&lt;th scope='row' class='check-column'&gt;$checkbox&lt;/th&gt;&quot;;
-                                        break;
-                                case 'username':
-                                        $r .= &quot;&lt;td $attributes&gt;$avatar $edit&lt;/td&gt;&quot;;
-                                        break;
-                                case 'name':
-                                        $r .= &quot;&lt;td $attributes&gt;$user_object-&gt;first_name $user_object-&gt;last_name&lt;/td&gt;&quot;;
-                                        break;
-                                case 'email':
-                                        $r .= &quot;&lt;td $attributes&gt;&lt;a href='mailto:$email' title='&quot; . sprintf( __( 'E-mail: %s' ), $email ) . &quot;'&gt;$email&lt;/a&gt;&lt;/td&gt;&quot;;
-                                        break;
-                                case 'role':
-                                        $r .= &quot;&lt;td $attributes&gt;$role_name&lt;/td&gt;&quot;;
-                                        break;
-                                case 'posts':
-                                        $attributes = 'class=&quot;posts column-posts num&quot;' . $style;
-                                        $r .= &quot;&lt;td $attributes&gt;&quot;;
-                                        if ( $numposts &gt; 0 ) {
-                                                $r .= &quot;&lt;a href='edit.php?author=$user_object-&gt;ID' title='&quot; . __( 'View posts by this author' ) . &quot;' class='edit'&gt;&quot;;
-                                                $r .= $numposts;
-                                                $r .= '&lt;/a&gt;';
-                                        } else {
-                                                $r .= 0;
-                                        }
-                                        $r .= &quot;&lt;/td&gt;&quot;;
-                                        break;
-                                default:
-                                        $r .= &quot;&lt;td $attributes&gt;&quot;;
-                                        $r .= apply_filters( 'manage_users_custom_column', '', $column_name, $user_object-&gt;ID );
-                                        $r .= &quot;&lt;/td&gt;&quot;;
-                        }
-                }
-                $r .= '&lt;/tr&gt;';
-
-                return $r;
-        }
-}
-
-class WP_Comments_Table extends WP_List_Table {
-
-        var $checkbox = true;
-        var $from_ajax = false;
-
-        var $pending_count = array();
-
-        function WP_Comments_Table() {
-                global $mode;
-
-                $mode = ( empty( $_REQUEST['mode'] ) ) ? 'detail' : $_REQUEST['mode'];
-
-                if ( get_option('show_avatars') &amp;&amp; 'single' != $mode )
-                        add_filter( 'comment_author', 'floated_admin_avatar' );
-
-                parent::WP_List_Table( array(
-                        'screen' =&gt; 'edit-comments',
-                        'plural' =&gt; 'comments'
-                ) );
-        }
-
-        function check_permissions() {
-                if ( !current_user_can('edit_posts') )
-                        wp_die(__('Cheatin&amp;#8217; uh?'));
-        }
-
-        function prepare_items() {
-                global $post_id, $comment_status, $search;
-
-                if ( isset( $_REQUEST['p'] ) )
-                        $post_id = absint( $_REQUEST['p'] );
-                elseif ( isset( $_REQUEST['post'] ) )
-                        $post_id = absint( $_REQUEST['post'] );
-                elseif ( isset( $_REQUEST['post_ID'] ) )
-                        $post_id = absint( $_REQUEST['post_ID'] );
-                else
-                        $post_id = 0;
-
-                $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
-                if ( !in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) )
-                        $comment_status = 'all';
-
-                $comment_type = !empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : '';
-
-                $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
-
-                $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : '';
-
-                $comments_per_page = $this-&gt;get_items_per_page( 'edit_comments_per_page' );
-                $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
-
-                if ( isset( $_POST['number'] ) )
-                        $number = (int) $_POST['number'];
-                else
-                        $number = $comments_per_page + min( 8, $comments_per_page ); // Grab a few extra
-
-                $page = $this-&gt;get_pagenum();
-
-                $start = $offset = ( $page - 1 ) * $comments_per_page;
-
-                $status_map = array(
-                        'moderated' =&gt; 'hold',
-                        'approved' =&gt; 'approve'
-                );
-
-                $args = array(
-                        'status' =&gt; isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status,
-                        'search' =&gt; $search,
-                        'user_id' =&gt; $user_id,
-                        'offset' =&gt; $start,
-                        'number' =&gt; $number,
-                        'post_id' =&gt; $post_id,
-                        'type' =&gt; $comment_type,
-                        'orderby' =&gt; @$_REQUEST['orderby'],
-                        'order' =&gt; @$_REQUEST['order'],
-                );
-
-                $_comments = get_comments( $args );
-
-                update_comment_cache( $_comments );
-
-                $this-&gt;items = array_slice( $_comments, 0, $comments_per_page );
-                $this-&gt;extra_items = array_slice( $_comments, $comments_per_page );
-
-                $total_comments = get_comments( array_merge( $args, array('count' =&gt; true, 'offset' =&gt; 0, 'number' =&gt; 0) ) );
-
-                $_comment_post_ids = array();
-                foreach ( $_comments as $_c ) {
-                        $_comment_post_ids[] = $_c-&gt;comment_post_ID;
-                }
-
-                $this-&gt;pending_count = get_pending_comments_num( $_comment_post_ids );
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; $total_comments,
-                        'per_page' =&gt; $comments_per_page,
-                ) );
-        }
-
-        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;
-        }
-
-        function get_bulk_actions() {
-                global $comment_status;
-
-                $actions = array();
-                if ( in_array( $comment_status, array( 'all', 'approved' ) ) )
-                        $actions['unapprove'] = __( 'Unapprove' );
-                if ( in_array( $comment_status, array( 'all', 'moderated', 'spam' ) ) )
-                        $actions['approve'] = __( 'Approve' );
-                if ( in_array( $comment_status, array( 'all', 'moderated', 'approved' ) ) )
-                        $actions['spam'] = _x( 'Mark as Spam', 'comment' );
-
-                if ( 'trash' == $comment_status )
-                        $actions['untrash'] = __( 'Restore' );
-                elseif ( 'spam' == $comment_status )
-                        $actions['unspam'] = _x( 'Not Spam', 'comment' );
-
-                if ( in_array( $comment_status, array( 'trash', 'spam' ) ) || !EMPTY_TRASH_DAYS )
-                        $actions['delete'] = __( 'Delete Permanently' );
-                else
-                        $actions['trash'] = __( 'Move to Trash' );
-
-                return $actions;
-        }
-
-        function extra_tablenav( $which ) {
-                global $comment_status, $comment_type;
-?&gt;
-                &lt;div class=&quot;alignleft actions&quot;&gt;
-&lt;?php
-                if ( 'top' == $which ) {
-?&gt;
-                        &lt;select name=&quot;comment_type&quot;&gt;
-                                &lt;option value=&quot;&quot;&gt;&lt;?php _e( 'Show all comment types' ); ?&gt;&lt;/option&gt;
-&lt;?php
-                                $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
-                                        'comment' =&gt; __( 'Comments' ),
-                                        'pings' =&gt; __( 'Pings' ),
-                                ) );
-
-                                foreach ( $comment_types as $type =&gt; $label )
-                                        echo &quot;\t&lt;option value='&quot; . esc_attr( $type ) . &quot;'&quot; . selected( $comment_type, $type, false ) . &quot;&gt;$label&lt;/option&gt;\n&quot;;
-                        ?&gt;
-                        &lt;/select&gt;
-                        &lt;input type=&quot;submit&quot; id=&quot;post-query-submit&quot; value=&quot;&lt;?php esc_attr_e( 'Filter' ); ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
-&lt;?php
-                }
-
-                if ( ( 'spam' == $comment_status || 'trash' == $comment_status ) &amp;&amp; current_user_can( 'moderate_comments' ) ) {
-                        wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
-                        $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
-?&gt;
-                        &lt;input type=&quot;submit&quot; name=&quot;delete_all&quot; id=&quot;delete_all&quot; value=&quot;&lt;?php echo $title ?&gt;&quot; class=&quot;button-secondary apply&quot; /&gt;
-&lt;?php
-                }
-?&gt;
-&lt;?php
-                do_action( 'manage_comments_nav', $comment_status );
-                echo '&lt;/div&gt;';
-        }
-
-        function current_action() {
-                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
-                        return 'delete_all';
-
-                return parent::current_action();
-        }
-
-        function get_columns() {
-                global $mode;
-
-                $columns = array();
-
-                if ( $this-&gt;checkbox )
-                        $columns['cb'] = '&lt;input type=&quot;checkbox&quot; /&gt;';
-
-                $columns['author'] = __( 'Author' );
-                $columns['comment'] = _x( 'Comment', 'column name' );
-
-                if ( 'single' !== $mode )
-                        $columns['response'] = _x( 'Comment', 'column name' );
-
-                return $columns;
-        }
-
-        function get_sortable_columns() {
-                return array(
-                        'author'   =&gt; 'comment_author',
-                        'comment'  =&gt; 'comment_content',
-                        'response' =&gt; 'comment_post_ID'
-                );
-        }
-
-        function display_table() {
-                extract( $this-&gt;_args );
-
-                $this-&gt;display_tablenav( 'top' );
-
-?&gt;
-&lt;table class=&quot;&lt;?php echo implode( ' ', $this-&gt;get_table_classes() ); ?&gt;&quot; cellspacing=&quot;0&quot;&gt;
-        &lt;thead&gt;
-        &lt;tr&gt;
-                &lt;?php $this-&gt;print_column_headers(); ?&gt;
-        &lt;/tr&gt;
-        &lt;/thead&gt;
-
-        &lt;tfoot&gt;
-        &lt;tr&gt;
-                &lt;?php $this-&gt;print_column_headers( false ); ?&gt;
-        &lt;/tr&gt;
-        &lt;/tfoot&gt;
-
-        &lt;tbody id=&quot;the-comment-list&quot; class=&quot;list:comment&quot;&gt;
-                &lt;?php $this-&gt;display_rows(); ?&gt;
-        &lt;/tbody&gt;
-
-        &lt;tbody id=&quot;the-extra-comment-list&quot; class=&quot;list:comment&quot; style=&quot;display: none;&quot;&gt;
-                &lt;?php $this-&gt;items = $this-&gt;extra_items; $this-&gt;display_rows(); ?&gt;
-        &lt;/tbody&gt;
-&lt;/table&gt;
-&lt;?php
-
-                $this-&gt;display_tablenav( 'bottom' );
-        }
-
-        function single_row( $a_comment ) {
-                global $post, $comment, $the_comment_status;
-
-                $comment = $a_comment;
-                $the_comment_status = wp_get_comment_status( $comment-&gt;comment_ID );
-
-                $post = get_post( $comment-&gt;comment_post_ID );
-
-                $this-&gt;user_can = current_user_can( 'edit_comment', $comment-&gt;comment_ID );
-
-                echo &quot;&lt;tr id='comment-$comment-&gt;comment_ID' class='$the_comment_status'&gt;&quot;;
-                echo $this-&gt;single_row_columns( $comment );
-                echo &quot;&lt;/tr&gt;\n&quot;;
-        }
-
-        function column_cb( $comment ) {
-                if ( $this-&gt;user_can )
-                        echo &quot;&lt;input type='checkbox' name='delete_comments[]' value='$comment-&gt;comment_ID' /&gt;&quot;;
-        }
-
-        function column_comment( $comment ) {
-                global $post, $comment_status, $the_comment_status;
-
-                $user_can = $this-&gt;user_can;
-
-                $comment_url = esc_url( get_comment_link( $comment-&gt;comment_ID ) );
-
-                $ptime = date( 'G', strtotime( $comment-&gt;comment_date ) );
-                if ( ( abs( time() - $ptime ) ) &lt; 86400 )
-                        $ptime = sprintf( __( '%s ago' ), human_time_diff( $ptime ) );
-                else
-                        $ptime = mysql2date( __( 'Y/m/d \a\t g:i A' ), $comment-&gt;comment_date );
-
-                if ( $user_can ) {
-                        $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( &quot;delete-comment_$comment-&gt;comment_ID&quot; ) );
-                        $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( &quot;approve-comment_$comment-&gt;comment_ID&quot; ) );
-
-                        $url = &quot;comment.php?c=$comment-&gt;comment_ID&quot;;
-
-                        $approve_url = esc_url( $url . &quot;&amp;action=approvecomment&amp;$approve_nonce&quot; );
-                        $unapprove_url = esc_url( $url . &quot;&amp;action=unapprovecomment&amp;$approve_nonce&quot; );
-                        $spam_url = esc_url( $url . &quot;&amp;action=spamcomment&amp;$del_nonce&quot; );
-                        $unspam_url = esc_url( $url . &quot;&amp;action=unspamcomment&amp;$del_nonce&quot; );
-                        $trash_url = esc_url( $url . &quot;&amp;action=trashcomment&amp;$del_nonce&quot; );
-                        $untrash_url = esc_url( $url . &quot;&amp;action=untrashcomment&amp;$del_nonce&quot; );
-                        $delete_url = esc_url( $url . &quot;&amp;action=deletecomment&amp;$del_nonce&quot; );
-                }
-
-                echo '&lt;div id=&quot;submitted-on&quot;&gt;';
-                /* translators: 2: comment date, 3: comment time */
-                printf( __( '&lt;a href=&quot;%1$s&quot;&gt;%2$s at %3$s&lt;/a&gt;' ), $comment_url,
-                        /* translators: comment date format. See http://php.net/date */ get_comment_date( __( 'Y/m/d' ) ),
-                        /* translators: comment time format. See http://php.net/date */ get_comment_date( get_option( 'time_format' ) ) );
-
-                if ( $comment-&gt;comment_parent ) {
-                        $parent = get_comment( $comment-&gt;comment_parent );
-                        $parent_link = esc_url( get_comment_link( $comment-&gt;comment_parent ) );
-                        $name = get_comment_author( $parent-&gt;comment_ID );
-                        printf( ' | '.__( 'In reply to &lt;a href=&quot;%1$s&quot;&gt;%2$s&lt;/a&gt;.' ), $parent_link, $name );
-                }
-
-                echo '&lt;/div&gt;';
-                comment_text();
-                if ( $user_can ) { ?&gt;
-                &lt;div id=&quot;inline-&lt;?php echo $comment-&gt;comment_ID; ?&gt;&quot; class=&quot;hidden&quot;&gt;
-                &lt;textarea class=&quot;comment&quot; rows=&quot;1&quot; cols=&quot;1&quot;&gt;&lt;?php echo esc_html( apply_filters( 'comment_edit_pre', $comment-&gt;comment_content ) ); ?&gt;&lt;/textarea&gt;
-                &lt;div class=&quot;author-email&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author_email ); ?&gt;&lt;/div&gt;
-                &lt;div class=&quot;author&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author ); ?&gt;&lt;/div&gt;
-                &lt;div class=&quot;author-url&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author_url ); ?&gt;&lt;/div&gt;
-                &lt;div class=&quot;comment_status&quot;&gt;&lt;?php echo $comment-&gt;comment_approved; ?&gt;&lt;/div&gt;
-                &lt;/div&gt;
-                &lt;?php
-                }
-
-                if ( $user_can ) {
-                        // preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash
-                        $actions = array(
-                                'approve' =&gt; '', 'unapprove' =&gt; '',
-                                'reply' =&gt; '',
-                                'quickedit' =&gt; '',
-                                'edit' =&gt; '',
-                                'spam' =&gt; '', 'unspam' =&gt; '',
-                                'trash' =&gt; '', 'untrash' =&gt; '', 'delete' =&gt; ''
-                        );
-
-                        if ( $comment_status &amp;&amp; 'all' != $comment_status ) { // not looking at all comments
-                                if ( 'approved' == $the_comment_status )
-                                        $actions['unapprove'] = &quot;&lt;a href='$unapprove_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID:e7e7d3:action=dim-comment&amp;amp;new=unapproved vim-u vim-destructive' title='&quot; . esc_attr__( 'Unapprove this comment' ) . &quot;'&gt;&quot; . __( 'Unapprove' ) . '&lt;/a&gt;';
-                                else if ( 'unapproved' == $the_comment_status )
-                                        $actions['approve'] = &quot;&lt;a href='$approve_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID:e7e7d3:action=dim-comment&amp;amp;new=approved vim-a vim-destructive' title='&quot; . esc_attr__( 'Approve this comment' ) . &quot;'&gt;&quot; . __( 'Approve' ) . '&lt;/a&gt;';
-                        } else {
-                                $actions['approve'] = &quot;&lt;a href='$approve_url' class='dim:the-comment-list:comment-$comment-&gt;comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='&quot; . esc_attr__( 'Approve this comment' ) . &quot;'&gt;&quot; . __( 'Approve' ) . '&lt;/a&gt;';
-                                $actions['unapprove'] = &quot;&lt;a href='$unapprove_url' class='dim:the-comment-list:comment-$comment-&gt;comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='&quot; . esc_attr__( 'Unapprove this comment' ) . &quot;'&gt;&quot; . __( 'Unapprove' ) . '&lt;/a&gt;';
-                        }
-
-                        if ( 'spam' != $the_comment_status &amp;&amp; 'trash' != $the_comment_status ) {
-                                $actions['spam'] = &quot;&lt;a href='$spam_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID::spam=1 vim-s vim-destructive' title='&quot; . esc_attr__( 'Mark this comment as spam' ) . &quot;'&gt;&quot; . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '&lt;/a&gt;';
-                        } elseif ( 'spam' == $the_comment_status ) {
-                                $actions['unspam'] = &quot;&lt;a href='$unspam_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID:66cc66:unspam=1 vim-z vim-destructive'&gt;&quot; . _x( 'Not Spam', 'comment' ) . '&lt;/a&gt;';
-                        } elseif ( 'trash' == $the_comment_status ) {
-                                $actions['untrash'] = &quot;&lt;a href='$untrash_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID:66cc66:untrash=1 vim-z vim-destructive'&gt;&quot; . __( 'Restore' ) . '&lt;/a&gt;';
-                        }
-
-                        if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
-                                $actions['delete'] = &quot;&lt;a href='$delete_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID::delete=1 delete vim-d vim-destructive'&gt;&quot; . __( 'Delete Permanently' ) . '&lt;/a&gt;';
-                        } else {
-                                $actions['trash'] = &quot;&lt;a href='$trash_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID::trash=1 delete vim-d vim-destructive' title='&quot; . esc_attr__( 'Move this comment to the trash' ) . &quot;'&gt;&quot; . _x( 'Trash', 'verb' ) . '&lt;/a&gt;';
-                        }
-
-                        if ( 'trash' != $the_comment_status ) {
-                                $actions['edit'] = &quot;&lt;a href='comment.php?action=editcomment&amp;amp;c={$comment-&gt;comment_ID}' title='&quot; . esc_attr__( 'Edit comment' ) . &quot;'&gt;&quot;. __( 'Edit' ) . '&lt;/a&gt;';
-                                $actions['quickedit'] = '&lt;a onclick=&quot;commentReply.open( \''.$comment-&gt;comment_ID.'\',\''.$post-&gt;ID.'\',\'edit\' );return false;&quot; class=&quot;vim-q&quot; title=&quot;'.esc_attr__( 'Quick Edit' ).'&quot; href=&quot;#&quot;&gt;' . __( 'Quick&amp;nbsp;Edit' ) . '&lt;/a&gt;';
-                                if ( 'spam' != $the_comment_status )
-                                        $actions['reply'] = '&lt;a onclick=&quot;commentReply.open( \''.$comment-&gt;comment_ID.'\',\''.$post-&gt;ID.'\' );return false;&quot; class=&quot;vim-r&quot; title=&quot;'.esc_attr__( 'Reply to this comment' ).'&quot; href=&quot;#&quot;&gt;' . __( 'Reply' ) . '&lt;/a&gt;';
-                        }
-
-                        $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
-
-                        $i = 0;
-                        echo '&lt;div class=&quot;row-actions&quot;&gt;';
-                        foreach ( $actions as $action =&gt; $link ) {
-                                ++$i;
-                                ( ( ( 'approve' == $action || 'unapprove' == $action ) &amp;&amp; 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
-
-                                // Reply and quickedit need a hide-if-no-js span when not added with ajax
-                                if ( ( 'reply' == $action || 'quickedit' == $action ) &amp;&amp; ! $this-&gt;from_ajax )
-                                        $action .= ' hide-if-no-js';
-                                elseif ( ( $action == 'untrash' &amp;&amp; $the_comment_status == 'trash' ) || ( $action == 'unspam' &amp;&amp; $the_comment_status == 'spam' ) ) {
-                                        if ( '1' == get_comment_meta( $comment-&gt;comment_ID, '_wp_trash_meta_status', true ) )
-                                                $action .= ' approve';
-                                        else
-                                                $action .= ' unapprove';
-                                }
-
-                                echo &quot;&lt;span class='$action'&gt;$sep$link&lt;/span&gt;&quot;;
-                        }
-                        echo '&lt;/div&gt;';
-                }
-        }
-
-        function column_author( $comment ) {
-                global $comment_status;
-
-                $author_url = get_comment_author_url();
-                if ( 'http://' == $author_url )
-                        $author_url = '';
-                $author_url_display = preg_replace( '|http://(www\.)?|i', '', $author_url );
-                if ( strlen( $author_url_display ) &gt; 50 )
-                        $author_url_display = substr( $author_url_display, 0, 49 ) . '...';
-
-                echo &quot;&lt;strong&gt;&quot;; comment_author(); echo '&lt;/strong&gt;&lt;br /&gt;';
-                if ( !empty( $author_url ) )
-                        echo &quot;&lt;a title='$author_url' href='$author_url'&gt;$author_url_display&lt;/a&gt;&lt;br /&gt;&quot;;
-
-                if ( $this-&gt;user_can ) {
-                        if ( !empty( $comment-&gt;comment_author_email ) ) {
-                                comment_author_email_link();
-                                echo '&lt;br /&gt;';
-                        }
-                        echo '&lt;a href=&quot;edit-comments.php?s=';
-                        comment_author_IP();
-                        echo '&amp;amp;mode=detail';
-                        if ( 'spam' == $comment_status )
-                                echo '&amp;amp;comment_status=spam';
-                        echo '&quot;&gt;';
-                        comment_author_IP();
-                        echo '&lt;/a&gt;';
-                }
-        }
-
-        function column_date( $comment ) {
-                return get_comment_date( __( 'Y/m/d \a\t g:ia' ) );
-        }
-
-        function column_response( $comment ) {
-                global $post;
-
-                if ( isset( $this-&gt;pending_count[$post-&gt;ID] ) ) {
-                        $pending_comments = $this-&gt;pending_count[$post-&gt;ID];
-                } else {
-                        $_pending_count_temp = get_pending_comments_num( array( $post-&gt;ID ) );
-                        $pending_comments = $this-&gt;pending_count[$post-&gt;ID] = $_pending_count_temp[$post-&gt;ID];
-                }
-
-                if ( current_user_can( 'edit_post', $post-&gt;ID ) ) {
-                        $post_link = &quot;&lt;a href='&quot; . get_edit_post_link( $post-&gt;ID ) . &quot;'&gt;&quot;;
-                        $post_link .= get_the_title( $post-&gt;ID ) . '&lt;/a&gt;';
-                } else {
-                        $post_link = get_the_title( $post-&gt;ID );
-                }
-
-                echo '&lt;div class=&quot;response-links&quot;&gt;&lt;span class=&quot;post-com-count-wrapper&quot;&gt;';
-                echo $post_link . '&lt;br /&gt;';
-                $this-&gt;comments_bubble( $post-&gt;ID, $pending_comments );
-                echo '&lt;/span&gt; ';
-                echo &quot;&lt;a href='&quot; . get_permalink( $post-&gt;ID ) . &quot;'&gt;#&lt;/a&gt;&quot;;
-                echo '&lt;/div&gt;';
-                if ( 'attachment' == $post-&gt;post_type &amp;&amp; ( $thumb = wp_get_attachment_image( $post-&gt;ID, array( 80, 60 ), true ) ) )
-                        echo $thumb;
-        }
-
-        function column_default( $comment, $column_name ) {
-                do_action( 'manage_comments_custom_column', $column_name, $comment-&gt;comment_ID );
-        }
-}
-
-class WP_Post_Comments_Table extends WP_Comments_Table {
-
-        function get_columns() {
-                return array(
-                        'author'   =&gt; __( 'Author' ),
-                        'comment'  =&gt; _x( 'Comment', 'column name' ),
-                );
-        }
-
-        function get_sortable_columns() {
-                return array();
-        }
-}
-
-class WP_Links_Table extends WP_List_Table {
-
-        function WP_Links_Table() {
-                parent::WP_List_Table( array(
-                        'screen' =&gt; 'link-manager',
-                        'plural' =&gt; 'bookmarks',
-                ) );
-        }
-
-        function check_permissions() {
-                if ( ! current_user_can( 'manage_links' ) )
-                        wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
-        }
-
-        function prepare_items() {
-                global $cat_id, $s, $orderby, $order;
-
-                wp_reset_vars( array( 'action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'orderby', 'order', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]', 's' ) );
-
-                $args = array( 'hide_invisible' =&gt; 0, 'hide_empty' =&gt; 0 );
-
-                if ( 'all' != $cat_id )
-                        $args['category'] = $cat_id;
-                if ( !empty( $s ) )
-                        $args['search'] = $s;
-                if ( !empty( $orderby ) )
-                        $args['orderby'] = $orderby;
-                if ( !empty( $order ) )
-                        $args['order'] = $order;
-
-                $this-&gt;items = get_bookmarks( $args );
-        }
-
-        function no_items() {
-                _e( 'No links found.' );
-        }
-
-        function get_bulk_actions() {
-                $actions = array();
-                $actions['delete'] = __( 'Delete' );
-
-                return $actions;
-        }
-
-        function extra_tablenav( $which ) {
-                global $cat_id;
-
-                if ( 'top' != $which )
-                        return;
-?&gt;
-                &lt;div class=&quot;alignleft actions&quot;&gt;
-&lt;?php
-                        $dropdown_options = array(
-                                'selected' =&gt; $cat_id,
-                                'name' =&gt; 'cat_id',
-                                'taxonomy' =&gt; 'link_category',
-                                'show_option_all' =&gt; __( 'View all categories' ),
-                                'hide_empty' =&gt; true,
-                                'hierarchical' =&gt; 1,
-                                'show_count' =&gt; 0,
-                                'orderby' =&gt; 'name',
-                        );
-                        wp_dropdown_categories( $dropdown_options );
-?&gt;
-                        &lt;input type=&quot;submit&quot; id=&quot;post-query-submit&quot; value=&quot;&lt;?php esc_attr_e( 'Filter' ); ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
-                &lt;/div&gt;
-&lt;?php
-        }
-
-        function get_columns() {
-                return array(
-                        'cb'         =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
-                        'name'       =&gt; __( 'Name' ),
-                        'url'        =&gt; __( 'URL' ),
-                        'categories' =&gt; __( 'Categories' ),
-                        'rel'        =&gt; __( 'Relationship' ),
-                        'visible'    =&gt; __( 'Visible' ),
-                        'rating'     =&gt; __( 'Rating' )
-                );
-        }
-
-        function get_sortable_columns() {
-                return array(
-                        'name'    =&gt; 'name',
-                        'url'     =&gt; 'url',
-                        'visible' =&gt; 'visible',
-                        'rating'  =&gt; 'rating'
-                );
-        }
-
-        function display_rows() {
-                global $cat_id;
-
-                $alt = 0;
-
-                foreach ( $this-&gt;items as $link ) {
-                        $link = sanitize_bookmark( $link );
-                        $link-&gt;link_name = esc_attr( $link-&gt;link_name );
-                        $link-&gt;link_category = wp_get_link_cats( $link-&gt;link_id );
-
-                        $short_url = str_replace( 'http://', '', $link-&gt;link_url );
-                        $short_url = preg_replace( '/^www\./i', '', $short_url );
-                        if ( '/' == substr( $short_url, -1 ) )
-                                $short_url = substr( $short_url, 0, -1 );
-                        if ( strlen( $short_url ) &gt; 35 )
-                                $short_url = substr( $short_url, 0, 32 ).'...';
-
-                        $visible = ( $link-&gt;link_visible == 'Y' ) ? __( 'Yes' ) : __( 'No' );
-                        $rating  = $link-&gt;link_rating;
-                        $style = ( $alt++ % 2 ) ? '' : ' class=&quot;alternate&quot;';
-
-                        $edit_link = get_edit_bookmark_link( $link );
-?&gt;
-                &lt;tr id=&quot;link-&lt;?php echo $link-&gt;link_id; ?&gt;&quot; valign=&quot;middle&quot; &lt;?php echo $style; ?&gt;&gt;
-&lt;?php
-
-                        list( $columns, $hidden ) = $this-&gt;get_column_info();
-
-                        foreach ( $columns as $column_name =&gt; $column_display_name ) {
-                                $class = &quot;class='column-$column_name'&quot;;
-
-                                $style = '';
-                                if ( in_array( $column_name, $hidden ) )
-                                        $style = ' style=&quot;display:none;&quot;';
-
-                                $attributes = $class . $style;
-
-                                switch ( $column_name ) {
-                                        case 'cb':
-                                                echo '&lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;linkcheck[]&quot; value=&quot;'. esc_attr( $link-&gt;link_id ) .'&quot; /&gt;&lt;/th&gt;';
-                                                break;
-
-                                        case 'name':
-                                                echo &quot;&lt;td $attributes&gt;&lt;strong&gt;&lt;a class='row-title' href='$edit_link' title='&quot; . esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $link-&gt;link_name ) ) . &quot;'&gt;$link-&gt;link_name&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&quot;;
-
-                                                $actions = array();
-                                                $actions['edit'] = '&lt;a href=&quot;' . $edit_link . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
-                                                $actions['delete'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;link.php?action=delete&amp;amp;link_id=$link-&gt;link_id&quot;, 'delete-bookmark_' . $link-&gt;link_id ) . &quot;' onclick=\&quot;if ( confirm( '&quot; . esc_js( sprintf( __( &quot;You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete.&quot; ), $link-&gt;link_name ) ) . &quot;' ) ) { return true;}return false;\&quot;&gt;&quot; . __( 'Delete' ) . &quot;&lt;/a&gt;&quot;;
-                                                echo $this-&gt;row_actions( $actions );
-
-                                                echo '&lt;/td&gt;';
-                                                break;
-                                        case 'url':
-                                                echo &quot;&lt;td $attributes&gt;&lt;a href='$link-&gt;link_url' title='&quot;.sprintf( __( 'Visit %s' ), $link-&gt;link_name ).&quot;'&gt;$short_url&lt;/a&gt;&lt;/td&gt;&quot;;
-                                                break;
-                                        case 'categories':
-                                                ?&gt;&lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php
-                                                $cat_names = array();
-                                                foreach ( $link-&gt;link_category as $category ) {
-                                                        $cat = get_term( $category, 'link_category', OBJECT, 'display' );
-                                                        if ( is_wp_error( $cat ) )
-                                                                echo $cat-&gt;get_error_message();
-                                                        $cat_name = $cat-&gt;name;
-                                                        if ( $cat_id != $category )
-                                                                $cat_name = &quot;&lt;a href='link-manager.php?cat_id=$category'&gt;$cat_name&lt;/a&gt;&quot;;
-                                                        $cat_names[] = $cat_name;
-                                                }
-                                                echo implode( ', ', $cat_names );
-                                                ?&gt;&lt;/td&gt;&lt;?php
-                                                break;
-                                        case 'rel':
-                                                ?&gt;&lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo empty( $link-&gt;link_rel ) ? '&lt;br /&gt;' : $link-&gt;link_rel; ?&gt;&lt;/td&gt;&lt;?php
-                                                break;
-                                        case 'visible':
-                                                ?&gt;&lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo $visible; ?&gt;&lt;/td&gt;&lt;?php
-                                                break;
-                                        case 'rating':
-                                                 ?&gt;&lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo $rating; ?&gt;&lt;/td&gt;&lt;?php
-                                                break;
-                                        default:
-                                                ?&gt;
-                                                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php do_action( 'manage_link_custom_column', $column_name, $link-&gt;link_id ); ?&gt;&lt;/td&gt;
-                                                &lt;?php
-                                                break;
-                                }
-                        }
-?&gt;
-                &lt;/tr&gt;
-&lt;?php
-                }
-        }
-}
-
-class WP_Sites_Table extends WP_List_Table {
-
-        function WP_Sites_Table() {
-                parent::WP_List_Table( array(
-                        'screen' =&gt; 'sites-network',
-                        'plural' =&gt; 'sites',
-                ) );
-        }
-
-        function check_permissions() {
-                if ( ! current_user_can( 'manage_sites' ) )
-                        wp_die( __( 'You do not have permission to access this page.' ) );
-        }
-
-        function prepare_items() {
-                global $s, $mode, $wpdb;
-
-                $mode = ( empty( $_REQUEST['mode'] ) ) ? 'list' : $_REQUEST['mode'];
-
-                $per_page = $this-&gt;get_items_per_page( 'sites_network_per_page' );
-
-                $pagenum = $this-&gt;get_pagenum();
-
-                $s = isset( $_REQUEST['s'] ) ? stripslashes( trim( $_REQUEST[ 's' ] ) ) : '';
-                $like_s = esc_sql( like_escape( $s ) );
-
-                $query = &quot;SELECT * FROM {$wpdb-&gt;blogs} WHERE site_id = '{$wpdb-&gt;siteid}' &quot;;
-
-                if ( isset( $_REQUEST['searchaction'] ) ) {
-                        if ( 'name' == $_REQUEST['searchaction'] ) {
-                                $query .= &quot; AND ( {$wpdb-&gt;blogs}.domain LIKE '%{$like_s}%' OR {$wpdb-&gt;blogs}.path LIKE '%{$like_s}%' ) &quot;;
-                        } elseif ( 'id' == $_REQUEST['searchaction'] ) {
-                                $query .= &quot; AND {$wpdb-&gt;blogs}.blog_id = '{$like_s}' &quot;;
-                        } elseif ( 'ip' == $_REQUEST['searchaction'] ) {
-                                $query = &quot;SELECT *
-                                        FROM {$wpdb-&gt;blogs}, {$wpdb-&gt;registration_log}
-                                        WHERE site_id = '{$wpdb-&gt;siteid}'
-                                        AND {$wpdb-&gt;blogs}.blog_id = {$wpdb-&gt;registration_log}.blog_id
-                                        AND {$wpdb-&gt;registration_log}.IP LIKE ( '%{$like_s}%' )&quot;;
-                        }
-                }
-
-                $order_by = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : 'id';
-                if ( $order_by == 'registered' ) {
-                        $query .= ' ORDER BY registered ';
-                } elseif ( $order_by == 'lastupdated' ) {
-                        $query .= ' ORDER BY last_updated ';
-                } elseif ( $order_by == 'blogname' ) {
-                        $query .= ' ORDER BY domain ';
-                } else {
-                        $order_by = 'id';
-                        $query .= &quot; ORDER BY {$wpdb-&gt;blogs}.blog_id &quot;;
-                }
-
-                $order = ( isset( $_REQUEST['order'] ) &amp;&amp; 'DESC' == strtoupper( $_REQUEST['order'] ) ) ? &quot;DESC&quot; : &quot;ASC&quot;;
-                $query .= $order;
-
-                $total = $wpdb-&gt;get_var( str_replace( 'SELECT *', 'SELECT COUNT( blog_id )', $query ) );
-
-                $query .= &quot; LIMIT &quot; . intval( ( $pagenum - 1 ) * $per_page ) . &quot;, &quot; . intval( $per_page );
-                $this-&gt;items = $wpdb-&gt;get_results( $query, ARRAY_A );
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; $total,
-                        'per_page' =&gt; $per_page,
-                ) );
-        }
-
-        function no_items() {
-                _e( 'No sites found.' );
-        }
-
-        function get_bulk_actions() {
-                $actions = array();
-                $actions['delete'] = __( 'Delete' );
-                $actions['spam'] = _x( 'Mark as Spam', 'site' );
-                $actions['notspam'] = _x( 'Not Spam', 'site' );
-
-                return $actions;
-        }
-
-        function pagination( $which ) {
-                global $mode;
-
-                parent::pagination( $which );
-
-                if ( 'top' == $which )
-                        $this-&gt;view_switcher( $mode );
-        }
-
-        function get_columns() {
-                $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );
-                $sites_columns = array(
-                        'cb'          =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
-                        'blogname'    =&gt; $blogname_columns,
-                        'lastupdated' =&gt; __( 'Last Updated' ),
-                        'registered'  =&gt; _x( 'Registered', 'site' ),
-                        'users'       =&gt; __( 'Users' )
-                );
-
-                if ( has_filter( 'wpmublogsaction' ) )
-                        $sites_columns['plugins'] = __( 'Actions' );
-
-                $sites_columns = apply_filters( 'wpmu_blogs_columns', $sites_columns );
-
-                return $sites_columns;
-        }
-
-        function get_sortable_columns() {
-                return array(
-                        'id'          =&gt; 'id',
-                        'blogname'    =&gt; 'blogname',
-                        'lastupdated' =&gt; 'lastupdated',
-                        'registered'  =&gt; 'registered',
-                );
-        }
-
-        function display_rows() {
-                global $current_site, $mode;
-
-                $status_list = array(
-                        'archived' =&gt; array( 'site-archived', __( 'Archived' ) ),
-                        'spam'     =&gt; array( 'site-spammed', _x( 'Spam', 'site' ) ),
-                        'deleted'  =&gt; array( 'site-deleted', __( 'Deleted' ) ),
-                        'mature'   =&gt; array( 'site-mature', __( 'Mature' ) )
-                );
-
-                $class = '';
-                foreach ( $this-&gt;items as $blog ) {
-                        $class = ( 'alternate' == $class ) ? '' : 'alternate';
-                        reset( $status_list );
-
-                        $blog_states = array();
-                        foreach ( $status_list as $status =&gt; $col ) {
-                                if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) {
-                                        $class = $col[0];
-                                        $blog_states[] = $col[1];
-                                }
-                        }
-                        $blog_state = '';
-                        if ( ! empty( $blog_states ) ) {
-                                $state_count = count( $blog_states );
-                                $i = 0;
-                                $blog_state .= ' - ';
-                                foreach ( $blog_states as $state ) {
-                                        ++$i;
-                                        ( $i == $state_count ) ? $sep = '' : $sep = ', ';
-                                        $blog_state .= &quot;&lt;span class='post-state'&gt;$state$sep&lt;/span&gt;&quot;;
-                                }
-                        }
-                        echo &quot;&lt;tr class='$class'&gt;&quot;;
-
-                        $blogname = ( is_subdomain_install() ) ? str_replace( '.'.$current_site-&gt;domain, '', $blog['domain'] ) : $blog['path'];
-
-                        list( $columns, $hidden ) = $this-&gt;get_column_info();
-
-                        foreach ( $columns as $column_name =&gt; $column_display_name ) {
-                                switch ( $column_name ) {
-                                        case 'cb': ?&gt;
-                                                &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;
-                                                        &lt;input type=&quot;checkbox&quot; id=&quot;blog_&lt;?php echo $blog['blog_id'] ?&gt;&quot; name=&quot;allblogs[]&quot; value=&quot;&lt;?php echo esc_attr( $blog['blog_id'] ) ?&gt;&quot; /&gt;
-                                                &lt;/th&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'id': ?&gt;
-                                                &lt;th valign=&quot;top&quot; scope=&quot;row&quot;&gt;
-                                                        &lt;?php echo $blog['blog_id'] ?&gt;
-                                                &lt;/th&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'blogname': ?&gt;
-                                                &lt;td class=&quot;column-title&quot;&gt;
-                                                        &lt;a href=&quot;&lt;?php echo esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ); ?&gt;&quot; class=&quot;edit&quot;&gt;&lt;?php echo $blogname . $blog_state; ?&gt;&lt;/a&gt;
-                                                        &lt;?php
-                                                        if ( 'list' != $mode )
-                                                                echo '&lt;p&gt;' . sprintf( _x( '%1$s &amp;#8211; &lt;em&gt;%2$s&lt;/em&gt;', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '&lt;/p&gt;';
-
-                                                        // Preordered.
-                                                        $actions = array(
-                                                                'edit' =&gt; '', 'backend' =&gt; '',
-                                                                'activate' =&gt; '', 'deactivate' =&gt; '',
-                                                                'archive' =&gt; '', 'unarchive' =&gt; '',
-                                                                'spam' =&gt; '', 'unspam' =&gt; '',
-                                                                'delete' =&gt; '',
-                                                                'visit' =&gt; '',
-                                                        );
-
-                                                        $actions['edit']        = '&lt;span class=&quot;edit&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;&lt;/span&gt;';
-                                                        $actions['backend']        = &quot;&lt;span class='backend'&gt;&lt;a href='&quot; . esc_url( get_admin_url( $blog['blog_id'] ) ) . &quot;' class='edit'&gt;&quot; . __( 'Dashboard' ) . '&lt;/a&gt;&lt;/span&gt;';
-                                                        if ( $current_site-&gt;blog_id != $blog['blog_id'] ) {
-                                                                if ( get_blog_status( $blog['blog_id'], 'deleted' ) == '1' )
-                                                                        $actions['activate']        = '&lt;span class=&quot;activate&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=activateblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to activate the site %s' ), $blogname ) ) ) ) . '&quot;&gt;' . __( 'Activate' ) . '&lt;/a&gt;&lt;/span&gt;';
-                                                                else
-                                                                        $actions['deactivate']        = '&lt;span class=&quot;activate&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=deactivateblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to deactivate the site %s' ), $blogname ) ) ) ) . '&quot;&gt;' . __( 'Deactivate' ) . '&lt;/a&gt;&lt;/span&gt;';
-
-                                                                if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' )
-                                                                        $actions['unarchive']        = '&lt;span class=&quot;archive&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=unarchiveblog&amp;amp;id=' .  $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ) ) . '&quot;&gt;' . __( 'Unarchive' ) . '&lt;/a&gt;&lt;/span&gt;';
-                                                                else
-                                                                        $actions['archive']        = '&lt;span class=&quot;archive&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=archiveblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ) ) . '&quot;&gt;' . _x( 'Archive', 'verb; site' ) . '&lt;/a&gt;&lt;/span&gt;';
-
-                                                                if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' )
-                                                                        $actions['unspam']        = '&lt;span class=&quot;spam&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=unspamblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to unspam the site %s.' ), $blogname ) ) ) ) . '&quot;&gt;' . _x( 'Not Spam', 'site' ) . '&lt;/a&gt;&lt;/span&gt;';
-                                                                else
-                                                                        $actions['spam']        = '&lt;span class=&quot;spam&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=spamblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to mark the site %s as spam.' ), $blogname ) ) ) ) . '&quot;&gt;' . _x( 'Spam', 'site' ) . '&lt;/a&gt;&lt;/span&gt;';
-
-                                                                $actions['delete']        = '&lt;span class=&quot;delete&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=deleteblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to delete the site %s.' ), $blogname ) ) ) ) . '&quot;&gt;' . __( 'Delete' ) . '&lt;/a&gt;&lt;/span&gt;';
-                                                        }
-
-                                                        $actions['visit']        = &quot;&lt;span class='view'&gt;&lt;a href='&quot; . esc_url( get_home_url( $blog['blog_id'] ) ) . &quot;' rel='permalink'&gt;&quot; . __( 'Visit' ) . '&lt;/a&gt;&lt;/span&gt;';
-                                                        $actions = array_filter( $actions );
-                                                        echo $this-&gt;row_actions( $actions );
-                                        ?&gt;
-                                                &lt;/td&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'lastupdated': ?&gt;
-                                                &lt;td valign=&quot;top&quot;&gt;
-                                                        &lt;?php
-                                                        if ( 'list' == $mode )
-                                                                $date = 'Y/m/d';
-                                                        else
-                                                                $date = 'Y/m/d \&lt;\b\r \/\&gt; g:i:s a';
-                                                        echo ( $blog['last_updated'] == '0000-00-00 00:00:00' ) ? __( 'Never' ) : mysql2date( $date, $blog['last_updated'] ); ?&gt;
-                                                &lt;/td&gt;
-                                        &lt;?php
-                                        break;
-                                case 'registered': ?&gt;
-                                                &lt;td valign=&quot;top&quot;&gt;
-                                                &lt;?php
-                                                if ( $blog['registered'] == '0000-00-00 00:00:00' )
-                                                        echo '&amp;#x2014;';
-                                                else
-                                                        echo mysql2date( $date, $blog['registered'] );
-                                                ?&gt;
-                                                &lt;/td&gt;
-                                &lt;?php
-                                break;
-                                        case 'users': ?&gt;
-                                                &lt;td valign=&quot;top&quot;&gt;
-                                                        &lt;?php
-                                                        $blogusers = get_users( array( 'blog_id' =&gt; $blog['blog_id'], 'number' =&gt; 6) );
-                                                        if ( is_array( $blogusers ) ) {
-                                                                $blogusers_warning = '';
-                                                                if ( count( $blogusers ) &gt; 5 ) {
-                                                                        $blogusers = array_slice( $blogusers, 0, 5 );
-                                                                        $blogusers_warning = __( 'Only showing first 5 users.' ) . ' &lt;a href=&quot;' . esc_url( get_admin_url( $blog['blog_id'], 'users.php' ) ) . '&quot;&gt;' . __( 'More' ) . '&lt;/a&gt;';
-                                                                }
-                                                                foreach ( $blogusers as $user_object ) {
-                                                                        echo '&lt;a href=&quot;' . esc_url( admin_url( 'user-edit.php?user_id=' . $user_object-&gt;ID ) ) . '&quot;&gt;' . esc_html( $user_object-&gt;user_login ) . '&lt;/a&gt; ';
-                                                                        if ( 'list' != $mode )
-                                                                                echo '( ' . $user_object-&gt;user_email . ' )';
-                                                                        echo '&lt;br /&gt;';
-                                                                }
-                                                                if ( $blogusers_warning != '' )
-                                                                        echo '&lt;strong&gt;' . $blogusers_warning . '&lt;/strong&gt;&lt;br /&gt;';
-                                                        }
-                                                        ?&gt;
-                                                &lt;/td&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'plugins': ?&gt;
-                                                &lt;?php if ( has_filter( 'wpmublogsaction' ) ) { ?&gt;
-                                                &lt;td valign=&quot;top&quot;&gt;
-                                                        &lt;?php do_action( 'wpmublogsaction', $blog['blog_id'] ); ?&gt;
-                                                &lt;/td&gt;
-                                                &lt;?php } ?&gt;
-                                        &lt;?php break;
-
-                                        default: ?&gt;
-                                                &lt;?php if ( has_filter( 'manage_blogs_custom_column' ) ) { ?&gt;
-                                                &lt;td valign=&quot;top&quot;&gt;
-                                                        &lt;?php do_action( 'manage_blogs_custom_column', $column_name, $blog['blog_id'] ); ?&gt;
-                                                &lt;/td&gt;
-                                                &lt;?php } ?&gt;
-                                        &lt;?php break;
-                                }
-                        }
-                        ?&gt;
-                        &lt;/tr&gt;
-                        &lt;?php
-                }
-        }
-}
-
-class WP_MS_Users_Table extends WP_List_Table {
-
-        function WP_MS_Users_Table() {
-                parent::WP_List_Table( array(
-                        'screen' =&gt; 'users-network',
-                ) );
-        }
-
-        function check_permissions() {
-                if ( !is_multisite() )
-                        wp_die( __( 'Multisite support is not enabled.' ) );
-
-                if ( ! current_user_can( 'manage_network_users' ) )
-                        wp_die( __( 'You do not have permission to access this page.' ) );
-        }
-
-        function prepare_items() {
-                global $usersearch;
-
-                $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
-
-                $users_per_page = $this-&gt;get_items_per_page( 'users_network_per_page' );
-
-                $paged = $this-&gt;get_pagenum();
-
-                $args = array(
-                        'number' =&gt; $users_per_page,
-                        'offset' =&gt; ( $paged-1 ) * $users_per_page,
-                        'search' =&gt; $usersearch,
-                        'blog_id' =&gt; 0
-                );
-
-                if ( isset( $_REQUEST['orderby'] ) )
-                        $args['orderby'] = $_REQUEST['orderby'];
-
-                if ( isset( $_REQUEST['order'] ) )
-                        $args['order'] = $_REQUEST['order'];
-
-                // Query the user IDs for this page
-                $wp_user_search = new WP_User_Query( $args );
-
-                $this-&gt;items = $wp_user_search-&gt;get_results();
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; $wp_user_search-&gt;get_total(),
-                        'per_page' =&gt; $users_per_page,
-                ) );
-        }
-
-        function get_bulk_actions() {
-                $actions = array();
-                $actions['delete'] = __( 'Delete' );
-                $actions['spam'] = _x( 'Mark as Spam', 'user' );
-                $actions['notspam'] = _x( 'Not Spam', 'user' );
-
-                return $actions;
-        }
-
-        function no_items() {
-                _e( 'No users found.' );
-        }
-
-        function pagination( $which ) {
-                global $mode;
-
-                parent::pagination ( $which );
-
-                if ( 'top' == $which )
-                        $this-&gt;view_switcher( $mode );
-        }
-
-        function get_columns() {
-                $users_columns = array(
-                        'cb'         =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
-                        'login'      =&gt; __( 'Login' ),
-                        'name'       =&gt; __( 'Name' ),
-                        'email'      =&gt; __( 'E-mail' ),
-                        'registered' =&gt; _x( 'Registered', 'user' ),
-                        'blogs'      =&gt; __( 'Sites' )
-                );
-                $users_columns = apply_filters( 'wpmu_users_columns', $users_columns );
-
-                return $users_columns;
-        }
-
-        function get_sortable_columns() {
-                return array(
-                        'id'         =&gt; 'id',
-                        'login'      =&gt; 'login',
-                        'name'       =&gt; 'name',
-                        'email'      =&gt; 'email',
-                        'registered' =&gt; 'registered',
-                );
-        }
-
-        function display_rows() {
-                global $current_site, $mode;
-
-                $class = '';
-                $super_admins = get_super_admins();
-                foreach ( $this-&gt;items as $user ) {
-                        $class = ( 'alternate' == $class ) ? '' : 'alternate';
-
-                        $status_list = array( 'spam' =&gt; 'site-spammed', 'deleted' =&gt; 'site-deleted' );
-
-                        foreach ( $status_list as $status =&gt; $col ) {
-                                if ( $user-&gt;$status )
-                                        $class = $col;
-                        }
-
-                        ?&gt;
-                        &lt;tr class=&quot;&lt;?php echo $class; ?&gt;&quot;&gt;
-                        &lt;?php
-
-                        list( $columns, $hidden ) = $this-&gt;get_column_info();
-
-                        foreach ( $columns as $column_name =&gt; $column_display_name ) :
-                                switch ( $column_name ) {
-                                        case 'cb': ?&gt;
-                                                &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;
-                                                        &lt;input type=&quot;checkbox&quot; id=&quot;blog_&lt;?php echo $user-&gt;ID ?&gt;&quot; name=&quot;allusers[]&quot; value=&quot;&lt;?php echo esc_attr( $user-&gt;ID ) ?&gt;&quot; /&gt;
-                                                &lt;/th&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'id': ?&gt;
-                                                &lt;th valign=&quot;top&quot; scope=&quot;row&quot;&gt;
-                                                        &lt;?php echo $user-&gt;ID ?&gt;
-                                                &lt;/th&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'login':
-                                                $avatar        = get_avatar( $user-&gt;user_email, 32 );
-                                                $edit_link = ( get_current_user_id() == $user-&gt;ID ) ? 'profile.php' : 'user-edit.php?user_id=' . $user-&gt;ID;
-                                                ?&gt;
-                                                &lt;td class=&quot;username column-username&quot;&gt;
-                                                        &lt;?php echo $avatar; ?&gt;&lt;strong&gt;&lt;a href=&quot;&lt;?php echo esc_url( self_admin_url( $edit_link ) ); ?&gt;&quot; class=&quot;edit&quot;&gt;&lt;?php echo stripslashes( $user-&gt;user_login ); ?&gt;&lt;/a&gt;&lt;?php
-                                                        if ( in_array( $user-&gt;user_login, $super_admins ) )
-                                                                echo ' - ' . __( 'Super admin' );
-                                                        ?&gt;&lt;/strong&gt;
-                                                        &lt;br/&gt;
-                                                        &lt;?php
-                                                                $actions = array();
-                                                                $actions['edit'] = '&lt;a href=&quot;' . esc_url( self_admin_url( $edit_link ) ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
-
-                                                                if ( ! in_array( $user-&gt;user_login, $super_admins ) ) {
-                                                                        $actions['delete'] = '&lt;a href=&quot;' . $delete = esc_url( network_admin_url( add_query_arg( '_wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'edit.php', 'deleteuser' ) . '&amp;amp;action=deleteuser&amp;amp;id=' . $user-&gt;ID ) ) ) . '&quot; class=&quot;delete&quot;&gt;' . __( 'Delete' ) . '&lt;/a&gt;';
-                                                                }
-
-                                                                echo $this-&gt;row_actions( $actions );
-                                                        ?&gt;
-                                                        &lt;/div&gt;
-                                                &lt;/td&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'name': ?&gt;
-                                                &lt;td class=&quot;name column-name&quot;&gt;&lt;?php echo $user-&gt;display_name ?&gt;&lt;/td&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'email': ?&gt;
-                                                &lt;td class=&quot;email column-email&quot;&gt;&lt;a href=&quot;mailto:&lt;?php echo $user-&gt;user_email ?&gt;&quot;&gt;&lt;?php echo $user-&gt;user_email ?&gt;&lt;/a&gt;&lt;/td&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'registered':
-                                                if ( 'list' == $mode )
-                                                        $date = 'Y/m/d';
-                                                else
-                                                        $date = 'Y/m/d \&lt;\b\r \/\&gt; g:i:s a';
-                                        ?&gt;
-                                                &lt;td&gt;&lt;?php echo mysql2date( $date, $user-&gt;user_registered ); ?&gt;&lt;/td&gt;
-                                        &lt;?php
-                                        break;
-
-                                        case 'blogs':
-                                                $blogs = get_blogs_of_user( $user-&gt;ID, true );
-                                                ?&gt;
-                                                &lt;td&gt;
-                                                        &lt;?php
-                                                        if ( is_array( $blogs ) ) {
-                                                                foreach ( (array) $blogs as $key =&gt; $val ) {
-                                                                        $path        = ( $val-&gt;path == '/' ) ? '' : $val-&gt;path;
-                                                                        echo '&lt;a href=&quot;'. esc_url( network_admin_url( 'site-info.php?id=' . $val-&gt;userblog_id ) ) .'&quot;&gt;' . str_replace( '.' . $current_site-&gt;domain, '', $val-&gt;domain . $path ) . '&lt;/a&gt;';
-                                                                        echo ' &lt;small class=&quot;row-actions&quot;&gt;';
-
-                                                                        // Edit
-                                                                        echo '&lt;a href=&quot;'. esc_url( network_admin_url( 'site-info.php?id=' . $val-&gt;userblog_id ) ) .'&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt; | ';
-
-                                                                        // View
-                                                                        echo '&lt;a ';
-                                                                        if ( get_blog_status( $val-&gt;userblog_id, 'spam' ) == 1 )
-                                                                                echo 'style=&quot;background-color: #faa&quot; ';
-                                                                        echo 'href=&quot;' .  esc_url( get_home_url( $val-&gt;userblog_id ) )  . '&quot;&gt;' . __( 'View' ) . '&lt;/a&gt;';
-
-                                                                        echo '&lt;/small&gt;&lt;br /&gt;';
-                                                                }
-                                                        }
-                                                        ?&gt;
-                                                &lt;/td&gt;
-                                        &lt;?php
-                                        break;
-
-                                        default: ?&gt;
-                                                &lt;td&gt;&lt;?php do_action( 'manage_users_custom_column', $column_name, $user-&gt;ID ); ?&gt;&lt;/td&gt;
-                                        &lt;?php
-                                        break;
-                                }
-                        endforeach
-                        ?&gt;
-                        &lt;/tr&gt;
-                        &lt;?php
-                }
-        }
-}
-
-class WP_Plugins_Table extends WP_List_Table {
-
-        function WP_Plugins_Table() {
-                global $status, $page;
-
-                $default_status = get_user_option( 'plugins_last_view' );
-                if ( empty( $default_status ) )
-                        $default_status = 'all';
-                $status = isset( $_REQUEST['plugin_status'] ) ? $_REQUEST['plugin_status'] : $default_status;
-                if ( !in_array( $status, array( 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) )
-                        $status = 'all';
-                if ( $status != $default_status &amp;&amp; 'search' != $status )
-                        update_user_meta( get_current_user_id(), 'plugins_last_view', $status );
-
-                $page = $this-&gt;get_pagenum();
-
-                parent::WP_List_Table( array(
-                        'screen' =&gt; 'plugins',
-                        'plural' =&gt; 'plugins',
-                ) );
-        }
-
-        function check_permissions() {
-                if ( is_multisite() ) {
-                        $menu_perms = get_site_option( 'menu_items', array() );
-
-                        if ( empty( $menu_perms['plugins'] ) ) {
-                                if ( !is_super_admin() )
-                                        wp_die( __( 'Cheatin&amp;#8217; uh?' ) );
-                        }
-                }
-
-                if ( !current_user_can('activate_plugins') )
-                        wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
-        }
-
-        function prepare_items() {
-                global $status, $plugins, $totals, $page, $orderby, $order, $s;
-
-                wp_reset_vars( array( 'orderby', 'order', 's' ) );
-
-                $plugins = array(
-                        'all' =&gt; apply_filters( 'all_plugins', get_plugins() ),
-                        'search' =&gt; array(),
-                        'active' =&gt; array(),
-                        'inactive' =&gt; array(),
-                        'recently_activated' =&gt; array(),
-                        'upgrade' =&gt; array(),
-                        'mustuse' =&gt; array(),
-                        'dropins' =&gt; array()
-                );
-
-                if ( ! is_multisite() || ( is_network_admin() &amp;&amp; current_user_can('manage_network_plugins') ) ) {
-                        if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) )
-                                $plugins['mustuse'] = get_mu_plugins();
-                        if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )
-                                $plugins['dropins'] = get_dropins();
-                }
-
-                set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), 86400 );
-
-                $recently_activated = get_option( 'recently_activated', array() );
-
-                $one_week = 7*24*60*60;
-                foreach ( $recently_activated as $key =&gt; $time )
-                        if ( $time + $one_week &lt; time() )
-                                unset( $recently_activated[$key] );
-                update_option( 'recently_activated', $recently_activated );
-
-                $current = get_site_transient( 'update_plugins' );
-
-                foreach ( array( 'all', 'mustuse', 'dropins' ) as $type ) {
-                        foreach ( (array) $plugins[$type] as $plugin_file =&gt; $plugin_data ) {
-                                // Translate, Apply Markup, Sanitize HTML
-                                $plugins[$type][$plugin_file] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true );
-                        }
-                }
-
-                foreach ( (array) $plugins['all'] as $plugin_file =&gt; $plugin_data ) {
-                        // Filter into individual sections
-                        if ( is_plugin_active_for_network($plugin_file) &amp;&amp; !is_network_admin() ) {
-                                unset( $plugins['all'][ $plugin_file ] );
-                                continue;
-                        } elseif ( is_multisite() &amp;&amp; is_network_only_plugin( $plugin_file ) &amp;&amp; !current_user_can( 'manage_network_plugins' ) ) {
-                                $plugins['network'][ $plugin_file ] = $plugin_data;
-                        } elseif ( ( !is_network_admin() &amp;&amp; is_plugin_active( $plugin_file ) )
-                                || ( is_network_admin() &amp;&amp; is_plugin_active_for_network( $plugin_file ) ) ) {
-                                $plugins['active'][ $plugin_file ] = $plugin_data;
-                        } else {
-                                if ( !is_network_admin() &amp;&amp; isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated?
-                                        $plugins['recently_activated'][ $plugin_file ] = $plugin_data;
-                                $plugins['inactive'][ $plugin_file ] = $plugin_data;
-                        }
-
-                        if ( isset( $current-&gt;response[ $plugin_file ] ) )
-                                $plugins['upgrade'][ $plugin_file ] = $plugin_data;
-                }
-
-                if ( !current_user_can( 'update_plugins' ) )
-                        $plugins['upgrade'] = array();
-
-                if ( $s ) {
-                        $status = 'search';
-                        $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) );
-                }
-
-                $totals = array();
-                foreach ( $plugins as $type =&gt; $list )
-                        $totals[ $type ] = count( $list );
-
-                if ( empty( $plugins[ $status ] ) &amp;&amp; !in_array( $status, array( 'all', 'search' ) ) )
-                        $status = 'all';
-
-                $this-&gt;items = $plugins[ $status ];
-                $total_this_page = $totals[ $status ];
-
-                if ( $orderby ) {
-                        $orderby = ucfirst( $orderby );
-                        $order = strtoupper( $order );
-
-                        uasort( $this-&gt;items, array( $this, '_order_callback' ) );
-                }
-
-                $plugins_per_page = $this-&gt;get_items_per_page( 'plugins_per_page', 999 );
-
-                $start = ( $page - 1 ) * $plugins_per_page;
-
-                if ( $total_this_page &gt; $plugins_per_page )
-                        $this-&gt;items = array_slice( $this-&gt;items, $start, $plugins_per_page );
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; $total_this_page,
-                        'per_page' =&gt; $plugins_per_page,
-                ) );
-        }
-
-        function _search_callback( $plugin ) {
-                static $term;
-                if ( is_null( $term ) )
-                        $term = stripslashes( $_REQUEST['s'] );
-
-                foreach ( $plugin as $value )
-                        if ( stripos( $value, $term ) !== false )
-                                return true;
-
-                return false;
-        }
-
-        function _order_callback( $plugin_a, $plugin_b ) {
-                global $orderby, $order;
-
-                $a = $plugin_a[$orderby];
-                $b = $plugin_b[$orderby];
-
-                if ( $a == $b )
-                        return 0;
-
-                if ( 'DESC' == $order )
-                        return ( $a &lt; $b ) ? 1 : -1;
-                else
-                        return ( $a &lt; $b ) ? -1 : 1;
-        }
-
-        function no_items() {
-                global $plugins;
-
-                if ( !empty( $plugins['all'] ) )
-                        _e( 'No plugins found.' );
-                else
-                        _e( 'You do not appear to have any plugins available at this time.' );
-        }
-
-        function get_columns() {
-                global $status;
-
-                return array(
-                        'cb'          =&gt; !in_array( $status, array( 'mustuse', 'dropins' ) ) ? '&lt;input type=&quot;checkbox&quot; /&gt;' : '',
-                        'name'        =&gt; __( 'Plugin' ),
-                        'description' =&gt; __( 'Description' ),
-                );
-        }
-
-        function get_sortable_columns() {
-                return array(
-                        'name'         =&gt; 'name',
-                        'description'  =&gt; 'description',
-                );
-        }
-
-        function display_tablenav( $which ) {
-                global $status;
-
-                if ( !in_array( $status, array( 'mustuse', 'dropins' ) ) )
-                        parent::display_tablenav( $which );
-        }
-
-        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;
-        }
-
-        function get_bulk_actions() {
-                global $status;
-
-                $actions = array();
-                if ( 'active' != $status )
-                        $actions['activate-selected'] = __( 'Activate' );
-                if ( is_multisite() &amp;&amp; 'network' != $status )
-                        $actions['network-activate-selected'] = __( 'Network Activate' );
-                if ( 'inactive' != $status &amp;&amp; 'recent' != $status )
-                        $actions['deactivate-selected'] = __( 'Deactivate' );
-                if ( current_user_can( 'update_plugins' ) )
-                        $actions['update-selected'] = __( 'Update' );
-                if ( current_user_can( 'delete_plugins' ) &amp;&amp; ( 'active' != $status ) )
-                        $actions['delete-selected'] = __( 'Delete' );
-
-                return $actions;
-        }
-
-        function bulk_actions( $which ) {
-                global $status;
-
-                if ( in_array( $status, array( 'mustuse', 'dropins' ) ) )
-                        return;
-
-                parent::bulk_actions( $which );
-        }
-
-        function extra_tablenav( $which ) {
-                global $status;
-
-                if ( 'recently_activated' == $status ) { ?&gt;
-                        &lt;div class=&quot;alignleft actions&quot;&gt;
-                                &lt;input type=&quot;submit&quot; name=&quot;clear-recent-list&quot; value=&quot;&lt;?php esc_attr_e( 'Clear List' ) ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
-                        &lt;/div&gt;
-                &lt;?php }
-        }
-
-        function current_action() {
-                if ( isset($_POST['clear-recent-list']) )
-                        return 'clear-recent-list';
-
-                return parent::current_action();
-        }
-
-        function display_rows() {
-                global $status, $page, $s;
-
-                $context = $status;
-
-                foreach ( $this-&gt;items as $plugin_file =&gt; $plugin_data ) {
-                        // preorder
-                        $actions = array(
-                                'network_deactivate' =&gt; '', 'deactivate' =&gt; '',
-                                'network_only' =&gt; '', 'activate' =&gt; '',
-                                'network_activate' =&gt; '',
-                                'edit' =&gt; '',
-                                'delete' =&gt; '',
-                        );
-
-                        if ( 'mustuse' == $context ) {
-                                if ( is_multisite() &amp;&amp; !is_network_admin() )
-                                        continue;
-                                $is_active = true;
-                        } elseif ( 'dropins' == $context ) {
-                                if ( is_multisite() &amp;&amp; !is_network_admin() )
-                                        continue;
-                                $dropins = _get_dropins();
-                                $plugin_name = $plugin_file;
-                                if ( $plugin_file != $plugin_data['Name'] )
-                                        $plugin_name .= '&lt;br/&gt;' . $plugin_data['Name'];
-                                if ( true === ( $dropins[ $plugin_file ][1] ) ) { // Doesn't require a constant
-                                        $is_active = true;
-                                        $description = '&lt;p&gt;&lt;strong&gt;' . $dropins[ $plugin_file ][0] . '&lt;/strong&gt;&lt;/p&gt;';
-                                } elseif ( constant( $dropins[ $plugin_file ][1] ) ) { // Constant is true
-                                        $is_active = true;
-                                        $description = '&lt;p&gt;&lt;strong&gt;' . $dropins[ $plugin_file ][0] . '&lt;/strong&gt;&lt;/p&gt;';
-                                } else {
-                                        $is_active = false;
-                                        $description = '&lt;p&gt;&lt;strong&gt;' . $dropins[ $plugin_file ][0] . ' &lt;span class=&quot;attention&quot;&gt;' . __('Inactive:') . '&lt;/span&gt;&lt;/strong&gt; ' . sprintf( __( 'Requires &lt;code&gt;%s&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;.' ), &quot;define('&quot; . $dropins[ $plugin_file ][1] . &quot;', true);&quot; ) . '&lt;/p&gt;';
-                                }
-                                if ( $plugin_data['Description'] )
-                                        $description .= '&lt;p&gt;' . $plugin_data['Description'] . '&lt;/p&gt;';
-                        } else {
-                                $is_active_for_network = is_plugin_active_for_network($plugin_file);
-                                if ( is_network_admin() )
-                                        $is_active = $is_active_for_network;
-                                else
-                                        $is_active = is_plugin_active( $plugin_file );
-
-                                if ( $is_active_for_network &amp;&amp; !is_super_admin() &amp;&amp; !is_network_admin() )
-                                        continue;
-
-                                if ( is_network_admin() ) {
-                                        if ( $is_active_for_network ) {
-                                                if ( current_user_can( 'manage_network_plugins' ) )
-                                                        $actions['network_deactivate'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=deactivate&amp;amp;networkwide=1&amp;amp;plugin=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'deactivate-plugin_' . $plugin_file) . '&quot; title=&quot;' . __('Deactivate this plugin') . '&quot;&gt;' . __('Network Deactivate') . '&lt;/a&gt;';
-                                        } else {
-                                                if ( current_user_can( 'manage_network_plugins' ) )
-                                                        $actions['network_activate'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=activate&amp;amp;networkwide=1&amp;amp;plugin=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'activate-plugin_' . $plugin_file) . '&quot; title=&quot;' . __('Activate this plugin for all sites in this network') . '&quot; class=&quot;edit&quot;&gt;' . __('Network Activate') . '&lt;/a&gt;';
-                                                if ( current_user_can('delete_plugins') )
-                                                        $actions['delete'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=delete-selected&amp;amp;checked[]=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'bulk-plugins') . '&quot; title=&quot;' . __('Delete this plugin') . '&quot; class=&quot;delete&quot;&gt;' . __('Delete') . '&lt;/a&gt;';
-                                        }
-                                } else {
-                                        if ( $is_active ) {
-                                                $actions['deactivate'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=deactivate&amp;amp;plugin=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'deactivate-plugin_' . $plugin_file) . '&quot; title=&quot;' . __('Deactivate this plugin') . '&quot;&gt;' . __('Deactivate') . '&lt;/a&gt;';
-                                        } else {
-                                                if ( is_network_only_plugin( $plugin_file ) &amp;&amp; !is_network_admin() )
-                                                        continue;
-
-                                                $actions['activate'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=activate&amp;amp;plugin=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'activate-plugin_' . $plugin_file) . '&quot; title=&quot;' . __('Activate this plugin') . '&quot; class=&quot;edit&quot;&gt;' . __('Activate') . '&lt;/a&gt;';
-
-                                                if ( current_user_can('delete_plugins') )
-                                                        $actions['delete'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=delete-selected&amp;amp;checked[]=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'bulk-plugins') . '&quot; title=&quot;' . __('Delete this plugin') . '&quot; class=&quot;delete&quot;&gt;' . __('Delete') . '&lt;/a&gt;';
-                                        } // end if $is_active
-                                 } // end if is_network_admin()
-
-                                if ( current_user_can('edit_plugins') &amp;&amp; is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
-                                        $actions['edit'] = '&lt;a href=&quot;plugin-editor.php?file=' . $plugin_file . '&quot; title=&quot;' . __('Open this file in the Plugin Editor') . '&quot; class=&quot;edit&quot;&gt;' . __('Edit') . '&lt;/a&gt;';
-                        } // end if $context
-
-                        $actions = apply_filters( 'plugin_action_links', array_filter( $actions ), $plugin_file, $plugin_data, $context );
-                        $actions = apply_filters( &quot;plugin_action_links_$plugin_file&quot;, $actions, $plugin_file, $plugin_data, $context );
-
-                        $class = $is_active ? 'active' : 'inactive';
-                        $checkbox = in_array( $status, array( 'mustuse', 'dropins' ) ) ? '' : &quot;&lt;input type='checkbox' name='checked[]' value='&quot; . esc_attr( $plugin_file ) . &quot;' /&gt;&quot;;
-                        if ( 'dropins' != $status ) {
-                                $description = '&lt;p&gt;' . $plugin_data['Description'] . '&lt;/p&gt;';
-                                $plugin_name = $plugin_data['Name'];
-                        }
-
-                        $id = sanitize_title( $plugin_name );
-
-                        echo &quot;
-                &lt;tr id='$id' class='$class'&gt;
-                        &lt;th scope='row' class='check-column'&gt;$checkbox&lt;/th&gt;
-                        &lt;td class='plugin-title'&gt;&lt;strong&gt;$plugin_name&lt;/strong&gt;&lt;/td&gt;
-                        &lt;td class='desc'&gt;$description&lt;/td&gt;
-                &lt;/tr&gt;
-                &lt;tr class='$class second'&gt;
-                        &lt;td&gt;&lt;/td&gt;
-                        &lt;td class='plugin-title'&gt;&quot;;
-
-                        echo $this-&gt;row_actions( $actions, true );
-
-                        echo &quot;&lt;/td&gt;
-                        &lt;td class='desc'&gt;&quot;;
-                        $plugin_meta = array();
-                        if ( !empty( $plugin_data['Version'] ) )
-                                $plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
-                        if ( !empty( $plugin_data['Author'] ) ) {
-                                $author = $plugin_data['Author'];
-                                if ( !empty( $plugin_data['AuthorURI'] ) )
-                                        $author = '&lt;a href=&quot;' . $plugin_data['AuthorURI'] . '&quot; title=&quot;' . __( 'Visit author homepage' ) . '&quot;&gt;' . $plugin_data['Author'] . '&lt;/a&gt;';
-                                $plugin_meta[] = sprintf( __( 'By %s' ), $author );
-                        }
-                        if ( ! empty( $plugin_data['PluginURI'] ) )
-                                $plugin_meta[] = '&lt;a href=&quot;' . $plugin_data['PluginURI'] . '&quot; title=&quot;' . __( 'Visit plugin site' ) . '&quot;&gt;' . __( 'Visit plugin site' ) . '&lt;/a&gt;';
-
-                        $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status );
-                        echo implode( ' | ', $plugin_meta );
-                        echo &quot;&lt;/td&gt;
-                &lt;/tr&gt;\n&quot;;
-
-                        do_action( 'after_plugin_row', $plugin_file, $plugin_data, $status );
-                        do_action( &quot;after_plugin_row_$plugin_file&quot;, $plugin_file, $plugin_data, $status );
-                }
-        }
-}
-
-class WP_Plugin_Install_Table extends WP_List_Table {
-
-        function WP_Plugin_Install_Table() {
-                parent::WP_List_Table( array(
-                        'screen' =&gt; 'plugin-install',
-                ) );
-        }
-
-        function check_permissions() {
-                if ( ! current_user_can('install_plugins') )
-                        wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
-        }
-
-        function prepare_items() {
-                include( ABSPATH . 'wp-admin/includes/plugin-install.php' );
-
-                global $tabs, $tab, $paged, $type, $term;
-
-                wp_reset_vars( array( 'tab' ) );
-
-                $paged = $this-&gt;get_pagenum();
-
-                $per_page = 30;
-
-                // These are the tabs which are shown on the page
-                $tabs = array();
-                $tabs['dashboard'] = __( 'Search' );
-                if ( 'search' == $tab )
-                        $tabs['search']        = __( 'Search Results' );
-                $tabs['upload'] = __( 'Upload' );
-                $tabs['featured'] = _x( 'Featured','Plugin Installer' );
-                $tabs['popular']  = _x( 'Popular','Plugin Installer' );
-                $tabs['new']      = _x( 'Newest','Plugin Installer' );
-                $tabs['updated']  = _x( 'Recently Updated','Plugin Installer' );
-
-                $nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item.
-
-                $tabs = apply_filters( 'install_plugins_tabs', $tabs );
-                $nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs );
-
-                // If a non-valid menu tab has been selected, And its not a non-menu action.
-                if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) &amp;&amp; !in_array( $tab, (array) $nonmenu_tabs ) ) )
-                        $tab = key( $tabs );
-
-                $args = array( 'page' =&gt; $paged, 'per_page' =&gt; $per_page );
-
-                switch ( $tab ) {
-                        case 'search':
-                                $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : '';
-                                $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
-
-                                switch ( $type ) {
-                                        case 'tag':
-                                                $args['tag'] = sanitize_title_with_dashes( $term );
-                                                break;
-                                        case 'term':
-                                                $args['search'] = $term;
-                                                break;
-                                        case 'author':
-                                                $args['author'] = $term;
-                                                break;
-                                }
-
-                                add_action( 'install_plugins_table_header', 'install_search_form' );
-                                break;
-
-                        case 'featured':
-                        case 'popular':
-                        case 'new':
-                        case 'updated':
-                                $args['browse'] = $tab;
-                                break;
-
-                        default:
-                                $args = false;
-                }
-
-                if ( !$args )
-                        return;
-
-                $api = plugins_api( 'query_plugins', $args );
-
-                if ( is_wp_error( $api ) )
-                        wp_die( $api-&gt;get_error_message() . '&lt;/p&gt; &lt;p class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;document.location.reload(); return false;&quot;&gt;' . __( 'Try again' ) . '&lt;/a&gt;' );
-
-                $this-&gt;items = $api-&gt;plugins;
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; $api-&gt;info['results'],
-                        'per_page' =&gt; $per_page,
-                ) );
-        }
-
-        function no_items() {
-                _e( 'No plugins match your request.' );
-        }
-
-        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;
-        }
-
-        function display_tablenav( $which ) {
-                if ( 'top' ==  $which ) { ?&gt;
-                        &lt;div class=&quot;tablenav&quot;&gt;
-                                &lt;div class=&quot;alignleft actions&quot;&gt;
-                                        &lt;?php do_action( 'install_plugins_table_header' ); ?&gt;
-                                &lt;/div&gt;
-                                &lt;?php $this-&gt;pagination( $which ); ?&gt;
-                                &lt;br class=&quot;clear&quot; /&gt;
-                        &lt;/div&gt;
-                &lt;?php } else { ?&gt;
-                        &lt;div class=&quot;tablenav&quot;&gt;
-                                &lt;?php $this-&gt;pagination( $which ); ?&gt;
-                                &lt;br class=&quot;clear&quot; /&gt;
-                        &lt;/div&gt;
-                &lt;?php
-                }
-        }
-
-        function get_table_classes() {
-                extract( $this-&gt;_args );
-
-                return array( 'widefat', $plural );
-        }
-
-        function get_columns() {
-                return array(
-                        'name'        =&gt; __( 'Name' ),
-                        'version'     =&gt; __( 'Version' ),
-                        'rating'      =&gt; __( 'Rating' ),
-                        'description' =&gt; __( 'Description' ),
-                );
-        }
-
-        function display_rows() {
-                $plugins_allowedtags = array(
-                        'a' =&gt; array( 'href' =&gt; array(),'title' =&gt; array(), 'target' =&gt; array() ),
-                        'abbr' =&gt; array( 'title' =&gt; array() ),'acronym' =&gt; array( 'title' =&gt; array() ),
-                        'code' =&gt; array(), 'pre' =&gt; array(), 'em' =&gt; array(),'strong' =&gt; array(),
-                        'ul' =&gt; array(), 'ol' =&gt; array(), 'li' =&gt; array(), 'p' =&gt; array(), 'br' =&gt; array()
-                );
-
-                foreach ( (array) $this-&gt;items as $plugin ) {
-                        if ( is_object( $plugin ) )
-                                $plugin = (array) $plugin;
-
-                        $title = wp_kses( $plugin['name'], $plugins_allowedtags );
-                        //Limit description to 400char, and remove any HTML.
-                        $description = strip_tags( $plugin['description'] );
-                        if ( strlen( $description ) &gt; 400 )
-                                $description = mb_substr( $description, 0, 400 ) . '&amp;#8230;';
-                        //remove any trailing entities
-                        $description = preg_replace( '/&amp;[^;\s]{0,6}$/', '', $description );
-                        //strip leading/trailing &amp; multiple consecutive lines
-                        $description = trim( $description );
-                        $description = preg_replace( &quot;|(\r?\n)+|&quot;, &quot;\n&quot;, $description );
-                        //\n =&gt; &lt;br&gt;
-                        $description = nl2br( $description );
-                        $version = wp_kses( $plugin['version'], $plugins_allowedtags );
-
-                        $name = strip_tags( $title . ' ' . $version );
-
-                        $author = $plugin['author'];
-                        if ( ! empty( $plugin['author'] ) )
-                                $author = ' &lt;cite&gt;' . sprintf( __( 'By %s' ), $author ) . '.&lt;/cite&gt;';
-
-                        $author = wp_kses( $author, $plugins_allowedtags );
-
-                        $action_links = array();
-                        $action_links[] = '&lt;a href=&quot;' . admin_url( 'plugin-install.php?tab=plugin-information&amp;amp;plugin=' . $plugin['slug'] .
-                                                                '&amp;amp;TB_iframe=true&amp;amp;width=600&amp;amp;height=550' ) . '&quot; class=&quot;thickbox&quot; title=&quot;' .
-                                                                esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '&quot;&gt;' . __( 'Details' ) . '&lt;/a&gt;';
-
-                        if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) {
-                                $status = install_plugin_install_status( $plugin );
-
-                                switch ( $status['status'] ) {
-                                        case 'install':
-                                                if ( $status['url'] )
-                                                        $action_links[] = '&lt;a class=&quot;install-now&quot; href=&quot;' . $status['url'] . '&quot; title=&quot;' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '&quot;&gt;' . __( 'Install Now' ) . '&lt;/a&gt;';
-                                                break;
-                                        case 'update_available':
-                                                if ( $status['url'] )
-                                                        $action_links[] = '&lt;a href=&quot;' . $status['url'] . '&quot; title=&quot;' . esc_attr( sprintf( __( 'Update to version %s' ), $status['version'] ) ) . '&quot;&gt;' . sprintf( __( 'Update Now' ), $status['version'] ) . '&lt;/a&gt;';
-                                                break;
-                                        case 'latest_installed':
-                                        case 'newer_installed':
-                                                $action_links[] = '&lt;span title=&quot;' . esc_attr__( 'This plugin is already installed and is up to date' ) . ' &quot;&gt;' . __( 'Installed' ) . '&lt;/span&gt;';
-                                                break;
-                                }
-                        }
-
-                        $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
-                ?&gt;
-                &lt;tr&gt;
-                        &lt;td class=&quot;name&quot;&gt;&lt;strong&gt;&lt;?php echo $title; ?&gt;&lt;/strong&gt;
-                                &lt;div class=&quot;action-links&quot;&gt;&lt;?php if ( !empty( $action_links ) ) echo implode( ' | ', $action_links ); ?&gt;&lt;/div&gt;
-                        &lt;/td&gt;
-                        &lt;td class=&quot;vers&quot;&gt;&lt;?php echo $version; ?&gt;&lt;/td&gt;
-                        &lt;td class=&quot;vers&quot;&gt;
-                                &lt;div class=&quot;star-holder&quot; title=&quot;&lt;?php printf( _n( '( based on %s rating )', '( based on %s ratings )', $plugin['num_ratings'] ), number_format_i18n( $plugin['num_ratings'] ) ) ?&gt;&quot;&gt;
-                                        &lt;div class=&quot;star star-rating&quot; style=&quot;width: &lt;?php echo esc_attr( $plugin['rating'] ) ?&gt;px&quot;&gt;&lt;/div&gt;
-                                        &lt;div class=&quot;star star5&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '5 stars' ) ?&gt;&quot; /&gt;&lt;/div&gt;
-                                        &lt;div class=&quot;star star4&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '4 stars' ) ?&gt;&quot; /&gt;&lt;/div&gt;
-                                        &lt;div class=&quot;star star3&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '3 stars' ) ?&gt;&quot; /&gt;&lt;/div&gt;
-                                        &lt;div class=&quot;star star2&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '2 stars' ) ?&gt;&quot; /&gt;&lt;/div&gt;
-                                        &lt;div class=&quot;star star1&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '1 star' ) ?&gt;&quot; /&gt;&lt;/div&gt;
-                                &lt;/div&gt;
-                        &lt;/td&gt;
-                        &lt;td class=&quot;desc&quot;&gt;&lt;?php echo $description, $author; ?&gt;&lt;/td&gt;
-                &lt;/tr&gt;
-                &lt;?php
-                }
-        }
-}
-
-class WP_Themes_Table extends WP_List_Table {
-
-        var $search = array();
-        var $features = array();
-
-        function WP_Themes_Table() {
-                parent::__construct( array(
-                        'screen' =&gt; 'themes',
-                ) );
-        }
-
-        function check_permissions() {
-                if ( !current_user_can('switch_themes') &amp;&amp; !current_user_can('edit_theme_options') )
-                        wp_die( __( 'Cheatin&amp;#8217; uh?' ) );
-        }
-
-        function prepare_items() {
-                global $ct;
-
-                $ct = current_theme_info();
-
-                $themes = get_allowed_themes();
-
-                $search = !empty( $_REQUEST['s'] ) ? trim( stripslashes( $_REQUEST['s'] ) ) : '';
-
-                if ( '' !== $search ) {
-                        $this-&gt;search = array_merge( $this-&gt;search, array_filter( array_map( 'trim', explode( ',', $search ) ) ) );
-                        $this-&gt;search = array_unique( $this-&gt;search );
-                }
-
-                if ( !empty( $_REQUEST['features'] ) ) {
-                        $this-&gt;features = $_REQUEST['features'];
-                        $this-&gt;features = array_map( 'trim', $this-&gt;features );
-                        $this-&gt;features = array_map( 'sanitize_title_with_dashes', $this-&gt;features );
-                        $this-&gt;features = array_unique( $this-&gt;features );
-                }
-
-                if ( $this-&gt;search || $this-&gt;features ) {
-                        foreach ( $themes as $key =&gt; $theme ) {
-                                if ( !$this-&gt;search_theme( $theme ) )
-                                        unset( $themes[ $key ] );
-                        }
-                }
-
-                unset( $themes[$ct-&gt;name] );
-                uksort( $themes, &quot;strnatcasecmp&quot; );
-
-                $per_page = 15;
-                $page = $this-&gt;get_pagenum();
-
-                $start = ( $page - 1 ) * $per_page;
-
-                $this-&gt;items = array_slice( $themes, $start, $per_page );
-
-                $this-&gt;set_pagination_args( array(
-                        'query_var' =&gt; 'pagenum',
-                        'total_items' =&gt; count( $themes ),
-                        'per_page' =&gt; $per_page,
-                ) );
-        }
-
-        function no_items() {
-                if ( current_user_can( 'install_themes' ) )
-                        printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the &lt;em&gt;&lt;a href=&quot;%s&quot;&gt;Install Themes&lt;/a&gt;&lt;/em&gt; tab above.' ), 'theme-install.php' );
-                else
-                        printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
-        }
-
-        function display_table() {
-?&gt;
-                &lt;div class=&quot;tablenav&quot;&gt;
-                        &lt;?php $this-&gt;pagination( 'top' ); ?&gt;
-                        &lt;br class=&quot;clear&quot; /&gt;
-                &lt;/div&gt;
-
-                &lt;table id=&quot;availablethemes&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
-                        &lt;tbody id=&quot;the-list&quot; class=&quot;list:themes&quot;&gt;
-                                &lt;?php $this-&gt;display_rows(); ?&gt;
-                        &lt;/tbody&gt;
-                &lt;/table&gt;
-
-                &lt;div class=&quot;tablenav&quot;&gt;
-                        &lt;?php $this-&gt;pagination( 'bottom' ); ?&gt;
-                        &lt;br class=&quot;clear&quot; /&gt;
-                &lt;/div&gt;
-&lt;?php
-        }
-
-        function get_columns() {
-                return array();
-        }
-
-        function display_rows() {
-                $themes = $this-&gt;items;
-                $theme_names = array_keys( $themes );
-                natcasesort( $theme_names );
-
-                $table = array();
-                $rows = ceil( count( $theme_names ) / 3 );
-                for ( $row = 1; $row &lt;= $rows; $row++ )
-                        for ( $col = 1; $col &lt;= 3; $col++ )
-                                $table[$row][$col] = array_shift( $theme_names );
-
-                foreach ( $table as $row =&gt; $cols ) {
-?&gt;
-&lt;tr&gt;
-&lt;?php
-foreach ( $cols as $col =&gt; $theme_name ) {
-        $class = array( 'available-theme' );
-        if ( $row == 1 ) $class[] = 'top';
-        if ( $col == 1 ) $class[] = 'left';
-        if ( $row == $rows ) $class[] = 'bottom';
-        if ( $col == 3 ) $class[] = 'right';
-?&gt;
-        &lt;td class=&quot;&lt;?php echo join( ' ', $class ); ?&gt;&quot;&gt;
-&lt;?php if ( !empty( $theme_name ) ) :
-        $template = $themes[$theme_name]['Template'];
-        $stylesheet = $themes[$theme_name]['Stylesheet'];
-        $title = $themes[$theme_name]['Title'];
-        $version = $themes[$theme_name]['Version'];
-        $description = $themes[$theme_name]['Description'];
-        $author = $themes[$theme_name]['Author'];
-        $screenshot = $themes[$theme_name]['Screenshot'];
-        $stylesheet_dir = $themes[$theme_name]['Stylesheet Dir'];
-        $template_dir = $themes[$theme_name]['Template Dir'];
-        $parent_theme = $themes[$theme_name]['Parent Theme'];
-        $theme_root = $themes[$theme_name]['Theme Root'];
-        $theme_root_uri = $themes[$theme_name]['Theme Root URI'];
-        $preview_link = esc_url( get_option( 'home' ) . '/' );
-        if ( is_ssl() )
-                $preview_link = str_replace( 'http://', 'https://', $preview_link );
-        $preview_link = htmlspecialchars( add_query_arg( array( 'preview' =&gt; 1, 'template' =&gt; $template, 'stylesheet' =&gt; $stylesheet, 'TB_iframe' =&gt; 'true' ), $preview_link ) );
-        $preview_text = esc_attr( sprintf( __( 'Preview of &amp;#8220;%s&amp;#8221;' ), $title ) );
-        $tags = $themes[$theme_name]['Tags'];
-        $thickbox_class = 'thickbox thickbox-preview';
-        $activate_link = wp_nonce_url( &quot;themes.php?action=activate&amp;amp;template=&quot;.urlencode( $template ).&quot;&amp;amp;stylesheet=&quot;.urlencode( $stylesheet ), 'switch-theme_' . $template );
-        $activate_text = esc_attr( sprintf( __( 'Activate &amp;#8220;%s&amp;#8221;' ), $title ) );
-        $actions = array();
-        $actions[] = '&lt;a href=&quot;' . $activate_link .  '&quot; class=&quot;activatelink&quot; title=&quot;' . $activate_text . '&quot;&gt;' . __( 'Activate' ) . '&lt;/a&gt;';
-        $actions[] = '&lt;a href=&quot;' . $preview_link . '&quot; class=&quot;thickbox thickbox-preview&quot; title=&quot;' . esc_attr( sprintf( __( 'Preview &amp;#8220;%s&amp;#8221;' ), $theme_name ) ) . '&quot;&gt;' . __( 'Preview' ) . '&lt;/a&gt;';
-        if ( current_user_can( 'delete_themes' ) )
-                $actions[] = '&lt;a class=&quot;submitdelete deletion&quot; href=&quot;' . wp_nonce_url( &quot;themes.php?action=delete&amp;amp;template=$stylesheet&quot;, 'delete-theme_' . $stylesheet ) . '&quot; onclick=&quot;' . &quot;return confirm( '&quot; . esc_js( sprintf( __( &quot;You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete.&quot; ), $theme_name ) ) . &quot;' );&quot; . '&quot;&gt;' . __( 'Delete' ) . '&lt;/a&gt;';
-        $actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] );
-
-        $actions = implode ( ' | ', $actions );
-?&gt;
-                &lt;a href=&quot;&lt;?php echo $preview_link; ?&gt;&quot; class=&quot;&lt;?php echo $thickbox_class; ?&gt; screenshot&quot;&gt;
-&lt;?php if ( $screenshot ) : ?&gt;
-                        &lt;img src=&quot;&lt;?php echo $theme_root_uri . '/' . $stylesheet . '/' . $screenshot; ?&gt;&quot; alt=&quot;&quot; /&gt;
-&lt;?php endif; ?&gt;
-                &lt;/a&gt;
-&lt;h3&gt;&lt;?php
-        /* translators: 1: theme title, 2: theme version, 3: theme author */
-        printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?&gt;&lt;/h3&gt;
-&lt;p class=&quot;description&quot;&gt;&lt;?php echo $description; ?&gt;&lt;/p&gt;
-&lt;span class='action-links'&gt;&lt;?php echo $actions ?&gt;&lt;/span&gt;
-        &lt;?php if ( current_user_can( 'edit_themes' ) &amp;&amp; $parent_theme ) {
-        /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?&gt;
-        &lt;p&gt;&lt;?php printf( __( 'The template files are located in &lt;code&gt;%2$s&lt;/code&gt;. The stylesheet files are located in &lt;code&gt;%3$s&lt;/code&gt;. &lt;strong&gt;%4$s&lt;/strong&gt; uses templates from &lt;strong&gt;%5$s&lt;/strong&gt;. Changes made to the templates will affect both themes.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?&gt;&lt;/p&gt;
-&lt;?php } else { ?&gt;
-        &lt;p&gt;&lt;?php printf( __( 'All of this theme&amp;#8217;s files are located in &lt;code&gt;%2$s&lt;/code&gt;.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?&gt;&lt;/p&gt;
-&lt;?php } ?&gt;
-&lt;?php if ( $tags ) : ?&gt;
-&lt;p&gt;&lt;?php _e( 'Tags:' ); ?&gt; &lt;?php echo join( ', ', $tags ); ?&gt;&lt;/p&gt;
-&lt;?php endif; ?&gt;
-                &lt;?php theme_update_available( $themes[$theme_name] ); ?&gt;
-&lt;?php endif; // end if not empty theme_name ?&gt;
-        &lt;/td&gt;
-&lt;?php } // end foreach $cols ?&gt;
-&lt;/tr&gt;
-&lt;?php } // end foreach $table
-        }
-
-        function search_theme( $theme ) {
-                $matched = 0;
-
-                // Match all phrases
-                if ( count( $this-&gt;search ) &gt; 0 ) {
-                        foreach ( $this-&gt;search as $word ) {
-                                $matched = 0;
-
-                                // In a tag?
-                                if ( in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) )
-                                        $matched = 1;
-
-                                // In one of the fields?
-                                foreach ( array( 'Name', 'Title', 'Description', 'Author', 'Template', 'Stylesheet' ) AS $field ) {
-                                        if ( stripos( $theme[$field], $word ) !== false )
-                                                $matched++;
-                                }
-
-                                if ( $matched == 0 )
-                                        return false;
-                        }
-                }
-
-                // Now search the features
-                if ( count( $this-&gt;features ) &gt; 0 ) {
-                        foreach ( $this-&gt;features as $word ) {
-                                // In a tag?
-                                if ( !in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) )
-                                        return false;
-                        }
-                }
-
-                // Only get here if each word exists in the tags or one of the fields
-                return true;
-        }
-}
-
-class WP_Theme_Install_Table extends WP_List_Table {
-
-        function WP_Theme_Install_Table() {
-                parent::WP_List_Table( array(
-                        'screen' =&gt; 'theme-install',
-                ) );
-        }
-
-        function check_permissions() {
-                if ( ! current_user_can('install_themes') )
-                        wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
-        }
-
-        function prepare_items() {
-                include( ABSPATH . 'wp-admin/includes/theme-install.php' );
-
-                global $tabs, $tab, $paged, $type, $term, $theme_field_defaults;
-
-                wp_reset_vars( array( 'tab' ) );
-
-                $paged = $this-&gt;get_pagenum();
-
-                $per_page = 30;
-
-                // These are the tabs which are shown on the page,
-                $tabs = array();
-                $tabs['dashboard'] = __( 'Search' );
-                if ( 'search' == $tab )
-                        $tabs['search']        = __( 'Search Results' );
-                $tabs['upload'] = __( 'Upload' );
-                $tabs['featured'] = _x( 'Featured','Theme Installer' );
-                //$tabs['popular']  = _x( 'Popular','Theme Installer' );
-                $tabs['new']      = _x( 'Newest','Theme Installer' );
-                $tabs['updated']  = _x( 'Recently Updated','Theme Installer' );
-
-                $nonmenu_tabs = array( 'theme-information' ); // Valid actions to perform which do not have a Menu item.
-
-                $tabs = apply_filters( 'install_themes_tabs', $tabs );
-                $nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs );
-
-                // If a non-valid menu tab has been selected, And its not a non-menu action.
-                if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) &amp;&amp; ! in_array( $tab, (array) $nonmenu_tabs ) ) )
-                        $tab = key( $tabs );
-
-                $args = array( 'page' =&gt; $paged, 'per_page' =&gt; $per_page, 'fields' =&gt; $theme_field_defaults );
-
-                switch ( $tab ) {
-                        case 'search':
-                                $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : '';
-                                $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
-
-                                switch ( $type ) {
-                                        case 'tag':
-                                                $terms = explode( ',', $term );
-                                                $terms = array_map( 'trim', $terms );
-                                                $terms = array_map( 'sanitize_title_with_dashes', $terms );
-                                                $args['tag'] = $terms;
-                                                break;
-                                        case 'term':
-                                                $args['search'] = $term;
-                                                break;
-                                        case 'author':
-                                                $args['author'] = $term;
-                                                break;
-                                }
-
-                                if ( !empty( $_POST['features'] ) ) {
-                                        $terms = $_POST['features'];
-                                        $terms = array_map( 'trim', $terms );
-                                        $terms = array_map( 'sanitize_title_with_dashes', $terms );
-                                        $args['tag'] = $terms;
-                                        $_REQUEST['s'] = implode( ',', $terms );
-                                        $_REQUEST['type'] = 'tag';
-                                }
-
-                                add_action( 'install_themes_table_header', 'install_theme_search_form' );
-                                break;
-
-                        case 'featured':
-                        //case 'popular':
-                        case 'new':
-                        case 'updated':
-                                $args['browse'] = $tab;
-                                break;
-
-                        default:
-                                $args = false;
-                }
-
-                if ( !$args )
-                        return;
-
-                $api = themes_api( 'query_themes', $args );
-
-                if ( is_wp_error( $api ) )
-                        wp_die( $api-&gt;get_error_message() . '&lt;/p&gt; &lt;p class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;document.location.reload(); return false;&quot;&gt;' . __( 'Try again' ) . '&lt;/a&gt;' );
-
-                $this-&gt;items = $api-&gt;themes;
-
-                $this-&gt;set_pagination_args( array(
-                        'total_items' =&gt; $api-&gt;info['results'],
-                        'per_page' =&gt; $per_page,
-                ) );
-        }
-
-        function no_items() {
-                _e( 'No themes match your request.' );
-        }
-
-        function get_views() {
-                global $tabs, $tab;
-
-                $display_tabs = array();
-                foreach ( (array) $tabs as $action =&gt; $text ) {
-                        $class = ( $action == $tab ) ? ' class=&quot;current&quot;' : '';
-                        $href = self_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;
-        }
-
-        function get_columns() {
-                return array();
-        }
-
-        function display_table() {
-?&gt;
-                &lt;div class=&quot;tablenav&quot;&gt;
-                        &lt;div class=&quot;alignleft actions&quot;&gt;
-                                &lt;?php do_action( 'install_themes_table_header' ); ?&gt;
-                        &lt;/div&gt;
-                        &lt;?php $this-&gt;pagination( 'top' ); ?&gt;
-                        &lt;br class=&quot;clear&quot; /&gt;
-                &lt;/div&gt;
-
-                &lt;table id=&quot;availablethemes&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
-                        &lt;tbody id=&quot;the-list&quot; class=&quot;list:themes&quot;&gt;
-                                &lt;?php $this-&gt;display_rows(); ?&gt;
-                        &lt;/tbody&gt;
-                &lt;/table&gt;
-
-                &lt;div class=&quot;tablenav&quot;&gt;
-                        &lt;?php $this-&gt;pagination( 'bottom' ); ?&gt;
-                        &lt;br class=&quot;clear&quot; /&gt;
-                &lt;/div&gt;
-&lt;?php
-        }
-
-        function display_rows() {
-                $themes = $this-&gt;items;
-
-                $rows = ceil( count( $themes ) / 3 );
-                $table = array();
-                $theme_keys = array_keys( $themes );
-                for ( $row = 1; $row &lt;= $rows; $row++ )
-                        for ( $col = 1; $col &lt;= 3; $col++ )
-                                $table[$row][$col] = array_shift( $theme_keys );
-
-                foreach ( $table as $row =&gt; $cols ) {
-                        echo &quot;\t&lt;tr&gt;\n&quot;;
-                        foreach ( $cols as $col =&gt; $theme_index ) {
-                                $class = array( 'available-theme' );
-                                if ( $row == 1 ) $class[] = 'top';
-                                if ( $col == 1 ) $class[] = 'left';
-                                if ( $row == $rows ) $class[] = 'bottom';
-                                if ( $col == 3 ) $class[] = 'right';
-                                ?&gt;
-                                &lt;td class=&quot;&lt;?php echo join( ' ', $class ); ?&gt;&quot;&gt;&lt;?php
-                                        if ( isset( $themes[$theme_index] ) )
-                                                display_theme( $themes[$theme_index] );
-                                ?&gt;&lt;/td&gt;
-                        &lt;?php } // end foreach $cols
-                        echo &quot;\t&lt;/tr&gt;\n&quot;;
-                } // end foreach $table
-        }
-}
-
</del></span></pre></div>
<a id="trunkwpadminincludeslisttablecommentsphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-comments.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-comments.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-comments.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,498 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Post_Comments_Table extends WP_Comments_Table {
+
+        function get_columns() {
+                return array(
+                        'author'   =&gt; __( 'Author' ),
+                        'comment'  =&gt; _x( 'Comment', 'column name' ),
+                );
+        }
+
+        function get_sortable_columns() {
+                return array();
+        }
+}
+
+class WP_Comments_Table extends WP_List_Table {
+
+        var $checkbox = true;
+        var $from_ajax = false;
+
+        var $pending_count = array();
+
+        function WP_Comments_Table() {
+                global $mode;
+
+                $mode = ( empty( $_REQUEST['mode'] ) ) ? 'detail' : $_REQUEST['mode'];
+
+                if ( get_option('show_avatars') &amp;&amp; 'single' != $mode )
+                        add_filter( 'comment_author', 'floated_admin_avatar' );
+
+                parent::WP_List_Table( array(
+                        'screen' =&gt; 'edit-comments',
+                        'plural' =&gt; 'comments'
+                ) );
+        }
+
+        function check_permissions() {
+                if ( !current_user_can('edit_posts') )
+                        wp_die(__('Cheatin&amp;#8217; uh?'));
+        }
+
+        function prepare_items() {
+                global $post_id, $comment_status, $search;
+
+                if ( isset( $_REQUEST['p'] ) )
+                        $post_id = absint( $_REQUEST['p'] );
+                elseif ( isset( $_REQUEST['post'] ) )
+                        $post_id = absint( $_REQUEST['post'] );
+                elseif ( isset( $_REQUEST['post_ID'] ) )
+                        $post_id = absint( $_REQUEST['post_ID'] );
+                else
+                        $post_id = 0;
+
+                $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
+                if ( !in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) )
+                        $comment_status = 'all';
+
+                $comment_type = !empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : '';
+
+                $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
+
+                $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : '';
+
+                $comments_per_page = $this-&gt;get_items_per_page( 'edit_comments_per_page' );
+                $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
+
+                if ( isset( $_POST['number'] ) )
+                        $number = (int) $_POST['number'];
+                else
+                        $number = $comments_per_page + min( 8, $comments_per_page ); // Grab a few extra
+
+                $page = $this-&gt;get_pagenum();
+
+                $start = $offset = ( $page - 1 ) * $comments_per_page;
+
+                $status_map = array(
+                        'moderated' =&gt; 'hold',
+                        'approved' =&gt; 'approve'
+                );
+
+                $args = array(
+                        'status' =&gt; isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status,
+                        'search' =&gt; $search,
+                        'user_id' =&gt; $user_id,
+                        'offset' =&gt; $start,
+                        'number' =&gt; $number,
+                        'post_id' =&gt; $post_id,
+                        'type' =&gt; $comment_type,
+                        'orderby' =&gt; @$_REQUEST['orderby'],
+                        'order' =&gt; @$_REQUEST['order'],
+                );
+
+                $_comments = get_comments( $args );
+
+                update_comment_cache( $_comments );
+
+                $this-&gt;items = array_slice( $_comments, 0, $comments_per_page );
+                $this-&gt;extra_items = array_slice( $_comments, $comments_per_page );
+
+                $total_comments = get_comments( array_merge( $args, array('count' =&gt; true, 'offset' =&gt; 0, 'number' =&gt; 0) ) );
+
+                $_comment_post_ids = array();
+                foreach ( $_comments as $_c ) {
+                        $_comment_post_ids[] = $_c-&gt;comment_post_ID;
+                }
+
+                $this-&gt;pending_count = get_pending_comments_num( $_comment_post_ids );
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; $total_comments,
+                        'per_page' =&gt; $comments_per_page,
+                ) );
+        }
+
+        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;
+        }
+
+        function get_bulk_actions() {
+                global $comment_status;
+
+                $actions = array();
+                if ( in_array( $comment_status, array( 'all', 'approved' ) ) )
+                        $actions['unapprove'] = __( 'Unapprove' );
+                if ( in_array( $comment_status, array( 'all', 'moderated', 'spam' ) ) )
+                        $actions['approve'] = __( 'Approve' );
+                if ( in_array( $comment_status, array( 'all', 'moderated', 'approved' ) ) )
+                        $actions['spam'] = _x( 'Mark as Spam', 'comment' );
+
+                if ( 'trash' == $comment_status )
+                        $actions['untrash'] = __( 'Restore' );
+                elseif ( 'spam' == $comment_status )
+                        $actions['unspam'] = _x( 'Not Spam', 'comment' );
+
+                if ( in_array( $comment_status, array( 'trash', 'spam' ) ) || !EMPTY_TRASH_DAYS )
+                        $actions['delete'] = __( 'Delete Permanently' );
+                else
+                        $actions['trash'] = __( 'Move to Trash' );
+
+                return $actions;
+        }
+
+        function extra_tablenav( $which ) {
+                global $comment_status, $comment_type;
+?&gt;
+                &lt;div class=&quot;alignleft actions&quot;&gt;
+&lt;?php
+                if ( 'top' == $which ) {
+?&gt;
+                        &lt;select name=&quot;comment_type&quot;&gt;
+                                &lt;option value=&quot;&quot;&gt;&lt;?php _e( 'Show all comment types' ); ?&gt;&lt;/option&gt;
+&lt;?php
+                                $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
+                                        'comment' =&gt; __( 'Comments' ),
+                                        'pings' =&gt; __( 'Pings' ),
+                                ) );
+
+                                foreach ( $comment_types as $type =&gt; $label )
+                                        echo &quot;\t&lt;option value='&quot; . esc_attr( $type ) . &quot;'&quot; . selected( $comment_type, $type, false ) . &quot;&gt;$label&lt;/option&gt;\n&quot;;
+                        ?&gt;
+                        &lt;/select&gt;
+                        &lt;input type=&quot;submit&quot; id=&quot;post-query-submit&quot; value=&quot;&lt;?php esc_attr_e( 'Filter' ); ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
+&lt;?php
+                }
+
+                if ( ( 'spam' == $comment_status || 'trash' == $comment_status ) &amp;&amp; current_user_can( 'moderate_comments' ) ) {
+                        wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
+                        $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
+?&gt;
+                        &lt;input type=&quot;submit&quot; name=&quot;delete_all&quot; id=&quot;delete_all&quot; value=&quot;&lt;?php echo $title ?&gt;&quot; class=&quot;button-secondary apply&quot; /&gt;
+&lt;?php
+                }
+?&gt;
+&lt;?php
+                do_action( 'manage_comments_nav', $comment_status );
+                echo '&lt;/div&gt;';
+        }
+
+        function current_action() {
+                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
+                        return 'delete_all';
+
+                return parent::current_action();
+        }
+
+        function get_columns() {
+                global $mode;
+
+                $columns = array();
+
+                if ( $this-&gt;checkbox )
+                        $columns['cb'] = '&lt;input type=&quot;checkbox&quot; /&gt;';
+
+                $columns['author'] = __( 'Author' );
+                $columns['comment'] = _x( 'Comment', 'column name' );
+
+                if ( 'single' !== $mode )
+                        $columns['response'] = _x( 'Comment', 'column name' );
+
+                return $columns;
+        }
+
+        function get_sortable_columns() {
+                return array(
+                        'author'   =&gt; 'comment_author',
+                        'comment'  =&gt; 'comment_content',
+                        'response' =&gt; 'comment_post_ID'
+                );
+        }
+
+        function display_table() {
+                extract( $this-&gt;_args );
+
+                $this-&gt;display_tablenav( 'top' );
+
+?&gt;
+&lt;table class=&quot;&lt;?php echo implode( ' ', $this-&gt;get_table_classes() ); ?&gt;&quot; cellspacing=&quot;0&quot;&gt;
+        &lt;thead&gt;
+        &lt;tr&gt;
+                &lt;?php $this-&gt;print_column_headers(); ?&gt;
+        &lt;/tr&gt;
+        &lt;/thead&gt;
+
+        &lt;tfoot&gt;
+        &lt;tr&gt;
+                &lt;?php $this-&gt;print_column_headers( false ); ?&gt;
+        &lt;/tr&gt;
+        &lt;/tfoot&gt;
+
+        &lt;tbody id=&quot;the-comment-list&quot; class=&quot;list:comment&quot;&gt;
+                &lt;?php $this-&gt;display_rows(); ?&gt;
+        &lt;/tbody&gt;
+
+        &lt;tbody id=&quot;the-extra-comment-list&quot; class=&quot;list:comment&quot; style=&quot;display: none;&quot;&gt;
+                &lt;?php $this-&gt;items = $this-&gt;extra_items; $this-&gt;display_rows(); ?&gt;
+        &lt;/tbody&gt;
+&lt;/table&gt;
+&lt;?php
+
+                $this-&gt;display_tablenav( 'bottom' );
+        }
+
+        function single_row( $a_comment ) {
+                global $post, $comment, $the_comment_status;
+
+                $comment = $a_comment;
+                $the_comment_status = wp_get_comment_status( $comment-&gt;comment_ID );
+
+                $post = get_post( $comment-&gt;comment_post_ID );
+
+                $this-&gt;user_can = current_user_can( 'edit_comment', $comment-&gt;comment_ID );
+
+                echo &quot;&lt;tr id='comment-$comment-&gt;comment_ID' class='$the_comment_status'&gt;&quot;;
+                echo $this-&gt;single_row_columns( $comment );
+                echo &quot;&lt;/tr&gt;\n&quot;;
+        }
+
+        function column_cb( $comment ) {
+                if ( $this-&gt;user_can )
+                        echo &quot;&lt;input type='checkbox' name='delete_comments[]' value='$comment-&gt;comment_ID' /&gt;&quot;;
+        }
+
+        function column_comment( $comment ) {
+                global $post, $comment_status, $the_comment_status;
+
+                $user_can = $this-&gt;user_can;
+
+                $comment_url = esc_url( get_comment_link( $comment-&gt;comment_ID ) );
+
+                $ptime = date( 'G', strtotime( $comment-&gt;comment_date ) );
+                if ( ( abs( time() - $ptime ) ) &lt; 86400 )
+                        $ptime = sprintf( __( '%s ago' ), human_time_diff( $ptime ) );
+                else
+                        $ptime = mysql2date( __( 'Y/m/d \a\t g:i A' ), $comment-&gt;comment_date );
+
+                if ( $user_can ) {
+                        $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( &quot;delete-comment_$comment-&gt;comment_ID&quot; ) );
+                        $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( &quot;approve-comment_$comment-&gt;comment_ID&quot; ) );
+
+                        $url = &quot;comment.php?c=$comment-&gt;comment_ID&quot;;
+
+                        $approve_url = esc_url( $url . &quot;&amp;action=approvecomment&amp;$approve_nonce&quot; );
+                        $unapprove_url = esc_url( $url . &quot;&amp;action=unapprovecomment&amp;$approve_nonce&quot; );
+                        $spam_url = esc_url( $url . &quot;&amp;action=spamcomment&amp;$del_nonce&quot; );
+                        $unspam_url = esc_url( $url . &quot;&amp;action=unspamcomment&amp;$del_nonce&quot; );
+                        $trash_url = esc_url( $url . &quot;&amp;action=trashcomment&amp;$del_nonce&quot; );
+                        $untrash_url = esc_url( $url . &quot;&amp;action=untrashcomment&amp;$del_nonce&quot; );
+                        $delete_url = esc_url( $url . &quot;&amp;action=deletecomment&amp;$del_nonce&quot; );
+                }
+
+                echo '&lt;div id=&quot;submitted-on&quot;&gt;';
+                /* translators: 2: comment date, 3: comment time */
+                printf( __( '&lt;a href=&quot;%1$s&quot;&gt;%2$s at %3$s&lt;/a&gt;' ), $comment_url,
+                        /* translators: comment date format. See http://php.net/date */ get_comment_date( __( 'Y/m/d' ) ),
+                        /* translators: comment time format. See http://php.net/date */ get_comment_date( get_option( 'time_format' ) ) );
+
+                if ( $comment-&gt;comment_parent ) {
+                        $parent = get_comment( $comment-&gt;comment_parent );
+                        $parent_link = esc_url( get_comment_link( $comment-&gt;comment_parent ) );
+                        $name = get_comment_author( $parent-&gt;comment_ID );
+                        printf( ' | '.__( 'In reply to &lt;a href=&quot;%1$s&quot;&gt;%2$s&lt;/a&gt;.' ), $parent_link, $name );
+                }
+
+                echo '&lt;/div&gt;';
+                comment_text();
+                if ( $user_can ) { ?&gt;
+                &lt;div id=&quot;inline-&lt;?php echo $comment-&gt;comment_ID; ?&gt;&quot; class=&quot;hidden&quot;&gt;
+                &lt;textarea class=&quot;comment&quot; rows=&quot;1&quot; cols=&quot;1&quot;&gt;&lt;?php echo esc_html( apply_filters( 'comment_edit_pre', $comment-&gt;comment_content ) ); ?&gt;&lt;/textarea&gt;
+                &lt;div class=&quot;author-email&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author_email ); ?&gt;&lt;/div&gt;
+                &lt;div class=&quot;author&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author ); ?&gt;&lt;/div&gt;
+                &lt;div class=&quot;author-url&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author_url ); ?&gt;&lt;/div&gt;
+                &lt;div class=&quot;comment_status&quot;&gt;&lt;?php echo $comment-&gt;comment_approved; ?&gt;&lt;/div&gt;
+                &lt;/div&gt;
+                &lt;?php
+                }
+
+                if ( $user_can ) {
+                        // preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash
+                        $actions = array(
+                                'approve' =&gt; '', 'unapprove' =&gt; '',
+                                'reply' =&gt; '',
+                                'quickedit' =&gt; '',
+                                'edit' =&gt; '',
+                                'spam' =&gt; '', 'unspam' =&gt; '',
+                                'trash' =&gt; '', 'untrash' =&gt; '', 'delete' =&gt; ''
+                        );
+
+                        if ( $comment_status &amp;&amp; 'all' != $comment_status ) { // not looking at all comments
+                                if ( 'approved' == $the_comment_status )
+                                        $actions['unapprove'] = &quot;&lt;a href='$unapprove_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID:e7e7d3:action=dim-comment&amp;amp;new=unapproved vim-u vim-destructive' title='&quot; . esc_attr__( 'Unapprove this comment' ) . &quot;'&gt;&quot; . __( 'Unapprove' ) . '&lt;/a&gt;';
+                                else if ( 'unapproved' == $the_comment_status )
+                                        $actions['approve'] = &quot;&lt;a href='$approve_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID:e7e7d3:action=dim-comment&amp;amp;new=approved vim-a vim-destructive' title='&quot; . esc_attr__( 'Approve this comment' ) . &quot;'&gt;&quot; . __( 'Approve' ) . '&lt;/a&gt;';
+                        } else {
+                                $actions['approve'] = &quot;&lt;a href='$approve_url' class='dim:the-comment-list:comment-$comment-&gt;comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='&quot; . esc_attr__( 'Approve this comment' ) . &quot;'&gt;&quot; . __( 'Approve' ) . '&lt;/a&gt;';
+                                $actions['unapprove'] = &quot;&lt;a href='$unapprove_url' class='dim:the-comment-list:comment-$comment-&gt;comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='&quot; . esc_attr__( 'Unapprove this comment' ) . &quot;'&gt;&quot; . __( 'Unapprove' ) . '&lt;/a&gt;';
+                        }
+
+                        if ( 'spam' != $the_comment_status &amp;&amp; 'trash' != $the_comment_status ) {
+                                $actions['spam'] = &quot;&lt;a href='$spam_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID::spam=1 vim-s vim-destructive' title='&quot; . esc_attr__( 'Mark this comment as spam' ) . &quot;'&gt;&quot; . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '&lt;/a&gt;';
+                        } elseif ( 'spam' == $the_comment_status ) {
+                                $actions['unspam'] = &quot;&lt;a href='$unspam_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID:66cc66:unspam=1 vim-z vim-destructive'&gt;&quot; . _x( 'Not Spam', 'comment' ) . '&lt;/a&gt;';
+                        } elseif ( 'trash' == $the_comment_status ) {
+                                $actions['untrash'] = &quot;&lt;a href='$untrash_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID:66cc66:untrash=1 vim-z vim-destructive'&gt;&quot; . __( 'Restore' ) . '&lt;/a&gt;';
+                        }
+
+                        if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
+                                $actions['delete'] = &quot;&lt;a href='$delete_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID::delete=1 delete vim-d vim-destructive'&gt;&quot; . __( 'Delete Permanently' ) . '&lt;/a&gt;';
+                        } else {
+                                $actions['trash'] = &quot;&lt;a href='$trash_url' class='delete:the-comment-list:comment-$comment-&gt;comment_ID::trash=1 delete vim-d vim-destructive' title='&quot; . esc_attr__( 'Move this comment to the trash' ) . &quot;'&gt;&quot; . _x( 'Trash', 'verb' ) . '&lt;/a&gt;';
+                        }
+
+                        if ( 'trash' != $the_comment_status ) {
+                                $actions['edit'] = &quot;&lt;a href='comment.php?action=editcomment&amp;amp;c={$comment-&gt;comment_ID}' title='&quot; . esc_attr__( 'Edit comment' ) . &quot;'&gt;&quot;. __( 'Edit' ) . '&lt;/a&gt;';
+                                $actions['quickedit'] = '&lt;a onclick=&quot;commentReply.open( \''.$comment-&gt;comment_ID.'\',\''.$post-&gt;ID.'\',\'edit\' );return false;&quot; class=&quot;vim-q&quot; title=&quot;'.esc_attr__( 'Quick Edit' ).'&quot; href=&quot;#&quot;&gt;' . __( 'Quick&amp;nbsp;Edit' ) . '&lt;/a&gt;';
+                                if ( 'spam' != $the_comment_status )
+                                        $actions['reply'] = '&lt;a onclick=&quot;commentReply.open( \''.$comment-&gt;comment_ID.'\',\''.$post-&gt;ID.'\' );return false;&quot; class=&quot;vim-r&quot; title=&quot;'.esc_attr__( 'Reply to this comment' ).'&quot; href=&quot;#&quot;&gt;' . __( 'Reply' ) . '&lt;/a&gt;';
+                        }
+
+                        $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
+
+                        $i = 0;
+                        echo '&lt;div class=&quot;row-actions&quot;&gt;';
+                        foreach ( $actions as $action =&gt; $link ) {
+                                ++$i;
+                                ( ( ( 'approve' == $action || 'unapprove' == $action ) &amp;&amp; 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
+
+                                // Reply and quickedit need a hide-if-no-js span when not added with ajax
+                                if ( ( 'reply' == $action || 'quickedit' == $action ) &amp;&amp; ! $this-&gt;from_ajax )
+                                        $action .= ' hide-if-no-js';
+                                elseif ( ( $action == 'untrash' &amp;&amp; $the_comment_status == 'trash' ) || ( $action == 'unspam' &amp;&amp; $the_comment_status == 'spam' ) ) {
+                                        if ( '1' == get_comment_meta( $comment-&gt;comment_ID, '_wp_trash_meta_status', true ) )
+                                                $action .= ' approve';
+                                        else
+                                                $action .= ' unapprove';
+                                }
+
+                                echo &quot;&lt;span class='$action'&gt;$sep$link&lt;/span&gt;&quot;;
+                        }
+                        echo '&lt;/div&gt;';
+                }
+        }
+
+        function column_author( $comment ) {
+                global $comment_status;
+
+                $author_url = get_comment_author_url();
+                if ( 'http://' == $author_url )
+                        $author_url = '';
+                $author_url_display = preg_replace( '|http://(www\.)?|i', '', $author_url );
+                if ( strlen( $author_url_display ) &gt; 50 )
+                        $author_url_display = substr( $author_url_display, 0, 49 ) . '...';
+
+                echo &quot;&lt;strong&gt;&quot;; comment_author(); echo '&lt;/strong&gt;&lt;br /&gt;';
+                if ( !empty( $author_url ) )
+                        echo &quot;&lt;a title='$author_url' href='$author_url'&gt;$author_url_display&lt;/a&gt;&lt;br /&gt;&quot;;
+
+                if ( $this-&gt;user_can ) {
+                        if ( !empty( $comment-&gt;comment_author_email ) ) {
+                                comment_author_email_link();
+                                echo '&lt;br /&gt;';
+                        }
+                        echo '&lt;a href=&quot;edit-comments.php?s=';
+                        comment_author_IP();
+                        echo '&amp;amp;mode=detail';
+                        if ( 'spam' == $comment_status )
+                                echo '&amp;amp;comment_status=spam';
+                        echo '&quot;&gt;';
+                        comment_author_IP();
+                        echo '&lt;/a&gt;';
+                }
+        }
+
+        function column_date( $comment ) {
+                return get_comment_date( __( 'Y/m/d \a\t g:ia' ) );
+        }
+
+        function column_response( $comment ) {
+                global $post;
+
+                if ( isset( $this-&gt;pending_count[$post-&gt;ID] ) ) {
+                        $pending_comments = $this-&gt;pending_count[$post-&gt;ID];
+                } else {
+                        $_pending_count_temp = get_pending_comments_num( array( $post-&gt;ID ) );
+                        $pending_comments = $this-&gt;pending_count[$post-&gt;ID] = $_pending_count_temp[$post-&gt;ID];
+                }
+
+                if ( current_user_can( 'edit_post', $post-&gt;ID ) ) {
+                        $post_link = &quot;&lt;a href='&quot; . get_edit_post_link( $post-&gt;ID ) . &quot;'&gt;&quot;;
+                        $post_link .= get_the_title( $post-&gt;ID ) . '&lt;/a&gt;';
+                } else {
+                        $post_link = get_the_title( $post-&gt;ID );
+                }
+
+                echo '&lt;div class=&quot;response-links&quot;&gt;&lt;span class=&quot;post-com-count-wrapper&quot;&gt;';
+                echo $post_link . '&lt;br /&gt;';
+                $this-&gt;comments_bubble( $post-&gt;ID, $pending_comments );
+                echo '&lt;/span&gt; ';
+                echo &quot;&lt;a href='&quot; . get_permalink( $post-&gt;ID ) . &quot;'&gt;#&lt;/a&gt;&quot;;
+                echo '&lt;/div&gt;';
+                if ( 'attachment' == $post-&gt;post_type &amp;&amp; ( $thumb = wp_get_attachment_image( $post-&gt;ID, array( 80, 60 ), true ) ) )
+                        echo $thumb;
+        }
+
+        function column_default( $comment, $column_name ) {
+                do_action( 'manage_comments_custom_column', $column_name, $comment-&gt;comment_ID );
+        }
+}
</ins></span></pre></div>
<a id="trunkwpadminincludeslisttablelinksphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-links.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-links.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-links.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,196 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Links_Table extends WP_List_Table {
+
+        function WP_Links_Table() {
+                parent::WP_List_Table( array(
+                        'screen' =&gt; 'link-manager',
+                        'plural' =&gt; 'bookmarks',
+                ) );
+        }
+
+        function check_permissions() {
+                if ( ! current_user_can( 'manage_links' ) )
+                        wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
+        }
+
+        function prepare_items() {
+                global $cat_id, $s, $orderby, $order;
+
+                wp_reset_vars( array( 'action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'orderby', 'order', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]', 's' ) );
+
+                $args = array( 'hide_invisible' =&gt; 0, 'hide_empty' =&gt; 0 );
+
+                if ( 'all' != $cat_id )
+                        $args['category'] = $cat_id;
+                if ( !empty( $s ) )
+                        $args['search'] = $s;
+                if ( !empty( $orderby ) )
+                        $args['orderby'] = $orderby;
+                if ( !empty( $order ) )
+                        $args['order'] = $order;
+
+                $this-&gt;items = get_bookmarks( $args );
+        }
+
+        function no_items() {
+                _e( 'No links found.' );
+        }
+
+        function get_bulk_actions() {
+                $actions = array();
+                $actions['delete'] = __( 'Delete' );
+
+                return $actions;
+        }
+
+        function extra_tablenav( $which ) {
+                global $cat_id;
+
+                if ( 'top' != $which )
+                        return;
+?&gt;
+                &lt;div class=&quot;alignleft actions&quot;&gt;
+&lt;?php
+                        $dropdown_options = array(
+                                'selected' =&gt; $cat_id,
+                                'name' =&gt; 'cat_id',
+                                'taxonomy' =&gt; 'link_category',
+                                'show_option_all' =&gt; __( 'View all categories' ),
+                                'hide_empty' =&gt; true,
+                                'hierarchical' =&gt; 1,
+                                'show_count' =&gt; 0,
+                                'orderby' =&gt; 'name',
+                        );
+                        wp_dropdown_categories( $dropdown_options );
+?&gt;
+                        &lt;input type=&quot;submit&quot; id=&quot;post-query-submit&quot; value=&quot;&lt;?php esc_attr_e( 'Filter' ); ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
+                &lt;/div&gt;
+&lt;?php
+        }
+
+        function get_columns() {
+                return array(
+                        'cb'         =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
+                        'name'       =&gt; __( 'Name' ),
+                        'url'        =&gt; __( 'URL' ),
+                        'categories' =&gt; __( 'Categories' ),
+                        'rel'        =&gt; __( 'Relationship' ),
+                        'visible'    =&gt; __( 'Visible' ),
+                        'rating'     =&gt; __( 'Rating' )
+                );
+        }
+
+        function get_sortable_columns() {
+                return array(
+                        'name'    =&gt; 'name',
+                        'url'     =&gt; 'url',
+                        'visible' =&gt; 'visible',
+                        'rating'  =&gt; 'rating'
+                );
+        }
+
+        function display_rows() {
+                global $cat_id;
+
+                $alt = 0;
+
+                foreach ( $this-&gt;items as $link ) {
+                        $link = sanitize_bookmark( $link );
+                        $link-&gt;link_name = esc_attr( $link-&gt;link_name );
+                        $link-&gt;link_category = wp_get_link_cats( $link-&gt;link_id );
+
+                        $short_url = str_replace( 'http://', '', $link-&gt;link_url );
+                        $short_url = preg_replace( '/^www\./i', '', $short_url );
+                        if ( '/' == substr( $short_url, -1 ) )
+                                $short_url = substr( $short_url, 0, -1 );
+                        if ( strlen( $short_url ) &gt; 35 )
+                                $short_url = substr( $short_url, 0, 32 ).'...';
+
+                        $visible = ( $link-&gt;link_visible == 'Y' ) ? __( 'Yes' ) : __( 'No' );
+                        $rating  = $link-&gt;link_rating;
+                        $style = ( $alt++ % 2 ) ? '' : ' class=&quot;alternate&quot;';
+
+                        $edit_link = get_edit_bookmark_link( $link );
+?&gt;
+                &lt;tr id=&quot;link-&lt;?php echo $link-&gt;link_id; ?&gt;&quot; valign=&quot;middle&quot; &lt;?php echo $style; ?&gt;&gt;
+&lt;?php
+
+                        list( $columns, $hidden ) = $this-&gt;get_column_info();
+
+                        foreach ( $columns as $column_name =&gt; $column_display_name ) {
+                                $class = &quot;class='column-$column_name'&quot;;
+
+                                $style = '';
+                                if ( in_array( $column_name, $hidden ) )
+                                        $style = ' style=&quot;display:none;&quot;';
+
+                                $attributes = $class . $style;
+
+                                switch ( $column_name ) {
+                                        case 'cb':
+                                                echo '&lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;linkcheck[]&quot; value=&quot;'. esc_attr( $link-&gt;link_id ) .'&quot; /&gt;&lt;/th&gt;';
+                                                break;
+
+                                        case 'name':
+                                                echo &quot;&lt;td $attributes&gt;&lt;strong&gt;&lt;a class='row-title' href='$edit_link' title='&quot; . esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $link-&gt;link_name ) ) . &quot;'&gt;$link-&gt;link_name&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&quot;;
+
+                                                $actions = array();
+                                                $actions['edit'] = '&lt;a href=&quot;' . $edit_link . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
+                                                $actions['delete'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;link.php?action=delete&amp;amp;link_id=$link-&gt;link_id&quot;, 'delete-bookmark_' . $link-&gt;link_id ) . &quot;' onclick=\&quot;if ( confirm( '&quot; . esc_js( sprintf( __( &quot;You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete.&quot; ), $link-&gt;link_name ) ) . &quot;' ) ) { return true;}return false;\&quot;&gt;&quot; . __( 'Delete' ) . &quot;&lt;/a&gt;&quot;;
+                                                echo $this-&gt;row_actions( $actions );
+
+                                                echo '&lt;/td&gt;';
+                                                break;
+                                        case 'url':
+                                                echo &quot;&lt;td $attributes&gt;&lt;a href='$link-&gt;link_url' title='&quot;.sprintf( __( 'Visit %s' ), $link-&gt;link_name ).&quot;'&gt;$short_url&lt;/a&gt;&lt;/td&gt;&quot;;
+                                                break;
+                                        case 'categories':
+                                                ?&gt;&lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php
+                                                $cat_names = array();
+                                                foreach ( $link-&gt;link_category as $category ) {
+                                                        $cat = get_term( $category, 'link_category', OBJECT, 'display' );
+                                                        if ( is_wp_error( $cat ) )
+                                                                echo $cat-&gt;get_error_message();
+                                                        $cat_name = $cat-&gt;name;
+                                                        if ( $cat_id != $category )
+                                                                $cat_name = &quot;&lt;a href='link-manager.php?cat_id=$category'&gt;$cat_name&lt;/a&gt;&quot;;
+                                                        $cat_names[] = $cat_name;
+                                                }
+                                                echo implode( ', ', $cat_names );
+                                                ?&gt;&lt;/td&gt;&lt;?php
+                                                break;
+                                        case 'rel':
+                                                ?&gt;&lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo empty( $link-&gt;link_rel ) ? '&lt;br /&gt;' : $link-&gt;link_rel; ?&gt;&lt;/td&gt;&lt;?php
+                                                break;
+                                        case 'visible':
+                                                ?&gt;&lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo $visible; ?&gt;&lt;/td&gt;&lt;?php
+                                                break;
+                                        case 'rating':
+                                                 ?&gt;&lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo $rating; ?&gt;&lt;/td&gt;&lt;?php
+                                                break;
+                                        default:
+                                                ?&gt;
+                                                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php do_action( 'manage_link_custom_column', $column_name, $link-&gt;link_id ); ?&gt;&lt;/td&gt;
+                                                &lt;?php
+                                                break;
+                                }
+                        }
+?&gt;
+                &lt;/tr&gt;
+&lt;?php
+                }
+        }
+}
+
+?&gt;
+
</ins></span></pre></div>
<a id="trunkwpadminincludeslisttablemediaphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-media.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-media.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-media.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,452 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Media_Table extends WP_List_Table {
+
+        function WP_Media_Table() {
+                global $detached;
+
+                $detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] );
+
+                parent::WP_List_Table( array(
+                        'screen' =&gt; $detached ? 'upload-detached' : 'upload',
+                        'plural' =&gt; 'media'
+                ) );
+        }
+
+        function check_permissions() {
+                if ( !current_user_can('upload_files') )
+                        wp_die( __( 'You do not have permission to upload files.' ) );
+        }
+
+        function prepare_items() {
+                global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types;
+
+                $q = $_REQUEST;
+
+                if ( !empty( $lost ) )
+                        $q['post__in'] = implode( ',', $lost );
+
+                list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $q );
+
+                 $this-&gt;is_trash = isset( $_REQUEST['status'] ) &amp;&amp; 'trash' == $_REQUEST['status'];
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; $wp_query-&gt;found_posts,
+                        'total_pages' =&gt; $wp_query-&gt;max_num_pages,
+                        'per_page' =&gt; $wp_query-&gt;query_vars['posts_per_page'],
+                ) );
+        }
+
+        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;
+        }
+
+        function get_bulk_actions() {
+                global $detached;
+
+                $actions = array();
+                $actions['delete'] = __( 'Delete Permanently' );
+                if ( $detached )
+                        $actions['attach'] = __( 'Attach to a post' );
+
+                return $actions;
+        }
+
+        function extra_tablenav( $which ) {
+                global $post_type, $detached;
+?&gt;
+                &lt;div class=&quot;alignleft actions&quot;&gt;
+&lt;?php
+                if ( 'top' == $which &amp;&amp; !is_singular() &amp;&amp; !$detached &amp;&amp; !$this-&gt;is_trash ) {
+                        $this-&gt;months_dropdown( $post_type );
+
+                        do_action( 'restrict_manage_posts' );
+?&gt;
+                        &lt;input type=&quot;submit&quot; id=&quot;post-query-submit&quot; value=&quot;&lt;?php esc_attr_e( 'Filter' ); ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
+&lt;?php
+                }
+
+                if ( $detached ) { ?&gt;
+                        &lt;input type=&quot;submit&quot; id=&quot;find_detached&quot; name=&quot;find_detached&quot; value=&quot;&lt;?php esc_attr_e( 'Scan for lost attachments' ); ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
+                &lt;?php } elseif ( $this-&gt;is_trash &amp;&amp; current_user_can( 'edit_others_posts' ) ) { ?&gt;
+                        &lt;input type=&quot;submit&quot; id=&quot;delete_all&quot; name=&quot;delete_all&quot; value=&quot;&lt;?php esc_attr_e( 'Empty Trash' ); ?&gt;&quot; class=&quot;button-secondary apply&quot; /&gt;
+                &lt;?php } ?&gt;
+                &lt;/div&gt;
+&lt;?php
+        }
+
+        function current_action() {
+                if ( isset( $_REQUEST['find_detached'] ) )
+                        return 'find_detached';
+
+                if ( isset( $_REQUEST['found_post_id'] ) &amp;&amp; isset( $_REQUEST['media'] ) )
+                        return 'attach';
+
+                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
+                        return 'delete_all';
+
+                return parent::current_action();
+        }
+
+        function has_items() {
+                return have_posts();
+        }
+
+        function no_items() {
+                _e( 'No media attachments found.' );
+        }
+
+        function get_columns() {
+                $posts_columns = array();
+                $posts_columns['cb'] = '&lt;input type=&quot;checkbox&quot; /&gt;';
+                $posts_columns['icon'] = '';
+                /* translators: column name */
+                $posts_columns['title'] = _x( 'File', 'column name' );
+                $posts_columns['author'] = __( 'Author' );
+                //$posts_columns['tags'] = _x( 'Tags', 'column name' );
+                /* translators: column name */
+                if ( 'upload' == $this-&gt;_screen-&gt;id ) {
+                        $posts_columns['parent'] = _x( 'Attached to', 'column name' );
+                        $posts_columns['comments'] = '&lt;div class=&quot;vers&quot;&gt;&lt;img alt=&quot;Comments&quot; src=&quot;' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '&quot; /&gt;&lt;/div&gt;';
+                }
+                /* translators: column name */
+                $posts_columns['date'] = _x( 'Date', 'column name' );
+                $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, 'upload' != $this-&gt;_screen-&gt;id );
+
+                return $posts_columns;
+        }
+
+        function get_sortable_columns() {
+                return array(
+                        'title'    =&gt; 'title',
+                        'author'   =&gt; 'author',
+                        'parent'   =&gt; 'parent',
+                        'comments' =&gt; 'comment_count',
+                        'date'     =&gt; 'date',
+                );
+        }
+
+        function display_rows() {
+                global $detached, $post, $id;
+
+                if ( $detached ) {
+                        $this-&gt;display_orphans();
+                        return;
+                }
+
+                add_filter( 'the_title','esc_html' );
+                $alt = '';
+
+                while ( have_posts() ) : the_post();
+
+                        if ( $this-&gt;is_trash &amp;&amp; $post-&gt;post_status != 'trash'
+                        ||  !$this-&gt;is_trash &amp;&amp; $post-&gt;post_status == 'trash' )
+                                continue;
+
+                        $alt = ( 'alternate' == $alt ) ? '' : 'alternate';
+                        $post_owner = ( get_current_user_id() == $post-&gt;post_author ) ? 'self' : 'other';
+                        $att_title = _draft_or_post_title();
+?&gt;
+        &lt;tr id='post-&lt;?php echo $id; ?&gt;' class='&lt;?php echo trim( $alt . ' author-' . $post_owner . ' status-' . $post-&gt;post_status ); ?&gt;' valign=&quot;top&quot;&gt;
+&lt;?php
+
+list( $columns, $hidden ) = $this-&gt;get_column_info();
+foreach ( $columns as $column_name =&gt; $column_display_name ) {
+        $class = &quot;class='$column_name column-$column_name'&quot;;
+
+        $style = '';
+        if ( in_array( $column_name, $hidden ) )
+                $style = ' style=&quot;display:none;&quot;';
+
+        $attributes = $class . $style;
+
+        switch ( $column_name ) {
+
+        case 'cb':
+?&gt;
+                &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;&lt;?php if ( current_user_can( 'edit_post', $post-&gt;ID ) ) { ?&gt;&lt;input type=&quot;checkbox&quot; name=&quot;media[]&quot; value=&quot;&lt;?php the_ID(); ?&gt;&quot; /&gt;&lt;?php } ?&gt;&lt;/th&gt;
+&lt;?php
+                break;
+
+        case 'icon':
+                $attributes = 'class=&quot;column-icon media-icon&quot;' . $style;
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php
+                        if ( $thumb = wp_get_attachment_image( $post-&gt;ID, array( 80, 60 ), true ) ) {
+                                if ( $this-&gt;is_trash ) {
+                                        echo $thumb;
+                                } else {
+?&gt;
+                                &lt;a href=&quot;&lt;?php echo get_edit_post_link( $post-&gt;ID, true ); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $att_title ) ); ?&gt;&quot;&gt;
+                                        &lt;?php echo $thumb; ?&gt;
+                                &lt;/a&gt;
+
+&lt;?php                        }
+                        }
+?&gt;
+                &lt;/td&gt;
+&lt;?php
+                break;
+
+        case 'title':
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;strong&gt;&lt;?php if ( $this-&gt;is_trash ) echo $att_title; else { ?&gt;&lt;a href=&quot;&lt;?php echo get_edit_post_link( $post-&gt;ID, true ); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $att_title ) ); ?&gt;&quot;&gt;&lt;?php echo $att_title; ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/strong&gt;
+                        &lt;p&gt;
+&lt;?php
+                        if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post-&gt;ID ), $matches ) )
+                                echo esc_html( strtoupper( $matches[1] ) );
+                        else
+                                echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) );
+?&gt;
+                        &lt;/p&gt;
+&lt;?php
+                $actions = array();
+                if ( current_user_can( 'edit_post', $post-&gt;ID ) &amp;&amp; !$this-&gt;is_trash )
+                        $actions['edit'] = '&lt;a href=&quot;' . get_edit_post_link( $post-&gt;ID, true ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
+                if ( current_user_can( 'delete_post', $post-&gt;ID ) ) {
+                        if ( $this-&gt;is_trash )
+                                $actions['untrash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=untrash&amp;amp;post=$post-&gt;ID&quot;, 'untrash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Restore' ) . &quot;&lt;/a&gt;&quot;;
+                        elseif ( EMPTY_TRASH_DAYS &amp;&amp; MEDIA_TRASH )
+                                $actions['trash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$post-&gt;ID&quot;, 'trash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
+                        if ( $this-&gt;is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) {
+                                $delete_ays = ( !$this-&gt;is_trash &amp;&amp; !MEDIA_TRASH ) ? &quot; onclick='return showNotice.warn();'&quot; : '';
+                                $actions['delete'] = &quot;&lt;a class='submitdelete'$delete_ays href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$post-&gt;ID&quot;, 'delete-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Delete Permanently' ) . &quot;&lt;/a&gt;&quot;;
+                        }
+                }
+                if ( !$this-&gt;is_trash ) {
+                        $title =_draft_or_post_title( $post-&gt;post_parent );
+                        $actions['view'] = '&lt;a href=&quot;' . get_permalink( $post-&gt;ID ) . '&quot; title=&quot;' . esc_attr( sprintf( __( 'View &amp;#8220;%s&amp;#8221;' ), $title ) ) . '&quot; rel=&quot;permalink&quot;&gt;' . __( 'View' ) . '&lt;/a&gt;';
+                }
+                $actions = apply_filters( 'media_row_actions', $actions, $post );
+                echo $this-&gt;row_actions( $actions );
+?&gt;
+                &lt;/td&gt;
+&lt;?php
+                break;
+
+        case 'author':
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php the_author() ?&gt;&lt;/td&gt;
+&lt;?php
+                break;
+
+        case 'tags':
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php
+                $tags = get_the_tags();
+                if ( !empty( $tags ) ) {
+                        $out = array();
+                        foreach ( $tags as $c )
+                                $out[] = &quot;&lt;a href='edit.php?tag=$c-&gt;slug'&gt; &quot; . esc_html( sanitize_term_field( 'name', $c-&gt;name, $c-&gt;term_id, 'post_tag', 'display' ) ) . &quot;&lt;/a&gt;&quot;;
+                        echo join( ', ', $out );
+                } else {
+                        _e( 'No Tags' );
+                }
+?&gt;
+                &lt;/td&gt;
+&lt;?php
+                break;
+
+        case 'desc':
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo has_excerpt() ? $post-&gt;post_excerpt : ''; ?&gt;&lt;/td&gt;
+&lt;?php
+                break;
+
+        case 'date':
+                if ( '0000-00-00 00:00:00' == $post-&gt;post_date &amp;&amp; 'date' == $column_name ) {
+                        $t_time = $h_time = __( 'Unpublished' );
+                } else {
+                        $t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
+                        $m_time = $post-&gt;post_date;
+                        $time = get_post_time( 'G', true, $post, false );
+                        if ( ( abs( $t_diff = time() - $time ) ) &lt; 86400 ) {
+                                if ( $t_diff &lt; 0 )
+                                        $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) );
+                                else
+                                        $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
+                        } else {
+                                $h_time = mysql2date( __( 'Y/m/d' ), $m_time );
+                        }
+                }
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php echo $h_time ?&gt;&lt;/td&gt;
+&lt;?php
+                break;
+
+        case 'parent':
+                if ( $post-&gt;post_parent &gt; 0 ) {
+                        if ( get_post( $post-&gt;post_parent ) ) {
+                                $title =_draft_or_post_title( $post-&gt;post_parent );
+                        }
+?&gt;
+                        &lt;td &lt;?php echo $attributes ?&gt;&gt;
+                                &lt;strong&gt;&lt;a href=&quot;&lt;?php echo get_edit_post_link( $post-&gt;post_parent ); ?&gt;&quot;&gt;&lt;?php echo $title ?&gt;&lt;/a&gt;&lt;/strong&gt;,
+                                &lt;?php echo get_the_time( __( 'Y/m/d' ) ); ?&gt;
+                        &lt;/td&gt;
+&lt;?php
+                } else {
+?&gt;
+                        &lt;td &lt;?php echo $attributes ?&gt;&gt;&lt;?php _e( '(Unattached)' ); ?&gt;&lt;br /&gt;
+                        &lt;a class=&quot;hide-if-no-js&quot; onclick=&quot;findPosts.open( 'media[]','&lt;?php echo $post-&gt;ID ?&gt;' );return false;&quot; href=&quot;#the-list&quot;&gt;&lt;?php _e( 'Attach' ); ?&gt;&lt;/a&gt;&lt;/td&gt;
+&lt;?php
+                }
+                break;
+
+        case 'comments':
+                $attributes = 'class=&quot;comments column-comments num&quot;' . $style;
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;
+                        &lt;div class=&quot;post-com-count-wrapper&quot;&gt;
+&lt;?php
+                $pending_comments = get_pending_comments_num( $post-&gt;ID );
+
+                $this-&gt;comments_bubble( $post-&gt;ID, $pending_comments );
+?&gt;
+                        &lt;/div&gt;
+                &lt;/td&gt;
+&lt;?php
+                break;
+
+        case 'actions':
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;
+                        &lt;a href=&quot;media.php?action=edit&amp;amp;attachment_id=&lt;?php the_ID(); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $att_title ) ); ?&gt;&quot;&gt;&lt;?php _e( 'Edit' ); ?&gt;&lt;/a&gt; |
+                        &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php _e( 'Get permalink' ); ?&gt;&lt;/a&gt;
+                &lt;/td&gt;
+                &lt;?php
+                break;
+
+        default:
+?&gt;
+                &lt;td &lt;?php echo $attributes ?&gt;&gt;
+                        &lt;?php do_action( 'manage_media_custom_column', $column_name, $id ); ?&gt;
+                &lt;/td&gt;
+&lt;?php
+                break;
+        }
+}
+?&gt;
+        &lt;/tr&gt;
+&lt;?php endwhile;
+        }
+
+        function display_orphans() {
+                global $post;
+
+                $class = '';
+
+                while ( have_posts() ) : the_post();
+
+                        $class = ( 'alternate' == $class ) ? '' : 'alternate';
+                        $att_title = esc_html( _draft_or_post_title( $post-&gt;ID ) );
+
+                        $edit_link = '&lt;a href=&quot;' . get_edit_post_link( $post-&gt;ID ) . '&quot; title=&quot;' . esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $att_title ) ) . '&quot;&gt;%s&lt;/a&gt;';
+?&gt;
+        &lt;tr id='post-&lt;?php echo $post-&gt;ID; ?&gt;' class='&lt;?php echo $class; ?&gt;' valign=&quot;top&quot;&gt;
+                &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;
+                &lt;?php if ( current_user_can( 'edit_post', $post-&gt;ID ) ) { ?&gt;
+                        &lt;input type=&quot;checkbox&quot; name=&quot;media[]&quot; value=&quot;&lt;?php echo esc_attr( $post-&gt;ID ); ?&gt;&quot; /&gt;
+                &lt;?php } ?&gt;
+                &lt;/th&gt;
+
+                &lt;td class=&quot;media-icon&quot;&gt;
+                &lt;?php if ( $thumb = wp_get_attachment_image( $post-&gt;ID, array( 80, 60 ), true ) ) {
+                        printf( $edit_link, $thumb );
+                } ?&gt;
+                &lt;/td&gt;
+
+                &lt;td class=&quot;media column-media&quot;&gt;
+                        &lt;strong&gt;&lt;?php printf( $edit_link, $att_title ); ?&gt;&lt;/strong&gt;&lt;br /&gt;
+&lt;?php
+                        if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post-&gt;ID ), $matches ) )
+                                echo esc_html( strtoupper( $matches[1] ) );
+                        else
+                                echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) );
+?&gt;
+&lt;?php
+                        $actions = array();
+                        if ( current_user_can( 'edit_post', $post-&gt;ID ) )
+                                $actions['edit'] = '&lt;a href=&quot;' . get_edit_post_link( $post-&gt;ID, true ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
+                        if ( current_user_can( 'delete_post', $post-&gt;ID ) )
+                                if ( EMPTY_TRASH_DAYS &amp;&amp; MEDIA_TRASH ) {
+                                        $actions['trash'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;post.php?action=trash&amp;amp;post=$post-&gt;ID&quot;, 'trash-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Trash' ) . &quot;&lt;/a&gt;&quot;;
+                                } else {
+                                        $delete_ays = !MEDIA_TRASH ? &quot; onclick='return showNotice.warn();'&quot; : '';
+                                        $actions['delete'] = &quot;&lt;a class='submitdelete'$delete_ays href='&quot; . wp_nonce_url( &quot;post.php?action=delete&amp;amp;post=$post-&gt;ID&quot;, 'delete-attachment_' . $post-&gt;ID ) . &quot;'&gt;&quot; . __( 'Delete Permanently' ) . &quot;&lt;/a&gt;&quot;;
+                                }
+                        $actions['view'] = '&lt;a href=&quot;' . get_permalink( $post-&gt;ID ) . '&quot; title=&quot;' . esc_attr( sprintf( __( 'View &amp;#8220;%s&amp;#8221;' ), $att_title ) ) . '&quot; rel=&quot;permalink&quot;&gt;' . __( 'View' ) . '&lt;/a&gt;';
+                        if ( current_user_can( 'edit_post', $post-&gt;ID ) )
+                                $actions['attach'] = '&lt;a href=&quot;#the-list&quot; onclick=&quot;findPosts.open( \'media[]\',\''.$post-&gt;ID.'\' );return false;&quot; class=&quot;hide-if-no-js&quot;&gt;'.__( 'Attach' ).'&lt;/a&gt;';
+                        $actions = apply_filters( 'media_row_actions', $actions, $post );
+
+                        echo $this-&gt;row_actions( $actions );
+?&gt;
+                &lt;/td&gt;
+                &lt;td class=&quot;author column-author&quot;&gt;
+                        &lt;?php $author = get_userdata( $post-&gt;post_author ); echo $author-&gt;display_name; ?&gt;
+                &lt;/td&gt;
+&lt;?php
+                if ( '0000-00-00 00:00:00' == $post-&gt;post_date &amp;&amp; 'date' == $column_name ) {
+                        $t_time = $h_time = __( 'Unpublished' );
+                } else {
+                        $t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
+                        $m_time = $post-&gt;post_date;
+                        $time = get_post_time( 'G', true );
+                        if ( ( abs( $t_diff = time() - $time ) ) &lt; 86400 ) {
+                                if ( $t_diff &lt; 0 )
+                                        $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) );
+                                else
+                                        $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
+                        } else {
+                                $h_time = mysql2date( __( 'Y/m/d' ), $m_time );
+                        }
+                }
+?&gt;
+                &lt;td class=&quot;date column-date&quot;&gt;&lt;?php echo $h_time ?&gt;&lt;/td&gt;
+        &lt;/tr&gt;
+&lt;?php
+                endwhile;
+        }
+}
+
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminincludeslisttablemsusersphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-ms-users.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-ms-users.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-ms-users.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,231 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_MS_Users_Table extends WP_List_Table {
+
+        function WP_MS_Users_Table() {
+                parent::WP_List_Table( array(
+                        'screen' =&gt; 'users-network',
+                ) );
+        }
+
+        function check_permissions() {
+                if ( !is_multisite() )
+                        wp_die( __( 'Multisite support is not enabled.' ) );
+
+                if ( ! current_user_can( 'manage_network_users' ) )
+                        wp_die( __( 'You do not have permission to access this page.' ) );
+        }
+
+        function prepare_items() {
+                global $usersearch;
+
+                $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
+
+                $users_per_page = $this-&gt;get_items_per_page( 'users_network_per_page' );
+
+                $paged = $this-&gt;get_pagenum();
+
+                $args = array(
+                        'number' =&gt; $users_per_page,
+                        'offset' =&gt; ( $paged-1 ) * $users_per_page,
+                        'search' =&gt; $usersearch,
+                        'blog_id' =&gt; 0
+                );
+
+                if ( isset( $_REQUEST['orderby'] ) )
+                        $args['orderby'] = $_REQUEST['orderby'];
+
+                if ( isset( $_REQUEST['order'] ) )
+                        $args['order'] = $_REQUEST['order'];
+
+                // Query the user IDs for this page
+                $wp_user_search = new WP_User_Query( $args );
+
+                $this-&gt;items = $wp_user_search-&gt;get_results();
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; $wp_user_search-&gt;get_total(),
+                        'per_page' =&gt; $users_per_page,
+                ) );
+        }
+
+        function get_bulk_actions() {
+                $actions = array();
+                $actions['delete'] = __( 'Delete' );
+                $actions['spam'] = _x( 'Mark as Spam', 'user' );
+                $actions['notspam'] = _x( 'Not Spam', 'user' );
+
+                return $actions;
+        }
+
+        function no_items() {
+                _e( 'No users found.' );
+        }
+
+        function pagination( $which ) {
+                global $mode;
+
+                parent::pagination ( $which );
+
+                if ( 'top' == $which )
+                        $this-&gt;view_switcher( $mode );
+        }
+
+        function get_columns() {
+                $users_columns = array(
+                        'cb'         =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
+                        'login'      =&gt; __( 'Login' ),
+                        'name'       =&gt; __( 'Name' ),
+                        'email'      =&gt; __( 'E-mail' ),
+                        'registered' =&gt; _x( 'Registered', 'user' ),
+                        'blogs'      =&gt; __( 'Sites' )
+                );
+                $users_columns = apply_filters( 'wpmu_users_columns', $users_columns );
+
+                return $users_columns;
+        }
+
+        function get_sortable_columns() {
+                return array(
+                        'id'         =&gt; 'id',
+                        'login'      =&gt; 'login',
+                        'name'       =&gt; 'name',
+                        'email'      =&gt; 'email',
+                        'registered' =&gt; 'registered',
+                );
+        }
+
+        function display_rows() {
+                global $current_site, $mode;
+
+                $class = '';
+                $super_admins = get_super_admins();
+                foreach ( $this-&gt;items as $user ) {
+                        $class = ( 'alternate' == $class ) ? '' : 'alternate';
+
+                        $status_list = array( 'spam' =&gt; 'site-spammed', 'deleted' =&gt; 'site-deleted' );
+
+                        foreach ( $status_list as $status =&gt; $col ) {
+                                if ( $user-&gt;$status )
+                                        $class = $col;
+                        }
+
+                        ?&gt;
+                        &lt;tr class=&quot;&lt;?php echo $class; ?&gt;&quot;&gt;
+                        &lt;?php
+
+                        list( $columns, $hidden ) = $this-&gt;get_column_info();
+
+                        foreach ( $columns as $column_name =&gt; $column_display_name ) :
+                                switch ( $column_name ) {
+                                        case 'cb': ?&gt;
+                                                &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;
+                                                        &lt;input type=&quot;checkbox&quot; id=&quot;blog_&lt;?php echo $user-&gt;ID ?&gt;&quot; name=&quot;allusers[]&quot; value=&quot;&lt;?php echo esc_attr( $user-&gt;ID ) ?&gt;&quot; /&gt;
+                                                &lt;/th&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'id': ?&gt;
+                                                &lt;th valign=&quot;top&quot; scope=&quot;row&quot;&gt;
+                                                        &lt;?php echo $user-&gt;ID ?&gt;
+                                                &lt;/th&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'login':
+                                                $avatar        = get_avatar( $user-&gt;user_email, 32 );
+                                                $edit_link = ( get_current_user_id() == $user-&gt;ID ) ? 'profile.php' : 'user-edit.php?user_id=' . $user-&gt;ID;
+                                                ?&gt;
+                                                &lt;td class=&quot;username column-username&quot;&gt;
+                                                        &lt;?php echo $avatar; ?&gt;&lt;strong&gt;&lt;a href=&quot;&lt;?php echo esc_url( self_admin_url( $edit_link ) ); ?&gt;&quot; class=&quot;edit&quot;&gt;&lt;?php echo stripslashes( $user-&gt;user_login ); ?&gt;&lt;/a&gt;&lt;?php
+                                                        if ( in_array( $user-&gt;user_login, $super_admins ) )
+                                                                echo ' - ' . __( 'Super admin' );
+                                                        ?&gt;&lt;/strong&gt;
+                                                        &lt;br/&gt;
+                                                        &lt;?php
+                                                                $actions = array();
+                                                                $actions['edit'] = '&lt;a href=&quot;' . esc_url( self_admin_url( $edit_link ) ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
+
+                                                                if ( ! in_array( $user-&gt;user_login, $super_admins ) ) {
+                                                                        $actions['delete'] = '&lt;a href=&quot;' . $delete = esc_url( network_admin_url( add_query_arg( '_wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'edit.php', 'deleteuser' ) . '&amp;amp;action=deleteuser&amp;amp;id=' . $user-&gt;ID ) ) ) . '&quot; class=&quot;delete&quot;&gt;' . __( 'Delete' ) . '&lt;/a&gt;';
+                                                                }
+
+                                                                echo $this-&gt;row_actions( $actions );
+                                                        ?&gt;
+                                                        &lt;/div&gt;
+                                                &lt;/td&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'name': ?&gt;
+                                                &lt;td class=&quot;name column-name&quot;&gt;&lt;?php echo $user-&gt;display_name ?&gt;&lt;/td&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'email': ?&gt;
+                                                &lt;td class=&quot;email column-email&quot;&gt;&lt;a href=&quot;mailto:&lt;?php echo $user-&gt;user_email ?&gt;&quot;&gt;&lt;?php echo $user-&gt;user_email ?&gt;&lt;/a&gt;&lt;/td&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'registered':
+                                                if ( 'list' == $mode )
+                                                        $date = 'Y/m/d';
+                                                else
+                                                        $date = 'Y/m/d \&lt;\b\r \/\&gt; g:i:s a';
+                                        ?&gt;
+                                                &lt;td&gt;&lt;?php echo mysql2date( $date, $user-&gt;user_registered ); ?&gt;&lt;/td&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'blogs':
+                                                $blogs = get_blogs_of_user( $user-&gt;ID, true );
+                                                ?&gt;
+                                                &lt;td&gt;
+                                                        &lt;?php
+                                                        if ( is_array( $blogs ) ) {
+                                                                foreach ( (array) $blogs as $key =&gt; $val ) {
+                                                                        $path        = ( $val-&gt;path == '/' ) ? '' : $val-&gt;path;
+                                                                        echo '&lt;a href=&quot;'. esc_url( network_admin_url( 'site-info.php?id=' . $val-&gt;userblog_id ) ) .'&quot;&gt;' . str_replace( '.' . $current_site-&gt;domain, '', $val-&gt;domain . $path ) . '&lt;/a&gt;';
+                                                                        echo ' &lt;small class=&quot;row-actions&quot;&gt;';
+
+                                                                        // Edit
+                                                                        echo '&lt;a href=&quot;'. esc_url( network_admin_url( 'site-info.php?id=' . $val-&gt;userblog_id ) ) .'&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt; | ';
+
+                                                                        // View
+                                                                        echo '&lt;a ';
+                                                                        if ( get_blog_status( $val-&gt;userblog_id, 'spam' ) == 1 )
+                                                                                echo 'style=&quot;background-color: #faa&quot; ';
+                                                                        echo 'href=&quot;' .  esc_url( get_home_url( $val-&gt;userblog_id ) )  . '&quot;&gt;' . __( 'View' ) . '&lt;/a&gt;';
+
+                                                                        echo '&lt;/small&gt;&lt;br /&gt;';
+                                                                }
+                                                        }
+                                                        ?&gt;
+                                                &lt;/td&gt;
+                                        &lt;?php
+                                        break;
+
+                                        default: ?&gt;
+                                                &lt;td&gt;&lt;?php do_action( 'manage_users_custom_column', $column_name, $user-&gt;ID ); ?&gt;&lt;/td&gt;
+                                        &lt;?php
+                                        break;
+                                }
+                        endforeach
+                        ?&gt;
+                        &lt;/tr&gt;
+                        &lt;?php
+                }
+        }
+}
+
+?&gt;
+
</ins></span></pre></div>
<a id="trunkwpadminincludeslisttableplugininstallphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-plugin-install.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-plugin-install.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-plugin-install.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,237 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Plugin_Install_Table extends WP_List_Table {
+
+        function WP_Plugin_Install_Table() {
+                parent::WP_List_Table( array(
+                        'screen' =&gt; 'plugin-install',
+                ) );
+        }
+
+        function check_permissions() {
+                if ( ! current_user_can('install_plugins') )
+                        wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
+        }
+
+        function prepare_items() {
+                include( ABSPATH . 'wp-admin/includes/plugin-install.php' );
+
+                global $tabs, $tab, $paged, $type, $term;
+
+                wp_reset_vars( array( 'tab' ) );
+
+                $paged = $this-&gt;get_pagenum();
+
+                $per_page = 30;
+
+                // These are the tabs which are shown on the page
+                $tabs = array();
+                $tabs['dashboard'] = __( 'Search' );
+                if ( 'search' == $tab )
+                        $tabs['search']        = __( 'Search Results' );
+                $tabs['upload'] = __( 'Upload' );
+                $tabs['featured'] = _x( 'Featured','Plugin Installer' );
+                $tabs['popular']  = _x( 'Popular','Plugin Installer' );
+                $tabs['new']      = _x( 'Newest','Plugin Installer' );
+                $tabs['updated']  = _x( 'Recently Updated','Plugin Installer' );
+
+                $nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item.
+
+                $tabs = apply_filters( 'install_plugins_tabs', $tabs );
+                $nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs );
+
+                // If a non-valid menu tab has been selected, And its not a non-menu action.
+                if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) &amp;&amp; !in_array( $tab, (array) $nonmenu_tabs ) ) )
+                        $tab = key( $tabs );
+
+                $args = array( 'page' =&gt; $paged, 'per_page' =&gt; $per_page );
+
+                switch ( $tab ) {
+                        case 'search':
+                                $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : '';
+                                $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
+
+                                switch ( $type ) {
+                                        case 'tag':
+                                                $args['tag'] = sanitize_title_with_dashes( $term );
+                                                break;
+                                        case 'term':
+                                                $args['search'] = $term;
+                                                break;
+                                        case 'author':
+                                                $args['author'] = $term;
+                                                break;
+                                }
+
+                                add_action( 'install_plugins_table_header', 'install_search_form' );
+                                break;
+
+                        case 'featured':
+                        case 'popular':
+                        case 'new':
+                        case 'updated':
+                                $args['browse'] = $tab;
+                                break;
+
+                        default:
+                                $args = false;
+                }
+
+                if ( !$args )
+                        return;
+
+                $api = plugins_api( 'query_plugins', $args );
+
+                if ( is_wp_error( $api ) )
+                        wp_die( $api-&gt;get_error_message() . '&lt;/p&gt; &lt;p class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;document.location.reload(); return false;&quot;&gt;' . __( 'Try again' ) . '&lt;/a&gt;' );
+
+                $this-&gt;items = $api-&gt;plugins;
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; $api-&gt;info['results'],
+                        'per_page' =&gt; $per_page,
+                ) );
+        }
+
+        function no_items() {
+                _e( 'No plugins match your request.' );
+        }
+
+        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;
+        }
+
+        function display_tablenav( $which ) {
+                if ( 'top' ==  $which ) { ?&gt;
+                        &lt;div class=&quot;tablenav&quot;&gt;
+                                &lt;div class=&quot;alignleft actions&quot;&gt;
+                                        &lt;?php do_action( 'install_plugins_table_header' ); ?&gt;
+                                &lt;/div&gt;
+                                &lt;?php $this-&gt;pagination( $which ); ?&gt;
+                                &lt;br class=&quot;clear&quot; /&gt;
+                        &lt;/div&gt;
+                &lt;?php } else { ?&gt;
+                        &lt;div class=&quot;tablenav&quot;&gt;
+                                &lt;?php $this-&gt;pagination( $which ); ?&gt;
+                                &lt;br class=&quot;clear&quot; /&gt;
+                        &lt;/div&gt;
+                &lt;?php
+                }
+        }
+
+        function get_table_classes() {
+                extract( $this-&gt;_args );
+
+                return array( 'widefat', $plural );
+        }
+
+        function get_columns() {
+                return array(
+                        'name'        =&gt; __( 'Name' ),
+                        'version'     =&gt; __( 'Version' ),
+                        'rating'      =&gt; __( 'Rating' ),
+                        'description' =&gt; __( 'Description' ),
+                );
+        }
+
+        function display_rows() {
+                $plugins_allowedtags = array(
+                        'a' =&gt; array( 'href' =&gt; array(),'title' =&gt; array(), 'target' =&gt; array() ),
+                        'abbr' =&gt; array( 'title' =&gt; array() ),'acronym' =&gt; array( 'title' =&gt; array() ),
+                        'code' =&gt; array(), 'pre' =&gt; array(), 'em' =&gt; array(),'strong' =&gt; array(),
+                        'ul' =&gt; array(), 'ol' =&gt; array(), 'li' =&gt; array(), 'p' =&gt; array(), 'br' =&gt; array()
+                );
+
+                foreach ( (array) $this-&gt;items as $plugin ) {
+                        if ( is_object( $plugin ) )
+                                $plugin = (array) $plugin;
+
+                        $title = wp_kses( $plugin['name'], $plugins_allowedtags );
+                        //Limit description to 400char, and remove any HTML.
+                        $description = strip_tags( $plugin['description'] );
+                        if ( strlen( $description ) &gt; 400 )
+                                $description = mb_substr( $description, 0, 400 ) . '&amp;#8230;';
+                        //remove any trailing entities
+                        $description = preg_replace( '/&amp;[^;\s]{0,6}$/', '', $description );
+                        //strip leading/trailing &amp; multiple consecutive lines
+                        $description = trim( $description );
+                        $description = preg_replace( &quot;|(\r?\n)+|&quot;, &quot;\n&quot;, $description );
+                        //\n =&gt; &lt;br&gt;
+                        $description = nl2br( $description );
+                        $version = wp_kses( $plugin['version'], $plugins_allowedtags );
+
+                        $name = strip_tags( $title . ' ' . $version );
+
+                        $author = $plugin['author'];
+                        if ( ! empty( $plugin['author'] ) )
+                                $author = ' &lt;cite&gt;' . sprintf( __( 'By %s' ), $author ) . '.&lt;/cite&gt;';
+
+                        $author = wp_kses( $author, $plugins_allowedtags );
+
+                        $action_links = array();
+                        $action_links[] = '&lt;a href=&quot;' . admin_url( 'plugin-install.php?tab=plugin-information&amp;amp;plugin=' . $plugin['slug'] .
+                                                                '&amp;amp;TB_iframe=true&amp;amp;width=600&amp;amp;height=550' ) . '&quot; class=&quot;thickbox&quot; title=&quot;' .
+                                                                esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '&quot;&gt;' . __( 'Details' ) . '&lt;/a&gt;';
+
+                        if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) {
+                                $status = install_plugin_install_status( $plugin );
+
+                                switch ( $status['status'] ) {
+                                        case 'install':
+                                                if ( $status['url'] )
+                                                        $action_links[] = '&lt;a class=&quot;install-now&quot; href=&quot;' . $status['url'] . '&quot; title=&quot;' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '&quot;&gt;' . __( 'Install Now' ) . '&lt;/a&gt;';
+                                                break;
+                                        case 'update_available':
+                                                if ( $status['url'] )
+                                                        $action_links[] = '&lt;a href=&quot;' . $status['url'] . '&quot; title=&quot;' . esc_attr( sprintf( __( 'Update to version %s' ), $status['version'] ) ) . '&quot;&gt;' . sprintf( __( 'Update Now' ), $status['version'] ) . '&lt;/a&gt;';
+                                                break;
+                                        case 'latest_installed':
+                                        case 'newer_installed':
+                                                $action_links[] = '&lt;span title=&quot;' . esc_attr__( 'This plugin is already installed and is up to date' ) . ' &quot;&gt;' . __( 'Installed' ) . '&lt;/span&gt;';
+                                                break;
+                                }
+                        }
+
+                        $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
+                ?&gt;
+                &lt;tr&gt;
+                        &lt;td class=&quot;name&quot;&gt;&lt;strong&gt;&lt;?php echo $title; ?&gt;&lt;/strong&gt;
+                                &lt;div class=&quot;action-links&quot;&gt;&lt;?php if ( !empty( $action_links ) ) echo implode( ' | ', $action_links ); ?&gt;&lt;/div&gt;
+                        &lt;/td&gt;
+                        &lt;td class=&quot;vers&quot;&gt;&lt;?php echo $version; ?&gt;&lt;/td&gt;
+                        &lt;td class=&quot;vers&quot;&gt;
+                                &lt;div class=&quot;star-holder&quot; title=&quot;&lt;?php printf( _n( '( based on %s rating )', '( based on %s ratings )', $plugin['num_ratings'] ), number_format_i18n( $plugin['num_ratings'] ) ) ?&gt;&quot;&gt;
+                                        &lt;div class=&quot;star star-rating&quot; style=&quot;width: &lt;?php echo esc_attr( $plugin['rating'] ) ?&gt;px&quot;&gt;&lt;/div&gt;
+                                        &lt;div class=&quot;star star5&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '5 stars' ) ?&gt;&quot; /&gt;&lt;/div&gt;
+                                        &lt;div class=&quot;star star4&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '4 stars' ) ?&gt;&quot; /&gt;&lt;/div&gt;
+                                        &lt;div class=&quot;star star3&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '3 stars' ) ?&gt;&quot; /&gt;&lt;/div&gt;
+                                        &lt;div class=&quot;star star2&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '2 stars' ) ?&gt;&quot; /&gt;&lt;/div&gt;
+                                        &lt;div class=&quot;star star1&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url( 'images/star.gif' ); ?&gt;&quot; alt=&quot;&lt;?php _e( '1 star' ) ?&gt;&quot; /&gt;&lt;/div&gt;
+                                &lt;/div&gt;
+                        &lt;/td&gt;
+                        &lt;td class=&quot;desc&quot;&gt;&lt;?php echo $description, $author; ?&gt;&lt;/td&gt;
+                &lt;/tr&gt;
+                &lt;?php
+                }
+        }
+}
+
+?&gt;
</ins></span></pre></div>
<a id="trunkwpadminincludeslisttablepluginsphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-plugins.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-plugins.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-plugins.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,425 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Plugins_Table extends WP_List_Table {
+
+        function WP_Plugins_Table() {
+                global $status, $page;
+
+                $default_status = get_user_option( 'plugins_last_view' );
+                if ( empty( $default_status ) )
+                        $default_status = 'all';
+                $status = isset( $_REQUEST['plugin_status'] ) ? $_REQUEST['plugin_status'] : $default_status;
+                if ( !in_array( $status, array( 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) )
+                        $status = 'all';
+                if ( $status != $default_status &amp;&amp; 'search' != $status )
+                        update_user_meta( get_current_user_id(), 'plugins_last_view', $status );
+
+                $page = $this-&gt;get_pagenum();
+
+                parent::WP_List_Table( array(
+                        'screen' =&gt; 'plugins',
+                        'plural' =&gt; 'plugins',
+                ) );
+        }
+
+        function check_permissions() {
+                if ( is_multisite() ) {
+                        $menu_perms = get_site_option( 'menu_items', array() );
+
+                        if ( empty( $menu_perms['plugins'] ) ) {
+                                if ( !is_super_admin() )
+                                        wp_die( __( 'Cheatin&amp;#8217; uh?' ) );
+                        }
+                }
+
+                if ( !current_user_can('activate_plugins') )
+                        wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
+        }
+
+        function prepare_items() {
+                global $status, $plugins, $totals, $page, $orderby, $order, $s;
+
+                wp_reset_vars( array( 'orderby', 'order', 's' ) );
+
+                $plugins = array(
+                        'all' =&gt; apply_filters( 'all_plugins', get_plugins() ),
+                        'search' =&gt; array(),
+                        'active' =&gt; array(),
+                        'inactive' =&gt; array(),
+                        'recently_activated' =&gt; array(),
+                        'upgrade' =&gt; array(),
+                        'mustuse' =&gt; array(),
+                        'dropins' =&gt; array()
+                );
+
+                if ( ! is_multisite() || ( is_network_admin() &amp;&amp; current_user_can('manage_network_plugins') ) ) {
+                        if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) )
+                                $plugins['mustuse'] = get_mu_plugins();
+                        if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )
+                                $plugins['dropins'] = get_dropins();
+                }
+
+                set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), 86400 );
+
+                $recently_activated = get_option( 'recently_activated', array() );
+
+                $one_week = 7*24*60*60;
+                foreach ( $recently_activated as $key =&gt; $time )
+                        if ( $time + $one_week &lt; time() )
+                                unset( $recently_activated[$key] );
+                update_option( 'recently_activated', $recently_activated );
+
+                $current = get_site_transient( 'update_plugins' );
+
+                foreach ( array( 'all', 'mustuse', 'dropins' ) as $type ) {
+                        foreach ( (array) $plugins[$type] as $plugin_file =&gt; $plugin_data ) {
+                                // Translate, Apply Markup, Sanitize HTML
+                                $plugins[$type][$plugin_file] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true );
+                        }
+                }
+
+                foreach ( (array) $plugins['all'] as $plugin_file =&gt; $plugin_data ) {
+                        // Filter into individual sections
+                        if ( is_plugin_active_for_network($plugin_file) &amp;&amp; !is_network_admin() ) {
+                                unset( $plugins['all'][ $plugin_file ] );
+                                continue;
+                        } elseif ( is_multisite() &amp;&amp; is_network_only_plugin( $plugin_file ) &amp;&amp; !current_user_can( 'manage_network_plugins' ) ) {
+                                $plugins['network'][ $plugin_file ] = $plugin_data;
+                        } elseif ( ( !is_network_admin() &amp;&amp; is_plugin_active( $plugin_file ) )
+                                || ( is_network_admin() &amp;&amp; is_plugin_active_for_network( $plugin_file ) ) ) {
+                                $plugins['active'][ $plugin_file ] = $plugin_data;
+                        } else {
+                                if ( !is_network_admin() &amp;&amp; isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated?
+                                        $plugins['recently_activated'][ $plugin_file ] = $plugin_data;
+                                $plugins['inactive'][ $plugin_file ] = $plugin_data;
+                        }
+
+                        if ( isset( $current-&gt;response[ $plugin_file ] ) )
+                                $plugins['upgrade'][ $plugin_file ] = $plugin_data;
+                }
+
+                if ( !current_user_can( 'update_plugins' ) )
+                        $plugins['upgrade'] = array();
+
+                if ( $s ) {
+                        $status = 'search';
+                        $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) );
+                }
+
+                $totals = array();
+                foreach ( $plugins as $type =&gt; $list )
+                        $totals[ $type ] = count( $list );
+
+                if ( empty( $plugins[ $status ] ) &amp;&amp; !in_array( $status, array( 'all', 'search' ) ) )
+                        $status = 'all';
+
+                $this-&gt;items = $plugins[ $status ];
+                $total_this_page = $totals[ $status ];
+
+                if ( $orderby ) {
+                        $orderby = ucfirst( $orderby );
+                        $order = strtoupper( $order );
+
+                        uasort( $this-&gt;items, array( $this, '_order_callback' ) );
+                }
+
+                $plugins_per_page = $this-&gt;get_items_per_page( 'plugins_per_page', 999 );
+
+                $start = ( $page - 1 ) * $plugins_per_page;
+
+                if ( $total_this_page &gt; $plugins_per_page )
+                        $this-&gt;items = array_slice( $this-&gt;items, $start, $plugins_per_page );
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; $total_this_page,
+                        'per_page' =&gt; $plugins_per_page,
+                ) );
+        }
+
+        function _search_callback( $plugin ) {
+                static $term;
+                if ( is_null( $term ) )
+                        $term = stripslashes( $_REQUEST['s'] );
+
+                foreach ( $plugin as $value )
+                        if ( stripos( $value, $term ) !== false )
+                                return true;
+
+                return false;
+        }
+
+        function _order_callback( $plugin_a, $plugin_b ) {
+                global $orderby, $order;
+
+                $a = $plugin_a[$orderby];
+                $b = $plugin_b[$orderby];
+
+                if ( $a == $b )
+                        return 0;
+
+                if ( 'DESC' == $order )
+                        return ( $a &lt; $b ) ? 1 : -1;
+                else
+                        return ( $a &lt; $b ) ? -1 : 1;
+        }
+
+        function no_items() {
+                global $plugins;
+
+                if ( !empty( $plugins['all'] ) )
+                        _e( 'No plugins found.' );
+                else
+                        _e( 'You do not appear to have any plugins available at this time.' );
+        }
+
+        function get_columns() {
+                global $status;
+
+                return array(
+                        'cb'          =&gt; !in_array( $status, array( 'mustuse', 'dropins' ) ) ? '&lt;input type=&quot;checkbox&quot; /&gt;' : '',
+                        'name'        =&gt; __( 'Plugin' ),
+                        'description' =&gt; __( 'Description' ),
+                );
+        }
+
+        function get_sortable_columns() {
+                return array(
+                        'name'         =&gt; 'name',
+                        'description'  =&gt; 'description',
+                );
+        }
+
+        function display_tablenav( $which ) {
+                global $status;
+
+                if ( !in_array( $status, array( 'mustuse', 'dropins' ) ) )
+                        parent::display_tablenav( $which );
+        }
+
+        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;
+        }
+
+        function get_bulk_actions() {
+                global $status;
+
+                $actions = array();
+                if ( 'active' != $status )
+                        $actions['activate-selected'] = __( 'Activate' );
+                if ( is_multisite() &amp;&amp; 'network' != $status )
+                        $actions['network-activate-selected'] = __( 'Network Activate' );
+                if ( 'inactive' != $status &amp;&amp; 'recent' != $status )
+                        $actions['deactivate-selected'] = __( 'Deactivate' );
+                if ( current_user_can( 'update_plugins' ) )
+                        $actions['update-selected'] = __( 'Update' );
+                if ( current_user_can( 'delete_plugins' ) &amp;&amp; ( 'active' != $status ) )
+                        $actions['delete-selected'] = __( 'Delete' );
+
+                return $actions;
+        }
+
+        function bulk_actions( $which ) {
+                global $status;
+
+                if ( in_array( $status, array( 'mustuse', 'dropins' ) ) )
+                        return;
+
+                parent::bulk_actions( $which );
+        }
+
+        function extra_tablenav( $which ) {
+                global $status;
+
+                if ( 'recently_activated' == $status ) { ?&gt;
+                        &lt;div class=&quot;alignleft actions&quot;&gt;
+                                &lt;input type=&quot;submit&quot; name=&quot;clear-recent-list&quot; value=&quot;&lt;?php esc_attr_e( 'Clear List' ) ?&gt;&quot; class=&quot;button-secondary&quot; /&gt;
+                        &lt;/div&gt;
+                &lt;?php }
+        }
+
+        function current_action() {
+                if ( isset($_POST['clear-recent-list']) )
+                        return 'clear-recent-list';
+
+                return parent::current_action();
+        }
+
+        function display_rows() {
+                global $status, $page, $s;
+
+                $context = $status;
+
+                foreach ( $this-&gt;items as $plugin_file =&gt; $plugin_data ) {
+                        // preorder
+                        $actions = array(
+                                'network_deactivate' =&gt; '', 'deactivate' =&gt; '',
+                                'network_only' =&gt; '', 'activate' =&gt; '',
+                                'network_activate' =&gt; '',
+                                'edit' =&gt; '',
+                                'delete' =&gt; '',
+                        );
+
+                        if ( 'mustuse' == $context ) {
+                                if ( is_multisite() &amp;&amp; !is_network_admin() )
+                                        continue;
+                                $is_active = true;
+                        } elseif ( 'dropins' == $context ) {
+                                if ( is_multisite() &amp;&amp; !is_network_admin() )
+                                        continue;
+                                $dropins = _get_dropins();
+                                $plugin_name = $plugin_file;
+                                if ( $plugin_file != $plugin_data['Name'] )
+                                        $plugin_name .= '&lt;br/&gt;' . $plugin_data['Name'];
+                                if ( true === ( $dropins[ $plugin_file ][1] ) ) { // Doesn't require a constant
+                                        $is_active = true;
+                                        $description = '&lt;p&gt;&lt;strong&gt;' . $dropins[ $plugin_file ][0] . '&lt;/strong&gt;&lt;/p&gt;';
+                                } elseif ( constant( $dropins[ $plugin_file ][1] ) ) { // Constant is true
+                                        $is_active = true;
+                                        $description = '&lt;p&gt;&lt;strong&gt;' . $dropins[ $plugin_file ][0] . '&lt;/strong&gt;&lt;/p&gt;';
+                                } else {
+                                        $is_active = false;
+                                        $description = '&lt;p&gt;&lt;strong&gt;' . $dropins[ $plugin_file ][0] . ' &lt;span class=&quot;attention&quot;&gt;' . __('Inactive:') . '&lt;/span&gt;&lt;/strong&gt; ' . sprintf( __( 'Requires &lt;code&gt;%s&lt;/code&gt; in &lt;code&gt;wp-config.php&lt;/code&gt;.' ), &quot;define('&quot; . $dropins[ $plugin_file ][1] . &quot;', true);&quot; ) . '&lt;/p&gt;';
+                                }
+                                if ( $plugin_data['Description'] )
+                                        $description .= '&lt;p&gt;' . $plugin_data['Description'] . '&lt;/p&gt;';
+                        } else {
+                                $is_active_for_network = is_plugin_active_for_network($plugin_file);
+                                if ( is_network_admin() )
+                                        $is_active = $is_active_for_network;
+                                else
+                                        $is_active = is_plugin_active( $plugin_file );
+
+                                if ( $is_active_for_network &amp;&amp; !is_super_admin() &amp;&amp; !is_network_admin() )
+                                        continue;
+
+                                if ( is_network_admin() ) {
+                                        if ( $is_active_for_network ) {
+                                                if ( current_user_can( 'manage_network_plugins' ) )
+                                                        $actions['network_deactivate'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=deactivate&amp;amp;networkwide=1&amp;amp;plugin=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'deactivate-plugin_' . $plugin_file) . '&quot; title=&quot;' . __('Deactivate this plugin') . '&quot;&gt;' . __('Network Deactivate') . '&lt;/a&gt;';
+                                        } else {
+                                                if ( current_user_can( 'manage_network_plugins' ) )
+                                                        $actions['network_activate'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=activate&amp;amp;networkwide=1&amp;amp;plugin=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'activate-plugin_' . $plugin_file) . '&quot; title=&quot;' . __('Activate this plugin for all sites in this network') . '&quot; class=&quot;edit&quot;&gt;' . __('Network Activate') . '&lt;/a&gt;';
+                                                if ( current_user_can('delete_plugins') )
+                                                        $actions['delete'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=delete-selected&amp;amp;checked[]=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'bulk-plugins') . '&quot; title=&quot;' . __('Delete this plugin') . '&quot; class=&quot;delete&quot;&gt;' . __('Delete') . '&lt;/a&gt;';
+                                        }
+                                } else {
+                                        if ( $is_active ) {
+                                                $actions['deactivate'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=deactivate&amp;amp;plugin=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'deactivate-plugin_' . $plugin_file) . '&quot; title=&quot;' . __('Deactivate this plugin') . '&quot;&gt;' . __('Deactivate') . '&lt;/a&gt;';
+                                        } else {
+                                                if ( is_network_only_plugin( $plugin_file ) &amp;&amp; !is_network_admin() )
+                                                        continue;
+
+                                                $actions['activate'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=activate&amp;amp;plugin=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'activate-plugin_' . $plugin_file) . '&quot; title=&quot;' . __('Activate this plugin') . '&quot; class=&quot;edit&quot;&gt;' . __('Activate') . '&lt;/a&gt;';
+
+                                                if ( current_user_can('delete_plugins') )
+                                                        $actions['delete'] = '&lt;a href=&quot;' . wp_nonce_url('plugins.php?action=delete-selected&amp;amp;checked[]=' . $plugin_file . '&amp;amp;plugin_status=' . $context . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'bulk-plugins') . '&quot; title=&quot;' . __('Delete this plugin') . '&quot; class=&quot;delete&quot;&gt;' . __('Delete') . '&lt;/a&gt;';
+                                        } // end if $is_active
+                                 } // end if is_network_admin()
+
+                                if ( current_user_can('edit_plugins') &amp;&amp; is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
+                                        $actions['edit'] = '&lt;a href=&quot;plugin-editor.php?file=' . $plugin_file . '&quot; title=&quot;' . __('Open this file in the Plugin Editor') . '&quot; class=&quot;edit&quot;&gt;' . __('Edit') . '&lt;/a&gt;';
+                        } // end if $context
+
+                        $actions = apply_filters( 'plugin_action_links', array_filter( $actions ), $plugin_file, $plugin_data, $context );
+                        $actions = apply_filters( &quot;plugin_action_links_$plugin_file&quot;, $actions, $plugin_file, $plugin_data, $context );
+
+                        $class = $is_active ? 'active' : 'inactive';
+                        $checkbox = in_array( $status, array( 'mustuse', 'dropins' ) ) ? '' : &quot;&lt;input type='checkbox' name='checked[]' value='&quot; . esc_attr( $plugin_file ) . &quot;' /&gt;&quot;;
+                        if ( 'dropins' != $status ) {
+                                $description = '&lt;p&gt;' . $plugin_data['Description'] . '&lt;/p&gt;';
+                                $plugin_name = $plugin_data['Name'];
+                        }
+
+                        $id = sanitize_title( $plugin_name );
+
+                        echo &quot;
+                &lt;tr id='$id' class='$class'&gt;
+                        &lt;th scope='row' class='check-column'&gt;$checkbox&lt;/th&gt;
+                        &lt;td class='plugin-title'&gt;&lt;strong&gt;$plugin_name&lt;/strong&gt;&lt;/td&gt;
+                        &lt;td class='desc'&gt;$description&lt;/td&gt;
+                &lt;/tr&gt;
+                &lt;tr class='$class second'&gt;
+                        &lt;td&gt;&lt;/td&gt;
+                        &lt;td class='plugin-title'&gt;&quot;;
+
+                        echo $this-&gt;row_actions( $actions, true );
+
+                        echo &quot;&lt;/td&gt;
+                        &lt;td class='desc'&gt;&quot;;
+                        $plugin_meta = array();
+                        if ( !empty( $plugin_data['Version'] ) )
+                                $plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
+                        if ( !empty( $plugin_data['Author'] ) ) {
+                                $author = $plugin_data['Author'];
+                                if ( !empty( $plugin_data['AuthorURI'] ) )
+                                        $author = '&lt;a href=&quot;' . $plugin_data['AuthorURI'] . '&quot; title=&quot;' . __( 'Visit author homepage' ) . '&quot;&gt;' . $plugin_data['Author'] . '&lt;/a&gt;';
+                                $plugin_meta[] = sprintf( __( 'By %s' ), $author );
+                        }
+                        if ( ! empty( $plugin_data['PluginURI'] ) )
+                                $plugin_meta[] = '&lt;a href=&quot;' . $plugin_data['PluginURI'] . '&quot; title=&quot;' . __( 'Visit plugin site' ) . '&quot;&gt;' . __( 'Visit plugin site' ) . '&lt;/a&gt;';
+
+                        $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status );
+                        echo implode( ' | ', $plugin_meta );
+                        echo &quot;&lt;/td&gt;
+                &lt;/tr&gt;\n&quot;;
+
+                        do_action( 'after_plugin_row', $plugin_file, $plugin_data, $status );
+                        do_action( &quot;after_plugin_row_$plugin_file&quot;, $plugin_file, $plugin_data, $status );
+                }
+        }
+}
+
+?&gt;
</ins></span></pre></div>
<a id="trunkwpadminincludeslisttablesitesphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-sites.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-sites.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-sites.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,301 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Sites_Table extends WP_List_Table {
+
+        function WP_Sites_Table() {
+                parent::WP_List_Table( array(
+                        'screen' =&gt; 'sites-network',
+                        'plural' =&gt; 'sites',
+                ) );
+        }
+
+        function check_permissions() {
+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __( 'You do not have permission to access this page.' ) );
+        }
+
+        function prepare_items() {
+                global $s, $mode, $wpdb;
+
+                $mode = ( empty( $_REQUEST['mode'] ) ) ? 'list' : $_REQUEST['mode'];
+
+                $per_page = $this-&gt;get_items_per_page( 'sites_network_per_page' );
+
+                $pagenum = $this-&gt;get_pagenum();
+
+                $s = isset( $_REQUEST['s'] ) ? stripslashes( trim( $_REQUEST[ 's' ] ) ) : '';
+                $like_s = esc_sql( like_escape( $s ) );
+
+                $query = &quot;SELECT * FROM {$wpdb-&gt;blogs} WHERE site_id = '{$wpdb-&gt;siteid}' &quot;;
+
+                if ( isset( $_REQUEST['searchaction'] ) ) {
+                        if ( 'name' == $_REQUEST['searchaction'] ) {
+                                $query .= &quot; AND ( {$wpdb-&gt;blogs}.domain LIKE '%{$like_s}%' OR {$wpdb-&gt;blogs}.path LIKE '%{$like_s}%' ) &quot;;
+                        } elseif ( 'id' == $_REQUEST['searchaction'] ) {
+                                $query .= &quot; AND {$wpdb-&gt;blogs}.blog_id = '{$like_s}' &quot;;
+                        } elseif ( 'ip' == $_REQUEST['searchaction'] ) {
+                                $query = &quot;SELECT *
+                                        FROM {$wpdb-&gt;blogs}, {$wpdb-&gt;registration_log}
+                                        WHERE site_id = '{$wpdb-&gt;siteid}'
+                                        AND {$wpdb-&gt;blogs}.blog_id = {$wpdb-&gt;registration_log}.blog_id
+                                        AND {$wpdb-&gt;registration_log}.IP LIKE ( '%{$like_s}%' )&quot;;
+                        }
+                }
+
+                $order_by = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : 'id';
+                if ( $order_by == 'registered' ) {
+                        $query .= ' ORDER BY registered ';
+                } elseif ( $order_by == 'lastupdated' ) {
+                        $query .= ' ORDER BY last_updated ';
+                } elseif ( $order_by == 'blogname' ) {
+                        $query .= ' ORDER BY domain ';
+                } else {
+                        $order_by = 'id';
+                        $query .= &quot; ORDER BY {$wpdb-&gt;blogs}.blog_id &quot;;
+                }
+
+                $order = ( isset( $_REQUEST['order'] ) &amp;&amp; 'DESC' == strtoupper( $_REQUEST['order'] ) ) ? &quot;DESC&quot; : &quot;ASC&quot;;
+                $query .= $order;
+
+                $total = $wpdb-&gt;get_var( str_replace( 'SELECT *', 'SELECT COUNT( blog_id )', $query ) );
+
+                $query .= &quot; LIMIT &quot; . intval( ( $pagenum - 1 ) * $per_page ) . &quot;, &quot; . intval( $per_page );
+                $this-&gt;items = $wpdb-&gt;get_results( $query, ARRAY_A );
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; $total,
+                        'per_page' =&gt; $per_page,
+                ) );
+        }
+
+        function no_items() {
+                _e( 'No sites found.' );
+        }
+
+        function get_bulk_actions() {
+                $actions = array();
+                $actions['delete'] = __( 'Delete' );
+                $actions['spam'] = _x( 'Mark as Spam', 'site' );
+                $actions['notspam'] = _x( 'Not Spam', 'site' );
+
+                return $actions;
+        }
+
+        function pagination( $which ) {
+                global $mode;
+
+                parent::pagination( $which );
+
+                if ( 'top' == $which )
+                        $this-&gt;view_switcher( $mode );
+        }
+
+        function get_columns() {
+                $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );
+                $sites_columns = array(
+                        'cb'          =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
+                        'blogname'    =&gt; $blogname_columns,
+                        'lastupdated' =&gt; __( 'Last Updated' ),
+                        'registered'  =&gt; _x( 'Registered', 'site' ),
+                        'users'       =&gt; __( 'Users' )
+                );
+
+                if ( has_filter( 'wpmublogsaction' ) )
+                        $sites_columns['plugins'] = __( 'Actions' );
+
+                $sites_columns = apply_filters( 'wpmu_blogs_columns', $sites_columns );
+
+                return $sites_columns;
+        }
+
+        function get_sortable_columns() {
+                return array(
+                        'id'          =&gt; 'id',
+                        'blogname'    =&gt; 'blogname',
+                        'lastupdated' =&gt; 'lastupdated',
+                        'registered'  =&gt; 'registered',
+                );
+        }
+
+        function display_rows() {
+                global $current_site, $mode;
+
+                $status_list = array(
+                        'archived' =&gt; array( 'site-archived', __( 'Archived' ) ),
+                        'spam'     =&gt; array( 'site-spammed', _x( 'Spam', 'site' ) ),
+                        'deleted'  =&gt; array( 'site-deleted', __( 'Deleted' ) ),
+                        'mature'   =&gt; array( 'site-mature', __( 'Mature' ) )
+                );
+
+                $class = '';
+                foreach ( $this-&gt;items as $blog ) {
+                        $class = ( 'alternate' == $class ) ? '' : 'alternate';
+                        reset( $status_list );
+
+                        $blog_states = array();
+                        foreach ( $status_list as $status =&gt; $col ) {
+                                if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) {
+                                        $class = $col[0];
+                                        $blog_states[] = $col[1];
+                                }
+                        }
+                        $blog_state = '';
+                        if ( ! empty( $blog_states ) ) {
+                                $state_count = count( $blog_states );
+                                $i = 0;
+                                $blog_state .= ' - ';
+                                foreach ( $blog_states as $state ) {
+                                        ++$i;
+                                        ( $i == $state_count ) ? $sep = '' : $sep = ', ';
+                                        $blog_state .= &quot;&lt;span class='post-state'&gt;$state$sep&lt;/span&gt;&quot;;
+                                }
+                        }
+                        echo &quot;&lt;tr class='$class'&gt;&quot;;
+
+                        $blogname = ( is_subdomain_install() ) ? str_replace( '.'.$current_site-&gt;domain, '', $blog['domain'] ) : $blog['path'];
+
+                        list( $columns, $hidden ) = $this-&gt;get_column_info();
+
+                        foreach ( $columns as $column_name =&gt; $column_display_name ) {
+                                switch ( $column_name ) {
+                                        case 'cb': ?&gt;
+                                                &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;
+                                                        &lt;input type=&quot;checkbox&quot; id=&quot;blog_&lt;?php echo $blog['blog_id'] ?&gt;&quot; name=&quot;allblogs[]&quot; value=&quot;&lt;?php echo esc_attr( $blog['blog_id'] ) ?&gt;&quot; /&gt;
+                                                &lt;/th&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'id': ?&gt;
+                                                &lt;th valign=&quot;top&quot; scope=&quot;row&quot;&gt;
+                                                        &lt;?php echo $blog['blog_id'] ?&gt;
+                                                &lt;/th&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'blogname': ?&gt;
+                                                &lt;td class=&quot;column-title&quot;&gt;
+                                                        &lt;a href=&quot;&lt;?php echo esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ); ?&gt;&quot; class=&quot;edit&quot;&gt;&lt;?php echo $blogname . $blog_state; ?&gt;&lt;/a&gt;
+                                                        &lt;?php
+                                                        if ( 'list' != $mode )
+                                                                echo '&lt;p&gt;' . sprintf( _x( '%1$s &amp;#8211; &lt;em&gt;%2$s&lt;/em&gt;', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '&lt;/p&gt;';
+
+                                                        // Preordered.
+                                                        $actions = array(
+                                                                'edit' =&gt; '', 'backend' =&gt; '',
+                                                                'activate' =&gt; '', 'deactivate' =&gt; '',
+                                                                'archive' =&gt; '', 'unarchive' =&gt; '',
+                                                                'spam' =&gt; '', 'unspam' =&gt; '',
+                                                                'delete' =&gt; '',
+                                                                'visit' =&gt; '',
+                                                        );
+
+                                                        $actions['edit']        = '&lt;span class=&quot;edit&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;&lt;/span&gt;';
+                                                        $actions['backend']        = &quot;&lt;span class='backend'&gt;&lt;a href='&quot; . esc_url( get_admin_url( $blog['blog_id'] ) ) . &quot;' class='edit'&gt;&quot; . __( 'Dashboard' ) . '&lt;/a&gt;&lt;/span&gt;';
+                                                        if ( $current_site-&gt;blog_id != $blog['blog_id'] ) {
+                                                                if ( get_blog_status( $blog['blog_id'], 'deleted' ) == '1' )
+                                                                        $actions['activate']        = '&lt;span class=&quot;activate&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=activateblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to activate the site %s' ), $blogname ) ) ) ) . '&quot;&gt;' . __( 'Activate' ) . '&lt;/a&gt;&lt;/span&gt;';
+                                                                else
+                                                                        $actions['deactivate']        = '&lt;span class=&quot;activate&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=deactivateblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to deactivate the site %s' ), $blogname ) ) ) ) . '&quot;&gt;' . __( 'Deactivate' ) . '&lt;/a&gt;&lt;/span&gt;';
+
+                                                                if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' )
+                                                                        $actions['unarchive']        = '&lt;span class=&quot;archive&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=unarchiveblog&amp;amp;id=' .  $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ) ) . '&quot;&gt;' . __( 'Unarchive' ) . '&lt;/a&gt;&lt;/span&gt;';
+                                                                else
+                                                                        $actions['archive']        = '&lt;span class=&quot;archive&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=archiveblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ) ) . '&quot;&gt;' . _x( 'Archive', 'verb; site' ) . '&lt;/a&gt;&lt;/span&gt;';
+
+                                                                if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' )
+                                                                        $actions['unspam']        = '&lt;span class=&quot;spam&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=unspamblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to unspam the site %s.' ), $blogname ) ) ) ) . '&quot;&gt;' . _x( 'Not Spam', 'site' ) . '&lt;/a&gt;&lt;/span&gt;';
+                                                                else
+                                                                        $actions['spam']        = '&lt;span class=&quot;spam&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=spamblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to mark the site %s as spam.' ), $blogname ) ) ) ) . '&quot;&gt;' . _x( 'Spam', 'site' ) . '&lt;/a&gt;&lt;/span&gt;';
+
+                                                                $actions['delete']        = '&lt;span class=&quot;delete&quot;&gt;&lt;a href=&quot;' . esc_url( network_admin_url( 'edit.php?action=confirm&amp;amp;action2=deleteblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( 'You are about to delete the site %s.' ), $blogname ) ) ) ) . '&quot;&gt;' . __( 'Delete' ) . '&lt;/a&gt;&lt;/span&gt;';
+                                                        }
+
+                                                        $actions['visit']        = &quot;&lt;span class='view'&gt;&lt;a href='&quot; . esc_url( get_home_url( $blog['blog_id'] ) ) . &quot;' rel='permalink'&gt;&quot; . __( 'Visit' ) . '&lt;/a&gt;&lt;/span&gt;';
+                                                        $actions = array_filter( $actions );
+                                                        echo $this-&gt;row_actions( $actions );
+                                        ?&gt;
+                                                &lt;/td&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'lastupdated': ?&gt;
+                                                &lt;td valign=&quot;top&quot;&gt;
+                                                        &lt;?php
+                                                        if ( 'list' == $mode )
+                                                                $date = 'Y/m/d';
+                                                        else
+                                                                $date = 'Y/m/d \&lt;\b\r \/\&gt; g:i:s a';
+                                                        echo ( $blog['last_updated'] == '0000-00-00 00:00:00' ) ? __( 'Never' ) : mysql2date( $date, $blog['last_updated'] ); ?&gt;
+                                                &lt;/td&gt;
+                                        &lt;?php
+                                        break;
+                                case 'registered': ?&gt;
+                                                &lt;td valign=&quot;top&quot;&gt;
+                                                &lt;?php
+                                                if ( $blog['registered'] == '0000-00-00 00:00:00' )
+                                                        echo '&amp;#x2014;';
+                                                else
+                                                        echo mysql2date( $date, $blog['registered'] );
+                                                ?&gt;
+                                                &lt;/td&gt;
+                                &lt;?php
+                                break;
+                                        case 'users': ?&gt;
+                                                &lt;td valign=&quot;top&quot;&gt;
+                                                        &lt;?php
+                                                        $blogusers = get_users( array( 'blog_id' =&gt; $blog['blog_id'], 'number' =&gt; 6) );
+                                                        if ( is_array( $blogusers ) ) {
+                                                                $blogusers_warning = '';
+                                                                if ( count( $blogusers ) &gt; 5 ) {
+                                                                        $blogusers = array_slice( $blogusers, 0, 5 );
+                                                                        $blogusers_warning = __( 'Only showing first 5 users.' ) . ' &lt;a href=&quot;' . esc_url( get_admin_url( $blog['blog_id'], 'users.php' ) ) . '&quot;&gt;' . __( 'More' ) . '&lt;/a&gt;';
+                                                                }
+                                                                foreach ( $blogusers as $user_object ) {
+                                                                        echo '&lt;a href=&quot;' . esc_url( admin_url( 'user-edit.php?user_id=' . $user_object-&gt;ID ) ) . '&quot;&gt;' . esc_html( $user_object-&gt;user_login ) . '&lt;/a&gt; ';
+                                                                        if ( 'list' != $mode )
+                                                                                echo '( ' . $user_object-&gt;user_email . ' )';
+                                                                        echo '&lt;br /&gt;';
+                                                                }
+                                                                if ( $blogusers_warning != '' )
+                                                                        echo '&lt;strong&gt;' . $blogusers_warning . '&lt;/strong&gt;&lt;br /&gt;';
+                                                        }
+                                                        ?&gt;
+                                                &lt;/td&gt;
+                                        &lt;?php
+                                        break;
+
+                                        case 'plugins': ?&gt;
+                                                &lt;?php if ( has_filter( 'wpmublogsaction' ) ) { ?&gt;
+                                                &lt;td valign=&quot;top&quot;&gt;
+                                                        &lt;?php do_action( 'wpmublogsaction', $blog['blog_id'] ); ?&gt;
+                                                &lt;/td&gt;
+                                                &lt;?php } ?&gt;
+                                        &lt;?php break;
+
+                                        default: ?&gt;
+                                                &lt;?php if ( has_filter( 'manage_blogs_custom_column' ) ) { ?&gt;
+                                                &lt;td valign=&quot;top&quot;&gt;
+                                                        &lt;?php do_action( 'manage_blogs_custom_column', $column_name, $blog['blog_id'] ); ?&gt;
+                                                &lt;/td&gt;
+                                                &lt;?php } ?&gt;
+                                        &lt;?php break;
+                                }
+                        }
+                        ?&gt;
+                        &lt;/tr&gt;
+                        &lt;?php
+                }
+        }
+}
+
+?&gt;
+
</ins></span></pre></div>
<a id="trunkwpadminincludeslisttabletermsphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-terms.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-terms.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-terms.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,369 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Terms_Table extends WP_List_Table {
+
+        var $callback_args;
+
+        function WP_Terms_Table() {
+                global $post_type, $taxonomy, $tax, $current_screen;
+
+                wp_reset_vars( array( 'action', 'taxonomy', 'post_type' ) );
+
+                if ( empty( $taxonomy ) )
+                        $taxonomy = 'post_tag';
+
+                if ( !taxonomy_exists( $taxonomy ) )
+                        wp_die( __( 'Invalid taxonomy' ) );
+
+                $tax = get_taxonomy( $taxonomy );
+
+                if ( empty( $post_type ) || !in_array( $post_type, get_post_types( array( 'public' =&gt; true ) ) ) )
+                        $post_type = 'post';
+
+                if ( !isset( $current_screen ) )
+                        set_current_screen( 'edit-' . $taxonomy );
+
+                parent::WP_List_Table( array(
+                        'screen' =&gt; $current_screen,
+                        'plural' =&gt; 'tags',
+                        'singular' =&gt; 'tag',
+                ) );
+        }
+
+        function check_permissions( $type = 'manage' ) {
+                global $tax;
+
+                $cap = 'manage' == $type ? $tax-&gt;cap-&gt;manage_terms : $tax-&gt;cap-&gt;edit_terms;
+
+                if ( !current_user_can( $tax-&gt;cap-&gt;manage_terms ) )
+                        wp_die( __( 'Cheatin&amp;#8217; uh?' ) );
+        }
+
+        function prepare_items() {
+                global $taxonomy;
+
+                $tags_per_page = $this-&gt;get_items_per_page( 'edit_' .  $taxonomy . '_per_page' );
+
+                if ( 'post_tag' == $taxonomy ) {
+                        $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page );
+                        $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); // Old filter
+                } elseif ( 'category' == $taxonomy ) {
+                        $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); // Old filter
+                }
+
+                $search = !empty( $_REQUEST['s'] ) ? trim( stripslashes( $_REQUEST['s'] ) ) : '';
+
+                $args = array(
+                        'search' =&gt; $search,
+                        'page' =&gt; $this-&gt;get_pagenum(),
+                        'number' =&gt; $tags_per_page,
+                );
+
+                if ( !empty( $_REQUEST['orderby'] ) )
+                        $args['orderby'] = trim( stripslashes( $_REQUEST['orderby'] ) );
+
+                if ( !empty( $_REQUEST['order'] ) )
+                        $args['order'] = trim( stripslashes( $_REQUEST['order'] ) );
+
+                $this-&gt;callback_args = $args;
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; wp_count_terms( $taxonomy, compact( 'search' ) ),
+                        'per_page' =&gt; $tags_per_page,
+                ) );
+        }
+
+        function get_bulk_actions() {
+                $actions = array();
+                $actions['delete'] = __( 'Delete' );
+
+                return $actions;
+        }
+
+        function current_action() {
+                if ( isset( $_REQUEST['action'] ) &amp;&amp; isset( $_REQUEST['delete_tags'] ) &amp;&amp; ( 'delete' == $_REQUEST['action'] || 'delete' == $_REQUEST['action2'] ) )
+                        return 'bulk-delete';
+
+                return parent::current_action();
+        }
+
+        function get_columns() {
+                global $taxonomy;
+
+                $columns = array(
+                        'cb'          =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
+                        'name'        =&gt; __( 'Name' ),
+                        'description' =&gt; __( 'Description' ),
+                        'slug'        =&gt; __( 'Slug' ),
+                );
+
+                if ( 'link_category' == $taxonomy )
+                        $columns['links'] = __( 'Links' );
+                else
+                        $columns['posts'] = __( 'Posts' );
+
+                return $columns;
+        }
+
+        function get_sortable_columns() {
+                return array(
+                        'name'        =&gt; 'name',
+                        'description' =&gt; 'description',
+                        'slug'        =&gt; 'slug',
+                        'posts'       =&gt; 'count',
+                        'links'       =&gt; 'count'
+                );
+        }
+
+        function display_rows() {
+                global $taxonomy;
+
+                $args = wp_parse_args( $this-&gt;callback_args, array(
+                        'page' =&gt; 1,
+                        'number' =&gt; 20,
+                        'search' =&gt; '',
+                        'hide_empty' =&gt; 0
+                ) );
+
+                extract( $args, EXTR_SKIP );
+
+                $args['offset'] = $offset = ( $page - 1 ) * $number;
+
+                // convert it to table rows
+                $out = '';
+                $count = 0;
+                if ( is_taxonomy_hierarchical( $taxonomy ) &amp;&amp; !isset( $orderby ) ) {
+                        // We'll need the full set of terms then.
+                        $args['number'] = $args['offset'] = 0;
+
+                        $terms = get_terms( $taxonomy, $args );
+                        if ( !empty( $search ) ) // Ignore children on searches.
+                                $children = array();
+                        else
+                                $children = _get_term_hierarchy( $taxonomy );
+
+                        // Some funky recursion to get the job done( Paging &amp; parents mainly ) is contained within, Skip it for non-hierarchical taxonomies for performance sake
+                        $out .= $this-&gt;_rows( $taxonomy, $terms, $children, $offset, $number, $count );
+                } else {
+                        $terms = get_terms( $taxonomy, $args );
+                        foreach ( $terms as $term )
+                                $out .= $this-&gt;single_row( $term, 0, $taxonomy );
+                        $count = $number; // Only displaying a single page.
+                }
+
+                echo $out;
+        }
+
+        function _rows( $taxonomy, $terms, &amp;$children, $start = 0, $per_page = 20, &amp;$count, $parent = 0, $level = 0 ) {
+
+                $end = $start + $per_page;
+
+                $output = '';
+                foreach ( $terms as $key =&gt; $term ) {
+
+                        if ( $count &gt;= $end )
+                                break;
+
+                        if ( $term-&gt;parent != $parent &amp;&amp; empty( $_REQUEST['s'] ) )
+                                continue;
+
+                        // If the page starts in a subtree, print the parents.
+                        if ( $count == $start &amp;&amp; $term-&gt;parent &gt; 0 &amp;&amp; empty( $_REQUEST['s'] ) ) {
+                                $my_parents = $parent_ids = array();
+                                $p = $term-&gt;parent;
+                                while ( $p ) {
+                                        $my_parent = get_term( $p, $taxonomy );
+                                        $my_parents[] = $my_parent;
+                                        $p = $my_parent-&gt;parent;
+                                        if ( in_array( $p, $parent_ids ) ) // Prevent parent loops.
+                                                break;
+                                        $parent_ids[] = $p;
+                                }
+                                unset( $parent_ids );
+
+                                $num_parents = count( $my_parents );
+                                while ( $my_parent = array_pop( $my_parents ) ) {
+                                        $output .=  &quot;\t&quot; . $this-&gt;single_row( $my_parent, $level - $num_parents, $taxonomy );
+                                        $num_parents--;
+                                }
+                        }
+
+                        if ( $count &gt;= $start )
+                                $output .= &quot;\t&quot; . $this-&gt;single_row( $term, $level, $taxonomy );
+
+                        ++$count;
+
+                        unset( $terms[$key] );
+
+                        if ( isset( $children[$term-&gt;term_id] ) &amp;&amp; empty( $_REQUEST['s'] ) )
+                                $output .= $this-&gt;_rows( $taxonomy, $terms, $children, $start, $per_page, $count, $term-&gt;term_id, $level + 1 );
+                }
+
+                return $output;
+        }
+
+        function single_row( $tag, $level = 0 ) {
+                static $row_class = '';
+                $row_class = ( $row_class == '' ? ' class=&quot;alternate&quot;' : '' );
+
+                $this-&gt;level = $level;
+
+                echo '&lt;tr id=&quot;tag-' . $tag-&gt;term_id . '&quot;' . $row_class . '&gt;';
+                echo $this-&gt;single_row_columns( $tag );
+                echo '&lt;/tr&gt;';
+        }
+
+        function column_cb( $tag ) {
+                global $taxonomy, $tax;
+
+                $default_term = get_option( 'default_' . $taxonomy );
+
+                if ( current_user_can( $tax-&gt;cap-&gt;delete_terms ) &amp;&amp; $tag-&gt;term_id != $default_term )
+                        return '&lt;input type=&quot;checkbox&quot; name=&quot;delete_tags[]&quot; value=&quot;' . $tag-&gt;term_id . '&quot; /&gt;';
+                else
+                        return '&amp;nbsp;';
+        }
+
+        function column_name( $tag ) {
+                global $taxonomy, $tax, $post_type;
+
+                $default_term = get_option( 'default_' . $taxonomy );
+
+                $pad = str_repeat( '&amp;#8212; ', max( 0, $this-&gt;level ) );
+                $name = apply_filters( 'term_name', $pad . ' ' . $tag-&gt;name, $tag );
+                $qe_data = get_term( $tag-&gt;term_id, $taxonomy, OBJECT, 'edit' );
+                $edit_link = get_edit_term_link( $tag-&gt;term_id, $taxonomy, $post_type );
+
+                $out = '&lt;strong&gt;&lt;a class=&quot;row-title&quot; href=&quot;' . $edit_link . '&quot; title=&quot;' . esc_attr( sprintf( __( 'Edit &amp;#8220;%s&amp;#8221;' ), $name ) ) . '&quot;&gt;' . $name . '&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;';
+
+                $actions = array();
+                if ( current_user_can( $tax-&gt;cap-&gt;edit_terms ) ) {
+                        $actions['edit'] = '&lt;a href=&quot;' . $edit_link . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
+                        $actions['inline hide-if-no-js'] = '&lt;a href=&quot;#&quot; class=&quot;editinline&quot;&gt;' . __( 'Quick&amp;nbsp;Edit' ) . '&lt;/a&gt;';
+                }
+                if ( current_user_can( $tax-&gt;cap-&gt;delete_terms ) &amp;&amp; $tag-&gt;term_id != $default_term )
+                        $actions['delete'] = &quot;&lt;a class='delete-tag' href='&quot; . wp_nonce_url( &quot;edit-tags.php?action=delete&amp;amp;taxonomy=$taxonomy&amp;amp;tag_ID=$tag-&gt;term_id&quot;, 'delete-tag_' . $tag-&gt;term_id ) . &quot;'&gt;&quot; . __( 'Delete' ) . &quot;&lt;/a&gt;&quot;;
+
+                $actions = apply_filters( 'tag_row_actions', $actions, $tag );
+                $actions = apply_filters( &quot;${taxonomy}_row_actions&quot;, $actions, $tag );
+
+                $out .= $this-&gt;row_actions( $actions );
+                $out .= '&lt;div class=&quot;hidden&quot; id=&quot;inline_' . $qe_data-&gt;term_id . '&quot;&gt;';
+                $out .= '&lt;div class=&quot;name&quot;&gt;' . $qe_data-&gt;name . '&lt;/div&gt;';
+                $out .= '&lt;div class=&quot;slug&quot;&gt;' . apply_filters( 'editable_slug', $qe_data-&gt;slug ) . '&lt;/div&gt;';
+                $out .= '&lt;div class=&quot;parent&quot;&gt;' . $qe_data-&gt;parent . '&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;';
+
+                return $out;
+        }
+
+        function column_description( $tag ) {
+                return $tag-&gt;description;
+        }
+
+        function column_slug( $tag ) {
+                return apply_filters( 'editable_slug', $tag-&gt;slug );
+        }
+
+        function column_posts( $tag ) {
+                global $taxonomy, $post_type;
+
+                $count = number_format_i18n( $tag-&gt;count );
+
+                if ( 'post_tag' == $taxonomy ) {
+                        $tagsel = 'tag';
+                } elseif ( 'category' == $taxonomy ) {
+                        $tagsel = 'category_name';
+                } elseif ( ! empty( $tax-&gt;query_var ) ) {
+                        $tagsel = $tax-&gt;query_var;
+                } else {
+                        $tagsel = $taxonomy;
+                }
+
+                return &quot;&lt;a href='edit.php?$tagsel=$tag-&gt;slug&amp;amp;post_type=$post_type'&gt;$count&lt;/a&gt;&quot;;
+        }
+
+        function column_links( $tag ) {
+                $count = number_format_i18n( $tag-&gt;count );
+                return $count;
+        }
+
+        function column_default( $tag, $column_name ) {
+                global $taxonomy;
+
+                return apply_filters( &quot;manage_${taxonomy}_custom_column&quot;, '', $column_name, $tag-&gt;term_id );
+                $out .= &quot;&lt;/td&gt;&quot;;
+        }
+
+        /**
+         * Outputs the hidden row displayed when inline editing
+         *
+         * @since 3.1.0
+         */
+        function inline_edit() {
+                global $tax;
+
+                if ( ! current_user_can( $tax-&gt;cap-&gt;edit_terms ) )
+                        return;
+
+                list( $columns, $hidden ) = $this-&gt;get_column_info();
+
+                $col_count = count( $columns ) - count( $hidden );
+                ?&gt;
+
+        &lt;form method=&quot;get&quot; action=&quot;&quot;&gt;&lt;table style=&quot;display: none&quot;&gt;&lt;tbody id=&quot;inlineedit&quot;&gt;
+                &lt;tr id=&quot;inline-edit&quot; class=&quot;inline-edit-row&quot; style=&quot;display: none&quot;&gt;&lt;td colspan=&quot;&lt;?php echo $col_count; ?&gt;&quot;&gt;
+
+                        &lt;fieldset&gt;&lt;div class=&quot;inline-edit-col&quot;&gt;
+                                &lt;h4&gt;&lt;?php _e( 'Quick Edit' ); ?&gt;&lt;/h4&gt;
+
+                                &lt;label&gt;
+                                        &lt;span class=&quot;title&quot;&gt;&lt;?php _e( 'Name' ); ?&gt;&lt;/span&gt;
+                                        &lt;span class=&quot;input-text-wrap&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; class=&quot;ptitle&quot; value=&quot;&quot; /&gt;&lt;/span&gt;
+                                &lt;/label&gt;
+        &lt;?php if ( !global_terms_enabled() ) { ?&gt;
+                                &lt;label&gt;
+                                        &lt;span class=&quot;title&quot;&gt;&lt;?php _e( 'Slug' ); ?&gt;&lt;/span&gt;
+                                        &lt;span class=&quot;input-text-wrap&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;slug&quot; class=&quot;ptitle&quot; value=&quot;&quot; /&gt;&lt;/span&gt;
+                                &lt;/label&gt;
+        &lt;?php } ?&gt;
+
+                        &lt;/div&gt;&lt;/fieldset&gt;
+        &lt;?php
+
+                $core_columns = array( 'cb' =&gt; true, 'description' =&gt; true, 'name' =&gt; true, 'slug' =&gt; true, 'posts' =&gt; true );
+
+                foreach ( $columns as $column_name =&gt; $column_display_name ) {
+                        if ( isset( $core_columns[$column_name] ) )
+                                continue;
+                        do_action( 'quick_edit_custom_box', $column_name, $type, $tax-&gt;taxonomy );
+                }
+
+        ?&gt;
+
+                &lt;p class=&quot;inline-edit-save submit&quot;&gt;
+                        &lt;a accesskey=&quot;c&quot; href=&quot;#inline-edit&quot; title=&quot;&lt;?php _e( 'Cancel' ); ?&gt;&quot; class=&quot;cancel button-secondary alignleft&quot;&gt;&lt;?php _e( 'Cancel' ); ?&gt;&lt;/a&gt;
+                        &lt;?php $update_text = $tax-&gt;labels-&gt;update_item; ?&gt;
+                        &lt;a accesskey=&quot;s&quot; href=&quot;#inline-edit&quot; title=&quot;&lt;?php echo esc_attr( $update_text ); ?&gt;&quot; class=&quot;save button-primary alignright&quot;&gt;&lt;?php echo $update_text; ?&gt;&lt;/a&gt;
+                        &lt;img class=&quot;waiting&quot; style=&quot;display:none;&quot; src=&quot;&lt;?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?&gt;&quot; alt=&quot;&quot; /&gt;
+                        &lt;span class=&quot;error&quot; style=&quot;display:none;&quot;&gt;&lt;/span&gt;
+                        &lt;?php wp_nonce_field( 'taxinlineeditnonce', '_inline_edit', false ); ?&gt;
+                        &lt;input type=&quot;hidden&quot; name=&quot;taxonomy&quot; value=&quot;&lt;?php echo esc_attr( $tax-&gt;name ); ?&gt;&quot; /&gt;
+                        &lt;br class=&quot;clear&quot; /&gt;
+                &lt;/p&gt;
+                &lt;/td&gt;&lt;/tr&gt;
+                &lt;/tbody&gt;&lt;/table&gt;&lt;/form&gt;
+        &lt;?php
+        }
+}
+
+?&gt;
+
</ins></span></pre></div>
<a id="trunkwpadminincludeslisttablethemeinstallphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-theme-install.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-theme-install.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-theme-install.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,190 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Theme_Install_Table extends WP_List_Table {
+
+        function WP_Theme_Install_Table() {
+                parent::WP_List_Table( array(
+                        'screen' =&gt; 'theme-install',
+                ) );
+        }
+
+        function check_permissions() {
+                if ( ! current_user_can('install_themes') )
+                        wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
+        }
+
+        function prepare_items() {
+                include( ABSPATH . 'wp-admin/includes/theme-install.php' );
+
+                global $tabs, $tab, $paged, $type, $term, $theme_field_defaults;
+
+                wp_reset_vars( array( 'tab' ) );
+
+                $paged = $this-&gt;get_pagenum();
+
+                $per_page = 30;
+
+                // These are the tabs which are shown on the page,
+                $tabs = array();
+                $tabs['dashboard'] = __( 'Search' );
+                if ( 'search' == $tab )
+                        $tabs['search']        = __( 'Search Results' );
+                $tabs['upload'] = __( 'Upload' );
+                $tabs['featured'] = _x( 'Featured','Theme Installer' );
+                //$tabs['popular']  = _x( 'Popular','Theme Installer' );
+                $tabs['new']      = _x( 'Newest','Theme Installer' );
+                $tabs['updated']  = _x( 'Recently Updated','Theme Installer' );
+
+                $nonmenu_tabs = array( 'theme-information' ); // Valid actions to perform which do not have a Menu item.
+
+                $tabs = apply_filters( 'install_themes_tabs', $tabs );
+                $nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs );
+
+                // If a non-valid menu tab has been selected, And its not a non-menu action.
+                if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) &amp;&amp; ! in_array( $tab, (array) $nonmenu_tabs ) ) )
+                        $tab = key( $tabs );
+
+                $args = array( 'page' =&gt; $paged, 'per_page' =&gt; $per_page, 'fields' =&gt; $theme_field_defaults );
+
+                switch ( $tab ) {
+                        case 'search':
+                                $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : '';
+                                $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
+
+                                switch ( $type ) {
+                                        case 'tag':
+                                                $terms = explode( ',', $term );
+                                                $terms = array_map( 'trim', $terms );
+                                                $terms = array_map( 'sanitize_title_with_dashes', $terms );
+                                                $args['tag'] = $terms;
+                                                break;
+                                        case 'term':
+                                                $args['search'] = $term;
+                                                break;
+                                        case 'author':
+                                                $args['author'] = $term;
+                                                break;
+                                }
+
+                                if ( !empty( $_POST['features'] ) ) {
+                                        $terms = $_POST['features'];
+                                        $terms = array_map( 'trim', $terms );
+                                        $terms = array_map( 'sanitize_title_with_dashes', $terms );
+                                        $args['tag'] = $terms;
+                                        $_REQUEST['s'] = implode( ',', $terms );
+                                        $_REQUEST['type'] = 'tag';
+                                }
+
+                                add_action( 'install_themes_table_header', 'install_theme_search_form' );
+                                break;
+
+                        case 'featured':
+                        //case 'popular':
+                        case 'new':
+                        case 'updated':
+                                $args['browse'] = $tab;
+                                break;
+
+                        default:
+                                $args = false;
+                }
+
+                if ( !$args )
+                        return;
+
+                $api = themes_api( 'query_themes', $args );
+
+                if ( is_wp_error( $api ) )
+                        wp_die( $api-&gt;get_error_message() . '&lt;/p&gt; &lt;p class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;document.location.reload(); return false;&quot;&gt;' . __( 'Try again' ) . '&lt;/a&gt;' );
+
+                $this-&gt;items = $api-&gt;themes;
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; $api-&gt;info['results'],
+                        'per_page' =&gt; $per_page,
+                ) );
+        }
+
+        function no_items() {
+                _e( 'No themes match your request.' );
+        }
+
+        function get_views() {
+                global $tabs, $tab;
+
+                $display_tabs = array();
+                foreach ( (array) $tabs as $action =&gt; $text ) {
+                        $class = ( $action == $tab ) ? ' class=&quot;current&quot;' : '';
+                        $href = self_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;
+        }
+
+        function get_columns() {
+                return array();
+        }
+
+        function display_table() {
+?&gt;
+                &lt;div class=&quot;tablenav&quot;&gt;
+                        &lt;div class=&quot;alignleft actions&quot;&gt;
+                                &lt;?php do_action( 'install_themes_table_header' ); ?&gt;
+                        &lt;/div&gt;
+                        &lt;?php $this-&gt;pagination( 'top' ); ?&gt;
+                        &lt;br class=&quot;clear&quot; /&gt;
+                &lt;/div&gt;
+
+                &lt;table id=&quot;availablethemes&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
+                        &lt;tbody id=&quot;the-list&quot; class=&quot;list:themes&quot;&gt;
+                                &lt;?php $this-&gt;display_rows(); ?&gt;
+                        &lt;/tbody&gt;
+                &lt;/table&gt;
+
+                &lt;div class=&quot;tablenav&quot;&gt;
+                        &lt;?php $this-&gt;pagination( 'bottom' ); ?&gt;
+                        &lt;br class=&quot;clear&quot; /&gt;
+                &lt;/div&gt;
+&lt;?php
+        }
+
+        function display_rows() {
+                $themes = $this-&gt;items;
+
+                $rows = ceil( count( $themes ) / 3 );
+                $table = array();
+                $theme_keys = array_keys( $themes );
+                for ( $row = 1; $row &lt;= $rows; $row++ )
+                        for ( $col = 1; $col &lt;= 3; $col++ )
+                                $table[$row][$col] = array_shift( $theme_keys );
+
+                foreach ( $table as $row =&gt; $cols ) {
+                        echo &quot;\t&lt;tr&gt;\n&quot;;
+                        foreach ( $cols as $col =&gt; $theme_index ) {
+                                $class = array( 'available-theme' );
+                                if ( $row == 1 ) $class[] = 'top';
+                                if ( $col == 1 ) $class[] = 'left';
+                                if ( $row == $rows ) $class[] = 'bottom';
+                                if ( $col == 3 ) $class[] = 'right';
+                                ?&gt;
+                                &lt;td class=&quot;&lt;?php echo join( ' ', $class ); ?&gt;&quot;&gt;&lt;?php
+                                        if ( isset( $themes[$theme_index] ) )
+                                                display_theme( $themes[$theme_index] );
+                                ?&gt;&lt;/td&gt;
+                        &lt;?php } // end foreach $cols
+                        echo &quot;\t&lt;/tr&gt;\n&quot;;
+                } // end foreach $table
+        }
+}
+
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminincludeslisttablethemesphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-themes.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-themes.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-themes.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,222 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Themes_Table extends WP_List_Table {
+
+        var $search = array();
+        var $features = array();
+
+        function WP_Themes_Table() {
+                parent::__construct( array(
+                        'screen' =&gt; 'themes',
+                ) );
+        }
+
+        function check_permissions() {
+                if ( !current_user_can('switch_themes') &amp;&amp; !current_user_can('edit_theme_options') )
+                        wp_die( __( 'Cheatin&amp;#8217; uh?' ) );
+        }
+
+        function prepare_items() {
+                global $ct;
+
+                $ct = current_theme_info();
+
+                $themes = get_allowed_themes();
+
+                $search = !empty( $_REQUEST['s'] ) ? trim( stripslashes( $_REQUEST['s'] ) ) : '';
+
+                if ( '' !== $search ) {
+                        $this-&gt;search = array_merge( $this-&gt;search, array_filter( array_map( 'trim', explode( ',', $search ) ) ) );
+                        $this-&gt;search = array_unique( $this-&gt;search );
+                }
+
+                if ( !empty( $_REQUEST['features'] ) ) {
+                        $this-&gt;features = $_REQUEST['features'];
+                        $this-&gt;features = array_map( 'trim', $this-&gt;features );
+                        $this-&gt;features = array_map( 'sanitize_title_with_dashes', $this-&gt;features );
+                        $this-&gt;features = array_unique( $this-&gt;features );
+                }
+
+                if ( $this-&gt;search || $this-&gt;features ) {
+                        foreach ( $themes as $key =&gt; $theme ) {
+                                if ( !$this-&gt;search_theme( $theme ) )
+                                        unset( $themes[ $key ] );
+                        }
+                }
+
+                unset( $themes[$ct-&gt;name] );
+                uksort( $themes, &quot;strnatcasecmp&quot; );
+
+                $per_page = 15;
+                $page = $this-&gt;get_pagenum();
+
+                $start = ( $page - 1 ) * $per_page;
+
+                $this-&gt;items = array_slice( $themes, $start, $per_page );
+
+                $this-&gt;set_pagination_args( array(
+                        'query_var' =&gt; 'pagenum',
+                        'total_items' =&gt; count( $themes ),
+                        'per_page' =&gt; $per_page,
+                ) );
+        }
+
+        function no_items() {
+                if ( current_user_can( 'install_themes' ) )
+                        printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the &lt;em&gt;&lt;a href=&quot;%s&quot;&gt;Install Themes&lt;/a&gt;&lt;/em&gt; tab above.' ), 'theme-install.php' );
+                else
+                        printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
+        }
+
+        function display_table() {
+?&gt;
+                &lt;div class=&quot;tablenav&quot;&gt;
+                        &lt;?php $this-&gt;pagination( 'top' ); ?&gt;
+                        &lt;br class=&quot;clear&quot; /&gt;
+                &lt;/div&gt;
+
+                &lt;table id=&quot;availablethemes&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
+                        &lt;tbody id=&quot;the-list&quot; class=&quot;list:themes&quot;&gt;
+                                &lt;?php $this-&gt;display_rows(); ?&gt;
+                        &lt;/tbody&gt;
+                &lt;/table&gt;
+
+                &lt;div class=&quot;tablenav&quot;&gt;
+                        &lt;?php $this-&gt;pagination( 'bottom' ); ?&gt;
+                        &lt;br class=&quot;clear&quot; /&gt;
+                &lt;/div&gt;
+&lt;?php
+        }
+
+        function get_columns() {
+                return array();
+        }
+
+        function display_rows() {
+                $themes = $this-&gt;items;
+                $theme_names = array_keys( $themes );
+                natcasesort( $theme_names );
+
+                $table = array();
+                $rows = ceil( count( $theme_names ) / 3 );
+                for ( $row = 1; $row &lt;= $rows; $row++ )
+                        for ( $col = 1; $col &lt;= 3; $col++ )
+                                $table[$row][$col] = array_shift( $theme_names );
+
+                foreach ( $table as $row =&gt; $cols ) {
+?&gt;
+&lt;tr&gt;
+&lt;?php
+foreach ( $cols as $col =&gt; $theme_name ) {
+        $class = array( 'available-theme' );
+        if ( $row == 1 ) $class[] = 'top';
+        if ( $col == 1 ) $class[] = 'left';
+        if ( $row == $rows ) $class[] = 'bottom';
+        if ( $col == 3 ) $class[] = 'right';
+?&gt;
+        &lt;td class=&quot;&lt;?php echo join( ' ', $class ); ?&gt;&quot;&gt;
+&lt;?php if ( !empty( $theme_name ) ) :
+        $template = $themes[$theme_name]['Template'];
+        $stylesheet = $themes[$theme_name]['Stylesheet'];
+        $title = $themes[$theme_name]['Title'];
+        $version = $themes[$theme_name]['Version'];
+        $description = $themes[$theme_name]['Description'];
+        $author = $themes[$theme_name]['Author'];
+        $screenshot = $themes[$theme_name]['Screenshot'];
+        $stylesheet_dir = $themes[$theme_name]['Stylesheet Dir'];
+        $template_dir = $themes[$theme_name]['Template Dir'];
+        $parent_theme = $themes[$theme_name]['Parent Theme'];
+        $theme_root = $themes[$theme_name]['Theme Root'];
+        $theme_root_uri = $themes[$theme_name]['Theme Root URI'];
+        $preview_link = esc_url( get_option( 'home' ) . '/' );
+        if ( is_ssl() )
+                $preview_link = str_replace( 'http://', 'https://', $preview_link );
+        $preview_link = htmlspecialchars( add_query_arg( array( 'preview' =&gt; 1, 'template' =&gt; $template, 'stylesheet' =&gt; $stylesheet, 'TB_iframe' =&gt; 'true' ), $preview_link ) );
+        $preview_text = esc_attr( sprintf( __( 'Preview of &amp;#8220;%s&amp;#8221;' ), $title ) );
+        $tags = $themes[$theme_name]['Tags'];
+        $thickbox_class = 'thickbox thickbox-preview';
+        $activate_link = wp_nonce_url( &quot;themes.php?action=activate&amp;amp;template=&quot;.urlencode( $template ).&quot;&amp;amp;stylesheet=&quot;.urlencode( $stylesheet ), 'switch-theme_' . $template );
+        $activate_text = esc_attr( sprintf( __( 'Activate &amp;#8220;%s&amp;#8221;' ), $title ) );
+        $actions = array();
+        $actions[] = '&lt;a href=&quot;' . $activate_link .  '&quot; class=&quot;activatelink&quot; title=&quot;' . $activate_text . '&quot;&gt;' . __( 'Activate' ) . '&lt;/a&gt;';
+        $actions[] = '&lt;a href=&quot;' . $preview_link . '&quot; class=&quot;thickbox thickbox-preview&quot; title=&quot;' . esc_attr( sprintf( __( 'Preview &amp;#8220;%s&amp;#8221;' ), $theme_name ) ) . '&quot;&gt;' . __( 'Preview' ) . '&lt;/a&gt;';
+        if ( current_user_can( 'delete_themes' ) )
+                $actions[] = '&lt;a class=&quot;submitdelete deletion&quot; href=&quot;' . wp_nonce_url( &quot;themes.php?action=delete&amp;amp;template=$stylesheet&quot;, 'delete-theme_' . $stylesheet ) . '&quot; onclick=&quot;' . &quot;return confirm( '&quot; . esc_js( sprintf( __( &quot;You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete.&quot; ), $theme_name ) ) . &quot;' );&quot; . '&quot;&gt;' . __( 'Delete' ) . '&lt;/a&gt;';
+        $actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] );
+
+        $actions = implode ( ' | ', $actions );
+?&gt;
+                &lt;a href=&quot;&lt;?php echo $preview_link; ?&gt;&quot; class=&quot;&lt;?php echo $thickbox_class; ?&gt; screenshot&quot;&gt;
+&lt;?php if ( $screenshot ) : ?&gt;
+                        &lt;img src=&quot;&lt;?php echo $theme_root_uri . '/' . $stylesheet . '/' . $screenshot; ?&gt;&quot; alt=&quot;&quot; /&gt;
+&lt;?php endif; ?&gt;
+                &lt;/a&gt;
+&lt;h3&gt;&lt;?php
+        /* translators: 1: theme title, 2: theme version, 3: theme author */
+        printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?&gt;&lt;/h3&gt;
+&lt;p class=&quot;description&quot;&gt;&lt;?php echo $description; ?&gt;&lt;/p&gt;
+&lt;span class='action-links'&gt;&lt;?php echo $actions ?&gt;&lt;/span&gt;
+        &lt;?php if ( current_user_can( 'edit_themes' ) &amp;&amp; $parent_theme ) {
+        /* translators: 1: theme title, 2:  template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?&gt;
+        &lt;p&gt;&lt;?php printf( __( 'The template files are located in &lt;code&gt;%2$s&lt;/code&gt;. The stylesheet files are located in &lt;code&gt;%3$s&lt;/code&gt;. &lt;strong&gt;%4$s&lt;/strong&gt; uses templates from &lt;strong&gt;%5$s&lt;/strong&gt;. Changes made to the templates will affect both themes.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?&gt;&lt;/p&gt;
+&lt;?php } else { ?&gt;
+        &lt;p&gt;&lt;?php printf( __( 'All of this theme&amp;#8217;s files are located in &lt;code&gt;%2$s&lt;/code&gt;.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?&gt;&lt;/p&gt;
+&lt;?php } ?&gt;
+&lt;?php if ( $tags ) : ?&gt;
+&lt;p&gt;&lt;?php _e( 'Tags:' ); ?&gt; &lt;?php echo join( ', ', $tags ); ?&gt;&lt;/p&gt;
+&lt;?php endif; ?&gt;
+                &lt;?php theme_update_available( $themes[$theme_name] ); ?&gt;
+&lt;?php endif; // end if not empty theme_name ?&gt;
+        &lt;/td&gt;
+&lt;?php } // end foreach $cols ?&gt;
+&lt;/tr&gt;
+&lt;?php } // end foreach $table
+        }
+
+        function search_theme( $theme ) {
+                $matched = 0;
+
+                // Match all phrases
+                if ( count( $this-&gt;search ) &gt; 0 ) {
+                        foreach ( $this-&gt;search as $word ) {
+                                $matched = 0;
+
+                                // In a tag?
+                                if ( in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) )
+                                        $matched = 1;
+
+                                // In one of the fields?
+                                foreach ( array( 'Name', 'Title', 'Description', 'Author', 'Template', 'Stylesheet' ) AS $field ) {
+                                        if ( stripos( $theme[$field], $word ) !== false )
+                                                $matched++;
+                                }
+
+                                if ( $matched == 0 )
+                                        return false;
+                        }
+                }
+
+                // Now search the features
+                if ( count( $this-&gt;features ) &gt; 0 ) {
+                        foreach ( $this-&gt;features as $word ) {
+                                // In a tag?
+                                if ( !in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) )
+                                        return false;
+                        }
+                }
+
+                // Only get here if each word exists in the tags or one of the fields
+                return true;
+        }
+}
+
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminincludeslisttableusersphpfromrev15954trunkwpadminincludesdefaultlisttablesphp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/includes/list-table-users.php (from rev 15954, trunk/wp-admin/includes/default-list-tables.php) (0 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table-users.php                                (rev 0)
+++ trunk/wp-admin/includes/list-table-users.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -0,0 +1,281 @@
</span><ins>+&lt;?php
+
+/**
+ * List table classes
+ *
+ * Each list-type admin screen has a class that handles the rendering of the list table.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+class WP_Users_Table extends WP_List_Table {
+
+        function WP_Users_Table() {
+                parent::WP_List_Table( array(
+                        'screen' =&gt; 'users',
+                        'plural' =&gt; 'users'
+                ) );
+        }
+
+        function check_permissions() {
+                if ( !current_user_can('list_users') )
+                        wp_die(__('Cheatin&amp;#8217; uh?'));
+        }
+
+        function prepare_items() {
+                global $role, $usersearch;
+
+                $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
+
+                $role = isset( $_REQUEST['role'] ) ? $_REQUEST['role'] : '';
+
+                $users_per_page = $this-&gt;get_items_per_page( 'users_per_page' );
+
+                $paged = $this-&gt;get_pagenum();
+
+                $args = array(
+                        'number' =&gt; $users_per_page,
+                        'offset' =&gt; ( $paged-1 ) * $users_per_page,
+                        'role' =&gt; $role,
+                        'search' =&gt; $usersearch
+                );
+
+                if ( isset( $_REQUEST['orderby'] ) )
+                        $args['orderby'] = $_REQUEST['orderby'];
+
+                if ( isset( $_REQUEST['order'] ) )
+                        $args['order'] = $_REQUEST['order'];
+
+                // Query the user IDs for this page
+                $wp_user_search = new WP_User_Query( $args );
+
+                $this-&gt;items = $wp_user_search-&gt;get_results();
+
+                $this-&gt;set_pagination_args( array(
+                        'total_items' =&gt; $wp_user_search-&gt;get_total(),
+                        'per_page' =&gt; $users_per_page,
+                ) );
+        }
+
+        function no_items() {
+                _e( 'No matching users were found.' );
+        }
+
+        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;
+        }
+
+        function get_bulk_actions() {
+                $actions = array();
+
+                if ( !is_multisite() &amp;&amp; current_user_can( 'delete_users' ) )
+                        $actions['delete'] = __( 'Delete' );
+                else
+                        $actions['remove'] = __( 'Remove' );
+
+                return $actions;
+        }
+
+        function extra_tablenav( $which ) {
+                if ( 'top' != $which )
+                        return;
+?&gt;
+        &lt;div class=&quot;alignleft actions&quot;&gt;
+                &lt;label class=&quot;screen-reader-text&quot; for=&quot;new_role&quot;&gt;&lt;?php _e( 'Change role to&amp;hellip;' ) ?&gt;&lt;/label&gt;
+                &lt;select name=&quot;new_role&quot; id=&quot;new_role&quot;&gt;
+                        &lt;option value=''&gt;&lt;?php _e( 'Change role to&amp;hellip;' ) ?&gt;&lt;/option&gt;
+                        &lt;?php wp_dropdown_roles(); ?&gt;
+                &lt;/select&gt;
+                &lt;input type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e( 'Change' ); ?&gt;&quot; name=&quot;changeit&quot; class=&quot;button-secondary&quot; /&gt;
+        &lt;/div&gt;
+&lt;?php
+        }
+
+        function current_action() {
+                if ( isset($_REQUEST['changeit']) &amp;&amp; !empty($_REQUEST['new_role']) )
+                        return 'promote';
+
+                return parent::current_action();
+        }
+
+        function get_columns() {
+                return array(
+                        'cb'       =&gt; '&lt;input type=&quot;checkbox&quot; /&gt;',
+                        'username' =&gt; __( 'Login' ),
+                        'name'     =&gt; __( 'Name' ),
+                        'email'    =&gt; __( 'E-mail' ),
+                        'role'     =&gt; __( 'Role' ),
+                        'posts'    =&gt; __( 'Posts' )
+                );
+        }
+
+        function get_sortable_columns() {
+                return array(
+                        'username' =&gt; 'login',
+                        'name'     =&gt; 'name',
+                        'email'    =&gt; 'email',
+                        'posts'    =&gt; 'post_count',
+                );
+        }
+
+        function display_rows() {
+                // Query the post counts for this page
+                $post_counts = count_many_users_posts( array_keys( $this-&gt;items ) );
+
+                $style = '';
+                foreach ( $this-&gt;items as $userid =&gt; $user_object ) {
+                        $role = reset( $user_object-&gt;roles );
+
+                        if ( is_multisite() &amp;&amp; empty( $role ) )
+                                continue;
+
+                        $style = ( ' class=&quot;alternate&quot;' == $style ) ? '' : ' class=&quot;alternate&quot;';
+                        echo &quot;\n\t&quot;, $this-&gt;single_row( $user_object, $style, $role, $post_counts[ $userid ] );
+                }
+        }
+
+        /**
+         * Generate HTML for a single row on the users.php admin panel.
+         *
+         * @since 2.1.0
+         *
+         * @param object $user_object
+         * @param string $style Optional. Attributes added to the TR element.  Must be sanitized.
+         * @param string $role Key for the $wp_roles array.
+         * @param int $numposts Optional. Post count to display for this user.  Defaults to zero, as in, a new user has made zero posts.
+         * @return string
+         */
+        function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
+                global $wp_roles;
+
+                if ( !( is_object( $user_object ) &amp;&amp; is_a( $user_object, 'WP_User' ) ) )
+                        $user_object = new WP_User( (int) $user_object );
+                $user_object = sanitize_user_object( $user_object, 'display' );
+                $email = $user_object-&gt;user_email;
+                $url = $user_object-&gt;user_url;
+                $short_url = str_replace( 'http://', '', $url );
+                $short_url = str_replace( 'www.', '', $short_url );
+                if ( '/' == substr( $short_url, -1 ) )
+                        $short_url = substr( $short_url, 0, -1 );
+                if ( strlen( $short_url ) &gt; 35 )
+                        $short_url = substr( $short_url, 0, 32 ).'...';
+                $checkbox = '';
+                // Check if the user for this row is editable
+                if ( current_user_can( 'list_users' ) ) {
+                        // Set up the user editing link
+                        // TODO: make profile/user-edit determination a separate function
+                        if ( get_current_user_id() == $user_object-&gt;ID ) {
+                                $edit_link = 'profile.php';
+                        } else {
+                                $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( esc_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), &quot;user-edit.php?user_id=$user_object-&gt;ID&quot; ) );
+                        }
+                        $edit = &quot;&lt;strong&gt;&lt;a href=\&quot;$edit_link\&quot;&gt;$user_object-&gt;user_login&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&quot;;
+
+                        // Set up the hover actions for this user
+                        $actions = array();
+
+                        if ( current_user_can( 'edit_user',  $user_object-&gt;ID ) ) {
+                                $edit = &quot;&lt;strong&gt;&lt;a href=\&quot;$edit_link\&quot;&gt;$user_object-&gt;user_login&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&quot;;
+                                $actions['edit'] = '&lt;a href=&quot;' . $edit_link . '&quot;&gt;' . __( 'Edit' ) . '&lt;/a&gt;';
+                        } else {
+                                $edit = &quot;&lt;strong&gt;$user_object-&gt;user_login&lt;/strong&gt;&lt;br /&gt;&quot;;
+                        }
+
+                        if ( !is_multisite() &amp;&amp; get_current_user_id() != $user_object-&gt;ID &amp;&amp; current_user_can( 'delete_user', $user_object-&gt;ID ) )
+                                $actions['delete'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;users.php?action=delete&amp;amp;user=$user_object-&gt;ID&quot;, 'bulk-users' ) . &quot;'&gt;&quot; . __( 'Delete' ) . &quot;&lt;/a&gt;&quot;;
+                        if ( is_multisite() &amp;&amp; get_current_user_id() != $user_object-&gt;ID &amp;&amp; current_user_can( 'remove_user', $user_object-&gt;ID ) )
+                                $actions['remove'] = &quot;&lt;a class='submitdelete' href='&quot; . wp_nonce_url( &quot;users.php?action=remove&amp;amp;user=$user_object-&gt;ID&quot;, 'bulk-users' ) . &quot;'&gt;&quot; . __( 'Remove' ) . &quot;&lt;/a&gt;&quot;;
+                        $actions = apply_filters( 'user_row_actions', $actions, $user_object );
+                        $edit .= $this-&gt;row_actions( $actions );
+
+                        // Set up the checkbox ( because the user is editable, otherwise its empty )
+                        $checkbox = &quot;&lt;input type='checkbox' name='users[]' id='user_{$user_object-&gt;ID}' class='$role' value='{$user_object-&gt;ID}' /&gt;&quot;;
+
+                } else {
+                        $edit = '&lt;strong&gt;' . $user_object-&gt;user_login . '&lt;/strong&gt;';
+                }
+                $role_name = isset( $wp_roles-&gt;role_names[$role] ) ? translate_user_role( $wp_roles-&gt;role_names[$role] ) : __( 'None' );
+                $r = &quot;&lt;tr id='user-$user_object-&gt;ID'$style&gt;&quot;;
+                $avatar = get_avatar( $user_object-&gt;ID, 32 );
+
+                list( $columns, $hidden ) = $this-&gt;get_column_info();
+
+                foreach ( $columns as $column_name =&gt; $column_display_name ) {
+                        $class = &quot;class=\&quot;$column_name column-$column_name\&quot;&quot;;
+
+                        $style = '';
+                        if ( in_array( $column_name, $hidden ) )
+                                $style = ' style=&quot;display:none;&quot;';
+
+                        $attributes = &quot;$class$style&quot;;
+
+                        switch ( $column_name ) {
+                                case 'cb':
+                                        $r .= &quot;&lt;th scope='row' class='check-column'&gt;$checkbox&lt;/th&gt;&quot;;
+                                        break;
+                                case 'username':
+                                        $r .= &quot;&lt;td $attributes&gt;$avatar $edit&lt;/td&gt;&quot;;
+                                        break;
+                                case 'name':
+                                        $r .= &quot;&lt;td $attributes&gt;$user_object-&gt;first_name $user_object-&gt;last_name&lt;/td&gt;&quot;;
+                                        break;
+                                case 'email':
+                                        $r .= &quot;&lt;td $attributes&gt;&lt;a href='mailto:$email' title='&quot; . sprintf( __( 'E-mail: %s' ), $email ) . &quot;'&gt;$email&lt;/a&gt;&lt;/td&gt;&quot;;
+                                        break;
+                                case 'role':
+                                        $r .= &quot;&lt;td $attributes&gt;$role_name&lt;/td&gt;&quot;;
+                                        break;
+                                case 'posts':
+                                        $attributes = 'class=&quot;posts column-posts num&quot;' . $style;
+                                        $r .= &quot;&lt;td $attributes&gt;&quot;;
+                                        if ( $numposts &gt; 0 ) {
+                                                $r .= &quot;&lt;a href='edit.php?author=$user_object-&gt;ID' title='&quot; . __( 'View posts by this author' ) . &quot;' class='edit'&gt;&quot;;
+                                                $r .= $numposts;
+                                                $r .= '&lt;/a&gt;';
+                                        } else {
+                                                $r .= 0;
+                                        }
+                                        $r .= &quot;&lt;/td&gt;&quot;;
+                                        break;
+                                default:
+                                        $r .= &quot;&lt;td $attributes&gt;&quot;;
+                                        $r .= apply_filters( 'manage_users_custom_column', '', $column_name, $user_object-&gt;ID );
+                                        $r .= &quot;&lt;/td&gt;&quot;;
+                        }
+                }
+                $r .= '&lt;/tr&gt;';
+
+                return $r;
+        }
+}
+
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminincludesmetaboxesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/meta-boxes.php (15954 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/meta-boxes.php        2010-10-25 00:12:41 UTC (rev 15954)
+++ trunk/wp-admin/includes/meta-boxes.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -461,7 +461,7 @@
</span><span class="cx"> 
</span><span class="cx">         wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
</span><span class="cx"> 
</span><del>-        $wp_list_table = get_list_table('post-comments');
</del><ins>+        $wp_list_table = get_list_table('WP_Post_Comments_Table');
</ins><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;table class=&quot;widefat comments-box fixed&quot; cellspacing=&quot;0&quot; style=&quot;display:none;&quot;&gt;
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (15954 => 15955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-10-25 00:12:41 UTC (rev 15954)
+++ trunk/wp-admin/includes/template.php        2010-10-25 02:57:43 UTC (rev 15955)
</span><span class="lines">@@ -329,7 +329,7 @@
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        $wp_list_table = get_list_table('comments');
</del><ins>+        $wp_list_table = get_list_table('WP_Comments_Table');
</ins><span class="cx"> 
</span><span class="cx">         list ( $columns, $hidden ) = $wp_list_table-&gt;get_column_info();
</span><span class="cx">         $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
</span></span></pre>
</div>
</div>

</body>
</html>