PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 2.41
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v2.41
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
photonic / Options / Instagram.php

Instagram.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 2.41, at Options/Instagram.php

74 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Photonic_Plugin\Options;
3 use Photonic_Plugin\Core\Photonic;
4 use Photonic_Plugin\Core\Utilities;
5
6 class Instagram extends Option_Tab {
7 private static $instance;
8
9 private function __construct() {
10 $this->options = [
11 ['name' => "Instagram settings",
12 'desc' => "Control settings for Instagram",
13 'category' => "instagram-settings",
14 'type' => 'section',],
15
16 ['name' => "Instagram Access Token",
17 'desc' => "Enter your Instagram Access Token. You can get this from <em>Photonic &rarr; Authentication</em> by clicking on <em>Login and get Access Token</em>",
18 'id' => "instagram_access_token",
19 'grouping' => "instagram-settings",
20 'type' => 'text'],
21
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' => "instagram_media",
25 'grouping' => "instagram-settings",
26 'type' => 'select',
27 'options' => Utilities::media_options()],
28
29 ['name' => "Disable lightbox linking",
30 'desc' => "Check this to disable linking the photo title in the lightbox to the original photo page.",
31 'id' => "instagram_disable_title_link",
32 'grouping' => "instagram-settings",
33 'type' => 'checkbox'],
34
35 ['name' => "Title Display",
36 'desc' => "How do you want the title of the photo thumbnail?",
37 'id' => "instagram_photo_title_display",
38 'grouping' => "instagram-settings",
39 'type' => 'radio',
40 'options' => $this->title_styles()],
41
42 ['name' => "Constrain Photos Per Row",
43 '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.",
44 'id' => "instagram_photos_per_row_constraint",
45 'grouping' => "instagram-settings",
46 'type' => 'select',
47 'options' => ["padding" => "Fix the padding around the thumbnails",
48 "count" => "Fix the number of thumbnails per row",
49 ]],
50
51 ['name' => "Constrain by padding",
52 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by",
53 'id' => "instagram_photos_constrain_by_padding",
54 'grouping' => "instagram-settings",
55 'type' => 'text',
56 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored."],
57
58 ['name' => "Constrain by number of thumbnails",
59 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails",
60 'id' => "instagram_photos_constrain_by_count",
61 'grouping' => "instagram-settings",
62 'type' => 'select',
63 'options' => $this->selection_range(1, 25)],
64 ];
65 }
66
67 public static function get_instance() {
68 if (self::$instance == null) {
69 self::$instance = new Instagram();
70 }
71 return self::$instance;
72 }
73 }
74