[wp-trac] [WordPress Trac] #56243: Use a consistent parameter name for functions accepting a post ID or post object

WordPress Trac noreply at wordpress.org
Tue Oct 11 15:43:19 UTC 2022


#56243: Use a consistent parameter name for functions accepting a post ID or post
object
-------------------------------+-------------------------------------
 Reporter:  SergeyBiryukov     |       Owner:  SergeyBiryukov
     Type:  task (blessed)     |      Status:  closed
 Priority:  normal             |   Milestone:  6.1
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:  fixed
 Keywords:  has-patch          |     Focuses:  docs, coding-standards
-------------------------------+-------------------------------------
Changes (by SergeyBiryukov):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"54488" 54488]:
 {{{
 #!CommitTicketReference repository="" revision="54488"
 Comments: Return early from `comment_form()` if an invalid post ID is
 passed.

 If an invalid post ID is passed to the function, `comments_open()` should
 return `false`, and no comment form be displayed. This commit restores the
 previous behavior that was unintentionally changed when standardizing on
 the `$post` parameter name.

 Follow-up to [53715].

 Props peterwilsoncc.
 Fixes #56243.
 }}}

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


More information about the wp-trac mailing list