PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 2.43
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v2.43
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 / Admin / Forms / Vanilla_Form.php

Vanilla_Form.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 2.43, at Admin/Forms/Vanilla_Form.php

1,258 lines 45.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Photonic_Plugin\Admin\Forms;
3
4 use Photonic_Plugin\Core\Utilities;
5
6 /**
7 * Contains all fields required on the add / edit forms for the gallery.
8 *
9 */
10 class Vanilla_Form {
11 private $fields, $default_layout;
12 private static $instance = null;
13
14 private function __construct() {
15 global $photonic_thumbnail_style;
16 $this->default_layout = isset($photonic_thumbnail_style) ? $photonic_thumbnail_style : 'square';
17
18 $this->fields = [];
19 $this->fields['default'] = $this->get_wp_fields();
20 $this->fields['flickr'] = $this->get_flickr_fields();
21 $this->fields['google'] = $this->get_google_fields();
22 $this->fields['smugmug'] = $this->get_smugmug_fields();
23 $this->fields['zenfolio'] = $this->get_zenfolio_fields();
24 $this->fields['instagram'] = $this->get_instagram_fields();
25 }
26
27 public static function get_instance() {
28 if (self::$instance == null) {
29 self::$instance = new Vanilla_Form();
30 }
31 return self::$instance;
32 }
33
34 function get_fields() {
35 return $this->fields;
36 }
37
38 private function get_wp_fields() {
39 global $photonic_wp_title_caption;
40 return [
41 'name' => esc_html__('WP Galleries', 'photonic'),
42 'fields' => [
43 [
44 'id' => 'id',
45 'name' => esc_html__('Gallery ID', 'photonic'),
46 'type' => 'text',
47 'req' => true,
48 ],
49
50 [
51 'id' => 'ids',
52 'name' => esc_html__('Image IDs', 'photonic'),
53 'type' => 'text',
54 'hint' => esc_html__('Comma-separated. You can specify this if there is no Gallery ID specified.', 'photonic'),
55 ],
56
57 [
58 'id' => 'style',
59 'name' => esc_html__('Display Style', 'photonic'),
60 'type' => 'select',
61 'options' => Utilities::layout_options(true),
62 'hint' => esc_html__('The first four options trigger a slideshow, the rest trigger a lightbox.', 'photonic'),
63 ],
64
65 [
66 'id' => 'count',
67 'name' => esc_html__('Number of photos to show', 'photonic'),
68 'type' => 'text',
69 ],
70
71 [
72 'id' => 'more',
73 'name' => esc_html__('"More" button text', 'photonic'),
74 'type' => 'text',
75 'hint' => esc_html__('Will show a "More" button with the specified text if the number of photos is higher than the above entry. Leave blank to show no button', 'photonic'),
76 ],
77
78 [
79 'id' => 'caption',
80 'name' => esc_html__('Photo title / caption', 'photonic'),
81 'type' => 'select',
82 'options' => Utilities::title_caption_options(),
83 'std' => $photonic_wp_title_caption,
84 'hint' => esc_html__('This will be used as the title for your photos.', 'photonic'),
85 ],
86
87 [
88 'id' => 'columns',
89 'name' => esc_html__('Number of columns', 'photonic'),
90 'type' => 'text',
91 'std' => 3,
92 ],
93
94 [
95 'id' => 'thumb_width',
96 'name' => esc_html__('Thumbnail width', 'photonic'),
97 'type' => 'text',
98 'std' => 75,
99 'hint' => esc_html__('In pixels', 'photonic')
100 ],
101
102 [
103 'id' => 'thumb_height',
104 'name' => esc_html__('Thumbnail height', 'photonic'),
105 'type' => 'text',
106 'std' => 75,
107 'hint' => esc_html__('In pixels', 'photonic')
108 ],
109
110 [
111 'id' => 'thumb_size',
112 'name' => esc_html__('Thumbnail size', 'photonic'),
113 'type' => 'raw',
114 'std' => self::get_image_sizes_selection('thumb_size', false),
115 'hint' => esc_html__('Sizes defined by your theme. Image picked here will be resized to the dimensions above.', 'photonic')
116 ],
117
118 [
119 'id' => 'main_size',
120 'name' => esc_html__('Main image size', 'photonic'),
121 'type' => 'raw',
122 'std' => self::get_image_sizes_selection('main_size', true),
123 'hint' => esc_html__('Sizes defined by your theme. Shown in a slideshow or lightbox. Avoid loading large sizes to reduce page loads.', 'photonic'),
124 'alt_id' => 'slide_size',
125 ],
126
127 [
128 'id' => 'tile_size',
129 'name' => esc_html__('Tile image size', 'photonic'),
130 'type' => 'raw',
131 'std' => self::get_image_sizes_selection('tile_size', true),
132 'hint' => esc_html__('Sizes defined by your theme. Shown in mosaic or masonry or random justified grid galleries. Avoid loading large sizes to reduce page loads.', 'photonic'),
133 ],
134
135 [
136 'id' => 'fx',
137 'name' => esc_html__('Slideshow Effects', 'photonic'),
138 'type' => 'select',
139 'options' => [
140 'fade' => esc_html__('Fade', 'photonic'),
141 'slide' => esc_html__('Slide', 'photonic'),
142 ],
143 'std' => 'slide',
144 'hint' => esc_html__('Applies to slideshows only', 'photonic')
145 ],
146
147 [
148 'id' => 'controls',
149 'name' => esc_html__('Slideshow Controls', 'photonic'),
150 'type' => 'select',
151 'options' => [
152 'hide' => esc_html__('Hide', 'photonic'),
153 'show' => esc_html__('Show', 'photonic'),
154 ],
155 'hint' => esc_html__('Shows Previous and Next buttons on the slideshow.', 'photonic'),
156 ],
157
158 [
159 'id' => 'timeout',
160 'name' => esc_html__('Time between slides in ms', 'photonic'),
161 'type' => 'text',
162 'std' => 4000,
163 'hint' => esc_html__('Applies to slideshows only', 'photonic')
164 ],
165
166 [
167 'id' => 'speed',
168 'name' => esc_html__('Time for each transition in ms', 'photonic'),
169 'type' => 'text',
170 'std' => 1000,
171 'hint' => esc_html__('Applies to slideshows only', 'photonic')
172 ],
173 ],
174 ];
175 }
176
177 private function get_flickr_fields() {
178 global $photonic_flickr_title_caption, $photonic_flickr_thumb_size, $photonic_flickr_main_size, $photonic_flickr_media;
179 return [
180 'name' => esc_html__('Flickr', 'photonic'),
181 'prelude' => sprintf(esc_html__('You have to define your Flickr API Key under %10$s.%1$s Documentation: %3$sOverall%2$s | %4$sPhotos%2$s | %5$sSingle Photos%2$s | %6$sAlbums (Photosets)%2$s| %7$sGalleries%2$s | %8$sCollections%2$s | %9$sAuthentication%2$s', 'photonic'),
182 '<br/>',
183 '</a>',
184 '<a href="https://aquoid.com/plugins/photonic/flickr/" target="_blank">',
185 '<a href="https://aquoid.com/plugins/photonic/flickr/flickr-photos/" target="_blank">',
186 '<a href="https://aquoid.com/plugins/photonic/flickr/flickr-photo/" target="_blank">',
187 '<a href="https://aquoid.com/plugins/photonic/flickr/flickr-photosets/" target="_blank">',
188 '<a href="https://aquoid.com/plugins/photonic/flickr/flickr-galleries/" target="_blank">',
189 '<a href="https://aquoid.com/plugins/photonic/flickr/flickr-collections/" target="_blank">',
190 '<a href="https://aquoid.com/plugins/photonic/flickr/flickr-authentication/" target="_blank">',
191 '<strong>Photonic &rarr; Settings &rarr; Flickr &rarr; Flickr Settings</strong>'),
192 'fields' => [
193 [
194 'id' => 'user_id',
195 'name' => esc_html__('User ID', 'photonic'),
196 'type' => 'text',
197 'req' => true,
198 'hint' => sprintf(esc_html__('Find your user ID from %s.', 'photonic'), '<strong>Photonic &rarr; Helpers</strong>')
199 ],
200
201 [
202 'id' => 'view',
203 'name' => esc_html__('Display', 'photonic'),
204 'type' => 'select',
205 'options' => [
206 'photos' => esc_html__('Photos', 'photonic'),
207 'photosets' => esc_html__('Photosets', 'photonic'),
208 'galleries' => esc_html__('Galleries', 'photonic'),
209 'collections' => esc_html__('Collections', 'photonic'),
210 'photo' => esc_html__('Single Photo', 'photonic'),
211 ],
212 'req' => true,
213 ],
214
215 [
216 'id' => 'photoset_id',
217 'name' => esc_html__('Album ID (Photoset ID)', 'photonic'),
218 'type' => 'text',
219 'hint' => esc_html__('Will show a single photoset if "Display" is set to "Photosets"', 'photonic')
220 ],
221
222 [
223 'id' => 'gallery_id',
224 'name' => esc_html__('Gallery ID', 'photonic'),
225 'type' => 'text',
226 'hint' => esc_html__('Will show a single gallery if "Display" is set to "Galleries"', 'photonic')
227 ],
228
229 [
230 'id' => 'collection_id',
231 'name' => esc_html__('Collection ID', 'photonic'),
232 'type' => 'text',
233 'hint' => esc_html__('Will show contents of a single collection if "Display" is set to "Collections"', 'photonic')
234 ],
235
236 [
237 'id' => 'photo_id',
238 'name' => esc_html__('Photo ID', 'photonic'),
239 'type' => 'text',
240 'hint' => esc_html__('Will show a single photo if "Display" is set to "Single Photo"', 'photonic')
241 ],
242
243 [
244 'id' => 'filter',
245 'name' => esc_html__('Filter', 'photonic'),
246 'type' => 'text',
247 'hint' => esc_html__('If "Display" is "Photosets" or "Galleries" or "Collections" and you provide a comma-separated list of values here, these entities will be included / excluded based on the next option. Useful if you want to display a single thumbnail for a single photoset / gallery, ignored if Photoset, Gallery or Collection ID is provided', 'photonic')
248 ],
249
250 [
251 'id' => 'filter_type',
252 'name' => esc_html__('Filter Type', 'photonic'),
253 'type' => 'select',
254 'options' => [
255 '' => '',
256 'include' => esc_html__('Include above list in results', 'photonic'),
257 'exclude' => esc_html__('Exclude above list from results', 'photonic'),
258 ],
259 ],
260
261 [
262 'id' => 'media',
263 'name' => esc_html__('Media to Show', 'photonic'),
264 'type' => 'select',
265 'options' => Utilities::media_options(),
266 'std' => $photonic_flickr_media,
267 ],
268
269 [
270 'id' => 'columns',
271 'name' => esc_html__('Number of columns', 'photonic'),
272 'type' => 'text',
273 ],
274
275 [
276 'id' => 'tags',
277 'name' => esc_html__('Tags', 'photonic'),
278 'type' => 'text',
279 'hint' => esc_html__('Comma-separated list of tags', 'photonic')
280 ],
281
282 [
283 'id' => 'tag_mode',
284 'name' => esc_html__('Tag mode', 'photonic'),
285 'type' => 'select',
286 'options' => [
287 'any' => esc_html__('Any tag', 'photonic'),
288 'all' => esc_html__('All tags', 'photonic'),
289 ],
290 ],
291
292 [
293 'id' => 'text',
294 'name' => esc_html__('With text', 'photonic'),
295 'type' => 'text',
296 ],
297
298 [
299 'id' => 'sort',
300 'name' => esc_html__('Sort by', 'photonic'),
301 'type' => 'select',
302 'options' => [
303 'date-posted-desc' => esc_html__('Date posted, descending', 'photonic'),
304 'date-posted-asc' => esc_html__('Date posted, ascending', 'photonic'),
305 'date-taken-asc' => esc_html__('Date taken, ascending', 'photonic'),
306 'date-taken-desc' => esc_html__('Date taken, descending', 'photonic'),
307 'interestingness-desc' => esc_html__('Interestingness, descending', 'photonic'),
308 'interestingness-asc' => esc_html__('Interestingness, ascending', 'photonic'),
309 'relevance' => esc_html__('Relevance', 'photonic'),
310 ],
311 ],
312
313 [
314 'id' => 'group_id',
315 'name' => esc_html__('Group ID', 'photonic'),
316 'type' => 'text',
317 ],
318
319 [
320 'id' => 'per_page',
321 'name' => esc_html__('Number of photos / albums / galleries to show', 'photonic'),
322 'type' => 'text',
323 'hint' => esc_html__('Will show at the most 100 by default, 500 is the maximum', 'photonic'),
324 'alt_id' => 'count',
325 ],
326
327 [
328 'id' => 'more',
329 'name' => esc_html__('"More" button text', 'photonic'),
330 'type' => 'text',
331 'hint' => esc_html__('Will show a "More" button with the specified text if the number of photos / albums / galleries is higher than the above entry. Leave blank to show no button', 'photonic'),
332 ],
333
334 [
335 'id' => 'photo_count',
336 'name' => esc_html__('Number of photos to show in overlaid popup', 'photonic'),
337 'type' => 'text',
338 'hint' => sprintf(esc_html__('Applicable for pagination if %1$s is selected. Leave blank to show maximum allowed photos.', 'photonic'), '<strong>Photonic &rarr; Settings &rarr; Generic Options &rarr; Overlaid Popup Panel &rarr; Enable Interim Popup for Album Thumbnails</strong>'),
339 ],
340
341 [
342 'id' => 'photo_more',
343 'name' => esc_html__('"More" button text in overlaid popup', 'photonic'),
344 'type' => 'text',
345 'hint' => sprintf(esc_html__('Applicable for pagination if %1$s is selected. Will show a "More" button with the specified text if the number of photos is higher than the above entry. Leave blank to show no button.', 'photonic'), '<strong>Photonic &rarr; Settings &rarr; Generic Options &rarr; Overlaid Popup Panel &rarr; Enable Interim Popup for Album Thumbnails</strong>'),
346 ],
347
348 [
349 'id' => 'privacy_filter',
350 'name' => esc_html__('Privacy filter', 'photonic'),
351 'type' => 'select',
352 'options' => [
353 '' => esc_html__('None', 'photonic'),
354 '1' => esc_html__('Public photos', 'photonic'),
355 '2' => esc_html__('Private photos visible to friends', 'photonic'),
356 '3' => esc_html__('Private photos visible to family', 'photonic'),
357 '4' => esc_html__('Private photos visible to friends & family', 'photonic'),
358 '5' => esc_html__('Completely private photos', 'photonic'),
359 ],
360 'hint' => esc_html__('Applicable only if Flickr private photos are turned on', 'photonic'),
361 ],
362
363 [
364 'id' => 'layout',
365 'name' => esc_html__('Layout', 'photonic'),
366 'type' => 'select',
367 'options' => Utilities::layout_options(),
368 'hint' => esc_html__('The first four options trigger a slideshow, the rest trigger a lightbox.', 'photonic'),
369 'std' => $this->default_layout,
370 ],
371
372 [
373 'id' => 'caption',
374 'name' => esc_html__('Photo title / caption', 'photonic'),
375 'type' => 'select',
376 'options' => Utilities::title_caption_options(),
377 'std' => $photonic_flickr_title_caption,
378 'hint' => esc_html__('This will be used as the title for your photos.', 'photonic'),
379 ],
380
381 [
382 'id' => 'thumb_size',
383 'name' => esc_html__('Thumbnail size', 'photonic'),
384 'type' => 'select',
385 'std' => $photonic_flickr_thumb_size,
386 "options" => [
387 's' => esc_html__('Small square, 75x75px', 'photonic'),
388 'q' => esc_html__('Large square, 150x150px', 'photonic'),
389 't' => esc_html__('Thumbnail, 100px on longest side', 'photonic'),
390 'm' => esc_html__('Small, 240px on longest side', 'photonic'),
391 'n' => esc_html__('Small, 320px on longest side', 'photonic'),
392 ],
393 'hint' => esc_html__('In pixels, only applicable to square and circular thumbnails', 'photonic')
394 ],
395
396 [
397 'id' => 'main_size',
398 'name' => esc_html__('Main image size', 'photonic'),
399 'type' => 'select',
400 'std' => $photonic_flickr_main_size,
401 'options' => [
402 'none' => esc_html__('Medium, 500px on the longest side', 'photonic'),
403 'z' => esc_html__('Medium, 640px on longest side', 'photonic'),
404 'c' => esc_html__('Medium, 800px on longest side', 'photonic'),
405 'b' => esc_html__('Large, 1024px on longest side', 'photonic'),
406 'h' => esc_html__('Large, 1600px on longest side', 'photonic'),
407 'k' => esc_html__('Large, 2048px on longest side', 'photonic'),
408 'o' => esc_html__('Original', 'photonic'),
409 ],
410 ],
411
412 [
413 'id' => 'collections_display',
414 'name' => esc_html__('Expand Collections', 'photonic'),
415 'type' => 'select',
416 'options' => [
417 '' => '',
418 'lazy' => esc_html__('Lazy loading', 'photonic'),
419 'expanded' => esc_html__('Expanded upfront', 'photonic'),
420 ],
421 'hint' => sprintf(esc_html__('The Collections API is slow, so, if you are displaying collections, pick %1$slazy loading%2$s if your collections have many albums / photosets.', 'photonic'), '<a href="https://aquoid.com/plugins/photonic/flickr/flickr-collections/">', '</a>'),
422 ],
423
424 [
425 'id' => 'fx',
426 'name' => esc_html__('Slideshow Effects', 'photonic'),
427 'type' => 'select',
428 'options' => [
429 '' => '',
430 'fade' => esc_html__('Fade', 'photonic'),
431 'slide' => esc_html__('Slide', 'photonic'),
432 ],
433 'std' => '',
434 'hint' => esc_html__('Applies to slideshows only', 'photonic')
435 ],
436
437 [
438 'id' => 'controls',
439 'name' => esc_html__('Slideshow Controls', 'photonic'),
440 'type' => 'select',
441 'options' => [
442 '' => '',
443 'hide' => esc_html__('Hide', 'photonic'),
444 'show' => esc_html__('Show', 'photonic'),
445 ],
446 'hint' => esc_html__('Shows Previous and Next buttons on the slideshow.', 'photonic'),
447 ],
448
449 [
450 'id' => 'timeout',
451 'name' => esc_html__('Time between slides in ms', 'photonic'),
452 'type' => 'text',
453 'std' => '',
454 'hint' => esc_html__('Applies to slideshows only', 'photonic')
455 ],
456
457 [
458 'id' => 'speed',
459 'name' => esc_html__('Time for each transition in ms', 'photonic'),
460 'type' => 'text',
461 'std' => '',
462 'hint' => esc_html__('Applies to slideshows only', 'photonic')
463 ],
464 ],
465 ];
466 }
467
468 private function get_google_fields() {
469 global $photonic_google_media;
470 return [
471 'name' => esc_html__('Google Photos', 'photonic'),
472 'prelude' => sprintf(esc_html__('Documentation: %2$sOverall%1$s | %3$sPhotos%1$s | %4$sAlbums%1$s', 'photonic'),
473 '</a>',
474 '<a href="https://aquoid.com/plugins/photonic/google-photos/" target="_blank">',
475 '<a href="https://aquoid.com/plugins/photonic/google-photos/photos/" target="_blank">',
476 '<a href="https://aquoid.com/plugins/photonic/google-photos/albums/" target="_blank">'),
477 'fields' => [
478 [
479 'id' => 'view',
480 'name' => esc_html__('Display', 'photonic'),
481 'type' => 'select',
482 'options' => [
483 'albums' => esc_html__('Albums', 'photonic'),
484 'photos' => esc_html__('Photos', 'photonic'),
485 ],
486 'hint' => esc_html__('Pick "Albums" if you want to display a collection of albums. Pick "Photos" if you want to display photos from a single album or from your photo-stream.', 'photonic')
487 ],
488
489 [
490 'id' => 'album_id',
491 'name' => esc_html__('Album', 'photonic'),
492 'type' => 'text',
493 'hint' => sprintf(esc_html__('Applicable if "Display" is "Photos" and you want to show photos from an album. See %1$shere%2$s for more details.', 'photonic'), '<a href="https://aquoid.com/plugins/photonic/google-photos/albums/">', '</a>')
494 ],
495
496 [
497 'id' => 'access',
498 'name' => esc_html__('Displayed Access Levels', 'photonic'),
499 'type' => 'select',
500 'options' => [
501 '' => '',
502 'all' => esc_html__('Show all shared and not shared albums', 'photonic'),
503 'shared' => esc_html__('Only show shared albums', 'photonic'),
504 'not-shared' => esc_html__('Only show albums not shared', 'photonic'),
505 ],
506 'std' => '',
507 'hint' => sprintf(esc_html__('If "Display" is "Albums" you can decide to show shared or not-shared albums. See %1$shere%2$s for more details.', 'photonic'), '<a href="https://aquoid.com/plugins/photonic/google-photos/albums/">', '</a>')
508 ],
509
510 [
511 'id' => 'filter',
512 'name' => esc_html__('Album Filter', 'photonic'),
513 'type' => 'text',
514 'hint' => esc_html__('If "Display" is "Albums" and you provide a comma-separated list of values here, these entities will be included / excluded based on the next option. Useful if you want to display thumbnails for certain albums only, ignored if an album id is provided above', 'photonic')
515 ],
516
517 [
518 'id' => 'filter_type',
519 'name' => esc_html__('Album Filter Type', 'photonic'),
520 'type' => 'select',
521 'options' => [
522 '' => '',
523 'include' => esc_html__('Include above list in results', 'photonic'),
524 'exclude' => esc_html__('Exclude above list from results', 'photonic'),
525 ],
526 ],
527
528 [
529 'id' => 'date_filters',
530 'name' => esc_html__('Date Filters', 'photonic'),
531 'type' => 'text',
532 'hint' => sprintf(esc_html__('Applicable only if "Display" is "Photos". You can provide a comma-separated list of dates and ranges in the format %1$sY/M/D%2$s or %1$sY/M/D-Y/M/D%2$s.', 'photonic'),
533 '<code>', '</code>')
534 ],
535
536 [
537 'id' => 'content_filters',
538 'name' => esc_html__('Content Filters', 'photonic'),
539 'type' => 'text',
540 'hint' => sprintf(esc_html__('Applicable only if "Display" is "Photos". You can provide a comma-separated list of categories from %s.', 'photonic'),
541 'NONE, LANDSCAPES, RECEIPTS, CITYSCAPES, LANDMARKS, SELFIES, PEOPLE, PETS, WEDDINGS, BIRTHDAYS, DOCUMENTS, TRAVEL, ANIMALS, FOOD, SPORT, NIGHT, PERFORMANCES, WHITEBOARDS, SCREENSHOTS, UTILITY')
542 ],
543
544 [
545 'id' => 'media',
546 'name' => esc_html__('Media to Show', 'photonic'),
547 'type' => 'select',
548 'options' => Utilities::media_options(),
549 'std' => $photonic_google_media,
550 ],
551
552 [
553 'id' => 'count',
554 'name' => esc_html__('Number of photos / albums to show', 'photonic'),
555 'type' => 'text',
556 ],
557
558 [
559 'id' => 'more',
560 'name' => esc_html__('"More" button text', 'photonic'),
561 'type' => 'text',
562 'hint' => esc_html__('Will show a "More" button with the specified text if the number of photos / albums is higher than the above entry. Leave blank to show no button', 'photonic'),
563 ],
564
565 [
566 'id' => 'photo_count',
567 'name' => esc_html__('Number of photos to show in overlaid popup', 'photonic'),
568 'type' => 'text',
569 'hint' => sprintf(esc_html__('Applicable for pagination if %s is selected. Leave blank to show maximum allowed photos.', 'photonic'), '<strong>Photonic &rarr; Settings &rarr; Generic Options &rarr; Overlaid Popup Panel &rarr; Enable Interim Popup for Album Thumbnails</strong>'),
570 ],
571
572 [
573 'id' => 'photo_more',
574 'name' => esc_html__('"More" button text in overlaid popup', 'photonic'),
575 'type' => 'text',
576 'hint' => sprintf(esc_html__('Applicable for pagination if %s is selected. Will show a "More" button with the specified text if the number of photos is higher than the above entry. Leave blank to show no button.', 'photonic'), '<strong>Photonic &rarr; Settings &rarr; Generic Options &rarr; Overlaid Popup Panel &rarr; Enable Interim Popup for Album Thumbnails</strong>'),
577 ],
578
579 [
580 'id' => 'layout',
581 'name' => esc_html__('Layout', 'photonic'),
582 'type' => 'select',
583 'options' => Utilities::layout_options(),
584 'hint' => esc_html__('The first four options trigger a slideshow, the rest trigger a lightbox.', 'photonic'),
585 'std' => $this->default_layout,
586 ],
587
588 [
589 'id' => 'thumb_size',
590 'name' => esc_html__('Thumbnail size', 'photonic'),
591 'type' => 'text',
592 'std' => 150,
593 'hint' => esc_html__('In pixels, only applicable to square and circular thumbnails. Permitted values: 32, 48, 64, 72, 104, 144, 150, 160.', 'photonic')
594 ],
595
596 [
597 'id' => 'crop_thumb',
598 'name' => esc_html__('Crop Thumbnail', 'photonic'),
599 'type' => 'select',
600 'options' => [
601 'crop' => esc_html__('Crop the thumbnail', 'photonic'),
602 'no-crop' => esc_html__('Do not crop the thumbnail', 'photonic'),
603 ],
604 'std' => 'crop',
605 'hint' => esc_html__('Cropping the thumbnail presents you with a square thumbnail.', 'photonic')
606 ],
607
608 [
609 'id' => 'main_size',
610 'name' => esc_html__('Main image size', 'photonic'),
611 'type' => 'text',
612 'std' => 1600,
613 'hint' => esc_html__('Numeric values between 1 and 16383, both inclusive.', 'photonic')
614 ],
615
616 [
617 'id' => 'tile_size',
618 'name' => esc_html__('Tile image size', 'photonic'),
619 'type' => 'text',
620 'std' => 1600,
621 'hint' => esc_html__('Numeric values between 1 and 16383, both inclusive. Leave blank to use the "Main image size".', 'photonic')
622 ],
623
624 [
625 'id' => 'fx',
626 'name' => esc_html__('Slideshow Effects', 'photonic'),
627 'type' => 'select',
628 'options' => [
629 '' => '',
630 'fade' => esc_html__('Fade', 'photonic'),
631 'slide' => esc_html__('Slide', 'photonic'),
632 ],
633 'std' => '',
634 'hint' => esc_html__('Applies to slideshows only', 'photonic')
635 ],
636
637 [
638 'id' => 'controls',
639 'name' => esc_html__('Slideshow Controls', 'photonic'),
640 'type' => 'select',
641 'options' => [
642 '' => '',
643 'hide' => esc_html__('Hide', 'photonic'),
644 'show' => esc_html__('Show', 'photonic'),
645 ],
646 'hint' => esc_html__('Shows Previous and Next buttons on the slideshow.', 'photonic'),
647 ],
648
649 [
650 'id' => 'timeout',
651 'name' => esc_html__('Time between slides in ms', 'photonic'),
652 'type' => 'text',
653 'std' => '',
654 'hint' => esc_html__('Applies to slideshows only', 'photonic')
655 ],
656
657 [
658 'id' => 'speed',
659 'name' => esc_html__('Time for each transition in ms', 'photonic'),
660 'type' => 'text',
661 'std' => '',
662 'hint' => esc_html__('Applies to slideshows only', 'photonic')
663 ],
664 ],
665 ];
666 }
667
668 private function get_smugmug_fields() {
669 global $photonic_smug_title_caption, $photonic_smug_thumb_size, $photonic_smug_main_size, $photonic_smug_media;
670 return [
671 'name' => esc_html__('SmugMug', 'photonic'),
672 'prelude' => sprintf(esc_html__('You have to define your SmugMug API Key under %1$s.%2$s Documentation: %4$sOverall%3$s | %5$sPhotos%3$s | %6$sAlbums%3$s | %7$sFolders%3$s | %8$sUser Tree%3$s', 'photonic'),
673 '<strong>Photonic &rarr; Settings &rarr; SmugMug &rarr; SmugMug Settings</strong>',
674 '<br/>', '</a>',
675 '<a href="https://aquoid.com/plugins/photonic/smugmug/" target="_blank">',
676 '<a href="https://aquoid.com/plugins/photonic/smugmug/smugmug-photos/" target="_blank">',
677 '<a href="https://aquoid.com/plugins/photonic/smugmug/smugmug-albums/" target="_blank">',
678 '<a href="https://aquoid.com/plugins/photonic/smugmug/folders/" target="_blank">',
679 '<a href="https://aquoid.com/plugins/photonic/smugmug/smugmug-tree/" target="_blank">'),
680 'fields' => [
681 [
682 'id' => 'view',
683 'name' => esc_html__('Display', 'photonic'),
684 'type' => 'select',
685 'options' => [
686 'tree' => esc_html__('Tree', 'photonic'),
687 'albums' => esc_html__('All albums', 'photonic'),
688 'album' => esc_html__('Single Album', 'photonic'),
689 'folder' => esc_html__('Single Folder', 'photonic'),
690 ],
691 'req' => true,
692 ],
693
694 [
695 'id' => 'nick_name',
696 'name' => esc_html__('Nickname', 'photonic'),
697 'type' => 'text',
698 'hint' => esc_html__('If your SmugMug URL is http://joe-sixpack.smugmug.com, this is "joe-sixpack". Required if the "Display" is "Tree" or "All albums".', 'photonic')
699 ],
700
701 [
702 'id' => 'site_password',
703 'name' => esc_html__('Site Password', 'photonic'),
704 'type' => 'text',
705 'hint' => esc_html__('Required if your entire SmugMug site is password-protected. See documentation link for "Albums" above.', 'photonic')
706 ],
707
708 [
709 'id' => 'album',
710 'name' => esc_html__('Album', 'photonic'),
711 'type' => 'text',
712 'hint' => sprintf(esc_html__('Required if you are showing "Single Album" above. To find this, go to %s on your dashboard and find the albums for your nickname.', 'photonic'), '<strong>Photonic &rarr; Helpers &rarr; SmugMug</strong>')
713 ],
714
715 [
716 'id' => 'filter',
717 'name' => esc_html__('Filter', 'photonic'),
718 'type' => 'text',
719 'hint' => esc_html__('If "Display" is "All albums" and you provide a comma-separated list of album keys here, these entities will be included / excluded based on the next option. Useful if you want to display thumbnails for certain albums only, ignored if an album is provided above', 'photonic')
720 ],
721
722 [
723 'id' => 'filter_type',
724 'name' => esc_html__('Filter Type', 'photonic'),
725 'type' => 'select',
726 'options' => [
727 '' => '',
728 'include' => esc_html__('Include above list in results', 'photonic'),
729 'exclude' => esc_html__('Exclude above list from results', 'photonic'),
730 ],
731 ],
732
733 [
734 'id' => 'text',
735 'name' => esc_html__('Photos with text', 'photonic'),
736 'type' => 'text',
737 'hint' => esc_html__('Will show photos with the specified text. Leave blank for no filter.', 'photonic')
738 ],
739
740 [
741 'id' => 'keywords',
742 'name' => esc_html__('Photos with keywords', 'photonic'),
743 'type' => 'text',
744 'hint' => esc_html__('Will show photos with the specified keywords. Leave blank for no filter.', 'photonic')
745 ],
746
747 [
748 'id' => 'media',
749 'name' => esc_html__('Media to Show', 'photonic'),
750 'type' => 'select',
751 'options' => Utilities::media_options(),
752 'std' => $photonic_smug_media,
753 ],
754
755 [
756 'id' => 'password',
757 'name' => esc_html__('Album Password', 'photonic'),
758 'type' => 'text',
759 'hint' => esc_html__('Required if you are showing "Single Album" above, and if your album is password-protected. See documentation link for "Photos" above.', 'photonic')
760 ],
761
762 [
763 'id' => 'album_sort_order',
764 'name' => esc_html__('Album sort order', 'photonic'),
765 'type' => 'select',
766 'options' => [
767 'Album Settings' => esc_html__('Album Settings', 'photonic'),
768 'Position' => esc_html__('Position', 'photonic'),
769 'Last Updated (Descending)' => esc_html__('Last Updated (Descending)', 'photonic'),
770 'Last Updated (Ascending)' => esc_html__('Last Updated (Ascending)', 'photonic'),
771 'Date Added (Descending)' => esc_html__('Date Added (Descending)', 'photonic'),
772 'Date Added (Ascending)' => esc_html__('Date Added (Ascending)', 'photonic'),
773 ],
774 'std' => 'Album Settings',
775 'hint' => esc_html__('If you are displaying multiple albums the results are sorted by this parameter', 'photonic'),
776 ],
777
778 [
779 'id' => 'folder',
780 'name' => esc_html__('Folder', 'photonic'),
781 'type' => 'text',
782 'hint' => sprintf(esc_html__('Required if you are showing "Single Folder" above. To find this, go to %s on your dashboard and find the folders for your nickname.', 'photonic'), '<strong>Photonic &rarr; Helpers &rarr; SmugMug</strong>')
783 ],
784
785 [
786 'id' => 'layout',
787 'name' => esc_html__('Layout', 'photonic'),
788 'type' => 'select',
789 'options' => Utilities::layout_options(),
790 'hint' => esc_html__('The first four options trigger a slideshow, the rest trigger a lightbox.', 'photonic'),
791 'std' => $this->default_layout,
792 ],
793
794 [
795 'id' => 'caption',
796 'name' => esc_html__('Photo title / caption', 'photonic'),
797 'type' => 'select',
798 'options' => Utilities::title_caption_options(),
799 'std' => $photonic_smug_title_caption,
800 'hint' => esc_html__('This will be used as the title for your photos.', 'photonic'),
801 ],
802
803 [
804 'id' => 'thumb_size',
805 'name' => esc_html__('Thumbnail size', 'photonic'),
806 'type' => 'select',
807 'std' => $photonic_smug_thumb_size,
808 "options" => [
809 'Tiny' => esc_html__('Tiny', 'photonic'),
810 'Thumb' => esc_html__('Thumb', 'photonic'),
811 'Small' => esc_html__('Small', 'photonic'),
812 ],
813 'hint' => esc_html__('In pixels, only applicable to square and circular thumbnails', 'photonic')
814 ],
815
816 [
817 'id' => 'main_size',
818 'name' => esc_html__('Main image size', 'photonic'),
819 'type' => 'select',
820 'std' => $photonic_smug_main_size,
821 'options' => [
822 '4K' => esc_html__('4K (not always available)', 'photonic'),
823 '5K' => esc_html__('5K (not always available)', 'photonic'),
824 'Medium' => esc_html__('Medium', 'photonic'),
825 'Original' => esc_html__('Original (not always available)', 'photonic'),
826 'Large' => esc_html__('Large', 'photonic'),
827 'Largest' => esc_html__('Largest available', 'photonic'),
828 'XLarge' => esc_html__('XLarge (not always available)', 'photonic'),
829 'X2Large' => esc_html__('X2Large (not always available)', 'photonic'),
830 'X3Large' => esc_html__('X3Large (not always available)', 'photonic'),
831 ],
832 ],
833
834 [
835 'id' => 'columns',
836 'name' => esc_html__('Number of columns', 'photonic'),
837 'type' => 'text',
838 ],
839
840 [
841 'id' => 'count',
842 'name' => esc_html__('Number of photos / albums to show', 'photonic'),
843 'type' => 'text',
844 ],
845
846 [
847 'id' => 'more',
848 'name' => esc_html__('"More" button text', 'photonic'),
849 'type' => 'text',
850 'hint' => esc_html__('Will show a "More" button with the specified text if the number of photos / albums is higher than the above entry. Leave blank to show no button', 'photonic'),
851 ],
852
853 [
854 'id' => 'photo_count',
855 'name' => esc_html__('Number of photos to show in overlaid popup', 'photonic'),
856 'type' => 'text',
857 'hint' => sprintf(esc_html__('Applicable for pagination if %s is selected. Leave blank to show maximum allowed photos.', 'photonic'), '<strong>Photonic &rarr; Settings &rarr; Generic Options &rarr; Overlaid Popup Panel &rarr; Enable Interim Popup for Album Thumbnails</strong>'),
858 ],
859
860 [
861 'id' => 'photo_more',
862 'name' => esc_html__('"More" button text in overlaid popup', 'photonic'),
863 'type' => 'text',
864 'hint' => sprintf(esc_html__('Applicable for pagination if %s is selected. Will show a "More" button with the specified text if the number of photos is higher than the above entry. Leave blank to show no button.', 'photonic'), '<strong>Photonic &rarr; Settings &rarr; Generic Options &rarr; Overlaid Popup Panel &rarr; Enable Interim Popup for Album Thumbnails</strong>'),
865 ],
866
867 [
868 'id' => 'fx',
869 'name' => esc_html__('Slideshow Effects', 'photonic'),
870 'type' => 'select',
871 'options' => [
872 '' => '',
873 'fade' => esc_html__('Fade', 'photonic'),
874 'slide' => esc_html__('Slide', 'photonic'),
875 ],
876 'std' => '',
877 'hint' => esc_html__('Applies to slideshows only', 'photonic')
878 ],
879
880 [
881 'id' => 'controls',
882 'name' => esc_html__('Slideshow Controls', 'photonic'),
883 'type' => 'select',
884 'options' => [
885 '' => '',
886 'hide' => esc_html__('Hide', 'photonic'),
887 'show' => esc_html__('Show', 'photonic'),
888 ],
889 'hint' => esc_html__('Shows Previous and Next buttons on the slideshow.', 'photonic'),
890 ],
891
892 [
893 'id' => 'timeout',
894 'name' => esc_html__('Time between slides in ms', 'photonic'),
895 'type' => 'text',
896 'std' => '',
897 'hint' => esc_html__('Applies to slideshows only', 'photonic')
898 ],
899
900 [
901 'id' => 'speed',
902 'name' => esc_html__('Time for each transition in ms', 'photonic'),
903 'type' => 'text',
904 'std' => '',
905 'hint' => esc_html__('Applies to slideshows only', 'photonic')
906 ],
907 ],
908 ];
909 }
910
911 private function get_zenfolio_fields() {
912 global $photonic_zenfolio_title_caption, $photonic_zenfolio_thumb_size, $photonic_zenfolio_main_size, $photonic_zenfolio_media;
913 return [
914 'name' => esc_html__('Zenfolio', 'photonic'),
915 'prelude' => sprintf(esc_html__('Documentation: %2$sOverall%1$s | %3$sPhotos%1$s | %4$sPhotosets%1$s | %5$sGroups%1$s | %6$sGroup Hierarchy%1$s', 'photonic'),
916 '</a>',
917 '<a href="https://aquoid.com/plugins/photonic/zenfolio/" target="_blank">',
918 '<a href="https://aquoid.com/plugins/photonic/zenfolio/photos/" target="_blank">',
919 '<a href="https://aquoid.com/plugins/photonic/zenfolio/photosets/" target="_blank">',
920 '<a href="https://aquoid.com/plugins/photonic/zenfolio/groups/" target="_blank">',
921 '<a href="https://aquoid.com/plugins/photonic/zenfolio/group-hierarchy/" target="_blank">'),
922 'fields' => [
923 [
924 'id' => 'view',
925 'name' => esc_html__('Display', 'photonic'),
926 'type' => 'select',
927 'options' => [
928 'photos' => esc_html__('Photos', 'photonic'),
929 'photosets' => esc_html__('Photosets', 'photonic'),
930 'hierarchy' => esc_html__('Group Hierarchy', 'photonic'),
931 'group' => esc_html__('Group', 'photonic'),
932 ],
933 'req' => true,
934 ],
935
936 [
937 'id' => 'object_id',
938 'name' => esc_html__('Object ID', 'photonic'),
939 'type' => 'text',
940 'hint' => sprintf(esc_html__('Can be set if "Display" is %1$sPhotos%2$s, %1$sPhotosets%2$s or %1$sGroup%2$s.', 'photonic'), '<code>', '</code>'),
941 ],
942
943 [
944 'id' => 'text',
945 'name' => esc_html__('Search by text', 'photonic'),
946 'type' => 'text',
947 'hint' => sprintf(esc_html__('Can be set if "Display" is %1$sPhotos%2$s or %1$sPhotosets%2$s.', 'photonic'), '<code>', '</code>'),
948 ],
949
950 [
951 'id' => 'category_code',
952 'name' => esc_html__('Search by category code', 'photonic'),
953 'type' => 'text',
954 'hint' => sprintf(esc_html__('Can be set if "Display" is %1$sPhotos%2$s or %1$sPhotosets%2$s.', 'photonic'), '<code>', '</code>').'<br/>'.
955 sprintf(esc_html__('See the list of categories from %s.', 'photonic'), '<strong>Photonic &rarr; Helpers</strong>'),
956 ],
957
958 [
959 'id' => 'sort_order',
960 'name' => esc_html__('Search results sort order', 'photonic'),
961 'type' => 'select',
962 'options' => [
963 '' => '',
964 'Date' => esc_html__('Date', 'photonic'),
965 'Popularity' => esc_html__('Popularity', 'photonic'),
966 'Rank' => esc_html__('Rank (for searching by text only)', 'photonic'),
967 ],
968 'hint' => sprintf(esc_html__('Can be set if "Display" is %1$sPhotos%2$s or %1$sPhotosets%2$s.', 'photonic'), '<code>', '</code>').'<br/>'.
969 esc_html__('For search results only.', 'photonic'),
970 ],
971
972 [
973 'id' => 'photoset_type',
974 'name' => esc_html__('Photoset type', 'photonic'),
975 'type' => 'select',
976 'options' => [
977 '' => '',
978 'Gallery' => esc_html__('Gallery', 'photonic'),
979 'Collection' => esc_html__('Collection', 'photonic'),
980 ],
981 'hint' => esc_html__('Mandatory if Display = Photosets and no Object ID is specified.', 'photonic'),
982 ],
983
984 [
985 'id' => 'kind',
986 'name' => esc_html__('Display classification', 'photonic'),
987 'type' => 'select',
988 'options' => [
989 '' => '',
990 'popular' => esc_html__('Popular', 'photonic'),
991 'recent' => esc_html__('Recent', 'photonic'),
992 ],
993 'hint' => sprintf(esc_html__('Mandatory if "Display" is %1$sPhotos%2$s or %1$sPhotosets%2$s, and none of the other criteria above is specified.', 'photonic'), '<code>', '</code>'),
994 ],
995
996 [
997 'id' => 'login_name',
998 'name' => esc_html__('Login name', 'photonic'),
999 'type' => 'text',
1000 'hint' => esc_html__('Mandatory if Display = Hierarchy', 'photonic'),
1001 ],
1002
1003 [
1004 'id' => 'media',
1005 'name' => esc_html__('Media to Show', 'photonic'),
1006 'type' => 'select',
1007 'options' => Utilities::media_options(),
1008 'std' => $photonic_zenfolio_media,
1009 ],
1010
1011 [
1012 'id' => 'layout',
1013 'name' => esc_html__('Layout', 'photonic'),
1014 'type' => 'select',
1015 'options' => Utilities::layout_options(),
1016 'hint' => esc_html__('The first four options trigger a slideshow, the rest trigger a lightbox.', 'photonic'),
1017 'std' => $this->default_layout,
1018 ],
1019
1020 [
1021 'id' => 'structure',
1022 'name' => esc_html__('Group / Hierarchy structure', 'photonic'),
1023 'type' => 'select',
1024 'options' => [
1025 '' => '',
1026 'flat' => esc_html__('All photosets shown in single level', 'photonic'),
1027 'nested' => esc_html__('Photosets shown nested within groups', 'photonic'),
1028 ],
1029 'hint' => esc_html__('Applicable if groups or hierarchies are being displayed.', 'photonic'),
1030 ],
1031
1032 [
1033 'id' => 'caption',
1034 'name' => esc_html__('Photo title / caption', 'photonic'),
1035 'type' => 'select',
1036 'options' => Utilities::title_caption_options(),
1037 'std' => $photonic_zenfolio_title_caption,
1038 'hint' => esc_html__('This will be used as the title for your photos.', 'photonic'),
1039 ],
1040
1041 [
1042 'id' => 'thumb_size',
1043 'name' => esc_html__('Thumbnail size', 'photonic'),
1044 'type' => 'select',
1045 'std' => $photonic_zenfolio_thumb_size,
1046 "options" => [
1047 "1" => esc_html__("Square thumbnail, 60 &times; 60px, cropped square", 'photonic'),
1048 "0" => esc_html__("Small thumbnail, upto 80 &times; 80px", 'photonic'),
1049 "10" => esc_html__("Medium thumbnail, upto 120 &times; 120px", 'photonic'),
1050 "11" => esc_html__("Large thumbnail, upto 120 &times; 120px", 'photonic'),
1051 "2" => esc_html__("Small image, upto 400 &times; 400px", 'photonic'),
1052 ],
1053 'hint' => esc_html__('In pixels, only applicable to square and circular thumbnails', 'photonic')
1054 ],
1055
1056 [
1057 'id' => 'main_size',
1058 'name' => esc_html__('Main image size', 'photonic'),
1059 'type' => 'select',
1060 'std' => $photonic_zenfolio_main_size,
1061 'options' => [
1062 '2' => esc_html__('Small image, upto 400 &times; 400px', 'photonic'),
1063 '3' => esc_html__('Medium image, upto 580 &times; 450px', 'photonic'),
1064 '4' => esc_html__('Large image, upto 800 &times; 630px', 'photonic'),
1065 '5' => esc_html__('X-Large image, upto 1100 &times; 850px', 'photonic'),
1066 '6' => esc_html__('XX-Large image, upto 1550 &times; 960px', 'photonic'),
1067 ],
1068 ],
1069
1070 [
1071 'id' => 'columns',
1072 'name' => esc_html__('Number of columns', 'photonic'),
1073 'type' => 'text',
1074 ],
1075
1076 [
1077 'id' => 'limit',
1078 'name' => esc_html__('Number of photos to show', 'photonic'),
1079 'type' => 'text',
1080 'alt_id' => 'count',
1081 ],
1082
1083 [
1084 'id' => 'more',
1085 'name' => esc_html__('"More" button text', 'photonic'),
1086 'type' => 'text',
1087 'hint' => esc_html__('Will show a "More" button with the specified text if the number of photos is higher than the above entry. Leave blank to show no button', 'photonic'),
1088 ],
1089
1090 [
1091 'id' => 'photo_count',
1092 'name' => esc_html__('Number of photos to show in overlaid popup', 'photonic'),
1093 'type' => 'text',
1094 'hint' => sprintf(esc_html__('Applicable for pagination if %s is selected. Leave blank to show maximum allowed photos.', 'photonic'), '<strong>Photonic &rarr; Settings &rarr; Generic Options &rarr; Overlaid Popup Panel &rarr; Enable Interim Popup for Album Thumbnails</strong>'),
1095 ],
1096
1097 [
1098 'id' => 'photo_more',
1099 'name' => esc_html__('"More" button text in overlaid popup', 'photonic'),
1100 'type' => 'text',
1101 'hint' => sprintf(esc_html__('Applicable for pagination if %s is selected. Will show a "More" button with the specified text if the number of photos is higher than the above entry. Leave blank to show no button.', 'photonic'), '<strong>Photonic &rarr; Settings &rarr; Generic Options &rarr; Overlaid Popup Panel &rarr; Enable Interim Popup for Album Thumbnails</strong>'),
1102 ],
1103
1104 [
1105 'id' => 'fx',
1106 'name' => esc_html__('Slideshow Effects', 'photonic'),
1107 'type' => 'select',
1108 'options' => [
1109 '' => '',
1110 'fade' => esc_html__('Fade', 'photonic'),
1111 'slide' => esc_html__('Slide', 'photonic'),
1112 ],
1113 'std' => '',
1114 'hint' => esc_html__('Applies to slideshows only', 'photonic')
1115 ],
1116
1117 [
1118 'id' => 'controls',
1119 'name' => esc_html__('Slideshow Controls', 'photonic'),
1120 'type' => 'select',
1121 'options' => [
1122 '' => '',
1123 'hide' => esc_html__('Hide', 'photonic'),
1124 'show' => esc_html__('Show', 'photonic'),
1125 ],
1126 'hint' => esc_html__('Shows Previous and Next buttons on the slideshow.', 'photonic'),
1127 ],
1128
1129 [
1130 'id' => 'timeout',
1131 'name' => esc_html__('Time between slides in ms', 'photonic'),
1132 'type' => 'text',
1133 'std' => '',
1134 'hint' => esc_html__('Applies to slideshows only', 'photonic')
1135 ],
1136
1137 [
1138 'id' => 'speed',
1139 'name' => esc_html__('Time for each transition in ms', 'photonic'),
1140 'type' => 'text',
1141 'std' => '',
1142 'hint' => esc_html__('Applies to slideshows only', 'photonic')
1143 ],
1144 ],
1145 ];
1146 }
1147
1148 private function get_instagram_fields() {
1149 global $photonic_instagram_media;
1150 return [
1151 'name' => esc_html__('Instagram', 'photonic'),
1152 'prelude' => sprintf(esc_html__('Documentation: %1$sInstagram%2$s', 'photonic'), '<a href="https://aquoid.com/plugins/photonic/instagram/" target="_blank">', '</a>'),
1153 'fields' => [
1154 [
1155 'id' => 'media_id',
1156 'name' => esc_html__('Media ID', 'photonic'),
1157 'type' => 'text',
1158 'hint' => sprintf(esc_html__('If your photo is at %1$shttps://instagram.com/p/ABcde5678fg/%2$s, your media id is %1$sABcde5678fg%2$s.', 'photonic'), '<code>', '</code>')
1159 ],
1160
1161 [
1162 'id' => 'carousel',
1163 'name' => esc_html__('Instagram Post ID', 'photonic'),
1164 'type' => 'text',
1165 'hint' => sprintf(esc_html__('If your post is at %1$shttps://instagram.com/p/ABcde5678fg/%2$s, your post id is %1$sABcde5678fg%2$s.', 'photonic'), '<code>', '</code>')
1166 ],
1167
1168 [
1169 'id' => 'layout',
1170 'name' => esc_html__('Layout', 'photonic'),
1171 'type' => 'select',
1172 'options' => Utilities::layout_options(),
1173 'hint' => esc_html__('The first four options trigger a slideshow, the rest trigger a lightbox.', 'photonic'),
1174 'std' => $this->default_layout,
1175 ],
1176
1177 [
1178 'id' => 'media',
1179 'name' => esc_html__('Media to Show', 'photonic'),
1180 'type' => 'select',
1181 'options' => Utilities::media_options(),
1182 'std' => $photonic_instagram_media,
1183 ],
1184
1185 [
1186 'id' => 'columns',
1187 'name' => esc_html__('Number of columns', 'photonic'),
1188 'type' => 'text',
1189 ],
1190
1191 [
1192 'id' => 'count',
1193 'name' => esc_html__('Number of photos to show', 'photonic'),
1194 'type' => 'text',
1195 ],
1196
1197 [
1198 'id' => 'more',
1199 'name' => esc_html__('"More" button text', 'photonic'),
1200 'type' => 'text',
1201 'hint' => esc_html__('Will show a "More" button with the specified text if the number of photos is higher than the above entry. Leave blank to show no button', 'photonic'),
1202 ],
1203
1204 [
1205 'id' => 'fx',
1206 'name' => esc_html__('Slideshow Effects', 'photonic'),
1207 'type' => 'select',
1208 'options' => [
1209 '' => '',
1210 'fade' => esc_html__('Fade', 'photonic'),
1211 'slide' => esc_html__('Slide', 'photonic'),
1212 ],
1213 'std' => '',
1214 'hint' => esc_html__('Applies to slideshows only', 'photonic')
1215 ],
1216
1217 [
1218 'id' => 'controls',
1219 'name' => esc_html__('Slideshow Controls', 'photonic'),
1220 'type' => 'select',
1221 'options' => [
1222 '' => '',
1223 'hide' => esc_html__('Hide', 'photonic'),
1224 'show' => esc_html__('Show', 'photonic'),
1225 ],
1226 'hint' => esc_html__('Shows Previous and Next buttons on the slideshow.', 'photonic'),
1227 ],
1228
1229 [
1230 'id' => 'timeout',
1231 'name' => esc_html__('Time between slides in ms', 'photonic'),
1232 'type' => 'text',
1233 'std' => '',
1234 'hint' => esc_html__('Applies to slideshows only', 'photonic')
1235 ],
1236
1237 [
1238 'id' => 'speed',
1239 'name' => esc_html__('Time for each transition in ms', 'photonic'),
1240 'type' => 'text',
1241 'std' => '',
1242 'hint' => esc_html__('Applies to slideshows only', 'photonic')
1243 ],
1244 ],
1245 ];
1246 }
1247
1248 static function get_image_sizes_selection($element_name, $show_full = false) {
1249 $image_sizes = Utilities::get_wp_image_sizes($show_full);
1250 $ret = "<select name='$element_name'>";
1251 foreach ($image_sizes as $size_name => $size_attrs) {
1252 $ret .= "<option value='$size_name'>$size_name ({$size_attrs['width']} &times; {$size_attrs['height']})</option>";
1253 }
1254 $ret .= '</select>';
1255 return $ret;
1256 }
1257 }
1258