[wp-trac] [WordPress Trac] #48772: Missing post ID as parameter for get_comments_number_text()
WordPress Trac
noreply at wordpress.org
Wed Feb 12 08:09:53 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:
------------------------------+-----------------------
Changes (by SergeyBiryukov):
* status: closed => reopened
* resolution: fixed =>
Comment:
Having second thoughts on this.
The existing fourth parameter of `comments_number()` was previously the
number of comments, deprecated in [5101].
While keeping it as is and adding a fifth parameter the safest option, I
believe it should also be safe to just un-deprecate and repurpose the
fourth parameter. Given that it's been deprecated for the last 13 years,
it's highly unlikely that someone is still using it.
A search for [https://wpdirectory.net/search/01E0W5QCQETXZZ866GRX01SJKA
plugins] or [https://wpdirectory.net/search/01E0W5QZ2YFXAMMJYHXAKT2BVR
themes] passing a numeric fourth parameter to `comments_number()` shows
zero results, only some false positives.
This is also different from [34118] / #33654. That was a serious issue for
a pluggable function that depended on plugins being updated. This is minor
in comparison, and `comments_number()` is not pluggable. Worst case here,
a wrong comments number, should be an easy correction.
Proposing [attachment:"48772.6.diff"] to address this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48772#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list