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

WordPress Trac noreply at wordpress.org
Tue Jul 19 14:00:50 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:                  |     Focuses:  docs, coding-standards
----------------------------+-------------------------------------

Comment (by SergeyBiryukov):

 In [changeset:"53719" 53719]:
 {{{
 #!CommitTicketReference repository="" revision="53719"
 Coding Standards: Improve variable names in `wp-trackback.php`.

 This fixes a `Variable "$comment_post_ID" is not in valid snake_case
 format` WPCS warning.

 `$comment_post_ID`, while matching the database field of the same name,
 does not follow the WordPress coding standards, so the variable is now
 renamed to `$comment_post_id`.

 Additionally, these variables are renamed for clarity:

 * `$tb_id` to `$post_id` (this was not the trackback ID)
 * `$tb_url` to `$trackback_url`

 Follow-up to [172], [637], [1616],

 See #55647, #56244.
 }}}

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


More information about the wp-trac mailing list