<!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>[15519] trunk/wp-admin: replace $table with $wp_list_table.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15519">15519</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-08-22 11:22:46 +0000 (Sun, 22 Aug 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>replace $table with $wp_list_table. See <a href="http://trac.wordpress.org/ticket/14651">#14651</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminajaxphp">trunk/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunkwpadmineditcommentsphp">trunk/wp-admin/edit-comments.php</a></li>
<li><a href="#trunkwpadminedittagsphp">trunk/wp-admin/edit-tags.php</a></li>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminincludesdeprecatedphp">trunk/wp-admin/includes/deprecated.php</a></li>
<li><a href="#trunkwpadminincludesmetaboxesphp">trunk/wp-admin/includes/meta-boxes.php</a></li>
<li><a href="#trunkwpadminincludesplugininstallphp">trunk/wp-admin/includes/plugin-install.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminincludesthemeinstallphp">trunk/wp-admin/includes/theme-install.php</a></li>
<li><a href="#trunkwpadminlinkmanagerphp">trunk/wp-admin/link-manager.php</a></li>
<li><a href="#trunkwpadminnetworksitesphp">trunk/wp-admin/network/sites.php</a></li>
<li><a href="#trunkwpadminnetworkusersphp">trunk/wp-admin/network/users.php</a></li>
<li><a href="#trunkwpadminplugininstallphp">trunk/wp-admin/plugin-install.php</a></li>
<li><a href="#trunkwpadminpluginsphp">trunk/wp-admin/plugins.php</a></li>
<li><a href="#trunkwpadminthemeinstallphp">trunk/wp-admin/theme-install.php</a></li>
<li><a href="#trunkwpadminthemesphp">trunk/wp-admin/themes.php</a></li>
<li><a href="#trunkwpadminuploadphp">trunk/wp-admin/upload.php</a></li>
<li><a href="#trunkwpadminusersphp">trunk/wp-admin/users.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-ajax.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/admin-ajax.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx">         if ( class_exists( $class ) ) {
</span><span class="cx">                 global $current_screen;
</span><span class="cx">                 $current_screen = (object) $_GET['list_args']['screen'];
</span><del>-                $table = new $class;
-                $table->ajax_response();
</del><ins>+                $wp_list_table = new $class;
+                $wp_list_table->ajax_response();
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         die('0');
</span><span class="lines">@@ -558,7 +558,7 @@
</span><span class="cx">                 set_current_screen($_POST['screen']);
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Terms_Table();
</del><ins>+        $wp_list_table = new WP_Terms_Table();
</ins><span class="cx">
</span><span class="cx">         $level = 0;
</span><span class="cx">         $tag_full_name = false;
</span><span class="lines">@@ -570,10 +570,10 @@
</span><span class="cx">                         $tag_full_name = $_tag->name . ' &#8212; ' . $tag_full_name;
</span><span class="cx">                         $level++;
</span><span class="cx">                 }
</span><del>-                $noparents = $table->single_row( $tag, $level, $taxonomy );
</del><ins>+                $noparents = $wp_list_table->single_row( $tag, $level, $taxonomy );
</ins><span class="cx">         }
</span><span class="cx">         $tag->name = $tag_full_name;
</span><del>-        $parents = $table->single_row( $tag, 0, $taxonomy);
</del><ins>+        $parents = $wp_list_table->single_row( $tag, 0, $taxonomy);
</ins><span class="cx">
</span><span class="cx">         $x->add( array(
</span><span class="cx">                 'what' => 'taxonomy',
</span><span class="lines">@@ -626,17 +626,17 @@
</span><span class="cx">                 die('-1');
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Comments_Table();
-        $table->prepare_items();
</del><ins>+        $wp_list_table = new WP_Comments_Table();
+        $wp_list_table->prepare_items();
</ins><span class="cx">
</span><del>-        if ( !$table->has_items() )
</del><ins>+        if ( !$wp_list_table->has_items() )
</ins><span class="cx">                 die('1');
</span><span class="cx">
</span><span class="cx">         $x = new WP_Ajax_Response();
</span><del>-        foreach ( $table->items as $comment ) {
</del><ins>+        foreach ( $wp_list_table->items as $comment ) {
</ins><span class="cx">                 get_comment( $comment );
</span><span class="cx">                 ob_start();
</span><del>-                        $table->single_row( $comment->comment_ID, $mode, $comment_status, true, true );
</del><ins>+                        $wp_list_table->single_row( $comment->comment_ID, $mode, $comment_status, true, true );
</ins><span class="cx">                         $comment_list_item = ob_get_contents();
</span><span class="cx">                 ob_end_clean();
</span><span class="cx">                 $x->add( array(
</span><span class="lines">@@ -655,18 +655,18 @@
</span><span class="cx">                 die('-1');
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Comments_Table();
-        $table->prepare_items();
</del><ins>+        $wp_list_table = new WP_Comments_Table();
+        $wp_list_table->prepare_items();
</ins><span class="cx">
</span><del>-        if ( !$table->has_items() )
</del><ins>+        if ( !$wp_list_table->has_items() )
</ins><span class="cx">                 die('1');
</span><span class="cx">
</span><span class="cx">         $comment_list_item = '';
</span><span class="cx">         $x = new WP_Ajax_Response();
</span><del>-        foreach ( $table->items as $comment ) {
</del><ins>+        foreach ( $wp_list_table->items as $comment ) {
</ins><span class="cx">                 get_comment( $comment );
</span><span class="cx">                 ob_start();
</span><del>-                        $table->single_row( $comment->comment_ID, 'single', false, false );
</del><ins>+                        $wp_list_table->single_row( $comment->comment_ID, 'single', false, false );
</ins><span class="cx">                         $comment_list_item .= ob_get_contents();
</span><span class="cx">                 ob_end_clean();
</span><span class="cx">         }
</span><span class="lines">@@ -680,7 +680,7 @@
</span><span class="cx">         check_ajax_referer( $action, '_ajax_nonce-replyto-comment' );
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Comments_Table();
</del><ins>+        $wp_list_table = new WP_Comments_Table();
</ins><span class="cx">
</span><span class="cx">         $comment_post_ID = (int) $_POST['comment_post_ID'];
</span><span class="cx">         if ( !current_user_can( 'edit_post', $comment_post_ID ) )
</span><span class="lines">@@ -729,7 +729,7 @@
</span><span class="cx">                         require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
</span><span class="cx">                         _wp_dashboard_recent_comments_row( $comment, false );
</span><span class="cx">                 } else {
</span><del>-                        $table->single_row( $comment->comment_ID, $mode, false, $checkbox );
</del><ins>+                        $wp_list_table->single_row( $comment->comment_ID, $mode, false, $checkbox );
</ins><span class="cx">                 }
</span><span class="cx">                 $comment_list_item = ob_get_contents();
</span><span class="cx">         ob_end_clean();
</span><span class="lines">@@ -762,10 +762,10 @@
</span><span class="cx">         $comments_listing = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Comments_Table();
</del><ins>+        $wp_list_table = new WP_Comments_Table();
</ins><span class="cx">
</span><span class="cx">         ob_start();
</span><del>-                $table->single_row( $comment_id, $mode, $comments_listing, $checkbox );
</del><ins>+                $wp_list_table->single_row( $comment_id, $mode, $comments_listing, $checkbox );
</ins><span class="cx">                 $comment_list_item = ob_get_contents();
</span><span class="cx">         ob_end_clean();
</span><span class="cx">
</span><span class="lines">@@ -911,12 +911,12 @@
</span><span class="cx">         $user_object = new WP_User( $user_id );
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Users_Table();
</del><ins>+        $wp_list_table = new WP_Users_Table();
</ins><span class="cx">
</span><span class="cx">         $x = new WP_Ajax_Response( array(
</span><span class="cx">                 'what' => 'user',
</span><span class="cx">                 'id' => $user_id,
</span><del>-                'data' => $table->single_row( $user_object, '', $user_object->roles[0] ),
</del><ins>+                'data' => $wp_list_table->single_row( $user_object, '', $user_object->roles[0] ),
</ins><span class="cx">                 'supplemental' => array(
</span><span class="cx">                         'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login),
</span><span class="cx">                         'role' => $user_object->roles[0]
</span><span class="lines">@@ -1204,10 +1204,10 @@
</span><span class="cx">         edit_post();
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Posts_Table();
</del><ins>+        $wp_list_table = new WP_Posts_Table();
</ins><span class="cx">
</span><span class="cx">         $mode = $_POST['post_view'];
</span><del>-        $table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
</del><ins>+        $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
</ins><span class="cx">
</span><span class="cx">         exit;
</span><span class="cx">         break;
</span><span class="lines">@@ -1215,9 +1215,9 @@
</span><span class="cx">         check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' );
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Terms_Table();
</del><ins>+        $wp_list_table = new WP_Terms_Table();
</ins><span class="cx">
</span><del>-        $table->check_permissions('edit');
</del><ins>+        $wp_list_table->check_permissions('edit');
</ins><span class="cx">
</span><span class="cx">         if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) )
</span><span class="cx">                 die(-1);
</span><span class="lines">@@ -1234,7 +1234,7 @@
</span><span class="cx">                         die( __('Item not updated.') );
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                echo $table->single_row( $tag, 0, $taxonomy );
</del><ins>+                echo $wp_list_table->single_row( $tag, 0, $taxonomy );
</ins><span class="cx">         } else {
</span><span class="cx">                 if ( is_wp_error($updated) && $updated->get_error_message() )
</span><span class="cx">                         die( $updated->get_error_message() );
</span></span></pre></div>
<a id="trunkwpadmineditcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-comments.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-comments.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/edit-comments.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,8 +11,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Comments_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Comments_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> if ( isset( $_REQUEST['doaction'] ) || isset( $_REQUEST['doaction2'] ) || isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
</span><span class="cx">         check_admin_referer( 'bulk-comments' );
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">          exit;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-$table->prepare_items();
</del><ins>+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> wp_enqueue_script('admin-comments');
</span><span class="cx"> enqueue_comment_hotkeys_js();
</span><span class="lines">@@ -257,17 +257,17 @@
</span><span class="cx"> <input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" />
</span><span class="cx"> <input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" />
</span><span class="cx">
</span><del>-<input type="hidden" name="_total" value="<?php echo esc_attr( $table->get_pagination_arg('total_items') ); ?>" />
-<input type="hidden" name="_per_page" value="<?php echo esc_attr( $table->get_pagination_arg('per_page') ); ?>" />
-<input type="hidden" name="_page" value="<?php echo esc_attr( $table->get_pagination_arg('page') ); ?>" />
</del><ins>+<input type="hidden" name="_total" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('total_items') ); ?>" />
+<input type="hidden" name="_per_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('per_page') ); ?>" />
+<input type="hidden" name="_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('page') ); ?>" />
</ins><span class="cx">
</span><span class="cx"> <?php if ( isset($_REQUEST['paged']) ) { ?>
</span><span class="cx">         <input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
</span><span class="cx"> <?php } ?>
</span><span class="cx">
</span><del>-<?php if ( $table->has_items() ) { ?>
</del><ins>+<?php if ( $wp_list_table->has_items() ) { ?>
</ins><span class="cx">
</span><del>-<?php $table->display_table(); ?>
</del><ins>+<?php $wp_list_table->display_table(); ?>
</ins><span class="cx">
</span><span class="cx"> <br class="clear" />
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkwpadminedittagsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-tags.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-tags.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/edit-tags.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,8 +11,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Terms_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Terms_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> $title = $tax->labels->name;
</span><span class="cx">
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">          exit;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-$table->prepare_items();
</del><ins>+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> wp_enqueue_script('admin-tags');
</span><span class="cx"> if ( current_user_can($tax->cap->edit_terms) )
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx"> <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
</span><span class="cx"> <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
</span><span class="cx">
</span><del>-<?php $table->display_table(); ?>
</del><ins>+<?php $wp_list_table->display_table(); ?>
</ins><span class="cx">
</span><span class="cx"> <br class="clear" />
</span><span class="cx"> </form>
</span><span class="lines">@@ -351,7 +351,7 @@
</span><span class="cx"> </div><!-- /col-container -->
</span><span class="cx"> </div><!-- /wrap -->
</span><span class="cx">
</span><del>-<?php $table->inline_edit(); ?>
</del><ins>+<?php $wp_list_table->inline_edit(); ?>
</ins><span class="cx">
</span><span class="cx"> <?php
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/edit.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,8 +11,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Posts_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Posts_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> // Back-compat for viewing comments of an entry
</span><span class="cx"> if ( $_redirect = intval( max( @$_REQUEST['p'], @$_REQUEST['attachment_id'], @$_REQUEST['page_id'] ) ) ) {
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx">         $post_new_file = 'post-new.php';
</span><span class="cx"> }
</span><span class="cx">
</span><del>-$table->prepare_items();
</del><ins>+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> wp_enqueue_script('inline-edit-post');
</span><span class="cx">
</span><span class="lines">@@ -280,11 +280,11 @@
</span><span class="cx"> <input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
</span><span class="cx"> <input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
</span><span class="cx">
</span><del>-<?php $table->display(); ?>
</del><ins>+<?php $wp_list_table->display(); ?>
</ins><span class="cx">
</span><span class="cx"> </form>
</span><span class="cx">
</span><del>-<?php $table->inline_edit(); ?>
</del><ins>+<?php $wp_list_table->inline_edit(); ?>
</ins><span class="cx">
</span><span class="cx"> <div id="ajax-response"></div>
</span><span class="cx"> <br class="clear" />
</span></span></pre></div>
<a id="trunkwpadminincludesdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/deprecated.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/deprecated.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/includes/deprecated.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -211,15 +211,10 @@
</span><span class="cx"> function register_column_headers($screen, $columns) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
</span><span class="cx">
</span><del>-        global $_wp_column_headers;
</del><ins>+        global $wp_list_table;
</ins><span class="cx">
</span><del>-        if ( is_string($screen) )
-                $screen = convert_to_screen($screen);
-
-        if ( !isset($_wp_column_headers) )
-                $_wp_column_headers = array();
-
-        $_wp_column_headers[$screen->id] = $columns;
</del><ins>+        $wp_list_table = new _WP_List_Table_Compat($screen);
+        $wp_list_table->_columns = $columns;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -235,9 +230,12 @@
</span><span class="cx"> function get_column_headers($screen) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
</span><span class="cx">
</span><del>-        $table = new _WP_List_Table_Compat($screen);
-        list( $columns ) = $table->get_column_headers();
</del><ins>+        global $wp_list_table;
+        if ( !is_a($wp_list_table, 'WP_List_Table') )
+                $wp_list_table = new _WP_List_Table_Compat($screen);
</ins><span class="cx">
</span><ins>+        list( $columns ) = $wp_list_table->get_column_headers();
+
</ins><span class="cx">         return $columns;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -251,9 +249,11 @@
</span><span class="cx"> function print_column_headers($screen, $id = true) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
</span><span class="cx">
</span><del>-        $table = new _WP_List_Table_Compat($screen);
</del><ins>+        global $wp_list_table;
+        if ( !is_a($wp_list_table, 'WP_List_Table') )
+                $wp_list_table = new _WP_List_Table_Compat($screen);
</ins><span class="cx">
</span><del>-        $table->print_column_headers($id);
</del><ins>+        $wp_list_table->print_column_headers($id);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -269,14 +269,18 @@
</span><span class="cx"> function get_hidden_columns($screen) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
</span><span class="cx">
</span><del>-        $table = new _WP_List_Table_Compat($screen);
</del><ins>+        global $wp_list_table;
+        if ( !is_a($wp_list_table, 'WP_List_Table') )
+                $wp_list_table = new _WP_List_Table_Compat($screen);
</ins><span class="cx">
</span><del>-        return $table->get_hidden_columns();
</del><ins>+        return $wp_list_table->get_hidden_columns();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Helper class to be used only by deprecated functions
</span><span class="cx"> class _WP_List_Table_Compat extends WP_List_Table {
</span><span class="cx">
</span><ins>+        var $_columns = array();
+
</ins><span class="cx">         function _WP_List_Table_Compat( $screen) {
</span><span class="cx">                 parent::WP_List_Table( array(
</span><span class="cx">                         'screen' => $screen,
</span><span class="lines">@@ -285,12 +289,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         function get_columns() {
</span><del>-                global $_wp_column_headers;
-
-                if ( isset($_wp_column_headers[$this->_screen->id]) )
-                        return $_wp_column_headers[$this->_screen->id];
-
-                return array();        
</del><ins>+                return $this->_columns;
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminincludesmetaboxesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/meta-boxes.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/meta-boxes.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/includes/meta-boxes.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -463,12 +463,12 @@
</span><span class="cx">         add_filter('manage_edit-comments_sortable_columns', create_function('', 'return array();'), 8);
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Comments_Table;
</del><ins>+        $wp_list_table = new WP_Comments_Table;
</ins><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx"> <table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
</span><span class="cx"> <thead><tr>
</span><del>-        <?php $table->print_column_headers(); ?>
</del><ins>+        <?php $wp_list_table->print_column_headers(); ?>
</ins><span class="cx"> </tr></thead>
</span><span class="cx"> <tbody id="the-comment-list" class="list:comment"></tbody>
</span><span class="cx"> </table>
</span></span></pre></div>
<a id="trunkwpadminincludesplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/plugin-install.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/plugin-install.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/includes/plugin-install.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -162,9 +162,9 @@
</span><span class="cx"> * @param int $total_plugins Number of plugins.
</span><span class="cx"> */
</span><span class="cx"> function display_plugins_table() {
</span><del>-        global $table;
</del><ins>+        global $wp_list_table;
</ins><span class="cx">
</span><del>-        $table->display();
</del><ins>+        $wp_list_table->display();
</ins><span class="cx"> }
</span><span class="cx"> add_action('install_plugins_search', 'display_plugins_table');
</span><span class="cx"> add_action('install_plugins_featured', 'display_plugins_table');
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/includes/template.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -294,10 +294,10 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         require_once( './includes/default-list-tables.php' );
</span><del>-        $table = new WP_Comments_Table( 'reply' );
</del><ins>+        $wp_list_table = new WP_Comments_Table( 'reply' );
</ins><span class="cx">
</span><del>-        $columns = $table->get_column_headers();
-        $hidden = array_intersect( array_keys( $columns ), array_filter( $table->get_hidden_columns() ) );
</del><ins>+        $columns = $wp_list_table->get_column_headers();
+        $hidden = array_intersect( array_keys( $columns ), array_filter( $wp_list_table->get_hidden_columns() ) );
</ins><span class="cx">         $col_count = count($columns) - count($hidden);
</span><span class="cx">
</span><span class="cx"> ?>
</span><span class="lines">@@ -1293,9 +1293,9 @@
</span><span class="cx"> * @param unknown_type $page
</span><span class="cx"> */
</span><span class="cx"> function manage_columns_prefs( $page ) {
</span><del>-        global $table;
</del><ins>+        global $wp_list_table;
</ins><span class="cx">
</span><del>-        list( $columns, $hidden ) = $table->get_column_headers();
</del><ins>+        list( $columns, $hidden ) = $wp_list_table->get_column_headers();
</ins><span class="cx">
</span><span class="cx">         $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username');
</span><span class="cx">
</span><span class="lines">@@ -1629,13 +1629,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function screen_meta($screen) {
</span><del>-        global $wp_meta_boxes, $_wp_contextual_help, $title, $table;
</del><ins>+        global $wp_meta_boxes, $_wp_contextual_help, $title, $wp_list_table;
</ins><span class="cx">
</span><span class="cx">         if ( is_string($screen) )
</span><span class="cx">                 $screen = convert_to_screen($screen);
</span><span class="cx">
</span><del>-        if ( is_a($table, 'WP_List_Table') )
-                list( $screen_columns ) = $table->get_column_headers();
</del><ins>+        if ( is_a($wp_list_table, 'WP_List_Table') )
+                list( $screen_columns ) = $wp_list_table->get_column_headers();
</ins><span class="cx">         $meta_screens = array('index' => 'dashboard');
</span><span class="cx">
</span><span class="cx">         if ( isset($meta_screens[$screen->id]) ) {
</span></span></pre></div>
<a id="trunkwpadminincludesthemeinstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/theme-install.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/theme-install.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/includes/theme-install.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -261,9 +261,9 @@
</span><span class="cx"> * @since 2.8.0
</span><span class="cx"> */
</span><span class="cx"> function display_themes() {
</span><del>-        global $table;
</del><ins>+        global $wp_list_table;
</ins><span class="cx">
</span><del>-        $table->display();
</del><ins>+        $wp_list_table->display();
</ins><span class="cx"> }
</span><span class="cx"> add_action('install_themes_search', 'display_themes');
</span><span class="cx"> add_action('install_themes_featured', 'display_themes');
</span></span></pre></div>
<a id="trunkwpadminlinkmanagerphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/link-manager.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/link-manager.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/link-manager.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,8 +11,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Links_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Links_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> // Handle bulk deletes
</span><span class="cx"> if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['linkcheck'] ) ) {
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">          exit;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-$table->prepare_items();
</del><ins>+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> $title = __('Links');
</span><span class="cx"> $this_file = $parent_file = 'link-manager.php';
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> <br class="clear" />
</span><span class="cx">
</span><span class="cx"> <form id="posts-filter" action="" method="post">
</span><del>-<?php $table->display(); ?>
</del><ins>+<?php $wp_list_table->display(); ?>
</ins><span class="cx"> <div id="ajax-response"></div>
</span><span class="cx"> </form>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminnetworksitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/sites.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/sites.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/network/sites.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -14,8 +14,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( '../includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Sites_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Sites_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> $title = __( 'Sites' );
</span><span class="cx"> $parent_file = 'sites.php';
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx">         // List sites
</span><span class="cx">         case 'list':
</span><span class="cx">         default:
</span><del>-                $table->prepare_items();
</del><ins>+                $wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx">                 require_once( '../admin-header.php' );
</span><span class="cx">                 ?>
</span><span class="lines">@@ -378,7 +378,7 @@
</span><span class="cx">                 </form>
</span><span class="cx">
</span><span class="cx">                 <form id="form-site-list" action="edit.php?action=allblogs" method="post">
</span><del>-                        <?php $table->display(); ?>
</del><ins>+                        <?php $wp_list_table->display(); ?>
</ins><span class="cx">                 </form>
</span><span class="cx">                 </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminnetworkusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/users.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/users.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/network/users.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,9 +11,9 @@
</span><span class="cx">
</span><span class="cx"> require_once( '../includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_MS_Users_Table;
-$table->check_permissions();
-$table->prepare_items();
</del><ins>+$wp_list_table = new WP_MS_Users_Table;
+$wp_list_table->check_permissions();
+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> $title = __( 'Users' );
</span><span class="cx"> $parent_file = 'users.php';
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">         </form>
</span><span class="cx">
</span><span class="cx">         <form id="form-user-list" action='edit.php?action=allusers' method='post'>
</span><del>-                <?php $table->display(); ?>
</del><ins>+                <?php $wp_list_table->display(); ?>
</ins><span class="cx">         </form>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugin-install.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugin-install.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/plugin-install.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,9 +11,9 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Plugin_Install_Table;
-$table->check_permissions();
-$table->prepare_items();
</del><ins>+$wp_list_table = new WP_Plugin_Install_Table;
+$wp_list_table->check_permissions();
+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> $title = __('Install Plugins');
</span><span class="cx"> $parent_file = 'plugins.php';
</span></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/plugins.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,8 +11,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( ABSPATH . 'wp-admin/includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Plugins_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Plugins_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> if ( isset($_POST['clear-recent-list']) )
</span><span class="cx">         $action = 'clear-recent-list';
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx"> if ( $status != $default_status && 'search' != $status )
</span><span class="cx">         update_user_meta( get_current_user_id(), 'plugins_last_view', $status );
</span><span class="cx">
</span><del>-$table->prepare_items();
</del><ins>+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> wp_enqueue_script('plugin-install');
</span><span class="cx"> add_thickbox();
</span><span class="lines">@@ -438,7 +438,7 @@
</span><span class="cx">         echo '<br class="clear"><p>' . __( 'Drop-ins are advanced plugins in the <code>/wp-content</code> directory that replace WordPress functionality when present.' ) . '</p>';
</span><span class="cx"> ?>
</span><span class="cx">
</span><del>-<?php $table->display(); ?>
</del><ins>+<?php $wp_list_table->display(); ?>
</ins><span class="cx"> </form>
</span><span class="cx">
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkwpadminthemeinstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/theme-install.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/theme-install.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/theme-install.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,9 +11,9 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Theme_Install_Table;
-$table->check_permissions();
-$table->prepare_items();
</del><ins>+$wp_list_table = new WP_Theme_Install_Table;
+$wp_list_table->check_permissions();
+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> $title = __('Install Themes');
</span><span class="cx"> $parent_file = 'themes.php';
</span></span></pre></div>
<a id="trunkwpadminthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/themes.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/themes.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/themes.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,8 +11,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Themes_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Themes_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> if ( current_user_can('switch_themes') && isset($_GET['action']) ) {
</span><span class="cx">         if ( 'activate' == $_GET['action'] ) {
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-$table->prepare_items();
</del><ins>+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> $title = __('Manage Themes');
</span><span class="cx"> $parent_file = 'themes.php';
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> ?>
</span><span class="cx"> <h3><?php _e('Available Themes'); ?></h3>
</span><span class="cx">
</span><del>-<?php $table->display(); ?>
</del><ins>+<?php $wp_list_table->display(); ?>
</ins><span class="cx">
</span><span class="cx"> <br class="clear" />
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/upload.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -11,8 +11,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Media_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Media_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> // Handle bulk actions
</span><span class="cx"> if ( isset($_REQUEST['find_detached']) ) {
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">          exit;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-$table->prepare_items();
</del><ins>+$wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx"> $title = __('Media Library');
</span><span class="cx"> $parent_file = 'upload.php';
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx"> </form>
</span><span class="cx">
</span><span class="cx"> <form id="posts-filter" action="" method="post">
</span><del>-<?php $table->display(); ?>
</del><ins>+<?php $wp_list_table->display(); ?>
</ins><span class="cx"> <div id="ajax-response"></div>
</span><span class="cx"> <?php find_posts_div(); ?>
</span><span class="cx"> <br class="clear" />
</span></span></pre></div>
<a id="trunkwpadminusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/users.php (15518 => 15519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/users.php        2010-08-22 01:50:34 UTC (rev 15518)
+++ trunk/wp-admin/users.php        2010-08-22 11:22:46 UTC (rev 15519)
</span><span class="lines">@@ -14,8 +14,8 @@
</span><span class="cx">
</span><span class="cx"> require_once( './includes/default-list-tables.php' );
</span><span class="cx">
</span><del>-$table = new WP_Users_Table;
-$table->check_permissions();
</del><ins>+$wp_list_table = new WP_Users_Table;
+$wp_list_table->check_permissions();
</ins><span class="cx">
</span><span class="cx"> $title = __('Users');
</span><span class="cx"> $parent_file = 'users.php';
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">                 exit;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        $table->prepare_items();
</del><ins>+        $wp_list_table->prepare_items();
</ins><span class="cx">
</span><span class="cx">         include('./admin-header.php');
</span><span class="cx">
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx"> </form>
</span><span class="cx">
</span><span class="cx"> <form id="posts-filter" action="" method="post">
</span><del>-<?php $table->display(); ?>
</del><ins>+<?php $wp_list_table->display(); ?>
</ins><span class="cx"> </form>
</span><span class="cx">
</span><span class="cx"> <?php
</span></span></pre>
</div>
</div>
</body>
</html>