[wp-trac] [WordPress Trac] #29454: comments_link filter can not be run on comments_popup_link if post has no comments.

WordPress Trac noreply at wordpress.org
Wed Sep 3 07:20:30 UTC 2014


#29454: comments_link filter can not be run on comments_popup_link if post has no
comments.
--------------------------+------------------------------
 Reporter:  joedolson     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:  2.5
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  template
--------------------------+------------------------------

Comment (by SergeyBiryukov):

 `comments_link()` has an additional benefit of `esc_url()` after the
 filter, we should keep using it here.

 Note that `get_permalink() . '#respond'` is a direct link to the comment
 form, while `comments_link()` is a link to the comments block. There is no
 difference in default themes with no comments, but there might be a
 difference in other themes.

 Perhaps we could add a new filter, `get_respond_link`.

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


More information about the wp-trac mailing list