You are here

protected function crumbs_PluginSystem_PluginInfo::get_weights in Crumbs, the Breadcrumbs suite 7.2

Combination of user-defined weights and default weights

Return value

array

See also

crumbs_PluginSystem_PluginInfo::$weights

File

lib/PluginSystem/PluginInfo.php, line 73

Class

crumbs_PluginSystem_PluginInfo
Info about available plugins and their weights.

Code

protected function get_weights() {
  $weights = $this->defaultWeights;
  foreach ($this->userWeights as $key => $weight) {

    // Make sure to skip NULL values.
    if (isset($weight)) {
      $weights[$key] = $weight;
    }
  }
  return $weights;
}