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

WordPress Trac noreply at wordpress.org
Tue Feb 25 17:26:08 UTC 2020

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

Comment (by SergeyBiryukov):

 Replying to [comment:22 garrett-eclipse]:
 > One last remark, I was wondering if we should utilize the fourth param
 to pass the `$id` to the instance of `comments_number` found here;
 > https://github.com/WordPress/wordpress-develop/blob/master/src/wp-
 > *Note: If not provided will get a $post_id in `get_comments_number`
 using `get_post`

 That could be done, however doesn't seem to make a difference, as
 `comments_popup_link()` can only be used in the loop, and `$id` would be
 the same value that `get_comments_number()` retrieves via `get_post()`.

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

More information about the wp-trac mailing list