-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathos_slideshow.features.inc
138 lines (123 loc) · 3.69 KB
/
os_slideshow.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
<?php
/**
* @file
* os_slideshow.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function os_slideshow_ctools_plugin_api() {
list($module, $api) = func_get_args();
if ($module == "file_entity" && $api == "file_default_displays") {
return array("version" => "1");
}
}
/**
* Implements hook_views_api().
*/
function os_slideshow_views_api() {
list($module, $api) = func_get_args();
if ($module == "views" && $api == "views_default") {
return array("version" => "3.0");
}
}
/**
* Implements hook_image_default_styles().
*/
function os_slideshow_image_default_styles() {
$styles = array();
// Exported image style: slideshow-default
$styles['slideshow-default'] = array(
'name' => 'slideshow-default',
'effects' => array(
1 => 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' => '960',
'height' => '400',
),
'weight' => '1',
),
),
);
return $styles;
}
/**
* Implements hook_styles_default_styles().
*/
function os_slideshow_styles_default_styles() {
$styles = array();
// Exported style: slideshow_default
$styles['file']['styles']['slideshow_default'] = array(
'label' => 'slideshow_default',
'description' => '',
'preset_info' => array(
'image' => array(
'slideshow_default' => array(
'default preset' => 'original',
'preset' => 'slideshow-default',
),
),
'audio' => array(
'slideshow_default' => array(
'default preset' => 'original',
),
),
'video' => array(
'slideshow_default' => array(
'default preset' => 'original',
),
),
'default' => array(
'slideshow_default' => array(
'default preset' => 'original',
),
),
'media_vimeo' => array(
'slideshow_default' => array(
'default preset' => 'unlinked_thumbnail',
),
),
'media_youtube' => array(
'slideshow_default' => array(
'default preset' => 'unlinked_thumbnail',
),
),
),
);
return $styles;
}
/**
* Implements hook_styles_default_presets_alter().
*/
function os_slideshow_styles_default_presets_alter(&$presets) {
$styles = styles_default_styles();
if ($styles['file']['styles']['slideshow_default']['storage'] == STYLES_STORAGE_DEFAULT) {
$presets['file']['containers']['image']['styles']['slideshow_default'] = array(
'default preset' => 'original',
'preset' => 'slideshow-default',
);
$presets['file']['containers']['audio']['styles']['slideshow_default'] = array(
'default preset' => 'original',
);
$presets['file']['containers']['video']['styles']['slideshow_default'] = array(
'default preset' => 'original',
);
$presets['file']['containers']['default']['styles']['slideshow_default'] = array(
'default preset' => 'original',
);
$presets['file']['containers']['media_vimeo']['styles']['slideshow_default'] = array(
'default preset' => 'unlinked_thumbnail',
);
$presets['file']['containers']['media_youtube']['styles']['slideshow_default'] = array(
'default preset' => 'unlinked_thumbnail',
);
}
}