Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-admin/includes/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}

Expand Down