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