@@ -119,10 +119,10 @@ discard block |
||
119 | 119 | * Implements hook_lightning_fpp_types(). |
120 | 120 | */ |
121 | 121 | function df_tools_slideshow_lightning_fpp_types_alter(&$types) { |
122 | - $icon_path = drupal_get_path('module', 'df_tools_slideshow') . '/images/'; |
|
122 | + $icon_path = drupal_get_path('module', 'df_tools_slideshow').'/images/'; |
|
123 | 123 | $types['slideshow'] = array( |
124 | 124 | 'title' => 'slideshow', |
125 | - 'icon' => $icon_path . 'icon_slideshow.png', |
|
125 | + 'icon' => $icon_path.'icon_slideshow.png', |
|
126 | 126 | 'path' => 'slideshow', |
127 | 127 | ); |
128 | 128 | } |
@@ -132,17 +132,17 @@ discard block |
||
132 | 132 | */ |
133 | 133 | function df_tools_slideshow_form_after_build($form) { |
134 | 134 | // Make the previews for media images larger than the default media_thumbnail |
135 | - for ($i=0; $i<=max(array_keys($form['field_media'][LANGUAGE_NONE])); ++$i) { |
|
135 | + for ($i = 0; $i <= max(array_keys($form['field_media'][LANGUAGE_NONE])); ++$i) { |
|
136 | 136 | // The slick image style is provided by the slick module, and formats images to match hero proportions |
137 | 137 | // We do not currently use this image style as the default for the slideshow fpp |
138 | 138 | $form['field_media'][LANGUAGE_NONE][$i]['preview']['content']['#image_style'] = 'slick'; |
139 | 139 | } |
140 | 140 | // Remove the formatting tips for the text fields |
141 | - for ($i=0; $i<=max(array_keys($form['field_body'][LANGUAGE_NONE])); ++$i) { |
|
141 | + for ($i = 0; $i <= max(array_keys($form['field_body'][LANGUAGE_NONE])); ++$i) { |
|
142 | 142 | unset($form['field_body'][LANGUAGE_NONE][$i]['format']['help']); |
143 | 143 | unset($form['field_body'][LANGUAGE_NONE][$i]['format']['guidelines']); |
144 | 144 | } |
145 | - for ($i=0; $i<=max(array_keys($form['field_title'][LANGUAGE_NONE])); ++$i) { |
|
145 | + for ($i = 0; $i <= max(array_keys($form['field_title'][LANGUAGE_NONE])); ++$i) { |
|
146 | 146 | unset($form['field_title'][LANGUAGE_NONE][$i]['format']['help']); |
147 | 147 | unset($form['field_title'][LANGUAGE_NONE][$i]['format']['guidelines']); |
148 | 148 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $node->revision = 1; |
57 | 57 | $node->workbench_moderation_state_new = 'draft'; |
58 | 58 | node_save($node); |
59 | - drupal_goto('/node/' . $node->nid . '/draft'); |
|
59 | + drupal_goto('/node/'.$node->nid.'/draft'); |
|
60 | 60 | } |
61 | 61 | // Return the standard workbench node edit form. |
62 | 62 | else { |
@@ -23,10 +23,10 @@ |
||
23 | 23 | MigrateDestinationNode::getKeySchema() |
24 | 24 | ); |
25 | 25 | |
26 | - $import_path = drupal_get_path('module', 'df_translate') . '/import/'; |
|
26 | + $import_path = drupal_get_path('module', 'df_translate').'/import/'; |
|
27 | 27 | |
28 | 28 | // Create a MigrateSource object. |
29 | - $this->source = new MigrateSourceCSV($import_path . 'df_translate.base.nodes.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
29 | + $this->source = new MigrateSourceCSV($import_path.'df_translate.base.nodes.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
30 | 30 | |
31 | 31 | $this->destination = new MigrateDestinationNode('page'); |
32 | 32 |
@@ -10,9 +10,9 @@ |
||
10 | 10 | function df_search_js_alter(&$javascript) { |
11 | 11 | // Replace the default jQuery autocomplete JS bundled with Search Autocomplete |
12 | 12 | // with a version that supports closing the autocomplete using a button. |
13 | - $path = drupal_get_path('module', 'search_autocomplete') . '/js/jquery.autocomplete.js'; |
|
13 | + $path = drupal_get_path('module', 'search_autocomplete').'/js/jquery.autocomplete.js'; |
|
14 | 14 | |
15 | 15 | if (isset($javascript[$path])) { |
16 | - drupal_add_js(drupal_get_path('module', 'df_search') . '/js/jquery.autocomplete.js'); |
|
16 | + drupal_add_js(drupal_get_path('module', 'df_search').'/js/jquery.autocomplete.js'); |
|
17 | 17 | } |
18 | 18 | } |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | $this->destination = new MigrateDestinationEntityAPI('commerce_product', 'product'); |
27 | 27 | |
28 | 28 | // Define a default import path. |
29 | - $import_path = drupal_get_path('module', 'df_commerce') . '/import/'; |
|
29 | + $import_path = drupal_get_path('module', 'df_commerce').'/import/'; |
|
30 | 30 | |
31 | 31 | // Create a MigrateSource object. |
32 | - $this->source = new MigrateSourceCSV($import_path . 'df_commerce.base.products.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
32 | + $this->source = new MigrateSourceCSV($import_path.'df_commerce.base.products.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
33 | 33 | |
34 | 34 | $this->addFieldMapping('title', 'title'); |
35 | 35 | $this->addFieldMapping('sku', 'sku'); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | // Images |
39 | 39 | $this->addFieldMapping('field_images', 'images'); |
40 | 40 | $this->addFieldMapping('field_images:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
41 | - $this->addFieldMapping('field_images:source_dir')->defaultValue($import_path . 'images'); |
|
41 | + $this->addFieldMapping('field_images:source_dir')->defaultValue($import_path.'images'); |
|
42 | 42 | $this->addFieldMapping('field_images:destination_file', 'filename'); |
43 | 43 | |
44 | 44 | $this->addFieldMapping('uid', 'uid'); |
@@ -23,8 +23,8 @@ |
||
23 | 23 | MigrateDestinationNode::getKeySchema() |
24 | 24 | ); |
25 | 25 | |
26 | - $import_path = drupal_get_path('module', 'df_commerce') . '/import/'; |
|
27 | - $this->source = new MigrateSourceCSV($import_path . 'df_commerce.base.nodes.commerce.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
26 | + $import_path = drupal_get_path('module', 'df_commerce').'/import/'; |
|
27 | + $this->source = new MigrateSourceCSV($import_path.'df_commerce.base.nodes.commerce.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
28 | 28 | |
29 | 29 | $this->destination = new MigrateDestinationNode('commerce'); |
30 | 30 |
@@ -9,8 +9,8 @@ |
||
9 | 9 | |
10 | 10 | public function __construct($arguments) { |
11 | 11 | parent::__construct($arguments); |
12 | - $import_path = drupal_get_path('module', 'df_engage') . '/import/'; |
|
13 | - $this->source = new MigrateSourceCSV($import_path . 'df_engage.terms.site_section.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
12 | + $import_path = drupal_get_path('module', 'df_engage').'/import/'; |
|
13 | + $this->source = new MigrateSourceCSV($import_path.'df_engage.terms.site_section.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
14 | 14 | $this->destination = new MigrateDestinationTerm('site_section'); |
15 | 15 | $this->addFieldMapping('name', 'name'); |
16 | 16 | } |
@@ -11,10 +11,10 @@ |
||
11 | 11 | parent::__construct($arguments); |
12 | 12 | $this->description = t('Import UUID nodes.'); |
13 | 13 | |
14 | - $import_path = drupal_get_path('module', 'df_engage') . '/import/'; |
|
14 | + $import_path = drupal_get_path('module', 'df_engage').'/import/'; |
|
15 | 15 | |
16 | 16 | // Create a MigrateSource object. |
17 | - $this->source = new MigrateSourceCSV($import_path . 'df_engage.base.nodes.uuid.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
17 | + $this->source = new MigrateSourceCSV($import_path.'df_engage.base.nodes.uuid.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
18 | 18 | |
19 | 19 | $this->destination = new MigrateDestinationNode('page'); |
20 | 20 |
@@ -78,7 +78,7 @@ |
||
78 | 78 | * Implements hook_navbar_alter(). |
79 | 79 | */ |
80 | 80 | function df_admin_navbar_alter(&$items) { |
81 | - foreach ($items['administration']['tray']['navbar_administration']['administration_menu'] as $mid => $item) { |
|
81 | + foreach ($items['administration']['tray']['navbar_administration']['administration_menu'] as $mid => $item) { |
|
82 | 82 | // Change "My Workbench" to "Workbench" in the Navbar. |
83 | 83 | if (isset($item['#href']) && $item['#href'] == 'admin/workbench') { |
84 | 84 | $items['administration']['tray']['navbar_administration']['administration_menu'][$mid]['#title'] = 'Workbench'; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * Implements hook_theme(). |
65 | 65 | */ |
66 | -function df_admin_theme(){ |
|
66 | +function df_admin_theme() { |
|
67 | 67 | return array( |
68 | 68 | 'df_admin_page_template' => array( |
69 | 69 | 'template' => 'df-admin-page', |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | unset($items['administration']['tray']['navbar_administration']['administration_menu'][$mid]); |
94 | 94 | } |
95 | 95 | // Shorten "Demo Framework" to "Demo" on the Navbar. |
96 | - if(isset($item['#href']) && $item['#href'] == 'admin/df') { |
|
96 | + if (isset($item['#href']) && $item['#href'] == 'admin/df') { |
|
97 | 97 | $items['administration']['tray']['navbar_administration']['administration_menu'][$mid]['#title'] = 'Demo'; |
98 | 98 | } |
99 | 99 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | 'parent' => isset($topic['parent']) ? $topic['parent'] : 0, |
154 | 154 | 'popup width' => isset($topic['popup width']) ? $topic['popup width'] : 500, |
155 | 155 | 'popup height' => isset($topic['popup height']) ? $topic['popup height'] : 500, |
156 | - 'file' => $file . '.html', |
|
156 | + 'file' => $file.'.html', |
|
157 | 157 | // Not in .ini file. |
158 | 158 | 'path' => "$module_path/help", |
159 | 159 | 'line break' => isset($topic['line break']) ? $topic['line break'] : (isset($ini['settings'][$module->name]['line break']) ? $ini['settings'][$module->name]['line break'] : FALSE), |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | 'website' => 'https://github.com/jquery/jquery-migrate', |
203 | 203 | 'version' => '1.2.1', |
204 | 204 | 'js' => array( |
205 | - drupal_get_path('module', 'df_admin') . '/js/jquery-migrate-1.2.1.min.js' => array(), |
|
205 | + drupal_get_path('module', 'df_admin').'/js/jquery-migrate-1.2.1.min.js' => array(), |
|
206 | 206 | ), |
207 | 207 | ); |
208 | 208 | return $libraries; |
@@ -111,8 +111,12 @@ discard block |
||
111 | 111 | $modules = system_rebuild_module_data(); |
112 | 112 | foreach ($modules as $index => $module) { |
113 | 113 | // Process only modules that are Scenarios and are not enabled. |
114 | - if ($module->info['package'] != 'Demo Framework Scenarios') continue; |
|
115 | - if ($module->status) continue; |
|
114 | + if ($module->info['package'] != 'Demo Framework Scenarios') { |
|
115 | + continue; |
|
116 | + } |
|
117 | + if ($module->status) { |
|
118 | + continue; |
|
119 | + } |
|
116 | 120 | |
117 | 121 | // Functionality taken from _advanced_help_parse_ini(). |
118 | 122 | $module_path = drupal_get_path('module', $module->name); |
@@ -282,8 +286,7 @@ discard block |
||
282 | 286 | $bundle = NULL; |
283 | 287 | if (isset($entity->type)) { |
284 | 288 | $bundle = $entity->type; |
285 | - } |
|
286 | - else if (isset($entity->bundle)) { |
|
289 | + } else if (isset($entity->bundle)) { |
|
287 | 290 | $bundle = $entity->bundle; |
288 | 291 | } |
289 | 292 | $fields = array_keys(field_info_instances($type, $bundle)); |