WordPress.org

Make WordPress Core

Ticket #16262: 16262.2.diff

File 16262.2.diff, 22.6 KB (added by nacin, 9 years ago)
  • wp-includes/script-loader.php

     
    299299                $scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20090106' );
    300300                $scripts->add_data( 'admin-custom-fields', 'group', 1 );
    301301
    302                 $scripts->add( 'list-table', "/wp-admin/js/list-table$suffix.js", array( 'jquery-query', 'jquery-serialize-object' ), '20110112' );
     302                /* $scripts->add( 'list-table', "/wp-admin/js/list-table$suffix.js", array( 'jquery-query', 'jquery-serialize-object' ), '20110112' );
    303303                $scripts->add_data( 'list-table', 'group', 1 );
    304304                $scripts->localize( 'list-table', 'listTableL10n', array(
    305305                        'error' => __('An error has occurred while loading the items.'),
    306306                        'search' => __('Search results for “%s”'),
    307307                        'l10n_print_after' => 'try{convertEntities(listTableL10n);}catch(e){};'
    308                 ) );
     308                ) ); */
    309309
    310310                $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'list-table', 'jquery-ui-resizable', 'quicktags'), '20101223' );
    311311                $scripts->add_data( 'admin-comments', 'group', 1 );
  • wp-admin/users.php

     
    1212if ( ! current_user_can( 'list_users' ) )
    1313        wp_die( __( 'Cheatin’ uh?' ) );
    1414
    15 $wp_list_table = get_list_table('WP_Users_List_Table');
     15$wp_list_table = _get_list_table('WP_Users_List_Table');
    1616
    1717$title = __('Users');
    1818$parent_file = 'users.php';
  • wp-admin/edit-comments.php

     
    1111if ( !current_user_can('edit_posts') )
    1212        wp_die(__('Cheatin’ uh?'));
    1313
    14 $wp_list_table = get_list_table('WP_Comments_List_Table');
     14$wp_list_table = _get_list_table('WP_Comments_List_Table');
    1515$pagenum = $wp_list_table->get_pagenum();
    1616
    1717$doaction = $wp_list_table->current_action();
  • wp-admin/includes/class-wp-ms-sites-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_MS_Sites_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/class-wp-posts-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Posts_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/list-table.php

     
    1010/**
    1111 * Fetch an instance of a WP_List_Table class.
    1212 *
     13 * @access private
    1314 * @since 3.1.0
    1415 *
    15  * @param string $class The type of the list table, which is the class name except for core list tables.
     16 * @param string $class The type of the list table, which is the class name.
    1617 * @return object|bool Object on success, false if the class does not exist.
    1718 */
    18 function get_list_table( $class ) {
    19         $class = apply_filters( "get_list_table_$class", $class );
    20 
    21         require_list_table( $class );
    22 
    23         if ( class_exists( $class ) )
    24                 return new $class;
    25         return false;
    26 }
    27 
    28 /**
    29  * Include the proper file for a core list table.
    30  *
    31  * Useful for extending a core class that would not otherwise be required.
    32  *
    33  * @since 3.1.0
    34  *
    35  * @param string $table The core table to include.
    36  * @return bool True on success, false on failure.
    37  */
    38 function require_list_table( $class ) {
     19function _get_list_table( $class ) {
    3920        $core_classes = array(
    4021                //Site Admin
    4122                'WP_Posts_List_Table' => 'posts',
     
    5738
    5839        if ( isset( $core_classes[ $class ] ) ) {
    5940                require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $core_classes[ $class ] . '-list-table.php' );
    60                 return true;
     41                return new $class;
    6142        }
    6243
    6344        return false;
  • wp-admin/includes/class-wp-media-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Media_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/class-wp-links-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Links_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/class-wp-terms-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Terms_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/update.php

     
    194194
    195195        $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
    196196
    197         $wp_list_table = get_list_table('WP_Plugins_List_Table');
     197        $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    198198
    199199        if ( is_network_admin() || !is_multisite() ) {
    200200                echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
     
    270270
    271271        $details_url = self_admin_url("theme-install.php?tab=theme-information&theme=$theme_key&TB_iframe=true&width=600&height=400");
    272272
    273         $wp_list_table = get_list_table('WP_MS_Themes_List_Table');
     273        $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    274274
    275275        echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
    276276        if ( ! current_user_can('update_themes') )
  • wp-admin/includes/class-wp-users-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Users_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/class-wp-plugin-install-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Plugin_Install_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_MS_Themes_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/class-wp-list-table.php

     
    1313 * @package WordPress
    1414 * @subpackage List_Table
    1515 * @since 3.1.0
     16 * @access private
    1617 */
    1718class WP_List_Table {
    1819
     
    9293
    9394                $this->_args = $args;
    9495
    95                 if ( $args['ajax'] ) {
     96                if ( false && $args['ajax'] ) {
    9697                        wp_enqueue_script( 'list-table' );
    9798                        add_action( 'admin_footer', array( &$this, '_js_vars' ) );
    9899                }
     
    199200<p class="search-box">
    200201        <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
    201202        <input type="text" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
    202         <?php submit_button( $text, 'button', 'submit', false, array('id' => 'search-submit') ); ?>
     203        <?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
    203204</p>
    204205<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
    205206<?php
     
    467468         * @since 3.1.0
    468469         * @access protected
    469470         */
    470         function pagination() {
    471                 if ( $this->_pagination ) {
    472                         echo $this->_pagination;
    473                         return;
    474                 }
    475 
     471        function pagination( $which ) {
    476472                if ( empty( $this->_pagination_args ) )
    477473                        return;
    478474
     
    506502                        '&lsaquo;'
    507503                );
    508504
    509                 $html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='%s' value='%s' size='%d' />",
     505                if ( 'bottom' == $which )
     506                        $maybe_input_field = $current;
     507                else
     508                        $maybe_input_field = "<input class='current-page' value='%s' title='%s' type='text' name='%s' size='%d' />";
     509
     510                $html_current_page = sprintf( $maybe_input_field,
     511                        $current,
    510512                        esc_attr__( 'Current page' ),
    511513                        esc_attr( 'paged' ),
    512                         number_format_i18n( $current ),
    513514                        strlen( $total_pages )
    514515                );
    515516                $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
     
    631632
    632633                return array( $current_orderby, $current_order );
    633634        }
    634        
     635
    635636        function add_query_args( $location ) {
    636637                $pagenum = $this->get_pagenum();
    637638                list( $current_orderby, $current_order ) = $this->get_order_info();
     
    656657                list( $columns, $hidden, $sortable ) = $this->get_column_info();
    657658
    658659                $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     660                $current_url = remove_query_arg( 'paged', $current_url );
    659661
    660662                list( $current_orderby, $current_order ) = $this->get_order_info();
    661663
     
    707709        function display() {
    708710                extract( $this->_args );
    709711
    710                 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
     712                // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    711713
    712714                $this->display_tablenav( 'top' );
    713715
     
    767769                $this->extra_tablenav( $which );
    768770                $this->pagination( $which );
    769771
    770 if ( 'bottom' == $which ) {
     772if ( false && 'bottom' == $which ) {
    771773?>
    772774<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
    773775<?php } ?>
  • wp-admin/includes/class-wp-theme-install-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Theme_Install_List_Table extends WP_List_Table {
    1011
     
    127128
    128129        function display() {
    129130
    130                 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
     131                // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    131132?>
    132133                <div class="tablenav top">
    133134                        <div class="alignleft actions">
  • wp-admin/includes/class-wp-ms-users-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_MS_Users_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/meta-boxes.php

     
    484484
    485485        wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
    486486
    487         $wp_list_table = get_list_table('WP_Post_Comments_List_Table');
     487        $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
    488488        $wp_list_table->display( true );
    489489?>
    490490<p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p>
  • wp-admin/includes/class-wp-plugins-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Plugins_List_Table extends WP_List_Table {
    1011
  • wp-admin/includes/class-wp-themes-list-table.php

     
    55 * @package WordPress
    66 * @subpackage List_Table
    77 * @since 3.1.0
     8 * @access private
    89 */
    910class WP_Themes_List_Table extends WP_List_Table {
    1011
     
    101102        }
    102103
    103104        function display() {
    104                 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
     105                // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    105106?>
    106107                <?php $this->tablenav( 'top' ); ?>
    107108
  • wp-admin/includes/class-wp-comments-list-table.php

     
    1313 * @package WordPress
    1414 * @subpackage List_Table
    1515 * @since 3.1.0
     16 * @access private
    1617 */
    1718class WP_Comments_List_Table extends WP_List_Table {
    1819
     
    266267        function display() {
    267268                extract( $this->_args );
    268269
    269                 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
     270                // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    270271
    271272                $this->display_tablenav( 'top' );
    272273
     
    509510 * @package WordPress
    510511 * @subpackage List_Table
    511512 * @since 3.1.0
     513 * @access private
    512514 *
    513515 * @see WP_Comments_Table
    514516 */
     
    536538        function display( $output_empty = false ) {
    537539                extract( $this->_args );
    538540
    539                 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
     541                // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    540542?>
    541543<table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0" style="display:none;">
    542544        <tbody id="the-comment-list"<?php if ( $singular ) echo " class='list:$singular'"; ?>>
  • wp-admin/includes/template.php

     
    332332        }
    333333
    334334        if ( $mode == 'single' ) {
    335                 $wp_list_table = get_list_table('WP_Post_Comments_List_Table');
     335                $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
    336336        } else {
    337                 $wp_list_table = get_list_table('WP_Comments_List_Table');
     337                $wp_list_table = _get_list_table('WP_Comments_List_Table');
    338338        }
    339339
    340340?>
  • wp-admin/edit-tags.php

     
    1212if ( !current_user_can( $tax->cap->manage_terms ) )
    1313        wp_die( __( 'Cheatin&#8217; uh?' ) );
    1414
    15 $wp_list_table = get_list_table('WP_Terms_List_Table');
     15$wp_list_table = _get_list_table('WP_Terms_List_Table');
    1616
    1717$title = $tax->labels->name;
    1818
  • wp-admin/upload.php

     
    1212if ( !current_user_can('upload_files') )
    1313        wp_die( __( 'You do not have permission to upload files.' ) );
    1414
    15 $wp_list_table = get_list_table('WP_Media_List_Table');
     15$wp_list_table = _get_list_table('WP_Media_List_Table');
    1616$pagenum = $wp_list_table->get_pagenum();
    1717
    1818// Handle bulk actions
  • wp-admin/plugin-install.php

     
    2020        exit();
    2121}
    2222
    23 $wp_list_table = get_list_table('WP_Plugin_Install_List_Table');
     23$wp_list_table = _get_list_table('WP_Plugin_Install_List_Table');
    2424$pagenum = $wp_list_table->get_pagenum();
    2525$wp_list_table->prepare_items();
    2626$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
  • wp-admin/network/users.php

     
    1616if ( ! current_user_can( 'manage_network_users' ) )
    1717        wp_die( __( 'You do not have permission to access this page.' ) );
    1818
    19 $wp_list_table = get_list_table('WP_MS_Users_List_Table');
     19$wp_list_table = _get_list_table('WP_MS_Users_List_Table');
    2020$wp_list_table->prepare_items();
    2121
    2222$title = __( 'Users' );
  • wp-admin/network/site-users.php

     
    1616if ( ! current_user_can('manage_sites') )
    1717        wp_die(__('You do not have sufficient permissions to edit this site.'));
    1818
    19 $wp_list_table = get_list_table('WP_Users_List_Table');
     19$wp_list_table = _get_list_table('WP_Users_List_Table');
    2020$wp_list_table->prepare_items();
    2121
    2222$action = $wp_list_table->current_action();
  • wp-admin/network/themes.php

     
    2121if ( !current_user_can('manage_network_themes') )
    2222        wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) );
    2323
    24 $wp_list_table = get_list_table('WP_MS_Themes_List_Table');
     24$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    2525$pagenum = $wp_list_table->get_pagenum();
    2626
    2727$action = $wp_list_table->current_action();
  • wp-admin/network/site-themes.php

     
    3232        '<p>' . __('<a href="http://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
    3333);
    3434
    35 $wp_list_table = get_list_table('WP_MS_Themes_List_Table');
     35$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    3636
    3737$action = $wp_list_table->current_action();
    3838
  • wp-admin/network/sites.php

     
    1616if ( ! current_user_can( 'manage_sites' ) )
    1717        wp_die( __( 'You do not have permission to access this page.' ) );
    1818
    19 $wp_list_table = get_list_table('WP_MS_Sites_List_Table');
     19$wp_list_table = _get_list_table('WP_MS_Sites_List_Table');
    2020$pagenum = $wp_list_table->get_pagenum();
    2121
    2222$title = __( 'Sites' );
  • wp-admin/plugins.php

     
    1919if ( !current_user_can('activate_plugins') )
    2020        wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
    2121
    22 $wp_list_table = get_list_table('WP_Plugins_List_Table');
     22$wp_list_table = _get_list_table('WP_Plugins_List_Table');
    2323$pagenum = $wp_list_table->get_pagenum();
    2424
    2525$action = $wp_list_table->current_action();
  • wp-admin/edit.php

     
    2323if ( !current_user_can($post_type_object->cap->edit_posts) )
    2424        wp_die(__('Cheatin&#8217; uh?'));
    2525
    26 $wp_list_table = get_list_table('WP_Posts_List_Table');
     26$wp_list_table = _get_list_table('WP_Posts_List_Table');
    2727$pagenum = $wp_list_table->get_pagenum();
    2828
    2929// Back-compat for viewing comments of an entry
  • wp-admin/link-manager.php

     
    1111if ( ! current_user_can( 'manage_links' ) )
    1212        wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
    1313
    14 $wp_list_table = get_list_table('WP_Links_List_Table');
     14$wp_list_table = _get_list_table('WP_Links_List_Table');
    1515
    1616// Handle bulk deletes
    1717$doaction = $wp_list_table->current_action();
  • wp-admin/theme-install.php

     
    2020        exit();
    2121}
    2222
    23 $wp_list_table = get_list_table('WP_Theme_Install_List_Table');
     23$wp_list_table = _get_list_table('WP_Theme_Install_List_Table');
    2424$pagenum = $wp_list_table->get_pagenum();
    2525$wp_list_table->prepare_items();
    2626$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
  • wp-admin/themes.php

     
    1212if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') )
    1313        wp_die( __( 'Cheatin&#8217; uh?' ) );
    1414
    15 $wp_list_table = get_list_table('WP_Themes_List_Table');
     15$wp_list_table = _get_list_table('WP_Themes_List_Table');
    1616
    1717if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
    1818        if ( 'activate' == $_GET['action'] ) {