PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 3.36
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v3.36
3.36 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 All 141 releases
← All changes | Options/Flickr.php +411 -352 2.413.36 View file →
@@ -1,429 +1,488 @@
1 1 <?php
2 +
2 3 namespace Photonic_Plugin\Options;
3 4
4 -use Photonic_Plugin\Core\Photonic;
5 5 use Photonic_Plugin\Core\Utilities;
6 6
7 7 class Flickr extends Option_Tab {
8 - private static $instance;
9 -
10 - private function __construct() {
8 + protected function __construct() {
11 9 $this->options = [
12 - ['name' => "How To",
13 - 'desc' => "Control generic settings for the plugin",
10 + [
11 + 'name' => "How To",
12 + 'desc' => "Control generic settings for the plugin",
14 13 'category' => 'flickr-how-to',
15 - 'buttons' => 'no-buttons',
16 - 'type' => 'section',],
14 + 'buttons' => 'no-buttons',
15 + 'type' => 'section',
16 + ],
17 17
18 - ['name' => "Creating a gallery",
19 - 'desc' => "<strong>Please complete the setup steps in the \"Flickr Settings\" tab before attempting to create a gallery!</strong> <br/><br/>
18 + [
19 + 'name' => "Creating a gallery",
20 + 'desc' => "<strong>Please complete the setup steps in the \"Flickr Settings\" tab before attempting to create a gallery!</strong> <br/><br/>
20 21 To create a gallery with Flickr content you can use either a <strong><em>Gutenberg Block</em></strong>
21 22 or the <em>Add / Edit Photonic Gallery</em> button in the <strong><em>Classic Editor</em></strong>:<br/><br/>
22 - <img src='".PHOTONIC_URL."Options/screenshots/Flickr-1.png' style='max-width: 600px;' alt='Wizard' />",
23 + <img src='" . PHOTONIC_URL . "Options/screenshots/Flickr-1.png' style='max-width: 600px;' alt='Wizard' />",
23 24 'grouping' => 'flickr-how-to',
24 - 'type' => 'blurb',],
25 + 'type' => 'blurb',
26 + ],
25 27
26 - ['name' => "Flickr settings",
27 - 'desc' => "Control settings for Flickr",
28 - 'category' => "flickr-settings",
29 - 'type' => 'section',],
28 + [
29 + 'name' => "Flickr settings",
30 + 'desc' => "Control settings for Flickr",
31 + 'category' => 'flickr-settings',
32 + 'type' => 'section',
33 + ],
30 34
31 - ['name' => "Flickr API Key",
32 - 'desc' => "To make use of the Flickr functionality you have to use your Flickr API Key.
33 - You can <a href='http://www.flickr.com/services/api/misc.api_keys.html'>obtain a key online</a> if you don't have one.
34 - Note that you are responsible for following all of the Flickr API's <a href='http://www.flickr.com/services/api/tos/'>Terms of Service</a>",
35 - 'id' => "flickr_api_key",
36 - 'grouping' => "flickr-settings",
37 - 'type' => 'text'],
35 + [
36 + 'name' => "Flickr API Key",
37 + 'desc' => "To make use of the Flickr functionality you have to use your Flickr API Key.
38 + You can <a href='https://www.flickr.com/services/api/misc.api_keys.html'>obtain a key online</a> if you don't have one.
39 + Note that you are responsible for following the Flickr API's <a href='https://www.flickr.com/services/api/tos/'>Terms of Service</a>",
40 + 'id' => 'flickr_api_key',
41 + 'grouping' => 'flickr-settings',
42 + 'type' => 'text'
43 + ],
38 44
39 - ['name' => "Flickr API Secret",
40 - 'desc' => "To make use of authenticated Flickr functionality you have to use your Flickr API secret.
41 - You can <a href='http://www.flickr.com/services/api/misc.api_keys.html'>obtain a key online</a> if you don't have one.
42 - Note that you are responsible for following all of the Flickr API's <a href='http://www.flickr.com/services/api/tos/'>Terms of Service</a>",
43 - 'id' => "flickr_api_secret",
44 - 'grouping' => "flickr-settings",
45 - 'type' => 'text'],
45 + [
46 + 'name' => "Flickr API Secret",
47 + 'desc' => "To make use of authenticated Flickr functionality you have to use your Flickr API secret.
48 + You can <a href='https://www.flickr.com/services/api/misc.api_keys.html'>obtain a key online</a> if you don't have one.
49 + Note that you are responsible for following the Flickr API's <a href='https://www.flickr.com/services/api/tos/'>Terms of Service</a>",
50 + 'id' => 'flickr_api_secret',
51 + 'grouping' => 'flickr-settings',
52 + 'type' => 'text'
53 + ],
46 54
47 - ['name' => "Access Token (for Back-end / Server-side Authentication)",
48 - 'desc' => "To get your token go to <em>Photonic &rarr; Authentication &rarr; Flickr</em>, and authenticate. Save the token you get here. <br/>If you have set
55 + [
56 + 'name' => "Access Token",
57 + 'desc' => "To get your token go to <em>Photonic &rarr; Authentication &rarr; Flickr</em>, and authenticate. Save the token you get here. <br/>If you have set
49 58 up a token, your users can see protected Flickr photos without a Flickr account. See <a href='https://aquoid.com/plugins/photonic/authentication/'>here</a> for more.",
50 - 'id' => "flickr_access_token",
51 - 'grouping' => "flickr-settings",
52 - 'type' => 'text'],
59 + 'id' => 'flickr_access_token',
60 + 'grouping' => 'flickr-settings',
61 + 'type' => 'text'
62 + ],
53 63
54 - ['name' => "Access Token Secret (for Back-end / Server-side Authentication)",
55 - 'desc' => "To get your token secret go to <em>Photonic &rarr; Authentication &rarr; Flickr</em>, and authenticate. Save the token secret you get here. Your token secret works with the token set in the prvious option. See <a href='https://aquoid.com/plugins/photonic/authentication/'>here</a> for more.",
56 - 'id' => "flickr_token_secret",
57 - 'grouping' => "flickr-settings",
58 - 'type' => 'text'],
64 + [
65 + 'name' => "Access Token Secret",
66 + 'desc' => "To get your token secret go to <em>Photonic &rarr; Authentication &rarr; Flickr</em>, and authenticate. Save the token secret you get here. Your token secret works with the token set in the previous option. See <a href='https://aquoid.com/plugins/photonic/authentication/'>here</a> for more.",
67 + 'id' => 'flickr_token_secret',
68 + 'grouping' => 'flickr-settings',
69 + 'type' => 'text'
70 + ],
59 71
60 - ['name' => 'Default user',
61 - 'desc' => 'If no user is specified in the shortcode this one will be used. <strong>Note that this is not the username from https://www.flickr.com/photos/<span style="text-decoration: underline">username</span>/</strong>, but you can get the user id from <em>Photonic &rarr; Helpers</em>.',
62 - 'id' => 'flickr_default_user',
72 + [
73 + 'name' => 'Default user',
74 + 'desc' => 'If no user is specified in the shortcode this one will be used. <strong>Note that this is not the username from https://www.flickr.com/photos/<span style="text-decoration: underline">username</span>/</strong>, but you can get the user id from <em>Photonic &rarr; Helpers</em>.',
75 + 'id' => 'flickr_default_user',
63 76 'grouping' => 'flickr-settings',
64 - 'type' => 'text'],
77 + 'type' => 'text'
78 + ],
65 79
66 - ['name' => 'Media to show',
67 - '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:',
68 - 'id' => "flickr_media",
69 - 'grouping' => "flickr-settings",
70 - 'type' => 'select',
71 - 'options' => Utilities::media_options()],
80 + [
81 + 'name' => 'Media to show',
82 + '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:',
83 + 'id' => 'flickr_media',
84 + 'grouping' => 'flickr-settings',
85 + 'type' => 'select',
86 + 'options' => Utilities::media_options()
87 + ],
72 88
73 - ['name' => "Thumbnail size",
74 - 'desc' => "Flickr lets you display a thumbnail in the following sizes:",
75 - 'id' => "flickr_thumb_size",
76 - 'grouping' => "flickr-settings",
77 - 'type' => 'select',
78 - 'options' => [
79 - "s" => "Small square, 75x75px",
80 - "q" => "Large square, 150x150px",
81 - "t" => "Thumbnail, 100px on longest side",
82 - "m" => "Small, 240px on longest side",
83 - "n" => "Small, 320px on longest side",
84 - ]],
89 + [
90 + 'name' => 'Thumbnail size',
91 + 'desc' => 'Flickr lets you display a thumbnail in the following sizes:',
92 + 'id' => 'flickr_thumb_size',
93 + 'grouping' => 'flickr-settings',
94 + 'type' => 'select',
95 + 'options' => [
96 + 's' => 'Small square, 75x75px',
97 + 'q' => 'Large square, 150x150px',
98 + 't' => 'Thumbnail, 100px on longest side',
99 + 'm' => 'Small, 240px on longest side',
100 + 'n' => 'Small, 320px on longest side',
101 + ]
102 + ],
85 103
86 - ['name' => "Main image size",
87 - '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:",
88 - 'id' => "flickr_main_size",
89 - 'grouping' => "flickr-settings",
90 - 'type' => 'select',
91 - 'options' => [
92 - "none" => "Medium, 500px on the longest side",
93 - "z" => "Medium, 640px on longest side",
94 - "c" => "Medium, 800px on longest side",
95 - "b" => "Large, 1024px on longest side",
96 - "h" => "Large, 1600px on longest side",
97 - "k" => "Large, 2048px on longest side",
98 - "o" => "Original",
99 - ]],
104 + [
105 + 'name' => 'Main image size',
106 + '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:',
107 + 'id' => 'flickr_main_size',
108 + 'grouping' => 'flickr-settings',
109 + 'type' => 'select',
110 + 'options' => [
111 + 'none' => 'Medium, 500px on the longest side',
112 + 'z' => 'Medium, 640px on longest side',
113 + 'c' => 'Medium, 800px on longest side',
114 + 'b' => 'Large, 1024px on longest side',
115 + 'h' => 'Large, 1600px on longest side',
116 + 'k' => 'Large, 2048px on longest side',
117 + 'o' => 'Original',
118 + ]
119 + ],
100 120
101 - ['name' => "Tile image size",
102 - '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:",
103 - 'id' => "flickr_tile_size",
104 - 'grouping' => "flickr-settings",
105 - 'type' => 'select',
106 - 'options' => [
107 - "same" => "Same as Main image size",
108 - "n" => "Small, 320px on longest side",
109 - "none" => "Medium, 500px on the longest side",
110 - "z" => "Medium, 640px on longest side",
111 - "c" => "Medium, 800px on longest side",
112 - "b" => "Large, 1024px on longest side",
113 - "h" => "Large, 1600px on longest side",
114 - "k" => "Large, 2048px on longest side",
115 - "o" => "Original",
116 - ]],
121 + [
122 + 'name' => 'Tile image size',
123 + '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:",
124 + 'id' => 'flickr_tile_size',
125 + 'grouping' => 'flickr-settings',
126 + 'type' => 'select',
127 + 'options' => [
128 + 'same' => 'Same as Main image size',
129 + 'n' => 'Small, 320px on longest side',
130 + 'none' => 'Medium, 500px on the longest side',
131 + 'z' => 'Medium, 640px on longest side',
132 + 'c' => 'Medium, 800px on longest side',
133 + 'b' => 'Large, 1024px on longest side',
134 + 'h' => 'Large, 1600px on longest side',
135 + 'k' => 'Large, 2048px on longest side',
136 + 'o' => 'Original',
137 + ]
138 + ],
117 139
118 - ['name' => "Video size",
119 - 'desc' => "This is the video size that will be used for the lightbox:",
120 - 'id' => "flickr_video_size",
121 - 'grouping' => "flickr-settings",
122 - 'type' => 'select',
123 - 'options' => [
124 - 'Site MP4' => 'Site MP4',
125 - 'Mobile MP4' => 'Mobile MP4',
126 - 'HD MP4' => 'HD MP4',
140 + [
141 + 'name' => "Video size",
142 + 'desc' => "This is the video size that will be used for the lightbox:",
143 + 'id' => 'flickr_video_size',
144 + 'grouping' => 'flickr-settings',
145 + 'type' => 'select',
146 + 'options' => [
147 + 'Site MP4' => 'Site MP4',
148 + 'Mobile MP4' => 'Mobile MP4',
149 + 'HD MP4' => 'HD MP4',
127 150 'Video Original' => 'Video Original',
128 - ]],
151 + 'Video Player' => 'Video Player',
152 + '1080p' => '1080p',
153 + '720p' => '720p',
154 + '360p' => '360p',
155 + '288p' => '288p',
156 + ]
157 + ],
129 158
130 - ['name' => "Disable lightbox linking",
131 - 'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page.",
132 - 'id' => "flickr_disable_title_link",
133 - 'grouping' => "flickr-settings",
134 - 'type' => 'checkbox'],
159 + [
160 + 'name' => "Disable lightbox linking",
161 + 'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page.",
162 + 'id' => 'flickr_disable_title_link',
163 + 'grouping' => 'flickr-settings',
164 + 'type' => 'checkbox'
165 + ],
135 166
136 - ['name' => "Photo titles and captions",
137 - 'desc' => "What do you want to show as the photo title in the tooltip and lightbox?",
138 - 'id' => "flickr_title_caption",
139 - 'grouping' => "flickr-settings",
140 - 'type' => 'select',
141 - 'options' => Utilities::title_caption_options()],
167 + [
168 + 'name' => "Photo titles and captions for the galleries / slideshows",
169 + 'desc' => "What do you want to show as the photo title in the gallery / slideshow? This is used for the tooltips and title displays.",
170 + 'id' => 'flickr_title_caption',
171 + 'grouping' => 'flickr-settings',
172 + 'type' => 'select',
173 + 'options' => Utilities::title_caption_options()
174 + ],
142 175
143 - ['name' => "Collections",
144 - 'desc' => "Control settings for Flickr collection thumbnails",
145 - 'category' => "flickr-collections",
146 - 'type' => 'section',],
176 + $this->get_layout_engine_options('flickr_layout_engine', 'flickr-settings'),
147 177
148 - ['name' => "What is this section?",
149 - 'desc' => "Options in this section are in effect when you pick the following gallery creation options:<br/><br/>
150 - <img src='".PHOTONIC_URL."Options/screenshots/Flickr-5.png' style='max-width: 600px;' alt='Collections'/><br/><br/>
178 + [
179 + 'name' => "Collections",
180 + 'desc' => "Control settings for Flickr collection thumbnails",
181 + 'category' => 'flickr-collections',
182 + 'type' => 'section',
183 + ],
184 +
185 + [
186 + 'name' => "What is this section?",
187 + 'desc' => "Options in this section are in effect when you pick the following wizard options:<br/><br/>
188 + <img src='" . PHOTONIC_URL . "Options/screenshots/Flickr-5.png' style='max-width: 600px;' alt='Collections'/><br/><br/>
151 189 If you are using the shortcode, the settings kick in for <code>[gallery type='flickr' user_id='abc' view='collections']</code>
152 190 or <code>[gallery type='flickr' user_id='abc' collection_id='xyz']</code>. They are used to control the collection's thumbnail display.",
153 - 'grouping' => "flickr-collections",
154 - 'type' => 'blurb',],
191 + 'grouping' => 'flickr-collections',
192 + 'type' => 'blurb',
193 + ],
155 194
156 - ['name' => "Hide Empty Collection Details",
157 - 'desc' => "This will hide the collection header if your collection has no sets. Nested collections will be displayed, however.",
158 - 'id' => "flickr_hide_empty_collection_details",
159 - 'grouping' => "flickr-collections",
160 - 'type' => 'checkbox'],
195 + [
196 + 'name' => "Hide Empty Collection Details",
197 + 'desc' => "This will hide the collection header if your collection has no sets. Nested collections will be displayed, however.",
198 + 'id' => 'flickr_hide_empty_collection_details',
199 + 'grouping' => 'flickr-collections',
200 + 'type' => 'checkbox'
201 + ],
161 202
162 - ['name' => "Hide Collection Thumbnail",
163 - 'desc' => "This will hide the thumbnail that is auto-generated by Flickr for your collection.",
164 - 'id' => "flickr_hide_collection_thumbnail",
165 - 'grouping' => "flickr-collections",
166 - 'type' => 'checkbox'],
203 + [
204 + 'name' => "Hide Collection Thumbnail",
205 + 'desc' => "This will hide the thumbnail that is auto-generated by Flickr for your collection.",
206 + 'id' => 'flickr_hide_collection_thumbnail',
207 + 'grouping' => 'flickr-collections',
208 + 'type' => 'checkbox'
209 + ],
167 210
168 - ['name' => "Hide Collection Title",
169 - 'desc' => "This will hide the title for your Flickr collection.",
170 - 'id' => "flickr_hide_collection_title",
171 - 'grouping' => "flickr-collections",
172 - 'type' => 'checkbox'],
211 + [
212 + 'name' => "Hide Collection Title",
213 + 'desc' => "This will hide the title for your Flickr collection.",
214 + 'id' => 'flickr_hide_collection_title',
215 + 'grouping' => 'flickr-collections',
216 + 'type' => 'checkbox'
217 + ],
173 218
174 - ['name' => "Hide Number of Sets",
175 - 'desc' => "This will hide the number of Photosets / Albums in your Flickr collection.",
176 - 'id' => "flickr_hide_collection_set_count",
177 - 'grouping' => "flickr-collections",
178 - 'type' => 'checkbox'],
219 + [
220 + 'name' => "Hide Number of Sets",
221 + 'desc' => "This will hide the number of Photosets / Albums in your Flickr collection.",
222 + 'id' => 'flickr_hide_collection_set_count',
223 + 'grouping' => 'flickr-collections',
224 + 'type' => 'checkbox'
225 + ],
179 226
180 - ['name' => "Photoset / Album Thumbnails (with other Photosets / Albums)",
181 - 'desc' => "Control settings for Flickr Photoset thumbnails",
182 - 'category' => "flickr-sets",
183 - 'type' => 'section',],
227 + [
228 + 'name' => "Photoset / Album Thumbnails (with other Photosets / Albums)",
229 + 'desc' => "Control settings for Flickr Photoset thumbnails",
230 + 'category' => 'flickr-sets',
231 + 'type' => 'section',
232 + ],
184 233
185 - ['name' => "What is this section?",
186 - 'desc' => "Options in this section are in effect when you pick the following gallery creation options:<br/><br/>
187 - <img src='".PHOTONIC_URL."Options/screenshots/Flickr-3.png' style='max-width: 600px;' alt='Albums'/><br/><br/>
234 + [
235 + 'name' => "What is this section?",
236 + 'desc' => "Options in this section are in effect when you pick the following wizard options:<br/><br/>
237 + <img src='" . PHOTONIC_URL . "Options/screenshots/Flickr-3.png' style='max-width: 600px;' alt='Albums'/><br/><br/>
188 238 If you are using the shortcode, the settings kick in for <code>[gallery type='flickr' user_id='abc' view='photosets']</code> or <code>[gallery type='flickr' user_id='abc' collection_id='xyz']</code>
189 239 or <code>[gallery type='flickr' user_id='abc' view='collections']</code>. They are used to control the Photoset's thumbnail display",
190 - 'grouping' => "flickr-sets",
191 - 'type' => 'blurb',],
240 + 'grouping' => 'flickr-sets',
241 + 'type' => 'blurb',
242 + ],
192 243
193 - ['name' => "Photoset Title Display",
194 - 'desc' => "How do you want the title of the Photoset?",
195 - 'id' => "flickr_collection_set_title_display",
196 - 'grouping' => "flickr-sets",
197 - 'type' => 'radio',
198 - 'options' => $this->title_styles()],
244 + [
245 + 'name' => "Photoset Title Display",
246 + 'desc' => "How do you want the title of the Photoset?",
247 + 'id' => 'flickr_collection_set_title_display',
248 + 'grouping' => 'flickr-sets',
249 + 'type' => 'radio',
250 + 'options' => $this->title_styles()
251 + ],
199 252
200 - ['name' => "Hide Photo Count in Title Display",
201 - 'desc' => "This will hide the number of photos in your Photoset's title.",
202 - 'id' => "flickr_hide_collection_set_photos_count_display",
203 - 'grouping' => "flickr-sets",
204 - 'type' => 'checkbox'],
253 + [
254 + 'name' => "Hide Photo Count in Title Display",
255 + 'desc' => "This will hide the number of photos in your Photoset's title.",
256 + 'id' => 'flickr_hide_collection_set_photos_count_display',
257 + 'grouping' => 'flickr-sets',
258 + 'type' => 'checkbox'
259 + ],
205 260
206 - ['name' => "Constrain Photosets Per Row",
207 - '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.",
208 - 'id' => "flickr_collection_set_per_row_constraint",
209 - 'grouping' => "flickr-sets",
210 - 'type' => 'select',
211 - 'options' => ["padding" => "Fix the padding around the thumbnails",
212 - "count" => "Fix the number of thumbnails per row",
213 - ]],
261 + [
262 + 'name' => "Constrain Photosets Per Row",
263 + '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.",
264 + 'id' => 'flickr_collection_set_per_row_constraint',
265 + 'grouping' => 'flickr-sets',
266 + 'type' => 'select',
267 + 'options' => [
268 + 'padding' => 'Automatically calculate thumbnails per row',
269 + 'count' => 'Fix the number of thumbnails per row',
270 + ]
271 + ],
214 272
215 - ['name' => "Constrain by padding",
216 - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by",
217 - 'id' => "flickr_collection_set_constrain_by_padding",
218 - 'grouping' => "flickr-sets",
219 - 'type' => 'text',
220 - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."],
273 + [
274 + 'name' => "Fixed number of thumbnails",
275 + 'desc' => " If you have fixed the number of thumbnails per row above, enter the number of thumbnails",
276 + 'id' => 'flickr_collection_set_constrain_by_count',
277 + 'grouping' => 'flickr-sets',
278 + 'type' => 'select',
279 + 'options' => $this->selection_range(1, 10)
280 + ],
221 281
222 - ['name' => "Constrain by number of thumbnails",
223 - 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails",
224 - 'id' => "flickr_collection_set_constrain_by_count",
225 - 'grouping' => "flickr-sets",
226 - 'type' => 'select',
227 - 'options' => $this->selection_range(1, 25)],
282 + [
283 + 'name' => "Photoset / Album Headers (Standalone Photosets / Albums)",
284 + 'desc' => "Control settings for Flickr Photosets when displayed in your page",
285 + 'category' => 'flickr-set',
286 + 'type' => 'section',
287 + ],
228 288
229 - ['name' => "Photoset / Album Headers (Standalone Photosets / Albums)",
230 - 'desc' => "Control settings for Flickr Photosets when displayed in your page",
231 - 'category' => "flickr-set",
232 - 'type' => 'section',],
233 -
234 - ['name' => "What is this section?",
235 - 'desc' => "Options in this section are in effect when you pick the following gallery creation options:<br/><br/>
236 - <img src='".PHOTONIC_URL."Options/screenshots/Flickr-4.png' style='max-width: 600px;' alt='Individual albums'/><br/><br/>
289 + [
290 + 'name' => "What is this section?",
291 + 'desc' => "Options in this section are in effect when you pick the following wizard options:<br/><br/>
292 + <img src='" . PHOTONIC_URL . "Options/screenshots/Flickr-4.png' style='max-width: 600px;' alt='Individual albums'/><br/><br/>
237 293 If you are using the shortcode, the settings kick in for <code>[gallery type='flickr' user_id='abc' photoset_id='xyz']</code> to show its contents on the page,
238 294 or if you use <code>[gallery type='flickr' user_id='abc' view='photosets']</code> and click on a thumbnail to open the included images in a popup.",
239 - 'grouping' => "flickr-set",
240 - 'type' => 'blurb',],
295 + 'grouping' => 'flickr-set',
296 + 'type' => 'blurb',
297 + ],
241 298
242 - ['name' => "Hide Header Thumbnail",
243 - 'desc' => "This will hide the thumbnail in the header for your Flickr Photoset.",
244 - 'id' => "flickr_hide_set_thumbnail",
245 - 'grouping' => "flickr-set",
246 - 'type' => 'checkbox'],
299 + [
300 + 'name' => "Hide Header Thumbnail",
301 + 'desc' => "This will hide the thumbnail in the header for your Flickr Photoset.",
302 + 'id' => 'flickr_hide_set_thumbnail',
303 + 'grouping' => 'flickr-set',
304 + 'type' => 'checkbox'
305 + ],
247 306
248 - ['name' => "Hide Header Title",
249 - 'desc' => "This will hide the title in the header for your Flickr Photoset.",
250 - 'id' => "flickr_hide_set_title",
251 - 'grouping' => "flickr-set",
252 - 'type' => 'checkbox'],
307 + [
308 + 'name' => "Hide Header Title",
309 + 'desc' => "This will hide the title in the header for your Flickr Photoset.",
310 + 'id' => 'flickr_hide_set_title',
311 + 'grouping' => 'flickr-set',
312 + 'type' => 'checkbox'
313 + ],
253 314
254 - ['name' => "Hide Number of Photos",
255 - 'desc' => "This will hide the number of photos in the header in your Flickr Photoset.",
256 - 'id' => "flickr_hide_set_photo_count",
257 - 'grouping' => "flickr-set",
258 - 'type' => 'checkbox'],
315 + [
316 + 'name' => "Hide Number of Photos",
317 + 'desc' => "This will hide the number of photos in the header in your Flickr Photoset.",
318 + 'id' => 'flickr_hide_set_photo_count',
319 + 'grouping' => 'flickr-set',
320 + 'type' => 'checkbox'
321 + ],
259 322
260 - ['name' => "Gallery Thumbnails (with other Galleries)",
261 - 'desc' => "Control settings for Flickr Gallery thumbnails",
262 - 'category' => "flickr-galleries",
263 - 'type' => 'section',],
323 + [
324 + 'name' => "Gallery Thumbnails (with other Galleries)",
325 + 'desc' => "Control settings for Flickr Gallery thumbnails",
326 + 'category' => 'flickr-galleries',
327 + 'type' => 'section',
328 + ],
264 329
265 - ['name' => "What is this section?",
266 - 'desc' => "Options in this section are in effect when you pick the following gallery creation options:<br/><br/>
267 - <img src='".PHOTONIC_URL."Options/screenshots/Flickr-6.png' style='max-width: 600px;' alt='Galleries'/><br/><br/>
330 + [
331 + 'name' => "What is this section?",
332 + 'desc' => "Options in this section are in effect when you pick the following wizard options:<br/><br/>
333 + <img src='" . PHOTONIC_URL . "Options/screenshots/Flickr-6.png' style='max-width: 600px;' alt='Galleries'/><br/><br/>
268 334 If you are using the shortcode, the settings kick in for <code>[gallery type='flickr' user_id='abc' view='galleries']</code>. They are used to control the Gallery's thumbnail display",
269 - 'grouping' => "flickr-galleries",
270 - 'type' => 'blurb',],
335 + 'grouping' => 'flickr-galleries',
336 + 'type' => 'blurb',
337 + ],
271 338
272 - ['name' => "Gallery Title Display",
273 - 'desc' => "How do you want the title of the Gallery?",
274 - 'id' => "flickr_gallery_title_display",
275 - 'grouping' => "flickr-galleries",
276 - 'type' => 'radio',
277 - 'options' => $this->title_styles()],
339 + [
340 + 'name' => "Gallery Title Display",
341 + 'desc' => "How do you want the title of the Gallery?",
342 + 'id' => 'flickr_gallery_title_display',
343 + 'grouping' => 'flickr-galleries',
344 + 'type' => 'radio',
345 + 'options' => $this->title_styles()
346 + ],
278 347
279 - ['name' => "Hide Photo Count in Title Display",
280 - 'desc' => "This will hide the number of photos in your Gallery's title.",
281 - 'id' => "flickr_hide_gallery_photos_count_display",
282 - 'grouping' => "flickr-galleries",
283 - 'type' => 'checkbox'],
348 + [
349 + 'name' => "Hide Photo Count in Title Display",
350 + 'desc' => "This will hide the number of photos in your Gallery's title.",
351 + 'id' => 'flickr_hide_gallery_photos_count_display',
352 + 'grouping' => 'flickr-galleries',
353 + 'type' => 'checkbox'
354 + ],
284 355
285 - ['name' => "Constrain Galleries Per Row",
286 - 'desc' => "How do you want the control the number of gallery thumbnails per row? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.",
287 - 'id' => "flickr_galleries_per_row_constraint",
288 - 'grouping' => "flickr-galleries",
289 - 'type' => 'select',
290 - 'options' => ["padding" => "Fix the padding around the thumbnails",
291 - "count" => "Fix the number of thumbnails per row",
292 - ]],
356 + [
357 + 'name' => "Constrain Galleries Per Row",
358 + 'desc' => "How do you want the control the number of gallery thumbnails per row? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.",
359 + 'id' => 'flickr_galleries_per_row_constraint',
360 + 'grouping' => 'flickr-galleries',
361 + 'type' => 'select',
362 + 'options' => [
363 + 'padding' => 'Automatically calculate thumbnails per row',
364 + 'count' => 'Fix the number of thumbnails per row',
365 + ]
366 + ],
293 367
294 - ['name' => "Constrain by padding",
295 - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by",
296 - 'id' => "flickr_galleries_constrain_by_padding",
297 - 'grouping' => "flickr-galleries",
298 - 'type' => 'text',
299 - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."],
368 + [
369 + 'name' => "Fixed number of thumbnails",
370 + 'desc' => " If you have fixed the number of thumbnails per row above, enter the number of thumbnails",
371 + 'id' => 'flickr_galleries_constrain_by_count',
372 + 'grouping' => 'flickr-galleries',
373 + 'type' => 'select',
374 + 'options' => $this->selection_range(1, 10)
375 + ],
300 376
301 - ['name' => "Constrain by number of thumbnails",
302 - 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails",
303 - 'id' => "flickr_galleries_constrain_by_count",
304 - 'grouping' => "flickr-galleries",
305 - 'type' => 'select',
306 - 'options' => $this->selection_range(1, 25)],
377 + [
378 + 'name' => "Gallery Headers (Standalone Galleries)",
379 + 'desc' => "Control settings for Flickr Galleries when displayed in your page",
380 + 'category' => 'flickr-gallery',
381 + 'type' => 'section',
382 + ],
307 383
308 - ['name' => "Gallery Headers (Standalone Galleries)",
309 - 'desc' => "Control settings for Flickr Galleries when displayed in your page",
310 - 'category' => "flickr-gallery",
311 - 'type' => 'section',],
312 -
313 - ['name' => "What is this section?",
314 - 'desc' => "Options in this section are in effect when you pick the following gallery creation options:<br/><br/>
315 - <img src='".PHOTONIC_URL."Options/screenshots/Flickr-7.png' style='max-width: 600px;' alt='Individual galleries'/><br/><br/>
384 + [
385 + 'name' => "What is this section?",
386 + 'desc' => "Options in this section are in effect when you pick the following wizard options:<br/><br/>
387 + <img src='" . PHOTONIC_URL . "Options/screenshots/Flickr-7.png' style='max-width: 600px;' alt='Individual galleries'/><br/><br/>
316 388 If you are using the shortcode, the settings kick in for <code>[gallery type='flickr' user_id='abc' gallery_id='xyz']</code> to show its contents on the page, or if you use <code>[gallery type='flickr' user_id='abc' view='galleries']</code> and click on a thumbnail to open the included images in a popup.",
317 - 'grouping' => "flickr-gallery",
318 - 'type' => 'blurb',],
389 + 'grouping' => 'flickr-gallery',
390 + 'type' => 'blurb',
391 + ],
319 392
320 - ['name' => "Hide Header Thumbnail",
321 - 'desc' => "This will hide the thumbnail in the header for your Flickr Gallery.",
322 - 'id' => "flickr_hide_gallery_thumbnail",
323 - 'grouping' => "flickr-gallery",
324 - 'type' => 'checkbox'],
393 + [
394 + 'name' => "Hide Header Thumbnail",
395 + 'desc' => "This will hide the thumbnail in the header for your Flickr Gallery.",
396 + 'id' => 'flickr_hide_gallery_thumbnail',
397 + 'grouping' => 'flickr-gallery',
398 + 'type' => 'checkbox'
399 + ],
325 400
326 - ['name' => "Hide Header Title",
327 - 'desc' => "This will hide the title in the header for your Flickr Gallery.",
328 - 'id' => "flickr_hide_gallery_title",
329 - 'grouping' => "flickr-gallery",
330 - 'type' => 'checkbox'],
401 + [
402 + 'name' => "Hide Header Title",
403 + 'desc' => "This will hide the title in the header for your Flickr Gallery.",
404 + 'id' => 'flickr_hide_gallery_title',
405 + 'grouping' => 'flickr-gallery',
406 + 'type' => 'checkbox'
407 + ],
331 408
332 - ['name' => "Hide Number of Photos",
333 - 'desc' => "This will hide the number of photos in the header in your Flickr Gallery.",
334 - 'id' => "flickr_hide_gallery_photo_count",
335 - 'grouping' => "flickr-gallery",
336 - 'type' => 'checkbox'],
409 + [
410 + 'name' => "Hide Number of Photos",
411 + 'desc' => "This will hide the number of photos in the header in your Flickr Gallery.",
412 + 'id' => 'flickr_hide_gallery_photo_count',
413 + 'grouping' => 'flickr-gallery',
414 + 'type' => 'checkbox'
415 + ],
337 416
338 - ['name' => "Photos (Main Page)",
339 - 'desc' => "Control settings for Flickr Photos when displayed in your page",
340 - 'category' => "flickr-photos",
341 - 'type' => 'section',],
417 + [
418 + 'name' => "Photos (Main Page)",
419 + 'desc' => "Control settings for Flickr Photos when displayed in your page",
420 + 'category' => 'flickr-photos',
421 + 'type' => 'section',
422 + ],
342 423
343 - ['name' => "What is this section?",
344 - 'desc' => "Options in this section are in effect when you pick the following gallery creation options:<br/><br/>
345 - <img src='".PHOTONIC_URL."Options/screenshots/Flickr-2.png' style='max-width: 600px;' alt='Photostream'/><br/><br/>
424 + [
425 + 'name' => "What is this section?",
426 + 'desc' => "Options in this section are in effect when you pick the following wizard options:<br/><br/>
427 + <img src='" . PHOTONIC_URL . "Options/screenshots/Flickr-2.png' style='max-width: 600px;' alt='Photostream'/><br/><br/>
346 428 If you are using the shortcode, the settings kick in for <code>[gallery type='flickr' user_id='abc' photoset_id='xyz']</code>
347 429 or <code>[gallery type='flickr' user_id='abc' view='photos']</code>. In other words, the photos are printed directly on the page.",
348 - 'grouping' => "flickr-photos",
349 - 'type' => 'blurb',],
430 + 'grouping' => 'flickr-photos',
431 + 'type' => 'blurb',
432 + ],
350 433
351 - ['name' => "Photo Title Display",
352 - 'desc' => "How do you want the title of the photos?",
353 - 'id' => "flickr_photo_title_display",
354 - 'grouping' => "flickr-photos",
355 - 'type' => 'radio',
356 - 'options' => $this->title_styles()],
434 + [
435 + 'name' => "Photo Title Display",
436 + 'desc' => "How do you want the title of the photos?",
437 + 'id' => 'flickr_photo_title_display',
438 + 'grouping' => 'flickr-photos',
439 + 'type' => 'radio',
440 + 'options' => $this->title_styles()
441 + ],
357 442
358 - ['name' => "Constrain Photos Per Row",
359 - '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.",
360 - 'id' => "flickr_photos_per_row_constraint",
361 - 'grouping' => "flickr-photos",
362 - 'type' => 'select',
363 - 'options' => ["padding" => "Fix the padding around the thumbnails",
364 - "count" => "Fix the number of thumbnails per row",
365 - ]],
443 + [
444 + 'name' => "Constrain Photos Per Row",
445 + '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.",
446 + 'id' => 'flickr_photos_per_row_constraint',
447 + 'grouping' => 'flickr-photos',
448 + 'type' => 'select',
449 + 'options' => [
450 + 'padding' => 'Automatically calculate thumbnails per row',
451 + 'count' => 'Fix the number of thumbnails per row',
452 + ]
453 + ],
366 454
367 - ['name' => "Constrain by padding",
368 - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by",
369 - 'id' => "flickr_photos_constrain_by_padding",
370 - 'grouping' => "flickr-photos",
371 - 'type' => 'text',
372 - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."],
455 + [
456 + 'name' => "Fixed number of thumbnails",
457 + 'desc' => " If you have fixed the number of thumbnails per row above, enter the number of thumbnails",
458 + 'id' => 'flickr_photos_constrain_by_count',
459 + 'grouping' => 'flickr-photos',
460 + 'type' => 'select',
461 + 'options' => $this->selection_range(1, 10)
462 + ],
373 463
374 - ['name' => "Constrain by number of thumbnails",
375 - 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails",
376 - 'id' => "flickr_photos_constrain_by_count",
377 - 'grouping' => "flickr-photos",
378 - 'type' => 'select',
379 - 'options' => $this->selection_range(1, 25)],
464 + [
465 + 'name' => "Photos (Overlaid Popup Panel)",
466 + 'desc' => "Control settings for Flickr Photos when displayed in a popup",
467 + 'category' => 'flickr-photos-pop',
468 + 'type' => 'section',
469 + ],
380 470
381 - ['name' => "Photos (Overlaid Popup Panel)",
382 - 'desc' => "Control settings for Flickr Photos when displayed in a popup",
383 - 'category' => "flickr-photos-pop",
384 - 'type' => 'section',],
471 + [
472 + 'name' => "What is this section?",
473 + '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.",
474 + 'grouping' => 'flickr-photos-pop',
475 + 'type' => 'blurb',
476 + ],
385 477
386 - ['name' => "What is this section?",
387 - '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.",
388 - 'grouping' => "flickr-photos-pop",
389 - 'type' => 'blurb',],
390 -
391 - ['name' => "Photo Title Display",
392 - 'desc' => "How do you want the title of the photos?",
393 - 'id' => "flickr_photo_pop_title_display",
394 - 'grouping' => "flickr-photos-pop",
395 - 'type' => 'radio',
396 - 'options' => $this->title_styles()],
397 -
398 - ['name' => "Constrain Photos Per Row",
399 - '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.",
400 - 'id' => "flickr_photos_pop_per_row_constraint",
401 - 'grouping' => "flickr-photos-pop",
402 - 'type' => 'select',
403 - 'options' => ["padding" => "Fix the padding around the thumbnails",
404 - "count" => "Fix the number of thumbnails per row",
405 - ]],
406 -
407 - ['name' => "Constrain by padding",
408 - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by",
409 - 'id' => "flickr_photos_pop_constrain_by_padding",
410 - 'grouping' => "flickr-photos-pop",
411 - 'type' => 'text',
412 - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."],
413 -
414 - ['name' => "Constrain by number of thumbnails",
415 - 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails",
416 - 'id' => "flickr_photos_pop_constrain_by_count",
417 - 'grouping' => "flickr-photos-pop",
418 - 'type' => 'select',
419 - 'options' => $this->selection_range(1, 25)],
478 + [
479 + 'name' => "Photo Title Display",
480 + 'desc' => "How do you want the title of the photos?",
481 + 'id' => 'flickr_photo_pop_title_display',
482 + 'grouping' => 'flickr-photos-pop',
483 + 'type' => 'radio',
484 + 'options' => $this->title_styles()
485 + ],
420 486 ];
421 - }
422 -
423 - public static function get_instance() {
424 - if (self::$instance == null) {
425 - self::$instance = new Flickr();
426 - }
427 - return self::$instance;
428 487 }
429 488 }