WordPress.org

Make WordPress Core

Ticket #7643: hotkeys-shift-u.diff

File hotkeys-shift-u.diff, 1.9 KB (added by nbachiyski, 7 years ago)

Fix unapprove bulk action (Shift+U)

  • wp-includes/script-loader.php

     
    155155                        'good' => __('Medium'), 
    156156                        'strong' => __('Strong') 
    157157                ) ); 
    158                 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20081014' ); 
     158                $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20081016' ); 
    159159                $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( 
    160160                        'pending' => __('%i% pending'), // must look like: "# blah blah" 
    161161                        'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), 
     
    435435add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); 
    436436 
    437437add_action( 'wp_default_styles', 'wp_default_styles' ); 
    438 add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); 
    439  No newline at end of file 
     438add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); 
  • wp-admin/js/edit-comments.js

     
    320320                }; 
    321321                $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', ['e', edit_comment], 
    322322                                ['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')], 
    323                                 ['shift+d', make_bulk('delete')], ['shift+x', toggle_all]], 
     323                                ['shift+d', make_bulk('delete')], ['shift+x', toggle_all], 
     324                                ['shift+u', make_bulk('unapprove')]], 
    324325                                {highlight_first: adminCommentsL10n.hotkeys_highlight_first, highlight_last: adminCommentsL10n.hotkeys_highlight_last, 
    325326                                prev_page_link_cb: make_hotkeys_redirect('prev'), next_page_link_cb: make_hotkeys_redirect('next')} 
    326327                );