<!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>[15528] trunk/wp-admin: Introduce get_list_table().</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15528">15528</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-08-25 00:51:44 +0000 (Wed, 25 Aug 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Introduce get_list_table(). See <a href="http://trac.wordpress.org/ticket/14579">#14579</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="#trunkwpadminincludeslisttablephp">trunk/wp-admin/includes/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>
<li><a href="#trunkwpadminlinkmanagerphp">trunk/wp-admin/link-manager.php</a></li>
<li><a href="#trunkwpadminnetworkadminphp">trunk/wp-admin/network/admin.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 (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/admin-ajax.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -51,12 +51,11 @@
</span><span class="cx"> if ( isset( $_GET['action'] ) ) :
</span><span class="cx"> switch ( $action = $_GET['action'] ) :
</span><span class="cx"> case 'fetch-list' :
</span><del>-        require_once( './includes/default-list-tables.php' );
</del><ins>+        require_once( ABSPATH . '/wp-admin/includes/default-list-tables.php' );
</ins><span class="cx">
</span><span class="cx">         $class = $_GET['list_args']['class'];
</span><span class="cx">
</span><span class="cx">         if ( class_exists( $class ) ) {
</span><del>-                global $current_screen;
</del><span class="cx">                 $current_screen = (object) $_GET['list_args']['screen'];
</span><span class="cx">                 $wp_list_table = new $class;
</span><span class="cx">                 $wp_list_table->ajax_response();
</span><span class="lines">@@ -557,8 +556,7 @@
</span><span class="cx">         if ( isset($_POST['screen']) )
</span><span class="cx">                 set_current_screen($_POST['screen']);
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Terms_Table();
</del><ins>+        $wp_list_table = get_list_table('terms');
</ins><span class="cx">
</span><span class="cx">         $level = 0;
</span><span class="cx">         $tag_full_name = false;
</span><span class="lines">@@ -625,8 +623,7 @@
</span><span class="cx">         if ( !current_user_can( 'edit_posts' ) )
</span><span class="cx">                 die('-1');
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Comments_Table();
</del><ins>+        $wp_list_table = get_list_table('comments');
</ins><span class="cx">         $wp_list_table->prepare_items();
</span><span class="cx">
</span><span class="cx">         if ( !$wp_list_table->has_items() )
</span><span class="lines">@@ -654,8 +651,7 @@
</span><span class="cx">         if ( !current_user_can( 'edit_post', $post_ID ) )
</span><span class="cx">                 die('-1');
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Comments_Table();
</del><ins>+        $wp_list_table = get_list_table('comments');
</ins><span class="cx">         $wp_list_table->prepare_items();
</span><span class="cx">
</span><span class="cx">         if ( !$wp_list_table->has_items() )
</span><span class="lines">@@ -679,8 +675,7 @@
</span><span class="cx"> case 'replyto-comment' :
</span><span class="cx">         check_ajax_referer( $action, '_ajax_nonce-replyto-comment' );
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Comments_Table();
</del><ins>+        $wp_list_table = get_list_table('comments');
</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">@@ -761,8 +756,7 @@
</span><span class="cx">         $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
</span><span class="cx">         $comments_listing = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Comments_Table();
</del><ins>+        $wp_list_table = get_list_table('comments');
</ins><span class="cx">
</span><span class="cx">         ob_start();
</span><span class="cx">                 $wp_list_table->single_row( $comment_id, $mode, $comments_listing, $checkbox );
</span><span class="lines">@@ -910,8 +904,7 @@
</span><span class="cx">         }
</span><span class="cx">         $user_object = new WP_User( $user_id );
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Users_Table();
</del><ins>+        $wp_list_table = get_list_table('users');
</ins><span class="cx">
</span><span class="cx">         $x = new WP_Ajax_Response( array(
</span><span class="cx">                 'what' => 'user',
</span><span class="lines">@@ -1203,8 +1196,7 @@
</span><span class="cx">         // update the post
</span><span class="cx">         edit_post();
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Posts_Table();
</del><ins>+        $wp_list_table = get_list_table('posts');
</ins><span class="cx">
</span><span class="cx">         $mode = $_POST['post_view'];
</span><span class="cx">         $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
</span><span class="lines">@@ -1214,8 +1206,7 @@
</span><span class="cx"> case 'inline-save-tax':
</span><span class="cx">         check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' );
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Terms_Table();
</del><ins>+        $wp_list_table = get_list_table('terms');
</ins><span class="cx">
</span><span class="cx">         $wp_list_table->check_permissions('edit');
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadmineditcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-comments.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-comments.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/edit-comments.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once('./admin.php');
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Comments_Table;
</del><ins>+$wp_list_table = get_list_table('comments');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> if ( isset( $_REQUEST['doaction'] ) || isset( $_REQUEST['doaction2'] ) || isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
</span></span></pre></div>
<a id="trunkwpadminedittagsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-tags.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-tags.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/edit-tags.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once('./admin.php');
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Terms_Table;
</del><ins>+$wp_list_table = get_list_table('terms');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> $title = $tax->labels->name;
</span></span></pre></div>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/edit.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once( './admin.php' );
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Posts_Table;
</del><ins>+$wp_list_table = get_list_table('posts');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> // Back-compat for viewing comments of an entry
</span></span></pre></div>
<a id="trunkwpadminincludeslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/list-table.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/list-table.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/includes/list-table.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -628,8 +628,9 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /**
</span><del>-         * Handle an incoming ajax request ( called from admin-ajax.php )
</del><ins>+         * Handle an incoming ajax request (called from admin-ajax.php)
</ins><span class="cx">          *
</span><ins>+         * @since 3.1.0
</ins><span class="cx">          * @access public
</span><span class="cx">          */
</span><span class="cx">         function ajax_response() {
</span><span class="lines">@@ -665,3 +666,23 @@
</span><span class="cx">                 );
</span><span class="cx">         }
</span><span class="cx"> }
</span><ins>+
+/**
+ * Fetch an instance of a WP_List_Table class
+ *
+ * @since 3.1.0
+ *
+ * @param string $type The type of the list table
+ * @return object
+ */
+function get_list_table( $type ) {
+        require_once( ABSPATH . '/wp-admin/includes/default-list-tables.php' );
+
+        $type = strtr( ucwords( strtr( $type, '-', ' ') ), ' ', '_' );
+
+        $class = "WP_{$type}_Table";
+        $class = apply_filters( "get_list_table_$type", $class );
+
+        return new $class;
+}
+
</ins></span></pre></div>
<a id="trunkwpadminincludesmetaboxesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/meta-boxes.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/meta-boxes.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/includes/meta-boxes.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -462,8 +462,7 @@
</span><span class="cx">         add_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead', 8, 1);
</span><span class="cx">         add_filter('manage_edit-comments_sortable_columns', create_function('', 'return array();'), 8);
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Comments_Table;
</del><ins>+        $wp_list_table = get_list_table('comments');
</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></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/includes/template.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -293,8 +293,7 @@
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        require_once( './includes/default-list-tables.php' );
-        $wp_list_table = new WP_Comments_Table( 'reply' );
</del><ins>+        $wp_list_table = get_list_table('comments');
</ins><span class="cx">
</span><span class="cx">         $columns = $wp_list_table->get_column_headers();
</span><span class="cx">         $hidden = array_intersect( array_keys( $columns ), array_filter( $wp_list_table->get_hidden_columns() ) );
</span></span></pre></div>
<a id="trunkwpadminlinkmanagerphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/link-manager.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/link-manager.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/link-manager.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** Load WordPress Administration Bootstrap */
</span><span class="cx"> require_once ('admin.php');
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Links_Table;
</del><ins>+$wp_list_table = get_list_table('links');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> // Handle bulk deletes
</span></span></pre></div>
<a id="trunkwpadminnetworkadminphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/admin.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/admin.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/network/admin.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -10,4 +10,4 @@
</span><span class="cx"> if ( ! is_main_site() )
</span><span class="cx">         wp_redirect( network_admin_url() );
</span><span class="cx">
</span><del>-?>
</del><span class="cx">\ No newline at end of file
</span><ins>+?>
</ins></span></pre></div>
<a id="trunkwpadminnetworksitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/sites.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/sites.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/network/sites.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -12,9 +12,7 @@
</span><span class="cx"> if ( ! is_multisite() )
</span><span class="cx">         wp_die( __( 'Multisite support is not enabled.' ) );
</span><span class="cx">
</span><del>-require_once( '../includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Sites_Table;
</del><ins>+$wp_list_table = get_list_table('sites');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> $title = __( 'Sites' );
</span></span></pre></div>
<a id="trunkwpadminnetworkusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/users.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/users.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/network/users.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx">
</span><span class="cx"> require_once( './admin.php' );
</span><span class="cx">
</span><del>-require_once( '../includes/default-list-tables.php' );
-
-$wp_list_table = new WP_MS_Users_Table;
</del><ins>+$wp_list_table = get_list_table('ms-users');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx"> $wp_list_table->prepare_items();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugin-install.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugin-install.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/plugin-install.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once('./admin.php');
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Plugin_Install_Table;
</del><ins>+$wp_list_table = get_list_table('plugin-install');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx"> $wp_list_table->prepare_items();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/plugins.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once('./admin.php');
</span><span class="cx">
</span><del>-require_once( ABSPATH . 'wp-admin/includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Plugins_Table;
</del><ins>+$wp_list_table = get_list_table('plugins');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> if ( isset($_POST['clear-recent-list']) )
</span></span></pre></div>
<a id="trunkwpadminthemeinstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/theme-install.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/theme-install.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/theme-install.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once('./admin.php');
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Theme_Install_Table;
</del><ins>+$wp_list_table = get_list_table('theme-install');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx"> $wp_list_table->prepare_items();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/themes.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/themes.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/themes.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once('./admin.php');
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Themes_Table;
</del><ins>+$wp_list_table = get_list_table('themes');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> if ( current_user_can('switch_themes') && isset($_GET['action']) ) {
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/upload.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -9,9 +9,7 @@
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once( './admin.php' );
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Media_Table;
</del><ins>+$wp_list_table = get_list_table('media');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> // Handle bulk actions
</span></span></pre></div>
<a id="trunkwpadminusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/users.php (15527 => 15528)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/users.php        2010-08-24 19:50:55 UTC (rev 15527)
+++ trunk/wp-admin/users.php        2010-08-25 00:51:44 UTC (rev 15528)
</span><span class="lines">@@ -12,9 +12,7 @@
</span><span class="cx"> /** WordPress Registration API */
</span><span class="cx"> require_once( ABSPATH . WPINC . '/registration.php');
</span><span class="cx">
</span><del>-require_once( './includes/default-list-tables.php' );
-
-$wp_list_table = new WP_Users_Table;
</del><ins>+$wp_list_table = get_list_table('users');
</ins><span class="cx"> $wp_list_table->check_permissions();
</span><span class="cx">
</span><span class="cx"> $title = __('Users');
</span></span></pre>
</div>
</div>
</body>
</html>