diff --git a/src/wp-admin/includes/taxonomy.php b/src/wp-admin/includes/taxonomy.php index 2326e9eb5092d..1d2a5427dcc87 100644 --- a/src/wp-admin/includes/taxonomy.php +++ b/src/wp-admin/includes/taxonomy.php @@ -19,7 +19,7 @@ * * @param int|string $cat_name Category name. * @param int $category_parent Optional. ID of parent category. - * @return string|null Returns the category ID as a numeric string if the pairing exists, null if not. + * @return int|null Returns the category ID if the pairing exists, null if not. */ function category_exists( $cat_name, $category_parent = null ) { $id = term_exists( $cat_name, 'category', $category_parent ); diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index bd83110e3fecf..8051aca400059 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -1576,8 +1576,8 @@ function term_exists( $term, $taxonomy = '', $parent_term = null ) { if ( ! empty( $taxonomy ) ) { return array( - 'term_id' => (string) $_term->term_id, - 'term_taxonomy_id' => (string) $_term->term_taxonomy_id, + 'term_id' => (int) $_term->term_id, + 'term_taxonomy_id' => (int) $_term->term_taxonomy_id, ); }