[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:37:15 UTC 2020
#48772: Missing post ID as parameter for get_comments_number_text()
------------------------------+-----------------------
Reporter: Hinjiriyo | Owner: donmhico
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.4
Component: Comments | Version: 4.0
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-----------------------
Comment (by garrett-eclipse):
Replying to [comment:24 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-
includes/comment-template.php#L1618
> > *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()`.
Thanks for confirming @SergeyBiryukov I found a similar result so
wholeheartedly agree it's unneeded there.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48772#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list