You are here

function crumbs_get_weights in Crumbs, the Breadcrumbs suite 7

Returns an array of plugin keys and their weights.

Make sure to distinguish the weight 0 from FALSE, which denotes a disabled plugin.

The "*" plugin key is a wildcard that triggers inheritance (runs all implicitly enabled plugins that aren't in the provided list). It always has the biggest weight.

Return value

An array of plugin keys and their weights, sorted by weight.

3 calls to crumbs_get_weights()
crumbs_admin_form_submit in admin/crumbs.admin.inc
crumbs_get_plugin_engine in ./crumbs.module
Loads and instantiates the plugin engine.
_crumbs_get_default_text in admin/crumbs.admin.inc

File

./crumbs.module, line 433
Provides an API for building breadcrumbs.

Code

function crumbs_get_weights() {
  $weights = variable_get('crumbs_weights', array(
    'crumbs.home_title' => 0,
  ));
  asort($weights);
  if (!isset($weights['*'])) {
    $weights['*'] = count($weights);
  }
  return $weights;
}