Checks whether a post tag with a given name exists.
Parameters
$tag_name
int|stringrequired
Source
function tag_exists( $tag_name ) {
return term_exists( $tag_name, 'post_tag' );
}
Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |
CARVIEW |
Checks whether a post tag with a given name exists.
$tag_name
int|stringrequiredfunction tag_exists( $tag_name ) {
return term_exists( $tag_name, 'post_tag' );
}
Uses | Description |
---|---|
term_exists()wp-includes/taxonomy.php | Determines whether a taxonomy term exists. |
Version | Description |
---|---|
2.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.