[wp-trac] [WordPress Trac] #48772: Missing post ID as parameter for get_comments_number_text()

WordPress Trac noreply at wordpress.org
Fri Dec 27 11:11:49 UTC 2019


#48772: Missing post ID as parameter for get_comments_number_text()
------------------------------------+-----------------------
 Reporter:  Hinjiriyo               |       Owner:  donmhico
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  5.4
Component:  Comments                |     Version:  4.0
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |     Focuses:
------------------------------------+-----------------------

Comment (by donmhico):

 Need some `dev-feedback` in here. Basically the
 [https://core.trac.wordpress.org/attachment/ticket/48772/48772.2.diff
 patch] above, adds `$post_id` param in `get_comments_number_text()`.  Now
 the concern is `comments_number()` is basically a wrapper of
 `get_comments_number_text()`. So I think it's good to be able to somehow
 pass the `$post_id` param in `comments_number()` as well but it already
 has 4 params and adding the fifth one does not seem to be the best
 approach. Any suggestion is highly welcome.

 Reference:
 https://github.com/WordPress/wordpress-develop/blob/master/src/wp-includes
 /comment-template.php#L878-L883

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


More information about the wp-trac mailing list