Révision 4f315dab
Ajouté par Assos Assos il y a environ 8 ans
drupal7/sites/all/modules/menu_attributes/menu_attributes.module | ||
---|---|---|
16 | 16 |
return array( |
17 | 17 |
'administer menu attributes' => array( |
18 | 18 |
'title' => t('Administer menu attributes'), |
19 |
'description' => t('Administer menu attributes.'), |
|
19 |
'description' => t('Administer menu attributes configuration.'),
|
|
20 | 20 |
), |
21 | 21 |
); |
22 | 22 |
} |
... | ... | |
177 | 177 |
'#type' => 'fieldset', |
178 | 178 |
'#title' => t('Menu link attributes'), |
179 | 179 |
'#collapsible' => TRUE, |
180 |
'#collapsed' => FALSE,
|
|
180 |
'#collapsed' => TRUE,
|
|
181 | 181 |
'#tree' => TRUE, |
182 | 182 |
); |
183 | 183 |
|
... | ... | |
255 | 255 |
$has_visible_children = (bool) element_get_visible_children($form['options']['attributes']); |
256 | 256 |
$user_has_access = user_access('administer menu attributes'); |
257 | 257 |
$form['options']['attributes']['#access'] = ($has_visible_children && $user_has_access); |
258 |
|
|
259 |
$has_visible_children = (bool) element_get_visible_children($form['options']['item_attributes']); |
|
260 |
$form['options']['item_attributes']['#access'] = ($has_visible_children && $user_has_access); |
|
258 | 261 |
} |
259 | 262 |
|
260 | 263 |
/** |
... | ... | |
337 | 340 |
// Class get's special treatment, as it's an array and it should not |
338 | 341 |
// replace existing values. |
339 | 342 |
if ($attribute == 'class') { |
340 |
$value = explode(' ', $value);
|
|
343 |
$value = !is_array($value) ? explode(' ', $value) : $value;
|
|
341 | 344 |
if (isset($attributes[$attribute])) { |
342 | 345 |
$value = array_merge($attributes[$attribute], $value); |
343 | 346 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules