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

(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