wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



tag_exists › WordPress Function

Od2.3.0
Przestarzałyn/a
tag_exists ( $tag_name )
Parametry:
  • (int|string) $tag_name
    Wymagane: Tak
Powrót:
  • (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.
Zdefiniowane na:
Codex:

Checks whether a post tag with a given name exists.



Źródło

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