Make WordPress Core


Ignore:
Timestamp:
02/14/2023 03:44:41 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename the remaining $cat_ID variables to $cat_id.

This resolves a few WPCS warnings:

Variable "$cat_ID" is not in valid snake_case format, try "$cat_i_d"

Affected functions:

  • wp_delete_category()
  • get_category_rss_link()
  • get_catname()

Follow-up to [836], [2068], [2551], [2695], [6365], [10959], [52958], [55190].

Fixes #56754.

File:
1 edited

Legend:

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

    r55018 r55334  
    21552155 * @since 2.0.0
    21562156 *
    2157  * @param int $cat_ID Category term ID.
     2157 * @param int $cat_id Category term ID.
    21582158 * @return bool|int|WP_Error Returns true if completes delete action; false if term doesn't exist;
    21592159 *                           Zero on attempted deletion of default Category; WP_Error object is
    21602160 *                           also a possibility.
    21612161 */
    2162 function wp_delete_category( $cat_ID ) {
    2163     return wp_delete_term( $cat_ID, 'category' );
     2162function wp_delete_category( $cat_id ) {
     2163    return wp_delete_term( $cat_id, 'category' );
    21642164}
    21652165
Note: See TracChangeset for help on using the changeset viewer.