You are here

function custom_breadcrumbs_taxonomy_enable in Custom Breadcrumbs 6.2

Same name and namespace in other branches
  1. 7.2 custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.install \custom_breadcrumbs_taxonomy_enable()

Implements hook_enable().

File

custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module, line 560
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_enable() {

  // Sets weight of custom_breadcrumbs_taxonomy to be greater than taxonomy, views, and custom_breadcrumbs.
  $max_weight = custom_breadcrumbs_taxonomy_minimum_module_weight();
  $current_weight = _custom_breadcrumbs_get_module_weight(array(
    'custom_breadcrumbs_taxonomy',
  ));
  if ($current_weight['custom_breadcrumbs_taxonomy'] < $max_weight) {
    drupal_set_message(t('Increasing the weight of custom_breadcrumbs_taxonomy for use with other modules.'));
    db_query("UPDATE {system} SET weight = %d WHERE name = 'custom_breadcrumbs_taxonomy'", $max_weight);
    variable_set('menu_rebuild_needed', TRUE);
  }
}