diff --git a/wp-admin/includes/taxonomy.php b/wp-admin/includes/taxonomy.php index 359cfafe2f..470d36d55f 100644 --- a/wp-admin/includes/taxonomy.php +++ b/wp-admin/includes/taxonomy.php @@ -48,19 +48,19 @@ function get_category_to_edit( $id ) { * * @since 2.0.0 * - * @param int|string $cat_name Category name. - * @param int $category_parent Optional. ID of parent category. - * @return int|WP_Error + * @param string $category_name Category name. + * @param int $category_parent Optional. ID of parent category. + * @return int The ID of category term on success, or zero on failure. */ -function wp_create_category( $cat_name, $category_parent = 0 ) { - $id = category_exists( $cat_name, $category_parent ); +function wp_create_category( $category_name, $category_parent = 0 ) { + $id = category_exists( $category_name, $category_parent ); if ( $id ) { - return $id; + return (int) $id; } return wp_insert_category( array( - 'cat_name' => $cat_name, + 'cat_name' => $category_name, 'category_parent' => $category_parent, ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 1ae1d9a901..cc15b43048 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-alpha-61295'; +$wp_version = '7.0-alpha-61298'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.