WordPress/wp-admin
Sergey Biryukov 1553e3fa00 Coding Standards: Rename `$post_ID` variable to `$post_id` in various files.
The `$post_ID` variable is [546f59c678/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php (L54) technically allowed in WPCS], as there is a global of the same name that needs to remain for backward compatibility. However, this name is mostly a remnant of legacy code, and switching to `$post_id` where appropriate brings more consistency with the rest of core.

Additionally, this commit resolves a few WPCS warnings in core:
{{{
Variable "$post_IDs" is not in valid snake_case format
}}}

This affects:
* Function parameters in:
 * `add_meta()`
 * `post_preview()`
 * `WP_Embed::delete_oembed_caches()`
 * `WP_Embed::cache_oembed()`
 * `wp_get_post_cats()`
 * `wp_set_post_cats()`
 * `wp_unique_post_slug()`
 * `wp_set_post_categories()`
 * `wp_check_post_hierarchy_for_loops()`
 * `wp_add_trashed_suffix_to_post_name_for_trashed_posts()`
 * `wp_filter_wp_template_unique_post_slug()`
 * `wp_xmlrpc_server::add_enclosure_if_new()`
 * `wp_xmlrpc_server::attach_uploads()`
 * `wp_xmlrpc_server::mt_getTrackbackPings()`
* Internal variables in:
 * `wp_ajax_inline_save()`
 * `wp_ajax_set_post_thumbnail()`
 * `wp_ajax_get_post_thumbnail_html()`
 * `edit_post()`
 * `bulk_edit_posts()`
 * `wp_write_post()`
 * `WP_Embed::shortcode()`
 * `wp_insert_post()`
 * `wp_xmlrpc_server::_insert_post()`
 * `wp_xmlrpc_server::blogger_getPost()`
 * `wp_xmlrpc_server::blogger_newPost()`
 * `wp_xmlrpc_server::blogger_editPost()`
 * `wp_xmlrpc_server::blogger_deletePost()`
 * `wp_xmlrpc_server::mw_getPost()`
 * `wp_xmlrpc_server::mw_newPost()`
 * `wp_xmlrpc_server::mw_editPost()`
 * `wp_xmlrpc_server::mt_getPostCategories()`
 * `wp_xmlrpc_server::mt_setPostCategories()`
 * `wp_xmlrpc_server::mt_publishPost()`
 * `wp_xmlrpc_server::pingback_ping()`
* Hook parameters in:
 * `oembed_ttl`
 * `embed_oembed_html`
 * `wp_insert_post_parent`
 * `add_trashed_suffix_to_trashed_posts`
 * `pre_post_update`
 * `edit_attachment`
 * `attachment_updated`
 * `add_attachment`
 * `edit_post_{$post->post_type}`
 * `edit_post`
 * `post_updated`
 * `save_post_{$post->post_type}`
 * `save_post`
 * `wp_insert_post`
 * `pre_wp_unique_post_slug`
 * `wp_unique_post_slug`
 * `xmlrpc_call_success_blogger_newPost`
 * `xmlrpc_call_success_blogger_editPost`
 * `xmlrpc_call_success_blogger_deletePost`
 * `xmlrpc_call_success_mw_newPost`
 * `xmlrpc_call_success_mw_editPost`

Note: The name change only affects variable names and DocBlocks.

The change does not affect the `$post_ID` global still used in a few places.

Follow-up to [51399], [52958], [53723], [53729], [55190], [55308], [55334].

Props mahekkalola, tanjimtc71, SergeyBiryukov.
Fixes #57692.
Built from https://develop.svn.wordpress.org/trunk@55365


git-svn-id: http://core.svn.wordpress.org/trunk@54898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-19 15:05:22 +00:00
..
css Toolbar: Prevent false positive on automated contrast testing. 2023-02-11 17:39:20 +00:00
images Help/About: Update About section images. 2022-10-25 14:56:17 +00:00
includes Coding Standards: Rename `$post_ID` variable to `$post_id` in various files. 2023-02-19 15:05:22 +00:00
js Upgrade/Install: Update available theme updates count when a theme si deleted. 2023-02-17 09:54:19 +00:00
maint I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
network I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
user
about.php I18N: Add new strings to `about.php` for use with end-of-life updates. 2023-02-15 23:33:18 +00:00
admin-ajax.php Coding Standards: Remove extra space in `wp-admin/admin-ajax.php`. 2022-05-07 16:21:18 +00:00
admin-footer.php
admin-functions.php
admin-header.php
admin-post.php
admin.php
async-upload.php
authorize-application.php Docs: Various corrections and improvements to inline documentation. 2022-08-04 14:52:11 +00:00
comment.php
credits.php Help/About: Update copy & style for About page and subpages. 2022-10-18 15:10:12 +00:00
custom-background.php
custom-header.php
customize.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
edit-comments.php Help/About: Improve comments keyboard shortcuts HelpHub links. 2023-01-10 09:01:13 +00:00
edit-form-advanced.php Help/About: Update help tab texts to consistently describe button labels. 2023-02-02 20:24:20 +00:00
edit-form-blocks.php Themes: Introduce wp_theme_has_theme_json() for public consumption. 2023-01-18 11:40:10 +00:00
edit-form-comment.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
edit-link-form.php
edit-tag-form.php Networks and Sites: Officially remove global terms. 2022-09-20 02:51:09 +00:00
edit-tags.php Networks and Sites: Officially remove global terms. 2022-09-20 02:51:09 +00:00
edit.php Docs: Explicitly declare some globals for clarity. 2022-05-29 15:35:11 +00:00
erase-personal-data.php Administration: Define the `$title` global on privacy screens. 2023-02-07 14:40:21 +00:00
export-personal-data.php Administration: Define the `$title` global on privacy screens. 2023-02-07 14:40:21 +00:00
export.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
freedoms.php Help/About: Update About section images. 2022-10-25 14:56:17 +00:00
import.php
index.php
install-helper.php Docs: Fix typo and improve DocBlock formatting in `wp-admin/install-helper.php`. 2022-11-20 14:10:15 +00:00
install.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
link-add.php
link-manager.php
link-parse-opml.php
link.php
load-scripts.php
load-styles.php
media-new.php
media-upload.php
media.php Help/About: Update help tab texts to consistently describe button labels. 2023-02-02 20:24:20 +00:00
menu-header.php
menu.php Editor: Remove "beta" label from Site Editor submenu item. 2023-02-07 17:42:24 +00:00
moderation.php
ms-admin.php
ms-delete-site.php Text Changes: Improve the wording of the email sent to confirm site deletion. 2022-11-14 21:57:10 +00:00
ms-edit.php
ms-options.php
ms-sites.php
ms-themes.php
ms-upgrade-network.php
ms-users.php
my-sites.php General: Revert [54225]. 2022-09-20 08:19:10 +00:00
nav-menus.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
network.php
options-discussion.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
options-general.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
options-head.php
options-media.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
options-permalink.php Permalinks: Properly escape strings in Permalinks Settings screen. 2023-02-14 11:34:23 +00:00
options-privacy.php Administration: Define the `$title` global on privacy screens. 2023-02-07 14:40:21 +00:00
options-reading.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
options-writing.php Docs: Update the wording for the Update Services link on Writing Settings screen. 2023-02-15 19:18:18 +00:00
options.php Options, Meta APIs: Improve error messages in Options Management Administration Screen. 2022-12-01 22:20:12 +00:00
plugin-editor.php Administration: Correct the escaping in documentation lookup for plugin and theme editor. 2022-07-22 11:33:10 +00:00
plugin-install.php
plugins.php Help/About: Fix inconsistency in auto-updates help tabs. 2022-11-14 21:53:11 +00:00
post-new.php
post.php
press-this.php
privacy-policy-guide.php Administration: Define the `$title` global on privacy screens. 2023-02-07 14:40:21 +00:00
privacy.php Help/About: Update About section images. 2022-10-25 14:56:17 +00:00
profile.php
revision.php
setup-config.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
site-editor.php Editor: Remove missing postType and postId query args Site Editor redirect. 2023-02-14 16:26:18 +00:00
site-health-info.php
site-health.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
term.php General: Replace all `esc_url_raw()` calls in core with `sanitize_url()`. 2022-06-01 18:14:10 +00:00
theme-editor.php Coding Standards: Various brace indentation corrections. 2022-11-26 21:01:17 +00:00
theme-install.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
themes.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
tools.php
update-core.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
update.php
upgrade-functions.php
upgrade.php General: Replace all `esc_url_raw()` calls in core with `sanitize_url()`. 2022-06-01 18:14:10 +00:00
upload.php Media: Add a Download row action to the Media List Table. 2023-02-02 22:48:16 +00:00
user-edit.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
user-new.php I18N: Introduce `switch_to_user_locale()`. 2023-01-30 10:27:16 +00:00
users.php Help/About: Add info about the "View" row action link to the Users screen help tab. 2023-02-08 16:14:18 +00:00
widgets-form-blocks.php
widgets-form.php I18N: Mark screen reader strings as such with translator comments. 2023-02-07 17:10:21 +00:00
widgets.php