Changeset 15519
- Timestamp:
- 08/22/2010 11:22:46 AM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r15513 r15519 59 59 global $current_screen; 60 60 $current_screen = (object) $_GET['list_args']['screen']; 61 $ table = new $class;62 $ table->ajax_response();61 $wp_list_table = new $class; 62 $wp_list_table->ajax_response(); 63 63 } 64 64 … … 559 559 560 560 require_once( './includes/default-list-tables.php' ); 561 $ table = new WP_Terms_Table();561 $wp_list_table = new WP_Terms_Table(); 562 562 563 563 $level = 0; … … 571 571 $level++; 572 572 } 573 $noparents = $ table->single_row( $tag, $level, $taxonomy );573 $noparents = $wp_list_table->single_row( $tag, $level, $taxonomy ); 574 574 } 575 575 $tag->name = $tag_full_name; 576 $parents = $ table->single_row( $tag, 0, $taxonomy);576 $parents = $wp_list_table->single_row( $tag, 0, $taxonomy); 577 577 578 578 $x->add( array( … … 627 627 628 628 require_once( './includes/default-list-tables.php' ); 629 $ table = new WP_Comments_Table();630 $ table->prepare_items();631 632 if ( !$ table->has_items() )629 $wp_list_table = new WP_Comments_Table(); 630 $wp_list_table->prepare_items(); 631 632 if ( !$wp_list_table->has_items() ) 633 633 die('1'); 634 634 635 635 $x = new WP_Ajax_Response(); 636 foreach ( $ table->items as $comment ) {636 foreach ( $wp_list_table->items as $comment ) { 637 637 get_comment( $comment ); 638 638 ob_start(); 639 $ table->single_row( $comment->comment_ID, $mode, $comment_status, true, true );639 $wp_list_table->single_row( $comment->comment_ID, $mode, $comment_status, true, true ); 640 640 $comment_list_item = ob_get_contents(); 641 641 ob_end_clean(); … … 656 656 657 657 require_once( './includes/default-list-tables.php' ); 658 $ table = new WP_Comments_Table();659 $ table->prepare_items();660 661 if ( !$ table->has_items() )658 $wp_list_table = new WP_Comments_Table(); 659 $wp_list_table->prepare_items(); 660 661 if ( !$wp_list_table->has_items() ) 662 662 die('1'); 663 663 664 664 $comment_list_item = ''; 665 665 $x = new WP_Ajax_Response(); 666 foreach ( $ table->items as $comment ) {666 foreach ( $wp_list_table->items as $comment ) { 667 667 get_comment( $comment ); 668 668 ob_start(); 669 $ table->single_row( $comment->comment_ID, 'single', false, false );669 $wp_list_table->single_row( $comment->comment_ID, 'single', false, false ); 670 670 $comment_list_item .= ob_get_contents(); 671 671 ob_end_clean(); … … 681 681 682 682 require_once( './includes/default-list-tables.php' ); 683 $ table = new WP_Comments_Table();683 $wp_list_table = new WP_Comments_Table(); 684 684 685 685 $comment_post_ID = (int) $_POST['comment_post_ID']; … … 730 730 _wp_dashboard_recent_comments_row( $comment, false ); 731 731 } else { 732 $ table->single_row( $comment->comment_ID, $mode, false, $checkbox );732 $wp_list_table->single_row( $comment->comment_ID, $mode, false, $checkbox ); 733 733 } 734 734 $comment_list_item = ob_get_contents(); … … 763 763 764 764 require_once( './includes/default-list-tables.php' ); 765 $ table = new WP_Comments_Table();765 $wp_list_table = new WP_Comments_Table(); 766 766 767 767 ob_start(); 768 $ table->single_row( $comment_id, $mode, $comments_listing, $checkbox );768 $wp_list_table->single_row( $comment_id, $mode, $comments_listing, $checkbox ); 769 769 $comment_list_item = ob_get_contents(); 770 770 ob_end_clean(); … … 912 912 913 913 require_once( './includes/default-list-tables.php' ); 914 $ table = new WP_Users_Table();914 $wp_list_table = new WP_Users_Table(); 915 915 916 916 $x = new WP_Ajax_Response( array( 917 917 'what' => 'user', 918 918 'id' => $user_id, 919 'data' => $ table->single_row( $user_object, '', $user_object->roles[0] ),919 'data' => $wp_list_table->single_row( $user_object, '', $user_object->roles[0] ), 920 920 'supplemental' => array( 921 921 'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login), … … 1205 1205 1206 1206 require_once( './includes/default-list-tables.php' ); 1207 $ table = new WP_Posts_Table();1207 $wp_list_table = new WP_Posts_Table(); 1208 1208 1209 1209 $mode = $_POST['post_view']; 1210 $ table->display_rows( array( get_post( $_POST['post_ID'] ) ) );1210 $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) ); 1211 1211 1212 1212 exit; … … 1216 1216 1217 1217 require_once( './includes/default-list-tables.php' ); 1218 $ table = new WP_Terms_Table();1219 1220 $ table->check_permissions('edit');1218 $wp_list_table = new WP_Terms_Table(); 1219 1220 $wp_list_table->check_permissions('edit'); 1221 1221 1222 1222 if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) ) … … 1235 1235 } 1236 1236 1237 echo $ table->single_row( $tag, 0, $taxonomy );1237 echo $wp_list_table->single_row( $tag, 0, $taxonomy ); 1238 1238 } else { 1239 1239 if ( is_wp_error($updated) && $updated->get_error_message() ) -
trunk/wp-admin/edit-comments.php
r15509 r15519 12 12 require_once( './includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Comments_Table;15 $ table->check_permissions();14 $wp_list_table = new WP_Comments_Table; 15 $wp_list_table->check_permissions(); 16 16 17 17 if ( isset( $_REQUEST['doaction'] ) || isset( $_REQUEST['doaction2'] ) || isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) { … … 98 98 } 99 99 100 $ table->prepare_items();100 $wp_list_table->prepare_items(); 101 101 102 102 wp_enqueue_script('admin-comments'); … … 258 258 <input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" /> 259 259 260 <input type="hidden" name="_total" value="<?php echo esc_attr( $ table->get_pagination_arg('total_items') ); ?>" />261 <input type="hidden" name="_per_page" value="<?php echo esc_attr( $ table->get_pagination_arg('per_page') ); ?>" />262 <input type="hidden" name="_page" value="<?php echo esc_attr( $ table->get_pagination_arg('page') ); ?>" />260 <input type="hidden" name="_total" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('total_items') ); ?>" /> 261 <input type="hidden" name="_per_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('per_page') ); ?>" /> 262 <input type="hidden" name="_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('page') ); ?>" /> 263 263 264 264 <?php if ( isset($_REQUEST['paged']) ) { ?> … … 266 266 <?php } ?> 267 267 268 <?php if ( $ table->has_items() ) { ?>269 270 <?php $ table->display_table(); ?>268 <?php if ( $wp_list_table->has_items() ) { ?> 269 270 <?php $wp_list_table->display_table(); ?> 271 271 272 272 <br class="clear" /> -
trunk/wp-admin/edit-tags.php
r15496 r15519 12 12 require_once( './includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Terms_Table;15 $ table->check_permissions();14 $wp_list_table = new WP_Terms_Table; 15 $wp_list_table->check_permissions(); 16 16 17 17 $title = $tax->labels->name; … … 153 153 } 154 154 155 $ table->prepare_items();155 $wp_list_table->prepare_items(); 156 156 157 157 wp_enqueue_script('admin-tags'); … … 242 242 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> 243 243 244 <?php $ table->display_table(); ?>244 <?php $wp_list_table->display_table(); ?> 245 245 246 246 <br class="clear" /> … … 352 352 </div><!-- /wrap --> 353 353 354 <?php $ table->inline_edit(); ?>354 <?php $wp_list_table->inline_edit(); ?> 355 355 356 356 <?php -
trunk/wp-admin/edit.php
r15511 r15519 12 12 require_once( './includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Posts_Table;15 $ table->check_permissions();14 $wp_list_table = new WP_Posts_Table; 15 $wp_list_table->check_permissions(); 16 16 17 17 // Back-compat for viewing comments of an entry … … 120 120 } 121 121 122 $ table->prepare_items();122 $wp_list_table->prepare_items(); 123 123 124 124 wp_enqueue_script('inline-edit-post'); … … 281 281 <input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" /> 282 282 283 <?php $ table->display(); ?>283 <?php $wp_list_table->display(); ?> 284 284 285 285 </form> 286 286 287 <?php $ table->inline_edit(); ?>287 <?php $wp_list_table->inline_edit(); ?> 288 288 289 289 <div id="ajax-response"></div> -
trunk/wp-admin/includes/deprecated.php
r15517 r15519 212 212 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 213 213 214 global $_wp_column_headers; 215 216 if ( is_string($screen) ) 217 $screen = convert_to_screen($screen); 218 219 if ( !isset($_wp_column_headers) ) 220 $_wp_column_headers = array(); 221 222 $_wp_column_headers[$screen->id] = $columns; 214 global $wp_list_table; 215 216 $wp_list_table = new _WP_List_Table_Compat($screen); 217 $wp_list_table->_columns = $columns; 223 218 } 224 219 … … 236 231 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 237 232 238 $table = new _WP_List_Table_Compat($screen); 239 list( $columns ) = $table->get_column_headers(); 233 global $wp_list_table; 234 if ( !is_a($wp_list_table, 'WP_List_Table') ) 235 $wp_list_table = new _WP_List_Table_Compat($screen); 236 237 list( $columns ) = $wp_list_table->get_column_headers(); 240 238 241 239 return $columns; … … 252 250 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 253 251 254 $table = new _WP_List_Table_Compat($screen); 255 256 $table->print_column_headers($id); 252 global $wp_list_table; 253 if ( !is_a($wp_list_table, 'WP_List_Table') ) 254 $wp_list_table = new _WP_List_Table_Compat($screen); 255 256 $wp_list_table->print_column_headers($id); 257 257 } 258 258 … … 270 270 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 271 271 272 $table = new _WP_List_Table_Compat($screen); 273 274 return $table->get_hidden_columns(); 272 global $wp_list_table; 273 if ( !is_a($wp_list_table, 'WP_List_Table') ) 274 $wp_list_table = new _WP_List_Table_Compat($screen); 275 276 return $wp_list_table->get_hidden_columns(); 275 277 } 276 278 277 279 // Helper class to be used only by deprecated functions 278 280 class _WP_List_Table_Compat extends WP_List_Table { 281 282 var $_columns = array(); 279 283 280 284 function _WP_List_Table_Compat( $screen) { … … 286 290 287 291 function get_columns() { 288 global $_wp_column_headers; 289 290 if ( isset($_wp_column_headers[$this->_screen->id]) ) 291 return $_wp_column_headers[$this->_screen->id]; 292 293 return array(); 292 return $this->_columns; 294 293 } 295 294 } -
trunk/wp-admin/includes/meta-boxes.php
r15497 r15519 464 464 465 465 require_once( './includes/default-list-tables.php' ); 466 $ table = new WP_Comments_Table;466 $wp_list_table = new WP_Comments_Table; 467 467 ?> 468 468 469 469 <table class="widefat comments-box fixed" cellspacing="0" style="display:none;"> 470 470 <thead><tr> 471 <?php $ table->print_column_headers(); ?>471 <?php $wp_list_table->print_column_headers(); ?> 472 472 </tr></thead> 473 473 <tbody id="the-comment-list" class="list:comment"></tbody> -
trunk/wp-admin/includes/plugin-install.php
r15491 r15519 163 163 */ 164 164 function display_plugins_table() { 165 global $ table;166 167 $ table->display();165 global $wp_list_table; 166 167 $wp_list_table->display(); 168 168 } 169 169 add_action('install_plugins_search', 'display_plugins_table'); -
trunk/wp-admin/includes/template.php
r15518 r15519 295 295 296 296 require_once( './includes/default-list-tables.php' ); 297 $ table = new WP_Comments_Table( 'reply' );298 299 $columns = $ table->get_column_headers();300 $hidden = array_intersect( array_keys( $columns ), array_filter( $ table->get_hidden_columns() ) );297 $wp_list_table = new WP_Comments_Table( 'reply' ); 298 299 $columns = $wp_list_table->get_column_headers(); 300 $hidden = array_intersect( array_keys( $columns ), array_filter( $wp_list_table->get_hidden_columns() ) ); 301 301 $col_count = count($columns) - count($hidden); 302 302 … … 1294 1294 */ 1295 1295 function manage_columns_prefs( $page ) { 1296 global $ table;1297 1298 list( $columns, $hidden ) = $ table->get_column_headers();1296 global $wp_list_table; 1297 1298 list( $columns, $hidden ) = $wp_list_table->get_column_headers(); 1299 1299 1300 1300 $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username'); … … 1630 1630 1631 1631 function screen_meta($screen) { 1632 global $wp_meta_boxes, $_wp_contextual_help, $title, $ table;1632 global $wp_meta_boxes, $_wp_contextual_help, $title, $wp_list_table; 1633 1633 1634 1634 if ( is_string($screen) ) 1635 1635 $screen = convert_to_screen($screen); 1636 1636 1637 if ( is_a($ table, 'WP_List_Table') )1638 list( $screen_columns ) = $ table->get_column_headers();1637 if ( is_a($wp_list_table, 'WP_List_Table') ) 1638 list( $screen_columns ) = $wp_list_table->get_column_headers(); 1639 1639 $meta_screens = array('index' => 'dashboard'); 1640 1640 -
trunk/wp-admin/includes/theme-install.php
r15491 r15519 262 262 */ 263 263 function display_themes() { 264 global $ table;265 266 $ table->display();264 global $wp_list_table; 265 266 $wp_list_table->display(); 267 267 } 268 268 add_action('install_themes_search', 'display_themes'); -
trunk/wp-admin/link-manager.php
r15496 r15519 12 12 require_once( './includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Links_Table;15 $ table->check_permissions();14 $wp_list_table = new WP_Links_Table; 15 $wp_list_table->check_permissions(); 16 16 17 17 // Handle bulk deletes … … 36 36 } 37 37 38 $ table->prepare_items();38 $wp_list_table->prepare_items(); 39 39 40 40 $title = __('Links'); … … 85 85 86 86 <form id="posts-filter" action="" method="post"> 87 <?php $ table->display(); ?>87 <?php $wp_list_table->display(); ?> 88 88 <div id="ajax-response"></div> 89 89 </form> -
trunk/wp-admin/network/sites.php
r15496 r15519 15 15 require_once( '../includes/default-list-tables.php' ); 16 16 17 $ table = new WP_Sites_Table;18 $ table->check_permissions();17 $wp_list_table = new WP_Sites_Table; 18 $wp_list_table->check_permissions(); 19 19 20 20 $title = __( 'Sites' ); … … 351 351 case 'list': 352 352 default: 353 $ table->prepare_items();353 $wp_list_table->prepare_items(); 354 354 355 355 require_once( '../admin-header.php' ); … … 379 379 380 380 <form id="form-site-list" action="edit.php?action=allblogs" method="post"> 381 <?php $ table->display(); ?>381 <?php $wp_list_table->display(); ?> 382 382 </form> 383 383 </div> -
trunk/wp-admin/network/users.php
r15496 r15519 12 12 require_once( '../includes/default-list-tables.php' ); 13 13 14 $ table = new WP_MS_Users_Table;15 $ table->check_permissions();16 $ table->prepare_items();14 $wp_list_table = new WP_MS_Users_Table; 15 $wp_list_table->check_permissions(); 16 $wp_list_table->prepare_items(); 17 17 18 18 $title = __( 'Users' ); … … 79 79 80 80 <form id="form-user-list" action='edit.php?action=allusers' method='post'> 81 <?php $ table->display(); ?>81 <?php $wp_list_table->display(); ?> 82 82 </form> 83 83 </div> -
trunk/wp-admin/plugin-install.php
r15496 r15519 12 12 require_once( './includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Plugin_Install_Table;15 $ table->check_permissions();16 $ table->prepare_items();14 $wp_list_table = new WP_Plugin_Install_Table; 15 $wp_list_table->check_permissions(); 16 $wp_list_table->prepare_items(); 17 17 18 18 $title = __('Install Plugins'); -
trunk/wp-admin/plugins.php
r15496 r15519 12 12 require_once( ABSPATH . 'wp-admin/includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Plugins_Table;15 $ table->check_permissions();14 $wp_list_table = new WP_Plugins_Table; 15 $wp_list_table->check_permissions(); 16 16 17 17 if ( isset($_POST['clear-recent-list']) ) … … 303 303 update_user_meta( get_current_user_id(), 'plugins_last_view', $status ); 304 304 305 $ table->prepare_items();305 $wp_list_table->prepare_items(); 306 306 307 307 wp_enqueue_script('plugin-install'); … … 439 439 ?> 440 440 441 <?php $ table->display(); ?>441 <?php $wp_list_table->display(); ?> 442 442 </form> 443 443 -
trunk/wp-admin/theme-install.php
r15496 r15519 12 12 require_once( './includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Theme_Install_Table;15 $ table->check_permissions();16 $ table->prepare_items();14 $wp_list_table = new WP_Theme_Install_Table; 15 $wp_list_table->check_permissions(); 16 $wp_list_table->prepare_items(); 17 17 18 18 $title = __('Install Themes'); -
trunk/wp-admin/themes.php
r15496 r15519 12 12 require_once( './includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Themes_Table;15 $ table->check_permissions();14 $wp_list_table = new WP_Themes_Table; 15 $wp_list_table->check_permissions(); 16 16 17 17 if ( current_user_can('switch_themes') && isset($_GET['action']) ) { … … 31 31 } 32 32 33 $ table->prepare_items();33 $wp_list_table->prepare_items(); 34 34 35 35 $title = __('Manage Themes'); … … 106 106 <h3><?php _e('Available Themes'); ?></h3> 107 107 108 <?php $ table->display(); ?>108 <?php $wp_list_table->display(); ?> 109 109 110 110 <br class="clear" /> -
trunk/wp-admin/upload.php
r15496 r15519 12 12 require_once( './includes/default-list-tables.php' ); 13 13 14 $ table = new WP_Media_Table;15 $ table->check_permissions();14 $wp_list_table = new WP_Media_Table; 15 $wp_list_table->check_permissions(); 16 16 17 17 // Handle bulk actions … … 131 131 } 132 132 133 $ table->prepare_items();133 $wp_list_table->prepare_items(); 134 134 135 135 $title = __('Media Library'); … … 248 248 249 249 <form id="posts-filter" action="" method="post"> 250 <?php $ table->display(); ?>250 <?php $wp_list_table->display(); ?> 251 251 <div id="ajax-response"></div> 252 252 <?php find_posts_div(); ?> -
trunk/wp-admin/users.php
r15496 r15519 15 15 require_once( './includes/default-list-tables.php' ); 16 16 17 $ table = new WP_Users_Table;18 $ table->check_permissions();17 $wp_list_table = new WP_Users_Table; 18 $wp_list_table->check_permissions(); 19 19 20 20 $title = __('Users'); … … 309 309 } 310 310 311 $ table->prepare_items();311 $wp_list_table->prepare_items(); 312 312 313 313 include('./admin-header.php'); … … 413 413 414 414 <form id="posts-filter" action="" method="post"> 415 <?php $ table->display(); ?>415 <?php $wp_list_table->display(); ?> 416 416 </form> 417 417
Note: See TracChangeset
for help on using the changeset viewer.