WordPress.org

Make WordPress Core

Ticket #16262: garyc40.16262.diff

File garyc40.16262.diff, 5.1 KB (added by garyc40, 10 years ago)

removed quick edit and reply links on edit_comments.php for now, until ajax actions are implemented again, neutered setCommentsList() and commentReply in edit-comments.js

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

    diff --git wp-admin/includes/class-wp-comments-list-table.php wp-admin/includes/class-wp-comments-list-table.php
    index 5864e3b..c918d12 100644
    class WP_Comments_List_Table extends WP_List_Table { 
    409409
    410410                        if ( 'trash' != $the_comment_status ) {
    411411                                $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . esc_attr__( 'Edit comment' ) . "'>". __( 'Edit' ) . '</a>';
    412                                 $actions['quickedit'] = '<a onclick="commentReply.open( \''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\' );return false;" class="vim-q" title="'.esc_attr__( 'Quick Edit' ).'" href="#">' . __( 'Quick&nbsp;Edit' ) . '</a>';
     412                                /* $actions['quickedit'] = '<a onclick="commentReply.open( \''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\' );return false;" class="vim-q" title="'.esc_attr__( 'Quick Edit' ).'" href="#">' . __( 'Quick&nbsp;Edit' ) . '</a>';
    413413                                if ( 'spam' != $the_comment_status )
    414                                         $actions['reply'] = '<a onclick="commentReply.open( \''.$comment->comment_ID.'\',\''.$post->ID.'\' );return false;" class="vim-r" title="'.esc_attr__( 'Reply to this comment' ).'" href="#">' . __( 'Reply' ) . '</a>';
     414                                        $actions['reply'] = '<a onclick="commentReply.open( \''.$comment->comment_ID.'\',\''.$post->ID.'\' );return false;" class="vim-r" title="'.esc_attr__( 'Reply to this comment' ).'" href="#">' . __( 'Reply' ) . '</a>'; */
    415415                        }
    416416
    417417                        $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
  • wp-admin/includes/dashboard.php

    diff --git wp-admin/includes/dashboard.php wp-admin/includes/dashboard.php
    index 8f937f3..68b7771 100644
    function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { 
    680680                $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
    681681                $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
    682682                $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>';
    683                 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
     683                // $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
    684684                $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */  _x( 'Spam', 'verb' ) . '</a>';
    685685                if ( !EMPTY_TRASH_DAYS )
    686686                        $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
  • 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..400e1ff 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();
    486         commentReply.init();
     485        // setCommentsList();
     486        // commentReply.init();
    487487        $(document).delegate('span.delete a.delete', 'click', function(){return false;});
    488488
    489489        if ( typeof QTags != 'undefined' )
  • 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']),