You are here

function helper_get_tweaks in Helper 7

2 calls to helper_get_tweaks()
helper_is_tweak_enabled in ./helper.module
helper_settings_form in ./helper.admin.inc

File

./helper.module, line 86

Code

function helper_get_tweaks() {
  $tweaks =& drupal_static(__FUNCTION__);
  if (!isset($tweaks)) {
    $tweaks = module_invoke_all('helper_tweak_info');
    drupal_alter('helper_tweak_info', $tweaks);
    $status = variable_get('helper_tweaks', array());
    foreach ($tweaks as $tweak => $info) {
      if (isset($status[$tweak])) {
        $tweaks[$tweak]['enabled'] = (bool) $status[$tweak];
      }
      else {
        $tweaks[$tweak] += array(
          'enabled' => TRUE,
        );
      }
    }
  }
  return $tweaks;
}