From 12aba159d96830bccb3cc8fb11f5ac9268b09f74 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 2 Feb 2023 13:59:18 +0000 Subject: [PATCH] Coding Standards: Rename the `$cat_ID` variable to `$cat_id` in `wp_update_category()`. This resolves a few WPCS warnings: {{{ Variable "$cat_ID" is not in valid snake_case format, try "$cat_i_d" }}} Follow-up to [2695], [4490], [52958]. Props hilayt24, viralsampat, desrosj, robinwpdeveloper, tanazmasaba, costdev, SergeyBiryukov. See #56754. Built from https://develop.svn.wordpress.org/trunk@55190 git-svn-id: http://core.svn.wordpress.org/trunk@54723 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/taxonomy.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/taxonomy.php b/wp-admin/includes/taxonomy.php index 2326e9eb50..6f6d502711 100644 --- a/wp-admin/includes/taxonomy.php +++ b/wp-admin/includes/taxonomy.php @@ -186,14 +186,14 @@ function wp_insert_category( $catarr, $wp_error = false ) { * @return int|false The ID number of the new or updated Category on success. Zero or FALSE on failure. */ function wp_update_category( $catarr ) { - $cat_ID = (int) $catarr['cat_ID']; + $cat_id = (int) $catarr['cat_ID']; - if ( isset( $catarr['category_parent'] ) && ( $cat_ID == $catarr['category_parent'] ) ) { + if ( isset( $catarr['category_parent'] ) && ( $cat_id == $catarr['category_parent'] ) ) { return false; } // First, get all of the original fields. - $category = get_term( $cat_ID, 'category', ARRAY_A ); + $category = get_term( $cat_id, 'category', ARRAY_A ); _make_cat_compat( $category ); // Escape data pulled from DB. diff --git a/wp-includes/version.php b/wp-includes/version.php index 4ed1b683dd..d98ba219c4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55189'; +$wp_version = '6.2-alpha-55190'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.