Last active
May 18, 2019 03:03
-
-
Save peterwilsoncc/e463ba477e81e8c946478d3b3c2154b4 to your computer and use it in GitHub Desktop.
Replacing WordPress's comment code to move the comment reply form.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// After WP Core's comment-reply.js is loaded. | |
(function () { | |
if ( typeof addComment === 'undefined' ) { | |
return; | |
} | |
// Source: Jetpack comments module by Automattic. | |
// See https://github.com/Automattic/jetpack/blob/2e9efb22810cbd0e60ad2d2a9158e47a4432577c/modules/comments/comments.php#L375-L413 | |
addComment._myPlugins_moveForm = addComment.moveForm; | |
addComment.moveForm = function( commId, parentId, respondId, postId ) { | |
// Disable editor. | |
addComment._myPlugins_moveForm( commId, parentId, respondId, postId ); | |
// Re-initialize error. | |
}; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment