Skip to content

Commit

Permalink
Coding Standards: Rename the $cat_ID argument to $cat_id in `get_…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
SergeyBiryukov committed Mar 20, 2022
1 parent 8e4578f commit f12d999
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wp-includes/category-template.php
Expand Up @@ -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;
Expand Down

0 comments on commit f12d999

Please sign in to comment.