Mercurial > hg > rr-repo
comparison sites/all/modules/menu_attributes/menu_attributes.api.php @ 2:b74b41bb73f0
-- Google analytics module
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Thu, 22 Aug 2013 17:22:54 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1:67ce89da90df | 2:b74b41bb73f0 |
---|---|
1 <?php | |
2 | |
3 /** | |
4 * @file | |
5 * Documentation for Menu Attributes API. | |
6 */ | |
7 | |
8 /** | |
9 * Alter the list of menu item attributes. | |
10 * | |
11 * @param $attributes | |
12 * An array of attributes to be controlled by Menu Attributes, keyed by | |
13 * attribute name. Each attribute record should be an array with the following | |
14 * key/value pairs: | |
15 * - label: The human-readable name of the attribute. | |
16 * - description: The attribute description. | |
17 * - form: A Form API array. Some default values for this array are provided | |
18 * in menu_attributes_get_menu_attribute_info(). | |
19 * | |
20 * @see menu_attributes_menu_attribute_info() | |
21 * @see menu_attributes_get_menu_attribute_info() | |
22 */ | |
23 function hook_menu_attribute_info(array &$attributes) { | |
24 // Add a Tabindex attribute. | |
25 $info['tabindex'] = array( | |
26 'label' => t('Tabindex'), | |
27 'description' => t('Specifies the tab order for the link.'), | |
28 'form' => array( | |
29 '#maxlength' => 3, | |
30 '#size' => 2, | |
31 ), | |
32 ); | |
33 | |
34 // Remove the Access Key attribute. | |
35 unset($attributes['accesskey']); | |
36 } |