[wp-trac] [WordPress Trac] #26240: Allow get_comments_number() to accept post object
WordPress Trac
noreply at wordpress.org
Wed May 28 19:30:32 UTC 2014
#26240: Allow get_comments_number() to accept post object
--------------------------+---------------------
Reporter: coffee2code | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.0
Component: Comments | Version:
Severity: normal | Resolution: fixed
Keywords: needs-patch | Focuses:
--------------------------+---------------------
Changes (by ocean90):
* keywords: has-patch commit => needs-patch
Comment:
There is a typo in the `get_comments_number` hook doc for the $post_id
arg: N'''n'''umber.
Also the value of $post_id has changed. Previously if $post_id was 0
$post_id was set to get_the_ID(). It seems like $post_id was never a
WP_Post object so we can replace $post_id with $post->ID in the
`get_comments_number` filter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26240#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list