wp-admin/includes/taxonomy.php:309Adds a new term to the database if it does not already exist.
$tag_namestring$taxonomystringoptional'post_tag'array|WP_Errorfunction wp_create_term( $tag_name, $taxonomy = 'post_tag' ) { $id = term_exists( $tag_name, $taxonomy ); if ( $id ) { return $id; } return wp_insert_term( $tag_name, $taxonomy );}Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-admin/includes/taxonomy.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.