Coding Standards: Rename the `$cat_ID` argument to `$cat_id` in `get_the_category_by_ID()`.

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

Props azouamauriac.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52958


git-svn-id: http://core.svn.wordpress.org/trunk@52547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-03-20 14:57:07 +00:00
parent 8cdec43675
commit 845f4f00fd
2 changed files with 5 additions and 5 deletions

View File

@ -103,12 +103,12 @@ function get_the_category( $post_id = false ) {
*
* @since 0.71
*
* @param int $cat_ID Category ID.
* @param int $cat_id Category ID.
* @return string|WP_Error Category name on success, WP_Error on failure.
*/
function get_the_category_by_ID( $cat_ID ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
$cat_ID = (int) $cat_ID;
$category = get_term( $cat_ID );
function get_the_category_by_ID( $cat_id ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
$cat_id = (int) $cat_id;
$category = get_term( $cat_id );
if ( is_wp_error( $category ) ) {
return $category;

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-52957';
$wp_version = '6.0-alpha-52958';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.