Core Function
View Source on Trac ↗ tag_exists()
tag_exists( mixed $tag_name ) Checks whether a post tag with a given name exists.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | string) $tag_name Required |
Return Value
(mixed)
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.
Function Information
Since Version
2.3.0
Source File
wp-admin/includes/taxonomy.php
Advertisement