options = [ ['name' => "How To", 'desc' => "Control generic settings for the plugin", 'category' => 'flickr-how-to', 'buttons' => 'no-buttons', 'type' => 'section',], ['name' => "Creating a gallery", 'desc' => "Please complete the setup steps in the \"Flickr Settings\" tab before attempting to create a gallery!

To create a gallery with Flickr content you can use either a Gutenberg Block or the Add / Edit Photonic Gallery button in the Classic Editor:

Wizard", 'grouping' => 'flickr-how-to', 'type' => 'blurb',], ['name' => "Flickr settings", 'desc' => "Control settings for Flickr", 'category' => "flickr-settings", 'type' => 'section',], ['name' => "Flickr API Key", 'desc' => "To make use of the Flickr functionality you have to use your Flickr API Key. You can obtain a key online if you don't have one. Note that you are responsible for following all of the Flickr API's Terms of Service", 'id' => "flickr_api_key", 'grouping' => "flickr-settings", 'type' => 'text'], ['name' => "Flickr API Secret", 'desc' => "To make use of authenticated Flickr functionality you have to use your Flickr API secret. You can obtain a key online if you don't have one. Note that you are responsible for following all of the Flickr API's Terms of Service", 'id' => "flickr_api_secret", 'grouping' => "flickr-settings", 'type' => 'text'], ['name' => "Access Token (for Back-end / Server-side Authentication)", 'desc' => "To get your token go to Photonic → Authentication → Flickr, and authenticate. Save the token you get here.
If you have set up a token, your users can see protected Flickr photos without a Flickr account. See here for more.", 'id' => "flickr_access_token", 'grouping' => "flickr-settings", 'type' => 'text'], ['name' => "Access Token Secret (for Back-end / Server-side Authentication)", 'desc' => "To get your token secret go to Photonic → Authentication → Flickr, and authenticate. Save the token secret you get here. Your token secret works with the token set in the prvious option. See here for more.", 'id' => "flickr_token_secret", 'grouping' => "flickr-settings", 'type' => 'text'], ['name' => 'Default user', 'desc' => 'If no user is specified in the shortcode this one will be used. Note that this is not the username from https://www.flickr.com/photos/username/, but you can get the user id from Photonic → Helpers.', 'id' => 'flickr_default_user', 'grouping' => 'flickr-settings', 'type' => 'text'], ['name' => 'Media to show', 'desc' => 'You can choose to include photos as well as videos in your output. This can be overridden by the media parameter in the shortcode:', 'id' => "flickr_media", 'grouping' => "flickr-settings", 'type' => 'select', 'options' => Utilities::media_options()], ['name' => "Thumbnail size", 'desc' => "Flickr lets you display a thumbnail in the following sizes:", 'id' => "flickr_thumb_size", 'grouping' => "flickr-settings", 'type' => 'select', 'options' => [ "s" => "Small square, 75x75px", "q" => "Large square, 150x150px", "t" => "Thumbnail, 100px on longest side", "m" => "Small, 240px on longest side", "n" => "Small, 320px on longest side", ]], ['name' => "Main image size", 'desc' => "When you click on a thumbnail this size will be displayed if you are using a slideshow. If you are not using a slideshow you will be taken to the Flickr page:", 'id' => "flickr_main_size", 'grouping' => "flickr-settings", 'type' => 'select', 'options' => [ "none" => "Medium, 500px on the longest side", "z" => "Medium, 640px on longest side", "c" => "Medium, 800px on longest side", "b" => "Large, 1024px on longest side", "h" => "Large, 1600px on longest side", "k" => "Large, 2048px on longest side", "o" => "Original", ]], ['name' => "Tile image size", 'desc' => "This is applicable only if you are using the random tiled gallery, masonry or mosaic layouts. This size will be used as the image for the tiles. Picking a size smaller than the Main image size above will save bandwidth if your users don't click on individual images. Conversely, leaving this the same as the Main image size will save bandwidth if your users do click on individual images:", 'id' => "flickr_tile_size", 'grouping' => "flickr-settings", 'type' => 'select', 'options' => [ "same" => "Same as Main image size", "n" => "Small, 320px on longest side", "none" => "Medium, 500px on the longest side", "z" => "Medium, 640px on longest side", "c" => "Medium, 800px on longest side", "b" => "Large, 1024px on longest side", "h" => "Large, 1600px on longest side", "k" => "Large, 2048px on longest side", "o" => "Original", ]], ['name' => "Video size", 'desc' => "This is the video size that will be used for the lightbox:", 'id' => "flickr_video_size", 'grouping' => "flickr-settings", 'type' => 'select', 'options' => [ 'Site MP4' => 'Site MP4', 'Mobile MP4' => 'Mobile MP4', 'HD MP4' => 'HD MP4', 'Video Original' => 'Video Original', ]], ['name' => "Disable lightbox linking", 'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page.", 'id' => "flickr_disable_title_link", 'grouping' => "flickr-settings", 'type' => 'checkbox'], ['name' => "Photo titles and captions", 'desc' => "What do you want to show as the photo title in the tooltip and lightbox?", 'id' => "flickr_title_caption", 'grouping' => "flickr-settings", 'type' => 'select', 'options' => Utilities::title_caption_options()], ['name' => "Collections", 'desc' => "Control settings for Flickr collection thumbnails", 'category' => "flickr-collections", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you pick the following gallery creation options:

Collections

If you are using the shortcode, the settings kick in for [gallery type='flickr' user_id='abc' view='collections'] or [gallery type='flickr' user_id='abc' collection_id='xyz']. They are used to control the collection's thumbnail display.", 'grouping' => "flickr-collections", 'type' => 'blurb',], ['name' => "Hide Empty Collection Details", 'desc' => "This will hide the collection header if your collection has no sets. Nested collections will be displayed, however.", 'id' => "flickr_hide_empty_collection_details", 'grouping' => "flickr-collections", 'type' => 'checkbox'], ['name' => "Hide Collection Thumbnail", 'desc' => "This will hide the thumbnail that is auto-generated by Flickr for your collection.", 'id' => "flickr_hide_collection_thumbnail", 'grouping' => "flickr-collections", 'type' => 'checkbox'], ['name' => "Hide Collection Title", 'desc' => "This will hide the title for your Flickr collection.", 'id' => "flickr_hide_collection_title", 'grouping' => "flickr-collections", 'type' => 'checkbox'], ['name' => "Hide Number of Sets", 'desc' => "This will hide the number of Photosets / Albums in your Flickr collection.", 'id' => "flickr_hide_collection_set_count", 'grouping' => "flickr-collections", 'type' => 'checkbox'], ['name' => "Photoset / Album Thumbnails (with other Photosets / Albums)", 'desc' => "Control settings for Flickr Photoset thumbnails", 'category' => "flickr-sets", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you pick the following gallery creation options:

Albums

If you are using the shortcode, the settings kick in for [gallery type='flickr' user_id='abc' view='photosets'] or [gallery type='flickr' user_id='abc' collection_id='xyz'] or [gallery type='flickr' user_id='abc' view='collections']. They are used to control the Photoset's thumbnail display", 'grouping' => "flickr-sets", 'type' => 'blurb',], ['name' => "Photoset Title Display", 'desc' => "How do you want the title of the Photoset?", 'id' => "flickr_collection_set_title_display", 'grouping' => "flickr-sets", 'type' => 'radio', 'options' => $this->title_styles()], ['name' => "Hide Photo Count in Title Display", 'desc' => "This will hide the number of photos in your Photoset's title.", 'id' => "flickr_hide_collection_set_photos_count_display", 'grouping' => "flickr-sets", 'type' => 'checkbox'], ['name' => "Constrain Photosets Per Row", 'desc' => "How do you want the control the number of photoset thumbnails per row? This can be overridden by adding the 'columns' parameter to the 'gallery' shortcode.", 'id' => "flickr_collection_set_per_row_constraint", 'grouping' => "flickr-sets", 'type' => 'select', 'options' => ["padding" => "Fix the padding around the thumbnails", "count" => "Fix the number of thumbnails per row", ]], ['name' => "Constrain by padding", 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", 'id' => "flickr_collection_set_constrain_by_padding", 'grouping' => "flickr-sets", 'type' => 'text', 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."], ['name' => "Constrain by number of thumbnails", 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails", 'id' => "flickr_collection_set_constrain_by_count", 'grouping' => "flickr-sets", 'type' => 'select', 'options' => $this->selection_range(1, 25)], ['name' => "Photoset / Album Headers (Standalone Photosets / Albums)", 'desc' => "Control settings for Flickr Photosets when displayed in your page", 'category' => "flickr-set", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you pick the following gallery creation options:

Individual albums

If you are using the shortcode, the settings kick in for [gallery type='flickr' user_id='abc' photoset_id='xyz'] to show its contents on the page, or if you use [gallery type='flickr' user_id='abc' view='photosets'] and click on a thumbnail to open the included images in a popup.", 'grouping' => "flickr-set", 'type' => 'blurb',], ['name' => "Hide Header Thumbnail", 'desc' => "This will hide the thumbnail in the header for your Flickr Photoset.", 'id' => "flickr_hide_set_thumbnail", 'grouping' => "flickr-set", 'type' => 'checkbox'], ['name' => "Hide Header Title", 'desc' => "This will hide the title in the header for your Flickr Photoset.", 'id' => "flickr_hide_set_title", 'grouping' => "flickr-set", 'type' => 'checkbox'], ['name' => "Hide Number of Photos", 'desc' => "This will hide the number of photos in the header in your Flickr Photoset.", 'id' => "flickr_hide_set_photo_count", 'grouping' => "flickr-set", 'type' => 'checkbox'], ['name' => "Gallery Thumbnails (with other Galleries)", 'desc' => "Control settings for Flickr Gallery thumbnails", 'category' => "flickr-galleries", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you pick the following gallery creation options:

Galleries

If you are using the shortcode, the settings kick in for [gallery type='flickr' user_id='abc' view='galleries']. They are used to control the Gallery's thumbnail display", 'grouping' => "flickr-galleries", 'type' => 'blurb',], ['name' => "Gallery Title Display", 'desc' => "How do you want the title of the Gallery?", 'id' => "flickr_gallery_title_display", 'grouping' => "flickr-galleries", 'type' => 'radio', 'options' => $this->title_styles()], ['name' => "Hide Photo Count in Title Display", 'desc' => "This will hide the number of photos in your Gallery's title.", 'id' => "flickr_hide_gallery_photos_count_display", 'grouping' => "flickr-galleries", 'type' => 'checkbox'], ['name' => "Constrain Galleries Per Row", 'desc' => "How do you want the control the number of gallery thumbnails per row? This can be overridden by adding the 'columns' parameter to the 'gallery' shortcode.", 'id' => "flickr_galleries_per_row_constraint", 'grouping' => "flickr-galleries", 'type' => 'select', 'options' => ["padding" => "Fix the padding around the thumbnails", "count" => "Fix the number of thumbnails per row", ]], ['name' => "Constrain by padding", 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", 'id' => "flickr_galleries_constrain_by_padding", 'grouping' => "flickr-galleries", 'type' => 'text', 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."], ['name' => "Constrain by number of thumbnails", 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails", 'id' => "flickr_galleries_constrain_by_count", 'grouping' => "flickr-galleries", 'type' => 'select', 'options' => $this->selection_range(1, 25)], ['name' => "Gallery Headers (Standalone Galleries)", 'desc' => "Control settings for Flickr Galleries when displayed in your page", 'category' => "flickr-gallery", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you pick the following gallery creation options:

Individual galleries

If you are using the shortcode, the settings kick in for [gallery type='flickr' user_id='abc' gallery_id='xyz'] to show its contents on the page, or if you use [gallery type='flickr' user_id='abc' view='galleries'] and click on a thumbnail to open the included images in a popup.", 'grouping' => "flickr-gallery", 'type' => 'blurb',], ['name' => "Hide Header Thumbnail", 'desc' => "This will hide the thumbnail in the header for your Flickr Gallery.", 'id' => "flickr_hide_gallery_thumbnail", 'grouping' => "flickr-gallery", 'type' => 'checkbox'], ['name' => "Hide Header Title", 'desc' => "This will hide the title in the header for your Flickr Gallery.", 'id' => "flickr_hide_gallery_title", 'grouping' => "flickr-gallery", 'type' => 'checkbox'], ['name' => "Hide Number of Photos", 'desc' => "This will hide the number of photos in the header in your Flickr Gallery.", 'id' => "flickr_hide_gallery_photo_count", 'grouping' => "flickr-gallery", 'type' => 'checkbox'], ['name' => "Photos (Main Page)", 'desc' => "Control settings for Flickr Photos when displayed in your page", 'category' => "flickr-photos", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you pick the following gallery creation options:

Photostream

If you are using the shortcode, the settings kick in for [gallery type='flickr' user_id='abc' photoset_id='xyz'] or [gallery type='flickr' user_id='abc' view='photos']. In other words, the photos are printed directly on the page.", 'grouping' => "flickr-photos", 'type' => 'blurb',], ['name' => "Photo Title Display", 'desc' => "How do you want the title of the photos?", 'id' => "flickr_photo_title_display", 'grouping' => "flickr-photos", 'type' => 'radio', 'options' => $this->title_styles()], ['name' => "Constrain Photos Per Row", 'desc' => "How do you want the control the number of photo thumbnails per row by default? This can be overridden by adding the 'columns' parameter to the 'gallery' shortcode.", 'id' => "flickr_photos_per_row_constraint", 'grouping' => "flickr-photos", 'type' => 'select', 'options' => ["padding" => "Fix the padding around the thumbnails", "count" => "Fix the number of thumbnails per row", ]], ['name' => "Constrain by padding", 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", 'id' => "flickr_photos_constrain_by_padding", 'grouping' => "flickr-photos", 'type' => 'text', 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."], ['name' => "Constrain by number of thumbnails", 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails", 'id' => "flickr_photos_constrain_by_count", 'grouping' => "flickr-photos", 'type' => 'select', 'options' => $this->selection_range(1, 25)], ['name' => "Photos (Overlaid Popup Panel)", 'desc' => "Control settings for Flickr Photos when displayed in a popup", 'category' => "flickr-photos-pop", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you click on a Photoset thumbnail to launch an overlaid gallery. In other words, the photos are printed directly on a popup.", 'grouping' => "flickr-photos-pop", 'type' => 'blurb',], ['name' => "Photo Title Display", 'desc' => "How do you want the title of the photos?", 'id' => "flickr_photo_pop_title_display", 'grouping' => "flickr-photos-pop", 'type' => 'radio', 'options' => $this->title_styles()], ['name' => "Constrain Photos Per Row", 'desc' => "How do you want the control the number of photo thumbnails per row by default? This can be overridden by adding the 'columns' parameter to the 'gallery' shortcode.", 'id' => "flickr_photos_pop_per_row_constraint", 'grouping' => "flickr-photos-pop", 'type' => 'select', 'options' => ["padding" => "Fix the padding around the thumbnails", "count" => "Fix the number of thumbnails per row", ]], ['name' => "Constrain by padding", 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", 'id' => "flickr_photos_pop_constrain_by_padding", 'grouping' => "flickr-photos-pop", 'type' => 'text', 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."], ['name' => "Constrain by number of thumbnails", 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails", 'id' => "flickr_photos_pop_constrain_by_count", 'grouping' => "flickr-photos-pop", 'type' => 'select', 'options' => $this->selection_range(1, 25)], ]; } public static function get_instance() { if (self::$instance == null) { self::$instance = new Flickr(); } return self::$instance; } }