Skip to content

Instantly share code, notes, and snippets.

@peterwilsoncc
Last active May 18, 2019 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterwilsoncc/e463ba477e81e8c946478d3b3c2154b4 to your computer and use it in GitHub Desktop.
Save peterwilsoncc/e463ba477e81e8c946478d3b3c2154b4 to your computer and use it in GitHub Desktop.
Replacing WordPress's comment code to move the comment reply form.
// 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