-
Notifications
You must be signed in to change notification settings - Fork 1
/
amphome_str.features.inc
257 lines (245 loc) · 7.8 KB
/
amphome_str.features.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<?php
/**
* @file
* amphome_str.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function amphome_str_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "boxes" && $api == "box") {
return array("version" => "1");
}
if ($module == "context" && $api == "context") {
return array("version" => "3");
}
if ($module == "page_manager" && $api == "pages_default") {
return array("version" => "1");
}
if ($module == "panels" && $api == "layouts") {
return array("version" => "1");
}
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}
/**
* Implements hook_views_api().
*/
function amphome_str_views_api($module = NULL, $api = NULL) {
return array("api" => "3.0");
}
/**
* Implements hook_image_default_styles().
*/
function amphome_str_image_default_styles() {
$styles = array();
// Exported image style: blog_sq_med.
$styles['blog_sq_med'] = array(
'name' => 'blog_sq_med',
'label' => 'blog_sq_med',
'effects' => array(
10 => array(
'label' => 'Scale and Smart Crop',
'help' => 'Similar to "Scale And Crop", but preserves the portion of the image with the most entropy.',
'effect callback' => 'smartcrop_scale_effect',
'form callback' => 'image_scale_form',
'summary theme' => 'image_scale_summary',
'module' => 'smartcrop',
'name' => 'smartcrop_scale_and_crop',
'data' => array(
'width' => 260,
'height' => 260,
'upscale' => 1,
),
'weight' => 1,
),
),
);
// Exported image style: intro_extrawide.
$styles['intro_extrawide'] = array(
'name' => 'intro_extrawide',
'label' => 'intro_extrawide',
'effects' => array(
4 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 1536,
'height' => 605,
),
'weight' => 1,
),
),
);
// Exported image style: leadimage_400w.
$styles['leadimage_400w'] = array(
'name' => 'leadimage_400w',
'label' => 'leadimage_400w',
'effects' => array(
3 => array(
'label' => 'Scale',
'help' => 'Scaling will maintain the aspect-ratio of the original image. If only a single dimension is specified, the other dimension will be calculated.',
'effect callback' => 'image_scale_effect',
'dimensions callback' => 'image_scale_dimensions',
'form callback' => 'image_scale_form',
'summary theme' => 'image_scale_summary',
'module' => 'image',
'name' => 'image_scale',
'data' => array(
'width' => 400,
'height' => '',
'upscale' => 0,
),
'weight' => 1,
),
),
);
// Exported image style: leadimage_505w.
$styles['leadimage_505w'] = array(
'name' => 'leadimage_505w',
'label' => 'leadimage_505w',
'effects' => array(
7 => array(
'label' => 'Scale',
'help' => 'Scaling will maintain the aspect-ratio of the original image. If only a single dimension is specified, the other dimension will be calculated.',
'effect callback' => 'image_scale_effect',
'dimensions callback' => 'image_scale_dimensions',
'form callback' => 'image_scale_form',
'summary theme' => 'image_scale_summary',
'module' => 'image',
'name' => 'image_scale',
'data' => array(
'width' => 505,
'height' => '',
'upscale' => 0,
),
'weight' => 1,
),
),
);
// Exported image style: medium_thumb.
$styles['medium_thumb'] = array(
'name' => 'medium_thumb',
'label' => 'medium_thumb',
'effects' => array(
8 => array(
'label' => 'Focus Scale And Crop',
'help' => 'Scale and crop based on data provided by <em>ImageField Focus</em>.',
'effect callback' => 'imagefield_focus_scale_and_crop_effect',
'form callback' => 'imagefield_focus_scale_and_crop_form',
'summary theme' => 'imagefield_focus_scale_and_crop_summary',
'module' => 'imagefield_focus',
'name' => 'imagefield_focus_scale_and_crop',
'data' => array(
'width' => 215,
'height' => 215,
'strength' => 'low',
'fallback' => 'image',
),
'weight' => 2,
),
),
);
// Exported image style: small_thumb.
$styles['small_thumb'] = array(
'name' => 'small_thumb',
'label' => 'small_thumb',
'effects' => array(
9 => array(
'label' => 'Focus Scale And Crop',
'help' => 'Scale and crop based on data provided by <em>ImageField Focus</em>.',
'effect callback' => 'imagefield_focus_scale_and_crop_effect',
'form callback' => 'imagefield_focus_scale_and_crop_form',
'summary theme' => 'imagefield_focus_scale_and_crop_summary',
'module' => 'imagefield_focus',
'name' => 'imagefield_focus_scale_and_crop',
'data' => array(
'width' => 140,
'height' => 140,
'strength' => 'low',
'fallback' => 'image',
),
'weight' => 1,
),
),
);
// Exported image style: term_image_thumb.
$styles['term_image_thumb'] = array(
'name' => 'term_image_thumb',
'label' => 'term image thumb',
'effects' => array(
10 => array(
'label' => 'Scale and crop',
'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
'effect callback' => 'image_scale_and_crop_effect',
'dimensions callback' => 'image_resize_dimensions',
'form callback' => 'image_resize_form',
'summary theme' => 'image_resize_summary',
'module' => 'image',
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 40,
'height' => 40,
),
'weight' => 1,
),
),
);
return $styles;
}
/**
* Implements hook_node_info().
*/
function amphome_str_node_info() {
$items = array(
'blogimages' => array(
'name' => t('Image'),
'base' => 'node_content',
'description' => '',
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
'news_archive_item' => array(
'name' => t('News Archive Item'),
'base' => 'node_content',
'description' => t('News archived from previous AMP Home site'),
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
'news_item' => array(
'name' => t('News item'),
'base' => 'node_content',
'description' => '',
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
'page' => array(
'name' => t('page'),
'base' => 'node_content',
'description' => t('a regular ol\' page'),
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
'webform' => array(
'name' => t('Webform'),
'base' => 'node_content',
'description' => t('Create a new form or questionnaire accessible to users. Submission results and statistics are recorded and accessible to privileged users.'),
'has_title' => '1',
'title_label' => t('Title'),
'help' => '',
),
);
drupal_alter('node_info', $items);
return $items;
}