Projet

Général

Profil

Révision a8cee257

Ajouté par Assos Assos il y a plus de 4 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/dhtml_menu/dhtml_menu.admin.inc
1 1
<?php
2
// $Id: dhtml_menu.admin.inc,v 1.22 2010/11/09 21:24:51 arancaytar Exp $
3 2

  
4 3

  
5 4
/**
......
94 93
    '#title' => t('When a new page is loaded'),
95 94
    '#options' => array(
96 95
      'remember' => t('Remember which items were expanded on the last page.'),
97
      0 => t('Expand only the currently active path.'),
96
      '' => t('Expand only the currently active path.'),
98 97
    ),
99 98
    '#default_value' => $settings['effects']['remember'],
100 99
  );
......
123 122
    '#default_value' => $settings['filter']['list'],
124 123
    '#description' => t('DHTML will be used for all menus by default, but can be switched off for specific menus.'),
125 124
  );
125
  
126
  if (module_exists('menu_block')) {
127
    $options['filter']['menu_block'] = array(
128
      '#type' => 'checkboxes',
129
      '#title' => t('Menu Blocks'),
130
      '#options' => _dhtml_menu_blocks(),
131
      '#default_value' => $settings['filter']['menu_block'],
132
      '#description' => t('You may enable/disable specific menu blocks here, as long as the corresponding menu is enabled.'),
133
    );
134
  }
126 135

  
127 136
  $options['#tree'] = TRUE;
128 137
  $form['dhtml_menu_settings'] = $options;
......
160 169
  return $menu_names;
161 170
}
162 171

  
172
/**
173
 * Build an option list for all menu blocks in the system.
174
 * Only applicable if the Menu Block module is installed.
175
 */
176
function _dhtml_menu_blocks() {
177
  if (function_exists('menu_block_block_info')) {
178
    $block_names = array();
179
    $blocks = menu_block_block_info();
180
    foreach ($blocks as $delta => $block) {
181
      $block_names['menu_block_' . $delta] = $block['info'];
182
    }
183
    
184
    return $block_names;
185
  }
186
  return NULL;
187
}

Formats disponibles : Unified diff