wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_create_tag › WordPress Function

Depuis2.3.0
Dépréciéen/a
wp_create_tag ( $tag_name )
Paramètres:
  • (int|string) $tag_name
    Requis: Oui
Retourne:
  • (array|WP_Error)
Défini(e) dans:
Codex:

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



Source

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