From f12d9995e7cf13c1c81401c3090264b1f41ec507 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 20 Mar 2022 14:55:06 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@52958 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 76ed7ea04f8b..138491fa77e6 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -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;