[wp-trac] [WordPress Trac] #47306: comment reply event listener: need ability to run custom js function

WordPress Trac noreply at wordpress.org
Sat May 18 03:04:26 UTC 2019


#47306: comment reply event listener:  need ability to run custom js function
-------------------------+------------------------------
 Reporter:  jnorell      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Comments     |     Version:  5.1
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by peterwilsoncc):

 Hi @jnorell and welcome to trac!

 Am I correct to understand you had a custom implementation of
 `addComment.moveForm()` to replace WP Core's version?

 If so, you still replace it by settings your plugin's JavaScript to rely
 on Core's `comment-reply` when enqueueing it override it by creating a
 function `addComment.moveForm()`. Jetpack takes a
 [https://github.com/Automattic/jetpack/blob/2e9efb22810cbd0e60ad2d2a9158e47a4432577c/modules/comments/comments.php#L375-L378
 similar approach for Jetpack comments].

 See https://gist.github.com/peterwilsoncc/e463ba477e81e8c946478d3b3c2154b4

 --

 If I am misunderstanding your needs, please let me know and I will keep
 this ticket open until I hear back from you.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47306#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list