function _custom_breadcrumbs_taxonomy_allowed_node_type in Custom Breadcrumbs 6.2
Same name and namespace in other branches
- 7.2 custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module \_custom_breadcrumbs_taxonomy_allowed_node_type()
Determines if the current node is one of the types listed on the advanced settings page.
Parameters
$nodetype: The node type being considered for a custom breadcrumb.
Return value
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_nodeapi in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module - Implements hook_nodeapi().
- 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 546 - This module implements taxonomy_based breadcrumbs using a hybrid of methods developed for the custom_breadcrumbs and taxonomy_breadcrumbs modules. Breadcrumbs are provided for node and taxonomy term pages. If 'Use taxonomy hierarchy' is…
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;
}