function _custom_breadcrumbs_taxonomy_allowed_node_type in Custom Breadcrumbs 7.2
Same name and namespace in other branches
- 6.2 custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module \_custom_breadcrumbs_taxonomy_allowed_node_type()
Function for allowed node type.
Determines if the current node is one of the types listed on the advanced settings page.
Parameters
string $nodetype: The node type being considered for a custom breadcrumb.
Return value
bool TRUE if the node type is selected for a custom breadcrumbs taxonomy breadcrumb, FALSE otherwise.
3 calls to _custom_breadcrumbs_taxonomy_allowed_node_type()
- custom_breadcrumbs_taxonomy_cb_node_form_table in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module - Implements hook_cb_node_form_table().
- custom_breadcrumbs_taxonomy_node_view in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module - Implements hook_node_view().
- custom_breadcrumbs_taxonomy_views_pre_render in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module - Implements hook_views_pre_render().
File
- custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module, line 568 - Main file for the Custom breadcrumbs for taxonomy.
Code
function _custom_breadcrumbs_taxonomy_allowed_node_type($nodetype) {
// If the node type IS IN the node types list and the list IS inclusive OR
// If the node type IS NOT IN the node types list and the list IS NOT
// inclusive (e.g. exclusive)
// THEN modify the breadcrumb trail.
$array_of_types = array_filter((array) variable_get('custom_breadcrumbs_taxonomy_node_types', CUSTOM_BREADCRUMBS_TAXONOMY_NODE_TYPES_DEFAULT));
$in_list = in_array($nodetype, $array_of_types);
$allowed = $in_list == variable_get('custom_breadcrumbs_taxonomy_include_nodes', 0);
return $allowed;
}