Commit the rest of [15955]. see #14579.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-10-25 02:58:25 +00:00
parent 6f20df8a51
commit 48d8763734
13 changed files with 26 additions and 30 deletions

View File

@ -51,19 +51,15 @@ if ( ! is_user_logged_in() ) {
if ( isset( $_GET['action'] ) ) : if ( isset( $_GET['action'] ) ) :
switch ( $action = $_GET['action'] ) : switch ( $action = $_GET['action'] ) :
case 'fetch-list' : case 'fetch-list' :
require_once( ABSPATH . '/wp-admin/includes/default-list-tables.php' );
// Temp
require_once( ABSPATH . '/wp-admin/includes/list-table-posts.php' );
$class = $_GET['list_args']['class']; $wp_list_table = get_list_table( $_GET['list_args']['class'] );
if ( ! $wp_list_table )
die( '0' );
if ( class_exists( $class ) ) { $current_screen = (object) $_GET['list_args']['screen'];
$current_screen = (object) $_GET['list_args']['screen']; $wp_list_table->ajax_response();
$wp_list_table = new $class;
$wp_list_table->ajax_response();
}
die('0'); die( '0' );
break; break;
case 'ajax-tag-search' : case 'ajax-tag-search' :
if ( !current_user_can( 'edit_posts' ) ) if ( !current_user_can( 'edit_posts' ) )
@ -558,7 +554,7 @@ case 'add-tag' :
if ( isset($_POST['screen']) ) if ( isset($_POST['screen']) )
set_current_screen($_POST['screen']); set_current_screen($_POST['screen']);
$wp_list_table = get_list_table('terms'); $wp_list_table = get_list_table('WP_Terms_Table');
$level = 0; $level = 0;
if ( is_taxonomy_hierarchical($taxonomy) ) { if ( is_taxonomy_hierarchical($taxonomy) ) {
@ -622,7 +618,7 @@ case 'add-comment' :
if ( !current_user_can( 'edit_posts' ) ) if ( !current_user_can( 'edit_posts' ) )
die('-1'); die('-1');
$wp_list_table = get_list_table('comments'); $wp_list_table = get_list_table('WP_Comments_Table');
$wp_list_table->from_ajax = true; $wp_list_table->from_ajax = true;
$wp_list_table->prepare_items(); $wp_list_table->prepare_items();
@ -651,7 +647,7 @@ case 'get-comments' :
if ( !current_user_can( 'edit_post', $post_ID ) ) if ( !current_user_can( 'edit_post', $post_ID ) )
die('-1'); die('-1');
$wp_list_table = get_list_table('post-comments'); $wp_list_table = get_list_table('WP_Post_Comments_Table');
$wp_list_table->prepare_items(); $wp_list_table->prepare_items();
@ -676,7 +672,7 @@ case 'get-comments' :
case 'replyto-comment' : case 'replyto-comment' :
check_ajax_referer( $action, '_ajax_nonce-replyto-comment' ); check_ajax_referer( $action, '_ajax_nonce-replyto-comment' );
$wp_list_table = get_list_table('comments'); $wp_list_table = get_list_table('WP_Comments_Table');
$wp_list_table->checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; $wp_list_table->checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
$comment_post_ID = (int) $_POST['comment_post_ID']; $comment_post_ID = (int) $_POST['comment_post_ID'];
@ -757,7 +753,7 @@ case 'edit-comment' :
$comments_status = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : ''; $comments_status = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
$checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
$wp_list_table = get_list_table( $checkbox ? 'comments' : 'post-comments' ); $wp_list_table = get_list_table( $checkbox ? 'WP_Comments_Table' : 'WP_Post_Comments_Table' );
ob_start(); ob_start();
$wp_list_table->single_row( get_comment( $comment_id ) ); $wp_list_table->single_row( get_comment( $comment_id ) );
@ -905,7 +901,7 @@ case 'add-user' :
} }
$user_object = new WP_User( $user_id ); $user_object = new WP_User( $user_id );
$wp_list_table = get_list_table('users'); $wp_list_table = get_list_table('WP_Users_Table');
$x = new WP_Ajax_Response( array( $x = new WP_Ajax_Response( array(
'what' => 'user', 'what' => 'user',
@ -1204,7 +1200,7 @@ case 'inline-save':
// update the post // update the post
edit_post(); edit_post();
$wp_list_table = get_list_table('posts'); $wp_list_table = get_list_table('WP_Posts_Table');
$mode = $_POST['post_view']; $mode = $_POST['post_view'];
$wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) ); $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
@ -1214,7 +1210,7 @@ case 'inline-save':
case 'inline-save-tax': case 'inline-save-tax':
check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' ); check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' );
$wp_list_table = get_list_table('terms'); $wp_list_table = get_list_table('WP_Terms_Table');
$wp_list_table->check_permissions('edit'); $wp_list_table->check_permissions('edit');

View File

@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once('./admin.php'); require_once('./admin.php');
$wp_list_table = get_list_table('comments'); $wp_list_table = get_list_table('WP_Comments_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$doaction = $wp_list_table->current_action(); $doaction = $wp_list_table->current_action();

View File

@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once('./admin.php'); require_once('./admin.php');
$wp_list_table = get_list_table('terms'); $wp_list_table = get_list_table('WP_Terms_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$title = $tax->labels->name; $title = $tax->labels->name;

View File

@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once( './admin.php' ); require_once( './admin.php' );
$wp_list_table = get_list_table('posts'); $wp_list_table = get_list_table('WP_Posts_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
// Back-compat for viewing comments of an entry // Back-compat for viewing comments of an entry

View File

@ -9,7 +9,7 @@
/** Load WordPress Administration Bootstrap */ /** Load WordPress Administration Bootstrap */
require_once ('admin.php'); require_once ('admin.php');
$wp_list_table = get_list_table('links'); $wp_list_table = get_list_table('WP_Links_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
// Handle bulk deletes // Handle bulk deletes

View File

@ -12,7 +12,7 @@ require_once( './admin.php' );
if ( ! is_multisite() ) if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) ); wp_die( __( 'Multisite support is not enabled.' ) );
$wp_list_table = get_list_table('sites'); $wp_list_table = get_list_table('WP_Sites_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$title = __( 'Sites' ); $title = __( 'Sites' );

View File

@ -9,7 +9,7 @@
require_once( './admin.php' ); require_once( './admin.php' );
$wp_list_table = get_list_table('ms-users'); $wp_list_table = get_list_table('WP_MS_Users_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$wp_list_table->prepare_items(); $wp_list_table->prepare_items();

View File

@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once('./admin.php'); require_once('./admin.php');
$wp_list_table = get_list_table('plugin-install'); $wp_list_table = get_list_table('WP_Plugin_Install_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$wp_list_table->prepare_items(); $wp_list_table->prepare_items();

View File

@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once('./admin.php'); require_once('./admin.php');
$wp_list_table = get_list_table('plugins'); $wp_list_table = get_list_table('WP_Plugins_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$action = $wp_list_table->current_action(); $action = $wp_list_table->current_action();

View File

@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once('./admin.php'); require_once('./admin.php');
$wp_list_table = get_list_table('theme-install'); $wp_list_table = get_list_table('WP_Theme_Install_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$wp_list_table->prepare_items(); $wp_list_table->prepare_items();

View File

@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once('./admin.php'); require_once('./admin.php');
$wp_list_table = get_list_table('themes'); $wp_list_table = get_list_table('WP_Themes_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
if ( current_user_can('switch_themes') && isset($_GET['action']) ) { if ( current_user_can('switch_themes') && isset($_GET['action']) ) {

View File

@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once( './admin.php' ); require_once( './admin.php' );
$wp_list_table = get_list_table('media'); $wp_list_table = get_list_table('WP_Media_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
// Handle bulk actions // Handle bulk actions

View File

@ -12,7 +12,7 @@ require_once( './admin.php' );
/** WordPress Registration API */ /** WordPress Registration API */
require_once( ABSPATH . WPINC . '/registration.php'); require_once( ABSPATH . WPINC . '/registration.php');
$wp_list_table = get_list_table('users'); $wp_list_table = get_list_table('WP_Users_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$title = __('Users'); $title = __('Users');