wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



tag_exists › WordPress Function

Desde2.3.0
Obsoleton/a
tag_exists ( $tag_name )
Parâmetros:
  • (int|string) $tag_name
    Required: Yes
Retorna:
  • (mixed) Returns null if the term does not exist. Returns an array of the term ID and the term taxonomy ID if the pairing exists. Returns 0 if term ID 0 is passed to the function.
Definido em:
Codex:

Checks whether a post tag with a given name exists.



Fonte

function tag_exists( $tag_name ) {
	return term_exists( $tag_name, 'post_tag' );
}