WordPress.org

Make WordPress Core

Ticket #16262: garyc40.16262.hotkey.2.diff

File garyc40.16262.hotkey.2.diff, 1.1 KB (added by garyc40, 7 years ago)

don't reload when next or prev buttons are disabled, also don't pass hotkeys_hightlight_(first|last) to pagination links

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

    diff --git wp-admin/includes/class-wp-list-table.php wp-admin/includes/class-wp-list-table.php
    index 13a688c..3bcfc04 100644
    class WP_List_Table { 
    478478                $current = $this->get_pagenum();
    479479
    480480                $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     481               
     482                $current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
    481483
    482484                $page_links = array();
    483485
  • wp-admin/js/edit-comments.dev.js

    diff --git wp-admin/js/edit-comments.dev.js wp-admin/js/edit-comments.dev.js
    index 5ca2fb6..3b03ee7 100644
    $(document).ready(function(){ 
    495495                                var first_last, l;
    496496
    497497                                first_last = 'next' == which? 'first' : 'last';
    498                                 l = $('.'+which+'.page-numbers');
     498                                l = $('.tablenav-pages .'+which+'-page:not(.disabled)');
    499499                                if (l.length)
    500500                                        window.location = l[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g, '')+'&hotkeys_highlight_'+first_last+'=1';
    501501                        }