Advertisements

get_tag

Definition:
function &get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {}

Retrieve post tag by tag ID or tag object.
If you pass the $tag parameter an object, which is assumed to be the tag row object retrieved the database. It will cache the tag data.

Parameters

  • int|object $tag
  • string $output: Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
  • string $filter: Optional. Default is raw or no WordPress defined filter will applied.

Return values

returns:Return type based on $output value.

Source code

function &get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {

	return get_term( $tag, 'post_tag', $output, $filter );

}

1717

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: