function _service_links_show in Service links 6
Same name and namespace in other branches
- 5 service_links.module \_service_links_show()
Check if the service links should be displayed for the node type/category.
3 calls to _service_links_show()
- service_links_block in ./
service_links.module - Implementation of hook_block().
- service_links_link in ./
service_links.module - Implementation of hook_link().
- service_links_nodeapi in ./
service_links.module - Implementation of hook_nodeapi().
File
- ./
service_links.module, line 527 - Current Maintainer: Fabio Mucciante aka TheCrow Original Author: Fredrik Jonsson fredrik at combonet dot se A module that adds Digg, del.icio.us, reddit, Technorati etc. links to nodes.
Code
function _service_links_show($node) {
$links_show = FALSE;
$category_type = FALSE;
$node_type = in_array($node->type, variable_get('service_links_node_types', array()), TRUE);
if (module_exists('taxonomy')) {
$terms = taxonomy_node_get_terms($node);
foreach ($terms as $term) {
$category_type |= in_array($term->tid, variable_get('service_links_category_types', array()), FALSE);
}
}
if ($node_type || $category_type) {
$links_show = TRUE;
}
return $links_show;
}