Advertisements

category_exists

Definition:
function category_exists($cat_name, $parent = 0) {}

Parameters

  • unknown_type $cat_name
  • $parent

Source code

function category_exists($cat_name, $parent = 0) {

	$id = term_exists($cat_name, 'category', $parent);

	if ( is_array($id) )

		$id = $id['term_id'];

	return $id;

}

587

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: