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

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

634 lines 32.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Photonic_Plugin\Options;
4
5 use Photonic_Plugin\Core\Utilities;
6
7 class Generic extends Option_Tab {
8 protected function __construct() {
9 $this->options = [
10 [
11 'name' => 'How To',
12 'desc' => 'Control generic settings for the plugin',
13 'category' => 'generic-how-to',
14 'buttons' => 'no-buttons',
15 'type' => 'section',
16 ],
17
18 [
19 'name' => 'Creating a gallery',
20 'desc' => "Photonic lets you create a gallery via a <strong><em>Gutenberg Block</em></strong>:<br/><br/>
21 <img src='" . PHOTONIC_URL . "screenshot-1.png' style='max-width: 300px;' alt='Gutenberg Block'/><br/><br/>
22 Alternatively, if you are using the <strong><em>Classic Editor</em></strong> you can use the <em>Add / Edit Photonic Gallery</em> button:<br/><br/>
23 <img src='" . PHOTONIC_URL . "screenshot-2.jpg' style='max-width: 300px;' alt='Add / Edit Button'/><br/><br/>
24 You will be presented with the following:<br/><br/>
25 <img src='" . PHOTONIC_URL . "screenshot-3.png' style='max-width: 500px;' alt='Wizard' />",
26 'grouping' => 'generic-how-to',
27 'type' => 'blurb',
28 ],
29
30 [
31 'name' => 'Generic settings',
32 'desc' => 'Control generic settings for the plugin',
33 'category' => 'generic-settings',
34 'type' => 'section',
35 ],
36
37 [
38 'name' => 'Custom Shortcode',
39 'desc' => 'If you are using the <strong><em>Classic Editor</em></strong> by default Photonic uses the <code>gallery</code> shortcode,
40 so that your galleries stay safe if you stop using Photonic.
41 But your theme or other plugins might be using the same shortcode too. In such a case define an explicit shortcode,
42 and only this shortcode will show Photonic galleries',
43 'id' => 'alternative_shortcode',
44 'grouping' => 'generic-settings',
45 'type' => 'text'
46 ],
47
48 [
49 'name' => "Inbuilt Lightbox libraries",
50 'desc' => "Photonic lets you choose from the following JS libraries for Lightbox effects:",
51 'id' => 'slideshow_library',
52 'grouping' => 'generic-settings',
53 'type' => 'radio-group',
54 'options' => [
55 'js' => [
56 'header' => 'Pure JavaScript Libraries',
57 'description' => "<p>These libraries are self-contained and don't require any additional dependencies. Many modern themes are moving away from jQuery, so if you have such a theme, one of these libraries is great for your site's speed.</p><br/>",
58 'options' => [
59 'baguettebox' => "<a href='https://feimosi.github.io/baguetteBox.js/'>BaguetteBox</a> &ndash; ~10KB JS, ~4KB CSS: Released under the MIT license. No support for YouTube / Vimeo.",
60 'bigpicture' => "<a href='https://henrygd.me/bigpicture/'>BigPicture</a> &ndash; ~9KB JS, no CSS: Released under the MIT license. No support for videos within galleries.",
61 'glightbox' => "<a href='https://biati-digital.github.io/glightbox/'>\"Gie\" Lightbox (GLightbox)</a> &ndash; ~54KB JS, ~14KB CSS: Released under the MIT license.",
62 'lightgallery' => "<a href='https://www.lightgalleryjs.com/'>Lightgallery</a> &ndash; ~55KB JS (+ Optional plugins), ~24KB CSS, ~26KB fonts: Released under the GPL v3 license.",
63 'photoswipe' => "<a href='https://github.com/dimsemenov/PhotoSwipe/tree/v4.1.3'>PhotoSwipe</a> &ndash; ~41KB JS, ~11KB CSS: Released under the MIT license. No video support for Flickr.",
64 'photoswipe5' => "<a href='https://photoswipe.com/'>PhotoSwipe 5</a> &ndash; ~66KB JS, ~5KB CSS: Released under the MIT license. No support for old browsers, no video support for Flickr.",
65 'spotlight' => "<a href='https://nextapps-de.github.io/spotlight/'>Spotlight</a> &ndash; ~10KB JS, ~12KB CSS: Released under the Apache 2.0 license.",
66 'venobox' => '<a href="https://veno.es/venobox/">VenoBox</a> &ndash; ~16KB JS, ~15KB CSS: Released under the MIT license.',
67 ],
68 ],
69 'jquery' => [
70 'header' => 'jQuery Libraries',
71 'description' => "<p>These libraries will automatically load the jQuery library (<strong>~95KB</strong>) to function. This is probably OK if your theme or other plugins are already using jQuery.</p><br/>",
72 'options' => [
73 'colorbox' => "<a href='https://www.jacklmoore.com/colorbox/'>Colorbox</a> &ndash; ~12KB JS, ~5KB CSS: Released under the MIT license.",
74 'fancybox3' => "<a href='https://fancyapps.com/fancybox/3/'>FancyBox 3</a> &ndash; ~67KB JS, ~16KB CSS: Released under the GPL v3 license.",
75 'featherlight' => "<a href='https://noelboss.github.io/featherlight/'>Featherlight</a> &ndash; ~13KB JS, ~5KB CSS: Released under the MIT license.",
76 'imagelightbox' => "<a href='https://osvaldas.info/image-lightbox-responsive-touch-friendly'>Image Lightbox</a> &ndash; ~6KB JS, ~5KB CSS: Released under the MIT license. No video support.",
77 'lightcase' => "<a href='https://cornel.bopp-art.com/lightcase/'>LightCase</a> &ndash; ~26KB JS, ~14KB CSS: Released under the GPL license.",
78 'swipebox' => "<a href='https://brutaldesign.github.io/swipebox/'>Swipebox</a> &ndash; ~12KB, ~5KB CSS: Released under the MIT license.",
79 'thickbox' => "Thickbox &ndash; ~12KB: Released under the MIT license. No video support.",
80 ],
81 ],
82 'others' => [
83 'header' => 'Others',
84 'options' => [
85 'none' => "None &ndash; If you don't want to use a lightbox, pick this option.",
86 'custom' => "Non-bundled &ndash; You have to provide the JS and CSS links in the next option. See <a href='https://aquoid.com/plugins/photonic/third-party-lightboxes/'>here</a> for instructions",
87 ],
88 ],
89 ]
90 ],
91
92 [
93 'name' => "Non-bundled Lightbox libraries",
94 'desc' => "If you don't like the above libraries, you can try one of the following. These are not distributed with the plugin for various reasons,
95 predominant being licensing restrictions and lack of maintenance. <strong>Photonic doesn't support installation of these scripts</strong>. If you want to use them,
96 you will need to specify their JS and CSS files in subsequent options, unless they come bundled with your theme.",
97 'id' => 'custom_lightbox',
98 'grouping' => 'generic-settings',
99 'type' => 'radio-group',
100 'options' => [
101 'non-gpl' => [
102 'header' => 'Not GPL-Compatible',
103 'description' => "<p>These cannot be distributed with Photonic due to licensing restrictions. However, you are free to download them from their websites as long as you adhere to their terms of service.</p><br/>",
104 'options' => [
105 'fancybox2' => "<a href='https://fancyapps.com/fancybox/'>FancyBox 2</a>: Released under the CC-BY-NC 3.0 license",
106 // 'fancybox4' => "<a href='https://fancyapps.com/'>FancyBox 4</a>: Released under a proprietary license that prevents redistribution. Use the UMD version of the JS file from <a href='https://github.com/fancyapps/ui/tree/main/dist'>here</a>.",
107 ],
108 ],
109 'obsolete' => [
110 'header' => 'Obsolete',
111 'description' => "<p>The developers of the following have not updated these libraries for several years. It is possible that your theme or another plugin is offering it, or you may download them off the web.
112 <strong style='color: red'>However, it is strongly recommended that you don't use these due to potential security concerns.</strong> Use the suggested alternatives instead.</p><br/>",
113 'options' => [
114 'fancybox' => "<a href='https://fancybox.net/'>FancyBox 1</a> &ndash; ~15KB JS, ~4KB CSS: MIT / GPL licenses. <strong style='color: red'>No update since November 2010;</strong> use Fancybox 3 instead.",
115 'magnific' => "<a href='https://dimsemenov.com/plugins/magnific-popup/'>Magnific Popup</a> &ndash; ~20KB JS, ~7KB CSS: MIT license. <strong style='color: red'>No update since Feb 2016;</strong> use VenoBox instead.",
116 'prettyphoto' => "<a href='http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/'>PrettyPhoto</a> &ndash; ~18KB JS, ~22KB CSS: GPL v2.0 license. YouTube and Vimeo supported, but no support for videos from Flickr etc. <strong style='color: red'>No update since May 2015;</strong> use Spotlight instead.",
117 'strip' => "<a href='https://github.com/staaky/strip'>Strip</a> &ndash; ~39KB JS, ~9KB CSS: Released under the CC-BY 4.0 license. YouTube and Vimeo supported, but no support for videos from Flickr etc. <strong style='color: red'>No update since September 2021 and the GitHub repository is archived;</strong> use Venobox instead.",
118 ],
119 ],
120 ]
121 ],
122
123 [
124 'name' => "Non-bundled Lightbox JS",
125 'desc' => "If you have chosen a custom lightbox library from the above, enter the full URLs of the JS files for each of them.
126 <strong>Please enter one URL per line</strong>. Note that your URL should start with <code>https://...</code> or <code>https://...</code>, and you should be able to visit that entry in a browser",
127 'id' => 'custom_lightbox_js',
128 'grouping' => 'generic-settings',
129 'type' => 'textarea'
130 ],
131
132 [
133 'name' => "Custom Lightbox CSS",
134 'desc' => "If you have chosen a custom lightbox library from the above, enter the full URLs of the CSS files for each of them.
135 <strong>Please enter one URL per line</strong>. Note that your URL should start with <code>https://...</code> or <code>https://...</code>, and you should be able to visit that entry in a browser",
136 'id' => 'custom_lightbox_css',
137 'grouping' => 'generic-settings',
138 'type' => 'textarea'
139 ],
140
141 [
142 'name' => "Don't include third-party lightbox scripts",
143 'desc' => "If your theme or another plugin is supplying a lightbox script from the list above, you have the option to disable loading the same script from Photonic. <strong>This will save you some bandwidth, but you will have to work with the support for your theme or the other plugin to resolve issues.</strong>",
144 'id' => 'disable_photonic_lightbox_scripts',
145 'grouping' => 'generic-settings',
146 'type' => 'checkbox'
147 ],
148
149 [
150 'name' => "Don't include third-party slider scripts",
151 'desc' => "If your theme or another plugin is supplying the <a href='https://splidejs.com'>Splide script</a> (used for slideshow layouts), you have the option to disable loading the same script from Photonic. <strong>This will save you some bandwidth, but you will have to work with the support for your theme or the other plugin to resolve issues.</strong>",
152 'id' => 'disable_photonic_slider_scripts',
153 'grouping' => 'generic-settings',
154 'type' => 'checkbox'
155 ],
156
157 [
158 'name' => "Photonic Lightbox for non-Photonic Images",
159 'desc' => "Selecting this will let you use Photonic's lightbox for non-Photonic images. This eliminates the need for a separate lightbox plugin.",
160 'id' => 'lightbox_for_all',
161 'grouping' => 'generic-settings',
162 'type' => 'checkbox'
163 ],
164
165 [
166 'name' => "Photonic Lightbox for non-Photonic videos (YouTube / Vimeo etc.)",
167 'desc' => "Selecting this will let you use Photonic's lightbox for YouTube / Vimeo or self-hosted videos. This eliminates the need for a separate lightbox plugin.",
168 'id' => 'lightbox_for_videos',
169 'grouping' => 'generic-settings',
170 'type' => 'checkbox'
171 ],
172
173 [
174 'name' => "Include Photonic JS for non-Photonic Images / Videos",
175 'desc' => "By default Photonic's JavaScript is only loaded on pages that have Photonic galleries. This will cause issues on pages that have no Photonic galleries but are using Photonic for non-Photonic images. By checking this option you will be including the JS on all pages regardless of whether they have Photonic galleries.
176 Alternatively if you don't want to load the scripts on all pages, you can create a blank shortcode at the top of your post with the photos this way:
177 <ol>
178 <li>If you are using the <code>gallery</code> shortcode put in <code>[gallery style='square']</code></li>
179 <li>If you are using a custom shortcode from the first option on this page, e.g. <code>photonic</code> put in <code>[photonic]</code></li>
180 </ol>
181 Creating a blank shortcode will ensure that this page will get the scripts, and will not load the script on other pages.",
182 'id' => 'always_load_scripts',
183 'grouping' => 'generic-settings',
184 'type' => 'checkbox'
185 ],
186
187 [
188 'name' => "Force JS in header when possible",
189 'desc' => "By default Photonic's JavaScript is loaded in the footer. For themes including RetinaJS this causes a conflict due to a <a href='https://github.com/strues/retinajs/issues/260'>bug in RetinaJS</a>. Selecting this option addresses this bug, <strong>however this requires the previous option (<em>Include Photonic JS for non-Photonic Images / Videos</em>) to be selected</strong>.",
190 'id' => 'js_in_header',
191 'grouping' => 'generic-settings',
192 'type' => 'checkbox'
193 ],
194
195 [
196 'name' => "Disable shortcode editing in Visual Editor",
197 'desc' => "Occasionally the shortcode editor might cause JavaScript conflicts with other plugins. If that happens, select this option. Note that even if this option is selected, <strong>you will see a \"No items found\" message in the visual editor. Your gallery will still work, and you can edit the shortcode via the \"Text Editor\"</strong>.",
198 'id' => 'disable_editor',
199 'grouping' => 'generic-settings',
200 'type' => 'checkbox'
201 ],
202
203 [
204 'name' => "Disable Visual Editing for specific post types",
205 'desc' => "If you have disabled the Visual Editor in the previous option, you can selectively disable the editor for specific post types. <strong>Not selecting anything will keep it disabled for all post types.</strong> Note that you can still edit the shortcode via the \"Text Editor\".",
206 'id' => 'disable_editor_post_type',
207 'grouping' => 'generic-settings',
208 'options' => Utilities::get_formatted_post_type_array(),
209 'type' => "multi-select"
210 ],
211
212 [
213 'name' => "Use traditional interface for editing in Visual Editor",
214 'desc' => 'If shortcode editing in the visual editor is permitted (globally or for a post type in the above options), this option will show you a flat list of all attributes instead of a wizard for building your gallery.',
215 'id' => 'disable_flow_editor',
216 'grouping' => 'generic-settings',
217 'type' => 'checkbox'
218 ],
219
220 [
221 'name' => "Globally turn off Gallery Wizard",
222 'desc' => 'If selected, the only way to add galleries will be via <em>Add Media &rarr; Photonic</em>.',
223 'id' => 'disable_flow_editor_global',
224 'grouping' => 'generic-settings',
225 'type' => 'checkbox'
226 ],
227
228 [
229 'name' => "Turn off Photonic on \"Latest Posts\"",
230 'desc' => "If you have too many posts that make use of Photonic galleries, displaying them on your \"Latest Posts\" page (also known as your blog page) can slow down your page. You can disable the shortcode on such pages by checking this option",
231 'id' => 'disable_on_home_page',
232 'grouping' => 'generic-settings',
233 'type' => 'checkbox'
234 ],
235
236 [
237 'name' => "Turn off Photonic on Archive Pages",
238 'desc' => "If you have too many posts that make use of Photonic galleries, displaying them on archive pages (such as category, tag or date archive pages) can slow down your page. You can disable the shortcode on such pages by checking this option",
239 'id' => 'disable_on_archives',
240 'grouping' => 'generic-settings',
241 'type' => 'checkbox'
242 ],
243
244 [
245 'name' => "Nested Shortcodes in parameters",
246 'desc' => "Allow parameters of the gallery shortcode to use shortcodes themselves",
247 'id' => 'nested_shortcodes',
248 'grouping' => 'generic-settings',
249 'type' => 'checkbox'
250 ],
251
252 [
253 'name' => "External Link Handling",
254 'desc' => "Let the links to external sites (like Flickr or Instagram) open in a new tab/window.",
255 'id' => 'external_links_in_new_tab',
256 'grouping' => 'generic-settings',
257 'type' => 'checkbox'
258 ],
259
260 [
261 'name' => "Custom CSS in its own file",
262 'desc' => "When selected, Photonic will try to save the custom CSS generated through options to a file, <code>" . trailingslashit(PHOTONIC_UPLOAD_DIR) . "custom-styles.css</code>. You can use that file for caching.",
263 'id' => 'css_in_file',
264 'grouping' => 'generic-settings',
265 'type' => 'checkbox'
266 ],
267
268 [
269 'name' => "Layouts",
270 'desc' => 'Set up your layouts',
271 'category' => 'layout-settings',
272 'type' => 'section',
273 ],
274
275 [
276 'name' => "Image layout",
277 'desc' => 'If no gallery layout is specified, the following selection will be used:',
278 'id' => 'thumbnail_style',
279 'grouping' => 'layout-settings',
280 'type' => 'select',
281 'options' => Utilities::layout_options(),
282 'hint' => 'The first four options trigger a slideshow, the rest trigger a lightbox.'
283 ],
284
285 [
286 'name' => "Square / Circle Grid - Thumbnail Effect",
287 'desc' => "The following effect will be used for thumbnails in a square or circular thumbnail grid",
288 'id' => 'standard_thumbnail_effect',
289 'grouping' => 'layout-settings',
290 'type' => 'radio',
291 'options' => [
292 'none' => 'Thumbnails will be displayed as they are',
293 'opacity' => 'Thumbnails will show up opaque, opacity will clear upon hovering',
294 'zoom' => 'Thumbnails will zoom in upon hovering - will not work for square thumbs with title shown below image, and for any circular thumbs',
295 ],
296 ],
297
298 [
299 'name' => "Random Justified Gallery - Padding",
300 'desc' => "How much spacing do you want around each photo? This is only applicable to <strong>Random Justified Galleries</strong>. The gap between two photos is double this value.",
301 'id' => 'tile_spacing',
302 'grouping' => 'layout-settings',
303 'type' => 'text',
304 'hint' => "Enter the number of pixels here (don't enter 'px').",
305 ],
306
307 [
308 'name' => "Random Justified Gallery - Minimum Tile height",
309 'desc' => "What is the minimum height in pixels you want to make your random tiles? By default Photonic tries to assign a height that is 1/4 of the browser window, or 200px, whichever is greater. This is only applicable to <strong>Random Tiled Galleries</strong>. Use lower values if your content window is narrow.",
310 'id' => 'tile_min_height',
311 'grouping' => 'layout-settings',
312 'type' => 'text',
313 'hint' => "Enter the number of pixels here (don't enter 'px').",
314 ],
315
316 [
317 'name' => "Random Justified Gallery - Thumbnail Effect",
318 'desc' => "The following effect will be used for tiles in a Random Justified Gallery",
319 'id' => 'justified_thumbnail_effect',
320 'grouping' => 'layout-settings',
321 'type' => 'radio',
322 'options' => [
323 'none' => 'Tiles will be displayed as they are',
324 'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
325 'zoom' => 'Tiles will zoom in upon hovering',
326 ],
327 ],
328
329 [
330 'name' => "Masonry Layout - Padding",
331 'desc' => "How much spacing do you want around each photo? This is only applicable to <strong>Masonry layouts</strong>. The gap between two photos is double this value.",
332 'id' => 'masonry_tile_spacing',
333 'grouping' => 'layout-settings',
334 'type' => 'text',
335 'hint' => "Enter the number of pixels here (don't enter 'px').",
336 ],
337
338 [
339 'name' => "Masonry Layout - Minimum Column Width",
340 'desc' => "What is the minimum width in pixels you want to make your columns in the <strong>Masonry</strong> layout? This drives responsive design.",
341 'id' => 'masonry_min_width',
342 'grouping' => 'layout-settings',
343 'type' => 'text',
344 'hint' => "Enter the number of pixels here (don't enter 'px').",
345 ],
346
347 [
348 'name' => "Masonry Layout - Thumbnail Effect",
349 'desc' => "The following effect will be used for tiles in a Masonry Layout",
350 'id' => 'masonry_thumbnail_effect',
351 'grouping' => 'layout-settings',
352 'type' => 'radio',
353 'options' => [
354 'none' => 'Tiles will be displayed as they are',
355 'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
356 'zoom' => 'Tiles will zoom in upon hovering (will not work if titles are displayed below the tile)',
357 ],
358 ],
359
360 [
361 'name' => "Mosaic Layout - Padding",
362 'desc' => "How much spacing do you want around each photo? This is only applicable to <strong>Mosaic layouts</strong>. The gap between two photos is double this value.",
363 'id' => 'mosaic_tile_spacing',
364 'grouping' => 'layout-settings',
365 'type' => 'text',
366 'hint' => "Enter the number of pixels here (don't enter 'px'). Set to &gt; 0 to avoid rounding errors in the layout.",
367 ],
368
369 [
370 'name' => "Mosaic Layout - Trigger width",
371 'desc' => "If your content is narrow, you might not want too many images in a row for the <strong>Mosaic Layout</strong>. The Trigger Width controls this behaviour. If your content is 600px wide, and you set the Trigger width to 150, Photonic will not try to fit more than 4 (= 600/150) tiles in a mosaic row.",
372 'id' => 'mosaic_trigger_width',
373 'grouping' => 'layout-settings',
374 'type' => 'text',
375 'hint' => "Enter the number of pixels here (don't enter 'px').",
376 ],
377
378 [
379 'name' => "Mosaic Layout - Thumbnail Effect",
380 'desc' => "The following effect will be used for tiles in a Mosaic layout",
381 'id' => 'mosaic_thumbnail_effect',
382 'grouping' => 'layout-settings',
383 'type' => 'radio',
384 'options' => [
385 'none' => 'Tiles will be displayed as they are',
386 'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
387 'zoom' => 'Tiles will zoom in upon hovering',
388 ],
389 ],
390
391 [
392 'name' => "Native WP Galleries",
393 'desc' => "Control settings for native WP gallieries, invoked by <code>[gallery id='abc']</code>",
394 'category' => 'wp-settings',
395 'type' => 'section',
396 ],
397
398 [
399 'name' => "Photo titles and captions for the galleries / slideshows",
400 'desc' => "What do you want to show as the photo title in the gallery / slideshow? This is used for the tooltips and title displays.",
401 'id' => 'wp_title_caption',
402 'grouping' => 'wp-settings',
403 'type' => 'select',
404 'options' => Utilities::title_caption_options(false, false, true),
405 ],
406
407 [
408 'name' => "Thumbnail Title Display",
409 'desc' => "How do you want the title of the Thumbnails displayed?",
410 'id' => 'wp_thumbnail_title_display',
411 'grouping' => 'wp-settings',
412 'type' => 'radio',
413 'options' => $this->title_styles()
414 ],
415
416 [
417 'name' => "Disable lightbox linking",
418 'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page on your site.",
419 'id' => 'wp_disable_title_link',
420 'grouping' => 'wp-settings',
421 'type' => 'checkbox'
422 ],
423
424 $this->get_layout_engine_options('wp_layout_engine', 'wp-settings'),
425
426 [
427 'name' => "Slideshow settings",
428 'desc' => "Control settings for the slideshow layout",
429 'category' => 'sshow-settings',
430 'type' => 'section',
431 ],
432
433 [
434 'name' => "Prevent Slideshow Autostart",
435 'desc' => "By default slideshows start playing automatically. Selecting this will prevent this behaviour.",
436 'id' => 'slideshow_prevent_autostart',
437 'grouping' => 'sshow-settings',
438 'type' => 'checkbox',
439 ],
440
441 [
442 'name' => "Slideshow Image Adjustment",
443 'desc' => "If you are displaying a slideshow and your images are of uneven sizes, how do you want to handle the size differences?",
444 'id' => 'wp_slide_adjustment',
445 'grouping' => 'sshow-settings',
446 'type' => 'select',
447 'options' => [
448 'side-white' => 'Fixed height: show whitespace to the side for narrower images',
449 'start-next' => 'Fixed height (obsolete): Start next image to cover whitespace for narrower images',
450 'adapt-height' => 'Dynamic height: Dynamically change slideshow height according to the image size',
451 'adapt-height-width' => 'Dynamically change slideshow height and stretch images to fit width',
452 ]
453 ],
454
455 [
456 'name' => "Overlaid Popup Panel",
457 'desc' => "Control settings for popup panel",
458 'category' => 'photos-pop',
459 'type' => 'section',
460 ],
461
462 [
463 'name' => "What is this section?",
464 'desc' => "Options in this section are in effect when you click on a Photoset/album thumbnail to launch an overlaid gallery.",
465 'grouping' => 'photos-pop',
466 'type' => "blurb",
467 ],
468
469 [
470 'name' => "Enable Interim Popup for Album Thumbnails",
471 'desc' => "When you click on an Album / Photoset / Gallery, the lightbox automatically starts showing the images in the album. You can, instead, show an interim popup with all thumbnails for that album, then launch the lightbox upon clicking a thumbnail. This same setting is controlled from the \"Photo Template\" section as well.",
472 'id' => 'enable_popup',
473 'grouping' => 'photos-pop',
474 'type' => 'select',
475 'options' => [
476 '' => esc_html__('No overlay - start showing photos in a lightbox', 'photonic'),
477 'show' => esc_html__('Overlay - show photos in an overlay first', 'photonic'),
478 'page' => esc_html__('Page - Show photos in a separate page', 'photonic'),
479 ],
480 ],
481
482 [
483 'name' => "Overlaid (popup) Gallery Panel Width",
484 'desc' => "When you click on a gallery, it can launch a panel on top of your page. What is the width, <b>in percentage</b>, you want to assign to this gallery?",
485 'id' => 'popup_panel_width',
486 'grouping' => 'photos-pop',
487 'type' => 'select',
488 'options' => $this->selection_range(1, 100)
489 ],
490
491 [
492 'name' => "Overlaid (popup) Gallery Panel background",
493 'desc' => "Setup the background of the overlaid gallery (popup).",
494 'id' => 'flickr_gallery_panel_background',
495 'grouping' => 'photos-pop',
496 'type' => "background",
497 'options' => [],
498 ],
499
500 [
501 'name' => "Photo Template",
502 'desc' => "Let Photonic use a standalone page as a template",
503 'category' => 'template-page',
504 'type' => 'section',
505 ],
506
507 [
508 'name' => "Enable separate page to show album photos",
509 'desc' => "When you click on an Album / Photoset / Gallery, the lightbox automatically starts showing the images in the album. You can, instead, show a separate page with all thumbnails for that album, then launch the lightbox upon clicking a thumbnail. This same setting is controlled from the \"Overlaid Popup Panel\" section as well.",
510 'id' => 'enable_popup',
511 'grouping' => 'template-page',
512 'type' => 'select',
513 'options' => [
514 '' => esc_html__('No overlay - start showing photos in a lightbox', 'photonic'),
515 'show' => esc_html__('Overlay - show photos in an overlay first', 'photonic'),
516 'page' => esc_html__('Page - Show photos in a separate page', 'photonic'),
517 ],
518 ],
519
520 [
521 'name' => 'Dedicated page to use for gallery display',
522 'desc' => "By default Photonic displays galleries on the page it is invoked. Upon clicking on album thumbnails you are shown the photos of that album either in an overlaid panel, or in a lightbox.
523 Upon setting this, you can redirect users to a dedicated page that shows the contents of an album. To use this, the gallery attribute <code>popup</code> should be set to show in a dedicated page, i.e. <code>popup='page'</code>",
524 'id' => 'gallery_template_page',
525 'grouping' => 'template-page',
526 'type' => 'select',
527 'options' => Utilities::get_pages()
528 ],
529
530 [
531 'name' => 'Page title display',
532 'desc' => "Set the title to be displayed on the gallery page",
533 'id' => 'page_title',
534 'grouping' => 'template-page',
535 'type' => 'select',
536 'options' => [
537 'replace-if-available' => "Show album title if available, otherwise show the title of the WordPress page",
538 // 'append-if-available' => "Append album title to the page title if available, otherwise show the title of the WordPress page",
539 'page' => "Show the title of the WordPress page",
540 ]
541 ],
542
543 /*
544 [
545 'name' => 'Page Meta Title display',
546 'desc' => "Set the title to be displayed on the title bar of gallery page",
547 'id' => 'page_meta_title',
548 'grouping' => 'template-page',
549 'type' => 'select',
550 'options' => [
551 'replace-if-available' => "Show album title if available, otherwise show the title of the WordPress page",
552 'prepend-if-available' => "Prepend album title to the page title if available, otherwise show the title of the WordPress page",
553 'append-if-available' => "Append album title to the page title if available, otherwise show the title of the WordPress page",
554 'page' => "Show the title of the WordPress page",
555 ]
556 ],
557 */
558
559 [
560 'name' => 'Page content display',
561 'desc' => "Set the content to be displayed on the gallery page",
562 'id' => 'page_content',
563 'grouping' => 'template-page',
564 'type' => 'select',
565 'options' => [
566 'replace-if-available' => "Show album description if available, otherwise show the content of the WordPress page",
567 'append-if-available' => "Append album description if available, otherwise show the content of the WordPress page",
568 'page' => "Show the content of the WordPress page",
569 ]
570 ],
571
572 [
573 'name' => "Advanced",
574 'desc' => "Control advanced settings for the plugin",
575 'category' => 'advanced-settings',
576 'type' => 'section',
577 ],
578
579 [
580 'name' => 'Loading Mode',
581 'desc' => "You can configure Photonic to generate the galleries as a part of your page generation (PHP mode), or after your page has generated and rendered on the site user's browser (JS mode). The PHP mode makes your galleries crawlable by search engines, and the JS mode helps your page load faster (the gallery shows up once it is ready). The JS mode helps if you want to use caching plugins with Google Photos setups.",
582 'id' => 'load_mode',
583 'grouping' => 'advanced-settings',
584 'type' => 'radio',
585 'options' => [
586 'php' => "<strong>PHP Mode</strong> &ndash; Gallery markup is generated by your server before your page is sent to the browser.",
587 'js' => "<strong>JavaScript Mode</strong> &ndash; Gallery markup is generated by your server after your page is sent to the browser.",
588 ]
589 ],
590
591 [
592 'name' => 'Turn off SSL verification in calls',
593 'desc' => "When selected, Photonic will not use SSL verification for secure calls. <strong>This is not recommended, and may only be used on development sites</strong>.",
594 'id' => 'ssl_verify_off',
595 'grouping' => 'advanced-settings',
596 'type' => 'checkbox',
597 ],
598
599 [
600 'name' => 'Increase cURL timeout',
601 'desc' => "By default cURL requests made by WordPress time out after 10 seconds. In some cases your hosting provider might be throttling the connection speed to external services such as Flickr. In such a case bump up the timeout to something like 30 in the option below.",
602 'id' => 'curl_timeout',
603 'grouping' => 'advanced-settings',
604 'type' => 'text',
605 ],
606
607 [
608 'name' => 'Script Dev Mode',
609 'desc' => "By default Photonic loads minified versions of scripts. Select this option to load the full versions. This might help troubleshooting, or you may require this to play nice with minificaiton plugins.",
610 'id' => 'script_dev_mode',
611 'grouping' => 'advanced-settings',
612 'type' => 'checkbox',
613 ],
614
615 [
616 'name' => 'Performance logging',
617 'desc' => "When selected, Photonic will log performance statistics for various operations. This is useful for fine-tuning. Stats are printed as HTML comments under each gallery, invisible on the front-end.",
618 'id' => 'performance_logging',
619 'grouping' => 'advanced-settings',
620 'type' => 'checkbox',
621 ],
622
623 [
624 'name' => 'Turn on debug logging',
625 'desc' => "Turning this on helps troubleshoot error messages. <strong>This is not recommended, and may only be used on development sites</strong>.",
626 'id' => 'debug_on',
627 'grouping' => 'advanced-settings',
628 'type' => 'checkbox',
629 ],
630
631 ];
632 }
633 }
634