WordPress.org

Make WordPress Core

Ticket #16262: garyc40.16262.2.diff

File garyc40.16262.2.diff, 2.8 KB (added by garyc40, 7 years ago)

make commentReply work again, since it works in WP 3.0 and should still work properly in 3.1

  • wp-admin/admin-ajax.php

    diff --git wp-admin/admin-ajax.php wp-admin/admin-ajax.php
    index cd48d43..6dd52c7 100644
    case 'replyto-comment' : 
    675675                        _wp_dashboard_recent_comments_row( $comment );
    676676                } else {
    677677                        if ( 'single' == $_REQUEST['mode'] ) {
    678                                 $wp_list_table = get_list_table('WP_Post_Comments_List_Table');
     678                                $wp_list_table = _get_list_table('WP_Post_Comments_List_Table');
    679679                        } else {
    680                                 $wp_list_table = get_list_table('WP_Comments_List_Table');
     680                                $wp_list_table = _get_list_table('WP_Comments_List_Table');
    681681                        }
    682682                        $wp_list_table->single_row( $comment );
    683683                }
    case 'edit-comment' : 
    713713        $comments_status = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
    714714
    715715        $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
    716         $wp_list_table = get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table' );
     716        $wp_list_table = _get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table' );
    717717
    718718        ob_start();
    719719                $wp_list_table->single_row( get_comment( $comment_id ) );
  • wp-admin/js/edit-comments.dev.js

    diff --git wp-admin/js/edit-comments.dev.js wp-admin/js/edit-comments.dev.js
    index 00ebe6b..c0032be 100644
    commentReply = { 
    278278
    279279                this.comments_listing = $('#comments-form > input[name="comment_status"]').val() || '';
    280280
    281                 $(listTable).bind('beforeChangePage', function(){
     281                /* $(listTable).bind('beforeChangePage', function(){
    282282                        commentReply.close();
    283                 });
     283                }); */
    284284        },
    285285
    286286        addEvents : function(r) {
    commentReply = { 
    482482$(document).ready(function(){
    483483        var make_hotkeys_redirect, edit_comment, toggle_all, make_bulk;
    484484
    485         setCommentsList();
     485        // setCommentsList();
    486486        commentReply.init();
    487487        $(document).delegate('span.delete a.delete', 'click', function(){return false;});
    488488
  • wp-includes/script-loader.php

    diff --git wp-includes/script-loader.php wp-includes/script-loader.php
    index 9253270..24f13f1 100644
    function wp_default_scripts( &$scripts ) { 
    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( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'list-table', 'jquery-ui-resizable', 'quicktags'), '20101223' );
     302                $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20101223' );
    303303                $scripts->add_data( 'admin-comments', 'group', 1 );
    304304                $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
    305305                        'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),