replace $table with $wp_list_table. See #14651
git-svn-id: http://svn.automattic.com/wordpress/trunk@15519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
33ccdcdeab
commit
cae0e969ce
|
@ -58,8 +58,8 @@ case 'fetch-list' :
|
||||||
if ( class_exists( $class ) ) {
|
if ( class_exists( $class ) ) {
|
||||||
global $current_screen;
|
global $current_screen;
|
||||||
$current_screen = (object) $_GET['list_args']['screen'];
|
$current_screen = (object) $_GET['list_args']['screen'];
|
||||||
$table = new $class;
|
$wp_list_table = new $class;
|
||||||
$table->ajax_response();
|
$wp_list_table->ajax_response();
|
||||||
}
|
}
|
||||||
|
|
||||||
die('0');
|
die('0');
|
||||||
|
@ -558,7 +558,7 @@ case 'add-tag' :
|
||||||
set_current_screen($_POST['screen']);
|
set_current_screen($_POST['screen']);
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Terms_Table();
|
$wp_list_table = new WP_Terms_Table();
|
||||||
|
|
||||||
$level = 0;
|
$level = 0;
|
||||||
$tag_full_name = false;
|
$tag_full_name = false;
|
||||||
|
@ -570,10 +570,10 @@ case 'add-tag' :
|
||||||
$tag_full_name = $_tag->name . ' — ' . $tag_full_name;
|
$tag_full_name = $_tag->name . ' — ' . $tag_full_name;
|
||||||
$level++;
|
$level++;
|
||||||
}
|
}
|
||||||
$noparents = $table->single_row( $tag, $level, $taxonomy );
|
$noparents = $wp_list_table->single_row( $tag, $level, $taxonomy );
|
||||||
}
|
}
|
||||||
$tag->name = $tag_full_name;
|
$tag->name = $tag_full_name;
|
||||||
$parents = $table->single_row( $tag, 0, $taxonomy);
|
$parents = $wp_list_table->single_row( $tag, 0, $taxonomy);
|
||||||
|
|
||||||
$x->add( array(
|
$x->add( array(
|
||||||
'what' => 'taxonomy',
|
'what' => 'taxonomy',
|
||||||
|
@ -626,17 +626,17 @@ case 'add-comment' :
|
||||||
die('-1');
|
die('-1');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Comments_Table();
|
$wp_list_table = new WP_Comments_Table();
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
if ( !$table->has_items() )
|
if ( !$wp_list_table->has_items() )
|
||||||
die('1');
|
die('1');
|
||||||
|
|
||||||
$x = new WP_Ajax_Response();
|
$x = new WP_Ajax_Response();
|
||||||
foreach ( $table->items as $comment ) {
|
foreach ( $wp_list_table->items as $comment ) {
|
||||||
get_comment( $comment );
|
get_comment( $comment );
|
||||||
ob_start();
|
ob_start();
|
||||||
$table->single_row( $comment->comment_ID, $mode, $comment_status, true, true );
|
$wp_list_table->single_row( $comment->comment_ID, $mode, $comment_status, true, true );
|
||||||
$comment_list_item = ob_get_contents();
|
$comment_list_item = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$x->add( array(
|
$x->add( array(
|
||||||
|
@ -655,18 +655,18 @@ case 'get-comments' :
|
||||||
die('-1');
|
die('-1');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Comments_Table();
|
$wp_list_table = new WP_Comments_Table();
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
if ( !$table->has_items() )
|
if ( !$wp_list_table->has_items() )
|
||||||
die('1');
|
die('1');
|
||||||
|
|
||||||
$comment_list_item = '';
|
$comment_list_item = '';
|
||||||
$x = new WP_Ajax_Response();
|
$x = new WP_Ajax_Response();
|
||||||
foreach ( $table->items as $comment ) {
|
foreach ( $wp_list_table->items as $comment ) {
|
||||||
get_comment( $comment );
|
get_comment( $comment );
|
||||||
ob_start();
|
ob_start();
|
||||||
$table->single_row( $comment->comment_ID, 'single', false, false );
|
$wp_list_table->single_row( $comment->comment_ID, 'single', false, false );
|
||||||
$comment_list_item .= ob_get_contents();
|
$comment_list_item .= ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
|
@ -680,7 +680,7 @@ case 'replyto-comment' :
|
||||||
check_ajax_referer( $action, '_ajax_nonce-replyto-comment' );
|
check_ajax_referer( $action, '_ajax_nonce-replyto-comment' );
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Comments_Table();
|
$wp_list_table = new WP_Comments_Table();
|
||||||
|
|
||||||
$comment_post_ID = (int) $_POST['comment_post_ID'];
|
$comment_post_ID = (int) $_POST['comment_post_ID'];
|
||||||
if ( !current_user_can( 'edit_post', $comment_post_ID ) )
|
if ( !current_user_can( 'edit_post', $comment_post_ID ) )
|
||||||
|
@ -729,7 +729,7 @@ case 'replyto-comment' :
|
||||||
require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
|
require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
|
||||||
_wp_dashboard_recent_comments_row( $comment, false );
|
_wp_dashboard_recent_comments_row( $comment, false );
|
||||||
} else {
|
} else {
|
||||||
$table->single_row( $comment->comment_ID, $mode, false, $checkbox );
|
$wp_list_table->single_row( $comment->comment_ID, $mode, false, $checkbox );
|
||||||
}
|
}
|
||||||
$comment_list_item = ob_get_contents();
|
$comment_list_item = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
@ -762,10 +762,10 @@ case 'edit-comment' :
|
||||||
$comments_listing = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
|
$comments_listing = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Comments_Table();
|
$wp_list_table = new WP_Comments_Table();
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
$table->single_row( $comment_id, $mode, $comments_listing, $checkbox );
|
$wp_list_table->single_row( $comment_id, $mode, $comments_listing, $checkbox );
|
||||||
$comment_list_item = ob_get_contents();
|
$comment_list_item = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
|
@ -911,12 +911,12 @@ case 'add-user' :
|
||||||
$user_object = new WP_User( $user_id );
|
$user_object = new WP_User( $user_id );
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Users_Table();
|
$wp_list_table = new WP_Users_Table();
|
||||||
|
|
||||||
$x = new WP_Ajax_Response( array(
|
$x = new WP_Ajax_Response( array(
|
||||||
'what' => 'user',
|
'what' => 'user',
|
||||||
'id' => $user_id,
|
'id' => $user_id,
|
||||||
'data' => $table->single_row( $user_object, '', $user_object->roles[0] ),
|
'data' => $wp_list_table->single_row( $user_object, '', $user_object->roles[0] ),
|
||||||
'supplemental' => array(
|
'supplemental' => array(
|
||||||
'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login),
|
'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login),
|
||||||
'role' => $user_object->roles[0]
|
'role' => $user_object->roles[0]
|
||||||
|
@ -1204,10 +1204,10 @@ case 'inline-save':
|
||||||
edit_post();
|
edit_post();
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Posts_Table();
|
$wp_list_table = new WP_Posts_Table();
|
||||||
|
|
||||||
$mode = $_POST['post_view'];
|
$mode = $_POST['post_view'];
|
||||||
$table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
|
$wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
break;
|
break;
|
||||||
|
@ -1215,9 +1215,9 @@ case 'inline-save-tax':
|
||||||
check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' );
|
check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' );
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Terms_Table();
|
$wp_list_table = new WP_Terms_Table();
|
||||||
|
|
||||||
$table->check_permissions('edit');
|
$wp_list_table->check_permissions('edit');
|
||||||
|
|
||||||
if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) )
|
if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) )
|
||||||
die(-1);
|
die(-1);
|
||||||
|
@ -1234,7 +1234,7 @@ case 'inline-save-tax':
|
||||||
die( __('Item not updated.') );
|
die( __('Item not updated.') );
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $table->single_row( $tag, 0, $taxonomy );
|
echo $wp_list_table->single_row( $tag, 0, $taxonomy );
|
||||||
} else {
|
} else {
|
||||||
if ( is_wp_error($updated) && $updated->get_error_message() )
|
if ( is_wp_error($updated) && $updated->get_error_message() )
|
||||||
die( $updated->get_error_message() );
|
die( $updated->get_error_message() );
|
||||||
|
|
|
@ -11,8 +11,8 @@ require_once('./admin.php');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Comments_Table;
|
$wp_list_table = new WP_Comments_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
if ( isset( $_REQUEST['doaction'] ) || isset( $_REQUEST['doaction2'] ) || isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
|
if ( isset( $_REQUEST['doaction'] ) || isset( $_REQUEST['doaction2'] ) || isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
|
||||||
check_admin_referer( 'bulk-comments' );
|
check_admin_referer( 'bulk-comments' );
|
||||||
|
@ -97,7 +97,7 @@ if ( isset( $_REQUEST['doaction'] ) || isset( $_REQUEST['doaction2'] ) || isset
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
wp_enqueue_script('admin-comments');
|
wp_enqueue_script('admin-comments');
|
||||||
enqueue_comment_hotkeys_js();
|
enqueue_comment_hotkeys_js();
|
||||||
|
@ -257,17 +257,17 @@ unset($status_links);
|
||||||
<input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" />
|
<input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" />
|
||||||
<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" />
|
<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" />
|
||||||
|
|
||||||
<input type="hidden" name="_total" value="<?php echo esc_attr( $table->get_pagination_arg('total_items') ); ?>" />
|
<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( $table->get_pagination_arg('per_page') ); ?>" />
|
<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( $table->get_pagination_arg('page') ); ?>" />
|
<input type="hidden" name="_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('page') ); ?>" />
|
||||||
|
|
||||||
<?php if ( isset($_REQUEST['paged']) ) { ?>
|
<?php if ( isset($_REQUEST['paged']) ) { ?>
|
||||||
<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
|
<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ( $table->has_items() ) { ?>
|
<?php if ( $wp_list_table->has_items() ) { ?>
|
||||||
|
|
||||||
<?php $table->display_table(); ?>
|
<?php $wp_list_table->display_table(); ?>
|
||||||
|
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,8 +11,8 @@ require_once('./admin.php');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Terms_Table;
|
$wp_list_table = new WP_Terms_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
$title = $tax->labels->name;
|
$title = $tax->labels->name;
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ if ( ! empty($_REQUEST['_wp_http_referer']) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
wp_enqueue_script('admin-tags');
|
wp_enqueue_script('admin-tags');
|
||||||
if ( current_user_can($tax->cap->edit_terms) )
|
if ( current_user_can($tax->cap->edit_terms) )
|
||||||
|
@ -241,7 +241,7 @@ endif; ?>
|
||||||
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
|
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
|
||||||
<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
|
<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
|
||||||
|
|
||||||
<?php $table->display_table(); ?>
|
<?php $wp_list_table->display_table(); ?>
|
||||||
|
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -351,7 +351,7 @@ do_action($taxonomy . '_add_form', $taxonomy);
|
||||||
</div><!-- /col-container -->
|
</div><!-- /col-container -->
|
||||||
</div><!-- /wrap -->
|
</div><!-- /wrap -->
|
||||||
|
|
||||||
<?php $table->inline_edit(); ?>
|
<?php $wp_list_table->inline_edit(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -11,8 +11,8 @@ require_once( './admin.php' );
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Posts_Table;
|
$wp_list_table = new WP_Posts_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
// Back-compat for viewing comments of an entry
|
// Back-compat for viewing comments of an entry
|
||||||
if ( $_redirect = intval( max( @$_REQUEST['p'], @$_REQUEST['attachment_id'], @$_REQUEST['page_id'] ) ) ) {
|
if ( $_redirect = intval( max( @$_REQUEST['p'], @$_REQUEST['attachment_id'], @$_REQUEST['page_id'] ) ) ) {
|
||||||
|
@ -119,7 +119,7 @@ if ( 'post' != $post_type ) {
|
||||||
$post_new_file = 'post-new.php';
|
$post_new_file = 'post-new.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
wp_enqueue_script('inline-edit-post');
|
wp_enqueue_script('inline-edit-post');
|
||||||
|
|
||||||
|
@ -280,11 +280,11 @@ endif;
|
||||||
<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
|
<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
|
||||||
<input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
|
<input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
|
||||||
|
|
||||||
<?php $table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php $table->inline_edit(); ?>
|
<?php $wp_list_table->inline_edit(); ?>
|
||||||
|
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
|
@ -211,15 +211,10 @@ function use_codepress() {
|
||||||
function register_column_headers($screen, $columns) {
|
function register_column_headers($screen, $columns) {
|
||||||
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
||||||
|
|
||||||
global $_wp_column_headers;
|
global $wp_list_table;
|
||||||
|
|
||||||
if ( is_string($screen) )
|
$wp_list_table = new _WP_List_Table_Compat($screen);
|
||||||
$screen = convert_to_screen($screen);
|
$wp_list_table->_columns = $columns;
|
||||||
|
|
||||||
if ( !isset($_wp_column_headers) )
|
|
||||||
$_wp_column_headers = array();
|
|
||||||
|
|
||||||
$_wp_column_headers[$screen->id] = $columns;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -235,8 +230,11 @@ function register_column_headers($screen, $columns) {
|
||||||
function get_column_headers($screen) {
|
function get_column_headers($screen) {
|
||||||
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
||||||
|
|
||||||
$table = new _WP_List_Table_Compat($screen);
|
global $wp_list_table;
|
||||||
list( $columns ) = $table->get_column_headers();
|
if ( !is_a($wp_list_table, 'WP_List_Table') )
|
||||||
|
$wp_list_table = new _WP_List_Table_Compat($screen);
|
||||||
|
|
||||||
|
list( $columns ) = $wp_list_table->get_column_headers();
|
||||||
|
|
||||||
return $columns;
|
return $columns;
|
||||||
}
|
}
|
||||||
|
@ -251,9 +249,11 @@ function get_column_headers($screen) {
|
||||||
function print_column_headers($screen, $id = true) {
|
function print_column_headers($screen, $id = true) {
|
||||||
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
||||||
|
|
||||||
$table = new _WP_List_Table_Compat($screen);
|
global $wp_list_table;
|
||||||
|
if ( !is_a($wp_list_table, 'WP_List_Table') )
|
||||||
|
$wp_list_table = new _WP_List_Table_Compat($screen);
|
||||||
|
|
||||||
$table->print_column_headers($id);
|
$wp_list_table->print_column_headers($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -269,14 +269,18 @@ function print_column_headers($screen, $id = true) {
|
||||||
function get_hidden_columns($screen) {
|
function get_hidden_columns($screen) {
|
||||||
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
||||||
|
|
||||||
$table = new _WP_List_Table_Compat($screen);
|
global $wp_list_table;
|
||||||
|
if ( !is_a($wp_list_table, 'WP_List_Table') )
|
||||||
|
$wp_list_table = new _WP_List_Table_Compat($screen);
|
||||||
|
|
||||||
return $table->get_hidden_columns();
|
return $wp_list_table->get_hidden_columns();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper class to be used only by deprecated functions
|
// Helper class to be used only by deprecated functions
|
||||||
class _WP_List_Table_Compat extends WP_List_Table {
|
class _WP_List_Table_Compat extends WP_List_Table {
|
||||||
|
|
||||||
|
var $_columns = array();
|
||||||
|
|
||||||
function _WP_List_Table_Compat( $screen) {
|
function _WP_List_Table_Compat( $screen) {
|
||||||
parent::WP_List_Table( array(
|
parent::WP_List_Table( array(
|
||||||
'screen' => $screen,
|
'screen' => $screen,
|
||||||
|
@ -285,12 +289,7 @@ class _WP_List_Table_Compat extends WP_List_Table {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_columns() {
|
function get_columns() {
|
||||||
global $_wp_column_headers;
|
return $this->_columns;
|
||||||
|
|
||||||
if ( isset($_wp_column_headers[$this->_screen->id]) )
|
|
||||||
return $_wp_column_headers[$this->_screen->id];
|
|
||||||
|
|
||||||
return array();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -463,12 +463,12 @@ function post_comment_meta_box($post) {
|
||||||
add_filter('manage_edit-comments_sortable_columns', create_function('', 'return array();'), 8);
|
add_filter('manage_edit-comments_sortable_columns', create_function('', 'return array();'), 8);
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Comments_Table;
|
$wp_list_table = new WP_Comments_Table;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
|
<table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
<?php $table->print_column_headers(); ?>
|
<?php $wp_list_table->print_column_headers(); ?>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody id="the-comment-list" class="list:comment"></tbody>
|
<tbody id="the-comment-list" class="list:comment"></tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -162,9 +162,9 @@ add_action('install_plugins_upload', 'install_plugins_upload', 10, 1);
|
||||||
* @param int $total_plugins Number of plugins.
|
* @param int $total_plugins Number of plugins.
|
||||||
*/
|
*/
|
||||||
function display_plugins_table() {
|
function display_plugins_table() {
|
||||||
global $table;
|
global $wp_list_table;
|
||||||
|
|
||||||
$table->display();
|
$wp_list_table->display();
|
||||||
}
|
}
|
||||||
add_action('install_plugins_search', 'display_plugins_table');
|
add_action('install_plugins_search', 'display_plugins_table');
|
||||||
add_action('install_plugins_featured', 'display_plugins_table');
|
add_action('install_plugins_featured', 'display_plugins_table');
|
||||||
|
|
|
@ -294,10 +294,10 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single',
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
$table = new WP_Comments_Table( 'reply' );
|
$wp_list_table = new WP_Comments_Table( 'reply' );
|
||||||
|
|
||||||
$columns = $table->get_column_headers();
|
$columns = $wp_list_table->get_column_headers();
|
||||||
$hidden = array_intersect( array_keys( $columns ), array_filter( $table->get_hidden_columns() ) );
|
$hidden = array_intersect( array_keys( $columns ), array_filter( $wp_list_table->get_hidden_columns() ) );
|
||||||
$col_count = count($columns) - count($hidden);
|
$col_count = count($columns) - count($hidden);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1293,9 +1293,9 @@ function settings_errors ( $setting = '', $sanitize = FALSE, $hide_on_update = F
|
||||||
* @param unknown_type $page
|
* @param unknown_type $page
|
||||||
*/
|
*/
|
||||||
function manage_columns_prefs( $page ) {
|
function manage_columns_prefs( $page ) {
|
||||||
global $table;
|
global $wp_list_table;
|
||||||
|
|
||||||
list( $columns, $hidden ) = $table->get_column_headers();
|
list( $columns, $hidden ) = $wp_list_table->get_column_headers();
|
||||||
|
|
||||||
$special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username');
|
$special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username');
|
||||||
|
|
||||||
|
@ -1629,13 +1629,13 @@ function convert_to_screen( $screen ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function screen_meta($screen) {
|
function screen_meta($screen) {
|
||||||
global $wp_meta_boxes, $_wp_contextual_help, $title, $table;
|
global $wp_meta_boxes, $_wp_contextual_help, $title, $wp_list_table;
|
||||||
|
|
||||||
if ( is_string($screen) )
|
if ( is_string($screen) )
|
||||||
$screen = convert_to_screen($screen);
|
$screen = convert_to_screen($screen);
|
||||||
|
|
||||||
if ( is_a($table, 'WP_List_Table') )
|
if ( is_a($wp_list_table, 'WP_List_Table') )
|
||||||
list( $screen_columns ) = $table->get_column_headers();
|
list( $screen_columns ) = $wp_list_table->get_column_headers();
|
||||||
$meta_screens = array('index' => 'dashboard');
|
$meta_screens = array('index' => 'dashboard');
|
||||||
|
|
||||||
if ( isset($meta_screens[$screen->id]) ) {
|
if ( isset($meta_screens[$screen->id]) ) {
|
||||||
|
|
|
@ -261,9 +261,9 @@ function display_theme($theme, $actions = null, $show_details = true) {
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
function display_themes() {
|
function display_themes() {
|
||||||
global $table;
|
global $wp_list_table;
|
||||||
|
|
||||||
$table->display();
|
$wp_list_table->display();
|
||||||
}
|
}
|
||||||
add_action('install_themes_search', 'display_themes');
|
add_action('install_themes_search', 'display_themes');
|
||||||
add_action('install_themes_featured', 'display_themes');
|
add_action('install_themes_featured', 'display_themes');
|
||||||
|
|
|
@ -11,8 +11,8 @@ require_once ('admin.php');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Links_Table;
|
$wp_list_table = new WP_Links_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
// Handle bulk deletes
|
// Handle bulk deletes
|
||||||
if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['linkcheck'] ) ) {
|
if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['linkcheck'] ) ) {
|
||||||
|
@ -35,7 +35,7 @@ if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['linkcheck'] ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
$title = __('Links');
|
$title = __('Links');
|
||||||
$this_file = $parent_file = 'link-manager.php';
|
$this_file = $parent_file = 'link-manager.php';
|
||||||
|
@ -84,7 +84,7 @@ if ( isset($_REQUEST['deleted']) ) {
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
||||||
<form id="posts-filter" action="" method="post">
|
<form id="posts-filter" action="" method="post">
|
||||||
<?php $table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ if ( ! is_multisite() )
|
||||||
|
|
||||||
require_once( '../includes/default-list-tables.php' );
|
require_once( '../includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Sites_Table;
|
$wp_list_table = new WP_Sites_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
$title = __( 'Sites' );
|
$title = __( 'Sites' );
|
||||||
$parent_file = 'sites.php';
|
$parent_file = 'sites.php';
|
||||||
|
@ -350,7 +350,7 @@ switch ( $action ) {
|
||||||
// List sites
|
// List sites
|
||||||
case 'list':
|
case 'list':
|
||||||
default:
|
default:
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
require_once( '../admin-header.php' );
|
require_once( '../admin-header.php' );
|
||||||
?>
|
?>
|
||||||
|
@ -378,7 +378,7 @@ switch ( $action ) {
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form id="form-site-list" action="edit.php?action=allblogs" method="post">
|
<form id="form-site-list" action="edit.php?action=allblogs" method="post">
|
||||||
<?php $table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ require_once( './admin.php' );
|
||||||
|
|
||||||
require_once( '../includes/default-list-tables.php' );
|
require_once( '../includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_MS_Users_Table;
|
$wp_list_table = new WP_MS_Users_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
$title = __( 'Users' );
|
$title = __( 'Users' );
|
||||||
$parent_file = 'users.php';
|
$parent_file = 'users.php';
|
||||||
|
@ -78,7 +78,7 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form id="form-user-list" action='edit.php?action=allusers' method='post'>
|
<form id="form-user-list" action='edit.php?action=allusers' method='post'>
|
||||||
<?php $table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ require_once('./admin.php');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Plugin_Install_Table;
|
$wp_list_table = new WP_Plugin_Install_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
$title = __('Install Plugins');
|
$title = __('Install Plugins');
|
||||||
$parent_file = 'plugins.php';
|
$parent_file = 'plugins.php';
|
||||||
|
|
|
@ -11,8 +11,8 @@ require_once('./admin.php');
|
||||||
|
|
||||||
require_once( ABSPATH . 'wp-admin/includes/default-list-tables.php' );
|
require_once( ABSPATH . 'wp-admin/includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Plugins_Table;
|
$wp_list_table = new WP_Plugins_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
if ( isset($_POST['clear-recent-list']) )
|
if ( isset($_POST['clear-recent-list']) )
|
||||||
$action = 'clear-recent-list';
|
$action = 'clear-recent-list';
|
||||||
|
@ -302,7 +302,7 @@ if ( !in_array( $status, array( 'all', 'active', 'inactive', 'recently_activated
|
||||||
if ( $status != $default_status && 'search' != $status )
|
if ( $status != $default_status && 'search' != $status )
|
||||||
update_user_meta( get_current_user_id(), 'plugins_last_view', $status );
|
update_user_meta( get_current_user_id(), 'plugins_last_view', $status );
|
||||||
|
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
wp_enqueue_script('plugin-install');
|
wp_enqueue_script('plugin-install');
|
||||||
add_thickbox();
|
add_thickbox();
|
||||||
|
@ -438,7 +438,7 @@ elseif ( 'dropins' == $status )
|
||||||
echo '<br class="clear"><p>' . __( 'Drop-ins are advanced plugins in the <code>/wp-content</code> directory that replace WordPress functionality when present.' ) . '</p>';
|
echo '<br class="clear"><p>' . __( 'Drop-ins are advanced plugins in the <code>/wp-content</code> directory that replace WordPress functionality when present.' ) . '</p>';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,9 +11,9 @@ require_once('./admin.php');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Theme_Install_Table;
|
$wp_list_table = new WP_Theme_Install_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
$title = __('Install Themes');
|
$title = __('Install Themes');
|
||||||
$parent_file = 'themes.php';
|
$parent_file = 'themes.php';
|
||||||
|
|
|
@ -11,8 +11,8 @@ require_once('./admin.php');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Themes_Table;
|
$wp_list_table = new WP_Themes_Table;
|
||||||
$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']) ) {
|
||||||
if ( 'activate' == $_GET['action'] ) {
|
if ( 'activate' == $_GET['action'] ) {
|
||||||
|
@ -30,7 +30,7 @@ if ( current_user_can('switch_themes') && isset($_GET['action']) ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
$title = __('Manage Themes');
|
$title = __('Manage Themes');
|
||||||
$parent_file = 'themes.php';
|
$parent_file = 'themes.php';
|
||||||
|
@ -105,7 +105,7 @@ if ( ! current_user_can( 'switch_themes' ) ) {
|
||||||
?>
|
?>
|
||||||
<h3><?php _e('Available Themes'); ?></h3>
|
<h3><?php _e('Available Themes'); ?></h3>
|
||||||
|
|
||||||
<?php $table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
|
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ require_once( './admin.php' );
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Media_Table;
|
$wp_list_table = new WP_Media_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
// Handle bulk actions
|
// Handle bulk actions
|
||||||
if ( isset($_REQUEST['find_detached']) ) {
|
if ( isset($_REQUEST['find_detached']) ) {
|
||||||
|
@ -130,7 +130,7 @@ if ( isset($_REQUEST['find_detached']) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
$title = __('Media Library');
|
$title = __('Media Library');
|
||||||
$parent_file = 'upload.php';
|
$parent_file = 'upload.php';
|
||||||
|
@ -247,7 +247,7 @@ unset($type_links);
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form id="posts-filter" action="" method="post">
|
<form id="posts-filter" action="" method="post">
|
||||||
<?php $table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
<?php find_posts_div(); ?>
|
<?php find_posts_div(); ?>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
|
@ -14,8 +14,8 @@ require_once( ABSPATH . WPINC . '/registration.php');
|
||||||
|
|
||||||
require_once( './includes/default-list-tables.php' );
|
require_once( './includes/default-list-tables.php' );
|
||||||
|
|
||||||
$table = new WP_Users_Table;
|
$wp_list_table = new WP_Users_Table;
|
||||||
$table->check_permissions();
|
$wp_list_table->check_permissions();
|
||||||
|
|
||||||
$title = __('Users');
|
$title = __('Users');
|
||||||
$parent_file = 'users.php';
|
$parent_file = 'users.php';
|
||||||
|
@ -308,7 +308,7 @@ default:
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
include('./admin-header.php');
|
include('./admin-header.php');
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ unset($role_links);
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form id="posts-filter" action="" method="post">
|
<form id="posts-filter" action="" method="post">
|
||||||
<?php $table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue