[wp-trac] [WordPress Trac] #42380: Add comment url filter to comment list table

WordPress Trac noreply at wordpress.org
Mon Oct 30 13:48:14 UTC 2017


#42380: Add comment url filter to comment list table
-------------------------+-----------------------------
 Reporter:  danieltj     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Comments     |    Version:  4.8.2
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 In `class-wp-comments-list-table.php` on line 684 we get the author url
 like so:

 {{{
 $author_url = get_comment_author_url( $comment );
 }}}

 Even though slightly further down there is a filter for the comment author
 email address, there isn't a filter for the comment author url. Directly
 below the code listed above, there should be another filter (for
 completeness if not for anything else).

 I'd suggest something like this:

 {{{
 $author_url = apply_filters( 'comment_website', $author_url, $comment );
 }}}

 This would then allow the author url to be altered with the added bonus of
 the comment object for extra flexibility, much like the email address.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42380>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list