wp_create_tag( int|string $tag_name )
Add a new tag to the database if it does not already exist.
Description Description
Parameters Parameters
- $tag_name
-
(int|string) (Required)
Return Return
(array|WP_Error)
Source Source
File: wp-admin/includes/taxonomy.php
function wp_create_tag( $tag_name ) { return wp_create_term( $tag_name, 'post_tag' ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |