Handles the addition of the comment form.
- Since:
-
- 2.7.0
- Source:
Methods
-
<static> init(context)
-
Add events to links classed .comment-reply-link. Searches the context for reply links and adds the JavaScript events required to move the comment form. To allow for lazy loading of comments this method is exposed as window.commentReply.init().
Parameters:
Name Type Description context
HTMLElement The parent DOM element to search for links. - Since:
-
- 5.1.0
- Source:
-
<static> moveForm(addBelowId, commentId, respondId, postId, replyTo)
-
Moves the reply form from its current position to the reply location.
Parameters:
Name Type Description addBelowId
String HTML ID of element the form follows. commentId
String Database ID of comment being replied to. respondId
String HTML ID of 'respond' element. postId
String Database ID of the post. replyTo
String Form heading content. - Since:
-
- 2.7.0
- Source: