#57692 closed defect (bug) (fixed)
Coding Standards: Invalid variable name $post_IDs and $post_ID as per coding standards
Reported by: | mahekkalola | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | administration, coding-standards | Cc: |
Description
File: wp-admin/includes/post.php
Found two variables $post_IDs and $post_ID which can be renamed to maintain coding standards.
Change History (6)
This ticket was mentioned in PR #4061 on WordPress/wordpress-develop by @tanjimtc71.
19 months ago
#2
- Keywords has-patch added
@SergeyBiryukov commented on PR #4061:
19 months ago
#3
Thanks for the PR!
I think we can just use $post_id
here, as it does not appear to conflict with any existing variable. This would also be more consistent with the rest of core, which generally uses $post_id
when referring to a post ID.
#5
@
19 months ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 55365:
@SergeyBiryukov commented on PR #4061:
19 months ago
#6
Merged in r55365 as part of a few other similar edits.
Note: See
TracTickets for help on using
tickets.
Fixes #57692
This pull request renames the variables $post_IDs and $post_ID in the "wp-admin/includes/post.php" file to align with the WordPress coding standards.
$post_IDs
is renamed to$post_ids
$post_ID
is renamed to$post_id_from_data
to avoid conflicts and maintain coding standards.The changes were thoroughly tested and are ready for review. Thank you for considering this pull request.
Trac ticket: https://core.trac.wordpress.org/ticket/57692