Coding Standards: Rename $comment_post_ID and $comment_author_IP variables in various files.
This fixes two WPCS warnings: * `Variable "$comment_post_ID" is not in valid snake_case format` * `Variable "$comment_author_IP" is not in valid snake_case format` While matching the database fields of the same name, these variables did not follow the WordPress coding standards, and are now renamed to address that. Note: The name change only affects internal variables and parameters for a few actions receiving a comment post ID: * `edit_comment` * `comment_id_not_found` * `comment_closed` * `comment_on_trash` * `comment_on_draft` * `comment_on_password_protected` * `pre_comment_on_post` The change does not affect parameters for functions receiving an array of comment data: * `wp_insert_comment()` * `wp_new_comment()` * `wp_update_comment()` * `wp_handle_comment_submission()` The associated array keys still match the database fields: `comment_post_ID` and `comment_author_IP`. Follow-up to [1706], [2894], [8720], [28427], [28437], [28457], [34799], [53720], See #55647, #56244. Built from https://develop.svn.wordpress.org/trunk@53723 git-svn-id: http://core.svn.wordpress.org/trunk@53282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -274,7 +274,7 @@ function get_comment_author_IP( $comment_ID = 0 ) { // phpcs:ignore WordPress.Na
|
||||
* @since 1.5.0
|
||||
* @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
|
||||
*
|
||||
* @param string $comment_author_IP The comment author's IP address, or an empty string if it's not available.
|
||||
* @param string $comment_author_ip The comment author's IP address, or an empty string if it's not available.
|
||||
* @param string $comment_ID The comment ID as a numeric string.
|
||||
* @param WP_Comment $comment The comment object.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user