Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.