wp/wp-admin/includes/taxonomy.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
--- a/wp/wp-admin/includes/taxonomy.php	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-admin/includes/taxonomy.php	Fri Sep 05 18:40:08 2025 +0200
@@ -11,7 +11,7 @@
 //
 
 /**
- * Check whether a category exists.
+ * Checks whether a category exists.
  *
  * @since 2.0.0
  *
@@ -30,7 +30,7 @@
 }
 
 /**
- * Get category object for given ID and 'edit' filter context.
+ * Gets category object for given ID and 'edit' filter context.
  *
  * @since 2.0.0
  *
@@ -44,7 +44,7 @@
 }
 
 /**
- * Add a new category to the database if it does not already exist.
+ * Adds a new category to the database if it does not already exist.
  *
  * @since 2.0.0
  *
@@ -67,7 +67,7 @@
 }
 
 /**
- * Create categories for the given post.
+ * Creates categories for the given post.
  *
  * @since 2.0.0
  *
@@ -186,14 +186,14 @@
  * @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 === (int) $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.
@@ -210,7 +210,7 @@
 //
 
 /**
- * Check whether a post tag with a given name exists.
+ * Checks whether a post tag with a given name exists.
  *
  * @since 2.3.0
  *
@@ -224,7 +224,7 @@
 }
 
 /**
- * Add a new tag to the database if it does not already exist.
+ * Adds a new tag to the database if it does not already exist.
  *
  * @since 2.3.0
  *
@@ -236,7 +236,7 @@
 }
 
 /**
- * Get comma-separated list of tags available to edit.
+ * Gets comma-separated list of tags available to edit.
  *
  * @since 2.3.0
  *
@@ -249,7 +249,7 @@
 }
 
 /**
- * Get comma-separated list of terms available to edit for the given post ID.
+ * Gets comma-separated list of terms available to edit for the given post ID.
  *
  * @since 2.8.0
  *
@@ -298,7 +298,7 @@
 }
 
 /**
- * Add a new term to the database if it does not already exist.
+ * Adds a new term to the database if it does not already exist.
  *
  * @since 2.8.0
  *