tag_exists

Advertisement

Summery Summery

Check whether a post tag with a given name exists.

Syntax Syntax

tag_exists( int|string $tag_name )

Parameters Parameters

$tag_name

(int|string) (Required)

Return Return

(mixed)

Source Source

File: wp-admin/includes/taxonomy.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.