wp_get_link_cats

Definition:
function wp_get_link_cats( $link_id = 0 ) {}

Retrieves the link categories associated with the link specified.

Parameters

  • int $link_id: Link ID to look up

Return values

returns:The requested link’s categories

Source code

function wp_get_link_cats( $link_id = 0 ) {



	$cats = wp_get_object_terms( $link_id, 'link_category', array('fields' => 'ids') );



	return array_unique( $cats );

}

3711

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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: