WordPress at Your Fingertips
function is not described

wp_create_tag() WP 2.3.0

Add a new tag to the database if it does not already exist.

No Hooks.

Return

Array|WP_Error.

Usage

wp_create_tag( $tag_name );
$tag_name *(int string) (required)*

Changelog

Since 2.3.0 Introduced.

Code of wp_create_tag() WP 5.8.2

function wp_create_tag( $tag_name ) {
	return wp_create_term( $tag_name, 'post_tag' );
}