Make WordPress Core

Ticket #39282: 39282-1.patch

File 39282-1.patch, 2.4 KB (added by sanket.parmar, 8 years ago)

Hi @johnbillion, This patch will solve that scenarios. Let me know if it is correct.

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

     
    587587
    588588                        $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'edit', 'vim-q comment-inline', esc_attr__( 'Quick edit this comment inline' ), __( 'Quick Edit' ) );
    589589
    590                         $actions['reply'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'replyto', 'vim-r comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) );
     590                        if ( 'unapproved' === $the_comment_status ) {
     591                                $reply_button_text = __( 'Approve and Reply' );
     592                                $reply_aria_label = __( 'Approve and Reply to this comment' );
     593                        } else {
     594                                $reply_button_text = __( 'Reply' );
     595                                $reply_aria_label = __( 'Reply to this comment' );
     596                        }
     597
     598                        $actions['reply'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'replyto', 'vim-r comment-inline', esc_attr( $reply_aria_label ), $reply_button_text );
    591599                }
    592600
    593601                /** This filter is documented in wp-admin/includes/dashboard.php */
  • src/wp-admin/js/edit-comments.js

     
    223223                        c.find( '.row-actions span.view' ).addClass( 'hidden' ).end()
    224224                                .find( 'div.comment_status' ).html( '0' );
    225225
     226                        c.find( '.row-actions span.reply a' ).text(adminCommentsL10n.replyApprove);
     227
    226228                } else {
    227229                        if ( settings.data.id == replyID )
    228230                                replyButton.text(adminCommentsL10n.reply);
     
    229231
    230232                        c.find( '.row-actions span.view' ).removeClass( 'hidden' ).end()
    231233                                .find( 'div.comment_status' ).html( '1' );
     234
     235                        c.find( '.row-actions span.reply a' ).text(adminCommentsL10n.reply);
    232236                }
    233237
    234238                diff = $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1;
     
    716720
    717721                        if ( c.hasClass('unapproved') ) {
    718722                                replyButton.text(adminCommentsL10n.replyApprove);
     723                                c.find( '.row-actions span.reply a' ).text(adminCommentsL10n.replyApprove);
    719724                        } else {
    720725                                replyButton.text(adminCommentsL10n.reply);
     726                                c.find( '.row-actions span.reply a' ).text(adminCommentsL10n.reply);
    721727                        }
    722728
    723729                        $('#replyrow').fadeIn(300, function(){ $(this).show(); });