Révision 2e0f6994
Ajouté par Assos Assos il y a environ 4 ans
drupal7/sites/all/modules/ckeditor/CHANGELOG.txt | ||
---|---|---|
1 | 1 |
7.x-1.x-dev |
2 | 2 |
Development snapshot |
3 | 3 |
|
4 |
2020-03-17 |
|
5 |
New stable release: 7.x-1.19 |
|
6 |
|
|
7 |
[#2349885] by hass, Dieter Geiling: Add config.smiley_path for relative image urls |
|
8 |
[#2993053] by stefan.korn: DocBlock missing for hook_user_presave() |
|
9 |
[#2211217] by bwaindwain, gifad: Using "theme css", CKEditor fails to translate URI to valid URL |
|
10 |
[#172229] by vokiel: Update CKEditor to 4.14.0 |
|
11 |
[#169464] by vokiel: Fix (remove) the eval() usage inside JavaScript files. |
|
12 |
[#2679179] by Dave Reid, ron_s: CKEditor uses separate cache-busting query string from Drupal's |
|
13 |
[#2795603] by hgoto: drush ckeditor-download command raises warning with undefined offset |
|
14 |
[#2947109] by jstoller: New default CKEditor skin not recognized |
|
15 |
[#2898012] bump CKEditor to 4.9.2 |
|
16 |
[#2790539] by Johnny vd Laar: prepare callback is optional, ckeditor_filter_xss causes notices |
|
17 |
|
|
18 |
2017-06-26 |
|
19 |
New stable release: 7.x-1.18 |
|
20 |
|
|
21 |
[#2463187] by Devin Carlson: Allow plugins to specify custom paths for button icons |
|
22 |
[#2299617] by ben.kyriakou: IMCE browser in CKEditor plugin doesn't respect current language |
|
23 |
[#1330794] by m4olivei, bwaindwain, ConfuciusDa1st, fearlsgroove: Use theme css in sub-theme does not include base theme |
|
24 |
[#2886073] by anrikun: Mistake in feature dependencies |
|
25 |
[#2644124] by drclaw: Some CKEditor plugins buttons don't appear in the Drag & Drop toolbar wizard |
|
26 |
[#2540528] by neerajsingh: In filemanager.config.php, Building $baseDir |
|
27 |
[#2705773] by japerry: ckeditor missing the 'prepare callback' from input filters |
|
28 |
[#2745809] by alvar0hurtad0: Add some tests to avoid failed testing of all patches |
|
29 |
|
|
30 |
2015-11-30 |
|
31 |
New stable release: 7.x-1.17 |
|
32 |
|
|
33 |
[#2550535] by jcisio, donquixote: $plugin_settings['active'] is messing with features |
|
34 |
[#2574253] by karenann: User specific "Default state" setting is not obeyed |
|
35 |
[#2514938] by themic8, jcisio: Use the latest version from CDN |
|
36 |
[#2542566] by jcisio: remove leftover icon.gif |
|
37 |
[#2542566] by bneil, srjosh, jcisio: Remove Media integration |
|
38 |
[#2437749] by Perignon, david.gil, jcisio: Infinity bucle in some cases in ckeditor_file_download |
|
39 |
[#2463461] by Luukyb: Cleanup .gitignore file from git |
|
40 |
[#1154730] by Sutharsan: CKEditor not following body rows setting Drupal 7 |
|
41 |
[#2292575] by Hai-Nam Nguyen: mistakenly added a new line |
|
42 |
[#2292575] by Angry Dan: Naming of mediaembed plugin is confusing |
|
43 |
[#2323149] by kaare: ckeditor.admin.css: url() for tick.png and delete.png must point to ../images/ |
|
44 |
[#2159403] by das-peter, aDarkling, Devin Carlson, wwalc, Angry Dan, brantwynn, agoradesign, micbar, joelpittet, brockfanning, iKb: Make CKEditor plugin system modular and clean |
|
45 |
[#2324383] by eugene.ilyin: Toolbar in Ckeditor profile is not saved: incompatibility with jQuery 1.10 |
|
46 |
[#2367913] by yched: Fixed ckeditor_help() issues one uncached locale query on each page. |
|
47 |
|
|
4 | 48 |
2014-10-14 |
5 | 49 |
New stable release: 7.x-1.16 |
6 | 50 |
|
drupal7/sites/all/modules/ckeditor/ckeditor.config.js | ||
---|---|---|
28 | 28 |
// config.protectedSource.push(/<code>[\s\S]*?<\/code>/gi); |
29 | 29 |
config.extraPlugins = ''; |
30 | 30 |
|
31 |
// Insert all Smiley image paths as relative or they may fail on SSL pages. |
|
32 |
config.smiley_path = window.CKEDITOR_BASEPATH + 'plugins/smiley/images/'; |
|
33 |
|
|
31 | 34 |
/* |
32 | 35 |
* Append here extra CSS rules that should be applied into the editing area. |
33 | 36 |
* Example: |
drupal7/sites/all/modules/ckeditor/ckeditor.info | ||
---|---|---|
5 | 5 |
configure = admin/config/content/ckeditor |
6 | 6 |
|
7 | 7 |
files[] = tests/ckeditor.test |
8 |
; Information added by Drupal.org packaging script on 2017-06-26
|
|
9 |
version = "7.x-1.18"
|
|
8 |
; Information added by Drupal.org packaging script on 2020-03-17
|
|
9 |
version = "7.x-1.19"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "ckeditor" |
12 |
datestamp = "1498506247" |
|
13 |
|
|
12 |
datestamp = "1584474894" |
drupal7/sites/all/modules/ckeditor/ckeditor.module | ||
---|---|---|
41 | 41 |
define('CKEDITOR_ENTERMODE_P', 1); |
42 | 42 |
define('CKEDITOR_ENTERMODE_BR', 2); |
43 | 43 |
define('CKEDITOR_ENTERMODE_DIV', 3); |
44 |
define('CKEDITOR_LATEST', '4.5.4');
|
|
44 |
define('CKEDITOR_LATEST', '4.14.0');
|
|
45 | 45 |
|
46 | 46 |
global $_ckeditor_configuration; |
47 | 47 |
global $_ckeditor_ids; |
drupal7/sites/all/modules/ckeditor/includes/ckeditor.admin.js | ||
---|---|---|
92 | 92 |
}); |
93 | 93 |
$("#input-formats :checkbox:eq(0)").trigger('change'); |
94 | 94 |
|
95 |
$(".cke_load_toolbar").click(function() { |
|
96 |
var buttons = eval('Drupal.settings.'+$(this).attr("id")); |
|
95 |
$(".cke_load_toolbar", "#ckeditor-admin-profile-form").click(function() { |
|
96 |
var id = $(this).attr("id").replace(/[^\w]/g, ''); |
|
97 |
if (typeof(Drupal.settings[id]) == 'undefined') { |
|
98 |
return false; |
|
99 |
} |
|
100 |
var buttons = Drupal.settings[id]; |
|
97 | 101 |
var text = "[\n"; |
98 | 102 |
for(i in buttons) { |
99 | 103 |
if (typeof buttons[i] == 'string'){ |
drupal7/sites/all/modules/ckeditor/includes/ckeditor.drush.inc | ||
---|---|---|
43 | 43 |
*/ |
44 | 44 |
function ckeditor_drush_download() { |
45 | 45 |
$args = func_get_args(); |
46 |
if ($args[0]) {
|
|
46 |
if (!empty($args[0])) {
|
|
47 | 47 |
$path = $args[0]; |
48 | 48 |
} |
49 | 49 |
else { |
drupal7/sites/all/modules/ckeditor/includes/ckeditor.lib.inc | ||
---|---|---|
177 | 177 |
closedir($dh); |
178 | 178 |
} |
179 | 179 |
} |
180 |
//oops, we have no information about skins, let's use only default |
|
181 |
if (empty($arr)) { |
|
182 |
$arr = array( |
|
183 |
'moono' => 'Moono', |
|
184 |
'kama' => 'Kama' |
|
185 |
); |
|
180 |
|
|
181 |
// If we have no information about skins, use the default for this version. |
|
182 |
if (!$arr) { |
|
183 |
$version = explode('.', ckeditor_get_version()); |
|
184 |
if ($version[0] == 3) { |
|
185 |
$arr = array('kama' => 'Kama'); |
|
186 |
} |
|
187 |
elseif ($version[0] == 4) { |
|
188 |
$arr = ($version[1] <= 5) ? array('moono' => 'Moono') : array('moono-lisa' => 'Moono-lisa'); |
|
189 |
} |
|
186 | 190 |
} |
187 | 191 |
asort($arr); |
188 | 192 |
|
... | ... | |
195 | 199 |
* @return string |
196 | 200 |
*/ |
197 | 201 |
function ckeditor_default_skin() { |
198 |
$skin_options = ckeditor_load_skin_options();
|
|
199 |
if (array_key_exists('moono', $skin_options)) {
|
|
200 |
return 'moono';
|
|
202 |
// If there is no available list then bail.
|
|
203 |
if (!$skin_options = ckeditor_load_skin_options()) {
|
|
204 |
return ''; |
|
201 | 205 |
} |
202 |
if (array_key_exists('kama', $skin_options)) { |
|
203 |
return 'kama'; |
|
206 |
|
|
207 |
// Default skins in descending order |
|
208 |
$defaults = array( |
|
209 |
'moono-lisa' => 'Moono-lisa', |
|
210 |
'moono' => 'Moono', |
|
211 |
'kama' => 'Kama' |
|
212 |
); |
|
213 |
|
|
214 |
// If there is more than one skin to choose from, use the most current |
|
215 |
// default. |
|
216 |
if ($skin_options && ($default = array_intersect_key($defaults, $skin_options))) { |
|
217 |
return key($default); |
|
204 | 218 |
} |
205 |
reset($skin_options); |
|
206 |
//if any default theme not exists select first from the list
|
|
219 |
|
|
220 |
// If there are no defaults, or only one skin, select the first from the list.
|
|
207 | 221 |
return key($skin_options); |
208 | 222 |
} |
209 | 223 |
|
... | ... | |
1084 | 1098 |
$color_paths = variable_get('color_' . $current_theme . '_stylesheets', array()); |
1085 | 1099 |
if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) { |
1086 | 1100 |
if (!empty($color_paths[1])) { |
1087 |
$css_files[] = $host . $color_paths[1] . $query_string; |
|
1101 |
if (substr($color_paths[0], 0, 9) == 'public://') { |
|
1102 |
$css_files[] = file_create_url($color_paths[1]) . $query_string; |
|
1103 |
} |
|
1104 |
else { |
|
1105 |
$css_files[] = $host . $color_paths[1] . $query_string; |
|
1106 |
} |
|
1088 | 1107 |
} |
1089 | 1108 |
} |
1090 | 1109 |
elseif (!empty($color_paths[0])) { |
1091 |
$css_files[] = $host . $color_paths[0] . $query_string; |
|
1110 |
if (substr($color_paths[0], 0, 9) == 'public://') { |
|
1111 |
$css_files[] = file_create_url($color_paths[0]) . $query_string; |
|
1112 |
} |
|
1113 |
else { |
|
1114 |
$css_files[] = $host . $color_paths[0] . $query_string; |
|
1115 |
} |
|
1092 | 1116 |
} |
1093 | 1117 |
} |
1094 | 1118 |
else { |
... | ... | |
1303 | 1327 |
drupal_add_js(array('ckeditor' => array('scayt_language' => ckeditor_scayt_langcode($field["#language"]))), 'setting'); |
1304 | 1328 |
} |
1305 | 1329 |
|
1330 |
// Pass Drupal's JS cache-busting string via settings along to CKEditor. |
|
1331 |
drupal_add_js(array('ckeditor' => array('timestamp' => variable_get('css_js_query_string', '0'))), 'setting'); |
|
1332 |
|
|
1306 | 1333 |
// Remember extra information and reuse it during "Preview" |
1307 | 1334 |
$processed_ids[$field['#id']]['suffix'] = $suffix; |
1308 | 1335 |
$processed_ids[$field['#id']]['class'] = $class; |
drupal7/sites/all/modules/ckeditor/includes/ckeditor.page.inc | ||
---|---|---|
286 | 286 |
} |
287 | 287 |
continue; |
288 | 288 |
} |
289 |
if (function_exists($filters[$name]['prepare callback'])) { |
|
289 |
if (isset($filters[$name]['prepare callback']) && function_exists($filters[$name]['prepare callback'])) {
|
|
290 | 290 |
$text = $filters[$name]['prepare callback']($text, $format_filters[$name], $format, '', TRUE, $cache_id); |
291 | 291 |
} |
292 | 292 |
$text = $filters[$name]['process callback']($text, $format_filters[$name], $format, '', TRUE, $cache_id); |
drupal7/sites/all/modules/ckeditor/includes/ckeditor.user.inc | ||
---|---|---|
121 | 121 |
} |
122 | 122 |
} |
123 | 123 |
|
124 |
/** |
|
125 |
* Implements hook_user_presave(). |
|
126 |
*/ |
|
124 | 127 |
function ckeditor_user_presave(&$edit, $account, $category) { |
125 | 128 |
if (user_access('customize ckeditor')) { |
126 | 129 |
module_load_include('inc', 'ckeditor', 'includes/ckeditor.lib'); |
drupal7/sites/all/modules/ckeditor/includes/ckeditor.utils.js | ||
---|---|---|
37 | 37 |
$("#" + textarea_id).addClass("ckeditor-processed"); |
38 | 38 |
|
39 | 39 |
var textarea_settings = false; |
40 |
ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]].toolbar = eval(ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]].toolbar); |
|
40 |
if (typeof(ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]].toolbar) != 'object') { |
|
41 |
ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]].toolbar = Drupal.ckeditorToolbarToArray(ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]].toolbar); |
|
42 |
} |
|
41 | 43 |
textarea_settings = ckeditor_obj.input_formats[ckeditor_obj.elements[textarea_id]]; |
42 | 44 |
|
43 | 45 |
var drupalTopToolbar = $('#toolbar, #admin-menu', Drupal.overlayChild ? window.parent.document : document); |
... | ... | |
123 | 125 |
|
124 | 126 |
if (typeof textarea_settings['js_conf'] != 'undefined'){ |
125 | 127 |
for (var add_conf in textarea_settings['js_conf']){ |
126 |
textarea_settings[add_conf] = eval(textarea_settings['js_conf'][add_conf]); |
|
128 |
var data; |
|
129 |
if (add_conf == 'toolbar') { |
|
130 |
data = Drupal.ckeditorToolbarToArray(textarea_settings['js_conf'][add_conf]); |
|
131 |
} else if (typeof textarea_settings['js_conf'][add_conf] === "boolean" ) { |
|
132 |
data = textarea_settings['js_conf'][add_conf]; |
|
133 |
} else { |
|
134 |
data = JSON.parse(textarea_settings['js_conf'][add_conf].replace(/'/g, '"')); |
|
135 |
} |
|
136 |
|
|
137 |
textarea_settings[add_conf] = data; |
|
127 | 138 |
} |
128 | 139 |
} |
129 | 140 |
|
... | ... | |
141 | 152 |
textarea_settings = Drupal.ckeditorLoadPlugins(textarea_settings); |
142 | 153 |
Drupal.ckeditorInstance = CKEDITOR.replace(textarea_id, textarea_settings); |
143 | 154 |
} |
144 |
} |
|
155 |
};
|
|
145 | 156 |
|
146 | 157 |
Drupal.ckeditorOn = function(textarea_id, run_filter) { |
147 | 158 |
|
... | ... | |
256 | 267 |
} |
257 | 268 |
}; |
258 | 269 |
|
270 |
if (typeof(Drupal.ckeditorToolbarToArray) == 'undefined') { |
|
271 |
Drupal.ckeditorToolbarToArray = function (toolbar) { |
|
272 |
toolbar = toolbar.replace(/\r?\n|\r/gmi, '') |
|
273 |
.replace(/\s/gmi, '') |
|
274 |
.replace(/([a-zA-Z0-9]+?):/g, '"$1":') |
|
275 |
.replace(/'/g, '"'); |
|
276 |
|
|
277 |
return JSON.parse(toolbar); |
|
278 |
}; |
|
279 |
} |
|
280 |
|
|
259 | 281 |
/** |
260 | 282 |
* Ajax support |
261 | 283 |
*/ |
... | ... | |
282 | 304 |
Drupal.behaviors.textarea.attach(context); |
283 | 305 |
} |
284 | 306 |
|
307 |
// Manually set the cache-busting string to the same value as Drupal. |
|
308 |
if (typeof(Drupal.settings.ckeditor.timestamp) != 'undefined') { |
|
309 |
CKEDITOR.timestamp = Drupal.settings.ckeditor.timestamp; |
|
310 |
} |
|
311 |
|
|
285 | 312 |
$(context).find("textarea.ckeditor-mod:not(.ckeditor-processed)").each(function () { |
286 | 313 |
var ta_id=$(this).attr("id"); |
287 | 314 |
if (CKEDITOR.instances && typeof(CKEDITOR.instances[ta_id]) != 'undefined'){ |
drupal7/sites/all/modules/ckeditor/includes/jqueryUI/sort.js | ||
---|---|---|
76 | 76 |
jQuery("li.sortableItem").mouseout(function(){ |
77 | 77 |
jQuery(".sortableList").sortable("enable"); |
78 | 78 |
}); |
79 |
} |
|
79 |
};
|
|
80 | 80 |
|
81 | 81 |
Drupal.ckeditorToolbarReload = function() { |
82 | 82 |
jQuery(".sortableList").sortable('destroy'); |
83 | 83 |
jQuery(".sortableRow").sortable('destroy'); |
84 | 84 |
jQuery("li.sortableItem").unbind(); |
85 | 85 |
Drupal.ckeditorToolbaInit(); |
86 |
} |
|
86 |
};
|
|
87 | 87 |
|
88 | 88 |
Drupal.ckeditorToolbarUsedRender = function() { |
89 | 89 |
var toolbar = jQuery('#edit-toolbar').val(); |
90 |
toolbar = eval(toolbar);
|
|
90 |
toolbar = Drupal.ckeditorToolbarToArray(toolbar);
|
|
91 | 91 |
var html = '<div class="sortableListDiv"><span class="sortableListSpan"><ul class="sortableRow">'; |
92 | 92 |
var group = false; |
93 | 93 |
|
... | ... | |
115 | 115 |
} |
116 | 116 |
html += '</ul></span></div>'; |
117 | 117 |
jQuery('#groupLayout').empty().append(html); |
118 |
} |
|
118 |
};
|
|
119 | 119 |
|
120 | 120 |
Drupal.ckeditorToolbarAllRender = function() { |
121 | 121 |
var toolbarUsed = jQuery('#edit-toolbar').val(); |
122 | 122 |
var toolbarAll = Drupal.settings.cke_toolbar_buttons_all; |
123 | 123 |
|
124 |
var htmlArray = new Array();
|
|
124 |
var htmlArray = [];
|
|
125 | 125 |
var html = ''; |
126 | 126 |
|
127 | 127 |
for (var i in toolbarAll) { |
... | ... | |
144 | 144 |
html += '<div class="sortableListDiv"><span class="sortableListSpan"><ul class="sortableRow">' + htmlArray[j] + '</ul></span></div>'; |
145 | 145 |
} |
146 | 146 |
jQuery('#allButtons').empty().append(html); |
147 |
}; |
|
148 |
|
|
149 |
if (typeof(Drupal.ckeditorToolbarToArray) == 'undefined') { |
|
150 |
Drupal.ckeditorToolbarToArray = function (toolbar) { |
|
151 |
toolbar = toolbar.replace(/\r?\n|\r/gmi, '') |
|
152 |
.replace(/\s/gmi, '') |
|
153 |
.replace(/([a-zA-Z0-9]+?):/g, '"$1":') |
|
154 |
.replace(/'/g, '"'); |
|
155 |
|
|
156 |
return JSON.parse(toolbar); |
|
157 |
}; |
|
147 | 158 |
} |
148 | 159 |
|
149 | 160 |
Drupal.ckeditorToolbaInit(); |
drupal7/sites/all/modules/menu_attributes/README.md | ||
---|---|---|
1 |
# Menu Attributes |
|
2 |
|
|
3 |
|
|
4 |
## Introduction |
|
5 |
|
|
6 |
This simple module allows you to specify some additional attributes for menu |
|
7 |
items such as id, name, class, style, and rel. |
|
8 |
|
|
9 |
You should use this module when: |
|
10 |
|
|
11 |
* You want to "nofollow" certain menu items to sculpt the flow of PageRank |
|
12 |
through your site. |
|
13 |
* You want to give a menu item an ID so you can easily select |
|
14 |
it using jQuery. |
|
15 |
* You want to add additional classes or styles to a menu item. |
|
16 |
|
|
17 |
The module currently allows you to set the following attributes for each menu |
|
18 |
item or menu link: |
|
19 |
|
|
20 |
* id |
|
21 |
* name |
|
22 |
* target |
|
23 |
* rel |
|
24 |
* class |
|
25 |
* style |
|
26 |
* accesskey |
|
27 |
|
|
28 |
For further information please visit the following: |
|
29 |
|
|
30 |
* For a full description of the module, visit the project page: |
|
31 |
[https://drupal.org/project/menu_attributes](https://drupal.org/project/menu_attributes) |
|
32 |
* To submit bug reports and feature suggestions, or to track changes: |
|
33 |
[https://drupal.org/project/issues/menu_attributes](https://drupal.org/project/issues/menu_attributes) |
|
34 |
|
|
35 |
## Installation |
|
36 |
|
|
37 |
1. To install the module copy the 'menu_attributes' folder to your |
|
38 |
*sites/all/modules* directory. |
|
39 |
2. Go to admin/modules. Filter for ‘Menu Attributes’ and enable the module. Read |
|
40 |
more about installing modules at [http://drupal.org/node/70151](http://drupal.org/node/70151) |
|
41 |
|
|
42 |
## Configuration |
|
43 |
|
|
44 |
1. Go to *admin/people/permissions*. Filter for the ‘Menu Attributes’ section. |
|
45 |
Set appropriate permissions. |
|
46 |
2. Go to *admin/structure/menu/settings*. Review instructions on this screen. |
|
47 |
3. Go to *admin/build/menu* |
|
48 |
4. Select the menu links you want to edit (In this example we will edit the menu |
|
49 |
'Navigation’). |
|
50 |
5. Under operations for that menu, click ‘list links’. |
|
51 |
6. Click on any 'edit' link under the 'Operations' column. |
|
52 |
7. Scroll down the page to find the 'Menu link attributes' and 'Menu item |
|
53 |
attributes' sections. Expand either section by clicking on it. |
|
54 |
|
|
55 |
a. **Menu link attributes** are added to the `<a>` link element. Follow |
|
56 |
instructions on screen. |
|
57 |
|
|
58 |
b. **Menu item attributes** are added to the `<li>` list element for that |
|
59 |
link. Follow instructions on screen. |
|
60 |
|
|
61 |
10. Click the 'Save' button. |
|
62 |
|
|
63 |
Another way of setting menu attributes is to edit any page, scroll to 'Menu |
|
64 |
settings' and click the checkbox for ‘Provide a menu link’. This will reveal the |
|
65 |
options for this menu item, including ’Menu link attributes' and 'Menu item |
|
66 |
attributes'. Follow instructions on screen. |
|
67 |
|
|
68 |
|
|
69 |
## Troubleshooting |
|
70 |
|
|
71 |
1. Go to the module issue queue at |
|
72 |
[http://drupal.org/project/issues/menu_attributes?status=All&categories=All](http://drupal.org/project/issues/menu_attributes?status=All&categories=All) |
|
73 |
2. Check if your particular issue exists. If not, click on the CREATE A NEW |
|
74 |
ISSUE link. |
|
75 |
3. Fill the form. |
|
76 |
4. To get a status report on your request go to |
|
77 |
[http://drupal.org/project/issues/user](http://drupal.org/project/issues/user) |
|
78 |
|
|
79 |
|
|
80 |
## Updating |
|
81 |
|
|
82 |
Read more at [http://drupal.org/node/250790](http://drupal.org/node/250790) |
drupal7/sites/all/modules/menu_attributes/menu_attributes.api.php | ||
---|---|---|
13 | 13 |
* attribute name. Each attribute record should be an array with the following |
14 | 14 |
* key/value pairs: |
15 | 15 |
* - label: The human-readable name of the attribute. |
16 |
* - description: The attribute description. |
|
16 |
* - description: The attribute description for the link. |
|
17 |
* - item_description: The attribute description for the item. |
|
17 | 18 |
* - form: A Form API array. Some default values for this array are provided |
18 | 19 |
* in menu_attributes_get_menu_attribute_info(). |
19 | 20 |
* - scope: An array of scope options, MENU_ATTRIBUTES_LINK or |
... | ... | |
28 | 29 |
$info['tabindex'] = array( |
29 | 30 |
'label' => t('Tabindex'), |
30 | 31 |
'description' => t('Specifies the tab order for the link.'), |
32 |
'item_description' => t('Specifies the tab order for the item.'), |
|
31 | 33 |
'form' => array( |
32 | 34 |
'#maxlength' => 3, |
33 | 35 |
'#size' => 2, |
drupal7/sites/all/modules/menu_attributes/menu_attributes.info | ||
---|---|---|
1 | 1 |
name = Menu attributes |
2 | 2 |
description = "Allows administrators to specify custom attributes for menu items." |
3 |
dependencies[] = menu |
|
3 |
dependencies[] = drupal:menu
|
|
4 | 4 |
core = 7.x |
5 | 5 |
configure = admin/structure/menu/settings |
6 | 6 |
|
7 | 7 |
files[] = menu_attributes.test |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2016-02-15
|
|
10 |
version = "7.x-1.0"
|
|
9 |
; Information added by Drupal.org packaging script on 2020-03-17
|
|
10 |
version = "7.x-1.1"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "menu_attributes" |
13 |
datestamp = "1455568740" |
|
14 |
|
|
13 |
datestamp = "1584488231" |
drupal7/sites/all/modules/menu_attributes/menu_attributes.module | ||
---|---|---|
56 | 56 |
$info['id'] = array( |
57 | 57 |
'label' => t('ID'), |
58 | 58 |
'description' => t('Specifies a unique ID for the link.'), |
59 |
'item_description' => t('Specifies a unique ID to be added to the item.'), |
|
59 | 60 |
'scope' => array(MENU_ATTRIBUTES_LINK, MENU_ATTRIBUTES_ITEM), |
60 | 61 |
); |
61 | 62 |
$info['name'] = array( |
... | ... | |
70 | 71 |
$info['class'] = array( |
71 | 72 |
'label' => t('Classes'), |
72 | 73 |
'description' => t('Enter additional classes to be added to the link.'), |
74 |
'item_description' => t('Enter additional CSS class names to be added to the item.'), |
|
73 | 75 |
'scope' => array(MENU_ATTRIBUTES_LINK, MENU_ATTRIBUTES_ITEM), |
74 | 76 |
); |
75 | 77 |
$info['style'] = array( |
76 | 78 |
'label' => t('Style'), |
77 | 79 |
'description' => t('Enter additional styles to be applied to the link.'), |
80 |
'item_description' => t('Enter additional styles attribute to be applied to the item.'), |
|
78 | 81 |
'scope' => array(MENU_ATTRIBUTES_LINK, MENU_ATTRIBUTES_ITEM), |
79 | 82 |
); |
80 | 83 |
$info['target'] = array( |
... | ... | |
212 | 215 |
// If this is an existing link, use the raw default (usually empty). |
213 | 216 |
$info['form']['#default_value'] = $info['default']; |
214 | 217 |
} |
218 |
|
|
219 |
// If the item description is set, override the form description. |
|
220 |
if ($group == MENU_ATTRIBUTES_ITEM && isset($info['item_description'])) { |
|
221 |
$info['form']['#description'] = $info['item_description']; |
|
222 |
} |
|
223 |
|
|
215 | 224 |
$form['options'][$group][$attribute] = $info['form'] + array( |
216 | 225 |
'#access' => $info['enabled'], |
217 | 226 |
); |
Formats disponibles : Unified diff
Weekly update of contrib modules