Make WordPress Core

Changeset 52958


Ignore:
Timestamp:
03/20/2022 02:55:06 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r52204 r52958  
    104104 * @since 0.71
    105105 *
    106  * @param int $cat_ID Category ID.
     106 * @param int $cat_id Category ID.
    107107 * @return string|WP_Error Category name on success, WP_Error on failure.
    108108 */
    109 function get_the_category_by_ID( $cat_ID ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
    110     $cat_ID   = (int) $cat_ID;
    111     $category = get_term( $cat_ID );
     109function get_the_category_by_ID( $cat_id ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
     110    $cat_id   = (int) $cat_id;
     111    $category = get_term( $cat_id );
    112112
    113113    if ( is_wp_error( $category ) ) {
Note: See TracChangeset for help on using the changeset viewer.