From c7e7a0b0569ff398869ac3d0f5e721ddb89d2904 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 14 Feb 2023 15:44:41 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@55334 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/deprecated.php | 12 ++++++------ src/wp-includes/taxonomy.php | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php index 8faf82eeed..5526a97cbb 100644 --- a/src/wp-includes/deprecated.php +++ b/src/wp-includes/deprecated.php @@ -1150,13 +1150,13 @@ function comments_rss_link($link_text = 'Comments RSS') { * @see get_category_feed_link() * * @param bool $display - * @param int $cat_ID + * @param int $cat_id * @return string */ -function get_category_rss_link($display = false, $cat_ID = 1) { +function get_category_rss_link($display = false, $cat_id = 1) { _deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' ); - $link = get_category_feed_link($cat_ID, 'rss2'); + $link = get_category_feed_link($cat_id, 'rss2'); if ( $display ) echo $link; @@ -1248,12 +1248,12 @@ function get_commentdata( $comment_id, $no_cache = 0, $include_unapproved = fals * @deprecated 2.8.0 Use get_cat_name() * @see get_cat_name() * - * @param int $cat_ID Category ID + * @param int $cat_id Category ID * @return string category name */ -function get_catname( $cat_ID ) { +function get_catname( $cat_id ) { _deprecated_function( __FUNCTION__, '2.8.0', 'get_cat_name()' ); - return get_cat_name( $cat_ID ); + return get_cat_name( $cat_id ); } /** diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index bd83110e3f..f090b349ab 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -2154,13 +2154,13 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) { * * @since 2.0.0 * - * @param int $cat_ID Category term ID. + * @param int $cat_id Category term ID. * @return bool|int|WP_Error Returns true if completes delete action; false if term doesn't exist; * Zero on attempted deletion of default Category; WP_Error object is * also a possibility. */ -function wp_delete_category( $cat_ID ) { - return wp_delete_term( $cat_ID, 'category' ); +function wp_delete_category( $cat_id ) { + return wp_delete_term( $cat_id, 'category' ); } /**