#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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.2 |
| Component: | Posts, Post Types | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | administration, coding-standards |
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.
3 years ago
#2
- Keywords has-patch added
@SergeyBiryukov commented on PR #4061:
3 years 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.
@SergeyBiryukov commented on PR #4061:
3 years ago
#6
Merged in r55365 as part of a few other similar edits.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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_IDsis renamed to$post_ids$post_IDis renamed to$post_id_from_datato 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