You are here

function _crumbs_load_weights_1_x in Crumbs, the Breadcrumbs suite 6.2

1 call to _crumbs_load_weights_1_x()
_crumbs_load_weights in ./crumbs.plugin_engine.inc

File

./crumbs.plugin_engine.inc, line 69

Code

function _crumbs_load_weights_1_x() {
  $weights_1_x = variable_get('crumbs', array());
  $weights_1_x = is_array($weights_1_x) ? $weights_1_x : array();
  $weights = array();
  $weight = 0;
  foreach ($weights_1_x as $key_1_x => $enabled) {

    // Replace ':' by '.'.
    $key = str_replace(':', '.', $key_1_x);
    if ($enabled) {
      $weights[$key] = $weight;
      ++$weight;
    }
    else {
      $weights[$key] = FALSE;
    }
  }
  return $weights;
}