Uses
Uses | Description |
---|---|
wp-admin/includes/taxonomy.php: wp_create_term() | Add a new term to the database if it does not already exist. |
Add a new tag to the database if it does not already exist.
(int|string) (Required)
(array|WP_Error)
File: wp-admin/includes/taxonomy.php
function wp_create_tag( $tag_name ) { return wp_create_term( $tag_name, 'post_tag' ); }
Version | Description |
---|---|
2.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_create_tag