PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 2.44
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v2.44
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 2.45 All 140 releases
photonic / Options / Generic.php

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

499 lines 25.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Photonic_Plugin\Options;
3 use Photonic_Plugin\Core\Utilities;
4
5 class Generic extends Option_Tab {
6 private static $instance;
7
8 private function __construct() {
9 $this->options = [
10 ['name' => "How To",
11 'desc' => "Control generic settings for the plugin",
12 'category' => 'generic-how-to',
13 'buttons' => 'no-buttons',
14 'type' => 'section',],
15
16 ['name' => "Creating a gallery",
17 'desc' => "Photonic lets you create a gallery via a <strong><em>Gutenberg Block</em></strong>:<br/><br/>
18 <img src='".PHOTONIC_URL."screenshot-1.png' style='max-width: 300px;' alt='Gutenberg Block'/><br/><br/>
19 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/>
20 <img src='".PHOTONIC_URL."screenshot-2.jpg' style='max-width: 300px;' alt='Add / Edit Button'/><br/><br/>
21 You will be presented with the following:<br/><br/>
22 <img src='".PHOTONIC_URL."screenshot-3.png' style='max-width: 500px;' alt='Wizard' />",
23 'grouping' => 'generic-how-to',
24 'type' => 'blurb',],
25
26 ['name' => "Generic settings",
27 'desc' => "Control generic settings for the plugin",
28 'category' => 'generic-settings',
29 'type' => 'section',],
30
31 ['name' => "Custom Shortcode",
32 'desc' => "If you are using the <strong><em>Classic Editor</em></strong> by default Photonic uses the <code>gallery</code> shortcode,
33 so that your galleries stay safe if you stop using Photonic.
34 But your theme or other plugins might be using the same shortcode too. In such a case define an explicit shortcode,
35 and only this shortcode will show Photonic galleries",
36 'id' => "alternative_shortcode",
37 'grouping' => 'generic-settings',
38 'type' => 'text'],
39
40 ['name' => "Inbuilt Lightbox libraries",
41 'desc' => "Photonic lets you choose from the following JS libraries for Lightbox effects:",
42 'id' => "slideshow_library",
43 'grouping' => 'generic-settings',
44 'type' => 'radio',
45 'options' => [
46 "colorbox" => "<a href='http://colorpowered.com/colorbox/'>Colorbox</a> &ndash; ~10KB JS, ~5KB CSS: Released under the MIT license.",
47 "fancybox" => "<a href='http://fancybox.net/'>FancyBox</a> &ndash; ~16KB JS, ~9KB CSS: Released under MIT and GPL licenses.",
48 "fancybox3" => "<a href='https://fancyapps.com/fancybox/3/'>FancyBox 3</a> &ndash; ~61KB JS, ~14KB CSS: Released under the GPL v3 license.",
49 "featherlight" => "<a href='http://noelboss.github.io/featherlight/'>Featherlight</a> &ndash; ~12KB JS, ~4KB CSS: Released under the MIT license.",
50 // "fluidbox" => "<a href='https://terrymun.github.io/Fluidbox/'>Fluidbox</a> &ndash; ~10KB JS, ~4KB CSS: Released under the MIT license.",
51 // "galleria" => "<a href='https://galleria.io/'>Galleria</a> &ndash; ~72KB JS (+ Theme), ~5KB CSS: Released under the MIT license.",
52 "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.",
53 "lightcase" => "<a href='http://cornel.bopp-art.com/lightcase/'>LightCase</a> &ndash; ~25KB JS, ~16KB CSS: Released under the GPL license.",
54 "lightgallery" => "<a href='https://sachinchoolur.github.io/lightGallery/'>Lightgallery</a> &ndash; ~18KB JS (+ Optional plugins), ~20KB CSS, ~20KB fonts: Released under the GPL v3 license.",
55 "magnific" => "<a href='http://dimsemenov.com/plugins/magnific-popup/'>Magnific Popup</a> &ndash; ~20KB JS, ~7KB CSS: Released under the MIT license.",
56 "photoswipe" => "<a href='http://photoswipe.com/'>PhotoSwipe</a> &ndash; ~42KB JS, ~4KB CSS: Released under the MIT license. No video support for Flickr.",
57 "prettyphoto" => "<a href='http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/'>PrettyPhoto</a> &ndash; ~23KB JS, ~27KB CSS: Released under the GPL v2.0 license. YouTube and Vimeo supported, but no support for videos from Flickr etc.",
58 "swipebox" => "<a href='http://brutaldesign.github.io/swipebox/'>Swipebox</a> &ndash; ~12KB, ~5KB CSS: Released under the MIT license.",
59 "thickbox" => "Thickbox &ndash; ~12KB: Released under the MIT license. No video support.",
60 "none" => "None",
61 "custom" => "Non-bundled &nbsp; You have to provide the JS and CSS links. See <a href='https://aquoid.com/plugins/photonic/third-party-lightboxes/'>here</a> for instructions",
62 ]],
63
64 ['name' => "Non-bundled Lightbox libraries",
65 'desc' => "If you don't like the above libraries, you can try one of the following. These are not distributed with the theme for various reasons,
66 predominant being licensing restrictions. <strong>Photonic doesn't support installation of these scripts</strong>. If you want to use them,
67 you will need to specify their JS and CSS files in subsequent options, unless they come bundled with your theme.",
68 'id' => "custom_lightbox",
69 'grouping' => 'generic-settings',
70 'type' => 'radio',
71 'options' => [
72 "fancybox2" => "<a href='http://fancyapps.com/fancybox/'>FancyBox 2</a>: Released under the CC-BY-NC 3.0 license",
73 "strip" => "<a href='http://www.stripjs.com/'>Strip</a>: Released under the CC-BY-NC-ND 3.0 license. YouTube and Vimeo supported, but no support for videos from Flickr etc.",
74 ]],
75
76 ['name' => "Non-bundled Lightbox JS",
77 'desc' => "If you have chosen a custom lightbox library from the above, enter the full URLs of the JS files for each of them.
78 <strong>Please enter one URL per line</strong>. Note that your URL should start with <code>http://...</code> and you should be able to visit that entry in a browser",
79 'id' => "custom_lightbox_js",
80 'grouping' => 'generic-settings',
81 'type' => 'textarea'],
82
83 ['name' => "Custom Lightbox CSS",
84 'desc' => "If you have chosen a custom lightbox library from the above, enter the full URLs of the CSS files for each of them.
85 <strong>Please enter one URL per line</strong>. Note that your URL should start with <code>http://...</code> and you should be able to visit that entry in a browser",
86 'id' => "custom_lightbox_css",
87 'grouping' => 'generic-settings',
88 'type' => 'textarea'],
89
90 ['name' => "Don't include third-party lightbox scripts",
91 '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>",
92 'id' => "disable_photonic_lightbox_scripts",
93 'grouping' => 'generic-settings',
94 'type' => 'checkbox'
95 ],
96
97 ['name' => "Don't include third-party slider scripts",
98 'desc' => "If your theme or another plugin is supplying the <a href='https://sachinchoolur.github.io/lightslider/'>LightSlider 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>",
99 'id' => "disable_photonic_slider_scripts",
100 'grouping' => 'generic-settings',
101 'type' => 'checkbox'
102 ],
103
104 ['name' => "Photonic Lightbox for non-Photonic Images",
105 'desc' => "Selecting this will let you use Photonic's lightbox for non-Photonic images. This eliminates the need for a separate lightbox plugin.",
106 'id' => "lightbox_for_all",
107 'grouping' => 'generic-settings',
108 'type' => 'checkbox'
109 ],
110
111 ['name' => "Photonic Lightbox for non-Photonic videos (YouTube / Vimeo etc.)",
112 '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.",
113 'id' => "lightbox_for_videos",
114 'grouping' => 'generic-settings',
115 'type' => 'checkbox'
116 ],
117
118 ['name' => "Include Photonic JS for non-Photonic Images / Videos",
119 '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.
120 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:
121 <ol>
122 <li>If you are using the <code>gallery</code> shortcode put in <code>[gallery style='square']</code></li>
123 <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>
124 </ol>
125 Creating a blank shortcode will ensure that this page will get the scripts, and will not load the script on other pages.",
126 'id' => "always_load_scripts",
127 'grouping' => 'generic-settings',
128 'type' => 'checkbox'
129 ],
130
131 ['name' => "Force JS in header when possible",
132 '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>.",
133 'id' => "js_in_header",
134 'grouping' => 'generic-settings',
135 'type' => 'checkbox'
136 ],
137
138 ['name' => "Disable shortcode editing in Visual Editor",
139 '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>.",
140 'id' => "disable_editor",
141 'grouping' => 'generic-settings',
142 'type' => 'checkbox'
143 ],
144
145 ['name' => "Disable Visual Editing for specific post types",
146 '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\".",
147 'id' => "disable_editor_post_type",
148 'grouping' => 'generic-settings',
149 'options' => Utilities::get_formatted_post_type_array(),
150 'type' => "multi-select"
151 ],
152
153 ['name' => "Use traditional interface for editing in Visual Editor",
154 '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.',
155 'id' => "disable_flow_editor",
156 'grouping' => 'generic-settings',
157 'type' => 'checkbox'
158 ],
159
160 ['name' => "Globally turn off Gallery Wizard",
161 'desc' => 'If selected, the only way to add galleries will be via <em>Add Media &rarr; Photonic</em>.',
162 'id' => "disable_flow_editor_global",
163 'grouping' => 'generic-settings',
164 'type' => 'checkbox'
165 ],
166
167 ['name' => "Nested Shortcodes in parameters",
168 'desc' => "Allow parameters of the gallery shortcode to use shortcodes themselves",
169 'id' => "nested_shortcodes",
170 'grouping' => 'generic-settings',
171 'type' => 'checkbox'
172 ],
173
174 ['name' => "External Link Handling",
175 'desc' => "Let the links to external sites (like Flickr or Instagram) open in a new tab/window.",
176 'id' => "external_links_in_new_tab",
177 'grouping' => 'generic-settings',
178 'type' => 'checkbox'
179 ],
180
181 ['name' => "Custom CSS in its own file",
182 '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.",
183 'id' => "css_in_file",
184 'grouping' => 'generic-settings',
185 'type' => 'checkbox'
186 ],
187
188 ['name' => "Layouts",
189 'desc' => "Set up your layouts",
190 'category' => "layout-settings",
191 'type' => 'section',],
192
193 ['name' => "Image layout",
194 'desc' => "If no gallery layout is specified, the following selection will be used:",
195 'id' => "thumbnail_style",
196 'grouping' => "layout-settings",
197 'type' => 'select',
198 'options' => Utilities::layout_options(),
199 'hint' => 'The first four options trigger a slideshow, the rest trigger a lightbox.'
200 ],
201
202 ['name' => "Square / Circle Grid - Thumbnail Effect",
203 'desc' => "The following effect will be used for thumbnails in a square or circular thumbnail grid",
204 'id' => "standard_thumbnail_effect",
205 'grouping' => "layout-settings",
206 'type' => 'radio',
207 'options' => [
208 'none' => 'Thumbnails will be displayed as they are',
209 'opacity' => 'Thumbnails will show up opaque, opacity will clear upon hovering',
210 'zoom' => 'Thumbnails will zoom in upon hovering - will not work for square thumbs with title shown below image, and for any circular thumbs',
211 ],
212 ],
213
214 ['name' => "Random Justified Gallery - Padding",
215 '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.",
216 'id' => "tile_spacing",
217 'grouping' => "layout-settings",
218 'type' => 'text',
219 'hint' => "Enter the number of pixels here (don't enter 'px').",
220 ],
221
222 ['name' => "Random Justified Gallery - Minimum Tile height",
223 '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.",
224 'id' => "tile_min_height",
225 'grouping' => "layout-settings",
226 'type' => 'text',
227 'hint' => "Enter the number of pixels here (don't enter 'px').",
228 ],
229
230 ['name' => "Random Justified Gallery - Thumbnail Effect",
231 'desc' => "The following effect will be used for tiles in a Random Justified Gallery",
232 'id' => "justified_thumbnail_effect",
233 'grouping' => "layout-settings",
234 'type' => 'radio',
235 'options' => [
236 'none' => 'Tiles will be displayed as they are',
237 'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
238 'zoom' => 'Tiles will zoom in upon hovering',
239 ],
240 ],
241
242 ['name' => "Masonry Layout - Padding",
243 '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.",
244 'id' => "masonry_tile_spacing",
245 'grouping' => "layout-settings",
246 'type' => 'text',
247 'hint' => "Enter the number of pixels here (don't enter 'px').",
248 ],
249
250 ['name' => "Masonry Layout - Minimum Column Width",
251 'desc' => "What is the minimum width in pixels you want to make your columns in the <strong>Masonry</strong> layout? This drives responsive design.",
252 'id' => "masonry_min_width",
253 'grouping' => "layout-settings",
254 'type' => 'text',
255 'hint' => "Enter the number of pixels here (don't enter 'px').",
256 ],
257
258 ['name' => "Masonry Layout - Thumbnail Effect",
259 'desc' => "The following effect will be used for tiles in a Masonry Layout",
260 'id' => "masonry_thumbnail_effect",
261 'grouping' => "layout-settings",
262 'type' => 'radio',
263 'options' => [
264 'none' => 'Tiles will be displayed as they are',
265 'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
266 'zoom' => 'Tiles will zoom in upon hovering (will not work if titles are displayed below the tile)',
267 ],
268 ],
269
270 ['name' => "Mosaic Layout - Padding",
271 '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.",
272 'id' => "mosaic_tile_spacing",
273 'grouping' => "layout-settings",
274 'type' => 'text',
275 'hint' => "Enter the number of pixels here (don't enter 'px'). Set to &gt; 0 to avoid rounding errors in the layout.",
276 ],
277
278 ['name' => "Mosaic Layout - Trigger width",
279 '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.",
280 'id' => "mosaic_trigger_width",
281 'grouping' => "layout-settings",
282 'type' => 'text',
283 'hint' => "Enter the number of pixels here (don't enter 'px').",
284 ],
285
286 ['name' => "Mosaic Layout - Thumbnail Effect",
287 'desc' => "The following effect will be used for tiles in a Mosaic layout",
288 'id' => "mosaic_thumbnail_effect",
289 'grouping' => "layout-settings",
290 'type' => 'radio',
291 'options' => [
292 'none' => 'Tiles will be displayed as they are',
293 'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
294 'zoom' => 'Tiles will zoom in upon hovering',
295 ],
296 ],
297
298 ['name' => "Native WP Galleries",
299 'desc' => "Control settings for native WP gallieries, invoked by <code>[gallery id='abc']</code>",
300 'category' => "wp-settings",
301 'type' => 'section',],
302
303 ['name' => "Photo titles and captions",
304 'desc' => "What do you want to show as the photo title in the tooltip and lightbox?",
305 'id' => "wp_title_caption",
306 'grouping' => "wp-settings",
307 'type' => 'select',
308 'options' => Utilities::title_caption_options(),],
309
310 ['name' => "Thumbnail Title Display",
311 'desc' => "How do you want the title of the Thumbnails displayed?",
312 'id' => "wp_thumbnail_title_display",
313 'grouping' => "wp-settings",
314 'type' => 'radio',
315 'options' => $this->title_styles()],
316
317 ['name' => "Disable lightbox linking",
318 'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page on your site.",
319 'id' => "wp_disable_title_link",
320 'grouping' => "wp-settings",
321 'type' => 'checkbox'],
322
323 ['name' => "Slideshow settings",
324 'desc' => "Control settings for the slideshow layout",
325 'category' => "sshow-settings",
326 'type' => 'section',],
327
328 ['name' => "Prevent Slideshow Autostart",
329 'desc' => "By default slideshows start playing automatically. Selecting this will prevent this behaviour.",
330 'id' => "slideshow_prevent_autostart",
331 'grouping' => "sshow-settings",
332 'type' => 'checkbox',
333 ],
334
335 ['name' => "Centre slideshow images",
336 'desc' => "If you pass the <code>layout</code> parameter (<code>style</code> for native WP galleries) to the <code>gallery</code> shortcode and the style is <code>strip-above</code>, <code>strip-below</code> or <code>no-strip</code> the image in the slide will be centered if you select this.",
337 'id' => "wp_slide_align",
338 'grouping' => "sshow-settings",
339 'type' => 'checkbox',
340 ],
341
342 ['name' => "Slideshow Image Adjustment",
343 'desc' => "If you are displaying a slideshow and your images are of uneven sizes, how do you want to handle the size differences?",
344 'id' => "wp_slide_adjustment",
345 'grouping' => "sshow-settings",
346 'type' => 'select',
347 'options' => [
348 'side-white' => 'Show whitespace to the side for narrower images',
349 'start-next' => 'Start next image to cover whitespace for narrower images',
350 'adapt-height' => 'Dynamically change slideshow height according to the image size',
351 'adapt-height-width' => 'Dynamically change slideshow height and stretch images',
352 ]],
353
354 ['name' => "Overlaid Popup Panel",
355 'desc' => "Control settings for popup panel",
356 'category' => "photos-pop",
357 'type' => 'section',],
358
359 ['name' => "What is this section?",
360 'desc' => "Options in this section are in effect when you click on a Photoset/album thumbnail to launch an overlaid gallery.",
361 'grouping' => "photos-pop",
362 'type' => "blurb",],
363
364 ['name' => "Enable Interim Popup for Album Thumbnails",
365 '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.",
366 'id' => "enable_popup",
367 'grouping' => "photos-pop",
368 'type' => 'select',
369 'options' => [
370 '' => esc_html__('No overlay - start showing photos in a lightbox', 'photonic'),
371 'show' => esc_html__('Overlay - show photos in an overlay first', 'photonic'),
372 'page' => esc_html__('Page - Show photos in a separate page', 'photonic'),
373 ],
374 ],
375
376 ['name' => "Overlaid (popup) Gallery Panel Width",
377 '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?",
378 'id' => "popup_panel_width",
379 'grouping' => "photos-pop",
380 'type' => 'select',
381 'options' => $this->selection_range(1, 100)],
382
383
384 ['name' => "Overlaid (popup) Gallery Panel background",
385 'desc' => "Setup the background of the overlaid gallery (popup).",
386 'id' => "flickr_gallery_panel_background",
387 'grouping' => "photos-pop",
388 'type' => "background",
389 'options' => [],
390 ],
391
392 ['name' => "Overlaid (popup) Gallery Border",
393 'desc' => "Setup the border of overlaid gallery (popup).",
394 'id' => "flickr_set_popup_thumb_border",
395 'grouping' => "photos-pop",
396 'type' => 'border',
397 'options' => [],
398 ],
399
400 ['name' => "Photo Template",
401 'desc' => "Let Photonic use a standalone page as a template",
402 'category' => "template-page",
403 'type' => 'section',],
404
405 ['name' => "Enable separate page to show album photos",
406 '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.",
407 'id' => "enable_popup",
408 'grouping' => "template-page",
409 'type' => 'select',
410 'options' => [
411 '' => esc_html__('No overlay - start showing photos in a lightbox', 'photonic'),
412 'show' => esc_html__('Overlay - show photos in an overlay first', 'photonic'),
413 'page' => esc_html__('Page - Show photos in a separate page', 'photonic'),
414 ],
415 ],
416
417 ['name' => 'Dedicated page to use for gallery display',
418 '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.
419 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>",
420 'id' => 'gallery_template_page',
421 'grouping' => "template-page",
422 'type' => 'select',
423 'options' => Utilities::get_pages()
424 ],
425
426 ['name' => 'Page title display',
427 'desc' => "Set the title to be displayed on the gallery page",
428 'id' => 'page_title',
429 'grouping' => "template-page",
430 'type' => 'select',
431 'options' => [
432 'replace-if-available' => "Show album title if available, otherwise show the title of the WordPress page",
433 'page' => "Show the title of the WordPress page",
434 ]
435 ],
436
437 ['name' => 'Page content display',
438 'desc' => "Set the content to be displayed on the gallery page",
439 'id' => 'page_content',
440 'grouping' => "template-page",
441 'type' => 'select',
442 'options' => [
443 'replace-if-available' => "Show album description if available, otherwise show the content of the WordPress page",
444 'append-if-available' => "Append album description if available, otherwise show the content of the WordPress page",
445 'page' => "Show the content of the WordPress page",
446 ]
447 ],
448
449 ['name' => "Advanced",
450 'desc' => "Control advanced settings for the plugin",
451 'category' => "advanced-settings",
452 'type' => 'section',],
453
454 ['name' => 'Turn off SSL verification in calls',
455 '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>.",
456 'id' => 'ssl_verify_off',
457 'grouping' => "advanced-settings",
458 'type' => 'checkbox',
459 ],
460
461 ['name' => 'Increase cURL timeout',
462 '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.",
463 'id' => "curl_timeout",
464 'grouping' => "advanced-settings",
465 'type' => 'text',
466 ],
467
468 ['name' => 'Script Dev Mode',
469 '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.",
470 'id' => 'script_dev_mode',
471 'grouping' => "advanced-settings",
472 'type' => 'checkbox',
473 ],
474
475 ['name' => 'Performance logging',
476 '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.",
477 'id' => 'performance_logging',
478 'grouping' => "advanced-settings",
479 'type' => 'checkbox',
480 ],
481
482 ['name' => 'Turn on debug logging',
483 'desc' => "Turning this on helps troubleshoot error messages. <strong>This is not recommended, and may only be used on development sites</strong>.",
484 'id' => 'debug_on',
485 'grouping' => "advanced-settings",
486 'type' => 'checkbox',
487 ],
488
489 ];
490 }
491
492 public static function get_instance() {
493 if (self::$instance == null) {
494 self::$instance = new Generic();
495 }
496 return self::$instance;
497 }
498 }
499