function community_tags_get_user_node_tags in Community Tags 6.2
Same name and namespace in other branches
- 5 community_tags.module \community_tags_get_user_node_tags()
- 6 community_tags.module \community_tags_get_user_node_tags()
- 7 community_tags.module \community_tags_get_user_node_tags()
Retrieve list of tags for a given node that belong to a user.
5 calls to community_tags_get_user_node_tags()
- community_tags_authcache_callback in community_tags_authcache/
community_tags_authcache_callback.php - Authcache callback function for community tags.
- community_tags_from_js in ./
community_tags.ajax.inc - Callback for the JS tagger.
- community_tags_node_view in ./
community_tags.module - Community tags callback for node view.
- community_tags_ui_tag in community_tags_ui/
community_tags_ui.module - Menu page callback for community-tags/%ctools_js/tag/%node/%vocabulary
- community_tags_views_plugin_attachment_tagform::render in community_tags_views/
views/ plugins/ community_tags_views_plugin_attachment_tagform.inc
File
- ./
community_tags.module, line 1123 - Implements community tagging of nodes using a specific vocabulary for Drupal v6.x
Code
function community_tags_get_user_node_tags($user, $node, $vid) {
$tags_and_terms = community_tags_get_user_node_tags_and_terms($user, $node, $vid);
// merge terms and new tags (i.e. have no tid) into array of tags
$tags = $tags_and_terms['terms'];
if (!empty($tags_and_terms['new tags'])) {
foreach ($tags_and_terms['new tags'] as $new_tag) {
$tags[$new_tag] = (object) array(
'name' => $new_tag,
'tid' => $new_tag,
);
}
}
return $tags;
}