PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 2.41
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v2.41
3.36 3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 2.44 All 141 releases
photonic / Options / Lightbox.php

Lightbox.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 2.41, at Options/Lightbox.php

402 lines 13.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Photonic_Plugin\Options;
3
4 class Lightbox extends Option_Tab {
5 private static $instance;
6
7 private function __construct() {
8 $this->options = [
9 ['name' => 'Common',
10 'desc' => 'Control settings for all Lightboxes',
11 'category' => 'lb-settings',
12 'type' => 'section',],
13
14 ['name' => 'Autoplay mode',
15 'desc' => "Selecting this will make your lightbox launch in an autoplay mode automatically upon clicking (See <a href='https://aquoid.com/plugins/photonic/third-party-lightboxes/' target='_blank'>list of supported lightboxes</a>).",
16 'id' => 'slideshow_mode',
17 'grouping' => 'lb-settings',
18 'type' => 'checkbox',
19 ],
20
21 ['name' => 'Autoplay mode interval',
22 'desc' => 'If autoplay is on, this will control the interval between slides.',
23 'id' => 'slideshow_interval',
24 'grouping' => 'lb-settings',
25 'type' => 'text',
26 'hint' => 'Please enter a time in milliseconds',
27 ],
28
29 ['name' => 'No Looping',
30 'desc' => 'Selecting this will prevent the lightbox from looping back to the start when it reaches the end. Looping can be controlled only in lightboxes that have a setting for it.',
31 'id' => 'lightbox_no_loop',
32 'grouping' => 'lb-settings',
33 'type' => 'checkbox',
34 ],
35
36 ['name' => "Deep Linking",
37 'desc' => "If enabled, Photonic will generate a unique URL when an photo's thumbnail is clicked.",
38 'id' => "deep_linking",
39 'grouping' => 'lb-settings',
40 'type' => 'select',
41 'options' => [
42 "none" => "No deeplinking",
43 "no-history" => "Enable deeplinking, but don't add links for clicked images to browser history",
44 "yes-history" => "Enable deeplinking, and add links for clicked images to browser history",
45 ],
46 ],
47
48 ['name' => "Social media integration",
49 'desc' => "If deep linking is enabled, Photonic shows social media buttons on the lightbox to facilitate sharing. Select this option to disable social sharing.",
50 'id' => "social_media",
51 'grouping' => 'lb-settings',
52 'type' => 'checkbox',
53 ],
54
55 ['name' => 'Colorbox',
56 'desc' => 'Colorbox Settings',
57 'category' => 'lb-cb-settings',
58 'type' => 'section',],
59
60 ['name' => 'Colorbox Theme',
61 'desc' => "Colorbox lets you pick one of the following themes. See examples <a href='http://www.jacklmoore.com/colorbox/' target='_blank'>here</a>:",
62 'id' => 'cbox_theme',
63 'grouping' => 'lb-cb-settings',
64 'type' => 'select',
65 'options' => [
66 '1' => 'Default',
67 '2' => 'Style 2',
68 '3' => 'Style 3',
69 '4' => 'Style 4',
70 '5' => 'Style 5',
71 'theme' => 'Use a skin defined in your theme (requires the files to be present in the scripts/colorbox folder within your theme directory).',
72 ]
73 ],
74
75 ['name' => 'Transition effect',
76 'desc' => 'Specify the transition effect to be used when Colorbox is displaying a picture',
77 'id' => 'cb_transition_effect',
78 'grouping' => 'lb-cb-settings',
79 'type' => 'select',
80 'options' => [
81 'elastic' => 'Elastic',
82 'fade' => 'Fade',
83 'none' => 'None',
84 ]
85 ],
86
87 ['name' => 'Transition speed',
88 'desc' => 'Specify the speed for the above transition effect, in milliseconds',
89 'id' => 'cb_transition_speed',
90 'grouping' => 'lb-cb-settings',
91 'type' => 'text'
92 ],
93
94 ['name' => 'Fancybox 1 / 2 / 3',
95 'desc' => 'Fancybox Settings',
96 'category' => 'lb-fb-settings',
97 'type' => 'section',],
98
99 ['name' => "Position of title in FancyBox slideshow",
100 'desc' => "Fancybox lets you show the title of the image in different positions. Where do you want it?",
101 'id' => "fbox_title_position",
102 'grouping' => "lb-fb-settings",
103 'type' => 'select',
104 'options' => [
105 "outside" => "Outside the slide box",
106 "inside" => "Inside the slide box",
107 "over" => "Over the image in the slide box",
108 ]
109 ],
110
111 ['name' => 'Fancybox3 Transition effect',
112 'desc' => 'Specify the transition effect to be used when Fancybox3 is displaying a picture.',
113 'id' => 'fb3_transition_effect',
114 'grouping' => 'lb-fb-settings',
115 'type' => 'select',
116 'options' => [
117 'fade' => 'Fade',
118 'slide' => 'Slide',
119 'circular' => 'Circular',
120 'tube' => 'Tube',
121 'zoom-in-out' => 'Zoom in and out',
122 'rotate' => 'Rotate',
123 ]
124 ],
125
126 ['name' => 'Fancybox3 Transition duration',
127 'desc' => 'How fast or slow do you want the transition?',
128 'id' => "fb3_transition_speed",
129 'grouping' => 'lb-fb-settings',
130 'type' => 'text',
131 'hint' => 'Integer, in milliseconds'],
132
133 ['name' => "Fancybox3 - Hide Zoom Button",
134 'desc' => "The Zoom button is enabled by default. Select to hide it.",
135 'id' => "fb3_disable_zoom",
136 'grouping' => "lb-fb-settings",
137 'type' => 'checkbox'
138 ],
139
140 ['name' => "Fancybox3 - Hide Slideshow Button",
141 'desc' => "The Slideshow button is enabled by default. Select to hide it.",
142 'id' => "fb3_disable_slideshow",
143 'grouping' => "lb-fb-settings",
144 'type' => 'checkbox'
145 ],
146
147 ['name' => "Fancybox3 - Show FullScreen Button",
148 'desc' => "The full-screen button is disabled by default. Select to show it.",
149 'id' => "fb3_show_fullscreen",
150 'grouping' => "lb-fb-settings",
151 'type' => 'checkbox'
152 ],
153
154 ['name' => "Fancybox3 - auto-start FullScreen",
155 'desc' => "Automatically launch Fancybox3 in FullScreen mode.",
156 'id' => "enable_fb3_fullscreen",
157 'grouping' => "lb-fb-settings",
158 'type' => 'checkbox'
159 ],
160
161 ['name' => "Fancybox3 - Show Download Button",
162 'desc' => "The Download button is disabled by default. Select to show it.",
163 'id' => "fb3_enable_download",
164 'grouping' => "lb-fb-settings",
165 'type' => 'checkbox'
166 ],
167
168 ['name' => "Fancybox3 - Hide Thumbnails Button",
169 'desc' => "The Thumbnails button is enabled by default. Select to hide it.",
170 'id' => "fb3_hide_thumbs",
171 'grouping' => "lb-fb-settings",
172 'type' => 'checkbox'
173 ],
174
175 ['name' => "Fancybox3 - auto-open Thumbnails",
176 'desc' => "Automatically open Fancybox3 Thumbnails.",
177 'id' => "enable_fb3_thumbnail",
178 'grouping' => "lb-fb-settings",
179 'type' => 'checkbox'
180 ],
181
182 ['name' => "Fancybox3 - Disable Right Click",
183 'desc' => "While this does not protect from truly determined users, it adds a deterrent for downloading.",
184 'id' => "fb3_disable_right_click",
185 'grouping' => "lb-fb-settings",
186 'type' => 'checkbox'
187 ],
188
189 ['name' => 'Lightcase',
190 'desc' => 'Lightcase Settings',
191 'category' => 'lb-lc-settings',
192 'type' => 'section',],
193
194 ['name' => 'Transition effect',
195 'desc' => 'Specify the transition effect to be used when Lightcase is displaying a picture. See demos <a href="http://cornel.bopp-art.com/lightcase/" target="_blank">here</a>.',
196 'id' => 'lc_transition_effect',
197 'grouping' => 'lb-lc-settings',
198 'type' => 'select',
199 'options' => [
200 'elastic' => 'Elastic',
201 'fade' => 'Fade',
202 'fadeInline' => 'Fade inline',
203 'scrollTop' => 'Scroll Top',
204 'scrollBottom' => 'Scroll Bottom',
205 'scrollLeft' => 'Scroll Left',
206 'scrollRight' => 'Scroll Right',
207 'scrollHorizontal' => 'Scroll Horizontal',
208 'scrollVertical' => 'Scroll Vertical',
209 'none' => 'None',
210 ]
211 ],
212
213 ['name' => 'Transition speed-in',
214 'desc' => 'How fast or slow do you want the transition, going in?',
215 'id' => "lc_transition_speed_in",
216 'grouping' => 'lb-lc-settings',
217 'type' => 'text',
218 'hint' => 'Integer, in milliseconds'],
219
220 ['name' => 'Transition speed-out',
221 'desc' => 'How fast or slow do you want the transition, going out?',
222 'id' => "lc_transition_speed_out",
223 'grouping' => 'lb-lc-settings',
224 'type' => 'text',
225 'hint' => 'Integer, in milliseconds'],
226
227 ['name' => 'Flexible Sizes',
228 'desc' => 'By default Lightcase does not show your images at more than 800px&times;500px. Selecting this option will let it automatically adjust your image according to your screen size.',
229 'id' => "lc_enable_shrink",
230 'grouping' => "lb-lc-settings",
231 'type' => 'checkbox'
232 ],
233
234 ['name' => 'LightGallery',
235 'desc' => 'LightGallery Settings',
236 'category' => 'lb-lg-settings',
237 'type' => 'section',],
238
239 ['name' => 'Add Additional Transitions',
240 'desc' => 'LightGallery supports the "fade" and "slide" transition effects by default. Additional transitions from the dropdown below can be enabled by addition of a script (+39KB). See demos <a href="http://sachinchoolur.github.io/lightGallery/demos/transitions.html" target="_blank">here</a>.',
241 'id' => "enable_lg_transitions",
242 'grouping' => "lb-lg-settings",
243 'type' => 'checkbox'
244 ],
245
246 ['name' => 'Transition effect',
247 'desc' => 'If the above is checked, specify the transition effect to be used when LightGallery is displaying a picture. See demos <a href="http://sachinchoolur.github.io/lightGallery/demos/transitions.html" target="_blank">here</a>.',
248 'id' => 'lg_transition_effect',
249 'grouping' => 'lb-lg-settings',
250 'type' => 'select',
251 'options' => [
252 'lg-slide' => 'lg-slide',
253 'lg-fade' => 'lg-fade',
254 'lg-zoom-in' => 'lg-zoom-in',
255 'lg-zoom-in-big' => 'lg-zoom-in-big',
256 'lg-zoom-out' => 'lg-zoom-out',
257 'lg-zoom-out-big' => 'lg-zoom-out-big',
258 'lg-zoom-in-out' => 'lg-zoom-in-out',
259 'lg-soft-zoom' => 'lg-soft-zoom',
260 'lg-scale-up' => 'lg-scale-up',
261 'lg-slide-circular' => 'lg-slide-circular',
262 'lg-slide-circular-vertical' => 'lg-slide-circular-vertical',
263 'lg-slide-vertical' => 'lg-slide-vertical',
264 'lg-slide-vertical-growth' => 'lg-slide-vertical-growth',
265 'lg-slide-skew-only' => 'lg-slide-skew-only',
266 'lg-slide-skew-only-rev' => 'lg-slide-skew-only-rev',
267 'lg-slide-skew-only-y' => 'lg-slide-skew-only-y',
268 'lg-slide-skew-only-y-rev' => 'lg-slide-skew-only-y-rev',
269 'lg-slide-skew' => 'lg-slide-skew',
270 'lg-slide-skew-rev' => 'lg-slide-skew-rev',
271 'lg-slide-skew-cross' => 'lg-slide-skew-cross',
272 'lg-slide-skew-cross-rev' => 'lg-slide-skew-cross-rev',
273 'lg-slide-skew-ver' => 'lg-slide-skew-ver',
274 'lg-slide-skew-ver-rev' => 'lg-slide-skew-ver-rev',
275 'lg-slide-skew-ver-cross' => 'lg-slide-skew-ver-cross',
276 'lg-slide-skew-ver-cross-rev' => 'lg-slide-skew-ver-cross-rev',
277 'lg-lollipop' => 'lg-lollipop',
278 'lg-lollipop-rev' => 'lg-lollipop-rev',
279 'lg-rotate' => 'lg-rotate',
280 'lg-rotate-rev' => 'lg-rotate-rev',
281 'lg-tube' => 'lg-tube',
282 ]
283 ],
284
285 ['name' => 'Transition speed',
286 'desc' => 'How fast or slow do you want the transition to go?',
287 'id' => "lg_transition_speed",
288 'grouping' => 'lb-lg-settings',
289 'type' => 'text',
290 'hint' => 'Integer, in milliseconds'],
291
292 ['name' => "Add Autoplay",
293 'desc' => "Enable Lightgallery Autoplay capability (+3KB).",
294 'id' => "enable_lg_autoplay",
295 'grouping' => "lb-lg-settings",
296 'type' => 'checkbox'
297 ],
298
299 ['name' => "Add Fullscreen",
300 'desc' => "Enable Lightgallery Fullscreen capability (+2KB).",
301 'id' => "enable_lg_fullscreen",
302 'grouping' => "lb-lg-settings",
303 'type' => 'checkbox'
304 ],
305
306 ['name' => "Add Thumbnail",
307 'desc' => "Enable Lightgallery Thumbnails capability (+8KB).",
308 'id' => "enable_lg_thumbnail",
309 'grouping' => "lb-lg-settings",
310 'type' => 'checkbox'
311 ],
312
313 ['name' => "Add Zoom",
314 'desc' => "Enable Lightgallery Zoom capability (+8KB).",
315 'id' => "enable_lg_zoom",
316 'grouping' => "lb-lg-settings",
317 'type' => 'checkbox'
318 ],
319
320 ['name' => 'Disable download',
321 'desc' => 'Disable the download button that shows up by default for LightGallery',
322 'id' => "disable_lg_download",
323 'grouping' => "lb-lg-settings",
324 'type' => 'checkbox'
325 ],
326
327 ['name' => 'Delay before hiding lightbox bars',
328 'desc' => 'Time to delay before hiding title and navigation bars',
329 'id' => "lg_hide_bars_delay",
330 'grouping' => 'lb-lg-settings',
331 'type' => 'text',
332 'hint' => 'Integer, in milliseconds'],
333
334 ['name' => 'PrettyPhoto',
335 'desc' => 'PrettyPhoto Settings',
336 'category' => 'lb-pp-settings',
337 'type' => 'section',],
338
339 ['name' => "PrettyPhoto Theme",
340 'desc' => "PrettyPhoto lets you pick one of the following themes:",
341 'id' => "pphoto_theme",
342 'grouping' => "lb-pp-settings",
343 'type' => 'select',
344 'options' => [
345 "pp_default" => "Default",
346 "light_rounded" => "Light Rounded",
347 "dark_rounded" => "Dark Rounded",
348 "light_square" => "Light Square",
349 "dark_square" => "Dark Square",
350 "facebook" => "Facebook",
351 ]
352 ],
353
354 ['name' => 'Transition speed',
355 'desc' => 'Specify the transition speed to be used when PrettyPhoto is displaying a picture',
356 'id' => 'pp_animation_speed',
357 'grouping' => 'lb-pp-settings',
358 'type' => 'select',
359 'options' => [
360 'fast' => 'Fast',
361 'slow' => 'Slow',
362 'normal' => 'Normal',
363 ]
364 ],
365
366 ['name' => 'Swipebox',
367 'desc' => 'Swipebox Settings',
368 'category' => 'lb-sb-settings',
369 'type' => 'section',],
370
371 ['name' => 'Bars on Mobile',
372 'desc' => "Show title and navigation bars on mobile devices if Swipebox is the lightbox.",
373 'id' => "enable_swipebox_mobile_bars",
374 'grouping' => 'lb-sb-settings',
375 'type' => 'checkbox'
376 ],
377
378 ['name' => 'Close button on Mobile',
379 'desc' => 'Hide close button on mobile devices.',
380 'id' => 'sb_hide_mobile_close',
381 'grouping' => 'lb-sb-settings',
382 'type' => 'checkbox'
383 ],
384
385 ['name' => 'Delay before hiding bars on Desktop',
386 'desc' => 'Time to delay before hiding title and navigation bars on desktop. Set to 0 to always show the bars',
387 'id' => "sb_hide_bars_delay",
388 'grouping' => 'lb-sb-settings',
389 'type' => 'text',
390 'hint' => 'Integer, in milliseconds'],
391
392 ];
393 }
394
395 public static function get_instance() {
396 if (self::$instance == null) {
397 self::$instance = new Lightbox();
398 }
399 return self::$instance;
400 }
401 }
402