WordPress.org

Make WordPress Core

Ticket #15849: quick.15849.diff

File quick.15849.diff, 786 bytes (added by scribu, 9 years ago)

Disable ajaxification if there are no items

  • wp-admin/includes/class-wp-list-table.php

     
    845845         * @access private
    846846         */
    847847        function _js_vars() {
     848                if ( ! $this->has_items() )
     849                        return;
     850
    848851                $args = array(
    849852                        'class' => get_class( $this ),
    850853                        'screen' => get_current_screen()
  • wp-admin/js/list-table.dev.js

     
    144144        }
    145145}
    146146
     147if ( typeof list_args == 'undefined' )
     148        return;
     149
    147150listTable.init();
    148151
    149152// Ajaxify various UI elements