Revision 4cfd8be6
Added by Assos Assos over 9 years ago
drupal7/sites/all/modules/flag/flag.info | ||
---|---|---|
29 | 29 |
files[] = includes/views/flag_plugin_argument_validate_flaggability.inc |
30 | 30 |
files[] = tests/flag.test |
31 | 31 |
|
32 |
; Information added by Drupal.org packaging script on 2014-05-03
|
|
33 |
version = "7.x-3.5"
|
|
32 |
; Information added by Drupal.org packaging script on 2015-03-02
|
|
33 |
version = "7.x-3.6"
|
|
34 | 34 |
core = "7.x" |
35 | 35 |
project = "flag" |
36 |
datestamp = "1399113834"
|
|
36 |
datestamp = "1425327793"
|
|
37 | 37 |
|
drupal7/sites/all/modules/flag/flag.module | ||
---|---|---|
219 | 219 |
'access arguments' => array('administer flags'), |
220 | 220 |
'description' => 'Configure flags for marking content with arbitrary information (such as <em>offensive</em> or <em>bookmarked</em>).', |
221 | 221 |
'file' => 'includes/flag.admin.inc', |
222 |
'type' => MENU_NORMAL_ITEM, |
|
223 | 222 |
); |
224 | 223 |
$items[FLAG_ADMIN_PATH . '/list'] = array( |
225 | 224 |
'title' => 'List', |
... | ... | |
241 | 240 |
'page arguments' => array('flag_import_form'), |
242 | 241 |
'access arguments' => array('use flag import'), |
243 | 242 |
'file' => 'includes/flag.export.inc', |
244 |
'type' => MENU_LOCAL_TASK,
|
|
243 |
'type' => MENU_LOCAL_ACTION,
|
|
245 | 244 |
'weight' => 2, |
246 | 245 |
); |
247 | 246 |
$items[FLAG_ADMIN_PATH . '/export'] = array( |
... | ... | |
250 | 249 |
'page arguments' => array('flag_export_form'), |
251 | 250 |
'access arguments' => array('administer flags'), |
252 | 251 |
'file' => 'includes/flag.export.inc', |
253 |
'type' => MENU_LOCAL_TASK,
|
|
252 |
'type' => MENU_LOCAL_ACTION,
|
|
254 | 253 |
'weight' => 3, |
255 | 254 |
); |
256 | 255 |
|
... | ... | |
262 | 261 |
'access callback' => 'user_access', |
263 | 262 |
'access arguments' => array('administer flags'), |
264 | 263 |
'file' => 'includes/flag.admin.inc', |
265 |
'type' => MENU_CALLBACK,
|
|
264 |
'type' => MENU_LOCAL_TASK,
|
|
266 | 265 |
// Make the flag title the default title for descendant menu items. |
267 | 266 |
'title callback' => '_flag_menu_title', |
268 | 267 |
'title arguments' => array(FLAG_ADMIN_PATH_START + 1), |
... | ... | |
343 | 342 |
), |
344 | 343 |
); |
345 | 344 |
|
346 |
if (module_exists('field_ui')) { |
|
347 |
foreach (entity_get_info() as $obj_type => $info) { |
|
348 |
if ($obj_type == 'flagging') { |
|
349 |
foreach ($info['bundles'] as $bundle_name => $bundle_info) { |
|
350 |
if (isset($bundle_info['admin'])) { |
|
351 |
$fields = array(); |
|
352 |
|
|
353 |
foreach (field_info_instances($obj_type, $bundle_name) as $field) { |
|
354 |
$fields[] = $field['field_name']; |
|
355 |
} |
|
356 |
|
|
357 |
$arguments = array( |
|
358 |
'%flag' => array($bundle_name), |
|
359 |
'%field_ui_menu' => $fields, |
|
360 |
); |
|
361 |
|
|
362 |
$path = $bundle_info['admin']['path']; |
|
363 |
$map["$path/fields/%field_ui_menu"]['parent'] = "$path/fields"; |
|
364 |
$map["$path/fields/%field_ui_menu"]['arguments'][] = $arguments; |
|
365 |
} |
|
366 |
} |
|
367 |
} |
|
368 |
} |
|
369 |
} |
|
370 |
|
|
371 | 345 |
return $map; |
372 | 346 |
} |
373 | 347 |
|
... | ... | |
1569 | 1543 |
$action = $variables['action']; |
1570 | 1544 |
$entity_id = $variables['entity_id']; |
1571 | 1545 |
$errors = implode('<br />', $variables['errors']); |
1572 |
$flag_css_name = str_replace('_', '-', $flag->name);
|
|
1546 |
$flag_name_css = str_replace('_', '-', $flag->name);
|
|
1573 | 1547 |
|
1574 | 1548 |
// Generate the link URL. |
1575 | 1549 |
$link_type = $flag->get_link_type(); |
... | ... | |
1605 | 1579 |
$variables['link_text'] = isset($link['title']) ? $link['title'] : $flag->get_label($action . '_short', $entity_id); |
1606 | 1580 |
$variables['link_title'] = isset($link['attributes']['title']) ? check_plain($link['attributes']['title']) : check_plain(strip_tags($flag->get_label($action . '_long', $entity_id))); |
1607 | 1581 |
$variables['status'] = ($action == 'flag' ? 'unflagged' : 'flagged'); |
1608 |
$variables['flag_name_css'] = $flag_css_name;
|
|
1582 |
$variables['flag_name_css'] = $flag_name_css;
|
|
1609 | 1583 |
|
1610 | 1584 |
$variables['flag_wrapper_classes_array'] = array(); |
1611 | 1585 |
$variables['flag_wrapper_classes_array'][] = 'flag-wrapper'; |
1612 |
$variables['flag_wrapper_classes_array'][] = 'flag-' . $flag_css_name;
|
|
1613 |
$variables['flag_wrapper_classes_array'][] = 'flag-' . $flag_css_name . '-' . $entity_id;
|
|
1586 |
$variables['flag_wrapper_classes_array'][] = 'flag-' . $flag_name_css;
|
|
1587 |
$variables['flag_wrapper_classes_array'][] = 'flag-' . $flag_name_css . '-' . $entity_id;
|
|
1614 | 1588 |
|
1615 | 1589 |
$variables['flag_classes_array'] = array(); |
1616 | 1590 |
$variables['flag_classes_array'][] = 'flag'; |
... | ... | |
1794 | 1768 |
* The entity ID (usually the node ID). |
1795 | 1769 |
* |
1796 | 1770 |
* @return |
1797 |
* The flag count with the entity type and id as array keys.
|
|
1771 |
* The flag count with the flag names as array keys.
|
|
1798 | 1772 |
*/ |
1799 | 1773 |
function flag_get_counts($entity_type, $entity_id) { |
1800 | 1774 |
$counts = &drupal_static(__FUNCTION__); |
... | ... | |
2055 | 2029 |
* An array of flagging data, keyed by the flagging ID. |
2056 | 2030 |
*/ |
2057 | 2031 |
function flag_get_flag_flagging_data($flag_name) { |
2058 |
$return = array(); |
|
2059 | 2032 |
$flag = flag_get_flag($flag_name); |
2060 | 2033 |
$result = db_select('flagging', 'fc') |
2061 | 2034 |
->fields('fc') |
drupal7/sites/all/modules/flag/flag_actions.info | ||
---|---|---|
7 | 7 |
|
8 | 8 |
files[] = flag.install |
9 | 9 |
files[] = flag_actions.module |
10 |
; Information added by Drupal.org packaging script on 2014-05-03
|
|
11 |
version = "7.x-3.5"
|
|
10 |
; Information added by Drupal.org packaging script on 2015-03-02
|
|
11 |
version = "7.x-3.6"
|
|
12 | 12 |
core = "7.x" |
13 | 13 |
project = "flag" |
14 |
datestamp = "1399113834"
|
|
14 |
datestamp = "1425327793"
|
|
15 | 15 |
|
drupal7/sites/all/modules/flag/flag_bookmark/flag_bookmark.info | ||
---|---|---|
4 | 4 |
dependencies[] = flag |
5 | 5 |
package = Flags |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2014-05-03
|
|
8 |
version = "7.x-3.5"
|
|
7 |
; Information added by Drupal.org packaging script on 2015-03-02
|
|
8 |
version = "7.x-3.6"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "flag" |
11 |
datestamp = "1399113834"
|
|
11 |
datestamp = "1425327793"
|
|
12 | 12 |
|
drupal7/sites/all/modules/flag/includes/flag.pages.inc | ||
---|---|---|
11 | 11 |
* Used both for the regular callback as well as the JS version. |
12 | 12 |
* |
13 | 13 |
* @param $action |
14 |
* Either 'flag' or 'unflag'. |
|
14 |
* The action about to be performed. One of 'flag' or 'unflag'. |
|
15 |
* @param $flag |
|
16 |
* The flag object. |
|
17 |
* @param $entity_id |
|
18 |
* The ID of the entity to be acted upon. The type is implicit in the flag. |
|
15 | 19 |
*/ |
16 | 20 |
function flag_page($action, $flag, $entity_id) { |
17 | 21 |
global $user; |
drupal7/sites/all/modules/flag/includes/flag/flag_entity.inc | ||
---|---|---|
166 | 166 |
* @param $action |
167 | 167 |
* Either 'flag' or 'unflag'. |
168 | 168 |
* @param $flagging |
169 |
* The flagging entity that is to be removed.
|
|
169 |
* The flagging entity that is either newly created or about to be deleted.
|
|
170 | 170 |
* @param $entity_id |
171 |
* The entity ID of entity being unflagged. |
|
171 |
* The entity ID of entity being flagged or unflagged.
|
|
172 | 172 |
* @param $account |
173 |
* The account performing the unflagging.
|
|
173 |
* The account performing the action.
|
|
174 | 174 |
*/ |
175 | 175 |
protected function invoke_rules_event($action, $flagging, $entity_id, $account) { |
176 | 176 |
switch ($action) { |
drupal7/sites/all/modules/flag/includes/flag/flag_flag.inc | ||
---|---|---|
793 | 793 |
* Create a new Flagging to flag an entity. |
794 | 794 |
* |
795 | 795 |
* @param $flagging |
796 |
* The flagging entity that is to be removed.
|
|
796 |
* The flagging entity that is to be saved.
|
|
797 | 797 |
* @param $entity_id |
798 |
* The entity ID of entity being unflagged.
|
|
798 |
* The entity ID of entity being flagged. |
|
799 | 799 |
* @param $account |
800 |
* The account performing the unflagging.
|
|
800 |
* The account performing the flagging. |
|
801 | 801 |
*/ |
802 | 802 |
private function flagging_insert($flagging, $entity_id, $account) { |
803 | 803 |
if ($this->uses_anonymous_cookies()) { |
... | ... | |
841 | 841 |
} |
842 | 842 |
} |
843 | 843 |
|
844 |
/** |
|
845 |
* Invoke a Rules event in reaction to a flagging or unflagging. |
|
846 |
* |
|
847 |
* @param $action |
|
848 |
* Either 'flag' or 'unflag'. |
|
849 |
* @param $flagging |
|
850 |
* The flagging entity that is to be removed. |
|
851 |
* @param $entity_id |
|
852 |
* The entity ID of entity being unflagged. |
|
853 |
* @param $account |
|
854 |
* The account performing the unflagging. |
|
855 |
*/ |
|
856 |
protected function invoke_rules_event($action, $flagging, $entity_id, $account) { |
|
857 |
// We only support flags on entities: do nothing in this class. |
|
858 |
// See flag_entity::invoke_rules_event(). |
|
859 |
return; |
|
860 |
} |
|
861 |
|
|
862 | 844 |
/** |
863 | 845 |
* Update a Flagging. |
864 | 846 |
* |
865 | 847 |
* @param $flagging |
866 |
* The flagging entity that is to be removed.
|
|
848 |
* The flagging entity that is being updated.
|
|
867 | 849 |
* @param $entity_id |
868 |
* The entity ID of entity being unflagged.
|
|
850 |
* The entity ID of entity the flagging is on.
|
|
869 | 851 |
* @param $account |
870 |
* The account performing the unflagging.
|
|
852 |
* The account performing the action.
|
|
871 | 853 |
*/ |
872 | 854 |
private function flagging_update($flagging, $entity_id, $account) { |
873 | 855 |
// Invoke presave hooks. |
... | ... | |
945 | 927 |
} |
946 | 928 |
} |
947 | 929 |
|
930 |
/** |
|
931 |
* Invoke a Rules event in reaction to a flagging or unflagging. |
|
932 |
* |
|
933 |
* @param $action |
|
934 |
* Either 'flag' or 'unflag'. |
|
935 |
* @param $flagging |
|
936 |
* The flagging entity that is either newly created or about to be deleted. |
|
937 |
* @param $entity_id |
|
938 |
* The entity ID of entity being flagged or unflagged. |
|
939 |
* @param $account |
|
940 |
* The account performing the action. |
|
941 |
*/ |
|
942 |
protected function invoke_rules_event($action, $flagging, $entity_id, $account) { |
|
943 |
// We only support flags on entities: do nothing in this class. |
|
944 |
// See flag_entity::invoke_rules_event(). |
|
945 |
return; |
|
946 |
} |
|
947 |
|
|
948 | 948 |
/** |
949 | 949 |
* Construct a new, empty flagging entity object. |
950 | 950 |
* |
drupal7/sites/all/modules/flag/includes/views/flag.views.inc | ||
---|---|---|
85 | 85 |
|
86 | 86 |
// Argument for content ID, used for "Who's flagged this" views. |
87 | 87 |
$data['flagging']['entity_id'] = array( |
88 |
'title' => t('Content ID'),
|
|
88 |
'title' => t('Entity ID'),
|
|
89 | 89 |
'help' => t('The unique ID of the object that has been flagged.'), |
90 | 90 |
'argument' => array( |
91 | 91 |
'handler' => 'flag_handler_argument_entity_id', |
... | ... | |
122 | 122 |
), |
123 | 123 |
); |
124 | 124 |
|
125 |
$data['flagging']['sid'] = array( |
|
126 |
'title' => t('Flagging session ID'), |
|
127 |
'help' => t('The session ID of the flagging.'), |
|
128 |
'field' => array( |
|
129 |
'handler' => 'views_handler_field_numeric', |
|
130 |
'click sortable' => TRUE, |
|
131 |
), |
|
132 |
'sort' => array( |
|
133 |
'handler' => 'views_handler_sort', |
|
134 |
), |
|
135 |
'filter' => array( |
|
136 |
'handler' => 'views_handler_filter_numeric', |
|
137 |
), |
|
138 |
'argument' => array( |
|
139 |
'handler' => 'views_handler_argument_numeric', |
|
140 |
), |
|
141 |
); |
|
142 |
|
|
125 | 143 |
$data['flag_counts']['count'] = array( |
126 | 144 |
'title' => t('Flag counter'), |
127 | 145 |
'help' => t('The number of times a piece of content is flagged by any user.'), |
... | ... | |
264 | 282 |
$default_flag = &drupal_static(__FUNCTION__, array()); |
265 | 283 |
|
266 | 284 |
if (!array_key_exists($entity_type, $default_flag)) { |
267 |
$flag = array_shift(flag_get_flags($entity_type)); |
|
285 |
$flags = flag_get_flags($entity_type); |
|
286 |
$flag = array_shift($flags); |
|
268 | 287 |
$default_flag[$entity_type] = $flag ? $flag->name : NULL; |
269 | 288 |
} |
270 | 289 |
|
drupal7/sites/all/modules/flag/includes/views/flag_handler_relationships.inc | ||
---|---|---|
44 | 44 |
return $errors; |
45 | 45 |
} |
46 | 46 |
|
47 |
/** |
|
48 |
* Get the type of the flag this relationship uses. |
|
49 |
* |
|
50 |
* This looks at the data set in the relationship definition in Views data. |
|
51 |
* |
|
52 |
* @return |
|
53 |
* The flag's type, e.g., 'node' or 'taxonomy_term', or NULL if this is not |
|
54 |
* set in data from hook_views_data(). |
|
55 |
* |
|
56 |
* @see flag_views_data_alter() |
|
57 |
*/ |
|
47 | 58 |
function get_flag_type() { |
48 | 59 |
return isset($this->definition['flag type']) ? $this->definition['flag type'] : NULL; |
49 | 60 |
} |
... | ... | |
77 | 88 |
} |
78 | 89 |
|
79 | 90 |
/** |
80 |
* Specialized relationship handler associating flags and content. |
|
91 |
* Views relationship handler associating flags and content. |
|
92 |
* |
|
93 |
* This forms a bridge from the entity table to the {flagging} table, with |
|
94 |
* options to restrict the join to only flagged content, and to flagged content |
|
95 |
* by the current user. |
|
81 | 96 |
* |
82 | 97 |
* @ingroup views |
83 | 98 |
*/ |
... | ... | |
172 | 187 |
} |
173 | 188 |
|
174 | 189 |
/** |
175 |
* Specialized relationship handler associating flag counts and content. |
|
190 |
* Views relationship handler associating flag counts and content. |
|
191 |
* |
|
192 |
* This forms a bridge from the entity table to the {flag_counts} table, with |
|
193 |
* the option to restrict the join to include only flagged content. |
|
176 | 194 |
* |
177 | 195 |
* @ingroup views |
178 | 196 |
*/ |
... | ... | |
227 | 245 |
} |
228 | 246 |
|
229 | 247 |
/** |
230 |
* Specialized relationship handler associating flags and users. |
|
248 |
* Views relationship handler associating flags and users. |
|
249 |
* |
|
250 |
* This forms a bridge from the the {users} table to the {flagging} table. |
|
231 | 251 |
* |
232 | 252 |
* @ingroup views |
233 | 253 |
*/ |
drupal7/sites/all/modules/flag/tests/flag_fields_test/flag_fields_test.info | ||
---|---|---|
4 | 4 |
core = 7.x |
5 | 5 |
hidden = TRUE |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2014-05-03
|
|
8 |
version = "7.x-3.5"
|
|
7 |
; Information added by Drupal.org packaging script on 2015-03-02
|
|
8 |
version = "7.x-3.6"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "flag" |
11 |
datestamp = "1399113834"
|
|
11 |
datestamp = "1425327793"
|
|
12 | 12 |
|
drupal7/sites/all/modules/flag/tests/flag_hook_test/flag_hook_test.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2014-05-03
|
|
9 |
version = "7.x-3.5"
|
|
8 |
; Information added by Drupal.org packaging script on 2015-03-02
|
|
9 |
version = "7.x-3.6"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "flag" |
12 |
datestamp = "1399113834"
|
|
12 |
datestamp = "1425327793"
|
|
13 | 13 |
|
drupal7/sites/all/modules/flag/tests/flagaccesstest/flagaccesstest.info | ||
---|---|---|
5 | 5 |
package = Flags |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2014-05-03
|
|
9 |
version = "7.x-3.5"
|
|
8 |
; Information added by Drupal.org packaging script on 2015-03-02
|
|
9 |
version = "7.x-3.6"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "flag" |
12 |
datestamp = "1399113834"
|
|
12 |
datestamp = "1425327793"
|
|
13 | 13 |
|
drupal7/sites/all/modules/flag/theme/flag.tpl.php | ||
---|---|---|
17 | 17 |
* - $action: The action the link is about to carry out, either "flag" or |
18 | 18 |
* "unflag". |
19 | 19 |
* - $status: The status of the item; either "flagged" or "unflagged". |
20 |
* - $entity_id: The id of the entity item. |
|
20 | 21 |
* |
21 |
* - $link_href: The URL for the flag link. |
|
22 |
* - $link['href']: The path for the flag link. |
|
23 |
* - $link['query']: Array of query string parameters, such as "destination". |
|
24 |
* - $link_href: The URL for the flag link, query string included. |
|
22 | 25 |
* - $link_text: The text to show for the link. |
23 | 26 |
* - $link_title: The title attribute for the link. |
24 | 27 |
* |
... | ... | |
34 | 37 |
* JavaScript-based toggling of flags. |
35 | 38 |
* - $needs_wrapping_element: Determines whether the flag displays a wrapping |
36 | 39 |
* HTML DIV element. |
40 |
* - $errors: An array of error messages. |
|
37 | 41 |
* |
38 | 42 |
* Template suggestions available, listed from the most specific template to |
39 | 43 |
* the least. Drupal will use the most specific template it finds: |
drupal7/sites/all/modules/token/README.txt | ||
---|---|---|
1 |
INTRODUCTION |
|
2 |
------------ |
|
1 | 3 |
|
2 | 4 |
Provides common and resuable token UI elements and missing core tokens. |
5 |
|
|
6 |
* For a full description of the module, visit the project page: |
|
7 |
https://drupal.org/project/token |
|
8 |
|
|
9 |
* To submit bug reports and feature suggestions, or to track changes: |
|
10 |
https://drupal.org/project/issues/token |
|
11 |
|
|
12 |
|
|
13 |
INSTALLATION |
|
14 |
------------ |
|
15 |
|
|
16 |
Install as usual, see |
|
17 |
https://drupal.org/documentation/install/modules-themes/modules-7 for further |
|
18 |
information. |
|
19 |
|
|
20 |
|
|
21 |
TROUBLESHOOTING |
|
22 |
--------------- |
|
23 |
|
|
24 |
Token module doesn't provide any visible functions to the user on its own, it |
|
25 |
just provides token handling services for other modules. |
|
26 |
|
|
27 |
|
|
28 |
MAINTAINERS |
|
29 |
----------- |
|
30 |
|
|
31 |
Current maintainers: |
|
32 |
|
|
33 |
* Dave Reid (https://drupal.org/user/53892) |
drupal7/sites/all/modules/token/tests/token_test.info | ||
---|---|---|
5 | 5 |
files[] = token_test.module |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by drupal.org packaging script on 2013-02-24
|
|
9 |
version = "7.x-1.5"
|
|
8 |
; Information added by Drupal.org packaging script on 2015-02-28
|
|
9 |
version = "7.x-1.6"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "token" |
12 |
datestamp = "1361665026"
|
|
12 |
datestamp = "1425149060"
|
|
13 | 13 |
|
drupal7/sites/all/modules/token/tests/token_test.tokens.inc | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
/** |
|
4 |
* Implements hook_token_info() |
|
5 |
*/ |
|
6 |
function token_test_token_info() { |
|
7 |
$info['tokens']['node']['colons:in:name'] = array( |
|
8 |
'name' => t('A test token with colons in the name'), |
|
9 |
'description' => NULL, |
|
10 |
); |
|
11 |
|
|
12 |
return $info; |
|
13 |
} |
drupal7/sites/all/modules/token/token.info | ||
---|---|---|
3 | 3 |
core = 7.x |
4 | 4 |
files[] = token.test |
5 | 5 |
|
6 |
; Information added by drupal.org packaging script on 2013-02-24
|
|
7 |
version = "7.x-1.5"
|
|
6 |
; Information added by Drupal.org packaging script on 2015-02-28
|
|
7 |
version = "7.x-1.6"
|
|
8 | 8 |
core = "7.x" |
9 | 9 |
project = "token" |
10 |
datestamp = "1361665026"
|
|
10 |
datestamp = "1425149060"
|
|
11 | 11 |
|
drupal7/sites/all/modules/token/token.module | ||
---|---|---|
180 | 180 |
'text' => NULL, |
181 | 181 |
'options' => array(), |
182 | 182 |
'dialog' => TRUE, |
183 |
), |
|
183 |
) + $info['token_tree']['variables'],
|
|
184 | 184 |
'file' => 'token.pages.inc', |
185 | 185 |
); |
186 | 186 |
|
... | ... | |
273 | 273 |
* Implements hook_widget_form_alter(). |
274 | 274 |
*/ |
275 | 275 |
function token_field_widget_form_alter(&$element, &$form_state, $context) { |
276 |
if (!empty($element['#description']) && is_string($element['#description'])) {
|
|
277 |
$element['#description'] = filter_xss_admin(token_replace($element['#description']));
|
|
276 |
if (!empty($element['#description']) && !empty($context['instance']['description'])) {
|
|
277 |
$element['#description'] = filter_xss_admin(token_replace($context['instance']['description']));
|
|
278 | 278 |
} |
279 | 279 |
} |
280 | 280 |
|
... | ... | |
412 | 412 |
*/ |
413 | 413 |
function token_entity_info_alter(&$info) { |
414 | 414 |
foreach (array_keys($info) as $entity_type) { |
415 |
// Add a token view mode if it does not already exist. |
|
416 |
if (!empty($info[$entity_type]['view modes']) && !isset($info[$entity_type]['view modes']['token'])) { |
|
417 |
$info[$entity_type]['view modes']['token'] = array( |
|
418 |
'label' => t('Tokens'), |
|
419 |
'custom settings' => FALSE, |
|
420 |
); |
|
415 |
// Add a token view mode if it does not already exist. Only work with |
|
416 |
// fieldable entities. |
|
417 |
if (!empty($info[$entity_type]['fieldable'])) { |
|
418 |
if (!isset($info[$entity_type])) { |
|
419 |
$info[$entity_type]['view modes'] = array(); |
|
420 |
} |
|
421 |
if (!isset($info[$entity_type]['view modes']['token'])) { |
|
422 |
$info[$entity_type]['view modes']['token'] = array( |
|
423 |
'label' => t('Tokens'), |
|
424 |
'custom settings' => FALSE, |
|
425 |
); |
|
426 |
} |
|
421 | 427 |
} |
422 | 428 |
|
423 | 429 |
if (!empty($info[$entity_type]['token type'])) { |
... | ... | |
647 | 653 |
$invalid_tokens = array(); |
648 | 654 |
|
649 | 655 |
foreach ($tokens as $token => $full_token) { |
656 |
if (isset($token_info['tokens'][$type][$token])) { |
|
657 |
continue; |
|
658 |
} |
|
659 |
|
|
650 | 660 |
// Split token up if it has chains. |
651 | 661 |
$parts = explode(':', $token, 2); |
652 | 662 |
|
drupal7/sites/all/modules/token/token.pages.inc | ||
---|---|---|
19 | 19 |
} |
20 | 20 |
|
21 | 21 |
$info = token_theme(); |
22 |
$variables['options']['query']['options'] = array_intersect_key($variables, $info['token_tree']['variables']); |
|
22 |
$tree_variables = array_intersect_key($variables, $info['token_tree']['variables']); |
|
23 |
$tree_variables = drupal_array_diff_assoc_recursive($tree_variables, $info['token_tree']['variables']); |
|
24 |
if (!isset($variables['options']['query']['options'])) { |
|
25 |
$variables['options']['query']['options'] = array(); |
|
26 |
} |
|
27 |
$variables['options']['query']['options'] += $tree_variables; |
|
23 | 28 |
|
24 | 29 |
// We should never pass the dialog option to theme_token_tree(). It is only |
25 | 30 |
// used for this function. |
drupal7/sites/all/modules/token/token.test | ||
---|---|---|
137 | 137 |
'[node:created:short]', |
138 | 138 |
'[node:created:custom:invalid]', |
139 | 139 |
'[node:created:custom:mm-YYYY]', |
140 |
'[node:colons:in:name]', |
|
140 | 141 |
'[site:name]', |
141 | 142 |
'[site:slogan]', |
142 | 143 |
'[current-date:short]', |
... | ... | |
147 | 148 |
'[node:title:invalid]', |
148 | 149 |
'[node:created:invalid]', |
149 | 150 |
'[node:created:short:invalid]', |
151 |
'[node:colons:in:name:invalid]', |
|
150 | 152 |
'[invalid:title]', |
151 | 153 |
'[site:invalid]', |
152 | 154 |
'[user:ip-address]', |
... | ... | |
166 | 168 |
'[node:created:short]', |
167 | 169 |
'[node:created:custom:invalid]', |
168 | 170 |
'[node:created:custom:mm-YYYY]', |
171 |
'[node:colons:in:name]', |
|
169 | 172 |
'[site:name]', |
170 | 173 |
'[site:slogan]', |
171 | 174 |
'[user:uid]', |
... | ... | |
176 | 179 |
'[node:title:invalid]', |
177 | 180 |
'[node:created:invalid]', |
178 | 181 |
'[node:created:short:invalid]', |
182 |
'[node:colons:in:name:invalid]', |
|
179 | 183 |
'[invalid:title]', |
180 | 184 |
'[site:invalid]', |
181 | 185 |
'[user:ip-address]', |
drupal7/sites/all/modules/webform/webform.info | ||
---|---|---|
24 | 24 |
files[] = tests/submission.test |
25 | 25 |
files[] = tests/webform.test |
26 | 26 |
|
27 |
; Information added by Drupal.org packaging script on 2014-10-07
|
|
28 |
version = "7.x-3.21"
|
|
27 |
; Information added by Drupal.org packaging script on 2015-03-03
|
|
28 |
version = "7.x-3.22"
|
|
29 | 29 |
core = "7.x" |
30 | 30 |
project = "webform" |
31 |
datestamp = "1412682050"
|
|
31 |
datestamp = "1425406686"
|
|
32 | 32 |
|
drupal7/sites/all/modules/webform/webform.module | ||
---|---|---|
1734 | 1734 |
// This is a webform node block. |
1735 | 1735 |
$node->webform_block = TRUE; |
1736 | 1736 |
|
1737 |
// Use the node title for the block title. |
|
1738 |
$subject = $node->title; |
|
1739 | 1737 |
|
1740 | 1738 |
// If not displaying pages in the block, set the #action property on the form. |
1741 | 1739 |
if ($settings['pages_block']) { |
... | ... | |
1761 | 1759 |
$content['#contextual_links']['node'] = array('node', array($node->nid)); |
1762 | 1760 |
} |
1763 | 1761 |
|
1764 |
// Create the block. |
|
1762 |
// Create the block, using the node title for the block title.
|
|
1765 | 1763 |
// Note that we render the content immediately here rather than passing back |
1766 | 1764 |
// a renderable so that if the block is empty it is hidden. |
1767 | 1765 |
$block = array( |
1768 |
'subject' => $subject,
|
|
1766 |
'subject' => check_plain($node->title),
|
|
1769 | 1767 |
'content' => drupal_render($content), |
1770 | 1768 |
); |
1771 | 1769 |
return $block; |
drupal7/sites/all/themes/adminimal_theme/adminimal.info | ||
---|---|---|
20 | 20 |
regions[sidebar_first] = First sidebar |
21 | 21 |
regions_hidden[] = sidebar_first |
22 | 22 |
|
23 |
; Information added by Drupal.org packaging script on 2015-01-28
|
|
24 |
version = "7.x-1.20"
|
|
23 |
; Information added by Drupal.org packaging script on 2015-03-01
|
|
24 |
version = "7.x-1.21"
|
|
25 | 25 |
core = "7.x" |
26 | 26 |
project = "adminimal_theme" |
27 |
datestamp = "1422442296"
|
|
27 |
datestamp = "1425236582"
|
|
28 | 28 |
|
drupal7/sites/all/themes/adminimal_theme/css/mobile.css | ||
---|---|---|
45 | 45 |
width: 100%; |
46 | 46 |
} |
47 | 47 |
|
48 |
body.adminimal-theme #navigation ul.primary li:first-of-type { |
|
49 |
margin-left: 0; |
|
50 |
} |
|
51 |
|
|
48 | 52 |
body.adminimal-theme ul.primary li a:active, body.adminimal-theme ul.primary li a:link, body.adminimal-theme ul.primary li a:visited { |
49 | 53 |
border: 0 none; |
50 | 54 |
display: block; |
drupal7/sites/all/themes/adminimal_theme/css/style.css | ||
---|---|---|
364 | 364 |
border-top: 3px solid #0074BD; |
365 | 365 |
margin-top: -3px; |
366 | 366 |
color: #333; |
367 |
box-shadow: 0px 0px 8px rgba(0,0,0,0.2);
|
|
367 |
box-shadow: 0px 0px 3px rgba(0,0,0,0.2);
|
|
368 | 368 |
position: relative; |
369 | 369 |
} |
370 | 370 |
|
Also available in: Unified diff
Weekly update of contrib modules