| @@ -1,115 +1,119 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace Photonic_Plugin\Options; |
| 4 | + | |
| 3 | 5 | use Photonic_Plugin\Core\Utilities; |
| 4 | 6 | |
| 5 | 7 | class Zenfolio extends Option_Tab { |
| 6 | - private static $instance; | |
| 7 | - | |
| 8 | - private function __construct() { | |
| 8 | + protected function __construct() { | |
| 9 | 9 | $this->options = [ |
| 10 | - ['name' => "Zenfolio Photo Settings", | |
| 11 | - 'desc' => "Control settings for Zenfolio", | |
| 10 | + [ | |
| 11 | + 'name' => "Zenfolio Photo Settings", | |
| 12 | + 'desc' => "Control settings for Zenfolio", | |
| 12 | 13 | 'category' => 'zenfolio-settings', |
| 13 | - 'type' => 'section',], | |
| 14 | + 'type' => 'section', | |
| 15 | + ], | |
| 14 | 16 | |
| 15 | - ['name' => 'Default user', | |
| 16 | - 'desc' => 'If no user is specified in the shortcode this one will be used. This is the username from https://<span style="text-decoration: underline">username</span>.zenfolio.com/', | |
| 17 | - 'id' => 'zenfolio_default_user', | |
| 17 | + [ | |
| 18 | + 'name' => 'Default user', | |
| 19 | + 'desc' => 'If no user is specified in the shortcode this one will be used. This is the username from https://<span style="text-decoration: underline">username</span>.zenfolio.com/', | |
| 20 | + 'id' => 'zenfolio_default_user', | |
| 18 | 21 | 'grouping' => 'zenfolio-settings', |
| 19 | - 'type' => 'text' | |
| 22 | + 'type' => 'text' | |
| 20 | 23 | ], |
| 21 | 24 | |
| 22 | - ['name' => 'Media to show', | |
| 23 | - 'desc' => 'You can choose to include photos as well as videos in your output. This can be overridden by the <code>media</code> parameter in the shortcode:', | |
| 24 | - 'id' => "zenfolio_media", | |
| 25 | - 'grouping' => "zenfolio-settings", | |
| 26 | - 'type' => 'select', | |
| 27 | - 'options' => Utilities::media_options() | |
| 25 | + [ | |
| 26 | + 'name' => 'Media to show', | |
| 27 | + 'desc' => 'You can choose to include photos as well as videos in your output. This can be overridden by the <code>media</code> parameter in the shortcode:', | |
| 28 | + 'id' => 'zenfolio_media', | |
| 29 | + 'grouping' => 'zenfolio-settings', | |
| 30 | + 'type' => 'select', | |
| 31 | + 'options' => Utilities::media_options() | |
| 28 | 32 | ], |
| 29 | 33 | |
| 30 | - ['name' => "Disable lightbox linking", | |
| 31 | - 'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page.", | |
| 32 | - 'id' => "zenfolio_disable_title_link", | |
| 34 | + [ | |
| 35 | + 'name' => "Disable lightbox linking", | |
| 36 | + 'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page.", | |
| 37 | + 'id' => 'zenfolio_disable_title_link', | |
| 33 | 38 | 'grouping' => 'zenfolio-settings', |
| 34 | - 'type' => 'checkbox' | |
| 39 | + 'type' => 'checkbox' | |
| 35 | 40 | ], |
| 36 | 41 | |
| 37 | - ['name' => "Constrain Photos Per Row", | |
| 38 | - 'desc' => "How do you want the control the number of photo thumbnails per row by default? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 39 | - 'id' => "zenfolio_photos_per_row_constraint", | |
| 42 | + [ | |
| 43 | + 'name' => "Constrain Photos Per Row", | |
| 44 | + 'desc' => "How do you want the control the number of photo thumbnails per row by default? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 45 | + 'id' => 'zenfolio_photos_per_row_constraint', | |
| 40 | 46 | 'grouping' => 'zenfolio-settings', |
| 41 | - 'type' => 'select', | |
| 42 | - 'options' => ["padding" => "Fix the padding around the thumbnails", | |
| 43 | - "count" => "Fix the number of thumbnails per row", | |
| 47 | + 'type' => 'select', | |
| 48 | + 'options' => [ | |
| 49 | + 'padding' => 'Automatically calculate thumbnails per row', | |
| 50 | + 'count' => 'Fix the number of thumbnails per row', | |
| 44 | 51 | ] |
| 45 | 52 | ], |
| 46 | 53 | |
| 47 | - ['name' => "Constrain by padding", | |
| 48 | - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", | |
| 49 | - 'id' => "zenfolio_photos_constrain_by_padding", | |
| 54 | + [ | |
| 55 | + 'name' => "Fixed number of thumbnails", | |
| 56 | + 'desc' => " If you have fixed the number of thumbnails per row above, enter the number of thumbnails", | |
| 57 | + 'id' => 'zenfolio_photos_constrain_by_count', | |
| 50 | 58 | 'grouping' => 'zenfolio-settings', |
| 51 | - 'type' => 'text', | |
| 52 | - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored." | |
| 59 | + 'type' => 'select', | |
| 60 | + 'options' => $this->selection_range(1, 10) | |
| 53 | 61 | ], |
| 54 | 62 | |
| 55 | - ['name' => "Constrain by number of thumbnails", | |
| 56 | - 'desc' => "If you have constrained by number of thumbnails per row above, enter the number of thumbnails", | |
| 57 | - 'id' => "zenfolio_photos_constrain_by_count", | |
| 63 | + [ | |
| 64 | + 'name' => "Thumbnail size", | |
| 65 | + 'desc' => "What size should a thumbnail be shown in if no size is specified? Zenfolio lets you display a thumbnail in the following sizes:", | |
| 66 | + 'id' => 'zenfolio_thumb_size', | |
| 58 | 67 | 'grouping' => 'zenfolio-settings', |
| 59 | - 'type' => 'select', | |
| 60 | - 'options' => $this->selection_range(1, 25) | |
| 61 | - ], | |
| 62 | - | |
| 63 | - ['name' => "Thumbnail size", | |
| 64 | - 'desc' => "What size should a thumbnail be shown in if no size is specified? Zenfolio lets you display a thumbnail in the following sizes:", | |
| 65 | - 'id' => "zenfolio_thumb_size", | |
| 66 | - 'grouping' => 'zenfolio-settings', | |
| 67 | - 'type' => 'select', | |
| 68 | - 'options' => [ | |
| 69 | - "0" => "Small thumbnail, upto 80 x 80px", | |
| 70 | - "1" => "Square thumbnail, 60 x 60px, cropped square", | |
| 71 | - "10" => "Medium thumbnail, upto 120 x 120px", | |
| 72 | - "11" => "Large thumbnail, upto 120 x 120px", | |
| 73 | - "2" => "Small image, upto 400 x 400px", | |
| 68 | + 'type' => 'select', | |
| 69 | + 'options' => [ | |
| 70 | + '0' => "Small thumbnail, upto 80 x 80px", | |
| 71 | + '1' => "Square thumbnail, 60 x 60px, cropped square", | |
| 72 | + '10' => "Medium thumbnail, upto 120 x 120px", | |
| 73 | + '11' => "Large thumbnail, upto 120 x 120px", | |
| 74 | + '2' => "Small image, upto 400 x 400px", | |
| 74 | 75 | ] |
| 75 | 76 | ], |
| 76 | 77 | |
| 77 | - ['name' => "Main image size", | |
| 78 | - 'desc' => "Show this size for the image in the lightbox:", | |
| 79 | - 'id' => "zenfolio_main_size", | |
| 78 | + [ | |
| 79 | + 'name' => "Main image size", | |
| 80 | + 'desc' => "Show this size for the image in the lightbox:", | |
| 81 | + 'id' => 'zenfolio_main_size', | |
| 80 | 82 | 'grouping' => 'zenfolio-settings', |
| 81 | - 'type' => 'select', | |
| 82 | - 'options' => [ | |
| 83 | - "2" => "Small image, upto 400 x 400px", | |
| 84 | - "3" => "Medium image, upto 580 x 450px", | |
| 85 | - "4" => "Large image, upto 800 x 630px", | |
| 86 | - "5" => "X-Large image, upto 1100 x 850px", | |
| 87 | - "6" => "XX-Large image, upto 1550 x 960px", | |
| 83 | + 'type' => 'select', | |
| 84 | + 'options' => [ | |
| 85 | + '2' => "Small image, upto 400 x 400px", | |
| 86 | + '3' => "Medium image, upto 580 x 450px", | |
| 87 | + '4' => "Large image, upto 800 x 630px", | |
| 88 | + '5' => "X-Large image, upto 1100 x 850px", | |
| 89 | + '6' => "XX-Large image, upto 1550 x 960px", | |
| 88 | 90 | ] |
| 89 | 91 | ], |
| 90 | 92 | |
| 91 | - ['name' => "Tile image size", | |
| 92 | - 'desc' => "<strong>This is applicable only if you are using the random tiled gallery, masonry or mosaic layouts.</strong> 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 <strong>don't click</strong> on individual images. Conversely, leaving this the same as the Main image size will save bandwidth if your users <strong>do click</strong> on individual images:", | |
| 93 | - 'id' => "zenfolio_tile_size", | |
| 93 | + [ | |
| 94 | + 'name' => "Tile image size", | |
| 95 | + 'desc' => "<strong>This is applicable only if you are using the random tiled gallery, masonry or mosaic layouts.</strong> 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 <strong>don't click</strong> on individual images. Conversely, leaving this the same as the Main image size will save bandwidth if your users <strong>do click</strong> on individual images:", | |
| 96 | + 'id' => 'zenfolio_tile_size', | |
| 94 | 97 | 'grouping' => 'zenfolio-settings', |
| 95 | - 'type' => 'select', | |
| 96 | - 'options' => [ | |
| 97 | - "same" => "Same as Main image size", | |
| 98 | - "2" => "Small image, upto 400 x 400px", | |
| 99 | - "3" => "Medium image, upto 580 x 450px", | |
| 100 | - "4" => "Large image, upto 800 x 630px", | |
| 101 | - "5" => "X-Large image, upto 1100 x 850px", | |
| 102 | - "6" => "XX-Large image, upto 1550 x 960px", | |
| 98 | + 'type' => 'select', | |
| 99 | + 'options' => [ | |
| 100 | + 'same' => "Same as Main image size", | |
| 101 | + '2' => "Small image, upto 400 x 400px", | |
| 102 | + '3' => "Medium image, upto 580 x 450px", | |
| 103 | + '4' => "Large image, upto 800 x 630px", | |
| 104 | + '5' => "X-Large image, upto 1100 x 850px", | |
| 105 | + '6' => "XX-Large image, upto 1550 x 960px", | |
| 103 | 106 | ] |
| 104 | 107 | ], |
| 105 | 108 | |
| 106 | - ['name' => 'Video size', | |
| 107 | - 'desc' => 'Show this size for the video in the lightbox:', | |
| 108 | - 'id' => "zenfolio_video_size", | |
| 109 | + [ | |
| 110 | + 'name' => 'Video size', | |
| 111 | + 'desc' => 'Show this size for the video in the lightbox:', | |
| 112 | + 'id' => 'zenfolio_video_size', | |
| 109 | 113 | 'grouping' => 'zenfolio-settings', |
| 110 | - 'type' => 'select', | |
| 111 | - 'options' => [ | |
| 114 | + 'type' => 'select', | |
| 115 | + 'options' => [ | |
| 112 | 116 | '220' => "360p resolution (MP4)", |
| 113 | 117 | '215' => "480p resolution (MP4)", |
| 114 | 118 | '210' => "720p resolution (MP4)", |
| 115 | 119 | '200' => "1080p resolution (MP4)", |
| @@ -115,177 +119,194 @@ | ||
| 115 | 119 | '200' => "1080p resolution (MP4)", |
| 116 | 120 | ] |
| 117 | 121 | ], |
| 118 | 122 | |
| 119 | - ['name' => "Photo Title Display", | |
| 120 | - 'desc' => "How do you want the title of the photos?", | |
| 121 | - 'id' => "zenfolio_photo_title_display", | |
| 123 | + [ | |
| 124 | + 'name' => "Photo Title Display", | |
| 125 | + 'desc' => "How do you want the title of the photos?", | |
| 126 | + 'id' => 'zenfolio_photo_title_display', | |
| 122 | 127 | 'grouping' => 'zenfolio-settings', |
| 123 | - 'type' => "radio", | |
| 124 | - 'options' => $this->title_styles(), | |
| 128 | + 'type' => "radio", | |
| 129 | + 'options' => $this->title_styles(), | |
| 125 | 130 | ], |
| 126 | 131 | |
| 127 | - ['name' => "Photo titles and captions", | |
| 128 | - 'desc' => "What do you want to show as the photo title in the tooltip and lightbox?", | |
| 129 | - 'id' => "zenfolio_title_caption", | |
| 132 | + [ | |
| 133 | + 'name' => "Photo titles and captions for the galleries / slideshows", | |
| 134 | + 'desc' => "What do you want to show as the photo title in the gallery / slideshow? This is used for the tooltips and title displays.", | |
| 135 | + 'id' => 'zenfolio_title_caption', | |
| 130 | 136 | 'grouping' => 'zenfolio-settings', |
| 131 | - 'type' => 'select', | |
| 132 | - 'options' => Utilities::title_caption_options() | |
| 137 | + 'type' => 'select', | |
| 138 | + 'options' => Utilities::title_caption_options() | |
| 133 | 139 | ], |
| 134 | 140 | |
| 135 | - ['name' => "Zenfolio Groups", | |
| 136 | - 'desc' => "Control settings for Zenfolio Groups", | |
| 141 | + $this->get_layout_engine_options('zenfolio_layout_engine', 'zenfolio-settings'), | |
| 142 | + | |
| 143 | + [ | |
| 144 | + 'name' => "Zenfolio Groups", | |
| 145 | + 'desc' => "Control settings for Zenfolio Groups", | |
| 137 | 146 | 'category' => 'zenfolio-groups', |
| 138 | - 'type' => 'section',], | |
| 147 | + 'type' => 'section', | |
| 148 | + ], | |
| 139 | 149 | |
| 140 | - ['name' => "What is this section?", | |
| 141 | - 'desc' => "Options in this section are in effect when you use the shortcode format <code>[gallery type='zenfolio' view='hierarchy' ...]</code> or <code>[gallery type='zenfolio' view='group' ...]</code>. They are used to control the Photoset's thumbnail display", | |
| 150 | + [ | |
| 151 | + 'name' => "What is this section?", | |
| 152 | + 'desc' => "Options in this section are in effect when you use the shortcode format <code>[gallery type='zenfolio' view='hierarchy' ...]</code> or <code>[gallery type='zenfolio' view='group' ...]</code>. They are used to control the Photoset's thumbnail display", | |
| 142 | 153 | 'grouping' => 'zenfolio-groups', |
| 143 | - 'type' => "blurb",], | |
| 154 | + 'type' => "blurb", | |
| 155 | + ], | |
| 144 | 156 | |
| 145 | - ['name' => "Exclude Empty Groups", | |
| 146 | - 'desc' => "Do not show groups whose immediate children photosets have no photos.", | |
| 147 | - 'id' => "zenfolio_hide_empty_groups", | |
| 157 | + [ | |
| 158 | + 'name' => "Exclude Empty Groups", | |
| 159 | + 'desc' => "Do not show groups whose immediate children photosets have no photos.", | |
| 160 | + 'id' => 'zenfolio_hide_empty_groups', | |
| 148 | 161 | 'grouping' => 'zenfolio-groups', |
| 149 | - 'type' => 'checkbox' | |
| 162 | + 'type' => 'checkbox' | |
| 150 | 163 | ], |
| 151 | 164 | |
| 152 | - ['name' => "Hide Group Title", | |
| 153 | - 'desc' => "This will hide the title for your Zenfolio Group.", | |
| 154 | - 'id' => "zenfolio_hide_group_title", | |
| 165 | + [ | |
| 166 | + 'name' => "Hide Group Title", | |
| 167 | + 'desc' => "This will hide the title for your Zenfolio Group.", | |
| 168 | + 'id' => 'zenfolio_hide_group_title', | |
| 155 | 169 | 'grouping' => 'zenfolio-groups', |
| 156 | - 'type' => 'checkbox' | |
| 170 | + 'type' => 'checkbox' | |
| 157 | 171 | ], |
| 158 | 172 | |
| 159 | - ['name' => "Link to Zenfolio", | |
| 160 | - 'desc' => "Link the group title (if shown) to the Zenfolio group page", | |
| 161 | - 'id' => "zenfolio_link_group_page", | |
| 173 | + [ | |
| 174 | + 'name' => "Link to Zenfolio", | |
| 175 | + 'desc' => "Link the group title (if shown) to the Zenfolio group page", | |
| 176 | + 'id' => 'zenfolio_link_group_page', | |
| 162 | 177 | 'grouping' => 'zenfolio-groups', |
| 163 | - 'type' => 'checkbox' | |
| 178 | + 'type' => 'checkbox' | |
| 164 | 179 | ], |
| 165 | 180 | |
| 166 | - ['name' => "Hide Number of Photos, if available", | |
| 167 | - 'desc' => "This will hide the number of photos in your Zenfolio Group.", | |
| 168 | - 'id' => "zenfolio_hide_group_photo_count", | |
| 181 | + [ | |
| 182 | + 'name' => "Hide Number of Photos, if available", | |
| 183 | + 'desc' => "This will hide the number of photos in your Zenfolio Group.", | |
| 184 | + 'id' => 'zenfolio_hide_group_photo_count', | |
| 169 | 185 | 'grouping' => 'zenfolio-groups', |
| 170 | - 'type' => 'checkbox' | |
| 186 | + 'type' => 'checkbox' | |
| 171 | 187 | ], |
| 172 | 188 | |
| 173 | - ['name' => "Hide Number of Sub-Groups, if available", | |
| 174 | - 'desc' => "This will hide the number of sub-groups in your Zenfolio Group.", | |
| 175 | - 'id' => "zenfolio_hide_group_group_count", | |
| 189 | + [ | |
| 190 | + 'name' => "Hide Number of Sub-Groups, if available", | |
| 191 | + 'desc' => "This will hide the number of sub-groups in your Zenfolio Group.", | |
| 192 | + 'id' => 'zenfolio_hide_group_group_count', | |
| 176 | 193 | 'grouping' => 'zenfolio-groups', |
| 177 | - 'type' => 'checkbox' | |
| 194 | + 'type' => 'checkbox' | |
| 178 | 195 | ], |
| 179 | 196 | |
| 180 | - ['name' => "Hide Number of Photosets, if available", | |
| 181 | - 'desc' => "This will hide the number of photosets in your Zenfolio Group.", | |
| 182 | - 'id' => "zenfolio_hide_group_set_count", | |
| 197 | + [ | |
| 198 | + 'name' => "Hide Number of Photosets, if available", | |
| 199 | + 'desc' => "This will hide the number of photosets in your Zenfolio Group.", | |
| 200 | + 'id' => 'zenfolio_hide_group_set_count', | |
| 183 | 201 | 'grouping' => 'zenfolio-groups', |
| 184 | - 'type' => 'checkbox' | |
| 202 | + 'type' => 'checkbox' | |
| 185 | 203 | ], |
| 186 | 204 | |
| 187 | - ['name' => "Zenfolio Photoset Thumbnails (with other Photosets)", | |
| 188 | - 'desc' => "Control settings for Zenfolio Photoset thumbnails", | |
| 205 | + [ | |
| 206 | + 'name' => "Zenfolio Photoset Thumbnails (with other Photosets)", | |
| 207 | + 'desc' => "Control settings for Zenfolio Photoset thumbnails", | |
| 189 | 208 | 'category' => 'zenfolio-sets', |
| 190 | - 'type' => 'section',], | |
| 209 | + 'type' => 'section', | |
| 210 | + ], | |
| 191 | 211 | |
| 192 | - ['name' => "What is this section?", | |
| 193 | - 'desc' => "Options in this section are in effect when you use the shortcode format <code>[gallery type='zenfolio' view='photosets' ...]</code>. They are used to control the Photoset's thumbnail display", | |
| 212 | + [ | |
| 213 | + 'name' => "What is this section?", | |
| 214 | + 'desc' => "Options in this section are in effect when you use the shortcode format <code>[gallery type='zenfolio' view='photosets' ...]</code>. They are used to control the Photoset's thumbnail display", | |
| 194 | 215 | 'grouping' => 'zenfolio-sets', |
| 195 | - 'type' => "blurb",], | |
| 216 | + 'type' => "blurb", | |
| 217 | + ], | |
| 196 | 218 | |
| 197 | - ['name' => "Photoset Title Display", | |
| 198 | - 'desc' => "How do you want the title of the Photoset?", | |
| 199 | - 'id' => "zenfolio_set_title_display", | |
| 219 | + [ | |
| 220 | + 'name' => "Photoset Title Display", | |
| 221 | + 'desc' => "How do you want the title of the Photoset?", | |
| 222 | + 'id' => 'zenfolio_set_title_display', | |
| 200 | 223 | 'grouping' => 'zenfolio-sets', |
| 201 | - 'type' => "radio", | |
| 202 | - 'options' => $this->title_styles(), | |
| 224 | + 'type' => "radio", | |
| 225 | + 'options' => $this->title_styles(), | |
| 203 | 226 | ], |
| 204 | 227 | |
| 205 | - ['name' => "Hide Photo Count in Title Display", | |
| 206 | - 'desc' => "This will hide the number of photos in your Photoset's title.", | |
| 207 | - 'id' => "zenfolio_hide_set_photos_count_display", | |
| 228 | + [ | |
| 229 | + 'name' => "Hide Photo Count in Title Display", | |
| 230 | + 'desc' => "This will hide the number of photos in your Photoset's title.", | |
| 231 | + 'id' => 'zenfolio_hide_set_photos_count_display', | |
| 208 | 232 | 'grouping' => 'zenfolio-sets', |
| 209 | - 'type' => 'checkbox' | |
| 233 | + 'type' => 'checkbox' | |
| 210 | 234 | ], |
| 211 | 235 | |
| 212 | - ['name' => "Hide thumbnails for Password-protected sets", | |
| 213 | - 'desc' => "This will hide the thumbnail of password-protected photosets (Password-protected sets are not currently supported, so it is advisable to hide the thumbnails).", | |
| 214 | - 'id' => "zenfolio_hide_password_protected_thumbnail", | |
| 236 | + [ | |
| 237 | + 'name' => "Hide thumbnails for Password-protected sets", | |
| 238 | + 'desc' => "This will hide the thumbnail of password-protected photosets (Password-protected sets are not currently supported, so it is advisable to hide the thumbnails).", | |
| 239 | + 'id' => 'zenfolio_hide_password_protected_thumbnail', | |
| 215 | 240 | 'grouping' => 'zenfolio-sets', |
| 216 | - 'type' => 'checkbox' | |
| 241 | + 'type' => 'checkbox' | |
| 217 | 242 | ], |
| 218 | 243 | |
| 219 | - ['name' => "Constrain Photosets Per Row", | |
| 220 | - 'desc' => "How do you want the control the number of photoset thumbnails per row? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 221 | - 'id' => "zenfolio_sets_per_row_constraint", | |
| 244 | + [ | |
| 245 | + 'name' => "Constrain Photosets Per Row", | |
| 246 | + 'desc' => "How do you want the control the number of photoset thumbnails per row? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 247 | + 'id' => 'zenfolio_sets_per_row_constraint', | |
| 222 | 248 | 'grouping' => 'zenfolio-sets', |
| 223 | - 'type' => 'select', | |
| 224 | - 'options' => ["padding" => "Fix the padding around the thumbnails", | |
| 225 | - "count" => "Fix the number of thumbnails per row", | |
| 249 | + 'type' => 'select', | |
| 250 | + 'options' => [ | |
| 251 | + 'padding' => 'Automatically calculate thumbnails per row', | |
| 252 | + 'count' => 'Fix the number of thumbnails per row', | |
| 226 | 253 | ] |
| 227 | 254 | ], |
| 228 | 255 | |
| 229 | - ['name' => "Constrain by padding", | |
| 230 | - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", | |
| 231 | - 'id' => "zenfolio_sets_constrain_by_padding", | |
| 256 | + [ | |
| 257 | + 'name' => "Fixed number of thumbnails", | |
| 258 | + 'desc' => " If you have fixed the number of thumbnails per row above, enter the number of thumbnails", | |
| 259 | + 'id' => 'zenfolio_sets_constrain_by_count', | |
| 232 | 260 | 'grouping' => 'zenfolio-sets', |
| 233 | - 'type' => 'text', | |
| 234 | - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored." | |
| 261 | + 'type' => 'select', | |
| 262 | + 'options' => $this->selection_range(1, 10) | |
| 235 | 263 | ], |
| 236 | 264 | |
| 237 | - ['name' => "Constrain by number of thumbnails", | |
| 238 | - 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails", | |
| 239 | - 'id' => "zenfolio_sets_constrain_by_count", | |
| 240 | - 'grouping' => 'zenfolio-sets', | |
| 241 | - 'type' => 'select', | |
| 242 | - 'options' => $this->selection_range(1, 25) | |
| 265 | + [ | |
| 266 | + 'name' => "Zenfolio Photoset Header Thumbnails", | |
| 267 | + 'desc' => "Control settings for Zenfolio Photosets when displayed in your page", | |
| 268 | + 'category' => 'zenfolio-set', | |
| 269 | + 'type' => 'section', | |
| 243 | 270 | ], |
| 244 | 271 | |
| 245 | - ['name' => "Zenfolio Photoset Header Thumbnails", | |
| 246 | - 'desc' => "Control settings for Zenfolio Photosets when displayed in your page", | |
| 247 | - 'category' => 'zenfolio-set', | |
| 248 | - 'type' => 'section',], | |
| 249 | - | |
| 250 | - ['name' => "What is this section?", | |
| 251 | - 'desc' => "Options in this section are in effect when you use the shortcode format <code>[gallery type='zenfolio' view='photosets' ...]</code>. In other words, the gallery output for the Photoset is directly on the page, or in a popup and you want to control your Photoset's thumbnail.", | |
| 272 | + [ | |
| 273 | + 'name' => "What is this section?", | |
| 274 | + 'desc' => "Options in this section are in effect when you use the shortcode format <code>[gallery type='zenfolio' view='photosets' ...]</code>. In other words, the gallery output for the Photoset is directly on the page, or in a popup and you want to control your Photoset's thumbnail.", | |
| 252 | 275 | 'grouping' => 'zenfolio-set', |
| 253 | - 'type' => "blurb",], | |
| 276 | + 'type' => "blurb", | |
| 277 | + ], | |
| 254 | 278 | |
| 255 | - ['name' => "Hide Photoset Thumbnail", | |
| 256 | - 'desc' => "This will hide the thumbnail for your Zenfolio Photoset.", | |
| 257 | - 'id' => "zenfolio_hide_set_thumbnail", | |
| 279 | + [ | |
| 280 | + 'name' => "Hide Photoset Thumbnail", | |
| 281 | + 'desc' => "This will hide the thumbnail for your Zenfolio Photoset.", | |
| 282 | + 'id' => 'zenfolio_hide_set_thumbnail', | |
| 258 | 283 | 'grouping' => 'zenfolio-set', |
| 259 | - 'type' => 'checkbox' | |
| 284 | + 'type' => 'checkbox' | |
| 260 | 285 | ], |
| 261 | 286 | |
| 262 | - ['name' => "Hide Photoset Title", | |
| 263 | - 'desc' => "This will hide the title for your Zenfolio Photoset.", | |
| 264 | - 'id' => "zenfolio_hide_set_title", | |
| 287 | + [ | |
| 288 | + 'name' => "Hide Photoset Title", | |
| 289 | + 'desc' => "This will hide the title for your Zenfolio Photoset.", | |
| 290 | + 'id' => 'zenfolio_hide_set_title', | |
| 265 | 291 | 'grouping' => 'zenfolio-set', |
| 266 | - 'type' => 'checkbox' | |
| 292 | + 'type' => 'checkbox' | |
| 267 | 293 | ], |
| 268 | 294 | |
| 269 | - ['name' => "Link to Zenfolio", | |
| 270 | - 'desc' => "Link the set thumbnail and title (if shown) to the Zenfolio set page", | |
| 271 | - 'id' => "zenfolio_link_set_page", | |
| 295 | + [ | |
| 296 | + 'name' => "Link to Zenfolio", | |
| 297 | + 'desc' => "Link the set thumbnail and title (if shown) to the Zenfolio set page", | |
| 298 | + 'id' => 'zenfolio_link_set_page', | |
| 272 | 299 | 'grouping' => 'zenfolio-set', |
| 273 | - 'type' => 'checkbox' | |
| 300 | + 'type' => 'checkbox' | |
| 274 | 301 | ], |
| 275 | 302 | |
| 276 | - ['name' => "Hide Number of Photos", | |
| 277 | - 'desc' => "This will hide the number of photos in your Zenfolio Photoset.", | |
| 278 | - 'id' => "zenfolio_hide_set_photo_count", | |
| 303 | + [ | |
| 304 | + 'name' => "Hide Number of Photos", | |
| 305 | + 'desc' => "This will hide the number of photos in your Zenfolio Photoset.", | |
| 306 | + 'id' => 'zenfolio_hide_set_photo_count', | |
| 279 | 307 | 'grouping' => 'zenfolio-set', |
| 280 | - 'type' => 'checkbox' | |
| 308 | + 'type' => 'checkbox' | |
| 281 | 309 | ], |
| 282 | 310 | ]; |
| 283 | - } | |
| 284 | - | |
| 285 | - public static function get_instance() { | |
| 286 | - if (self::$instance == null) { | |
| 287 | - self::$instance = new Zenfolio(); | |
| 288 | - } | |
| 289 | - return self::$instance; | |
| 290 | 311 | } |
| 291 | 312 | } |