检查是否存在具有给定名称的帖子标记。
原型
tag_exists( int|string $tag_name )
参数
$tag_name
(int|string)
(Required)
返回值
(mixed)
源文件
路径:wp-admin/includes/taxonomy.php
<?php
...
function tag_exists($tag_name) {
return term_exists($tag_name, 'post_tag');
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/tag_exists/