WordPress.org

Make WordPress Core

Ticket #9042: 9042.patch

File 9042.patch, 1.6 KB (added by hakre, 5 years ago)

Needed Javascript Changes added

  • wp-includes/comment-template.php

     
    11011101 
    11021102        $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; 
    11031103        echo "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n"; 
    1104         echo "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n"; 
     1104        echo "<input type='hidden' name='comment_parent' id='comment_parent_hidden_input' value='$replytoid' />\n"; 
    11051105} 
    11061106 
    11071107/** 
  • wp-includes/js/comment-reply.dev.js

     
    11 
    22addComment = { 
    33        moveForm : function(commId, parentId, respondId, postId) { 
    4                 var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID'); 
     4                var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent_hidden_input'), post = t.I('comment_post_ID'); 
    55 
    66                if ( ! comm || ! respond || ! cancel || ! parent ) 
    77                        return; 
     
    2828                        if ( ! temp || ! respond ) 
    2929                                return; 
    3030 
    31                         t.I('comment_parent').value = '0'; 
     31                        t.I('comment_parent_hidden_input').value = '0'; 
    3232                        temp.parentNode.insertBefore(respond, temp); 
    3333                        temp.parentNode.removeChild(temp); 
    3434                        this.style.display = 'none';