options = [ ['name' => "How To", 'desc' => "Control generic settings for the plugin", 'category' => 'smug-how-to', 'buttons' => 'no-buttons', 'type' => 'section',], ['name' => "Creating a gallery", 'desc' => "To create a gallery with SmugMug content you can use either a Gutenberg Block or the Add / Edit Photonic Gallery button in the Classic Editor:

Wizard", 'grouping' => 'smug-how-to', 'type' => 'blurb',], ['name' => "SmugMug settings", 'desc' => "Control settings for SmugMug", 'category' => 'smug-settings', 'type' => 'section',], ['name' => "SmugMug API Key", 'desc' => "A SmugMug API key is not required unless you want to show private albums using authentication.
To make use of the SmugMug authentication you have to use your SmugMug API Key.
See here for help.", 'id' => "smug_api_key", 'grouping' => 'smug-settings', 'type' => 'text' ], ['name' => "SmugMug API Secret", 'desc' => "You have to enter the Secret provided by SmugMug after you have registered your application.", 'id' => "smug_api_secret", 'grouping' => 'smug-settings', 'type' => 'text' ], ['name' => "Access Token (for authentication)", 'desc' => "To get your token go to Photonic → Authentication → SmugMug, and authenticate. Save the token you get here.
If you have set up a token, your users can see protected SmugMug photos without a SmugMug account. See here for more.", 'id' => "smug_access_token", 'grouping' => 'smug-settings', 'type' => 'text' ], ['name' => "Access Token Secret (for authentication)", 'desc' => "To get your token secret go to Photonic → Authentication → SmugMug, 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' => "smug_token_secret", 'grouping' => 'smug-settings', 'type' => 'text' ], ['name' => 'Default user', 'desc' => 'If no user is specified in the shortcode this one will be used. This is the username from https://username.smugmug.com/', 'id' => 'smug_default_user', 'grouping' => 'smug-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' => "smug_media", 'grouping' => 'smug-settings', 'type' => 'select', 'options' => Utilities::media_options() ], ['name' => "Thumbnail size", 'desc' => "Pick a standard size provided by SmugMug for your thumbnails:", 'id' => "smug_thumb_size", 'grouping' => 'smug-settings', 'type' => 'select', 'options' => ["Tiny" => "Tiny", "Thumb" => "Thumb", "Small" => "Small"] ], ['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 SmugMug page:", 'id' => "smug_main_size", 'grouping' => 'smug-settings', 'type' => 'select', 'options' => [ '4K' => '4K (not always available)', '5K' => '5K (not always available)', "Medium" => "Medium", "Original" => "Original (not always available)", "Large" => "Large", 'Largest' => 'Largest', "XLarge" => "XLarge (not always available)", "X2Large" => "X2Large (not always available)", "X3Large" => "X3Large (not always available)", "X4Large" => "X3Large (not always available)", "X5Large" => "X3Large (not always available)", ] ], ['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' => "smug_tile_size", 'grouping' => 'smug-settings', 'type' => 'select', 'options' => [ "same" => "Same as Main image size", "Small" => "Small", '4K' => '4K (not always available)', '5K' => '5K (not always available)', "Medium" => "Medium", "Original" => "Original (not always available)", "Large" => "Large", 'Largest' => 'Largest', "XLarge" => "XLarge (not always available)", "X2Large" => "X2Large (not always available)", "X3Large" => "X3Large (not always available)", "X4Large" => "X3Large (not always available)", "X5Large" => "X3Large (not always available)", ] ], ['name' => "Video 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 SmugMug page:", 'id' => "smug_video_size", 'grouping' => 'smug-settings', 'type' => 'select', 'options' => [ '110' => '110px along longest side', '200' => '200px along longest side', '320' => '320px along longest side', '640' => '640px along longest side', '1280' => '1280px along longest side', '1920' => '1920px along longest side', 'Largest' => 'Largest', ] ], ['name' => "Disable lightbox linking", 'desc' => "Check this to disable linking the album title and/or thumbnail, or the title in the lightbox to the SmugMug page for the album / photo.", 'id' => "smug_disable_title_link", 'grouping' => 'smug-settings', 'type' => 'checkbox' ], ['name' => "Show \"Buy\" link", 'desc' => "Click to show a link to purchase the photo. This shows up in a lightbox, enabled.", 'id' => "smug_show_buy_link", 'grouping' => 'smug-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' => "smug_title_caption", 'grouping' => 'smug-settings', 'type' => 'select', 'options' => Utilities::title_caption_options() ], ['name' => "Album Thumbnails (with other Albums)", 'desc' => "Control settings for SmugMug Album thumbnails", 'category' => "smug-albums", '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='smugmug' nick_name='abc'] or [gallery type='smugmug' nick_name='abc' view='albums'] or [gallery type='smugmug' nick_name='abc' view='tree']. They are used to control the Album's thumbnail display", 'grouping' => "smug-albums", 'type' => 'blurb',], ['name' => "Album Title Display", 'desc' => "How do you want the title of the Album?", 'id' => "smug_albums_album_title_display", 'grouping' => "smug-albums", 'type' => 'radio', 'options' => $this->title_styles(), ], ['name' => "Hide Photo Count in Title Display", 'desc' => "This will hide the number of photos in your Album's title.", 'id' => "smug_hide_albums_album_photos_count_display", 'grouping' => "smug-albums", 'type' => 'checkbox' ], ['name' => "Hide thumbnails for Password-protected albums", 'desc' => "This will hide the thumbnail of password-protected albums.", 'id' => "smug_hide_password_protected_thumbnail", 'grouping' => "smug-albums", 'type' => 'checkbox' ], ['name' => 'Album sort order', 'desc' => 'What should the results be sorted by?', 'id' => 'smug_album_sort_order', 'grouping' => 'smug-albums', 'type' => 'select', 'options' => [ 'Last Updated (Descending)' => 'Last Updated (Descending)', 'Last Updated (Ascending)' => 'Last Updated (Ascending)', 'Date Added (Descending)' => 'Date Added (Descending)', 'Date Added (Ascending)' => 'Date Added (Ascending)', ] ], ['name' => "Constrain Albums Per Row", 'desc' => "How do you want the control the number of album thumbnails per row? This can be overridden by adding the 'columns' parameter to the 'gallery' shortcode.", 'id' => "smug_albums_album_per_row_constraint", 'grouping' => "smug-albums", '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' => "smug_albums_album_constrain_by_padding", 'grouping' => "smug-albums", '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' => "smug_albums_album_constrain_by_count", 'grouping' => "smug-albums", 'type' => 'select', 'options' => $this->selection_range(1, 25) ], ['name' => "Photos (Main Page)", 'desc' => "Control settings for SmugMug Photos when displayed in your page", 'category' => "smug-photos", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you pick the following gallery creation options:

Photos

If you are using the shortcode, the settings kick in for [gallery type='smugmug' nick_name='abc' view='album' album='pqr'] or [gallery type='smugmug' nick_name='abc' view='images' album='pqr']. In other words, the photos are printed directly on the page.", 'grouping' => "smug-photos", 'type' => 'blurb',], ['name' => "Hide Album Thumbnail", 'desc' => "This will hide the thumbnail for your SmugMug Album.", 'id' => "smug_hide_album_thumbnail", 'grouping' => "smug-photos", 'type' => 'checkbox' ], ['name' => "Hide Album Title", 'desc' => "This will hide the title for your SmugMug Album.", 'id' => "smug_hide_album_title", 'grouping' => "smug-photos", 'type' => 'checkbox' ], ['name' => "Hide Number of Photos", 'desc' => "This will hide the number of photos in your SmugMug Album.", 'id' => "smug_hide_album_photo_count", 'grouping' => "smug-photos", 'type' => 'checkbox' ], ['name' => "Photo Title Display", 'desc' => "How do you want the title of the photos?", 'id' => "smug_photo_title_display", 'grouping' => "smug-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' => "smug_photos_per_row_constraint", 'grouping' => "smug-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' => "smug_photos_constrain_by_padding", 'grouping' => "smug-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' => "smug_photos_constrain_by_count", 'grouping' => "smug-photos", 'type' => 'select', 'options' => $this->selection_range(1, 25) ], ['name' => "Photos (Popup Panel)", 'desc' => "Control settings for SmugMug Photos when displayed in a popup", 'category' => "smug-photos-pop", 'type' => 'section',], ['name' => "What is this section?", 'desc' => "Options in this section are in effect when you use the shortcode format [gallery type='smugmug' nick_name='abc' view='albums'], and you click on an album thumbnail to open its photos in an overlaid panel.", 'grouping' => "smug-photos-pop", 'type' => 'blurb',], ['name' => "Photo Title Display", 'desc' => "How do you want the title of the photos?", 'id' => "smug_photo_pop_title_display", 'grouping' => "smug-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' => "smug_photos_pop_per_row_constraint", 'grouping' => "smug-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' => "smug_photos_pop_constrain_by_padding", 'grouping' => "smug-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' => "smug_photos_pop_constrain_by_count", 'grouping' => "smug-photos-pop", 'type' => 'select', 'options' => $this->selection_range(1, 25) ], ]; } public static function get_instance() { if (self::$instance == null) { self::$instance = new SmugMug(); } return self::$instance; } }