options = [
[
'name' => 'How To',
'desc' => 'Control generic settings for the plugin',
'category' => 'generic-how-to',
'buttons' => 'no-buttons',
'type' => 'section',
],
[
'name' => 'Creating a gallery',
'desc' => "Photonic lets you create a gallery via a Gutenberg Block:

Alternatively, if you are using the Classic Editor you can use the Add / Edit Photonic Gallery button:

You will be presented with the following:
",
'grouping' => 'generic-how-to',
'type' => 'blurb',
],
[
'name' => 'Generic settings',
'desc' => 'Control generic settings for the plugin',
'category' => 'generic-settings',
'type' => 'section',
],
[
'name' => 'Custom Shortcode',
'desc' => 'If you are using the Classic Editor by default Photonic uses the gallery shortcode,
so that your galleries stay safe if you stop using Photonic.
But your theme or other plugins might be using the same shortcode too. In such a case define an explicit shortcode,
and only this shortcode will show Photonic galleries',
'id' => 'alternative_shortcode',
'grouping' => 'generic-settings',
'type' => 'text'
],
[
'name' => "Inbuilt Lightbox libraries",
'desc' => "Photonic lets you choose from the following JS libraries for Lightbox effects:",
'id' => 'slideshow_library',
'grouping' => 'generic-settings',
'type' => 'radio-group',
'options' => [
'js' => [
'header' => 'Pure JavaScript Libraries',
'description' => "
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.
These libraries will automatically load the jQuery library (~95KB) to function. This is probably OK if your theme or other plugins are already using jQuery.
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.
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. However, it is strongly recommended that you don't use these due to potential security concerns. Use the suggested alternatives instead.
https://... or https://..., and you should be able to visit that entry in a browser",
'id' => 'custom_lightbox_js',
'grouping' => 'generic-settings',
'type' => 'textarea'
],
[
'name' => "Custom Lightbox CSS",
'desc' => "If you have chosen a custom lightbox library from the above, enter the full URLs of the CSS files for each of them.
Please enter one URL per line. Note that your URL should start with https://... or https://..., and you should be able to visit that entry in a browser",
'id' => 'custom_lightbox_css',
'grouping' => 'generic-settings',
'type' => 'textarea'
],
[
'name' => "Don't include third-party lightbox scripts",
'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. 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.",
'id' => 'disable_photonic_lightbox_scripts',
'grouping' => 'generic-settings',
'type' => 'checkbox'
],
[
'name' => "Don't include third-party slider scripts",
'desc' => "If your theme or another plugin is supplying the Splide script (used for slideshow layouts), you have the option to disable loading the same script from Photonic. 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.",
'id' => 'disable_photonic_slider_scripts',
'grouping' => 'generic-settings',
'type' => 'checkbox'
],
[
'name' => "Photonic Lightbox for non-Photonic Images",
'desc' => "Selecting this will let you use Photonic's lightbox for non-Photonic images. This eliminates the need for a separate lightbox plugin.",
'id' => 'lightbox_for_all',
'grouping' => 'generic-settings',
'type' => 'checkbox'
],
[
'name' => "Photonic Lightbox for non-Photonic videos (YouTube / Vimeo etc.)",
'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.",
'id' => 'lightbox_for_videos',
'grouping' => 'generic-settings',
'type' => 'checkbox'
],
[
'name' => "Include Photonic JS for non-Photonic Images / Videos",
'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.
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:
gallery shortcode put in [gallery style='square']photonic put in [photonic]" . trailingslashit(PHOTONIC_UPLOAD_DIR) . "custom-styles.css. You can use that file for caching.",
'id' => 'css_in_file',
'grouping' => 'generic-settings',
'type' => 'checkbox'
],
[
'name' => "Layouts",
'desc' => 'Set up your layouts',
'category' => 'layout-settings',
'type' => 'section',
],
[
'name' => "Image layout",
'desc' => 'If no gallery layout is specified, the following selection will be used:',
'id' => 'thumbnail_style',
'grouping' => 'layout-settings',
'type' => 'select',
'options' => Utilities::layout_options(),
'hint' => 'The first four options trigger a slideshow, the rest trigger a lightbox.'
],
[
'name' => "Square / Circle Grid - Thumbnail Effect",
'desc' => "The following effect will be used for thumbnails in a square or circular thumbnail grid",
'id' => 'standard_thumbnail_effect',
'grouping' => 'layout-settings',
'type' => 'radio',
'options' => [
'none' => 'Thumbnails will be displayed as they are',
'opacity' => 'Thumbnails will show up opaque, opacity will clear upon hovering',
'zoom' => 'Thumbnails will zoom in upon hovering - will not work for square thumbs with title shown below image, and for any circular thumbs',
],
],
[
'name' => "Random Justified Gallery - Padding",
'desc' => "How much spacing do you want around each photo? This is only applicable to Random Justified Galleries. The gap between two photos is double this value.",
'id' => 'tile_spacing',
'grouping' => 'layout-settings',
'type' => 'text',
'hint' => "Enter the number of pixels here (don't enter 'px').",
],
[
'name' => "Random Justified Gallery - Minimum Tile height",
'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 Random Tiled Galleries. Use lower values if your content window is narrow.",
'id' => 'tile_min_height',
'grouping' => 'layout-settings',
'type' => 'text',
'hint' => "Enter the number of pixels here (don't enter 'px').",
],
[
'name' => "Random Justified Gallery - Thumbnail Effect",
'desc' => "The following effect will be used for tiles in a Random Justified Gallery",
'id' => 'justified_thumbnail_effect',
'grouping' => 'layout-settings',
'type' => 'radio',
'options' => [
'none' => 'Tiles will be displayed as they are',
'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
'zoom' => 'Tiles will zoom in upon hovering',
],
],
[
'name' => "Masonry Layout - Padding",
'desc' => "How much spacing do you want around each photo? This is only applicable to Masonry layouts. The gap between two photos is double this value.",
'id' => 'masonry_tile_spacing',
'grouping' => 'layout-settings',
'type' => 'text',
'hint' => "Enter the number of pixels here (don't enter 'px').",
],
[
'name' => "Masonry Layout - Minimum Column Width",
'desc' => "What is the minimum width in pixels you want to make your columns in the Masonry layout? This drives responsive design.",
'id' => 'masonry_min_width',
'grouping' => 'layout-settings',
'type' => 'text',
'hint' => "Enter the number of pixels here (don't enter 'px').",
],
[
'name' => "Masonry Layout - Thumbnail Effect",
'desc' => "The following effect will be used for tiles in a Masonry Layout",
'id' => 'masonry_thumbnail_effect',
'grouping' => 'layout-settings',
'type' => 'radio',
'options' => [
'none' => 'Tiles will be displayed as they are',
'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
'zoom' => 'Tiles will zoom in upon hovering (will not work if titles are displayed below the tile)',
],
],
[
'name' => "Mosaic Layout - Padding",
'desc' => "How much spacing do you want around each photo? This is only applicable to Mosaic layouts. The gap between two photos is double this value.",
'id' => 'mosaic_tile_spacing',
'grouping' => 'layout-settings',
'type' => 'text',
'hint' => "Enter the number of pixels here (don't enter 'px'). Set to > 0 to avoid rounding errors in the layout.",
],
[
'name' => "Mosaic Layout - Trigger width",
'desc' => "If your content is narrow, you might not want too many images in a row for the Mosaic Layout. 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.",
'id' => 'mosaic_trigger_width',
'grouping' => 'layout-settings',
'type' => 'text',
'hint' => "Enter the number of pixels here (don't enter 'px').",
],
[
'name' => "Mosaic Layout - Thumbnail Effect",
'desc' => "The following effect will be used for tiles in a Mosaic layout",
'id' => 'mosaic_thumbnail_effect',
'grouping' => 'layout-settings',
'type' => 'radio',
'options' => [
'none' => 'Tiles will be displayed as they are',
'opacity' => 'Tiles will show up opaque, opacity will clear upon hovering',
'zoom' => 'Tiles will zoom in upon hovering',
],
],
[
'name' => "Native WP Galleries",
'desc' => "Control settings for native WP gallieries, invoked by [gallery id='abc']",
'category' => 'wp-settings',
'type' => 'section',
],
[
'name' => "Photo titles and captions for the galleries / slideshows",
'desc' => "What do you want to show as the photo title in the gallery / slideshow? This is used for the tooltips and title displays.",
'id' => 'wp_title_caption',
'grouping' => 'wp-settings',
'type' => 'select',
'options' => Utilities::title_caption_options(false, false, true),
],
[
'name' => "Thumbnail Title Display",
'desc' => "How do you want the title of the Thumbnails displayed?",
'id' => 'wp_thumbnail_title_display',
'grouping' => 'wp-settings',
'type' => 'radio',
'options' => $this->title_styles()
],
[
'name' => "Disable lightbox linking",
'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page on your site.",
'id' => 'wp_disable_title_link',
'grouping' => 'wp-settings',
'type' => 'checkbox'
],
$this->get_layout_engine_options('wp_layout_engine', 'wp-settings'),
[
'name' => "Slideshow settings",
'desc' => "Control settings for the slideshow layout",
'category' => 'sshow-settings',
'type' => 'section',
],
[
'name' => "Prevent Slideshow Autostart",
'desc' => "By default slideshows start playing automatically. Selecting this will prevent this behaviour.",
'id' => 'slideshow_prevent_autostart',
'grouping' => 'sshow-settings',
'type' => 'checkbox',
],
[
'name' => "Slideshow Image Adjustment",
'desc' => "If you are displaying a slideshow and your images are of uneven sizes, how do you want to handle the size differences?",
'id' => 'wp_slide_adjustment',
'grouping' => 'sshow-settings',
'type' => 'select',
'options' => [
'side-white' => 'Fixed height: show whitespace to the side for narrower images',
'start-next' => 'Fixed height (obsolete): Start next image to cover whitespace for narrower images',
'adapt-height' => 'Dynamic height: Dynamically change slideshow height according to the image size',
'adapt-height-width' => 'Dynamically change slideshow height and stretch images to fit width',
]
],
[
'name' => "Overlaid Popup Panel",
'desc' => "Control settings for popup panel",
'category' => 'photos-pop',
'type' => 'section',
],
[
'name' => "What is this section?",
'desc' => "Options in this section are in effect when you click on a Photoset/album thumbnail to launch an overlaid gallery.",
'grouping' => 'photos-pop',
'type' => "blurb",
],
[
'name' => "Enable Interim Popup for Album Thumbnails",
'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.",
'id' => 'enable_popup',
'grouping' => 'photos-pop',
'type' => 'select',
'options' => [
'' => esc_html__('No overlay - start showing photos in a lightbox', 'photonic'),
'show' => esc_html__('Overlay - show photos in an overlay first', 'photonic'),
'page' => esc_html__('Page - Show photos in a separate page', 'photonic'),
],
],
[
'name' => "Overlaid (popup) Gallery Panel Width",
'desc' => "When you click on a gallery, it can launch a panel on top of your page. What is the width, in percentage, you want to assign to this gallery?",
'id' => 'popup_panel_width',
'grouping' => 'photos-pop',
'type' => 'select',
'options' => $this->selection_range(1, 100)
],
[
'name' => "Overlaid (popup) Gallery Panel background",
'desc' => "Setup the background of the overlaid gallery (popup).",
'id' => 'flickr_gallery_panel_background',
'grouping' => 'photos-pop',
'type' => "background",
'options' => [],
],
[
'name' => "Photo Template",
'desc' => "Let Photonic use a standalone page as a template",
'category' => 'template-page',
'type' => 'section',
],
[
'name' => "Enable separate page to show album photos",
'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.",
'id' => 'enable_popup',
'grouping' => 'template-page',
'type' => 'select',
'options' => [
'' => esc_html__('No overlay - start showing photos in a lightbox', 'photonic'),
'show' => esc_html__('Overlay - show photos in an overlay first', 'photonic'),
'page' => esc_html__('Page - Show photos in a separate page', 'photonic'),
],
],
[
'name' => 'Dedicated page to use for gallery display',
'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.
Upon setting this, you can redirect users to a dedicated page that shows the contents of an album. To use this, the gallery attribute popup should be set to show in a dedicated page, i.e. popup='page'",
'id' => 'gallery_template_page',
'grouping' => 'template-page',
'type' => 'select',
'options' => Utilities::get_pages()
],
[
'name' => 'Page title display',
'desc' => "Set the title to be displayed on the gallery page",
'id' => 'page_title',
'grouping' => 'template-page',
'type' => 'select',
'options' => [
'replace-if-available' => "Show album title if available, otherwise show the title of the WordPress page",
// 'append-if-available' => "Append album title to the page title if available, otherwise show the title of the WordPress page",
'page' => "Show the title of the WordPress page",
]
],
/*
[
'name' => 'Page Meta Title display',
'desc' => "Set the title to be displayed on the title bar of gallery page",
'id' => 'page_meta_title',
'grouping' => 'template-page',
'type' => 'select',
'options' => [
'replace-if-available' => "Show album title if available, otherwise show the title of the WordPress page",
'prepend-if-available' => "Prepend album title to the page title if available, otherwise show the title of the WordPress page",
'append-if-available' => "Append album title to the page title if available, otherwise show the title of the WordPress page",
'page' => "Show the title of the WordPress page",
]
],
*/
[
'name' => 'Page content display',
'desc' => "Set the content to be displayed on the gallery page",
'id' => 'page_content',
'grouping' => 'template-page',
'type' => 'select',
'options' => [
'replace-if-available' => "Show album description if available, otherwise show the content of the WordPress page",
'append-if-available' => "Append album description if available, otherwise show the content of the WordPress page",
'page' => "Show the content of the WordPress page",
]
],
[
'name' => "Advanced",
'desc' => "Control advanced settings for the plugin",
'category' => 'advanced-settings',
'type' => 'section',
],
[
'name' => 'Loading Mode',
'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.",
'id' => 'load_mode',
'grouping' => 'advanced-settings',
'type' => 'radio',
'options' => [
'php' => "PHP Mode – Gallery markup is generated by your server before your page is sent to the browser.",
'js' => "JavaScript Mode – Gallery markup is generated by your server after your page is sent to the browser.",
]
],
[
'name' => 'Turn off SSL verification in calls',
'desc' => "When selected, Photonic will not use SSL verification for secure calls. This is not recommended, and may only be used on development sites.",
'id' => 'ssl_verify_off',
'grouping' => 'advanced-settings',
'type' => 'checkbox',
],
[
'name' => 'Increase cURL timeout',
'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.",
'id' => 'curl_timeout',
'grouping' => 'advanced-settings',
'type' => 'text',
],
[
'name' => 'Script Dev Mode',
'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.",
'id' => 'script_dev_mode',
'grouping' => 'advanced-settings',
'type' => 'checkbox',
],
[
'name' => 'Performance logging',
'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.",
'id' => 'performance_logging',
'grouping' => 'advanced-settings',
'type' => 'checkbox',
],
[
'name' => 'Turn on debug logging',
'desc' => "Turning this on helps troubleshoot error messages. This is not recommended, and may only be used on development sites.",
'id' => 'debug_on',
'grouping' => 'advanced-settings',
'type' => 'checkbox',
],
];
}
}