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

WordPress Trac noreply at wordpress.org
Mon Jul 18 20:32:02 UTC 2022


#56244: Use a consistent parameter name for functions accepting a comment ID or
object
----------------------------+-------------------------------------
 Reporter:  SergeyBiryukov  |       Owner:  SergeyBiryukov
     Type:  enhancement     |      Status:  accepted
 Priority:  normal          |   Milestone:  6.1
Component:  Comments        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  2nd-opinion     |     Focuses:  docs, coding-standards
----------------------------+-------------------------------------
Changes (by audrasjb):

 * keywords:   => 2nd-opinion


Comment:

 @SergeyBiryukov question: shouldn't we keep `$comment_id` so it's more
 clear than just `$comment`?

 In my –very humble ^^– opinion, `$comment` would be reserved for
 `WP_Comment` object, just like `$post` and `$post_id`. What do you think?

 I'm not opposed to your proposal, though. Just my two cents :)

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


More information about the wp-trac mailing list