Instagram Feed - Version 2.9.3

Version Description

  • Fix: Fixed duplicate MySQL queries issue when checking for the resized images table.
  • Fix: Fixed an issue with the integration with the GDPR Cookie Consent plugin by WebToffee.
  • Fix: Removed max-height rule for the sbi_item elements to improve performance.
  • Tweak: Improved the reliability of the Instagram account connection process.
Download this release

Release Info

Developer smashballoon
Plugin Icon 128x128 Instagram Feed
Version 2.9.3
Comparing to
See all releases

Code changes from version 2.9.2 to 2.9.3

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon, craig-at-smash-balloon
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.4
5
  Tested up to: 5.8
6
- Stable tag: 2.9.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -272,9 +272,9 @@ For more FAQs related to the Instagram Feed plugin please visit the [FAQ section
272
 
273
  == Screenshots ==
274
 
275
- 1. Easily display feeds from any of your Instagram accounts
276
  2. Your Instagram Feed is completely customizable and responsive
277
- 3. Combine multiple accounts into a single feed
278
  5. Super quick and easy to get started. Just click the button to connect an Instagram account.
279
  5. Customize layouts, styles, colors, and more
280
  6. Just copy and paste the shortcode into any page, post or widget on your site
@@ -331,6 +331,12 @@ We understand that sometimes you need help, have issues or just have questions.
331
  * Plus more customization options added all the time!
332
 
333
  == Changelog ==
 
 
 
 
 
 
334
  = 2.9.2 =
335
  * Tested with WordPress 5.8 update.
336
  * Fix: PHP error "Uncaught Error: array_merge() does not accept unknown named parameters" when visiting the "About" page using PHP 8+.
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.4
5
  Tested up to: 5.8
6
+ Stable tag: 2.9.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
272
 
273
  == Screenshots ==
274
 
275
+ 1. Combine multiple accounts into a single feed
276
  2. Your Instagram Feed is completely customizable and responsive
277
+ 3. Easily display feeds from any of your Instagram accounts
278
  5. Super quick and easy to get started. Just click the button to connect an Instagram account.
279
  5. Customize layouts, styles, colors, and more
280
  6. Just copy and paste the shortcode into any page, post or widget on your site
331
  * Plus more customization options added all the time!
332
 
333
  == Changelog ==
334
+ = 2.9.3 =
335
+ * Fix: Fixed duplicate MySQL queries issue when checking for the resized images table.
336
+ * Fix: Fixed an issue with the integration with the GDPR Cookie Consent plugin by WebToffee.
337
+ * Fix: Removed max-height rule for the sbi_item elements to improve performance.
338
+ * Tweak: Improved the reliability of the Instagram account connection process.
339
+
340
  = 2.9.2 =
341
  * Tested with WordPress 5.8 update.
342
  * Fix: PHP error "Uncaught Error: array_merge() does not accept unknown named parameters" when visiting the "About" page using PHP 8+.
css/admin-notifications.css CHANGED
@@ -1,172 +1,172 @@
1
- #sbi-notifications {
2
- position: relative;
3
- background: #FFFFFF 0 0 no-repeat padding-box;
4
- box-shadow: 0px 5px 15px #0000000D;
5
- border-radius: 6px;
6
- opacity: 1;
7
- min-height: 48px;
8
- padding: 15px 102px 15px 72px;
9
- margin: 0 0 14px 0;
10
- }
11
-
12
- #sbi-notifications * {
13
- box-sizing: border-box;
14
- }
15
-
16
- #sbi-notifications .bell,
17
- #sbi-notifications .thumb{
18
- position: absolute;
19
- top: 15px;
20
- left: 15px;
21
- width: 42px;
22
- height: 48px;
23
- }
24
- #sbi-notifications .thumb img {
25
- max-width: 100%;
26
- }
27
- #sbi-notifications .thumb .img-overlay {
28
- top: 42px;
29
- left: -6px;
30
- width: 54px;
31
- position: absolute;
32
- background: #ca4a1f;
33
- color: #fff;
34
- padding: 2px 4px;
35
- border-radius: 3px;
36
- line-height: 1;
37
- font-size: 11px;
38
- font-weight: bold;
39
- text-align: center;
40
- }
41
-
42
- #sbi-notifications .messages .message {
43
- display: none;
44
- }
45
-
46
- #sbi-notifications .messages .message.current {
47
- display: block;
48
- }
49
-
50
- #sbi-notifications .messages .message .title {
51
- font-weight: bold;
52
- font-size: 17px;
53
- line-height: 20px;
54
- margin: 0;
55
- padding: 0;
56
- color: #444;
57
- }
58
-
59
- #sbi-notifications .messages .message .content {
60
- font-weight: normal;
61
- font-size: 13px;
62
- line-height: 20px;
63
- margin: 6px 0 40px 0;
64
- }
65
-
66
- #sbi-notifications .messages .message .buttons {
67
- margin: -30px 80px 0 0;
68
- }
69
-
70
- #sbi-notifications .messages .message .buttons a {
71
- margin: 0 6px 0 0;
72
- padding: 8px 10px;
73
- line-height: 13px;
74
- font-size: 13px;
75
- min-height: unset;
76
- }
77
-
78
- #sbi-notifications .messages .message .buttons .button-secondary {
79
- border: 1px solid #0071A1;
80
- }
81
-
82
- #sbi-notifications .dismiss {
83
- position: absolute;
84
- top: 15px;
85
- right: 15px;
86
- width: 16px;
87
- height: 16px;
88
- color: #72777C;
89
- font-size: 16px;
90
- cursor: pointer;
91
- text-align: center;
92
- vertical-align: middle;
93
- line-height: 16px;
94
- }
95
-
96
- #sbi-notifications .dismiss:hover {
97
- color: #dc3232;
98
- }
99
-
100
- #sbi-notifications .navigation {
101
- position: absolute;
102
- bottom: 15px;
103
- right: 15px;
104
- width: 63px;
105
- height: 30px;
106
- }
107
-
108
- #sbi-notifications .navigation a {
109
- display: block;
110
- width: 30px;
111
- height: 30px;
112
- border: 1px solid #7E8993;
113
- border-radius: 3px;
114
- font-size: 8px;
115
- text-align: center;
116
- vertical-align: middle;
117
- line-height: 30px;
118
- cursor: pointer;
119
- background-color: #ffffff;
120
- color: #41454A;
121
- }
122
- #sbi-notifications .navigation svg {
123
- width: 8px;
124
- height: 8px;
125
- }
126
-
127
- #sbi-notifications .navigation a:hover {
128
- background-color: #f1f1f1;
129
- }
130
-
131
- #sbi-notifications .navigation .prev {
132
- float: left;
133
- }
134
-
135
- #sbi-notifications .navigation .next {
136
- float: right;
137
- }
138
-
139
- #sbi-notifications .navigation .disabled {
140
- border-color: #dddddd;
141
- color: #A0A5AA;
142
- cursor: default;
143
- }
144
-
145
- #sbi-notifications .navigation .disabled:hover {
146
- background-color: #ffffff;
147
- }
148
-
149
- @media screen and (max-width: 768px) {
150
- #sbi-notifications {
151
- padding: 15px 15px 15px 72px;
152
- }
153
- #sbi-notifications .messages .message .title {
154
- margin: 0 30px 0 0;
155
- }
156
- #sbi-notifications .messages .message .content {
157
- font-size: 16px;
158
- line-height: 24px;
159
- }
160
- #sbi-notifications .messages .message .buttons {
161
- margin: -30px 80px 0 0;
162
- }
163
- #sbi-notifications .messages .message .buttons a {
164
- margin: 0;
165
- display: table;
166
- }
167
- #sbi-notifications .messages .message .buttons .button-secondary {
168
- margin-top: 6px;
169
- }
170
- }
171
-
172
- /*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9hZG1pbi1ub3RpZmljYXRpb25zLmNzcyIsInNvdXJjZXMiOlsiYXNzZXRzL3Njc3MvYWRtaW4tbm90aWZpY2F0aW9ucy5zY3NzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIEFkbWluIG5vdGlmaWNhdGlvbiBzdHlsZXMuXG5cbiN3cGZvcm1zLW5vdGlmaWNhdGlvbnMge1xuXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0YmFja2dyb3VuZDogI0ZGRkZGRiAwIDAgbm8tcmVwZWF0IHBhZGRpbmctYm94O1xuXHRib3gtc2hhZG93OiAwcHggNXB4IDE1cHggIzAwMDAwMDBEO1xuXHRib3JkZXItcmFkaXVzOiA2cHg7XG5cdG9wYWNpdHk6IDE7XG5cdG1pbi1oZWlnaHQ6IDQ4cHg7XG5cdHBhZGRpbmc6IDE1cHggMTAycHggMTVweCA3MnB4O1xuXHRtYXJnaW46IDAgMCAxNHB4IDA7XG5cblx0KiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0fVxuXG5cdC5iZWxsIHtcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAxNXB4O1xuXHRcdGxlZnQ6IDE1cHg7XG5cdFx0d2lkdGg6IDQycHg7XG5cdFx0aGVpZ2h0OiA0OHB4O1xuXHR9XG5cblx0Lm1lc3NhZ2VzIHtcblx0XHQubWVzc2FnZSB7XG5cdFx0XHRkaXNwbGF5OiBub25lO1xuXG5cdFx0XHQmLmN1cnJlbnQge1xuXHRcdFx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRcdH1cblxuXHRcdFx0LnRpdGxlIHtcblx0XHRcdFx0Zm9udC13ZWlnaHQ6IGJvbGQ7XG5cdFx0XHRcdGZvbnQtc2l6ZTogMTdweDtcblx0XHRcdFx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdFx0XHRcdG1hcmdpbjogMDtcblx0XHRcdFx0Y29sb3I6ICM0NDQ7XG5cdFx0XHR9XG5cblx0XHRcdC5jb250ZW50IHtcblx0XHRcdFx0Zm9udC13ZWlnaHQ6IG5vcm1hbDtcblx0XHRcdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdFx0XHRsaW5lLWhlaWdodDogMjBweDtcblx0XHRcdFx0bWFyZ2luOiA2cHggMCA0MHB4IDA7XG5cdFx0XHR9XG5cblx0XHRcdC5idXR0b25zIHtcblx0XHRcdFx0bWFyZ2luOiAtMzBweCA4MHB4IDAgMDtcblxuXHRcdFx0XHRhIHtcblx0XHRcdFx0XHRtYXJnaW46IDAgNnB4IDAgMDtcblx0XHRcdFx0XHRwYWRkaW5nOiA4cHggMTBweDtcblx0XHRcdFx0XHRsaW5lLWhlaWdodDogMTNweDtcblx0XHRcdFx0XHRmb250LXNpemU6IDEzcHg7XG5cdFx0XHRcdFx0bWluLWhlaWdodDogdW5zZXQ7XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQuYnV0dG9uLXNlY29uZGFyeSB7XG5cdFx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgIzAwNzFBMTtcblx0XHRcdFx0fVxuXHRcdFx0fVxuXHRcdH1cblx0fVxuXG5cdC5kaXNtaXNzIHtcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAxNXB4O1xuXHRcdHJpZ2h0OiAxNXB4O1xuXHRcdHdpZHRoOiAxNnB4O1xuXHRcdGhlaWdodDogMTZweDtcblx0XHRjb2xvcjogIzcyNzc3Qztcblx0XHRmb250LXNpemU6IDE2cHg7XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdHRleHQtYWxpZ246IGNlbnRlcjtcblx0XHR2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xuXHRcdGxpbmUtaGVpZ2h0OiAxNnB4O1xuXG5cdFx0Jjpob3ZlciB7XG5cdFx0XHRjb2xvcjogI2RjMzIzMjtcblx0XHR9XG5cdH1cblxuXHQubmF2aWdhdGlvbiB7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdGJvdHRvbTogMTVweDtcblx0XHRyaWdodDogMTVweDtcblx0XHR3aWR0aDogNjNweDtcblx0XHRoZWlnaHQ6IDMwcHg7XG5cblx0XHRhIHtcblx0XHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdFx0d2lkdGg6IDMwcHg7XG5cdFx0XHRoZWlnaHQ6IDMwcHg7XG5cdFx0XHRib3JkZXI6IDFweCBzb2xpZCAjN0U4OTkzO1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogM3B4O1xuXHRcdFx0Zm9udC1zaXplOiA4cHg7XG5cdFx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdFx0XHR2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xuXHRcdFx0bGluZS1oZWlnaHQ6IDMwcHg7XG5cdFx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmZmZmO1xuXHRcdFx0Y29sb3I6ICM0MTQ1NEE7XG5cblx0XHRcdCY6aG92ZXIge1xuXHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAjZjFmMWYxO1xuXHRcdFx0fVxuXHRcdH1cblxuXHRcdC5wcmV2IHtcblx0XHRcdGZsb2F0OiBsZWZ0O1xuXHRcdH1cblxuXHRcdC5uZXh0IHtcblx0XHRcdGZsb2F0OiByaWdodDtcblx0XHR9XG5cblx0XHQuZGlzYWJsZWQge1xuXHRcdFx0Ym9yZGVyLWNvbG9yOiAjZGRkZGRkO1xuXHRcdFx0Y29sb3I6ICNBMEE1QUE7XG5cdFx0XHRjdXJzb3I6IGRlZmF1bHQ7XG5cblx0XHRcdCY6aG92ZXIge1xuXHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmZmZmO1xuXHRcdFx0fVxuXHRcdH1cblx0fVxufVxuXG5AbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA3NjhweCkge1xuXG5cdCN3cGZvcm1zLW5vdGlmaWNhdGlvbnMge1xuXHRcdHBhZGRpbmc6IDE1cHggMTVweCAxNXB4IDcycHg7XG5cblx0XHQubWVzc2FnZXMge1xuXG5cdFx0XHQubWVzc2FnZSB7XG5cblx0XHRcdFx0LnRpdGxlIHtcblx0XHRcdFx0XHRtYXJnaW46IDAgMzBweCAwIDA7XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQuY29udGVudCB7XG5cdFx0XHRcdFx0Zm9udC1zaXplOiAxNnB4O1xuXHRcdFx0XHRcdGxpbmUtaGVpZ2h0OiAyNHB4XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQuYnV0dG9ucyB7XG5cdFx0XHRcdFx0bWFyZ2luOiAtMzBweCA4MHB4IDAgMDtcblxuXHRcdFx0XHRcdGEge1xuXHRcdFx0XHRcdFx0bWFyZ2luOiAwO1xuXHRcdFx0XHRcdFx0ZGlzcGxheTogdGFibGU7XG5cdFx0XHRcdFx0fVxuXG5cdFx0XHRcdFx0LmJ1dHRvbi1zZWNvbmRhcnkge1xuXHRcdFx0XHRcdFx0bWFyZ2luLXRvcDogNnB4O1xuXHRcdFx0XHRcdH1cblx0XHRcdFx0fVxuXHRcdFx0fVxuXHRcdH1cblx0fVxufSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxBQUFBLHNCQUFzQixDQUFDO0VBRXRCLFFBQVEsRUFBRSxRQUFRO0VBQ2xCLFVBQVUsRUFBRSxpQ0FBaUM7RUFDN0MsVUFBVSxFQUFFLHNCQUFzQjtFQUNsQyxhQUFhLEVBQUUsR0FBRztFQUNsQixPQUFPLEVBQUUsQ0FBQztFQUNWLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLE9BQU8sRUFBRSxvQkFBb0I7RUFDN0IsTUFBTSxFQUFFLFVBQVU7Q0FxSGxCOztBQTlIRCxBQVdDLHNCQVhxQixDQVdyQixDQUFDLENBQUM7RUFDRCxVQUFVLEVBQUUsVUFBVTtDQUN0Qjs7QUFiRixBQWVDLHNCQWZxQixDQWVyQixLQUFLLENBQUM7RUFDTCxRQUFRLEVBQUUsUUFBUTtFQUNsQixHQUFHLEVBQUUsSUFBSTtFQUNULElBQUksRUFBRSxJQUFJO0VBQ1YsS0FBSyxFQUFFLElBQUk7RUFDWCxNQUFNLEVBQUUsSUFBSTtDQUNaOztBQXJCRixBQXdCRSxzQkF4Qm9CLENBdUJyQixTQUFTLENBQ1IsUUFBUSxDQUFDO0VBQ1IsT0FBTyxFQUFFLElBQUk7Q0FvQ2I7O0FBN0RILEFBMkJHLHNCQTNCbUIsQ0F1QnJCLFNBQVMsQ0FDUixRQUFRLEFBR04sUUFBUSxDQUFDO0VBQ1QsT0FBTyxFQUFFLEtBQUs7Q0FDZDs7QUE3QkosQUErQkcsc0JBL0JtQixDQXVCckIsU0FBUyxDQUNSLFFBQVEsQ0FPUCxNQUFNLENBQUM7RUFDTixXQUFXLEVBQUUsSUFBSTtFQUNqQixTQUFTLEVBQUUsSUFBSTtFQUNmLFdBQVcsRUFBRSxJQUFJO0VBQ2pCLE1BQU0sRUFBRSxDQUFDO0VBQ1QsS0FBSyxFQUFFLElBQUk7Q0FDWDs7QUFyQ0osQUF1Q0csc0JBdkNtQixDQXVCckIsU0FBUyxDQUNSLFFBQVEsQ0FlUCxRQUFRLENBQUM7RUFDUixXQUFXLEVBQUUsTUFBTTtFQUNuQixTQUFTLEVBQUUsSUFBSTtFQUNmLFdBQVcsRUFBRSxJQUFJO0VBQ2pCLE1BQU0sRUFBRSxZQUFZO0NBQ3BCOztBQTVDSixBQThDRyxzQkE5Q21CLENBdUJyQixTQUFTLENBQ1IsUUFBUSxDQXNCUCxRQUFRLENBQUM7RUFDUixNQUFNLEVBQUUsY0FBYztDQWF0Qjs7QUE1REosQUFpREksc0JBakRrQixDQXVCckIsU0FBUyxDQUNSLFFBQVEsQ0FzQlAsUUFBUSxDQUdQLENBQUMsQ0FBQztFQUNELE1BQU0sRUFBRSxTQUFTO0VBQ2pCLE9BQU8sRUFBRSxRQUFRO0VBQ2pCLFdBQVcsRUFBRSxJQUFJO0VBQ2pCLFNBQVMsRUFBRSxJQUFJO0VBQ2YsVUFBVSxFQUFFLEtBQUs7Q0FDakI7O0FBdkRMLEFBeURJLHNCQXpEa0IsQ0F1QnJCLFNBQVMsQ0FDUixRQUFRLENBc0JQLFFBQVEsQ0FXUCxpQkFBaUIsQ0FBQztFQUNqQixNQUFNLEVBQUUsaUJBQWlCO0NBQ3pCOztBQTNETCxBQWdFQyxzQkFoRXFCLENBZ0VyQixRQUFRLENBQUM7RUFDUixRQUFRLEVBQUUsUUFBUTtFQUNsQixHQUFHLEVBQUUsSUFBSTtFQUNULEtBQUssRUFBRSxJQUFJO0VBQ1gsS0FBSyxFQUFFLElBQUk7RUFDWCxNQUFNLEVBQUUsSUFBSTtFQUNaLEtBQUssRUFBRSxPQUFPO0VBQ2QsU0FBUyxFQUFFLElBQUk7RUFDZixNQUFNLEVBQUUsT0FBTztFQUNmLFVBQVUsRUFBRSxNQUFNO0VBQ2xCLGNBQWMsRUFBRSxNQUFNO0VBQ3RCLFdBQVcsRUFBRSxJQUFJO0NBS2pCOztBQWhGRixBQTZFRSxzQkE3RW9CLENBZ0VyQixRQUFRLEFBYU4sTUFBTSxDQUFDO0VBQ1AsS0FBSyxFQUFFLE9BQU87Q0FDZDs7QUEvRUgsQUFrRkMsc0JBbEZxQixDQWtGckIsV0FBVyxDQUFDO0VBQ1gsUUFBUSxFQUFFLFFBQVE7RUFDbEIsTUFBTSxFQUFFLElBQUk7RUFDWixLQUFLLEVBQUUsSUFBSTtFQUNYLEtBQUssRUFBRSxJQUFJO0VBQ1gsTUFBTSxFQUFFLElBQUk7Q0FzQ1o7O0FBN0hGLEFBeUZFLHNCQXpGb0IsQ0FrRnJCLFdBQVcsQ0FPVixDQUFDLENBQUM7RUFDRCxPQUFPLEVBQUUsS0FBSztFQUNkLEtBQUssRUFBRSxJQUFJO0VBQ1gsTUFBTSxFQUFFLElBQUk7RUFDWixNQUFNLEVBQUUsaUJBQWlCO0VBQ3pCLGFBQWEsRUFBRSxHQUFHO0VBQ2xCLFNBQVMsRUFBRSxHQUFHO0VBQ2QsVUFBVSxFQUFFLE1BQU07RUFDbEIsY0FBYyxFQUFFLE1BQU07RUFDdEIsV0FBVyxFQUFFLElBQUk7RUFDakIsTUFBTSxFQUFFLE9BQU87RUFDZixnQkFBZ0IsRUFBRSxPQUFPO0VBQ3pCLEtBQUssRUFBRSxPQUFPO0NBS2Q7O0FBMUdILEFBdUdHLHNCQXZHbUIsQ0FrRnJCLFdBQVcsQ0FPVixDQUFDLEFBY0MsTUFBTSxDQUFDO0VBQ1AsZ0JBQWdCLEVBQUUsT0FBTztDQUN6Qjs7QUF6R0osQUE0R0Usc0JBNUdvQixDQWtGckIsV0FBVyxDQTBCVixLQUFLLENBQUM7RUFDTCxLQUFLLEVBQUUsSUFBSTtDQUNYOztBQTlHSCxBQWdIRSxzQkFoSG9CLENBa0ZyQixXQUFXLENBOEJWLEtBQUssQ0FBQztFQUNMLEtBQUssRUFBRSxLQUFLO0NBQ1o7O0FBbEhILEFBb0hFLHNCQXBIb0IsQ0FrRnJCLFdBQVcsQ0FrQ1YsU0FBUyxDQUFDO0VBQ1QsWUFBWSxFQUFFLE9BQU87RUFDckIsS0FBSyxFQUFFLE9BQU87RUFDZCxNQUFNLEVBQUUsT0FBTztDQUtmOztBQTVISCxBQXlIRyxzQkF6SG1CLENBa0ZyQixXQUFXLENBa0NWLFNBQVMsQUFLUCxNQUFNLENBQUM7RUFDUCxnQkFBZ0IsRUFBRSxPQUFPO0NBQ3pCOztBQUtKLE1BQU0sQ0FBQyxNQUFNLE1BQU0sU0FBUyxFQUFFLEtBQUs7RUFFbEMsQUFBQSxzQkFBc0IsQ0FBQztJQUN0QixPQUFPLEVBQUUsbUJBQW1CO0dBNkI1QjtFQTlCRCxBQU9HLHNCQVBtQixDQUdyQixTQUFTLENBRVIsUUFBUSxDQUVQLE1BQU0sQ0FBQztJQUNOLE1BQU0sRUFBRSxVQUFVO0dBQ2xCO0VBVEosQUFXRyxzQkFYbUIsQ0FHckIsU0FBUyxDQUVSLFFBQVEsQ0FNUCxRQUFRLENBQUM7SUFDUixTQUFTLEVBQUUsSUFBSTtJQUNmLFdBQVcsRUFBRSxJQUNkO0dBQUM7RUFkSixBQWdCRyxzQkFoQm1CLENBR3JCLFNBQVMsQ0FFUixRQUFRLENBV1AsUUFBUSxDQUFDO0lBQ1IsTUFBTSxFQUFFLGNBQWM7R0FVdEI7RUEzQkosQUFtQkksc0JBbkJrQixDQUdyQixTQUFTLENBRVIsUUFBUSxDQVdQLFFBQVEsQ0FHUCxDQUFDLENBQUM7SUFDRCxNQUFNLEVBQUUsQ0FBQztJQUNULE9BQU8sRUFBRSxLQUFLO0dBQ2Q7RUF0QkwsQUF3Qkksc0JBeEJrQixDQUdyQixTQUFTLENBRVIsUUFBUSxDQVdQLFFBQVEsQ0FRUCxpQkFBaUIsQ0FBQztJQUNqQixVQUFVLEVBQUUsR0FBRztHQUNmIn0= */
1
+ #sbi-notifications {
2
+ position: relative;
3
+ background: #FFFFFF 0 0 no-repeat padding-box;
4
+ box-shadow: 0px 5px 15px #0000000D;
5
+ border-radius: 6px;
6
+ opacity: 1;
7
+ min-height: 48px;
8
+ padding: 15px 102px 15px 72px;
9
+ margin: 0 0 14px 0;
10
+ }
11
+
12
+ #sbi-notifications * {
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ #sbi-notifications .bell,
17
+ #sbi-notifications .thumb{
18
+ position: absolute;
19
+ top: 15px;
20
+ left: 15px;
21
+ width: 42px;
22
+ height: 48px;
23
+ }
24
+ #sbi-notifications .thumb img {
25
+ max-width: 100%;
26
+ }
27
+ #sbi-notifications .thumb .img-overlay {
28
+ top: 42px;
29
+ left: -6px;
30
+ width: 54px;
31
+ position: absolute;
32
+ background: #ca4a1f;
33
+ color: #fff;
34
+ padding: 2px 4px;
35
+ border-radius: 3px;
36
+ line-height: 1;
37
+ font-size: 11px;
38
+ font-weight: bold;
39
+ text-align: center;
40
+ }
41
+
42
+ #sbi-notifications .messages .message {
43
+ display: none;
44
+ }
45
+
46
+ #sbi-notifications .messages .message.current {
47
+ display: block;
48
+ }
49
+
50
+ #sbi-notifications .messages .message .title {
51
+ font-weight: bold;
52
+ font-size: 17px;
53
+ line-height: 20px;
54
+ margin: 0;
55
+ padding: 0;
56
+ color: #444;
57
+ }
58
+
59
+ #sbi-notifications .messages .message .content {
60
+ font-weight: normal;
61
+ font-size: 13px;
62
+ line-height: 20px;
63
+ margin: 6px 0 40px 0;
64
+ }
65
+
66
+ #sbi-notifications .messages .message .buttons {
67
+ margin: -30px 80px 0 0;
68
+ }
69
+
70
+ #sbi-notifications .messages .message .buttons a {
71
+ margin: 0 6px 0 0;
72
+ padding: 8px 10px;
73
+ line-height: 13px;
74
+ font-size: 13px;
75
+ min-height: unset;
76
+ }
77
+
78
+ #sbi-notifications .messages .message .buttons .button-secondary {
79
+ border: 1px solid #0071A1;
80
+ }
81
+
82
+ #sbi-notifications .dismiss {
83
+ position: absolute;
84
+ top: 15px;
85
+ right: 15px;
86
+ width: 16px;
87
+ height: 16px;
88
+ color: #72777C;
89
+ font-size: 16px;
90
+ cursor: pointer;
91
+ text-align: center;
92
+ vertical-align: middle;
93
+ line-height: 16px;
94
+ }
95
+
96
+ #sbi-notifications .dismiss:hover {
97
+ color: #dc3232;
98
+ }
99
+
100
+ #sbi-notifications .navigation {
101
+ position: absolute;
102
+ bottom: 15px;
103
+ right: 15px;
104
+ width: 63px;
105
+ height: 30px;
106
+ }
107
+
108
+ #sbi-notifications .navigation a {
109
+ display: block;
110
+ width: 30px;
111
+ height: 30px;
112
+ border: 1px solid #7E8993;
113
+ border-radius: 3px;
114
+ font-size: 8px;
115
+ text-align: center;
116
+ vertical-align: middle;
117
+ line-height: 30px;
118
+ cursor: pointer;
119
+ background-color: #ffffff;
120
+ color: #41454A;
121
+ }
122
+ #sbi-notifications .navigation svg {
123
+ width: 8px;
124
+ height: 8px;
125
+ }
126
+
127
+ #sbi-notifications .navigation a:hover {
128
+ background-color: #f1f1f1;
129
+ }
130
+
131
+ #sbi-notifications .navigation .prev {
132
+ float: left;
133
+ }
134
+
135
+ #sbi-notifications .navigation .next {
136
+ float: right;
137
+ }
138
+
139
+ #sbi-notifications .navigation .disabled {
140
+ border-color: #dddddd;
141
+ color: #A0A5AA;
142
+ cursor: default;
143
+ }
144
+
145
+ #sbi-notifications .navigation .disabled:hover {
146
+ background-color: #ffffff;
147
+ }
148
+
149
+ @media screen and (max-width: 768px) {
150
+ #sbi-notifications {
151
+ padding: 15px 15px 15px 72px;
152
+ }
153
+ #sbi-notifications .messages .message .title {
154
+ margin: 0 30px 0 0;
155
+ }
156
+ #sbi-notifications .messages .message .content {
157
+ font-size: 16px;
158
+ line-height: 24px;
159
+ }
160
+ #sbi-notifications .messages .message .buttons {
161
+ margin: -30px 80px 0 0;
162
+ }
163
+ #sbi-notifications .messages .message .buttons a {
164
+ margin: 0;
165
+ display: table;
166
+ }
167
+ #sbi-notifications .messages .message .buttons .button-secondary {
168
+ margin-top: 6px;
169
+ }
170
+ }
171
+
172
+ /*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9hZG1pbi1ub3RpZmljYXRpb25zLmNzcyIsInNvdXJjZXMiOlsiYXNzZXRzL3Njc3MvYWRtaW4tbm90aWZpY2F0aW9ucy5zY3NzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIEFkbWluIG5vdGlmaWNhdGlvbiBzdHlsZXMuXG5cbiN3cGZvcm1zLW5vdGlmaWNhdGlvbnMge1xuXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0YmFja2dyb3VuZDogI0ZGRkZGRiAwIDAgbm8tcmVwZWF0IHBhZGRpbmctYm94O1xuXHRib3gtc2hhZG93OiAwcHggNXB4IDE1cHggIzAwMDAwMDBEO1xuXHRib3JkZXItcmFkaXVzOiA2cHg7XG5cdG9wYWNpdHk6IDE7XG5cdG1pbi1oZWlnaHQ6IDQ4cHg7XG5cdHBhZGRpbmc6IDE1cHggMTAycHggMTVweCA3MnB4O1xuXHRtYXJnaW46IDAgMCAxNHB4IDA7XG5cblx0KiB7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0fVxuXG5cdC5iZWxsIHtcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAxNXB4O1xuXHRcdGxlZnQ6IDE1cHg7XG5cdFx0d2lkdGg6IDQycHg7XG5cdFx0aGVpZ2h0OiA0OHB4O1xuXHR9XG5cblx0Lm1lc3NhZ2VzIHtcblx0XHQubWVzc2FnZSB7XG5cdFx0XHRkaXNwbGF5OiBub25lO1xuXG5cdFx0XHQmLmN1cnJlbnQge1xuXHRcdFx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRcdH1cblxuXHRcdFx0LnRpdGxlIHtcblx0XHRcdFx0Zm9udC13ZWlnaHQ6IGJvbGQ7XG5cdFx0XHRcdGZvbnQtc2l6ZTogMTdweDtcblx0XHRcdFx0bGluZS1oZWlnaHQ6IDIwcHg7XG5cdFx0XHRcdG1hcmdpbjogMDtcblx0XHRcdFx0Y29sb3I6ICM0NDQ7XG5cdFx0XHR9XG5cblx0XHRcdC5jb250ZW50IHtcblx0XHRcdFx0Zm9udC13ZWlnaHQ6IG5vcm1hbDtcblx0XHRcdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdFx0XHRsaW5lLWhlaWdodDogMjBweDtcblx0XHRcdFx0bWFyZ2luOiA2cHggMCA0MHB4IDA7XG5cdFx0XHR9XG5cblx0XHRcdC5idXR0b25zIHtcblx0XHRcdFx0bWFyZ2luOiAtMzBweCA4MHB4IDAgMDtcblxuXHRcdFx0XHRhIHtcblx0XHRcdFx0XHRtYXJnaW46IDAgNnB4IDAgMDtcblx0XHRcdFx0XHRwYWRkaW5nOiA4cHggMTBweDtcblx0XHRcdFx0XHRsaW5lLWhlaWdodDogMTNweDtcblx0XHRcdFx0XHRmb250LXNpemU6IDEzcHg7XG5cdFx0XHRcdFx0bWluLWhlaWdodDogdW5zZXQ7XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQuYnV0dG9uLXNlY29uZGFyeSB7XG5cdFx0XHRcdFx0Ym9yZGVyOiAxcHggc29saWQgIzAwNzFBMTtcblx0XHRcdFx0fVxuXHRcdFx0fVxuXHRcdH1cblx0fVxuXG5cdC5kaXNtaXNzIHtcblx0XHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdFx0dG9wOiAxNXB4O1xuXHRcdHJpZ2h0OiAxNXB4O1xuXHRcdHdpZHRoOiAxNnB4O1xuXHRcdGhlaWdodDogMTZweDtcblx0XHRjb2xvcjogIzcyNzc3Qztcblx0XHRmb250LXNpemU6IDE2cHg7XG5cdFx0Y3Vyc29yOiBwb2ludGVyO1xuXHRcdHRleHQtYWxpZ246IGNlbnRlcjtcblx0XHR2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xuXHRcdGxpbmUtaGVpZ2h0OiAxNnB4O1xuXG5cdFx0Jjpob3ZlciB7XG5cdFx0XHRjb2xvcjogI2RjMzIzMjtcblx0XHR9XG5cdH1cblxuXHQubmF2aWdhdGlvbiB7XG5cdFx0cG9zaXRpb246IGFic29sdXRlO1xuXHRcdGJvdHRvbTogMTVweDtcblx0XHRyaWdodDogMTVweDtcblx0XHR3aWR0aDogNjNweDtcblx0XHRoZWlnaHQ6IDMwcHg7XG5cblx0XHRhIHtcblx0XHRcdGRpc3BsYXk6IGJsb2NrO1xuXHRcdFx0d2lkdGg6IDMwcHg7XG5cdFx0XHRoZWlnaHQ6IDMwcHg7XG5cdFx0XHRib3JkZXI6IDFweCBzb2xpZCAjN0U4OTkzO1xuXHRcdFx0Ym9yZGVyLXJhZGl1czogM3B4O1xuXHRcdFx0Zm9udC1zaXplOiA4cHg7XG5cdFx0XHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cdFx0XHR2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xuXHRcdFx0bGluZS1oZWlnaHQ6IDMwcHg7XG5cdFx0XHRjdXJzb3I6IHBvaW50ZXI7XG5cdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmZmZmO1xuXHRcdFx0Y29sb3I6ICM0MTQ1NEE7XG5cblx0XHRcdCY6aG92ZXIge1xuXHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAjZjFmMWYxO1xuXHRcdFx0fVxuXHRcdH1cblxuXHRcdC5wcmV2IHtcblx0XHRcdGZsb2F0OiBsZWZ0O1xuXHRcdH1cblxuXHRcdC5uZXh0IHtcblx0XHRcdGZsb2F0OiByaWdodDtcblx0XHR9XG5cblx0XHQuZGlzYWJsZWQge1xuXHRcdFx0Ym9yZGVyLWNvbG9yOiAjZGRkZGRkO1xuXHRcdFx0Y29sb3I6ICNBMEE1QUE7XG5cdFx0XHRjdXJzb3I6IGRlZmF1bHQ7XG5cblx0XHRcdCY6aG92ZXIge1xuXHRcdFx0XHRiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmZmZmO1xuXHRcdFx0fVxuXHRcdH1cblx0fVxufVxuXG5AbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA3NjhweCkge1xuXG5cdCN3cGZvcm1zLW5vdGlmaWNhdGlvbnMge1xuXHRcdHBhZGRpbmc6IDE1cHggMTVweCAxNXB4IDcycHg7XG5cblx0XHQubWVzc2FnZXMge1xuXG5cdFx0XHQubWVzc2FnZSB7XG5cblx0XHRcdFx0LnRpdGxlIHtcblx0XHRcdFx0XHRtYXJnaW46IDAgMzBweCAwIDA7XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQuY29udGVudCB7XG5cdFx0XHRcdFx0Zm9udC1zaXplOiAxNnB4O1xuXHRcdFx0XHRcdGxpbmUtaGVpZ2h0OiAyNHB4XG5cdFx0XHRcdH1cblxuXHRcdFx0XHQuYnV0dG9ucyB7XG5cdFx0XHRcdFx0bWFyZ2luOiAtMzBweCA4MHB4IDAgMDtcblxuXHRcdFx0XHRcdGEge1xuXHRcdFx0XHRcdFx0bWFyZ2luOiAwO1xuXHRcdFx0XHRcdFx0ZGlzcGxheTogdGFibGU7XG5cdFx0XHRcdFx0fVxuXG5cdFx0XHRcdFx0LmJ1dHRvbi1zZWNvbmRhcnkge1xuXHRcdFx0XHRcdFx0bWFyZ2luLXRvcDogNnB4O1xuXHRcdFx0XHRcdH1cblx0XHRcdFx0fVxuXHRcdFx0fVxuXHRcdH1cblx0fVxufSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxBQUFBLHNCQUFzQixDQUFDO0VBRXRCLFFBQVEsRUFBRSxRQUFRO0VBQ2xCLFVBQVUsRUFBRSxpQ0FBaUM7RUFDN0MsVUFBVSxFQUFFLHNCQUFzQjtFQUNsQyxhQUFhLEVBQUUsR0FBRztFQUNsQixPQUFPLEVBQUUsQ0FBQztFQUNWLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLE9BQU8sRUFBRSxvQkFBb0I7RUFDN0IsTUFBTSxFQUFFLFVBQVU7Q0FxSGxCOztBQTlIRCxBQVdDLHNCQVhxQixDQVdyQixDQUFDLENBQUM7RUFDRCxVQUFVLEVBQUUsVUFBVTtDQUN0Qjs7QUFiRixBQWVDLHNCQWZxQixDQWVyQixLQUFLLENBQUM7RUFDTCxRQUFRLEVBQUUsUUFBUTtFQUNsQixHQUFHLEVBQUUsSUFBSTtFQUNULElBQUksRUFBRSxJQUFJO0VBQ1YsS0FBSyxFQUFFLElBQUk7RUFDWCxNQUFNLEVBQUUsSUFBSTtDQUNaOztBQXJCRixBQXdCRSxzQkF4Qm9CLENBdUJyQixTQUFTLENBQ1IsUUFBUSxDQUFDO0VBQ1IsT0FBTyxFQUFFLElBQUk7Q0FvQ2I7O0FBN0RILEFBMkJHLHNCQTNCbUIsQ0F1QnJCLFNBQVMsQ0FDUixRQUFRLEFBR04sUUFBUSxDQUFDO0VBQ1QsT0FBTyxFQUFFLEtBQUs7Q0FDZDs7QUE3QkosQUErQkcsc0JBL0JtQixDQXVCckIsU0FBUyxDQUNSLFFBQVEsQ0FPUCxNQUFNLENBQUM7RUFDTixXQUFXLEVBQUUsSUFBSTtFQUNqQixTQUFTLEVBQUUsSUFBSTtFQUNmLFdBQVcsRUFBRSxJQUFJO0VBQ2pCLE1BQU0sRUFBRSxDQUFDO0VBQ1QsS0FBSyxFQUFFLElBQUk7Q0FDWDs7QUFyQ0osQUF1Q0csc0JBdkNtQixDQXVCckIsU0FBUyxDQUNSLFFBQVEsQ0FlUCxRQUFRLENBQUM7RUFDUixXQUFXLEVBQUUsTUFBTTtFQUNuQixTQUFTLEVBQUUsSUFBSTtFQUNmLFdBQVcsRUFBRSxJQUFJO0VBQ2pCLE1BQU0sRUFBRSxZQUFZO0NBQ3BCOztBQTVDSixBQThDRyxzQkE5Q21CLENBdUJyQixTQUFTLENBQ1IsUUFBUSxDQXNCUCxRQUFRLENBQUM7RUFDUixNQUFNLEVBQUUsY0FBYztDQWF0Qjs7QUE1REosQUFpREksc0JBakRrQixDQXVCckIsU0FBUyxDQUNSLFFBQVEsQ0FzQlAsUUFBUSxDQUdQLENBQUMsQ0FBQztFQUNELE1BQU0sRUFBRSxTQUFTO0VBQ2pCLE9BQU8sRUFBRSxRQUFRO0VBQ2pCLFdBQVcsRUFBRSxJQUFJO0VBQ2pCLFNBQVMsRUFBRSxJQUFJO0VBQ2YsVUFBVSxFQUFFLEtBQUs7Q0FDakI7O0FBdkRMLEFBeURJLHNCQXpEa0IsQ0F1QnJCLFNBQVMsQ0FDUixRQUFRLENBc0JQLFFBQVEsQ0FXUCxpQkFBaUIsQ0FBQztFQUNqQixNQUFNLEVBQUUsaUJBQWlCO0NBQ3pCOztBQTNETCxBQWdFQyxzQkFoRXFCLENBZ0VyQixRQUFRLENBQUM7RUFDUixRQUFRLEVBQUUsUUFBUTtFQUNsQixHQUFHLEVBQUUsSUFBSTtFQUNULEtBQUssRUFBRSxJQUFJO0VBQ1gsS0FBSyxFQUFFLElBQUk7RUFDWCxNQUFNLEVBQUUsSUFBSTtFQUNaLEtBQUssRUFBRSxPQUFPO0VBQ2QsU0FBUyxFQUFFLElBQUk7RUFDZixNQUFNLEVBQUUsT0FBTztFQUNmLFVBQVUsRUFBRSxNQUFNO0VBQ2xCLGNBQWMsRUFBRSxNQUFNO0VBQ3RCLFdBQVcsRUFBRSxJQUFJO0NBS2pCOztBQWhGRixBQTZFRSxzQkE3RW9CLENBZ0VyQixRQUFRLEFBYU4sTUFBTSxDQUFDO0VBQ1AsS0FBSyxFQUFFLE9BQU87Q0FDZDs7QUEvRUgsQUFrRkMsc0JBbEZxQixDQWtGckIsV0FBVyxDQUFDO0VBQ1gsUUFBUSxFQUFFLFFBQVE7RUFDbEIsTUFBTSxFQUFFLElBQUk7RUFDWixLQUFLLEVBQUUsSUFBSTtFQUNYLEtBQUssRUFBRSxJQUFJO0VBQ1gsTUFBTSxFQUFFLElBQUk7Q0FzQ1o7O0FBN0hGLEFBeUZFLHNCQXpGb0IsQ0FrRnJCLFdBQVcsQ0FPVixDQUFDLENBQUM7RUFDRCxPQUFPLEVBQUUsS0FBSztFQUNkLEtBQUssRUFBRSxJQUFJO0VBQ1gsTUFBTSxFQUFFLElBQUk7RUFDWixNQUFNLEVBQUUsaUJBQWlCO0VBQ3pCLGFBQWEsRUFBRSxHQUFHO0VBQ2xCLFNBQVMsRUFBRSxHQUFHO0VBQ2QsVUFBVSxFQUFFLE1BQU07RUFDbEIsY0FBYyxFQUFFLE1BQU07RUFDdEIsV0FBVyxFQUFFLElBQUk7RUFDakIsTUFBTSxFQUFFLE9BQU87RUFDZixnQkFBZ0IsRUFBRSxPQUFPO0VBQ3pCLEtBQUssRUFBRSxPQUFPO0NBS2Q7O0FBMUdILEFBdUdHLHNCQXZHbUIsQ0FrRnJCLFdBQVcsQ0FPVixDQUFDLEFBY0MsTUFBTSxDQUFDO0VBQ1AsZ0JBQWdCLEVBQUUsT0FBTztDQUN6Qjs7QUF6R0osQUE0R0Usc0JBNUdvQixDQWtGckIsV0FBVyxDQTBCVixLQUFLLENBQUM7RUFDTCxLQUFLLEVBQUUsSUFBSTtDQUNYOztBQTlHSCxBQWdIRSxzQkFoSG9CLENBa0ZyQixXQUFXLENBOEJWLEtBQUssQ0FBQztFQUNMLEtBQUssRUFBRSxLQUFLO0NBQ1o7O0FBbEhILEFBb0hFLHNCQXBIb0IsQ0FrRnJCLFdBQVcsQ0FrQ1YsU0FBUyxDQUFDO0VBQ1QsWUFBWSxFQUFFLE9BQU87RUFDckIsS0FBSyxFQUFFLE9BQU87RUFDZCxNQUFNLEVBQUUsT0FBTztDQUtmOztBQTVISCxBQXlIRyxzQkF6SG1CLENBa0ZyQixXQUFXLENBa0NWLFNBQVMsQUFLUCxNQUFNLENBQUM7RUFDUCxnQkFBZ0IsRUFBRSxPQUFPO0NBQ3pCOztBQUtKLE1BQU0sQ0FBQyxNQUFNLE1BQU0sU0FBUyxFQUFFLEtBQUs7RUFFbEMsQUFBQSxzQkFBc0IsQ0FBQztJQUN0QixPQUFPLEVBQUUsbUJBQW1CO0dBNkI1QjtFQTlCRCxBQU9HLHNCQVBtQixDQUdyQixTQUFTLENBRVIsUUFBUSxDQUVQLE1BQU0sQ0FBQztJQUNOLE1BQU0sRUFBRSxVQUFVO0dBQ2xCO0VBVEosQUFXRyxzQkFYbUIsQ0FHckIsU0FBUyxDQUVSLFFBQVEsQ0FNUCxRQUFRLENBQUM7SUFDUixTQUFTLEVBQUUsSUFBSTtJQUNmLFdBQVcsRUFBRSxJQUNkO0dBQUM7RUFkSixBQWdCRyxzQkFoQm1CLENBR3JCLFNBQVMsQ0FFUixRQUFRLENBV1AsUUFBUSxDQUFDO0lBQ1IsTUFBTSxFQUFFLGNBQWM7R0FVdEI7RUEzQkosQUFtQkksc0JBbkJrQixDQUdyQixTQUFTLENBRVIsUUFBUSxDQVdQLFFBQVEsQ0FHUCxDQUFDLENBQUM7SUFDRCxNQUFNLEVBQUUsQ0FBQztJQUNULE9BQU8sRUFBRSxLQUFLO0dBQ2Q7RUF0QkwsQUF3Qkksc0JBeEJrQixDQUdyQixTQUFTLENBRVIsUUFBUSxDQVdQLFFBQVEsQ0FRUCxpQkFBaUIsQ0FBQztJQUNqQixVQUFVLEVBQUUsR0FBRztHQUNmIn0= */
css/sb-blocks.css CHANGED
@@ -1,3 +1,3 @@
1
- .sbi {
2
- pointer-events: none !important;
3
  }
1
+ .sbi {
2
+ pointer-events: none !important;
3
  }
css/sb-instagram-2-1.css ADDED
@@ -0,0 +1,744 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**************/
2
+ /*** LAYOUT ***/
3
+ /**************/
4
+
5
+ /* Feed container */
6
+ #sb_instagram {
7
+ width: 100%;
8
+ margin: 0 auto;
9
+ padding: 0;
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+ }
14
+ #sb_instagram:after{
15
+ content: "";
16
+ display: table;
17
+ clear: both;
18
+ }
19
+
20
+ /*********************/
21
+ /*** STYLE OPTIONS ***/
22
+ /*********************/
23
+ #sb_instagram.sbi_fixed_height{
24
+ overflow: hidden;
25
+ overflow-y: auto;
26
+ -webkit-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
+ box-sizing: border-box;
29
+ }
30
+ #sb_instagram #sbi_images{
31
+ width: 100%;
32
+ float: left;
33
+ line-height: 0;
34
+
35
+ -webkit-box-sizing: border-box;
36
+ -moz-box-sizing: border-box;
37
+ box-sizing: border-box;
38
+ }
39
+
40
+ /* Items */
41
+ #sb_instagram #sbi_images .sbi_item{
42
+ display: -moz-inline-stack;
43
+ display: inline-block;
44
+ float: left;
45
+ vertical-align: top;
46
+ zoom: 1;
47
+ *display: inline;
48
+
49
+ max-height: 1000px;
50
+ padding: inherit !important;
51
+ margin: 0 !important;
52
+ text-decoration: none;
53
+ opacity: 1;
54
+ overflow: hidden;
55
+
56
+ -webkit-box-sizing: border-box;
57
+ -moz-box-sizing: border-box;
58
+ box-sizing: border-box;
59
+
60
+ -webkit-transition: all 0.5s ease;
61
+ -moz-transition: all 0.5s ease;
62
+ -o-transition: all 0.5s ease;
63
+ -ms-transition: all 0.5s ease;
64
+ transition: all 0.5s ease;
65
+ }
66
+ /* Transition items in */
67
+ #sb_instagram #sbi_images .sbi_item.sbi_transition{
68
+ opacity: 0;
69
+ max-height: 0;
70
+ }
71
+
72
+ /* Cols */
73
+ #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
74
+ #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
75
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
76
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
77
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
78
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
79
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
80
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
81
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
82
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
83
+
84
+ /* Disable mobile layout */
85
+ #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
86
+ #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
87
+ #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
88
+ #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
89
+ #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
90
+ #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
91
+ #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
92
+ #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
93
+ #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
94
+ #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
95
+
96
+ /* Photos */
97
+ #sb_instagram .sbi_photo_wrap{
98
+ position: relative;
99
+ }
100
+ #sb_instagram .sbi_photo{
101
+ display: block;
102
+ text-decoration: none;
103
+ }
104
+ #sb_instagram .sbi_photo img{
105
+ width: 100%;
106
+ height: auto;
107
+ }
108
+ #sb_instagram .sbi_no_js img{
109
+ display: none;
110
+ }
111
+ #sb_instagram a,
112
+ #sb_instagram a:hover,
113
+ #sb_instagram a:focus,
114
+ #sb_instagram a:active{
115
+ outline: none;
116
+ }
117
+ #sb_instagram img{
118
+ display: block;
119
+ padding: 0 !important;
120
+ margin: 0 !important;
121
+ max-width: 100% !important;
122
+ opacity: 1 !important;
123
+ }
124
+ #sb_instagram .sbi_link{
125
+ display: none;
126
+ position: absolute;
127
+ bottom: 0;
128
+ right: 0;
129
+
130
+ width: 100%;
131
+ padding: 10px 0;
132
+ background: rgba(0,0,0,0.5);
133
+ text-align: center;
134
+ color: #fff;
135
+ font-size: 12px;
136
+ line-height: 1.1;
137
+ }
138
+ #sb_instagram .sbi_link a{
139
+ padding: 0 6px;
140
+ text-decoration: none;
141
+ color: #fff;
142
+ font-size: 12px;
143
+ line-height: 1.1;
144
+
145
+ display: -moz-inline-stack;
146
+ display: inline-block;
147
+ vertical-align: top;
148
+ zoom: 1;
149
+ *display: inline;
150
+ }
151
+ #sb_instagram .sbi_link .sbi_lightbox_link{
152
+ padding-bottom: 5px;
153
+ }
154
+ #sb_instagram .sbi_link a:hover,
155
+ #sb_instagram .sbi_link a:focus{
156
+ text-decoration: underline;
157
+ }
158
+ #sb_instagram .sbi_photo_wrap:hover .sbi_link,
159
+ #sb_instagram .sbi_photo_wrap:focus .sbi_link{
160
+ display: block;
161
+ }
162
+
163
+ /* Videos */
164
+ #sb_instagram svg:not(:root).svg-inline--fa {
165
+ height: 1em;
166
+ display: inline-block;
167
+ }
168
+
169
+ #sb_instagram .sbi_type_video .sbi_playbtn,
170
+ #sb_instagram .sbi_type_carousel .sbi_playbtn,
171
+ .sbi_type_carousel .fa-clone,
172
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
173
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
174
+ display: block !important;
175
+ position: absolute;
176
+ z-index: 1;
177
+
178
+ color: #fff;
179
+ color: rgba(255,255,255,0.9);
180
+ font-style: normal !important;
181
+ text-shadow: 0 0 8px rgba(0,0,0,0.8);
182
+ }
183
+ #sb_instagram .sbi_type_video .sbi_playbtn,
184
+ #sb_instagram .sbi_type_carousel .sbi_playbtn {
185
+ z-index: 2;
186
+ top: 50%;
187
+ left: 50%;
188
+ margin-top: -24px;
189
+ margin-left: -19px;
190
+ padding: 0;
191
+ font-size: 48px;
192
+ }
193
+ #sb_instagram .sbi_type_carousel .fa-clone{
194
+ right: 12px;
195
+ top: 12px;
196
+ font-size: 24px;
197
+ text-shadow: 0 0 8px rgba(0,0,0,0.3);
198
+ }
199
+ .sbi_type_carousel svg.fa-clone,
200
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
201
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
202
+ -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
203
+ filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
204
+ }
205
+
206
+ /* Loader */
207
+ #sb_instagram .sbi_loader{
208
+ width: 20px;
209
+ height: 20px;
210
+
211
+ position: relative;
212
+ top: 50%;
213
+ left: 50%;
214
+ margin: -10px 0 0 -10px;
215
+ background-color: #000;
216
+ background-color: rgba(0,0,0,0.5);
217
+
218
+ border-radius: 100%;
219
+ -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
220
+ animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
221
+ }
222
+ #sb_instagram br {
223
+ display: none;
224
+ }
225
+ #sbi_load p {
226
+ display: inline;
227
+ padding: 0;
228
+ margin: 0;
229
+ }
230
+ /* Loader in button */
231
+ #sb_instagram #sbi_load .sbi_loader{
232
+ position: absolute;
233
+ margin-top: -11px;
234
+ background-color: #fff;
235
+ opacity: 1;
236
+ }
237
+ @-webkit-keyframes sbi-sk-scaleout {
238
+ 0% { -webkit-transform: scale(0) }
239
+ 100% {
240
+ -webkit-transform: scale(1.0);
241
+ opacity: 0;
242
+ }
243
+ }
244
+ @keyframes sbi-sk-scaleout {
245
+ 0% {
246
+ -webkit-transform: scale(0);
247
+ -ms-transform: scale(0);
248
+ transform: scale(0);
249
+ } 100% {
250
+ -webkit-transform: scale(1.0);
251
+ -ms-transform: scale(1.0);
252
+ transform: scale(1.0);
253
+ opacity: 0;
254
+ }
255
+ }
256
+
257
+ #sb_instagram .fa-spin,
258
+ #sbi_lightbox .fa-spin{
259
+ -webkit-animation: fa-spin 2s infinite linear;
260
+ animation: fa-spin 2s infinite linear
261
+ }
262
+
263
+ #sb_instagram .fa-pulse,
264
+ #sbi_lightbox .fa-pulse{
265
+ -webkit-animation: fa-spin 1s infinite steps(8);
266
+ animation: fa-spin 1s infinite steps(8)
267
+ }
268
+
269
+ @-webkit-keyframes fa-spin {
270
+ 0% {
271
+ -webkit-transform: rotate(0deg);
272
+ transform: rotate(0deg)
273
+ }
274
+ 100% {
275
+ -webkit-transform: rotate(359deg);
276
+ transform: rotate(359deg)
277
+ }
278
+ }
279
+
280
+ @keyframes fa-spin {
281
+ 0% {
282
+ -webkit-transform: rotate(0deg);
283
+ transform: rotate(0deg)
284
+ }
285
+ 100% {
286
+ -webkit-transform: rotate(359deg);
287
+ transform: rotate(359deg)
288
+ }
289
+ }
290
+ /* Screen reader */
291
+ .sbi-screenreader{text-indent: -9999px !important;display: block !important;width: 0 !important;height: 0 !important;line-height: 0 !important;text-align: left !important; }
292
+
293
+ /* HEADER */
294
+ #sb_instagram .sb_instagram_header{
295
+ float: left;
296
+ clear: both;
297
+ margin: 0 0 15px 0;
298
+ padding: 0;
299
+ line-height: 1.2;
300
+ width: 100%;
301
+ }
302
+ #sb_instagram .sb_instagram_header a{
303
+ float: left;
304
+ display: block;
305
+ /*width: 100%;*/
306
+ min-width: 100%\9;
307
+ text-decoration: none;
308
+ transition: color 0.5s ease;
309
+ }
310
+ /** Medium Header */
311
+ /* Only use medium & large headers on devices above 480px */
312
+ @media all and (min-width: 480px){
313
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
314
+ width: 80px;
315
+ height: 80px;
316
+ border-radius: 40px;
317
+ }
318
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
319
+ width: 80px;
320
+ height: 80px;
321
+ border-radius: 40px;
322
+ }
323
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
324
+ font-size: 20px;
325
+ }
326
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
327
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
328
+ font-size: 14px;
329
+ }
330
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,
331
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
332
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
333
+ margin-left: 95px !important;
334
+ line-height: 1.4
335
+ }
336
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{
337
+ margin-right: -85px !important;
338
+ }
339
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
340
+ margin-top: 4px !important;
341
+ }
342
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
343
+ padding-top: 20px !important;
344
+ }
345
+ /** Large Header */
346
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
347
+ width: 120px;
348
+ height: 120px;
349
+ border-radius: 60px;
350
+ }
351
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
352
+ width: 120px;
353
+ height: 120px;
354
+ border-radius: 60px;
355
+ }
356
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
357
+ font-size: 28px;
358
+ }
359
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
360
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
361
+ font-size: 16px;
362
+ }
363
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,
364
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
365
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
366
+ margin-left: 140px !important;
367
+ line-height: 1.5;
368
+ }
369
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{
370
+ margin-right: -120px !important;
371
+ }
372
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
373
+ margin-top: 12px !important;
374
+ }
375
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
376
+ padding-top: 32px !important;
377
+ }
378
+ }
379
+
380
+ /* Header profile pic */
381
+ #sb_instagram .sb_instagram_header .sbi_header_img{
382
+ float: left;
383
+ position: relative;
384
+ width: 50px;
385
+ margin: 0 0 0 -100% !important;
386
+ overflow: hidden;
387
+
388
+ -moz-border-radius: 40px;
389
+ -webkit-border-radius: 40px;
390
+ border-radius: 40px;
391
+ }
392
+ #sb_instagram .sb_instagram_header .sbi_header_img img{
393
+ float: left;
394
+ margin: 0 !important;
395
+ padding: 0 !important;
396
+ border: none !important;
397
+
398
+ -moz-border-radius: 40px;
399
+ -webkit-border-radius: 40px;
400
+ border-radius: 40px;
401
+ }
402
+ /* Profile pic hover */
403
+ /* Profile pic hover */
404
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
405
+ opacity: 0;
406
+ position: absolute;
407
+ width: 100%;
408
+ top: 0;
409
+ bottom: 0;
410
+ left: 0;
411
+ text-align: center;
412
+ color: #fff;
413
+ background: rgba(0,0,0,0.75);
414
+ }
415
+
416
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{
417
+ position: absolute;
418
+ top: 50%;
419
+ left: 50%;
420
+ margin-top: -12px;
421
+ margin-left: -12px;
422
+ width: 24px;
423
+ height: 24px;
424
+ font-size: 24px;
425
+ }
426
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
427
+ overflow: hidden;
428
+ background: url('../img/small-logo.png') no-repeat 0 0;
429
+ }
430
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
431
+ z-index: 2;
432
+ transition: opacity 0.4s ease-in-out;
433
+ }
434
+ #sb_instagram .sb_instagram_header .sbi_fade_in{
435
+ opacity: 1;
436
+ transition: opacity 0.2s ease-in-out;
437
+ }
438
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
439
+ position: absolute;
440
+ width: 100%;
441
+ top: 0;
442
+ bottom: 0;
443
+ left: 0;
444
+ text-align: center;
445
+ color: #fff;
446
+ background: rgba(0,0,0,0.75);
447
+
448
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
449
+ filter: alpha(opacity=0);
450
+ -moz-opacity: 0;
451
+ -khtml-opacity: 0;
452
+ opacity: 0;
453
+ border-radius: 40px;
454
+ transition: opacity 0.2s;
455
+ }
456
+ /* Fade the Instagram icon in when hovering on the header */
457
+ #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
458
+ #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
459
+ opacity: 1;
460
+ }
461
+ /* Header text */
462
+ #sb_instagram .sb_instagram_header .sbi_header_text{
463
+ float: left;
464
+ width: 100%;
465
+ padding-top: 5px;
466
+ }
467
+ #sb_instagram .sb_instagram_header a{
468
+ text-decoration: none;
469
+ }
470
+ #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
471
+ #sb_instagram .sb_instagram_header .sbi_header_text h3{
472
+ float: left;
473
+ clear: both;
474
+ width: auto;
475
+ margin: 0 0 0 60px !important;
476
+ padding: 0 !important;
477
+ }
478
+ #sb_instagram .sb_instagram_header h3{
479
+ font-size: 16px;
480
+ line-height: 1.3;
481
+ }
482
+ #sb_instagram .sb_instagram_header p{
483
+ font-size: 13px;
484
+ line-height: 1.3;
485
+ margin: 0;
486
+ padding: 0;
487
+ }
488
+ #sb_instagram p:empty { display: none; }
489
+ #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
490
+ margin-right: 3px !important;
491
+ }
492
+
493
+ /* No bio */
494
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
495
+ padding-top: 9px !important;
496
+ }
497
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
498
+ clear: both;
499
+ }
500
+
501
+
502
+ /* Buttons */
503
+ #sb_instagram #sbi_load{
504
+ float: left;
505
+ clear: both;
506
+ width: 100%;
507
+ text-align: center;
508
+ }
509
+ #sb_instagram #sbi_load .fa-spinner{
510
+ display: none;
511
+ position: absolute;
512
+ top: 50%;
513
+ left: 50%;
514
+ margin: -8px 0 0 -7px;
515
+ font-size: 15px;
516
+ }
517
+ #sb_instagram #sbi_load{
518
+ opacity: 1;
519
+ transition: all 0.5s ease-in;
520
+ }
521
+ #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
522
+ opacity: 1;
523
+ transition: all 0.1s ease-in;
524
+ }
525
+ #sb_instagram .sbi_hidden{
526
+ opacity: 0 !important;
527
+ }
528
+ #sb_instagram #sbi_load .sbi_load_btn,
529
+ #sb_instagram .sbi_follow_btn a{
530
+ display: -moz-inline-stack;
531
+ display: inline-block;
532
+ vertical-align: top;
533
+ zoom: 1;
534
+ *display: inline;
535
+
536
+ padding: 7px 14px;
537
+ margin: 5px auto 0 auto;
538
+ background: #333;
539
+ color: #eee;
540
+ border: none;
541
+ color: #fff;
542
+ text-decoration: none;
543
+ font-size: 13px;
544
+ line-height: 1.5;
545
+
546
+ -moz-border-radius: 4px;
547
+ -webkit-border-radius: 4px;
548
+ border-radius: 4px;
549
+
550
+ -webkit-box-sizing: border-box;
551
+ -moz-box-sizing: border-box;
552
+ box-sizing: border-box;
553
+ }
554
+ #sb_instagram #sbi_load .sbi_load_btn {
555
+ position: relative;
556
+ }
557
+ /* Follow button */
558
+ #sb_instagram .sbi_follow_btn{
559
+ display: -moz-inline-stack;
560
+ display: inline-block;
561
+ vertical-align: top;
562
+ zoom: 1;
563
+ *display: inline;
564
+ text-align: center;
565
+ }
566
+ #sb_instagram .sbi_follow_btn.sbi_top{
567
+ display: block;
568
+ margin-bottom: 5px;
569
+ }
570
+ #sb_instagram .sbi_follow_btn a{
571
+ background: #408bd1;
572
+ color: #fff;
573
+ }
574
+ #sb_instagram .sbi_follow_btn a,
575
+ #sb_instagram .sbi_follow_btn a,
576
+ #sb_instagram #sbi_load .sbi_load_btn{
577
+ transition: all 0.1s ease-in;
578
+ }
579
+ /* Hover state for default colors */
580
+ #sb_instagram #sbi_load .sbi_load_btn:hover{
581
+ outline: none;
582
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
583
+ }
584
+ #sb_instagram .sbi_follow_btn a:hover,
585
+ #sb_instagram .sbi_follow_btn a:focus{
586
+ outline: none;
587
+ box-shadow: inset 0 0 10px 20px #359dff;
588
+ }
589
+ /* If a custom color is applied then just use opacity for the hover effect */
590
+ #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
591
+ #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
592
+ #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
593
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
594
+ }
595
+ /* Active state */
596
+ #sb_instagram .sbi_follow_btn a:active,
597
+ #sb_instagram #sbi_load .sbi_load_btn:active{
598
+ box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
599
+ }
600
+
601
+ #sb_instagram .sbi_follow_btn .fa,
602
+ #sb_instagram .sbi_follow_btn svg{
603
+ margin-bottom: -1px;
604
+ margin-right: 7px;
605
+ font-size: 15px;
606
+ }
607
+ #sb_instagram .sbi_follow_btn svg{
608
+ vertical-align: -.125em;
609
+ }
610
+ #sb_instagram #sbi_load .sbi_follow_btn{
611
+ margin-left: 5px;
612
+ }
613
+
614
+ /* Error messages */
615
+ #sb_instagram .sb_instagram_error{
616
+ width: 100%;
617
+ text-align: center;
618
+ line-height: 1.4;
619
+ }
620
+
621
+ /* Mod only error msgs */
622
+ #sbi_mod_error{
623
+ display: none;
624
+ border: 1px solid #ddd;
625
+ background: #eee;
626
+ color: #333;
627
+ margin: 10px 0 0;
628
+ padding: 10px 15px;
629
+ font-size: 13px;
630
+ text-align: center;
631
+ clear: both;
632
+
633
+ -moz-border-radius: 4px;
634
+ -webkit-border-radius: 4px;
635
+ border-radius: 4px;
636
+ }
637
+ #sbi_mod_error p{
638
+ padding: 5px 0 !important;
639
+ margin: 0 !important;
640
+ line-height: 1.3 !important;
641
+ }
642
+ #sbi_mod_error ol,
643
+ #sbi_mod_error ul{
644
+ padding: 5px 0 5px 20px !important;
645
+ margin: 0 !important;
646
+ }
647
+ #sbi_mod_error li{
648
+ padding: 1px 0 !important;
649
+ margin: 0 !important;
650
+ }
651
+ #sbi_mod_error span{
652
+ font-size: 12px;
653
+ }
654
+
655
+ /* Medium */
656
+ #sb_instagram.sbi_medium .sbi_playbtn,
657
+ #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
658
+ margin-top: -12px;
659
+ margin-left: -9px;
660
+ font-size: 23px;
661
+ }
662
+ #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
663
+ right: 8px;
664
+ top: 8px;
665
+ font-size: 18px;
666
+ }
667
+ /* Small */
668
+ #sb_instagram.sbi_small .sbi_playbtn,
669
+ #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
670
+ margin-top: -9px;
671
+ margin-left: -7px;
672
+ font-size: 18px;
673
+ }
674
+ #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
675
+ right: 5px;
676
+ top: 5px;
677
+ font-size: 12px;
678
+ }
679
+
680
+ /* Media queries */
681
+ @media all and (max-width: 640px){
682
+ /* Make 3-6 cols into 2 col */
683
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
684
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
685
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
686
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
687
+ width: 50%;
688
+ }
689
+ /* Make 7-10 cols into 4 col */
690
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
691
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
692
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
693
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
694
+ width: 25%;
695
+ }
696
+ /* On mobile make the min-width 100% */
697
+ #sb_instagram.sbi_width_resp{
698
+ width: 100% !important;
699
+ }
700
+ }
701
+ @media all and (max-width: 480px){
702
+ /* Make all cols into 1 col */
703
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
704
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
705
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
706
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
707
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
708
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
709
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
710
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
711
+ width: 100%;
712
+ }
713
+ }
714
+
715
+ /* NO JS */
716
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
717
+ box-sizing: border-box;
718
+ position: relative;
719
+ overflow: hidden;
720
+ }
721
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
722
+ content: "";
723
+ display: block;
724
+ padding-top: 100%;
725
+ z-index: -300;
726
+ }
727
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
728
+ position: absolute;
729
+ top: 0;
730
+ left: 0;
731
+ bottom: 0;
732
+ right: 0;
733
+ }
734
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
735
+ opacity: 1;
736
+ max-height: 640px;
737
+ }
738
+ #sb_instagram.sbi_no_js .sbi_photo img,
739
+ #sb_instagram.sbi_no_js .sbi_load_btn{
740
+ display: none;
741
+ }
742
+ #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
743
+ padding-bottom: 0 !important;
744
+ }
css/sb-instagram-2-1.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em;display:inline-block}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important;text-align:left!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}
css/sb-instagram-2-2.css CHANGED
@@ -1,819 +1,816 @@
1
- /**************/
2
- /*** LAYOUT ***/
3
- /**************/
4
-
5
- /* Feed container */
6
- #sb_instagram {
7
- width: 100%;
8
- margin: 0 auto;
9
- padding: 0;
10
- -webkit-box-sizing: border-box;
11
- -moz-box-sizing: border-box;
12
- box-sizing: border-box;
13
- }
14
- #sb_instagram:after{
15
- content: "";
16
- display: table;
17
- clear: both;
18
- }
19
-
20
- /*********************/
21
- /*** STYLE OPTIONS ***/
22
- /*********************/
23
- #sb_instagram.sbi_fixed_height{
24
- overflow: hidden;
25
- overflow-y: auto;
26
- -webkit-box-sizing: border-box;
27
- -moz-box-sizing: border-box;
28
- box-sizing: border-box;
29
- }
30
- #sb_instagram #sbi_images{
31
- width: 100%;
32
- float: left;
33
- line-height: 0;
34
-
35
- -webkit-box-sizing: border-box;
36
- -moz-box-sizing: border-box;
37
- box-sizing: border-box;
38
- }
39
- /* Remove header shadow/border */
40
- #sb_instagram .sbi_header_link {
41
- -webkit-box-shadow: none;
42
- box-shadow: none;
43
- }
44
- #sb_instagram .sbi_header_link:hover {
45
- border: none;
46
- }
47
-
48
- /* Items */
49
- #sb_instagram #sbi_images .sbi_item{
50
- display: -moz-inline-stack;
51
- display: inline-block;
52
- float: left;
53
- vertical-align: top;
54
- zoom: 1;
55
- *display: inline;
56
-
57
- max-height: 1000px;
58
- padding: inherit !important;
59
- margin: 0 !important;
60
- text-decoration: none;
61
- opacity: 1;
62
- overflow: hidden;
63
-
64
- -webkit-box-sizing: border-box;
65
- -moz-box-sizing: border-box;
66
- box-sizing: border-box;
67
-
68
- -webkit-transition: all 0.5s ease;
69
- -moz-transition: all 0.5s ease;
70
- -o-transition: all 0.5s ease;
71
- -ms-transition: all 0.5s ease;
72
- transition: all 0.5s ease;
73
- }
74
- /* Transition items in */
75
- #sb_instagram #sbi_images .sbi_item.sbi_transition{
76
- opacity: 0;
77
- max-height: 0;
78
- }
79
-
80
- /* Cols */
81
- #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
82
- #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
83
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
84
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
85
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
86
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
87
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
88
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
89
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
90
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
91
-
92
- /* Disable mobile layout */
93
- #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
94
- #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
95
- #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
96
- #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
97
- #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
98
- #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
99
- #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
100
- #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
101
- #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
102
- #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
103
-
104
- /* Photos */
105
- #sb_instagram .sbi_photo_wrap{
106
- position: relative;
107
- }
108
- #sb_instagram .sbi_photo{
109
- display: block;
110
- text-decoration: none;
111
- }
112
- #sb_instagram .sbi_photo img{
113
- width: 100%;
114
- height: auto;
115
- }
116
- #sb_instagram .sbi_no_js img{
117
- display: none;
118
- }
119
- #sb_instagram a,
120
- #sb_instagram a:hover,
121
- #sb_instagram a:focus,
122
- #sb_instagram a:active{
123
- outline: none;
124
- }
125
- #sb_instagram img{
126
- display: block;
127
- padding: 0 !important;
128
- margin: 0 !important;
129
- max-width: 100% !important;
130
- opacity: 1 !important;
131
- }
132
- #sb_instagram .sbi_link{
133
- display: none;
134
- position: absolute;
135
- bottom: 0;
136
- right: 0;
137
-
138
- width: 100%;
139
- padding: 10px 0;
140
- background: rgba(0,0,0,0.5);
141
- text-align: center;
142
- color: #fff;
143
- font-size: 12px;
144
- line-height: 1.1;
145
- }
146
- #sb_instagram .sbi_link a{
147
- padding: 0 6px;
148
- text-decoration: none;
149
- color: #fff;
150
- font-size: 12px;
151
- line-height: 1.1;
152
-
153
- display: -moz-inline-stack;
154
- display: inline-block;
155
- vertical-align: top;
156
- zoom: 1;
157
- *display: inline;
158
- }
159
- #sb_instagram .sbi_link .sbi_lightbox_link{
160
- padding-bottom: 5px;
161
- }
162
- #sb_instagram .sbi_link a:hover,
163
- #sb_instagram .sbi_link a:focus{
164
- text-decoration: underline;
165
- }
166
- #sb_instagram .sbi_photo_wrap:hover .sbi_link,
167
- #sb_instagram .sbi_photo_wrap:focus .sbi_link{
168
- display: block;
169
- }
170
-
171
- /* Videos */
172
- #sb_instagram svg:not(:root).svg-inline--fa {
173
- height: 1em;
174
- display: inline-block;
175
- }
176
-
177
- #sb_instagram .sbi_type_video .sbi_playbtn,
178
- #sb_instagram .sbi_type_carousel .sbi_playbtn,
179
- .sbi_type_carousel .fa-clone,
180
- #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
181
- #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
182
- display: block !important;
183
- position: absolute;
184
- z-index: 1;
185
-
186
- color: #fff;
187
- color: rgba(255,255,255,0.9);
188
- font-style: normal !important;
189
- text-shadow: 0 0 8px rgba(0,0,0,0.8);
190
- }
191
- #sb_instagram .sbi_type_video .sbi_playbtn,
192
- #sb_instagram .sbi_type_carousel .sbi_playbtn {
193
- z-index: 2;
194
- top: 50%;
195
- left: 50%;
196
- margin-top: -24px;
197
- margin-left: -19px;
198
- padding: 0;
199
- font-size: 48px;
200
- }
201
- #sb_instagram .sbi_type_carousel .fa-clone{
202
- right: 12px;
203
- top: 12px;
204
- font-size: 24px;
205
- text-shadow: 0 0 8px rgba(0,0,0,0.3);
206
- }
207
- .sbi_type_carousel svg.fa-clone,
208
- #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
209
- #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
210
- -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
211
- filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
212
- }
213
-
214
- /* Loader */
215
- #sb_instagram .sbi_loader{
216
- width: 20px;
217
- height: 20px;
218
-
219
- position: relative;
220
- top: 50%;
221
- left: 50%;
222
- margin: -10px 0 0 -10px;
223
- background-color: #000;
224
- background-color: rgba(0,0,0,0.5);
225
-
226
- border-radius: 100%;
227
- -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
228
- animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
229
- }
230
- #sb_instagram br {
231
- display: none;
232
- }
233
- #sbi_load p {
234
- display: inline;
235
- padding: 0;
236
- margin: 0;
237
- }
238
- /* Loader in button */
239
- #sb_instagram #sbi_load .sbi_loader{
240
- position: absolute;
241
- margin-top: -11px;
242
- background-color: #fff;
243
- opacity: 1;
244
- }
245
- @-webkit-keyframes sbi-sk-scaleout {
246
- 0% { -webkit-transform: scale(0) }
247
- 100% {
248
- -webkit-transform: scale(1.0);
249
- opacity: 0;
250
- }
251
- }
252
- @keyframes sbi-sk-scaleout {
253
- 0% {
254
- -webkit-transform: scale(0);
255
- -ms-transform: scale(0);
256
- transform: scale(0);
257
- } 100% {
258
- -webkit-transform: scale(1.0);
259
- -ms-transform: scale(1.0);
260
- transform: scale(1.0);
261
- opacity: 0;
262
- }
263
- }
264
-
265
- #sb_instagram .fa-spin,
266
- #sbi_lightbox .fa-spin{
267
- -webkit-animation: fa-spin 2s infinite linear;
268
- animation: fa-spin 2s infinite linear
269
- }
270
-
271
- #sb_instagram .fa-pulse,
272
- #sbi_lightbox .fa-pulse{
273
- -webkit-animation: fa-spin 1s infinite steps(8);
274
- animation: fa-spin 1s infinite steps(8)
275
- }
276
-
277
- @-webkit-keyframes fa-spin {
278
- 0% {
279
- -webkit-transform: rotate(0deg);
280
- transform: rotate(0deg)
281
- }
282
- 100% {
283
- -webkit-transform: rotate(359deg);
284
- transform: rotate(359deg)
285
- }
286
- }
287
-
288
- @keyframes fa-spin {
289
- 0% {
290
- -webkit-transform: rotate(0deg);
291
- transform: rotate(0deg)
292
- }
293
- 100% {
294
- -webkit-transform: rotate(359deg);
295
- transform: rotate(359deg)
296
- }
297
- }
298
- /* Screen reader */
299
- .sbi-screenreader{text-indent: -9999px !important;display: block !important;width: 0 !important;height: 0 !important;line-height: 0 !important;text-align: left !important; }
300
-
301
- /* HEADER */
302
- #sb_instagram .sb_instagram_header{
303
- float: left;
304
- clear: both;
305
- margin: 0 0 15px 0;
306
- padding: 0;
307
- line-height: 1.2;
308
- width: 100%;
309
- }
310
- #sb_instagram .sb_instagram_header a{
311
- float: left;
312
- display: block;
313
- /*width: 100%;*/
314
- min-width: 100%\9;
315
- text-decoration: none;
316
- transition: color 0.5s ease;
317
- }
318
- .sbi_no_avatar .sbi_header_img{
319
- background: #333;
320
- color: #fff;
321
- width: 50px;
322
- height: 50px;
323
- position: relative;
324
- }
325
- .sbi_no_avatar .sbi_header_hashtag_icon {
326
- display: block;
327
- color: #fff;
328
- opacity: .9;
329
- -webkit-transition: background .6s linear,color .6s linear;
330
- -moz-transition: background .6s linear,color .6s linear;
331
- -ms-transition: background .6s linear,color .6s linear;
332
- -o-transition: background .6s linear,color .6s linear;
333
- transition: background .6s linear,color .6s linear
334
- }
335
-
336
- .sbi_no_avatar:hover .sbi_header_hashtag_icon {
337
- display: block;
338
- opacity: 1;
339
- -webkit-transition: background .2s linear,color .2s linear;
340
- -moz-transition: background .2s linear,color .2s linear;
341
- -ms-transition: background .2s linear,color .2s linear;
342
- -o-transition: background .2s linear,color .2s linear;
343
- transition: background .2s linear,color .2s linear
344
- }
345
- /** Medium Header */
346
- /* Only use medium & large headers on devices above 480px */
347
- @media all and (min-width: 480px){
348
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
349
- width: 80px;
350
- height: 80px;
351
- border-radius: 40px;
352
- }
353
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
354
- width: 80px;
355
- height: 80px;
356
- border-radius: 40px;
357
- }
358
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
359
- font-size: 20px;
360
- }
361
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
362
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
363
- font-size: 14px;
364
- }
365
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,
366
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
367
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
368
- margin-left: 95px !important;
369
- line-height: 1.4
370
- }
371
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{
372
- margin-right: -85px !important;
373
- }
374
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
375
- margin-top: 4px !important;
376
- }
377
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
378
- padding-top: 20px !important;
379
- }
380
- /** Large Header */
381
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
382
- width: 120px;
383
- height: 120px;
384
- border-radius: 60px;
385
- }
386
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
387
- width: 120px;
388
- height: 120px;
389
- border-radius: 60px;
390
- }
391
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
392
- font-size: 28px;
393
- }
394
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
395
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
396
- font-size: 16px;
397
- }
398
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,
399
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
400
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
401
- margin-left: 140px !important;
402
- line-height: 1.5;
403
- }
404
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{
405
- margin-right: -120px !important;
406
- }
407
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
408
- margin-top: 12px !important;
409
- }
410
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
411
- padding-top: 32px !important;
412
- }
413
- }
414
-
415
- /* Header profile pic */
416
- #sb_instagram .sb_instagram_header .sbi_header_img{
417
- float: left;
418
- position: relative;
419
- width: 50px;
420
- margin: 0 0 0 -100% !important;
421
- overflow: hidden;
422
-
423
- -moz-border-radius: 40px;
424
- -webkit-border-radius: 40px;
425
- border-radius: 40px;
426
- }
427
- #sb_instagram .sb_instagram_header .sbi_header_img img{
428
- float: left;
429
- margin: 0 !important;
430
- padding: 0 !important;
431
- border: none !important;
432
-
433
- -moz-border-radius: 40px;
434
- -webkit-border-radius: 40px;
435
- border-radius: 40px;
436
- }
437
- /* Profile pic hover */
438
- /* Profile pic hover */
439
- #sb_instagram .sb_instagram_header .sbi_header_img_hover{
440
- opacity: 0;
441
- position: absolute;
442
- width: 100%;
443
- top: 0;
444
- bottom: 0;
445
- left: 0;
446
- text-align: center;
447
- color: #fff;
448
- background: rgba(0,0,0,0.75);
449
- }
450
-
451
- #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
452
- #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
453
- position: absolute;
454
- top: 50%;
455
- left: 50%;
456
- margin-top: -12px;
457
- margin-left: -12px;
458
- width: 24px;
459
- height: 24px;
460
- font-size: 24px;
461
- }
462
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
463
- .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
464
- margin-top: -18px;
465
- margin-left: -18px;
466
- width: 36px;
467
- height: 36px;
468
- font-size: 36px
469
- }
470
-
471
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
472
- .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
473
- margin-top: -24px;
474
- margin-left: -24px;
475
- width: 48px;
476
- height: 48px;
477
- font-size: 48px
478
- }
479
- #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
480
- overflow: hidden;
481
- background: url('../img/small-logo.png') no-repeat 0 0;
482
- }
483
- #sb_instagram .sb_instagram_header .sbi_header_img_hover{
484
- z-index: 2;
485
- transition: opacity 0.4s ease-in-out;
486
- }
487
- #sb_instagram .sb_instagram_header .sbi_fade_in{
488
- opacity: 1;
489
- transition: opacity 0.2s ease-in-out;
490
- }
491
- #sb_instagram .sb_instagram_header .sbi_header_img_hover{
492
- position: absolute;
493
- width: 100%;
494
- top: 0;
495
- bottom: 0;
496
- left: 0;
497
- text-align: center;
498
- color: #fff;
499
- background: rgba(0,0,0,0.75);
500
-
501
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
502
- filter: alpha(opacity=0);
503
- -moz-opacity: 0;
504
- -khtml-opacity: 0;
505
- opacity: 0;
506
- border-radius: 40px;
507
- transition: opacity 0.2s;
508
- }
509
- /* Fade the Instagram icon in when hovering on the header */
510
- #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
511
- #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
512
- opacity: 1;
513
- }
514
- /* Header text */
515
- #sb_instagram .sb_instagram_header .sbi_header_text{
516
- float: left;
517
- width: 100%;
518
- padding-top: 5px;
519
- }
520
- #sb_instagram .sb_instagram_header a{
521
- text-decoration: none;
522
- }
523
- #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
524
- #sb_instagram .sb_instagram_header .sbi_header_text h3{
525
- float: left;
526
- clear: both;
527
- width: auto;
528
- margin: 0 0 0 60px !important;
529
- padding: 0 !important;
530
- }
531
- #sb_instagram .sb_instagram_header h3{
532
- font-size: 16px;
533
- line-height: 1.3;
534
- }
535
- #sb_instagram .sb_instagram_header p{
536
- font-size: 13px;
537
- line-height: 1.3;
538
- margin: 0;
539
- padding: 0;
540
- }
541
- #sb_instagram p:empty { display: none; }
542
- #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
543
- margin-right: 3px !important;
544
- }
545
-
546
- /* No bio */
547
- #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
548
- padding-top: 9px !important;
549
- }
550
- #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
551
- clear: both;
552
- }
553
-
554
-
555
- /* Buttons */
556
- #sb_instagram #sbi_load{
557
- float: left;
558
- clear: both;
559
- width: 100%;
560
- text-align: center;
561
- }
562
- #sb_instagram #sbi_load .fa-spinner{
563
- display: none;
564
- position: absolute;
565
- top: 50%;
566
- left: 50%;
567
- margin: -8px 0 0 -7px;
568
- font-size: 15px;
569
- }
570
- #sb_instagram #sbi_load{
571
- opacity: 1;
572
- transition: all 0.5s ease-in;
573
- }
574
- #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
575
- opacity: 1;
576
- transition: all 0.1s ease-in;
577
- }
578
- #sb_instagram .sbi_hidden{
579
- opacity: 0 !important;
580
- }
581
- #sb_instagram #sbi_load .sbi_load_btn,
582
- #sb_instagram .sbi_follow_btn a{
583
- display: -moz-inline-stack;
584
- display: inline-block;
585
- vertical-align: top;
586
- zoom: 1;
587
- *display: inline;
588
-
589
- padding: 7px 14px;
590
- margin: 5px auto 0 auto;
591
- background: #333;
592
- color: #eee;
593
- border: none;
594
- color: #fff;
595
- text-decoration: none;
596
- font-size: 13px;
597
- line-height: 1.5;
598
-
599
- -moz-border-radius: 4px;
600
- -webkit-border-radius: 4px;
601
- border-radius: 4px;
602
-
603
- -webkit-box-sizing: border-box;
604
- -moz-box-sizing: border-box;
605
- box-sizing: border-box;
606
- }
607
- #sb_instagram #sbi_load .sbi_load_btn {
608
- position: relative;
609
- }
610
- /* Follow button */
611
- #sb_instagram .sbi_follow_btn{
612
- display: -moz-inline-stack;
613
- display: inline-block;
614
- vertical-align: top;
615
- zoom: 1;
616
- *display: inline;
617
- text-align: center;
618
- }
619
- #sb_instagram .sbi_follow_btn.sbi_top{
620
- display: block;
621
- margin-bottom: 5px;
622
- }
623
- #sb_instagram .sbi_follow_btn a{
624
- background: #408bd1;
625
- color: #fff;
626
- }
627
- #sb_instagram .sbi_follow_btn a,
628
- #sb_instagram .sbi_follow_btn a,
629
- #sb_instagram #sbi_load .sbi_load_btn{
630
- transition: all 0.1s ease-in;
631
- }
632
- /* Hover state for default colors */
633
- #sb_instagram #sbi_load .sbi_load_btn:hover{
634
- outline: none;
635
- box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
636
- }
637
- #sb_instagram .sbi_follow_btn a:hover,
638
- #sb_instagram .sbi_follow_btn a:focus{
639
- outline: none;
640
- box-shadow: inset 0 0 10px 20px #359dff;
641
- }
642
- /* If a custom color is applied then just use opacity for the hover effect */
643
- #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
644
- #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
645
- #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
646
- box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
647
- }
648
- /* Active state */
649
- #sb_instagram .sbi_follow_btn a:active,
650
- #sb_instagram #sbi_load .sbi_load_btn:active{
651
- box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
652
- }
653
-
654
- #sb_instagram .sbi_follow_btn .fa,
655
- #sb_instagram .sbi_follow_btn svg{
656
- margin-bottom: -1px;
657
- margin-right: 7px;
658
- font-size: 15px;
659
- }
660
- #sb_instagram .sbi_follow_btn svg{
661
- vertical-align: -.125em;
662
- }
663
- #sb_instagram #sbi_load .sbi_follow_btn{
664
- margin-left: 5px;
665
- }
666
-
667
- /* Error messages */
668
- #sb_instagram .sb_instagram_error{
669
- width: 100%;
670
- text-align: center;
671
- line-height: 1.4;
672
- }
673
-
674
- /* Mod only error msgs */
675
- #sbi_mod_error{
676
- display: none;
677
- border: 1px solid #ddd;
678
- background: #eee;
679
- color: #333;
680
- margin: 10px 0 0;
681
- padding: 10px 15px;
682
- font-size: 13px;
683
- text-align: center;
684
- clear: both;
685
-
686
- -moz-border-radius: 4px;
687
- -webkit-border-radius: 4px;
688
- border-radius: 4px;
689
- }
690
- #sbi_mod_error br {
691
- display: initial !important;
692
- }
693
- #sbi_mod_error p{
694
- padding: 5px 0 !important;
695
- margin: 0 !important;
696
- line-height: 1.3 !important;
697
- }
698
- #sbi_mod_error ol,
699
- #sbi_mod_error ul{
700
- padding: 5px 0 5px 20px !important;
701
- margin: 0 !important;
702
- }
703
- #sbi_mod_error li{
704
- padding: 1px 0 !important;
705
- margin: 0 !important;
706
- }
707
- #sbi_mod_error span{
708
- font-size: 12px;
709
- }
710
-
711
- /* Medium */
712
- #sb_instagram.sbi_medium .sbi_playbtn,
713
- #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
714
- margin-top: -12px;
715
- margin-left: -9px;
716
- font-size: 23px;
717
- }
718
- #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
719
- right: 8px;
720
- top: 8px;
721
- font-size: 18px;
722
- }
723
- /* Small */
724
- #sb_instagram.sbi_small .sbi_playbtn,
725
- #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
726
- margin-top: -9px;
727
- margin-left: -7px;
728
- font-size: 18px;
729
- }
730
- #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
731
- right: 5px;
732
- top: 5px;
733
- font-size: 12px;
734
- }
735
-
736
- /* Media queries */
737
- @media all and (max-width: 640px){
738
- /* Make 3-6 cols into 2 col */
739
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
740
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
741
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
742
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
743
- width: 50%;
744
- }
745
- /* Make 7-10 cols into 4 col */
746
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
747
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
748
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
749
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
750
- width: 25%;
751
- }
752
- /* On mobile make the min-width 100% */
753
- #sb_instagram.sbi_width_resp{
754
- width: 100% !important;
755
- }
756
- }
757
- @media all and (max-width: 480px){
758
- /* Make all cols into 1 col */
759
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
760
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
761
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
762
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
763
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
764
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
765
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
766
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
767
- width: 100%;
768
- }
769
- }
770
-
771
- /* NO JS */
772
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
773
- box-sizing: border-box;
774
- position: relative;
775
- overflow: hidden;
776
- }
777
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
778
- content: "";
779
- display: block;
780
- padding-top: 100%;
781
- z-index: -300;
782
- }
783
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
784
- position: absolute;
785
- top: 0;
786
- left: 0;
787
- bottom: 0;
788
- right: 0;
789
- }
790
- #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
791
- opacity: 1;
792
- max-height: 640px;
793
- }
794
- #sb_instagram.sbi_no_js .sbi_photo img,
795
- #sb_instagram.sbi_no_js .sbi_load_btn{
796
- display: none;
797
- }
798
- #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
799
- padding-bottom: 0 !important;
800
- }
801
- #sb_instagram #sbi_mod_error .sb_frontend_btn {
802
- display: inline-block;
803
- padding: 6px 10px;
804
- background: #ddd;
805
- background: rgba(0,0,0,.1);
806
- text-decoration: none;
807
- border-radius: 5px;
808
- margin-top: 10px;
809
- color: #444
810
- }
811
-
812
- #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
813
- background: #ccc;
814
- background: rgba(0,0,0,.15)
815
- }
816
-
817
- #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
818
- margin-right: 2px
819
  }
1
+ /**************/
2
+ /*** LAYOUT ***/
3
+ /**************/
4
+
5
+ /* Feed container */
6
+ #sb_instagram {
7
+ width: 100%;
8
+ margin: 0 auto;
9
+ padding: 0;
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+ }
14
+ #sb_instagram:after{
15
+ content: "";
16
+ display: table;
17
+ clear: both;
18
+ }
19
+
20
+ /*********************/
21
+ /*** STYLE OPTIONS ***/
22
+ /*********************/
23
+ #sb_instagram.sbi_fixed_height{
24
+ overflow: hidden;
25
+ overflow-y: auto;
26
+ -webkit-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
+ box-sizing: border-box;
29
+ }
30
+ #sb_instagram #sbi_images{
31
+ width: 100%;
32
+ float: left;
33
+ line-height: 0;
34
+
35
+ -webkit-box-sizing: border-box;
36
+ -moz-box-sizing: border-box;
37
+ box-sizing: border-box;
38
+ }
39
+ /* Remove header shadow/border */
40
+ #sb_instagram .sbi_header_link {
41
+ -webkit-box-shadow: none;
42
+ box-shadow: none;
43
+ }
44
+ #sb_instagram .sbi_header_link:hover {
45
+ border: none;
46
+ }
47
+
48
+ /* Items */
49
+ #sb_instagram #sbi_images .sbi_item{
50
+ display: -moz-inline-stack;
51
+ display: inline-block;
52
+ float: left;
53
+ vertical-align: top;
54
+ zoom: 1;
55
+ *display: inline;
56
+
57
+ padding: inherit !important;
58
+ margin: 0 !important;
59
+ text-decoration: none;
60
+ opacity: 1;
61
+ overflow: hidden;
62
+
63
+ -webkit-box-sizing: border-box;
64
+ -moz-box-sizing: border-box;
65
+ box-sizing: border-box;
66
+
67
+ -webkit-transition: all 0.5s ease;
68
+ -moz-transition: all 0.5s ease;
69
+ -o-transition: all 0.5s ease;
70
+ -ms-transition: all 0.5s ease;
71
+ transition: all 0.5s ease;
72
+ }
73
+ /* Transition items in */
74
+ #sb_instagram #sbi_images .sbi_item.sbi_transition{
75
+ opacity: 0;
76
+ }
77
+
78
+ /* Cols */
79
+ #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
80
+ #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
81
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
82
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
83
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
84
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
85
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
86
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
87
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
88
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
89
+
90
+ /* Disable mobile layout */
91
+ #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
92
+ #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
93
+ #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
94
+ #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
95
+ #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
96
+ #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
97
+ #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
98
+ #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
99
+ #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
100
+ #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
101
+
102
+ /* Photos */
103
+ #sb_instagram .sbi_photo_wrap{
104
+ position: relative;
105
+ }
106
+ #sb_instagram .sbi_photo{
107
+ display: block;
108
+ text-decoration: none;
109
+ }
110
+ #sb_instagram .sbi_photo img{
111
+ width: 100%;
112
+ height: auto;
113
+ }
114
+ #sb_instagram .sbi_no_js img{
115
+ display: none;
116
+ }
117
+ #sb_instagram a,
118
+ #sb_instagram a:hover,
119
+ #sb_instagram a:focus,
120
+ #sb_instagram a:active{
121
+ outline: none;
122
+ }
123
+ #sb_instagram img{
124
+ display: block;
125
+ padding: 0 !important;
126
+ margin: 0 !important;
127
+ max-width: 100% !important;
128
+ opacity: 1 !important;
129
+ }
130
+ #sb_instagram .sbi_link{
131
+ display: none;
132
+ position: absolute;
133
+ bottom: 0;
134
+ right: 0;
135
+
136
+ width: 100%;
137
+ padding: 10px 0;
138
+ background: rgba(0,0,0,0.5);
139
+ text-align: center;
140
+ color: #fff;
141
+ font-size: 12px;
142
+ line-height: 1.1;
143
+ }
144
+ #sb_instagram .sbi_link a{
145
+ padding: 0 6px;
146
+ text-decoration: none;
147
+ color: #fff;
148
+ font-size: 12px;
149
+ line-height: 1.1;
150
+
151
+ display: -moz-inline-stack;
152
+ display: inline-block;
153
+ vertical-align: top;
154
+ zoom: 1;
155
+ *display: inline;
156
+ }
157
+ #sb_instagram .sbi_link .sbi_lightbox_link{
158
+ padding-bottom: 5px;
159
+ }
160
+ #sb_instagram .sbi_link a:hover,
161
+ #sb_instagram .sbi_link a:focus{
162
+ text-decoration: underline;
163
+ }
164
+ #sb_instagram .sbi_photo_wrap:hover .sbi_link,
165
+ #sb_instagram .sbi_photo_wrap:focus .sbi_link{
166
+ display: block;
167
+ }
168
+
169
+ /* Videos */
170
+ #sb_instagram svg:not(:root).svg-inline--fa {
171
+ height: 1em;
172
+ display: inline-block;
173
+ }
174
+
175
+ #sb_instagram .sbi_type_video .sbi_playbtn,
176
+ #sb_instagram .sbi_type_carousel .sbi_playbtn,
177
+ .sbi_type_carousel .fa-clone,
178
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
179
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
180
+ display: block !important;
181
+ position: absolute;
182
+ z-index: 1;
183
+
184
+ color: #fff;
185
+ color: rgba(255,255,255,0.9);
186
+ font-style: normal !important;
187
+ text-shadow: 0 0 8px rgba(0,0,0,0.8);
188
+ }
189
+ #sb_instagram .sbi_type_video .sbi_playbtn,
190
+ #sb_instagram .sbi_type_carousel .sbi_playbtn {
191
+ z-index: 2;
192
+ top: 50%;
193
+ left: 50%;
194
+ margin-top: -24px;
195
+ margin-left: -19px;
196
+ padding: 0;
197
+ font-size: 48px;
198
+ }
199
+ #sb_instagram .sbi_type_carousel .fa-clone{
200
+ right: 12px;
201
+ top: 12px;
202
+ font-size: 24px;
203
+ text-shadow: 0 0 8px rgba(0,0,0,0.3);
204
+ }
205
+ .sbi_type_carousel svg.fa-clone,
206
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
207
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
208
+ -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
209
+ filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
210
+ }
211
+
212
+ /* Loader */
213
+ #sb_instagram .sbi_loader{
214
+ width: 20px;
215
+ height: 20px;
216
+
217
+ position: relative;
218
+ top: 50%;
219
+ left: 50%;
220
+ margin: -10px 0 0 -10px;
221
+ background-color: #000;
222
+ background-color: rgba(0,0,0,0.5);
223
+
224
+ border-radius: 100%;
225
+ -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
226
+ animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
227
+ }
228
+ #sb_instagram br {
229
+ display: none;
230
+ }
231
+ #sbi_load p {
232
+ display: inline;
233
+ padding: 0;
234
+ margin: 0;
235
+ }
236
+ /* Loader in button */
237
+ #sb_instagram #sbi_load .sbi_loader{
238
+ position: absolute;
239
+ margin-top: -11px;
240
+ background-color: #fff;
241
+ opacity: 1;
242
+ }
243
+ @-webkit-keyframes sbi-sk-scaleout {
244
+ 0% { -webkit-transform: scale(0) }
245
+ 100% {
246
+ -webkit-transform: scale(1.0);
247
+ opacity: 0;
248
+ }
249
+ }
250
+ @keyframes sbi-sk-scaleout {
251
+ 0% {
252
+ -webkit-transform: scale(0);
253
+ -ms-transform: scale(0);
254
+ transform: scale(0);
255
+ } 100% {
256
+ -webkit-transform: scale(1.0);
257
+ -ms-transform: scale(1.0);
258
+ transform: scale(1.0);
259
+ opacity: 0;
260
+ }
261
+ }
262
+
263
+ #sb_instagram .fa-spin,
264
+ #sbi_lightbox .fa-spin{
265
+ -webkit-animation: fa-spin 2s infinite linear;
266
+ animation: fa-spin 2s infinite linear
267
+ }
268
+
269
+ #sb_instagram .fa-pulse,
270
+ #sbi_lightbox .fa-pulse{
271
+ -webkit-animation: fa-spin 1s infinite steps(8);
272
+ animation: fa-spin 1s infinite steps(8)
273
+ }
274
+
275
+ @-webkit-keyframes fa-spin {
276
+ 0% {
277
+ -webkit-transform: rotate(0deg);
278
+ transform: rotate(0deg)
279
+ }
280
+ 100% {
281
+ -webkit-transform: rotate(359deg);
282
+ transform: rotate(359deg)
283
+ }
284
+ }
285
+
286
+ @keyframes fa-spin {
287
+ 0% {
288
+ -webkit-transform: rotate(0deg);
289
+ transform: rotate(0deg)
290
+ }
291
+ 100% {
292
+ -webkit-transform: rotate(359deg);
293
+ transform: rotate(359deg)
294
+ }
295
+ }
296
+ /* Screen reader */
297
+ .sbi-screenreader{text-indent: -9999px !important;display: block !important;width: 0 !important;height: 0 !important;line-height: 0 !important;text-align: left !important;overflow: hidden !important; }
298
+
299
+ /* HEADER */
300
+ #sb_instagram .sb_instagram_header{
301
+ float: left;
302
+ clear: both;
303
+ margin: 0 0 15px 0;
304
+ padding: 0;
305
+ line-height: 1.2;
306
+ width: 100%;
307
+ }
308
+ #sb_instagram .sb_instagram_header a{
309
+ float: left;
310
+ display: block;
311
+ /*width: 100%;*/
312
+ min-width: 100%\9;
313
+ text-decoration: none;
314
+ transition: color 0.5s ease;
315
+ }
316
+ .sbi_no_avatar .sbi_header_img{
317
+ background: #333;
318
+ color: #fff;
319
+ width: 50px;
320
+ height: 50px;
321
+ position: relative;
322
+ }
323
+ .sbi_no_avatar .sbi_header_hashtag_icon {
324
+ display: block;
325
+ color: #fff;
326
+ opacity: .9;
327
+ -webkit-transition: background .6s linear,color .6s linear;
328
+ -moz-transition: background .6s linear,color .6s linear;
329
+ -ms-transition: background .6s linear,color .6s linear;
330
+ -o-transition: background .6s linear,color .6s linear;
331
+ transition: background .6s linear,color .6s linear
332
+ }
333
+
334
+ .sbi_no_avatar:hover .sbi_header_hashtag_icon {
335
+ display: block;
336
+ opacity: 1;
337
+ -webkit-transition: background .2s linear,color .2s linear;
338
+ -moz-transition: background .2s linear,color .2s linear;
339
+ -ms-transition: background .2s linear,color .2s linear;
340
+ -o-transition: background .2s linear,color .2s linear;
341
+ transition: background .2s linear,color .2s linear
342
+ }
343
+ /** Medium Header */
344
+ /* Only use medium & large headers on devices above 480px */
345
+ @media all and (min-width: 480px){
346
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
347
+ width: 80px;
348
+ height: 80px;
349
+ border-radius: 40px;
350
+ }
351
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
352
+ width: 80px;
353
+ height: 80px;
354
+ border-radius: 40px;
355
+ }
356
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
357
+ font-size: 20px;
358
+ }
359
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
360
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
361
+ font-size: 14px;
362
+ }
363
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,
364
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
365
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
366
+ margin-left: 95px !important;
367
+ line-height: 1.4
368
+ }
369
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{
370
+ margin-right: -85px !important;
371
+ }
372
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
373
+ margin-top: 4px !important;
374
+ }
375
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
376
+ padding-top: 20px !important;
377
+ }
378
+ /** Large Header */
379
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
380
+ width: 120px;
381
+ height: 120px;
382
+ border-radius: 60px;
383
+ }
384
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
385
+ width: 120px;
386
+ height: 120px;
387
+ border-radius: 60px;
388
+ }
389
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
390
+ font-size: 28px;
391
+ }
392
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
393
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
394
+ font-size: 16px;
395
+ }
396
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,
397
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
398
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
399
+ margin-left: 140px !important;
400
+ line-height: 1.5;
401
+ }
402
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{
403
+ margin-right: -120px !important;
404
+ }
405
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
406
+ margin-top: 12px !important;
407
+ }
408
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
409
+ padding-top: 32px !important;
410
+ }
411
+ }
412
+
413
+ /* Header profile pic */
414
+ #sb_instagram .sb_instagram_header .sbi_header_img{
415
+ float: left;
416
+ position: relative;
417
+ width: 50px;
418
+ margin: 0 0 0 -100% !important;
419
+ overflow: hidden;
420
+
421
+ -moz-border-radius: 40px;
422
+ -webkit-border-radius: 40px;
423
+ border-radius: 40px;
424
+ }
425
+ #sb_instagram .sb_instagram_header .sbi_header_img img{
426
+ float: left;
427
+ margin: 0 !important;
428
+ padding: 0 !important;
429
+ border: none !important;
430
+
431
+ -moz-border-radius: 40px;
432
+ -webkit-border-radius: 40px;
433
+ border-radius: 40px;
434
+ }
435
+ /* Profile pic hover */
436
+ /* Profile pic hover */
437
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
438
+ opacity: 0;
439
+ position: absolute;
440
+ width: 100%;
441
+ top: 0;
442
+ bottom: 0;
443
+ left: 0;
444
+ text-align: center;
445
+ color: #fff;
446
+ background: rgba(0,0,0,0.75);
447
+ }
448
+
449
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
450
+ #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
451
+ position: absolute;
452
+ top: 50%;
453
+ left: 50%;
454
+ margin-top: -12px;
455
+ margin-left: -12px;
456
+ width: 24px;
457
+ height: 24px;
458
+ font-size: 24px;
459
+ }
460
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
461
+ .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
462
+ margin-top: -18px;
463
+ margin-left: -18px;
464
+ width: 36px;
465
+ height: 36px;
466
+ font-size: 36px
467
+ }
468
+
469
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
470
+ .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
471
+ margin-top: -24px;
472
+ margin-left: -24px;
473
+ width: 48px;
474
+ height: 48px;
475
+ font-size: 48px
476
+ }
477
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
478
+ overflow: hidden;
479
+ background: url('../img/small-logo.png') no-repeat 0 0;
480
+ }
481
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
482
+ z-index: 2;
483
+ transition: opacity 0.4s ease-in-out;
484
+ }
485
+ #sb_instagram .sb_instagram_header .sbi_fade_in{
486
+ opacity: 1;
487
+ transition: opacity 0.2s ease-in-out;
488
+ }
489
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
490
+ position: absolute;
491
+ width: 100%;
492
+ top: 0;
493
+ bottom: 0;
494
+ left: 0;
495
+ text-align: center;
496
+ color: #fff;
497
+ background: rgba(0,0,0,0.75);
498
+
499
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
500
+ filter: alpha(opacity=0);
501
+ -moz-opacity: 0;
502
+ -khtml-opacity: 0;
503
+ opacity: 0;
504
+ border-radius: 40px;
505
+ transition: opacity 0.2s;
506
+ }
507
+ /* Fade the Instagram icon in when hovering on the header */
508
+ #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
509
+ #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
510
+ opacity: 1;
511
+ }
512
+ /* Header text */
513
+ #sb_instagram .sb_instagram_header .sbi_header_text{
514
+ float: left;
515
+ width: 100%;
516
+ padding-top: 5px;
517
+ }
518
+ #sb_instagram .sb_instagram_header a{
519
+ text-decoration: none;
520
+ }
521
+ #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
522
+ #sb_instagram .sb_instagram_header .sbi_header_text h3{
523
+ float: left;
524
+ clear: both;
525
+ width: auto;
526
+ margin: 0 0 0 60px !important;
527
+ padding: 0 !important;
528
+ }
529
+ #sb_instagram .sb_instagram_header h3{
530
+ font-size: 16px;
531
+ line-height: 1.3;
532
+ }
533
+ #sb_instagram .sb_instagram_header p{
534
+ font-size: 13px;
535
+ line-height: 1.3;
536
+ margin: 0;
537
+ padding: 0;
538
+ }
539
+ #sb_instagram p:empty { display: none; }
540
+ #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
541
+ margin-right: 3px !important;
542
+ }
543
+
544
+ /* No bio */
545
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
546
+ padding-top: 9px !important;
547
+ }
548
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
549
+ clear: both;
550
+ }
551
+
552
+
553
+ /* Buttons */
554
+ #sb_instagram #sbi_load{
555
+ float: left;
556
+ clear: both;
557
+ width: 100%;
558
+ text-align: center;
559
+ }
560
+ #sb_instagram #sbi_load .fa-spinner{
561
+ display: none;
562
+ position: absolute;
563
+ top: 50%;
564
+ left: 50%;
565
+ margin: -8px 0 0 -7px;
566
+ font-size: 15px;
567
+ }
568
+ #sb_instagram #sbi_load{
569
+ opacity: 1;
570
+ transition: all 0.5s ease-in;
571
+ }
572
+ #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
573
+ opacity: 1;
574
+ transition: all 0.1s ease-in;
575
+ }
576
+ #sb_instagram .sbi_hidden{
577
+ opacity: 0 !important;
578
+ }
579
+ #sb_instagram #sbi_load .sbi_load_btn,
580
+ #sb_instagram .sbi_follow_btn a{
581
+ display: -moz-inline-stack;
582
+ display: inline-block;
583
+ vertical-align: top;
584
+ zoom: 1;
585
+ *display: inline;
586
+
587
+ padding: 7px 14px;
588
+ margin: 5px auto 0 auto;
589
+ background: #333;
590
+ color: #eee;
591
+ border: none;
592
+ color: #fff;
593
+ text-decoration: none;
594
+ font-size: 13px;
595
+ line-height: 1.5;
596
+
597
+ -moz-border-radius: 4px;
598
+ -webkit-border-radius: 4px;
599
+ border-radius: 4px;
600
+
601
+ -webkit-box-sizing: border-box;
602
+ -moz-box-sizing: border-box;
603
+ box-sizing: border-box;
604
+ }
605
+ #sb_instagram #sbi_load .sbi_load_btn {
606
+ position: relative;
607
+ }
608
+ /* Follow button */
609
+ #sb_instagram .sbi_follow_btn{
610
+ display: -moz-inline-stack;
611
+ display: inline-block;
612
+ vertical-align: top;
613
+ zoom: 1;
614
+ *display: inline;
615
+ text-align: center;
616
+ }
617
+ #sb_instagram .sbi_follow_btn.sbi_top{
618
+ display: block;
619
+ margin-bottom: 5px;
620
+ }
621
+ #sb_instagram .sbi_follow_btn a{
622
+ background: #408bd1;
623
+ color: #fff;
624
+ }
625
+ #sb_instagram .sbi_follow_btn a,
626
+ #sb_instagram .sbi_follow_btn a,
627
+ #sb_instagram #sbi_load .sbi_load_btn{
628
+ transition: all 0.1s ease-in;
629
+ }
630
+ /* Hover state for default colors */
631
+ #sb_instagram #sbi_load .sbi_load_btn:hover{
632
+ outline: none;
633
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
634
+ }
635
+ #sb_instagram .sbi_follow_btn a:hover,
636
+ #sb_instagram .sbi_follow_btn a:focus{
637
+ outline: none;
638
+ box-shadow: inset 0 0 10px 20px #359dff;
639
+ }
640
+ /* If a custom color is applied then just use opacity for the hover effect */
641
+ #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
642
+ #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
643
+ #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
644
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
645
+ }
646
+ /* Active state */
647
+ #sb_instagram .sbi_follow_btn a:active,
648
+ #sb_instagram #sbi_load .sbi_load_btn:active{
649
+ box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
650
+ }
651
+
652
+ #sb_instagram .sbi_follow_btn .fa,
653
+ #sb_instagram .sbi_follow_btn svg{
654
+ margin-bottom: -1px;
655
+ margin-right: 7px;
656
+ font-size: 15px;
657
+ }
658
+ #sb_instagram .sbi_follow_btn svg{
659
+ vertical-align: -.125em;
660
+ }
661
+ #sb_instagram #sbi_load .sbi_follow_btn{
662
+ margin-left: 5px;
663
+ }
664
+
665
+ /* Error messages */
666
+ #sb_instagram .sb_instagram_error{
667
+ width: 100%;
668
+ text-align: center;
669
+ line-height: 1.4;
670
+ }
671
+
672
+ /* Mod only error msgs */
673
+ #sbi_mod_error{
674
+ display: none;
675
+ border: 1px solid #ddd;
676
+ background: #eee;
677
+ color: #333;
678
+ margin: 10px 0 0;
679
+ padding: 10px 15px;
680
+ font-size: 13px;
681
+ text-align: center;
682
+ clear: both;
683
+
684
+ -moz-border-radius: 4px;
685
+ -webkit-border-radius: 4px;
686
+ border-radius: 4px;
687
+ }
688
+ #sbi_mod_error br {
689
+ display: initial !important;
690
+ }
691
+ #sbi_mod_error p{
692
+ padding: 5px 0 !important;
693
+ margin: 0 !important;
694
+ line-height: 1.3 !important;
695
+ }
696
+ #sbi_mod_error ol,
697
+ #sbi_mod_error ul{
698
+ padding: 5px 0 5px 20px !important;
699
+ margin: 0 !important;
700
+ }
701
+ #sbi_mod_error li{
702
+ padding: 1px 0 !important;
703
+ margin: 0 !important;
704
+ }
705
+ #sbi_mod_error span{
706
+ font-size: 12px;
707
+ }
708
+
709
+ /* Medium */
710
+ #sb_instagram.sbi_medium .sbi_playbtn,
711
+ #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
712
+ margin-top: -12px;
713
+ margin-left: -9px;
714
+ font-size: 23px;
715
+ }
716
+ #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
717
+ right: 8px;
718
+ top: 8px;
719
+ font-size: 18px;
720
+ }
721
+ /* Small */
722
+ #sb_instagram.sbi_small .sbi_playbtn,
723
+ #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
724
+ margin-top: -9px;
725
+ margin-left: -7px;
726
+ font-size: 18px;
727
+ }
728
+ #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
729
+ right: 5px;
730
+ top: 5px;
731
+ font-size: 12px;
732
+ }
733
+
734
+ /* Media queries */
735
+ @media all and (max-width: 640px){
736
+ /* Make 3-6 cols into 2 col */
737
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
738
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
739
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
740
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
741
+ width: 50%;
742
+ }
743
+ /* Make 7-10 cols into 4 col */
744
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
745
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
746
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
747
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
748
+ width: 25%;
749
+ }
750
+ /* On mobile make the min-width 100% */
751
+ #sb_instagram.sbi_width_resp{
752
+ width: 100% !important;
753
+ }
754
+ }
755
+ @media all and (max-width: 480px){
756
+ /* Make all cols into 1 col */
757
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
758
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
759
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
760
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
761
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
762
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
763
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
764
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
765
+ width: 100%;
766
+ }
767
+ }
768
+
769
+ /* NO JS */
770
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
771
+ box-sizing: border-box;
772
+ position: relative;
773
+ overflow: hidden;
774
+ }
775
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
776
+ content: "";
777
+ display: block;
778
+ padding-top: 100%;
779
+ z-index: -300;
780
+ }
781
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
782
+ position: absolute;
783
+ top: 0;
784
+ left: 0;
785
+ bottom: 0;
786
+ right: 0;
787
+ }
788
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
789
+ opacity: 1;
790
+ }
791
+ #sb_instagram.sbi_no_js .sbi_photo img,
792
+ #sb_instagram.sbi_no_js .sbi_load_btn{
793
+ display: none;
794
+ }
795
+ #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
796
+ padding-bottom: 0 !important;
797
+ }
798
+ #sb_instagram #sbi_mod_error .sb_frontend_btn {
799
+ display: inline-block;
800
+ padding: 6px 10px;
801
+ background: #ddd;
802
+ background: rgba(0,0,0,.1);
803
+ text-decoration: none;
804
+ border-radius: 5px;
805
+ margin-top: 10px;
806
+ color: #444
807
+ }
808
+
809
+ #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
810
+ background: #ccc;
811
+ background: rgba(0,0,0,.15)
812
+ }
813
+
814
+ #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
815
+ margin-right: 2px
 
 
 
816
  }
css/sb-instagram-2-2.min.css CHANGED
@@ -1 +1 @@
1
- #sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram .sbi_header_link{-webkit-box-shadow:none;box-shadow:none}#sb_instagram .sbi_header_link:hover{border:none}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em;display:inline-block}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important;text-align:left!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}.sbi_no_avatar .sbi_header_img{background:#333;color:#fff;width:50px;height:50px;position:relative}.sbi_no_avatar .sbi_header_hashtag_icon{display:block;color:#fff;opacity:.9;-webkit-transition:background .6s linear,color .6s linear;-moz-transition:background .6s linear,color .6s linear;-ms-transition:background .6s linear,color .6s linear;-o-transition:background .6s linear,color .6s linear;transition:background .6s linear,color .6s linear}.sbi_no_avatar:hover .sbi_header_hashtag_icon{display:block;opacity:1;-webkit-transition:background .2s linear,color .2s linear;-moz-transition:background .2s linear,color .2s linear;-ms-transition:background .2s linear,color .2s linear;-o-transition:background .2s linear,color .2s linear;transition:background .2s linear,color .2s linear}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo,#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-18px;margin-left:-18px;width:36px;height:36px;font-size:36px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-24px;margin-left:-24px;width:48px;height:48px;font-size:48px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error br{display:initial!important}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}#sb_instagram #sbi_mod_error .sb_frontend_btn{display:inline-block;padding:6px 10px;background:#ddd;background:rgba(0,0,0,.1);text-decoration:none;border-radius:5px;margin-top:10px;color:#444}#sb_instagram #sbi_mod_error .sb_frontend_btn:hover{background:#ccc;background:rgba(0,0,0,.15)}#sb_instagram #sbi_mod_error .sb_frontend_btn .fa{margin-right:2px}
1
+ #sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram .sbi_header_link{-webkit-box-shadow:none;box-shadow:none}#sb_instagram .sbi_header_link:hover{border:none}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em;display:inline-block}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important;text-align:left!important;overflow:hidden!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}.sbi_no_avatar .sbi_header_img{background:#333;color:#fff;width:50px;height:50px;position:relative}.sbi_no_avatar .sbi_header_hashtag_icon{display:block;color:#fff;opacity:.9;-webkit-transition:background .6s linear,color .6s linear;-moz-transition:background .6s linear,color .6s linear;-ms-transition:background .6s linear,color .6s linear;-o-transition:background .6s linear,color .6s linear;transition:background .6s linear,color .6s linear}.sbi_no_avatar:hover .sbi_header_hashtag_icon{display:block;opacity:1;-webkit-transition:background .2s linear,color .2s linear;-moz-transition:background .2s linear,color .2s linear;-ms-transition:background .2s linear,color .2s linear;-o-transition:background .2s linear,color .2s linear;transition:background .2s linear,color .2s linear}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo,#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-18px;margin-left:-18px;width:36px;height:36px;font-size:36px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-24px;margin-left:-24px;width:48px;height:48px;font-size:48px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error br{display:initial!important}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}#sb_instagram #sbi_mod_error .sb_frontend_btn{display:inline-block;padding:6px 10px;background:#ddd;background:rgba(0,0,0,.1);text-decoration:none;border-radius:5px;margin-top:10px;color:#444}#sb_instagram #sbi_mod_error .sb_frontend_btn:hover{background:#ccc;background:rgba(0,0,0,.15)}#sb_instagram #sbi_mod_error .sb_frontend_btn .fa{margin-right:2px}
css/sb-instagram-admin.css CHANGED
@@ -2819,4 +2819,105 @@
2819
  width: 11px;
2820
  position: relative;
2821
  top: 1px;
2822
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2819
  width: 11px;
2820
  position: relative;
2821
  top: 1px;
2822
+ }
2823
+
2824
+ /*
2825
+ Add Source Loading
2826
+ */
2827
+ #sbi_config_info .sbi_config_modal.sbi-popup-inside {
2828
+ width: 880px;
2829
+ max-width: calc(100% - 200px);
2830
+ background: #fff;
2831
+ color: #141B38;
2832
+ position: relative;
2833
+ box-shadow: 0px 26.7377px 77.2886px rgb(0 0 0 / 11%), 0px 14.2952px 41.3222px rgb(0 0 0 / 9%), 0px 8.01379px 23.1649px rgb(0 0 0 / 8%), 0px 4.25607px 12.3027px rgb(0 0 0 / 6%), 0px 1.77104px 5.11942px rgb(0 0 0 / 4%);
2834
+ border-radius: 2px;
2835
+ overflow-y: auto;
2836
+ max-height: 80vh;
2837
+ padding: 0;
2838
+ }
2839
+ #sbi_config_info .sbi_config_modal.sbi-popup-inside{
2840
+ width: 575px;
2841
+ height: 320px;
2842
+ display: flex;
2843
+ justify-content: center;
2844
+ align-items: center;
2845
+ }
2846
+ .sbi-source-redirect-ld{
2847
+ text-align: center;
2848
+ }
2849
+ .sbi-source-redirect-ld div{
2850
+ display: inline-block;
2851
+ width: 32px;
2852
+ height: 32px;
2853
+ border-radius: 50px;
2854
+ margin: 0 10px;
2855
+ position: relative;
2856
+ background-color: #0096CC;
2857
+ color: #0096CC;
2858
+ -webkit-animation: sb-source-redirect 1s infinite linear alternate;
2859
+ animation: sb-source-redirect 1s infinite linear alternate;
2860
+ -webkit-animation-delay: .5s;
2861
+ animation-delay: .5s;
2862
+ }
2863
+
2864
+ .sbi-source-redirect-ld div:before,
2865
+ .sbi-source-redirect-ld div:after{
2866
+ content: '';
2867
+ display: inline-block;
2868
+ position: absolute;
2869
+ top: 0;
2870
+ }
2871
+
2872
+ .sbi-source-redirect-ld div:before{
2873
+ left: -45px;
2874
+ width: 32px;
2875
+ height: 32px;
2876
+ border-radius: 50px;
2877
+ background-color: #0096CC;
2878
+ color: #0096CC;
2879
+ -webkit-animation: sb-source-redirect 1s infinite alternate;
2880
+ animation: sb-source-redirect 1s infinite alternate;
2881
+ -webkit-animation-delay: 0s;
2882
+ animation-delay: 0s;
2883
+ }
2884
+
2885
+ .sbi-source-redirect-ld div:after{
2886
+ left: 45px;
2887
+ width: 32px;
2888
+ height: 32px;
2889
+ border-radius: 50px;
2890
+ background-color: #0096CC;
2891
+ color: #0096CC;
2892
+ -webkit-animation: sb-source-redirect 1s infinite alternate;
2893
+ animation: sb-source-redirect 1s infinite alternate;
2894
+ -webkit-animation-delay: 1s;
2895
+ animation-delay: 1s;
2896
+ }
2897
+
2898
+
2899
+
2900
+ @-webkit-keyframes sb-source-redirect {
2901
+ 0% {background-color: #0096CC;}
2902
+ 50%,100% {background-color: #B5E5FF;}
2903
+ }
2904
+ @keyframes sb-source-redirect {
2905
+ 0% {background-color: #0096CC;}
2906
+ 50%,100% {background-color: #B5E5FF;}
2907
+ }
2908
+
2909
+
2910
+ .sbi-source-redirect-info{
2911
+ text-align: center;
2912
+ margin-top: 50px;
2913
+ }
2914
+
2915
+ .sbi-source-redirect-info strong{
2916
+ font-size: 18px;
2917
+ }
2918
+ .sbi-source-redirect-info p{
2919
+ color: #8C8F9A;
2920
+ padding: 0 24%;
2921
+ font-size: 16px;
2922
+ margin-bottom: 0px;
2923
+ }
css/sb-instagram.css ADDED
@@ -0,0 +1,819 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**************/
2
+ /*** LAYOUT ***/
3
+ /**************/
4
+
5
+ /* Feed container */
6
+ #sb_instagram {
7
+ width: 100%;
8
+ margin: 0 auto;
9
+ padding: 0;
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+ }
14
+ #sb_instagram:after{
15
+ content: "";
16
+ display: table;
17
+ clear: both;
18
+ }
19
+
20
+ /*********************/
21
+ /*** STYLE OPTIONS ***/
22
+ /*********************/
23
+ #sb_instagram.sbi_fixed_height{
24
+ overflow: hidden;
25
+ overflow-y: auto;
26
+ -webkit-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
+ box-sizing: border-box;
29
+ }
30
+ #sb_instagram #sbi_images{
31
+ width: 100%;
32
+ float: left;
33
+ line-height: 0;
34
+
35
+ -webkit-box-sizing: border-box;
36
+ -moz-box-sizing: border-box;
37
+ box-sizing: border-box;
38
+ }
39
+ /* Remove header shadow/border */
40
+ #sb_instagram .sbi_header_link {
41
+ -webkit-box-shadow: none;
42
+ box-shadow: none;
43
+ }
44
+ #sb_instagram .sbi_header_link:hover {
45
+ border: none;
46
+ }
47
+
48
+ /* Items */
49
+ #sb_instagram #sbi_images .sbi_item{
50
+ display: -moz-inline-stack;
51
+ display: inline-block;
52
+ float: left;
53
+ vertical-align: top;
54
+ zoom: 1;
55
+ *display: inline;
56
+
57
+ max-height: 1000px;
58
+ padding: inherit !important;
59
+ margin: 0 !important;
60
+ text-decoration: none;
61
+ opacity: 1;
62
+ overflow: hidden;
63
+
64
+ -webkit-box-sizing: border-box;
65
+ -moz-box-sizing: border-box;
66
+ box-sizing: border-box;
67
+
68
+ -webkit-transition: all 0.5s ease;
69
+ -moz-transition: all 0.5s ease;
70
+ -o-transition: all 0.5s ease;
71
+ -ms-transition: all 0.5s ease;
72
+ transition: all 0.5s ease;
73
+ }
74
+ /* Transition items in */
75
+ #sb_instagram #sbi_images .sbi_item.sbi_transition{
76
+ opacity: 0;
77
+ max-height: 0;
78
+ }
79
+
80
+ /* Cols */
81
+ #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
82
+ #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
83
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
84
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
85
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
86
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
87
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
88
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
89
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
90
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
91
+
92
+ /* Disable mobile layout */
93
+ #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
94
+ #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
95
+ #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
96
+ #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
97
+ #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
98
+ #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
99
+ #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
100
+ #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
101
+ #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
102
+ #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
103
+
104
+ /* Photos */
105
+ #sb_instagram .sbi_photo_wrap{
106
+ position: relative;
107
+ }
108
+ #sb_instagram .sbi_photo{
109
+ display: block;
110
+ text-decoration: none;
111
+ }
112
+ #sb_instagram .sbi_photo img{
113
+ width: 100%;
114
+ height: auto;
115
+ }
116
+ #sb_instagram .sbi_no_js img{
117
+ display: none;
118
+ }
119
+ #sb_instagram a,
120
+ #sb_instagram a:hover,
121
+ #sb_instagram a:focus,
122
+ #sb_instagram a:active{
123
+ outline: none;
124
+ }
125
+ #sb_instagram img{
126
+ display: block;
127
+ padding: 0 !important;
128
+ margin: 0 !important;
129
+ max-width: 100% !important;
130
+ opacity: 1 !important;
131
+ }
132
+ #sb_instagram .sbi_link{
133
+ display: none;
134
+ position: absolute;
135
+ bottom: 0;
136
+ right: 0;
137
+
138
+ width: 100%;
139
+ padding: 10px 0;
140
+ background: rgba(0,0,0,0.5);
141
+ text-align: center;
142
+ color: #fff;
143
+ font-size: 12px;
144
+ line-height: 1.1;
145
+ }
146
+ #sb_instagram .sbi_link a{
147
+ padding: 0 6px;
148
+ text-decoration: none;
149
+ color: #fff;
150
+ font-size: 12px;
151
+ line-height: 1.1;
152
+
153
+ display: -moz-inline-stack;
154
+ display: inline-block;
155
+ vertical-align: top;
156
+ zoom: 1;
157
+ *display: inline;
158
+ }
159
+ #sb_instagram .sbi_link .sbi_lightbox_link{
160
+ padding-bottom: 5px;
161
+ }
162
+ #sb_instagram .sbi_link a:hover,
163
+ #sb_instagram .sbi_link a:focus{
164
+ text-decoration: underline;
165
+ }
166
+ #sb_instagram .sbi_photo_wrap:hover .sbi_link,
167
+ #sb_instagram .sbi_photo_wrap:focus .sbi_link{
168
+ display: block;
169
+ }
170
+
171
+ /* Videos */
172
+ #sb_instagram svg:not(:root).svg-inline--fa {
173
+ height: 1em;
174
+ display: inline-block;
175
+ }
176
+
177
+ #sb_instagram .sbi_type_video .sbi_playbtn,
178
+ #sb_instagram .sbi_type_carousel .sbi_playbtn,
179
+ .sbi_type_carousel .fa-clone,
180
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
181
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
182
+ display: block !important;
183
+ position: absolute;
184
+ z-index: 1;
185
+
186
+ color: #fff;
187
+ color: rgba(255,255,255,0.9);
188
+ font-style: normal !important;
189
+ text-shadow: 0 0 8px rgba(0,0,0,0.8);
190
+ }
191
+ #sb_instagram .sbi_type_video .sbi_playbtn,
192
+ #sb_instagram .sbi_type_carousel .sbi_playbtn {
193
+ z-index: 2;
194
+ top: 50%;
195
+ left: 50%;
196
+ margin-top: -24px;
197
+ margin-left: -19px;
198
+ padding: 0;
199
+ font-size: 48px;
200
+ }
201
+ #sb_instagram .sbi_type_carousel .fa-clone{
202
+ right: 12px;
203
+ top: 12px;
204
+ font-size: 24px;
205
+ text-shadow: 0 0 8px rgba(0,0,0,0.3);
206
+ }
207
+ .sbi_type_carousel svg.fa-clone,
208
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
209
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
210
+ -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
211
+ filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
212
+ }
213
+
214
+ /* Loader */
215
+ #sb_instagram .sbi_loader{
216
+ width: 20px;
217
+ height: 20px;
218
+
219
+ position: relative;
220
+ top: 50%;
221
+ left: 50%;
222
+ margin: -10px 0 0 -10px;
223
+ background-color: #000;
224
+ background-color: rgba(0,0,0,0.5);
225
+
226
+ border-radius: 100%;
227
+ -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
228
+ animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
229
+ }
230
+ #sb_instagram br {
231
+ display: none;
232
+ }
233
+ #sbi_load p {
234
+ display: inline;
235
+ padding: 0;
236
+ margin: 0;
237
+ }
238
+ /* Loader in button */
239
+ #sb_instagram #sbi_load .sbi_loader{
240
+ position: absolute;
241
+ margin-top: -11px;
242
+ background-color: #fff;
243
+ opacity: 1;
244
+ }
245
+ @-webkit-keyframes sbi-sk-scaleout {
246
+ 0% { -webkit-transform: scale(0) }
247
+ 100% {
248
+ -webkit-transform: scale(1.0);
249
+ opacity: 0;
250
+ }
251
+ }
252
+ @keyframes sbi-sk-scaleout {
253
+ 0% {
254
+ -webkit-transform: scale(0);
255
+ -ms-transform: scale(0);
256
+ transform: scale(0);
257
+ } 100% {
258
+ -webkit-transform: scale(1.0);
259
+ -ms-transform: scale(1.0);
260
+ transform: scale(1.0);
261
+ opacity: 0;
262
+ }
263
+ }
264
+
265
+ #sb_instagram .fa-spin,
266
+ #sbi_lightbox .fa-spin{
267
+ -webkit-animation: fa-spin 2s infinite linear;
268
+ animation: fa-spin 2s infinite linear
269
+ }
270
+
271
+ #sb_instagram .fa-pulse,
272
+ #sbi_lightbox .fa-pulse{
273
+ -webkit-animation: fa-spin 1s infinite steps(8);
274
+ animation: fa-spin 1s infinite steps(8)
275
+ }
276
+
277
+ @-webkit-keyframes fa-spin {
278
+ 0% {
279
+ -webkit-transform: rotate(0deg);
280
+ transform: rotate(0deg)
281
+ }
282
+ 100% {
283
+ -webkit-transform: rotate(359deg);
284
+ transform: rotate(359deg)
285
+ }
286
+ }
287
+
288
+ @keyframes fa-spin {
289
+ 0% {
290
+ -webkit-transform: rotate(0deg);
291
+ transform: rotate(0deg)
292
+ }
293
+ 100% {
294
+ -webkit-transform: rotate(359deg);
295
+ transform: rotate(359deg)
296
+ }
297
+ }
298
+ /* Screen reader */
299
+ .sbi-screenreader{text-indent: -9999px !important;display: block !important;width: 0 !important;height: 0 !important;line-height: 0 !important;text-align: left !important; }
300
+
301
+ /* HEADER */
302
+ #sb_instagram .sb_instagram_header{
303
+ float: left;
304
+ clear: both;
305
+ margin: 0 0 15px 0;
306
+ padding: 0;
307
+ line-height: 1.2;
308
+ width: 100%;
309
+ }
310
+ #sb_instagram .sb_instagram_header a{
311
+ float: left;
312
+ display: block;
313
+ /*width: 100%;*/
314
+ min-width: 100%\9;
315
+ text-decoration: none;
316
+ transition: color 0.5s ease;
317
+ }
318
+ .sbi_no_avatar .sbi_header_img{
319
+ background: #333;
320
+ color: #fff;
321
+ width: 50px;
322
+ height: 50px;
323
+ position: relative;
324
+ }
325
+ .sbi_no_avatar .sbi_header_hashtag_icon {
326
+ display: block;
327
+ color: #fff;
328
+ opacity: .9;
329
+ -webkit-transition: background .6s linear,color .6s linear;
330
+ -moz-transition: background .6s linear,color .6s linear;
331
+ -ms-transition: background .6s linear,color .6s linear;
332
+ -o-transition: background .6s linear,color .6s linear;
333
+ transition: background .6s linear,color .6s linear
334
+ }
335
+
336
+ .sbi_no_avatar:hover .sbi_header_hashtag_icon {
337
+ display: block;
338
+ opacity: 1;
339
+ -webkit-transition: background .2s linear,color .2s linear;
340
+ -moz-transition: background .2s linear,color .2s linear;
341
+ -ms-transition: background .2s linear,color .2s linear;
342
+ -o-transition: background .2s linear,color .2s linear;
343
+ transition: background .2s linear,color .2s linear
344
+ }
345
+ /** Medium Header */
346
+ /* Only use medium & large headers on devices above 480px */
347
+ @media all and (min-width: 480px){
348
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
349
+ width: 80px;
350
+ height: 80px;
351
+ border-radius: 40px;
352
+ }
353
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
354
+ width: 80px;
355
+ height: 80px;
356
+ border-radius: 40px;
357
+ }
358
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
359
+ font-size: 20px;
360
+ }
361
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
362
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
363
+ font-size: 14px;
364
+ }
365
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,
366
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
367
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
368
+ margin-left: 95px !important;
369
+ line-height: 1.4
370
+ }
371
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{
372
+ margin-right: -85px !important;
373
+ }
374
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
375
+ margin-top: 4px !important;
376
+ }
377
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
378
+ padding-top: 20px !important;
379
+ }
380
+ /** Large Header */
381
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
382
+ width: 120px;
383
+ height: 120px;
384
+ border-radius: 60px;
385
+ }
386
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
387
+ width: 120px;
388
+ height: 120px;
389
+ border-radius: 60px;
390
+ }
391
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
392
+ font-size: 28px;
393
+ }
394
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
395
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
396
+ font-size: 16px;
397
+ }
398
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,
399
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
400
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
401
+ margin-left: 140px !important;
402
+ line-height: 1.5;
403
+ }
404
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{
405
+ margin-right: -120px !important;
406
+ }
407
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
408
+ margin-top: 12px !important;
409
+ }
410
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
411
+ padding-top: 32px !important;
412
+ }
413
+ }
414
+
415
+ /* Header profile pic */
416
+ #sb_instagram .sb_instagram_header .sbi_header_img{
417
+ float: left;
418
+ position: relative;
419
+ width: 50px;
420
+ margin: 0 0 0 -100% !important;
421
+ overflow: hidden;
422
+
423
+ -moz-border-radius: 40px;
424
+ -webkit-border-radius: 40px;
425
+ border-radius: 40px;
426
+ }
427
+ #sb_instagram .sb_instagram_header .sbi_header_img img{
428
+ float: left;
429
+ margin: 0 !important;
430
+ padding: 0 !important;
431
+ border: none !important;
432
+
433
+ -moz-border-radius: 40px;
434
+ -webkit-border-radius: 40px;
435
+ border-radius: 40px;
436
+ }
437
+ /* Profile pic hover */
438
+ /* Profile pic hover */
439
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
440
+ opacity: 0;
441
+ position: absolute;
442
+ width: 100%;
443
+ top: 0;
444
+ bottom: 0;
445
+ left: 0;
446
+ text-align: center;
447
+ color: #fff;
448
+ background: rgba(0,0,0,0.75);
449
+ }
450
+
451
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
452
+ #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
453
+ position: absolute;
454
+ top: 50%;
455
+ left: 50%;
456
+ margin-top: -12px;
457
+ margin-left: -12px;
458
+ width: 24px;
459
+ height: 24px;
460
+ font-size: 24px;
461
+ }
462
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
463
+ .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
464
+ margin-top: -18px;
465
+ margin-left: -18px;
466
+ width: 36px;
467
+ height: 36px;
468
+ font-size: 36px
469
+ }
470
+
471
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
472
+ .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
473
+ margin-top: -24px;
474
+ margin-left: -24px;
475
+ width: 48px;
476
+ height: 48px;
477
+ font-size: 48px
478
+ }
479
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
480
+ overflow: hidden;
481
+ background: url('../img/small-logo.png') no-repeat 0 0;
482
+ }
483
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
484
+ z-index: 2;
485
+ transition: opacity 0.4s ease-in-out;
486
+ }
487
+ #sb_instagram .sb_instagram_header .sbi_fade_in{
488
+ opacity: 1;
489
+ transition: opacity 0.2s ease-in-out;
490
+ }
491
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
492
+ position: absolute;
493
+ width: 100%;
494
+ top: 0;
495
+ bottom: 0;
496
+ left: 0;
497
+ text-align: center;
498
+ color: #fff;
499
+ background: rgba(0,0,0,0.75);
500
+
501
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
502
+ filter: alpha(opacity=0);
503
+ -moz-opacity: 0;
504
+ -khtml-opacity: 0;
505
+ opacity: 0;
506
+ border-radius: 40px;
507
+ transition: opacity 0.2s;
508
+ }
509
+ /* Fade the Instagram icon in when hovering on the header */
510
+ #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
511
+ #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
512
+ opacity: 1;
513
+ }
514
+ /* Header text */
515
+ #sb_instagram .sb_instagram_header .sbi_header_text{
516
+ float: left;
517
+ width: 100%;
518
+ padding-top: 5px;
519
+ }
520
+ #sb_instagram .sb_instagram_header a{
521
+ text-decoration: none;
522
+ }
523
+ #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
524
+ #sb_instagram .sb_instagram_header .sbi_header_text h3{
525
+ float: left;
526
+ clear: both;
527
+ width: auto;
528
+ margin: 0 0 0 60px !important;
529
+ padding: 0 !important;
530
+ }
531
+ #sb_instagram .sb_instagram_header h3{
532
+ font-size: 16px;
533
+ line-height: 1.3;
534
+ }
535
+ #sb_instagram .sb_instagram_header p{
536
+ font-size: 13px;
537
+ line-height: 1.3;
538
+ margin: 0;
539
+ padding: 0;
540
+ }
541
+ #sb_instagram p:empty { display: none; }
542
+ #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
543
+ margin-right: 3px !important;
544
+ }
545
+
546
+ /* No bio */
547
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
548
+ padding-top: 9px !important;
549
+ }
550
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
551
+ clear: both;
552
+ }
553
+
554
+
555
+ /* Buttons */
556
+ #sb_instagram #sbi_load{
557
+ float: left;
558
+ clear: both;
559
+ width: 100%;
560
+ text-align: center;
561
+ }
562
+ #sb_instagram #sbi_load .fa-spinner{
563
+ display: none;
564
+ position: absolute;
565
+ top: 50%;
566
+ left: 50%;
567
+ margin: -8px 0 0 -7px;
568
+ font-size: 15px;
569
+ }
570
+ #sb_instagram #sbi_load{
571
+ opacity: 1;
572
+ transition: all 0.5s ease-in;
573
+ }
574
+ #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
575
+ opacity: 1;
576
+ transition: all 0.1s ease-in;
577
+ }
578
+ #sb_instagram .sbi_hidden{
579
+ opacity: 0 !important;
580
+ }
581
+ #sb_instagram #sbi_load .sbi_load_btn,
582
+ #sb_instagram .sbi_follow_btn a{
583
+ display: -moz-inline-stack;
584
+ display: inline-block;
585
+ vertical-align: top;
586
+ zoom: 1;
587
+ *display: inline;
588
+
589
+ padding: 7px 14px;
590
+ margin: 5px auto 0 auto;
591
+ background: #333;
592
+ color: #eee;
593
+ border: none;
594
+ color: #fff;
595
+ text-decoration: none;
596
+ font-size: 13px;
597
+ line-height: 1.5;
598
+
599
+ -moz-border-radius: 4px;
600
+ -webkit-border-radius: 4px;
601
+ border-radius: 4px;
602
+
603
+ -webkit-box-sizing: border-box;
604
+ -moz-box-sizing: border-box;
605
+ box-sizing: border-box;
606
+ }
607
+ #sb_instagram #sbi_load .sbi_load_btn {
608
+ position: relative;
609
+ }
610
+ /* Follow button */
611
+ #sb_instagram .sbi_follow_btn{
612
+ display: -moz-inline-stack;
613
+ display: inline-block;
614
+ vertical-align: top;
615
+ zoom: 1;
616
+ *display: inline;
617
+ text-align: center;
618
+ }
619
+ #sb_instagram .sbi_follow_btn.sbi_top{
620
+ display: block;
621
+ margin-bottom: 5px;
622
+ }
623
+ #sb_instagram .sbi_follow_btn a{
624
+ background: #408bd1;
625
+ color: #fff;
626
+ }
627
+ #sb_instagram .sbi_follow_btn a,
628
+ #sb_instagram .sbi_follow_btn a,
629
+ #sb_instagram #sbi_load .sbi_load_btn{
630
+ transition: all 0.1s ease-in;
631
+ }
632
+ /* Hover state for default colors */
633
+ #sb_instagram #sbi_load .sbi_load_btn:hover{
634
+ outline: none;
635
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
636
+ }
637
+ #sb_instagram .sbi_follow_btn a:hover,
638
+ #sb_instagram .sbi_follow_btn a:focus{
639
+ outline: none;
640
+ box-shadow: inset 0 0 10px 20px #359dff;
641
+ }
642
+ /* If a custom color is applied then just use opacity for the hover effect */
643
+ #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
644
+ #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
645
+ #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
646
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
647
+ }
648
+ /* Active state */
649
+ #sb_instagram .sbi_follow_btn a:active,
650
+ #sb_instagram #sbi_load .sbi_load_btn:active{
651
+ box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
652
+ }
653
+
654
+ #sb_instagram .sbi_follow_btn .fa,
655
+ #sb_instagram .sbi_follow_btn svg{
656
+ margin-bottom: -1px;
657
+ margin-right: 7px;
658
+ font-size: 15px;
659
+ }
660
+ #sb_instagram .sbi_follow_btn svg{
661
+ vertical-align: -.125em;
662
+ }
663
+ #sb_instagram #sbi_load .sbi_follow_btn{
664
+ margin-left: 5px;
665
+ }
666
+
667
+ /* Error messages */
668
+ #sb_instagram .sb_instagram_error{
669
+ width: 100%;
670
+ text-align: center;
671
+ line-height: 1.4;
672
+ }
673
+
674
+ /* Mod only error msgs */
675
+ #sbi_mod_error{
676
+ display: none;
677
+ border: 1px solid #ddd;
678
+ background: #eee;
679
+ color: #333;
680
+ margin: 10px 0 0;
681
+ padding: 10px 15px;
682
+ font-size: 13px;
683
+ text-align: center;
684
+ clear: both;
685
+
686
+ -moz-border-radius: 4px;
687
+ -webkit-border-radius: 4px;
688
+ border-radius: 4px;
689
+ }
690
+ #sbi_mod_error br {
691
+ display: initial !important;
692
+ }
693
+ #sbi_mod_error p{
694
+ padding: 5px 0 !important;
695
+ margin: 0 !important;
696
+ line-height: 1.3 !important;
697
+ }
698
+ #sbi_mod_error ol,
699
+ #sbi_mod_error ul{
700
+ padding: 5px 0 5px 20px !important;
701
+ margin: 0 !important;
702
+ }
703
+ #sbi_mod_error li{
704
+ padding: 1px 0 !important;
705
+ margin: 0 !important;
706
+ }
707
+ #sbi_mod_error span{
708
+ font-size: 12px;
709
+ }
710
+
711
+ /* Medium */
712
+ #sb_instagram.sbi_medium .sbi_playbtn,
713
+ #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
714
+ margin-top: -12px;
715
+ margin-left: -9px;
716
+ font-size: 23px;
717
+ }
718
+ #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
719
+ right: 8px;
720
+ top: 8px;
721
+ font-size: 18px;
722
+ }
723
+ /* Small */
724
+ #sb_instagram.sbi_small .sbi_playbtn,
725
+ #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
726
+ margin-top: -9px;
727
+ margin-left: -7px;
728
+ font-size: 18px;
729
+ }
730
+ #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
731
+ right: 5px;
732
+ top: 5px;
733
+ font-size: 12px;
734
+ }
735
+
736
+ /* Media queries */
737
+ @media all and (max-width: 640px){
738
+ /* Make 3-6 cols into 2 col */
739
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
740
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
741
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
742
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
743
+ width: 50%;
744
+ }
745
+ /* Make 7-10 cols into 4 col */
746
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
747
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
748
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
749
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
750
+ width: 25%;
751
+ }
752
+ /* On mobile make the min-width 100% */
753
+ #sb_instagram.sbi_width_resp{
754
+ width: 100% !important;
755
+ }
756
+ }
757
+ @media all and (max-width: 480px){
758
+ /* Make all cols into 1 col */
759
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
760
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
761
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
762
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
763
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
764
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
765
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
766
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
767
+ width: 100%;
768
+ }
769
+ }
770
+
771
+ /* NO JS */
772
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
773
+ box-sizing: border-box;
774
+ position: relative;
775
+ overflow: hidden;
776
+ }
777
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
778
+ content: "";
779
+ display: block;
780
+ padding-top: 100%;
781
+ z-index: -300;
782
+ }
783
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
784
+ position: absolute;
785
+ top: 0;
786
+ left: 0;
787
+ bottom: 0;
788
+ right: 0;
789
+ }
790
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
791
+ opacity: 1;
792
+ max-height: 640px;
793
+ }
794
+ #sb_instagram.sbi_no_js .sbi_photo img,
795
+ #sb_instagram.sbi_no_js .sbi_load_btn{
796
+ display: none;
797
+ }
798
+ #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
799
+ padding-bottom: 0 !important;
800
+ }
801
+ #sb_instagram #sbi_mod_error .sb_frontend_btn {
802
+ display: inline-block;
803
+ padding: 6px 10px;
804
+ background: #ddd;
805
+ background: rgba(0,0,0,.1);
806
+ text-decoration: none;
807
+ border-radius: 5px;
808
+ margin-top: 10px;
809
+ color: #444
810
+ }
811
+
812
+ #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
813
+ background: #ccc;
814
+ background: rgba(0,0,0,.15)
815
+ }
816
+
817
+ #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
818
+ margin-right: 2px
819
+ }
css/sb-instagram.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram .sbi_header_link{-webkit-box-shadow:none;box-shadow:none}#sb_instagram .sbi_header_link:hover{border:none}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em;display:inline-block}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important;text-align:left!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}.sbi_no_avatar .sbi_header_img{background:#333;color:#fff;width:50px;height:50px;position:relative}.sbi_no_avatar .sbi_header_hashtag_icon{display:block;color:#fff;opacity:.9;-webkit-transition:background .6s linear,color .6s linear;-moz-transition:background .6s linear,color .6s linear;-ms-transition:background .6s linear,color .6s linear;-o-transition:background .6s linear,color .6s linear;transition:background .6s linear,color .6s linear}.sbi_no_avatar:hover .sbi_header_hashtag_icon{display:block;opacity:1;-webkit-transition:background .2s linear,color .2s linear;-moz-transition:background .2s linear,color .2s linear;-ms-transition:background .2s linear,color .2s linear;-o-transition:background .2s linear,color .2s linear;transition:background .2s linear,color .2s linear}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo,#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-18px;margin-left:-18px;width:36px;height:36px;font-size:36px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-24px;margin-left:-24px;width:48px;height:48px;font-size:48px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error br{display:initial!important}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}#sb_instagram #sbi_mod_error .sb_frontend_btn{display:inline-block;padding:6px 10px;background:#ddd;background:rgba(0,0,0,.1);text-decoration:none;border-radius:5px;margin-top:10px;color:#444}#sb_instagram #sbi_mod_error .sb_frontend_btn:hover{background:#ccc;background:rgba(0,0,0,.15)}#sb_instagram #sbi_mod_error .sb_frontend_btn .fa{margin-right:2px}
css/sbi-styles.css CHANGED
@@ -1,819 +1,816 @@
1
- /**************/
2
- /*** LAYOUT ***/
3
- /**************/
4
-
5
- /* Feed container */
6
- #sb_instagram {
7
- width: 100%;
8
- margin: 0 auto;
9
- padding: 0;
10
- -webkit-box-sizing: border-box;
11
- -moz-box-sizing: border-box;
12
- box-sizing: border-box;
13
- }
14
- #sb_instagram:after{
15
- content: "";
16
- display: table;
17
- clear: both;
18
- }
19
-
20
- /*********************/
21
- /*** STYLE OPTIONS ***/
22
- /*********************/
23
- #sb_instagram.sbi_fixed_height{
24
- overflow: hidden;
25
- overflow-y: auto;
26
- -webkit-box-sizing: border-box;
27
- -moz-box-sizing: border-box;
28
- box-sizing: border-box;
29
- }
30
- #sb_instagram #sbi_images{
31
- width: 100%;
32
- float: left;
33
- line-height: 0;
34
-
35
- -webkit-box-sizing: border-box;
36
- -moz-box-sizing: border-box;
37
- box-sizing: border-box;
38
- }
39
- /* Remove header shadow/border */
40
- #sb_instagram .sbi_header_link {
41
- -webkit-box-shadow: none;
42
- box-shadow: none;
43
- }
44
- #sb_instagram .sbi_header_link:hover {
45
- border: none;
46
- }
47
-
48
- /* Items */
49
- #sb_instagram #sbi_images .sbi_item{
50
- display: -moz-inline-stack;
51
- display: inline-block;
52
- float: left;
53
- vertical-align: top;
54
- zoom: 1;
55
- *display: inline;
56
-
57
- max-height: 1000px;
58
- padding: inherit !important;
59
- margin: 0 !important;
60
- text-decoration: none;
61
- opacity: 1;
62
- overflow: hidden;
63
-
64
- -webkit-box-sizing: border-box;
65
- -moz-box-sizing: border-box;
66
- box-sizing: border-box;
67
-
68
- -webkit-transition: all 0.5s ease;
69
- -moz-transition: all 0.5s ease;
70
- -o-transition: all 0.5s ease;
71
- -ms-transition: all 0.5s ease;
72
- transition: all 0.5s ease;
73
- }
74
- /* Transition items in */
75
- #sb_instagram #sbi_images .sbi_item.sbi_transition{
76
- opacity: 0;
77
- max-height: 0;
78
- }
79
-
80
- /* Cols */
81
- #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
82
- #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
83
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
84
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
85
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
86
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
87
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
88
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
89
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
90
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
91
-
92
- /* Disable mobile layout */
93
- #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
94
- #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
95
- #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
96
- #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
97
- #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
98
- #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
99
- #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
100
- #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
101
- #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
102
- #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
103
-
104
- /* Photos */
105
- #sb_instagram .sbi_photo_wrap{
106
- position: relative;
107
- }
108
- #sb_instagram .sbi_photo{
109
- display: block;
110
- text-decoration: none;
111
- }
112
- #sb_instagram .sbi_photo img{
113
- width: 100%;
114
- height: auto;
115
- }
116
- #sb_instagram .sbi_no_js img{
117
- display: none;
118
- }
119
- #sb_instagram a,
120
- #sb_instagram a:hover,
121
- #sb_instagram a:focus,
122
- #sb_instagram a:active{
123
- outline: none;
124
- }
125
- #sb_instagram img{
126
- display: block;
127
- padding: 0 !important;
128
- margin: 0 !important;
129
- max-width: 100% !important;
130
- opacity: 1 !important;
131
- }
132
- #sb_instagram .sbi_link{
133
- display: none;
134
- position: absolute;
135
- bottom: 0;
136
- right: 0;
137
-
138
- width: 100%;
139
- padding: 10px 0;
140
- background: rgba(0,0,0,0.5);
141
- text-align: center;
142
- color: #fff;
143
- font-size: 12px;
144
- line-height: 1.1;
145
- }
146
- #sb_instagram .sbi_link a{
147
- padding: 0 6px;
148
- text-decoration: none;
149
- color: #fff;
150
- font-size: 12px;
151
- line-height: 1.1;
152
-
153
- display: -moz-inline-stack;
154
- display: inline-block;
155
- vertical-align: top;
156
- zoom: 1;
157
- *display: inline;
158
- }
159
- #sb_instagram .sbi_link .sbi_lightbox_link{
160
- padding-bottom: 5px;
161
- }
162
- #sb_instagram .sbi_link a:hover,
163
- #sb_instagram .sbi_link a:focus{
164
- text-decoration: underline;
165
- }
166
- #sb_instagram .sbi_photo_wrap:hover .sbi_link,
167
- #sb_instagram .sbi_photo_wrap:focus .sbi_link{
168
- display: block;
169
- }
170
-
171
- /* Videos */
172
- #sb_instagram svg:not(:root).svg-inline--fa {
173
- height: 1em;
174
- display: inline-block;
175
- }
176
-
177
- #sb_instagram .sbi_type_video .sbi_playbtn,
178
- #sb_instagram .sbi_type_carousel .sbi_playbtn,
179
- .sbi_type_carousel .fa-clone,
180
- #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
181
- #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
182
- display: block !important;
183
- position: absolute;
184
- z-index: 1;
185
-
186
- color: #fff;
187
- color: rgba(255,255,255,0.9);
188
- font-style: normal !important;
189
- text-shadow: 0 0 8px rgba(0,0,0,0.8);
190
- }
191
- #sb_instagram .sbi_type_video .sbi_playbtn,
192
- #sb_instagram .sbi_type_carousel .sbi_playbtn {
193
- z-index: 2;
194
- top: 50%;
195
- left: 50%;
196
- margin-top: -24px;
197
- margin-left: -19px;
198
- padding: 0;
199
- font-size: 48px;
200
- }
201
- #sb_instagram .sbi_type_carousel .fa-clone{
202
- right: 12px;
203
- top: 12px;
204
- font-size: 24px;
205
- text-shadow: 0 0 8px rgba(0,0,0,0.3);
206
- }
207
- .sbi_type_carousel svg.fa-clone,
208
- #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
209
- #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
210
- -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
211
- filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
212
- }
213
-
214
- /* Loader */
215
- #sb_instagram .sbi_loader{
216
- width: 20px;
217
- height: 20px;
218
-
219
- position: relative;
220
- top: 50%;
221
- left: 50%;
222
- margin: -10px 0 0 -10px;
223
- background-color: #000;
224
- background-color: rgba(0,0,0,0.5);
225
-
226
- border-radius: 100%;
227
- -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
228
- animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
229
- }
230
- #sb_instagram br {
231
- display: none;
232
- }
233
- #sbi_load p {
234
- display: inline;
235
- padding: 0;
236
- margin: 0;
237
- }
238
- /* Loader in button */
239
- #sb_instagram #sbi_load .sbi_loader{
240
- position: absolute;
241
- margin-top: -11px;
242
- background-color: #fff;
243
- opacity: 1;
244
- }
245
- @-webkit-keyframes sbi-sk-scaleout {
246
- 0% { -webkit-transform: scale(0) }
247
- 100% {
248
- -webkit-transform: scale(1.0);
249
- opacity: 0;
250
- }
251
- }
252
- @keyframes sbi-sk-scaleout {
253
- 0% {
254
- -webkit-transform: scale(0);
255
- -ms-transform: scale(0);
256
- transform: scale(0);
257
- } 100% {
258
- -webkit-transform: scale(1.0);
259
- -ms-transform: scale(1.0);
260
- transform: scale(1.0);
261
- opacity: 0;
262
- }
263
- }
264
-
265
- #sb_instagram .fa-spin,
266
- #sbi_lightbox .fa-spin{
267
- -webkit-animation: fa-spin 2s infinite linear;
268
- animation: fa-spin 2s infinite linear
269
- }
270
-
271
- #sb_instagram .fa-pulse,
272
- #sbi_lightbox .fa-pulse{
273
- -webkit-animation: fa-spin 1s infinite steps(8);
274
- animation: fa-spin 1s infinite steps(8)
275
- }
276
-
277
- @-webkit-keyframes fa-spin {
278
- 0% {
279
- -webkit-transform: rotate(0deg);
280
- transform: rotate(0deg)
281
- }
282
- 100% {
283
- -webkit-transform: rotate(359deg);
284
- transform: rotate(359deg)
285
- }
286
- }
287
-
288
- @keyframes fa-spin {
289
- 0% {
290
- -webkit-transform: rotate(0deg);
291
- transform: rotate(0deg)
292
- }
293
- 100% {
294
- -webkit-transform: rotate(359deg);
295
- transform: rotate(359deg)
296
- }
297
- }
298
- /* Screen reader */
299
- .sbi-screenreader{text-indent: -9999px !important;display: block !important;width: 0 !important;height: 0 !important;line-height: 0 !important;text-align: left !important; }
300
-
301
- /* HEADER */
302
- #sb_instagram .sb_instagram_header{
303
- float: left;
304
- clear: both;
305
- margin: 0 0 15px 0;
306
- padding: 0;
307
- line-height: 1.2;
308
- width: 100%;
309
- }
310
- #sb_instagram .sb_instagram_header a{
311
- float: left;
312
- display: block;
313
- /*width: 100%;*/
314
- min-width: 100%\9;
315
- text-decoration: none;
316
- transition: color 0.5s ease;
317
- }
318
- .sbi_no_avatar .sbi_header_img{
319
- background: #333;
320
- color: #fff;
321
- width: 50px;
322
- height: 50px;
323
- position: relative;
324
- }
325
- .sbi_no_avatar .sbi_header_hashtag_icon {
326
- display: block;
327
- color: #fff;
328
- opacity: .9;
329
- -webkit-transition: background .6s linear,color .6s linear;
330
- -moz-transition: background .6s linear,color .6s linear;
331
- -ms-transition: background .6s linear,color .6s linear;
332
- -o-transition: background .6s linear,color .6s linear;
333
- transition: background .6s linear,color .6s linear
334
- }
335
-
336
- .sbi_no_avatar:hover .sbi_header_hashtag_icon {
337
- display: block;
338
- opacity: 1;
339
- -webkit-transition: background .2s linear,color .2s linear;
340
- -moz-transition: background .2s linear,color .2s linear;
341
- -ms-transition: background .2s linear,color .2s linear;
342
- -o-transition: background .2s linear,color .2s linear;
343
- transition: background .2s linear,color .2s linear
344
- }
345
- /** Medium Header */
346
- /* Only use medium & large headers on devices above 480px */
347
- @media all and (min-width: 480px){
348
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
349
- width: 80px;
350
- height: 80px;
351
- border-radius: 40px;
352
- }
353
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
354
- width: 80px;
355
- height: 80px;
356
- border-radius: 40px;
357
- }
358
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
359
- font-size: 20px;
360
- }
361
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
362
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
363
- font-size: 14px;
364
- }
365
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,
366
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
367
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
368
- margin-left: 95px !important;
369
- line-height: 1.4
370
- }
371
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{
372
- margin-right: -85px !important;
373
- }
374
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
375
- margin-top: 4px !important;
376
- }
377
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
378
- padding-top: 20px !important;
379
- }
380
- /** Large Header */
381
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
382
- width: 120px;
383
- height: 120px;
384
- border-radius: 60px;
385
- }
386
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
387
- width: 120px;
388
- height: 120px;
389
- border-radius: 60px;
390
- }
391
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
392
- font-size: 28px;
393
- }
394
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
395
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
396
- font-size: 16px;
397
- }
398
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,
399
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
400
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
401
- margin-left: 140px !important;
402
- line-height: 1.5;
403
- }
404
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{
405
- margin-right: -120px !important;
406
- }
407
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
408
- margin-top: 12px !important;
409
- }
410
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
411
- padding-top: 32px !important;
412
- }
413
- }
414
-
415
- /* Header profile pic */
416
- #sb_instagram .sb_instagram_header .sbi_header_img{
417
- float: left;
418
- position: relative;
419
- width: 50px;
420
- margin: 0 0 0 -100% !important;
421
- overflow: hidden;
422
-
423
- -moz-border-radius: 40px;
424
- -webkit-border-radius: 40px;
425
- border-radius: 40px;
426
- }
427
- #sb_instagram .sb_instagram_header .sbi_header_img img{
428
- float: left;
429
- margin: 0 !important;
430
- padding: 0 !important;
431
- border: none !important;
432
-
433
- -moz-border-radius: 40px;
434
- -webkit-border-radius: 40px;
435
- border-radius: 40px;
436
- }
437
- /* Profile pic hover */
438
- /* Profile pic hover */
439
- #sb_instagram .sb_instagram_header .sbi_header_img_hover{
440
- opacity: 0;
441
- position: absolute;
442
- width: 100%;
443
- top: 0;
444
- bottom: 0;
445
- left: 0;
446
- text-align: center;
447
- color: #fff;
448
- background: rgba(0,0,0,0.75);
449
- }
450
-
451
- #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
452
- #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
453
- position: absolute;
454
- top: 50%;
455
- left: 50%;
456
- margin-top: -12px;
457
- margin-left: -12px;
458
- width: 24px;
459
- height: 24px;
460
- font-size: 24px;
461
- }
462
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
463
- .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
464
- margin-top: -18px;
465
- margin-left: -18px;
466
- width: 36px;
467
- height: 36px;
468
- font-size: 36px
469
- }
470
-
471
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
472
- .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
473
- margin-top: -24px;
474
- margin-left: -24px;
475
- width: 48px;
476
- height: 48px;
477
- font-size: 48px
478
- }
479
- #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
480
- overflow: hidden;
481
- background: url('../img/small-logo.png') no-repeat 0 0;
482
- }
483
- #sb_instagram .sb_instagram_header .sbi_header_img_hover{
484
- z-index: 2;
485
- transition: opacity 0.4s ease-in-out;
486
- }
487
- #sb_instagram .sb_instagram_header .sbi_fade_in{
488
- opacity: 1;
489
- transition: opacity 0.2s ease-in-out;
490
- }
491
- #sb_instagram .sb_instagram_header .sbi_header_img_hover{
492
- position: absolute;
493
- width: 100%;
494
- top: 0;
495
- bottom: 0;
496
- left: 0;
497
- text-align: center;
498
- color: #fff;
499
- background: rgba(0,0,0,0.75);
500
-
501
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
502
- filter: alpha(opacity=0);
503
- -moz-opacity: 0;
504
- -khtml-opacity: 0;
505
- opacity: 0;
506
- border-radius: 40px;
507
- transition: opacity 0.2s;
508
- }
509
- /* Fade the Instagram icon in when hovering on the header */
510
- #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
511
- #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
512
- opacity: 1;
513
- }
514
- /* Header text */
515
- #sb_instagram .sb_instagram_header .sbi_header_text{
516
- float: left;
517
- width: 100%;
518
- padding-top: 5px;
519
- }
520
- #sb_instagram .sb_instagram_header a{
521
- text-decoration: none;
522
- }
523
- #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
524
- #sb_instagram .sb_instagram_header .sbi_header_text h3{
525
- float: left;
526
- clear: both;
527
- width: auto;
528
- margin: 0 0 0 60px !important;
529
- padding: 0 !important;
530
- }
531
- #sb_instagram .sb_instagram_header h3{
532
- font-size: 16px;
533
- line-height: 1.3;
534
- }
535
- #sb_instagram .sb_instagram_header p{
536
- font-size: 13px;
537
- line-height: 1.3;
538
- margin: 0;
539
- padding: 0;
540
- }
541
- #sb_instagram p:empty { display: none; }
542
- #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
543
- margin-right: 3px !important;
544
- }
545
-
546
- /* No bio */
547
- #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
548
- padding-top: 9px !important;
549
- }
550
- #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
551
- clear: both;
552
- }
553
-
554
-
555
- /* Buttons */
556
- #sb_instagram #sbi_load{
557
- float: left;
558
- clear: both;
559
- width: 100%;
560
- text-align: center;
561
- }
562
- #sb_instagram #sbi_load .fa-spinner{
563
- display: none;
564
- position: absolute;
565
- top: 50%;
566
- left: 50%;
567
- margin: -8px 0 0 -7px;
568
- font-size: 15px;
569
- }
570
- #sb_instagram #sbi_load{
571
- opacity: 1;
572
- transition: all 0.5s ease-in;
573
- }
574
- #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
575
- opacity: 1;
576
- transition: all 0.1s ease-in;
577
- }
578
- #sb_instagram .sbi_hidden{
579
- opacity: 0 !important;
580
- }
581
- #sb_instagram #sbi_load .sbi_load_btn,
582
- #sb_instagram .sbi_follow_btn a{
583
- display: -moz-inline-stack;
584
- display: inline-block;
585
- vertical-align: top;
586
- zoom: 1;
587
- *display: inline;
588
-
589
- padding: 7px 14px;
590
- margin: 5px auto 0 auto;
591
- background: #333;
592
- color: #eee;
593
- border: none;
594
- color: #fff;
595
- text-decoration: none;
596
- font-size: 13px;
597
- line-height: 1.5;
598
-
599
- -moz-border-radius: 4px;
600
- -webkit-border-radius: 4px;
601
- border-radius: 4px;
602
-
603
- -webkit-box-sizing: border-box;
604
- -moz-box-sizing: border-box;
605
- box-sizing: border-box;
606
- }
607
- #sb_instagram #sbi_load .sbi_load_btn {
608
- position: relative;
609
- }
610
- /* Follow button */
611
- #sb_instagram .sbi_follow_btn{
612
- display: -moz-inline-stack;
613
- display: inline-block;
614
- vertical-align: top;
615
- zoom: 1;
616
- *display: inline;
617
- text-align: center;
618
- }
619
- #sb_instagram .sbi_follow_btn.sbi_top{
620
- display: block;
621
- margin-bottom: 5px;
622
- }
623
- #sb_instagram .sbi_follow_btn a{
624
- background: #408bd1;
625
- color: #fff;
626
- }
627
- #sb_instagram .sbi_follow_btn a,
628
- #sb_instagram .sbi_follow_btn a,
629
- #sb_instagram #sbi_load .sbi_load_btn{
630
- transition: all 0.1s ease-in;
631
- }
632
- /* Hover state for default colors */
633
- #sb_instagram #sbi_load .sbi_load_btn:hover{
634
- outline: none;
635
- box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
636
- }
637
- #sb_instagram .sbi_follow_btn a:hover,
638
- #sb_instagram .sbi_follow_btn a:focus{
639
- outline: none;
640
- box-shadow: inset 0 0 10px 20px #359dff;
641
- }
642
- /* If a custom color is applied then just use opacity for the hover effect */
643
- #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
644
- #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
645
- #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
646
- box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
647
- }
648
- /* Active state */
649
- #sb_instagram .sbi_follow_btn a:active,
650
- #sb_instagram #sbi_load .sbi_load_btn:active{
651
- box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
652
- }
653
-
654
- #sb_instagram .sbi_follow_btn .fa,
655
- #sb_instagram .sbi_follow_btn svg{
656
- margin-bottom: -1px;
657
- margin-right: 7px;
658
- font-size: 15px;
659
- }
660
- #sb_instagram .sbi_follow_btn svg{
661
- vertical-align: -.125em;
662
- }
663
- #sb_instagram #sbi_load .sbi_follow_btn{
664
- margin-left: 5px;
665
- }
666
-
667
- /* Error messages */
668
- #sb_instagram .sb_instagram_error{
669
- width: 100%;
670
- text-align: center;
671
- line-height: 1.4;
672
- }
673
-
674
- /* Mod only error msgs */
675
- #sbi_mod_error{
676
- display: none;
677
- border: 1px solid #ddd;
678
- background: #eee;
679
- color: #333;
680
- margin: 10px 0 0;
681
- padding: 10px 15px;
682
- font-size: 13px;
683
- text-align: center;
684
- clear: both;
685
-
686
- -moz-border-radius: 4px;
687
- -webkit-border-radius: 4px;
688
- border-radius: 4px;
689
- }
690
- #sbi_mod_error br {
691
- display: initial !important;
692
- }
693
- #sbi_mod_error p{
694
- padding: 5px 0 !important;
695
- margin: 0 !important;
696
- line-height: 1.3 !important;
697
- }
698
- #sbi_mod_error ol,
699
- #sbi_mod_error ul{
700
- padding: 5px 0 5px 20px !important;
701
- margin: 0 !important;
702
- }
703
- #sbi_mod_error li{
704
- padding: 1px 0 !important;
705
- margin: 0 !important;
706
- }
707
- #sbi_mod_error span{
708
- font-size: 12px;
709
- }
710
-
711
- /* Medium */
712
- #sb_instagram.sbi_medium .sbi_playbtn,
713
- #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
714
- margin-top: -12px;
715
- margin-left: -9px;
716
- font-size: 23px;
717
- }
718
- #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
719
- right: 8px;
720
- top: 8px;
721
- font-size: 18px;
722
- }
723
- /* Small */
724
- #sb_instagram.sbi_small .sbi_playbtn,
725
- #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
726
- margin-top: -9px;
727
- margin-left: -7px;
728
- font-size: 18px;
729
- }
730
- #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
731
- right: 5px;
732
- top: 5px;
733
- font-size: 12px;
734
- }
735
-
736
- /* Media queries */
737
- @media all and (max-width: 640px){
738
- /* Make 3-6 cols into 2 col */
739
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
740
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
741
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
742
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
743
- width: 50%;
744
- }
745
- /* Make 7-10 cols into 4 col */
746
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
747
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
748
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
749
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
750
- width: 25%;
751
- }
752
- /* On mobile make the min-width 100% */
753
- #sb_instagram.sbi_width_resp{
754
- width: 100% !important;
755
- }
756
- }
757
- @media all and (max-width: 480px){
758
- /* Make all cols into 1 col */
759
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
760
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
761
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
762
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
763
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
764
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
765
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
766
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
767
- width: 100%;
768
- }
769
- }
770
-
771
- /* NO JS */
772
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
773
- box-sizing: border-box;
774
- position: relative;
775
- overflow: hidden;
776
- }
777
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
778
- content: "";
779
- display: block;
780
- padding-top: 100%;
781
- z-index: -300;
782
- }
783
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
784
- position: absolute;
785
- top: 0;
786
- left: 0;
787
- bottom: 0;
788
- right: 0;
789
- }
790
- #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
791
- opacity: 1;
792
- max-height: 640px;
793
- }
794
- #sb_instagram.sbi_no_js .sbi_photo img,
795
- #sb_instagram.sbi_no_js .sbi_load_btn{
796
- display: none;
797
- }
798
- #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
799
- padding-bottom: 0 !important;
800
- }
801
- #sb_instagram #sbi_mod_error .sb_frontend_btn {
802
- display: inline-block;
803
- padding: 6px 10px;
804
- background: #ddd;
805
- background: rgba(0,0,0,.1);
806
- text-decoration: none;
807
- border-radius: 5px;
808
- margin-top: 10px;
809
- color: #444
810
- }
811
-
812
- #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
813
- background: #ccc;
814
- background: rgba(0,0,0,.15)
815
- }
816
-
817
- #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
818
- margin-right: 2px
819
  }
1
+ /**************/
2
+ /*** LAYOUT ***/
3
+ /**************/
4
+
5
+ /* Feed container */
6
+ #sb_instagram {
7
+ width: 100%;
8
+ margin: 0 auto;
9
+ padding: 0;
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+ }
14
+ #sb_instagram:after{
15
+ content: "";
16
+ display: table;
17
+ clear: both;
18
+ }
19
+
20
+ /*********************/
21
+ /*** STYLE OPTIONS ***/
22
+ /*********************/
23
+ #sb_instagram.sbi_fixed_height{
24
+ overflow: hidden;
25
+ overflow-y: auto;
26
+ -webkit-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
+ box-sizing: border-box;
29
+ }
30
+ #sb_instagram #sbi_images{
31
+ width: 100%;
32
+ float: left;
33
+ line-height: 0;
34
+
35
+ -webkit-box-sizing: border-box;
36
+ -moz-box-sizing: border-box;
37
+ box-sizing: border-box;
38
+ }
39
+ /* Remove header shadow/border */
40
+ #sb_instagram .sbi_header_link {
41
+ -webkit-box-shadow: none;
42
+ box-shadow: none;
43
+ }
44
+ #sb_instagram .sbi_header_link:hover {
45
+ border: none;
46
+ }
47
+
48
+ /* Items */
49
+ #sb_instagram #sbi_images .sbi_item{
50
+ display: -moz-inline-stack;
51
+ display: inline-block;
52
+ float: left;
53
+ vertical-align: top;
54
+ zoom: 1;
55
+ *display: inline;
56
+
57
+ padding: inherit !important;
58
+ margin: 0 !important;
59
+ text-decoration: none;
60
+ opacity: 1;
61
+ overflow: hidden;
62
+
63
+ -webkit-box-sizing: border-box;
64
+ -moz-box-sizing: border-box;
65
+ box-sizing: border-box;
66
+
67
+ -webkit-transition: all 0.5s ease;
68
+ -moz-transition: all 0.5s ease;
69
+ -o-transition: all 0.5s ease;
70
+ -ms-transition: all 0.5s ease;
71
+ transition: all 0.5s ease;
72
+ }
73
+ /* Transition items in */
74
+ #sb_instagram #sbi_images .sbi_item.sbi_transition{
75
+ opacity: 0;
76
+ }
77
+
78
+ /* Cols */
79
+ #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
80
+ #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
81
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
82
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
83
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
84
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
85
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
86
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
87
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
88
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
89
+
90
+ /* Disable mobile layout */
91
+ #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
92
+ #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
93
+ #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
94
+ #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
95
+ #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
96
+ #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
97
+ #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
98
+ #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
99
+ #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
100
+ #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
101
+
102
+ /* Photos */
103
+ #sb_instagram .sbi_photo_wrap{
104
+ position: relative;
105
+ }
106
+ #sb_instagram .sbi_photo{
107
+ display: block;
108
+ text-decoration: none;
109
+ }
110
+ #sb_instagram .sbi_photo img{
111
+ width: 100%;
112
+ height: auto;
113
+ }
114
+ #sb_instagram .sbi_no_js img{
115
+ display: none;
116
+ }
117
+ #sb_instagram a,
118
+ #sb_instagram a:hover,
119
+ #sb_instagram a:focus,
120
+ #sb_instagram a:active{
121
+ outline: none;
122
+ }
123
+ #sb_instagram img{
124
+ display: block;
125
+ padding: 0 !important;
126
+ margin: 0 !important;
127
+ max-width: 100% !important;
128
+ opacity: 1 !important;
129
+ }
130
+ #sb_instagram .sbi_link{
131
+ display: none;
132
+ position: absolute;
133
+ bottom: 0;
134
+ right: 0;
135
+
136
+ width: 100%;
137
+ padding: 10px 0;
138
+ background: rgba(0,0,0,0.5);
139
+ text-align: center;
140
+ color: #fff;
141
+ font-size: 12px;
142
+ line-height: 1.1;
143
+ }
144
+ #sb_instagram .sbi_link a{
145
+ padding: 0 6px;
146
+ text-decoration: none;
147
+ color: #fff;
148
+ font-size: 12px;
149
+ line-height: 1.1;
150
+
151
+ display: -moz-inline-stack;
152
+ display: inline-block;
153
+ vertical-align: top;
154
+ zoom: 1;
155
+ *display: inline;
156
+ }
157
+ #sb_instagram .sbi_link .sbi_lightbox_link{
158
+ padding-bottom: 5px;
159
+ }
160
+ #sb_instagram .sbi_link a:hover,
161
+ #sb_instagram .sbi_link a:focus{
162
+ text-decoration: underline;
163
+ }
164
+ #sb_instagram .sbi_photo_wrap:hover .sbi_link,
165
+ #sb_instagram .sbi_photo_wrap:focus .sbi_link{
166
+ display: block;
167
+ }
168
+
169
+ /* Videos */
170
+ #sb_instagram svg:not(:root).svg-inline--fa {
171
+ height: 1em;
172
+ display: inline-block;
173
+ }
174
+
175
+ #sb_instagram .sbi_type_video .sbi_playbtn,
176
+ #sb_instagram .sbi_type_carousel .sbi_playbtn,
177
+ .sbi_type_carousel .fa-clone,
178
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
179
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
180
+ display: block !important;
181
+ position: absolute;
182
+ z-index: 1;
183
+
184
+ color: #fff;
185
+ color: rgba(255,255,255,0.9);
186
+ font-style: normal !important;
187
+ text-shadow: 0 0 8px rgba(0,0,0,0.8);
188
+ }
189
+ #sb_instagram .sbi_type_video .sbi_playbtn,
190
+ #sb_instagram .sbi_type_carousel .sbi_playbtn {
191
+ z-index: 2;
192
+ top: 50%;
193
+ left: 50%;
194
+ margin-top: -24px;
195
+ margin-left: -19px;
196
+ padding: 0;
197
+ font-size: 48px;
198
+ }
199
+ #sb_instagram .sbi_type_carousel .fa-clone{
200
+ right: 12px;
201
+ top: 12px;
202
+ font-size: 24px;
203
+ text-shadow: 0 0 8px rgba(0,0,0,0.3);
204
+ }
205
+ .sbi_type_carousel svg.fa-clone,
206
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
207
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
208
+ -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
209
+ filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
210
+ }
211
+
212
+ /* Loader */
213
+ #sb_instagram .sbi_loader{
214
+ width: 20px;
215
+ height: 20px;
216
+
217
+ position: relative;
218
+ top: 50%;
219
+ left: 50%;
220
+ margin: -10px 0 0 -10px;
221
+ background-color: #000;
222
+ background-color: rgba(0,0,0,0.5);
223
+
224
+ border-radius: 100%;
225
+ -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
226
+ animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
227
+ }
228
+ #sb_instagram br {
229
+ display: none;
230
+ }
231
+ #sbi_load p {
232
+ display: inline;
233
+ padding: 0;
234
+ margin: 0;
235
+ }
236
+ /* Loader in button */
237
+ #sb_instagram #sbi_load .sbi_loader{
238
+ position: absolute;
239
+ margin-top: -11px;
240
+ background-color: #fff;
241
+ opacity: 1;
242
+ }
243
+ @-webkit-keyframes sbi-sk-scaleout {
244
+ 0% { -webkit-transform: scale(0) }
245
+ 100% {
246
+ -webkit-transform: scale(1.0);
247
+ opacity: 0;
248
+ }
249
+ }
250
+ @keyframes sbi-sk-scaleout {
251
+ 0% {
252
+ -webkit-transform: scale(0);
253
+ -ms-transform: scale(0);
254
+ transform: scale(0);
255
+ } 100% {
256
+ -webkit-transform: scale(1.0);
257
+ -ms-transform: scale(1.0);
258
+ transform: scale(1.0);
259
+ opacity: 0;
260
+ }
261
+ }
262
+
263
+ #sb_instagram .fa-spin,
264
+ #sbi_lightbox .fa-spin{
265
+ -webkit-animation: fa-spin 2s infinite linear;
266
+ animation: fa-spin 2s infinite linear
267
+ }
268
+
269
+ #sb_instagram .fa-pulse,
270
+ #sbi_lightbox .fa-pulse{
271
+ -webkit-animation: fa-spin 1s infinite steps(8);
272
+ animation: fa-spin 1s infinite steps(8)
273
+ }
274
+
275
+ @-webkit-keyframes fa-spin {
276
+ 0% {
277
+ -webkit-transform: rotate(0deg);
278
+ transform: rotate(0deg)
279
+ }
280
+ 100% {
281
+ -webkit-transform: rotate(359deg);
282
+ transform: rotate(359deg)
283
+ }
284
+ }
285
+
286
+ @keyframes fa-spin {
287
+ 0% {
288
+ -webkit-transform: rotate(0deg);
289
+ transform: rotate(0deg)
290
+ }
291
+ 100% {
292
+ -webkit-transform: rotate(359deg);
293
+ transform: rotate(359deg)
294
+ }
295
+ }
296
+ /* Screen reader */
297
+ .sbi-screenreader{text-indent: -9999px !important;display: block !important;width: 0 !important;height: 0 !important;line-height: 0 !important;text-align: left !important;overflow: hidden !important; }
298
+
299
+ /* HEADER */
300
+ #sb_instagram .sb_instagram_header{
301
+ float: left;
302
+ clear: both;
303
+ margin: 0 0 15px 0;
304
+ padding: 0;
305
+ line-height: 1.2;
306
+ width: 100%;
307
+ }
308
+ #sb_instagram .sb_instagram_header a{
309
+ float: left;
310
+ display: block;
311
+ /*width: 100%;*/
312
+ min-width: 100%\9;
313
+ text-decoration: none;
314
+ transition: color 0.5s ease;
315
+ }
316
+ .sbi_no_avatar .sbi_header_img{
317
+ background: #333;
318
+ color: #fff;
319
+ width: 50px;
320
+ height: 50px;
321
+ position: relative;
322
+ }
323
+ .sbi_no_avatar .sbi_header_hashtag_icon {
324
+ display: block;
325
+ color: #fff;
326
+ opacity: .9;
327
+ -webkit-transition: background .6s linear,color .6s linear;
328
+ -moz-transition: background .6s linear,color .6s linear;
329
+ -ms-transition: background .6s linear,color .6s linear;
330
+ -o-transition: background .6s linear,color .6s linear;
331
+ transition: background .6s linear,color .6s linear
332
+ }
333
+
334
+ .sbi_no_avatar:hover .sbi_header_hashtag_icon {
335
+ display: block;
336
+ opacity: 1;
337
+ -webkit-transition: background .2s linear,color .2s linear;
338
+ -moz-transition: background .2s linear,color .2s linear;
339
+ -ms-transition: background .2s linear,color .2s linear;
340
+ -o-transition: background .2s linear,color .2s linear;
341
+ transition: background .2s linear,color .2s linear
342
+ }
343
+ /** Medium Header */
344
+ /* Only use medium & large headers on devices above 480px */
345
+ @media all and (min-width: 480px){
346
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
347
+ width: 80px;
348
+ height: 80px;
349
+ border-radius: 40px;
350
+ }
351
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
352
+ width: 80px;
353
+ height: 80px;
354
+ border-radius: 40px;
355
+ }
356
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
357
+ font-size: 20px;
358
+ }
359
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
360
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
361
+ font-size: 14px;
362
+ }
363
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,
364
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
365
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
366
+ margin-left: 95px !important;
367
+ line-height: 1.4
368
+ }
369
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{
370
+ margin-right: -85px !important;
371
+ }
372
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
373
+ margin-top: 4px !important;
374
+ }
375
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
376
+ padding-top: 20px !important;
377
+ }
378
+ /** Large Header */
379
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
380
+ width: 120px;
381
+ height: 120px;
382
+ border-radius: 60px;
383
+ }
384
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
385
+ width: 120px;
386
+ height: 120px;
387
+ border-radius: 60px;
388
+ }
389
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
390
+ font-size: 28px;
391
+ }
392
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
393
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
394
+ font-size: 16px;
395
+ }
396
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,
397
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
398
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
399
+ margin-left: 140px !important;
400
+ line-height: 1.5;
401
+ }
402
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{
403
+ margin-right: -120px !important;
404
+ }
405
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
406
+ margin-top: 12px !important;
407
+ }
408
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
409
+ padding-top: 32px !important;
410
+ }
411
+ }
412
+
413
+ /* Header profile pic */
414
+ #sb_instagram .sb_instagram_header .sbi_header_img{
415
+ float: left;
416
+ position: relative;
417
+ width: 50px;
418
+ margin: 0 0 0 -100% !important;
419
+ overflow: hidden;
420
+
421
+ -moz-border-radius: 40px;
422
+ -webkit-border-radius: 40px;
423
+ border-radius: 40px;
424
+ }
425
+ #sb_instagram .sb_instagram_header .sbi_header_img img{
426
+ float: left;
427
+ margin: 0 !important;
428
+ padding: 0 !important;
429
+ border: none !important;
430
+
431
+ -moz-border-radius: 40px;
432
+ -webkit-border-radius: 40px;
433
+ border-radius: 40px;
434
+ }
435
+ /* Profile pic hover */
436
+ /* Profile pic hover */
437
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
438
+ opacity: 0;
439
+ position: absolute;
440
+ width: 100%;
441
+ top: 0;
442
+ bottom: 0;
443
+ left: 0;
444
+ text-align: center;
445
+ color: #fff;
446
+ background: rgba(0,0,0,0.75);
447
+ }
448
+
449
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
450
+ #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
451
+ position: absolute;
452
+ top: 50%;
453
+ left: 50%;
454
+ margin-top: -12px;
455
+ margin-left: -12px;
456
+ width: 24px;
457
+ height: 24px;
458
+ font-size: 24px;
459
+ }
460
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
461
+ .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
462
+ margin-top: -18px;
463
+ margin-left: -18px;
464
+ width: 36px;
465
+ height: 36px;
466
+ font-size: 36px
467
+ }
468
+
469
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
470
+ .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
471
+ margin-top: -24px;
472
+ margin-left: -24px;
473
+ width: 48px;
474
+ height: 48px;
475
+ font-size: 48px
476
+ }
477
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
478
+ overflow: hidden;
479
+ background: url('../img/small-logo.png') no-repeat 0 0;
480
+ }
481
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
482
+ z-index: 2;
483
+ transition: opacity 0.4s ease-in-out;
484
+ }
485
+ #sb_instagram .sb_instagram_header .sbi_fade_in{
486
+ opacity: 1;
487
+ transition: opacity 0.2s ease-in-out;
488
+ }
489
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
490
+ position: absolute;
491
+ width: 100%;
492
+ top: 0;
493
+ bottom: 0;
494
+ left: 0;
495
+ text-align: center;
496
+ color: #fff;
497
+ background: rgba(0,0,0,0.75);
498
+
499
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
500
+ filter: alpha(opacity=0);
501
+ -moz-opacity: 0;
502
+ -khtml-opacity: 0;
503
+ opacity: 0;
504
+ border-radius: 40px;
505
+ transition: opacity 0.2s;
506
+ }
507
+ /* Fade the Instagram icon in when hovering on the header */
508
+ #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
509
+ #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
510
+ opacity: 1;
511
+ }
512
+ /* Header text */
513
+ #sb_instagram .sb_instagram_header .sbi_header_text{
514
+ float: left;
515
+ width: 100%;
516
+ padding-top: 5px;
517
+ }
518
+ #sb_instagram .sb_instagram_header a{
519
+ text-decoration: none;
520
+ }
521
+ #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
522
+ #sb_instagram .sb_instagram_header .sbi_header_text h3{
523
+ float: left;
524
+ clear: both;
525
+ width: auto;
526
+ margin: 0 0 0 60px !important;
527
+ padding: 0 !important;
528
+ }
529
+ #sb_instagram .sb_instagram_header h3{
530
+ font-size: 16px;
531
+ line-height: 1.3;
532
+ }
533
+ #sb_instagram .sb_instagram_header p{
534
+ font-size: 13px;
535
+ line-height: 1.3;
536
+ margin: 0;
537
+ padding: 0;
538
+ }
539
+ #sb_instagram p:empty { display: none; }
540
+ #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
541
+ margin-right: 3px !important;
542
+ }
543
+
544
+ /* No bio */
545
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
546
+ padding-top: 9px !important;
547
+ }
548
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
549
+ clear: both;
550
+ }
551
+
552
+
553
+ /* Buttons */
554
+ #sb_instagram #sbi_load{
555
+ float: left;
556
+ clear: both;
557
+ width: 100%;
558
+ text-align: center;
559
+ }
560
+ #sb_instagram #sbi_load .fa-spinner{
561
+ display: none;
562
+ position: absolute;
563
+ top: 50%;
564
+ left: 50%;
565
+ margin: -8px 0 0 -7px;
566
+ font-size: 15px;
567
+ }
568
+ #sb_instagram #sbi_load{
569
+ opacity: 1;
570
+ transition: all 0.5s ease-in;
571
+ }
572
+ #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
573
+ opacity: 1;
574
+ transition: all 0.1s ease-in;
575
+ }
576
+ #sb_instagram .sbi_hidden{
577
+ opacity: 0 !important;
578
+ }
579
+ #sb_instagram #sbi_load .sbi_load_btn,
580
+ #sb_instagram .sbi_follow_btn a{
581
+ display: -moz-inline-stack;
582
+ display: inline-block;
583
+ vertical-align: top;
584
+ zoom: 1;
585
+ *display: inline;
586
+
587
+ padding: 7px 14px;
588
+ margin: 5px auto 0 auto;
589
+ background: #333;
590
+ color: #eee;
591
+ border: none;
592
+ color: #fff;
593
+ text-decoration: none;
594
+ font-size: 13px;
595
+ line-height: 1.5;
596
+
597
+ -moz-border-radius: 4px;
598
+ -webkit-border-radius: 4px;
599
+ border-radius: 4px;
600
+
601
+ -webkit-box-sizing: border-box;
602
+ -moz-box-sizing: border-box;
603
+ box-sizing: border-box;
604
+ }
605
+ #sb_instagram #sbi_load .sbi_load_btn {
606
+ position: relative;
607
+ }
608
+ /* Follow button */
609
+ #sb_instagram .sbi_follow_btn{
610
+ display: -moz-inline-stack;
611
+ display: inline-block;
612
+ vertical-align: top;
613
+ zoom: 1;
614
+ *display: inline;
615
+ text-align: center;
616
+ }
617
+ #sb_instagram .sbi_follow_btn.sbi_top{
618
+ display: block;
619
+ margin-bottom: 5px;
620
+ }
621
+ #sb_instagram .sbi_follow_btn a{
622
+ background: #408bd1;
623
+ color: #fff;
624
+ }
625
+ #sb_instagram .sbi_follow_btn a,
626
+ #sb_instagram .sbi_follow_btn a,
627
+ #sb_instagram #sbi_load .sbi_load_btn{
628
+ transition: all 0.1s ease-in;
629
+ }
630
+ /* Hover state for default colors */
631
+ #sb_instagram #sbi_load .sbi_load_btn:hover{
632
+ outline: none;
633
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
634
+ }
635
+ #sb_instagram .sbi_follow_btn a:hover,
636
+ #sb_instagram .sbi_follow_btn a:focus{
637
+ outline: none;
638
+ box-shadow: inset 0 0 10px 20px #359dff;
639
+ }
640
+ /* If a custom color is applied then just use opacity for the hover effect */
641
+ #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
642
+ #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
643
+ #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
644
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
645
+ }
646
+ /* Active state */
647
+ #sb_instagram .sbi_follow_btn a:active,
648
+ #sb_instagram #sbi_load .sbi_load_btn:active{
649
+ box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
650
+ }
651
+
652
+ #sb_instagram .sbi_follow_btn .fa,
653
+ #sb_instagram .sbi_follow_btn svg{
654
+ margin-bottom: -1px;
655
+ margin-right: 7px;
656
+ font-size: 15px;
657
+ }
658
+ #sb_instagram .sbi_follow_btn svg{
659
+ vertical-align: -.125em;
660
+ }
661
+ #sb_instagram #sbi_load .sbi_follow_btn{
662
+ margin-left: 5px;
663
+ }
664
+
665
+ /* Error messages */
666
+ #sb_instagram .sb_instagram_error{
667
+ width: 100%;
668
+ text-align: center;
669
+ line-height: 1.4;
670
+ }
671
+
672
+ /* Mod only error msgs */
673
+ #sbi_mod_error{
674
+ display: none;
675
+ border: 1px solid #ddd;
676
+ background: #eee;
677
+ color: #333;
678
+ margin: 10px 0 0;
679
+ padding: 10px 15px;
680
+ font-size: 13px;
681
+ text-align: center;
682
+ clear: both;
683
+
684
+ -moz-border-radius: 4px;
685
+ -webkit-border-radius: 4px;
686
+ border-radius: 4px;
687
+ }
688
+ #sbi_mod_error br {
689
+ display: initial !important;
690
+ }
691
+ #sbi_mod_error p{
692
+ padding: 5px 0 !important;
693
+ margin: 0 !important;
694
+ line-height: 1.3 !important;
695
+ }
696
+ #sbi_mod_error ol,
697
+ #sbi_mod_error ul{
698
+ padding: 5px 0 5px 20px !important;
699
+ margin: 0 !important;
700
+ }
701
+ #sbi_mod_error li{
702
+ padding: 1px 0 !important;
703
+ margin: 0 !important;
704
+ }
705
+ #sbi_mod_error span{
706
+ font-size: 12px;
707
+ }
708
+
709
+ /* Medium */
710
+ #sb_instagram.sbi_medium .sbi_playbtn,
711
+ #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
712
+ margin-top: -12px;
713
+ margin-left: -9px;
714
+ font-size: 23px;
715
+ }
716
+ #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
717
+ right: 8px;
718
+ top: 8px;
719
+ font-size: 18px;
720
+ }
721
+ /* Small */
722
+ #sb_instagram.sbi_small .sbi_playbtn,
723
+ #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
724
+ margin-top: -9px;
725
+ margin-left: -7px;
726
+ font-size: 18px;
727
+ }
728
+ #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
729
+ right: 5px;
730
+ top: 5px;
731
+ font-size: 12px;
732
+ }
733
+
734
+ /* Media queries */
735
+ @media all and (max-width: 640px){
736
+ /* Make 3-6 cols into 2 col */
737
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
738
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
739
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
740
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
741
+ width: 50%;
742
+ }
743
+ /* Make 7-10 cols into 4 col */
744
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
745
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
746
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
747
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
748
+ width: 25%;
749
+ }
750
+ /* On mobile make the min-width 100% */
751
+ #sb_instagram.sbi_width_resp{
752
+ width: 100% !important;
753
+ }
754
+ }
755
+ @media all and (max-width: 480px){
756
+ /* Make all cols into 1 col */
757
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
758
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
759
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
760
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
761
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
762
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
763
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
764
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
765
+ width: 100%;
766
+ }
767
+ }
768
+
769
+ /* NO JS */
770
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
771
+ box-sizing: border-box;
772
+ position: relative;
773
+ overflow: hidden;
774
+ }
775
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
776
+ content: "";
777
+ display: block;
778
+ padding-top: 100%;
779
+ z-index: -300;
780
+ }
781
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
782
+ position: absolute;
783
+ top: 0;
784
+ left: 0;
785
+ bottom: 0;
786
+ right: 0;
787
+ }
788
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
789
+ opacity: 1;
790
+ }
791
+ #sb_instagram.sbi_no_js .sbi_photo img,
792
+ #sb_instagram.sbi_no_js .sbi_load_btn{
793
+ display: none;
794
+ }
795
+ #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
796
+ padding-bottom: 0 !important;
797
+ }
798
+ #sb_instagram #sbi_mod_error .sb_frontend_btn {
799
+ display: inline-block;
800
+ padding: 6px 10px;
801
+ background: #ddd;
802
+ background: rgba(0,0,0,.1);
803
+ text-decoration: none;
804
+ border-radius: 5px;
805
+ margin-top: 10px;
806
+ color: #444
807
+ }
808
+
809
+ #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
810
+ background: #ccc;
811
+ background: rgba(0,0,0,.15)
812
+ }
813
+
814
+ #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
815
+ margin-right: 2px
 
 
 
816
  }
css/sbi-styles.min.css CHANGED
@@ -1 +1 @@
1
- #sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram .sbi_header_link{-webkit-box-shadow:none;box-shadow:none}#sb_instagram .sbi_header_link:hover{border:none}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em;display:inline-block}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important;text-align:left!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}.sbi_no_avatar .sbi_header_img{background:#333;color:#fff;width:50px;height:50px;position:relative}.sbi_no_avatar .sbi_header_hashtag_icon{display:block;color:#fff;opacity:.9;-webkit-transition:background .6s linear,color .6s linear;-moz-transition:background .6s linear,color .6s linear;-ms-transition:background .6s linear,color .6s linear;-o-transition:background .6s linear,color .6s linear;transition:background .6s linear,color .6s linear}.sbi_no_avatar:hover .sbi_header_hashtag_icon{display:block;opacity:1;-webkit-transition:background .2s linear,color .2s linear;-moz-transition:background .2s linear,color .2s linear;-ms-transition:background .2s linear,color .2s linear;-o-transition:background .2s linear,color .2s linear;transition:background .2s linear,color .2s linear}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo,#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-18px;margin-left:-18px;width:36px;height:36px;font-size:36px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-24px;margin-left:-24px;width:48px;height:48px;font-size:48px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error br{display:initial!important}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}#sb_instagram #sbi_mod_error .sb_frontend_btn{display:inline-block;padding:6px 10px;background:#ddd;background:rgba(0,0,0,.1);text-decoration:none;border-radius:5px;margin-top:10px;color:#444}#sb_instagram #sbi_mod_error .sb_frontend_btn:hover{background:#ccc;background:rgba(0,0,0,.15)}#sb_instagram #sbi_mod_error .sb_frontend_btn .fa{margin-right:2px}
1
+ #sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram .sbi_header_link{-webkit-box-shadow:none;box-shadow:none}#sb_instagram .sbi_header_link:hover{border:none}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em;display:inline-block}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important;text-align:left!important;overflow:hidden!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}.sbi_no_avatar .sbi_header_img{background:#333;color:#fff;width:50px;height:50px;position:relative}.sbi_no_avatar .sbi_header_hashtag_icon{display:block;color:#fff;opacity:.9;-webkit-transition:background .6s linear,color .6s linear;-moz-transition:background .6s linear,color .6s linear;-ms-transition:background .6s linear,color .6s linear;-o-transition:background .6s linear,color .6s linear;transition:background .6s linear,color .6s linear}.sbi_no_avatar:hover .sbi_header_hashtag_icon{display:block;opacity:1;-webkit-transition:background .2s linear,color .2s linear;-moz-transition:background .2s linear,color .2s linear;-ms-transition:background .2s linear,color .2s linear;-o-transition:background .2s linear,color .2s linear;transition:background .2s linear,color .2s linear}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo,#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-18px;margin-left:-18px;width:36px;height:36px;font-size:36px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-24px;margin-left:-24px;width:48px;height:48px;font-size:48px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error br{display:initial!important}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}#sb_instagram #sbi_mod_error .sb_frontend_btn{display:inline-block;padding:6px 10px;background:#ddd;background:rgba(0,0,0,.1);text-decoration:none;border-radius:5px;margin-top:10px;color:#444}#sb_instagram #sbi_mod_error .sb_frontend_btn:hover{background:#ccc;background:rgba(0,0,0,.15)}#sb_instagram #sbi_mod_error .sb_frontend_btn .fa{margin-right:2px}
img/about/icon-full.svg CHANGED
File without changes
img/about/icon-none.svg CHANGED
File without changes
img/about/icon-partial.svg CHANGED
File without changes
img/about/plugin-mi.png CHANGED
File without changes
img/about/plugin-om.png CHANGED
File without changes
img/about/plugin-rp.png CHANGED
File without changes
img/about/plugin-smtp.png CHANGED
File without changes
img/about/plugin-wpforms.png CHANGED
File without changes
inc/admin/PluginSilentUpgrader.php CHANGED
@@ -1,576 +1,576 @@
1
- <?php
2
-
3
- namespace Sbi\Helpers;
4
-
5
- use WP_Error;
6
- use WP_Upgrader;
7
- use WP_Filesystem_Base;
8
-
9
- /** \WP_Upgrader class */
10
- require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
11
-
12
- /** \Plugin_Upgrader class */
13
- require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php';
14
-
15
- /**
16
- * In WP 5.3 a PHP 5.6 splat operator (...$args) was added to \WP_Upgrader_Skin::feedback().
17
- * We need to remove all calls to *Skin::feedback() method, as we can't override it in own Skins
18
- * without breaking support for PHP 5.3-5.5.
19
- *
20
- * @internal Please do not use this class outside of core WPForms development. May be removed at any time.
21
- *
22
- * @since 1.5.6.1
23
- */
24
- class PluginSilentUpgrader extends \Plugin_Upgrader {
25
-
26
- /**
27
- * Run an upgrade/installation.
28
- *
29
- * Attempts to download the package (if it is not a local file), unpack it, and
30
- * install it in the destination folder.
31
- *
32
- * @since 1.5.6.1
33
- *
34
- * @param array $options {
35
- * Array or string of arguments for upgrading/installing a package.
36
- *
37
- * @type string $package The full path or URI of the package to install.
38
- * Default empty.
39
- * @type string $destination The full path to the destination folder.
40
- * Default empty.
41
- * @type bool $clear_destination Whether to delete any files already in the
42
- * destination folder. Default false.
43
- * @type bool $clear_working Whether to delete the files form the working
44
- * directory after copying to the destination.
45
- * Default false.
46
- * @type bool $abort_if_destination_exists Whether to abort the installation if the destination
47
- * folder already exists. When true, `$clear_destination`
48
- * should be false. Default true.
49
- * @type bool $is_multi Whether this run is one of multiple upgrade/installation
50
- * actions being performed in bulk. When true, the skin
51
- * WP_Upgrader::header() and WP_Upgrader::footer()
52
- * aren't called. Default false.
53
- * @type array $hook_extra Extra arguments to pass to the filter hooks called by
54
- * WP_Upgrader::run().
55
- * }
56
- * @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error,
57
- * or false if unable to connect to the filesystem.
58
- */
59
- public function run( $options ) {
60
-
61
- $defaults = array(
62
- 'package' => '', // Please always pass this.
63
- 'destination' => '', // And this
64
- 'clear_destination' => false,
65
- 'abort_if_destination_exists' => true, // Abort if the Destination directory exists, Pass clear_destination as false please
66
- 'clear_working' => true,
67
- 'is_multi' => false,
68
- 'hook_extra' => array(), // Pass any extra $hook_extra args here, this will be passed to any hooked filters.
69
- );
70
-
71
- $options = wp_parse_args( $options, $defaults );
72
-
73
- /**
74
- * Filters the package options before running an update.
75
- *
76
- * See also {@see 'upgrader_process_complete'}.
77
- *
78
- * @since 4.3.0
79
- *
80
- * @param array $options {
81
- * Options used by the upgrader.
82
- *
83
- * @type string $package Package for update.
84
- * @type string $destination Update location.
85
- * @type bool $clear_destination Clear the destination resource.
86
- * @type bool $clear_working Clear the working resource.
87
- * @type bool $abort_if_destination_exists Abort if the Destination directory exists.
88
- * @type bool $is_multi Whether the upgrader is running multiple times.
89
- * @type array $hook_extra {
90
- * Extra hook arguments.
91
- *
92
- * @type string $action Type of action. Default 'update'.
93
- * @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'.
94
- * @type bool $bulk Whether the update process is a bulk update. Default true.
95
- * @type string $plugin Path to the plugin file relative to the plugins directory.
96
- * @type string $theme The stylesheet or template name of the theme.
97
- * @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme',
98
- * or 'core'.
99
- * @type object $language_update The language pack update offer.
100
- * }
101
- * }
102
- */
103
- $options = apply_filters( 'upgrader_package_options', $options );
104
-
105
- if ( ! $options['is_multi'] ) { // call $this->header separately if running multiple times
106
- $this->skin->header();
107
- }
108
-
109
- // Connect to the Filesystem first.
110
- $res = $this->fs_connect( array( WP_CONTENT_DIR, $options['destination'] ) );
111
- // Mainly for non-connected filesystem.
112
- if ( ! $res ) {
113
- if ( ! $options['is_multi'] ) {
114
- $this->skin->footer();
115
- }
116
- return false;
117
- }
118
-
119
- $this->skin->before();
120
-
121
- if ( is_wp_error( $res ) ) {
122
- $this->skin->error( $res );
123
- $this->skin->after();
124
- if ( ! $options['is_multi'] ) {
125
- $this->skin->footer();
126
- }
127
- return $res;
128
- }
129
-
130
- /*
131
- * Download the package (Note, This just returns the filename
132
- * of the file if the package is a local file)
133
- */
134
- $download = $this->download_package( $options['package'], true );
135
-
136
- // Allow for signature soft-fail.
137
- // WARNING: This may be removed in the future.
138
- if ( is_wp_error( $download ) && $download->get_error_data( 'softfail-filename' ) ) {
139
-
140
- // Don't output the 'no signature could be found' failure message for now.
141
- if ( 'signature_verification_no_signature' != $download->get_error_code() || WP_DEBUG ) {
142
- // Outout the failure error as a normal feedback, and not as an error:
143
- //$this->skin->feedback( $download->get_error_message() );
144
-
145
- // Report this failure back to WordPress.org for debugging purposes.
146
- wp_version_check(
147
- array(
148
- 'signature_failure_code' => $download->get_error_code(),
149
- 'signature_failure_data' => $download->get_error_data(),
150
- )
151
- );
152
- }
153
-
154
- // Pretend this error didn't happen.
155
- $download = $download->get_error_data( 'softfail-filename' );
156
- }
157
-
158
- if ( is_wp_error( $download ) ) {
159
- $this->skin->error( $download );
160
- $this->skin->after();
161
- if ( ! $options['is_multi'] ) {
162
- $this->skin->footer();
163
- }
164
- return $download;
165
- }
166
-
167
- $delete_package = ( $download != $options['package'] ); // Do not delete a "local" file
168
-
169
- // Unzips the file into a temporary directory.
170
- $working_dir = $this->unpack_package( $download, $delete_package );
171
- if ( is_wp_error( $working_dir ) ) {
172
- $this->skin->error( $working_dir );
173
- $this->skin->after();
174
- if ( ! $options['is_multi'] ) {
175
- $this->skin->footer();
176
- }
177
- return $working_dir;
178
- }
179
-
180
- // With the given options, this installs it to the destination directory.
181
- $result = $this->install_package(
182
- array(
183
- 'source' => $working_dir,
184
- 'destination' => $options['destination'],
185
- 'clear_destination' => $options['clear_destination'],
186
- 'abort_if_destination_exists' => $options['abort_if_destination_exists'],
187
- 'clear_working' => $options['clear_working'],
188
- 'hook_extra' => $options['hook_extra'],
189
- )
190
- );
191
-
192
- $this->skin->set_result( $result );
193
- if ( is_wp_error( $result ) ) {
194
- $this->skin->error( $result );
195
- //$this->skin->feedback( 'process_failed' );
196
- } else {
197
- // Installation succeeded.
198
- //$this->skin->feedback( 'process_success' );
199
- }
200
-
201
- $this->skin->after();
202
-
203
- if ( ! $options['is_multi'] ) {
204
-
205
- /**
206
- * Fires when the upgrader process is complete.
207
- *
208
- * See also {@see 'upgrader_package_options'}.
209
- *
210
- * @since 3.6.0
211
- * @since 3.7.0 Added to WP_Upgrader::run().
212
- * @since 4.6.0 `$translations` was added as a possible argument to `$hook_extra`.
213
- *
214
- * @param WP_Upgrader $this WP_Upgrader instance. In other contexts, $this, might be a
215
- * Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
216
- * @param array $hook_extra {
217
- * Array of bulk item update data.
218
- *
219
- * @type string $action Type of action. Default 'update'.
220
- * @type string $type Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'.
221
- * @type bool $bulk Whether the update process is a bulk update. Default true.
222
- * @type array $plugins Array of the basename paths of the plugins' main files.
223
- * @type array $themes The theme slugs.
224
- * @type array $translations {
225
- * Array of translations update data.
226
- *
227
- * @type string $language The locale the translation is for.
228
- * @type string $type Type of translation. Accepts 'plugin', 'theme', or 'core'.
229
- * @type string $slug Text domain the translation is for. The slug of a theme/plugin or
230
- * 'default' for core translations.
231
- * @type string $version The version of a theme, plugin, or core.
232
- * }
233
- * }
234
- */
235
- do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
236
-
237
- $this->skin->footer();
238
- }
239
-
240
- return $result;
241
- }
242
-
243
- /**
244
- * Toggle maintenance mode for the site.
245
- *
246
- * Create/delete the maintenance file to enable/disable maintenance mode.
247
- *
248
- * @since 2.8.0
249
- *
250
- * @global WP_Filesystem_Base $wp_filesystem Subclass
251
- *
252
- * @param bool $enable True to enable maintenance mode, false to disable.
253
- */
254
- public function maintenance_mode( $enable = false ) {
255
- global $wp_filesystem;
256
- $file = $wp_filesystem->abspath() . '.maintenance';
257
- if ( $enable ) {
258
- //$this->skin->feedback( 'maintenance_start' );
259
- // Create maintenance file to signal that we are upgrading
260
- $maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
261
- $wp_filesystem->delete( $file );
262
- $wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE );
263
- } elseif ( ! $enable && $wp_filesystem->exists( $file ) ) {
264
- //$this->skin->feedback( 'maintenance_end' );
265
- $wp_filesystem->delete( $file );
266
- }
267
- }
268
-
269
- /**
270
- * Download a package.
271
- *
272
- * @since 2.8.0
273
- *
274
- * @param string $package The URI of the package. If this is the full path to an
275
- * existing local file, it will be returned untouched.
276
- * @param bool $check_signatures Whether to validate file signatures. Default false.
277
- * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object.
278
- */
279
- public function download_package( $package, $check_signatures = false, $hook_extra = array() ) {
280
-
281
- /**
282
- * Filters whether to return the package.
283
- *
284
- * @since 3.7.0
285
- *
286
- * @param bool $reply Whether to bail without returning the package.
287
- * Default false.
288
- * @param string $package The package file name.
289
- * @param WP_Upgrader $this The WP_Upgrader instance.
290
- */
291
- $reply = apply_filters( 'upgrader_pre_download', false, $package, $this );
292
- if ( false !== $reply ) {
293
- return $reply;
294
- }
295
-
296
- if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { //Local file or remote?
297
- return $package; //must be a local file..
298
- }
299
-
300
- if ( empty( $package ) ) {
301
- return new WP_Error( 'no_package', $this->strings['no_package'] );
302
- }
303
-
304
- //$this->skin->feedback( 'downloading_package', $package );
305
-
306
- $download_file = download_url( $package, 300, $check_signatures );
307
-
308
- if ( is_wp_error( $download_file ) && ! $download_file->get_error_data( 'softfail-filename' ) ) {
309
- return new WP_Error( 'download_failed', $this->strings['download_failed'], $download_file->get_error_message() );
310
- }
311
-
312
- return $download_file;
313
- }
314
-
315
- /**
316
- * Unpack a compressed package file.
317
- *
318
- * @since 2.8.0
319
- *
320
- * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
321
- *
322
- * @param string $package Full path to the package file.
323
- * @param bool $delete_package Optional. Whether to delete the package file after attempting
324
- * to unpack it. Default true.
325
- * @return string|WP_Error The path to the unpacked contents, or a WP_Error on failure.
326
- */
327
- public function unpack_package( $package, $delete_package = true ) {
328
- global $wp_filesystem;
329
-
330
- //$this->skin->feedback( 'unpack_package' );
331
-
332
- $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/';
333
-
334
- //Clean up contents of upgrade directory beforehand.
335
- $upgrade_files = $wp_filesystem->dirlist( $upgrade_folder );
336
- if ( ! empty( $upgrade_files ) ) {
337
- foreach ( $upgrade_files as $file ) {
338
- $wp_filesystem->delete( $upgrade_folder . $file['name'], true );
339
- }
340
- }
341
-
342
- // We need a working directory - Strip off any .tmp or .zip suffixes
343
- $working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
344
-
345
- // Clean up working directory
346
- if ( $wp_filesystem->is_dir( $working_dir ) ) {
347
- $wp_filesystem->delete( $working_dir, true );
348
- }
349
-
350
- // Unzip package to working directory
351
- $result = unzip_file( $package, $working_dir );
352
-
353
- // Once extracted, delete the package if required.
354
- if ( $delete_package ) {
355
- unlink( $package );
356
- }
357
-
358
- if ( is_wp_error( $result ) ) {
359
- $wp_filesystem->delete( $working_dir, true );
360
- if ( 'incompatible_archive' == $result->get_error_code() ) {
361
- return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $result->get_error_data() );
362
- }
363
- return $result;
364
- }
365
-
366
- return $working_dir;
367
- }
368
-
369
- /**
370
- * Install a package.
371
- *
372
- * Copies the contents of a package form a source directory, and installs them in
373
- * a destination directory. Optionally removes the source. It can also optionally
374
- * clear out the destination folder if it already exists.
375
- *
376
- * @since 2.8.0
377
- *
378
- * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
379
- * @global array $wp_theme_directories
380
- *
381
- * @param array|string $args {
382
- * Optional. Array or string of arguments for installing a package. Default empty array.
383
- *
384
- * @type string $source Required path to the package source. Default empty.
385
- * @type string $destination Required path to a folder to install the package in.
386
- * Default empty.
387
- * @type bool $clear_destination Whether to delete any files already in the destination
388
- * folder. Default false.
389
- * @type bool $clear_working Whether to delete the files form the working directory
390
- * after copying to the destination. Default false.
391
- * @type bool $abort_if_destination_exists Whether to abort the installation if
392
- * the destination folder already exists. Default true.
393
- * @type array $hook_extra Extra arguments to pass to the filter hooks called by
394
- * WP_Upgrader::install_package(). Default empty array.
395
- * }
396
- *
397
- * @return array|WP_Error The result (also stored in `WP_Upgrader::$result`), or a WP_Error on failure.
398
- */
399
- public function install_package( $args = array() ) {
400
- global $wp_filesystem, $wp_theme_directories;
401
-
402
- $defaults = array(
403
- 'source' => '', // Please always pass this
404
- 'destination' => '', // and this
405
- 'clear_destination' => false,
406
- 'clear_working' => false,
407
- 'abort_if_destination_exists' => true,
408
- 'hook_extra' => array(),
409
- );
410
-
411
- $args = wp_parse_args( $args, $defaults );
412
-
413
- // These were previously extract()'d.
414
- $source = $args['source'];
415
- $destination = $args['destination'];
416
- $clear_destination = $args['clear_destination'];
417
-
418
- set_time_limit( 300 );
419
-
420
- if ( empty( $source ) || empty( $destination ) ) {
421
- return new WP_Error( 'bad_request', $this->strings['bad_request'] );
422
- }
423
- //$this->skin->feedback( 'installing_package' );
424
-
425
- /**
426
- * Filters the install response before the installation has started.
427
- *
428
- * Returning a truthy value, or one that could be evaluated as a WP_Error
429
- * will effectively short-circuit the installation, returning that value
430
- * instead.
431
- *
432
- * @since 2.8.0
433
- *
434
- * @param bool|WP_Error $response Response.
435
- * @param array $hook_extra Extra arguments passed to hooked filters.
436
- */
437
- $res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
438
-
439
- if ( is_wp_error( $res ) ) {
440
- return $res;
441
- }
442
-
443
- //Retain the Original source and destinations
444
- $remote_source = $args['source'];
445
- $local_destination = $destination;
446
-
447
- $source_files = array_keys( $wp_filesystem->dirlist( $remote_source ) );
448
- $remote_destination = $wp_filesystem->find_folder( $local_destination );
449
-
450
- //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.
451
- if ( 1 == count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) { //Only one folder? Then we want its contents.
452
- $source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] );
453
- } elseif ( count( $source_files ) == 0 ) {
454
- return new WP_Error( 'incompatible_archive_empty', $this->strings['incompatible_archive'], $this->strings['no_files'] ); // There are no files?
455
- } else { // It's only a single file, the upgrader will use the folder name of this file as the destination folder. Folder name is based on zip filename.
456
- $source = trailingslashit( $args['source'] );
457
- }
458
-
459
- /**
460
- * Filters the source file location for the upgrade package.
461
- *
462
- * @since 2.8.0
463
- * @since 4.4.0 The $hook_extra parameter became available.
464
- *
465
- * @param string $source File source location.
466
- * @param string $remote_source Remote file source location.
467
- * @param WP_Upgrader $this WP_Upgrader instance.
468
- * @param array $hook_extra Extra arguments passed to hooked filters.
469
- */
470
- $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
471
-
472
- if ( is_wp_error( $source ) ) {
473
- return $source;
474
- }
475
-
476
- // Has the source location changed? If so, we need a new source_files list.
477
- if ( $source !== $remote_source ) {
478
- $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
479
- }
480
-
481
- /*
482
- * Protection against deleting files in any important base directories.
483
- * Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the
484
- * destination directory (WP_PLUGIN_DIR / wp-content/themes) intending
485
- * to copy the directory into the directory, whilst they pass the source
486
- * as the actual files to copy.
487
- */
488
- $protected_directories = array( ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes' );
489
-
490
- if ( is_array( $wp_theme_directories ) ) {
491
- $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
492
- }
493
-
494
- if ( in_array( $destination, $protected_directories ) ) {
495
- $remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) );
496
- $destination = trailingslashit( $destination ) . trailingslashit( basename( $source ) );
497
- }
498
-
499
- if ( $clear_destination ) {
500
- // We're going to clear the destination if there's something there.
501
- //$this->skin->feedback( 'remove_old' );
502
-
503
- $removed = $this->clear_destination( $remote_destination );
504
-
505
- /**
506
- * Filters whether the upgrader cleared the destination.
507
- *
508
- * @since 2.8.0
509
- *
510
- * @param mixed $removed Whether the destination was cleared. true on success, WP_Error on failure
511
- * @param string $local_destination The local package destination.
512
- * @param string $remote_destination The remote package destination.
513
- * @param array $hook_extra Extra arguments passed to hooked filters.
514
- */
515
- $removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] );
516
-
517
- if ( is_wp_error( $removed ) ) {
518
- return $removed;
519
- }
520
- } elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists( $remote_destination ) ) {
521
- //If we're not clearing the destination folder and something exists there already, Bail.
522
- //But first check to see if there are actually any files in the folder.
523
- $_files = $wp_filesystem->dirlist( $remote_destination );
524
- if ( ! empty( $_files ) ) {
525
- $wp_filesystem->delete( $remote_source, true ); //Clear out the source files.
526
- return new WP_Error( 'folder_exists', $this->strings['folder_exists'], $remote_destination );
527
- }
528
- }
529
-
530
- //Create destination if needed
531
- if ( ! $wp_filesystem->exists( $remote_destination ) ) {
532
- if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) {
533
- return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination );
534
- }
535
- }
536
- // Copy new version of item into place.
537
- $result = copy_dir( $source, $remote_destination );
538
- if ( is_wp_error( $result ) ) {
539
- if ( $args['clear_working'] ) {
540
- $wp_filesystem->delete( $remote_source, true );
541
- }
542
- return $result;
543
- }
544
-
545
- //Clear the Working folder?
546
- if ( $args['clear_working'] ) {
547
- $wp_filesystem->delete( $remote_source, true );
548
- }
549
-
550
- $destination_name = basename( str_replace( $local_destination, '', $destination ) );
551
- if ( '.' == $destination_name ) {
552
- $destination_name = '';
553
- }
554
-
555
- $this->result = compact( 'source', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination' );
556
-
557
- /**
558
- * Filters the installation response after the installation has finished.
559
- *
560
- * @since 2.8.0
561
- *
562
- * @param bool $response Installation response.
563
- * @param array $hook_extra Extra arguments passed to hooked filters.
564
- * @param array $result Installation result data.
565
- */
566
- $res = apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result );
567
-
568
- if ( is_wp_error( $res ) ) {
569
- $this->result = $res;
570
- return $res;
571
- }
572
-
573
- //Bombard the calling function will all the info which we've just used.
574
- return $this->result;
575
- }
576
- }
1
+ <?php
2
+
3
+ namespace Sbi\Helpers;
4
+
5
+ use WP_Error;
6
+ use WP_Upgrader;
7
+ use WP_Filesystem_Base;
8
+
9
+ /** \WP_Upgrader class */
10
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
11
+
12
+ /** \Plugin_Upgrader class */
13
+ require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php';
14
+
15
+ /**
16
+ * In WP 5.3 a PHP 5.6 splat operator (...$args) was added to \WP_Upgrader_Skin::feedback().
17
+ * We need to remove all calls to *Skin::feedback() method, as we can't override it in own Skins
18
+ * without breaking support for PHP 5.3-5.5.
19
+ *
20
+ * @internal Please do not use this class outside of core WPForms development. May be removed at any time.
21
+ *
22
+ * @since 1.5.6.1
23
+ */
24
+ class PluginSilentUpgrader extends \Plugin_Upgrader {
25
+
26
+ /**
27
+ * Run an upgrade/installation.
28
+ *
29
+ * Attempts to download the package (if it is not a local file), unpack it, and
30
+ * install it in the destination folder.
31
+ *
32
+ * @since 1.5.6.1
33
+ *
34
+ * @param array $options {
35
+ * Array or string of arguments for upgrading/installing a package.
36
+ *
37
+ * @type string $package The full path or URI of the package to install.
38
+ * Default empty.
39
+ * @type string $destination The full path to the destination folder.
40
+ * Default empty.
41
+ * @type bool $clear_destination Whether to delete any files already in the
42
+ * destination folder. Default false.
43
+ * @type bool $clear_working Whether to delete the files form the working
44
+ * directory after copying to the destination.
45
+ * Default false.
46
+ * @type bool $abort_if_destination_exists Whether to abort the installation if the destination
47
+ * folder already exists. When true, `$clear_destination`
48
+ * should be false. Default true.
49
+ * @type bool $is_multi Whether this run is one of multiple upgrade/installation
50
+ * actions being performed in bulk. When true, the skin
51
+ * WP_Upgrader::header() and WP_Upgrader::footer()
52
+ * aren't called. Default false.
53
+ * @type array $hook_extra Extra arguments to pass to the filter hooks called by
54
+ * WP_Upgrader::run().
55
+ * }
56
+ * @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error,
57
+ * or false if unable to connect to the filesystem.
58
+ */
59
+ public function run( $options ) {
60
+
61
+ $defaults = array(
62
+ 'package' => '', // Please always pass this.
63
+ 'destination' => '', // And this
64
+ 'clear_destination' => false,
65
+ 'abort_if_destination_exists' => true, // Abort if the Destination directory exists, Pass clear_destination as false please
66
+ 'clear_working' => true,
67
+ 'is_multi' => false,
68
+ 'hook_extra' => array(), // Pass any extra $hook_extra args here, this will be passed to any hooked filters.
69
+ );
70
+
71
+ $options = wp_parse_args( $options, $defaults );
72
+
73
+ /**
74
+ * Filters the package options before running an update.
75
+ *
76
+ * See also {@see 'upgrader_process_complete'}.
77
+ *
78
+ * @since 4.3.0
79
+ *
80
+ * @param array $options {
81
+ * Options used by the upgrader.
82
+ *
83
+ * @type string $package Package for update.
84
+ * @type string $destination Update location.
85
+ * @type bool $clear_destination Clear the destination resource.
86
+ * @type bool $clear_working Clear the working resource.
87
+ * @type bool $abort_if_destination_exists Abort if the Destination directory exists.
88
+ * @type bool $is_multi Whether the upgrader is running multiple times.
89
+ * @type array $hook_extra {
90
+ * Extra hook arguments.
91
+ *
92
+ * @type string $action Type of action. Default 'update'.
93
+ * @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'.
94
+ * @type bool $bulk Whether the update process is a bulk update. Default true.
95
+ * @type string $plugin Path to the plugin file relative to the plugins directory.
96
+ * @type string $theme The stylesheet or template name of the theme.
97
+ * @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme',
98
+ * or 'core'.
99
+ * @type object $language_update The language pack update offer.
100
+ * }
101
+ * }
102
+ */
103
+ $options = apply_filters( 'upgrader_package_options', $options );
104
+
105
+ if ( ! $options['is_multi'] ) { // call $this->header separately if running multiple times
106
+ $this->skin->header();
107
+ }
108
+
109
+ // Connect to the Filesystem first.
110
+ $res = $this->fs_connect( array( WP_CONTENT_DIR, $options['destination'] ) );
111
+ // Mainly for non-connected filesystem.
112
+ if ( ! $res ) {
113
+ if ( ! $options['is_multi'] ) {
114
+ $this->skin->footer();
115
+ }
116
+ return false;
117
+ }
118
+
119
+ $this->skin->before();
120
+
121
+ if ( is_wp_error( $res ) ) {
122
+ $this->skin->error( $res );
123
+ $this->skin->after();
124
+ if ( ! $options['is_multi'] ) {
125
+ $this->skin->footer();
126
+ }
127
+ return $res;
128
+ }
129
+
130
+ /*
131
+ * Download the package (Note, This just returns the filename
132
+ * of the file if the package is a local file)
133
+ */
134
+ $download = $this->download_package( $options['package'], true );
135
+
136
+ // Allow for signature soft-fail.
137
+ // WARNING: This may be removed in the future.
138
+ if ( is_wp_error( $download ) && $download->get_error_data( 'softfail-filename' ) ) {
139
+
140
+ // Don't output the 'no signature could be found' failure message for now.
141
+ if ( 'signature_verification_no_signature' != $download->get_error_code() || WP_DEBUG ) {
142
+ // Outout the failure error as a normal feedback, and not as an error:
143
+ //$this->skin->feedback( $download->get_error_message() );
144
+
145
+ // Report this failure back to WordPress.org for debugging purposes.
146
+ wp_version_check(
147
+ array(
148
+ 'signature_failure_code' => $download->get_error_code(),
149
+ 'signature_failure_data' => $download->get_error_data(),
150
+ )
151
+ );
152
+ }
153
+
154
+ // Pretend this error didn't happen.
155
+ $download = $download->get_error_data( 'softfail-filename' );
156
+ }
157
+
158
+ if ( is_wp_error( $download ) ) {
159
+ $this->skin->error( $download );
160
+ $this->skin->after();
161
+ if ( ! $options['is_multi'] ) {
162
+ $this->skin->footer();
163
+ }
164
+ return $download;
165
+ }
166
+
167
+ $delete_package = ( $download != $options['package'] ); // Do not delete a "local" file
168
+
169
+ // Unzips the file into a temporary directory.
170
+ $working_dir = $this->unpack_package( $download, $delete_package );
171
+ if ( is_wp_error( $working_dir ) ) {
172
+ $this->skin->error( $working_dir );
173
+ $this->skin->after();
174
+ if ( ! $options['is_multi'] ) {
175
+ $this->skin->footer();
176
+ }
177
+ return $working_dir;
178
+ }
179
+
180
+ // With the given options, this installs it to the destination directory.
181
+ $result = $this->install_package(
182
+ array(
183
+ 'source' => $working_dir,
184
+ 'destination' => $options['destination'],
185
+ 'clear_destination' => $options['clear_destination'],
186
+ 'abort_if_destination_exists' => $options['abort_if_destination_exists'],
187
+ 'clear_working' => $options['clear_working'],
188
+ 'hook_extra' => $options['hook_extra'],
189
+ )
190
+ );
191
+
192
+ $this->skin->set_result( $result );
193
+ if ( is_wp_error( $result ) ) {
194
+ $this->skin->error( $result );
195
+ //$this->skin->feedback( 'process_failed' );
196
+ } else {
197
+ // Installation succeeded.
198
+ //$this->skin->feedback( 'process_success' );
199
+ }
200
+
201
+ $this->skin->after();
202
+
203
+ if ( ! $options['is_multi'] ) {
204
+
205
+ /**
206
+ * Fires when the upgrader process is complete.
207
+ *
208
+ * See also {@see 'upgrader_package_options'}.
209
+ *
210
+ * @since 3.6.0
211
+ * @since 3.7.0 Added to WP_Upgrader::run().
212
+ * @since 4.6.0 `$translations` was added as a possible argument to `$hook_extra`.
213
+ *
214
+ * @param WP_Upgrader $this WP_Upgrader instance. In other contexts, $this, might be a
215
+ * Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
216
+ * @param array $hook_extra {
217
+ * Array of bulk item update data.
218
+ *
219
+ * @type string $action Type of action. Default 'update'.
220
+ * @type string $type Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'.
221
+ * @type bool $bulk Whether the update process is a bulk update. Default true.
222
+ * @type array $plugins Array of the basename paths of the plugins' main files.
223
+ * @type array $themes The theme slugs.
224
+ * @type array $translations {
225
+ * Array of translations update data.
226
+ *
227
+ * @type string $language The locale the translation is for.
228
+ * @type string $type Type of translation. Accepts 'plugin', 'theme', or 'core'.
229
+ * @type string $slug Text domain the translation is for. The slug of a theme/plugin or
230
+ * 'default' for core translations.
231
+ * @type string $version The version of a theme, plugin, or core.
232
+ * }
233
+ * }
234
+ */
235
+ do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
236
+
237
+ $this->skin->footer();
238
+ }
239
+
240
+ return $result;
241
+ }
242
+
243
+ /**
244
+ * Toggle maintenance mode for the site.
245
+ *
246
+ * Create/delete the maintenance file to enable/disable maintenance mode.
247
+ *
248
+ * @since 2.8.0
249
+ *
250
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
251
+ *
252
+ * @param bool $enable True to enable maintenance mode, false to disable.
253
+ */
254
+ public function maintenance_mode( $enable = false ) {
255
+ global $wp_filesystem;
256
+ $file = $wp_filesystem->abspath() . '.maintenance';
257
+ if ( $enable ) {
258
+ //$this->skin->feedback( 'maintenance_start' );
259
+ // Create maintenance file to signal that we are upgrading
260
+ $maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
261
+ $wp_filesystem->delete( $file );
262
+ $wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE );
263
+ } elseif ( ! $enable && $wp_filesystem->exists( $file ) ) {
264
+ //$this->skin->feedback( 'maintenance_end' );
265
+ $wp_filesystem->delete( $file );
266
+ }
267
+ }
268
+
269
+ /**
270
+ * Download a package.
271
+ *
272
+ * @since 2.8.0
273
+ *
274
+ * @param string $package The URI of the package. If this is the full path to an
275
+ * existing local file, it will be returned untouched.
276
+ * @param bool $check_signatures Whether to validate file signatures. Default false.
277
+ * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object.
278
+ */
279
+ public function download_package( $package, $check_signatures = false, $hook_extra = array() ) {
280
+
281
+ /**
282
+ * Filters whether to return the package.
283
+ *
284
+ * @since 3.7.0
285
+ *
286
+ * @param bool $reply Whether to bail without returning the package.
287
+ * Default false.
288
+ * @param string $package The package file name.
289
+ * @param WP_Upgrader $this The WP_Upgrader instance.
290
+ */
291
+ $reply = apply_filters( 'upgrader_pre_download', false, $package, $this );
292
+ if ( false !== $reply ) {
293
+ return $reply;
294
+ }
295
+
296
+ if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { //Local file or remote?
297
+ return $package; //must be a local file..
298
+ }
299
+
300
+ if ( empty( $package ) ) {
301
+ return new WP_Error( 'no_package', $this->strings['no_package'] );
302
+ }
303
+
304
+ //$this->skin->feedback( 'downloading_package', $package );
305
+
306
+ $download_file = download_url( $package, 300, $check_signatures );
307
+
308
+ if ( is_wp_error( $download_file ) && ! $download_file->get_error_data( 'softfail-filename' ) ) {
309
+ return new WP_Error( 'download_failed', $this->strings['download_failed'], $download_file->get_error_message() );
310
+ }
311
+
312
+ return $download_file;
313
+ }
314
+
315
+ /**
316
+ * Unpack a compressed package file.
317
+ *
318
+ * @since 2.8.0
319
+ *
320
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
321
+ *
322
+ * @param string $package Full path to the package file.
323
+ * @param bool $delete_package Optional. Whether to delete the package file after attempting
324
+ * to unpack it. Default true.
325
+ * @return string|WP_Error The path to the unpacked contents, or a WP_Error on failure.
326
+ */
327
+ public function unpack_package( $package, $delete_package = true ) {
328
+ global $wp_filesystem;
329
+
330
+ //$this->skin->feedback( 'unpack_package' );
331
+
332
+ $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/';
333
+
334
+ //Clean up contents of upgrade directory beforehand.
335
+ $upgrade_files = $wp_filesystem->dirlist( $upgrade_folder );
336
+ if ( ! empty( $upgrade_files ) ) {
337
+ foreach ( $upgrade_files as $file ) {
338
+ $wp_filesystem->delete( $upgrade_folder . $file['name'], true );
339
+ }
340
+ }
341
+
342
+ // We need a working directory - Strip off any .tmp or .zip suffixes
343
+ $working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
344
+
345
+ // Clean up working directory
346
+ if ( $wp_filesystem->is_dir( $working_dir ) ) {
347
+ $wp_filesystem->delete( $working_dir, true );
348
+ }
349
+
350
+ // Unzip package to working directory
351
+ $result = unzip_file( $package, $working_dir );
352
+
353
+ // Once extracted, delete the package if required.
354
+ if ( $delete_package ) {
355
+ unlink( $package );
356
+ }
357
+
358
+ if ( is_wp_error( $result ) ) {
359
+ $wp_filesystem->delete( $working_dir, true );
360
+ if ( 'incompatible_archive' == $result->get_error_code() ) {
361
+ return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $result->get_error_data() );
362
+ }
363
+ return $result;
364
+ }
365
+
366
+ return $working_dir;
367
+ }
368
+
369
+ /**
370
+ * Install a package.
371
+ *
372
+ * Copies the contents of a package form a source directory, and installs them in
373
+ * a destination directory. Optionally removes the source. It can also optionally
374
+ * clear out the destination folder if it already exists.
375
+ *
376
+ * @since 2.8.0
377
+ *
378
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
379
+ * @global array $wp_theme_directories
380
+ *
381
+ * @param array|string $args {
382
+ * Optional. Array or string of arguments for installing a package. Default empty array.
383
+ *
384
+ * @type string $source Required path to the package source. Default empty.
385
+ * @type string $destination Required path to a folder to install the package in.
386
+ * Default empty.
387
+ * @type bool $clear_destination Whether to delete any files already in the destination
388
+ * folder. Default false.
389
+ * @type bool $clear_working Whether to delete the files form the working directory
390
+ * after copying to the destination. Default false.
391
+ * @type bool $abort_if_destination_exists Whether to abort the installation if
392
+ * the destination folder already exists. Default true.
393
+ * @type array $hook_extra Extra arguments to pass to the filter hooks called by
394
+ * WP_Upgrader::install_package(). Default empty array.
395
+ * }
396
+ *
397
+ * @return array|WP_Error The result (also stored in `WP_Upgrader::$result`), or a WP_Error on failure.
398
+ */
399
+ public function install_package( $args = array() ) {
400
+ global $wp_filesystem, $wp_theme_directories;
401
+
402
+ $defaults = array(
403
+ 'source' => '', // Please always pass this
404
+ 'destination' => '', // and this
405
+ 'clear_destination' => false,
406
+ 'clear_working' => false,
407
+ 'abort_if_destination_exists' => true,
408
+ 'hook_extra' => array(),
409
+ );
410
+
411
+ $args = wp_parse_args( $args, $defaults );
412
+
413
+ // These were previously extract()'d.
414
+ $source = $args['source'];
415
+ $destination = $args['destination'];
416
+ $clear_destination = $args['clear_destination'];
417
+
418
+ set_time_limit( 300 );
419
+
420
+ if ( empty( $source ) || empty( $destination ) ) {
421
+ return new WP_Error( 'bad_request', $this->strings['bad_request'] );
422
+ }
423
+ //$this->skin->feedback( 'installing_package' );
424
+
425
+ /**
426
+ * Filters the install response before the installation has started.
427
+ *
428
+ * Returning a truthy value, or one that could be evaluated as a WP_Error
429
+ * will effectively short-circuit the installation, returning that value
430
+ * instead.
431
+ *
432
+ * @since 2.8.0
433
+ *
434
+ * @param bool|WP_Error $response Response.
435
+ * @param array $hook_extra Extra arguments passed to hooked filters.
436
+ */
437
+ $res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
438
+
439
+ if ( is_wp_error( $res ) ) {
440
+ return $res;
441
+ }
442
+
443
+ //Retain the Original source and destinations
444
+ $remote_source = $args['source'];
445
+ $local_destination = $destination;
446
+
447
+ $source_files = array_keys( $wp_filesystem->dirlist( $remote_source ) );
448
+ $remote_destination = $wp_filesystem->find_folder( $local_destination );
449
+
450
+ //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.
451
+ if ( 1 == count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) { //Only one folder? Then we want its contents.
452
+ $source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] );
453
+ } elseif ( count( $source_files ) == 0 ) {
454
+ return new WP_Error( 'incompatible_archive_empty', $this->strings['incompatible_archive'], $this->strings['no_files'] ); // There are no files?
455
+ } else { // It's only a single file, the upgrader will use the folder name of this file as the destination folder. Folder name is based on zip filename.
456
+ $source = trailingslashit( $args['source'] );
457
+ }
458
+
459
+ /**
460
+ * Filters the source file location for the upgrade package.
461
+ *
462
+ * @since 2.8.0
463
+ * @since 4.4.0 The $hook_extra parameter became available.
464
+ *
465
+ * @param string $source File source location.
466
+ * @param string $remote_source Remote file source location.
467
+ * @param WP_Upgrader $this WP_Upgrader instance.
468
+ * @param array $hook_extra Extra arguments passed to hooked filters.
469
+ */
470
+ $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
471
+
472
+ if ( is_wp_error( $source ) ) {
473
+ return $source;
474
+ }
475
+
476
+ // Has the source location changed? If so, we need a new source_files list.
477
+ if ( $source !== $remote_source ) {
478
+ $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
479
+ }
480
+
481
+ /*
482
+ * Protection against deleting files in any important base directories.
483
+ * Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the
484
+ * destination directory (WP_PLUGIN_DIR / wp-content/themes) intending
485
+ * to copy the directory into the directory, whilst they pass the source
486
+ * as the actual files to copy.
487
+ */
488
+ $protected_directories = array( ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes' );
489
+
490
+ if ( is_array( $wp_theme_directories ) ) {
491
+ $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
492
+ }
493
+
494
+ if ( in_array( $destination, $protected_directories ) ) {
495
+ $remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) );
496
+ $destination = trailingslashit( $destination ) . trailingslashit( basename( $source ) );
497
+ }
498
+
499
+ if ( $clear_destination ) {
500
+ // We're going to clear the destination if there's something there.
501
+ //$this->skin->feedback( 'remove_old' );
502
+
503
+ $removed = $this->clear_destination( $remote_destination );
504
+
505
+ /**
506
+ * Filters whether the upgrader cleared the destination.
507
+ *
508
+ * @since 2.8.0
509
+ *
510
+ * @param mixed $removed Whether the destination was cleared. true on success, WP_Error on failure
511
+ * @param string $local_destination The local package destination.
512
+ * @param string $remote_destination The remote package destination.
513
+ * @param array $hook_extra Extra arguments passed to hooked filters.
514
+ */
515
+ $removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] );
516
+
517
+ if ( is_wp_error( $removed ) ) {
518
+ return $removed;
519
+ }
520
+ } elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists( $remote_destination ) ) {
521
+ //If we're not clearing the destination folder and something exists there already, Bail.
522
+ //But first check to see if there are actually any files in the folder.
523
+ $_files = $wp_filesystem->dirlist( $remote_destination );
524
+ if ( ! empty( $_files ) ) {
525
+ $wp_filesystem->delete( $remote_source, true ); //Clear out the source files.
526
+ return new WP_Error( 'folder_exists', $this->strings['folder_exists'], $remote_destination );
527
+ }
528
+ }
529
+
530
+ //Create destination if needed
531
+ if ( ! $wp_filesystem->exists( $remote_destination ) ) {
532
+ if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) {
533
+ return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination );
534
+ }
535
+ }
536
+ // Copy new version of item into place.
537
+ $result = copy_dir( $source, $remote_destination );
538
+ if ( is_wp_error( $result ) ) {
539
+ if ( $args['clear_working'] ) {
540
+ $wp_filesystem->delete( $remote_source, true );
541
+ }
542
+ return $result;
543
+ }
544
+
545
+ //Clear the Working folder?
546
+ if ( $args['clear_working'] ) {
547
+ $wp_filesystem->delete( $remote_source, true );
548
+ }
549
+
550
+ $destination_name = basename( str_replace( $local_destination, '', $destination ) );
551
+ if ( '.' == $destination_name ) {
552
+ $destination_name = '';
553
+ }
554
+
555
+ $this->result = compact( 'source', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination' );
556
+
557
+ /**
558
+ * Filters the installation response after the installation has finished.
559
+ *
560
+ * @since 2.8.0
561
+ *
562
+ * @param bool $response Installation response.
563
+ * @param array $hook_extra Extra arguments passed to hooked filters.
564
+ * @param array $result Installation result data.
565
+ */
566
+ $res = apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result );
567
+
568
+ if ( is_wp_error( $res ) ) {
569
+ $this->result = $res;
570
+ return $res;
571
+ }
572
+
573
+ //Bombard the calling function will all the info which we've just used.
574
+ return $this->result;
575
+ }
576
+ }
inc/admin/PluginSilentUpgraderSkin.php CHANGED
@@ -1,57 +1,57 @@
1
- <?php
2
-
3
- namespace Sbi\Helpers;
4
-
5
- /** \WP_Upgrader_Skin class */
6
- require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';
7
-
8
- /**
9
- * Class PluginSilentUpgraderSkin.
10
- *
11
- * @internal Please do not use this class outside of core WPForms development. May be removed at any time.
12
- *
13
- * @since 1.5.6.1
14
- */
15
- class PluginSilentUpgraderSkin extends \WP_Upgrader_Skin {
16
-
17
- /**
18
- * Empty out the header of its HTML content and only check to see if it has
19
- * been performed or not.
20
- *
21
- * @since 1.5.6.1
22
- */
23
- public function header() {
24
- }
25
-
26
- /**
27
- * Empty out the footer of its HTML contents.
28
- *
29
- * @since 1.5.6.1
30
- */
31
- public function footer() {
32
- }
33
-
34
- /**
35
- * Instead of outputting HTML for errors, just return them.
36
- * Ajax request will just ignore it.
37
- *
38
- * @since 1.5.6.1
39
- *
40
- * @param array $errors Array of errors with the install process.
41
- *
42
- * @return array
43
- */
44
- public function error( $errors ) {
45
- return $errors;
46
- }
47
-
48
- /**
49
- * Empty out JavaScript output that calls function to decrement the update counts.
50
- *
51
- * @since 1.5.6.1
52
- *
53
- * @param string $type Type of update count to decrement.
54
- */
55
- public function decrement_update_count( $type ) {
56
- }
57
- }
1
+ <?php
2
+
3
+ namespace Sbi\Helpers;
4
+
5
+ /** \WP_Upgrader_Skin class */
6
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';
7
+
8
+ /**
9
+ * Class PluginSilentUpgraderSkin.
10
+ *
11
+ * @internal Please do not use this class outside of core WPForms development. May be removed at any time.
12
+ *
13
+ * @since 1.5.6.1
14
+ */
15
+ class PluginSilentUpgraderSkin extends \WP_Upgrader_Skin {
16
+
17
+ /**
18
+ * Empty out the header of its HTML content and only check to see if it has
19
+ * been performed or not.
20
+ *
21
+ * @since 1.5.6.1
22
+ */
23
+ public function header() {
24
+ }
25
+
26
+ /**
27
+ * Empty out the footer of its HTML contents.
28
+ *
29
+ * @since 1.5.6.1
30
+ */
31
+ public function footer() {
32
+ }
33
+
34
+ /**
35
+ * Instead of outputting HTML for errors, just return them.
36
+ * Ajax request will just ignore it.
37
+ *
38
+ * @since 1.5.6.1
39
+ *
40
+ * @param array $errors Array of errors with the install process.
41
+ *
42
+ * @return array
43
+ */
44
+ public function error( $errors ) {
45
+ return $errors;
46
+ }
47
+
48
+ /**
49
+ * Empty out JavaScript output that calls function to decrement the update counts.
50
+ *
51
+ * @since 1.5.6.1
52
+ *
53
+ * @param string $type Type of update count to decrement.
54
+ */
55
+ public function decrement_update_count( $type ) {
56
+ }
57
+ }
inc/admin/actions.php CHANGED
@@ -1,1075 +1,1075 @@
1
- <?php
2
- /**
3
- * Includes functions related to actions while in the admin area.
4
- *
5
- * - All AJAX related features
6
- * - Enqueueing of JS and CSS files
7
- * - Settings link on "Plugins" page
8
- * - Creation of local avatar image files
9
- * - Connecting accounts on the "Configure" tab
10
- * - Displaying admin notices
11
- * - Clearing caches
12
- */
13
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
-
15
- function sb_instagram_admin_style() {
16
- wp_register_style( 'sb_instagram_admin_css', SBI_PLUGIN_URL . 'css/sb-instagram-admin.css', array(), SBIVER );
17
- wp_enqueue_style( 'sb_instagram_font_awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );
18
- wp_enqueue_style( 'sb_instagram_admin_css' );
19
- wp_enqueue_style( 'wp-color-picker' );
20
- }
21
- add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_style' );
22
-
23
- function sb_instagram_admin_scripts() {
24
- wp_enqueue_script( 'sb_instagram_admin_js', SBI_PLUGIN_URL . 'js/sb-instagram-admin-2-2.js', array(), SBIVER );
25
- wp_localize_script( 'sb_instagram_admin_js', 'sbiA', array(
26
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
27
- 'sbi_nonce' => wp_create_nonce( 'sbi_nonce' )
28
- )
29
- );
30
- $strings = array(
31
- 'addon_activate' => esc_html__( 'Activate', 'instagram-feed' ),
32
- 'addon_activated' => esc_html__( 'Activated', 'instagram-feed' ),
33
- 'addon_active' => esc_html__( 'Active', 'instagram-feed' ),
34
- 'addon_deactivate' => esc_html__( 'Deactivate', 'instagram-feed' ),
35
- 'addon_inactive' => esc_html__( 'Inactive', 'instagram-feed' ),
36
- 'addon_install' => esc_html__( 'Install Addon', 'instagram-feed' ),
37
- 'addon_error' => esc_html__( 'Could not install addon. Please download from wpforms.com and install manually.', 'instagram-feed' ),
38
- 'plugin_error' => esc_html__( 'Could not install a plugin. Please download from WordPress.org and install manually.', 'instagram-feed' ),
39
- 'addon_search' => esc_html__( 'Searching Addons', 'instagram-feed' ),
40
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
41
- 'cancel' => esc_html__( 'Cancel', 'instagram-feed' ),
42
- 'close' => esc_html__( 'Close', 'instagram-feed' ),
43
- 'nonce' => wp_create_nonce( 'sbi-admin' ),
44
- 'almost_done' => esc_html__( 'Almost Done', 'instagram-feed' ),
45
- 'oops' => esc_html__( 'Oops!', 'instagram-feed' ),
46
- 'ok' => esc_html__( 'OK', 'instagram-feed' ),
47
- 'plugin_install_activate_btn' => esc_html__( 'Install and Activate', 'instagram-feed' ),
48
- 'plugin_install_activate_confirm' => esc_html__( 'needs to be installed and activated to import its forms. Would you like us to install and activate it for you?', 'instagram-feed' ),
49
- 'plugin_activate_btn' => esc_html__( 'Activate', 'instagram-feed' ),
50
- );
51
- $strings = apply_filters( 'sbi_admin_strings', $strings );
52
-
53
- wp_localize_script(
54
- 'sb_instagram_admin_js',
55
- 'sbi_admin',
56
- $strings
57
- );
58
- if( !wp_script_is('jquery-ui-draggable') ) {
59
- wp_enqueue_script(
60
- array(
61
- 'jquery',
62
- 'jquery-ui-core',
63
- 'jquery-ui-draggable'
64
- )
65
- );
66
- }
67
- wp_enqueue_script(
68
- array(
69
- 'hoverIntent',
70
- 'wp-color-picker'
71
- )
72
- );
73
- }
74
- add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_scripts' );
75
-
76
- // Add a Settings link to the plugin on the Plugins page
77
- $sbi_plugin_file = 'instagram-feed/instagram-feed.php';
78
- add_filter( "plugin_action_links_{$sbi_plugin_file}", 'sbi_add_settings_link', 10, 2 );
79
-
80
- //modify the link by unshifting the array
81
- function sbi_add_settings_link( $links, $file ) {
82
- $pro_link = '<a href="https://smashballoon.com/instagram-feed/demo/?utm_campaign=instagram-free&utm_source=plugins-page&utm_medium=upgrade-link" target="_blank" style="font-weight: bold; color: #1da867;">' . __( 'Try the Pro Demo', 'instagram-feed' ) . '</a>';
83
-
84
- $sbi_settings_link = '<a href="' . admin_url( 'admin.php?page=sb-instagram-feed' ) . '">' . __( 'Settings', 'instagram-feed' ) . '</a>';
85
- array_unshift( $links, $pro_link, $sbi_settings_link );
86
-
87
- return $links;
88
- }
89
-
90
-
91
- /**
92
- * Called via ajax to automatically save access token and access token secret
93
- * retrieved with the big blue button
94
- */
95
- function sbi_auto_save_tokens() {
96
- $nonce = $_POST['sbi_nonce'];
97
-
98
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
99
- die ( 'You did not do this the right way!' );
100
- }
101
-
102
- wp_cache_delete ( 'alloptions', 'options' );
103
-
104
- $options = sbi_get_database_settings();
105
- $new_access_token = isset( $_POST['access_token'] ) ? sanitize_text_field( $_POST['access_token'] ) : false;
106
- $split_token = $new_access_token ? explode( '.', $new_access_token ) : array();
107
- $new_user_id = isset( $split_token[0] ) ? $split_token[0] : '';
108
-
109
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
110
- $test_connection_data = sbi_account_data_for_token( $new_access_token );
111
-
112
- $connected_accounts[ $new_user_id ] = array(
113
- 'access_token' => sbi_get_parts( $new_access_token ),
114
- 'user_id' => $test_connection_data['id'],
115
- 'username' => $test_connection_data['username'],
116
- 'is_valid' => $test_connection_data['is_valid'],
117
- 'last_checked' => $test_connection_data['last_checked'],
118
- 'profile_picture' => $test_connection_data['profile_picture'],
119
- );
120
-
121
- if ( !$options['sb_instagram_disable_resize'] ) {
122
- if ( sbi_create_local_avatar( $test_connection_data['username'], $test_connection_data['profile_picture'] ) ) {
123
- $connected_accounts[ $new_user_id ]['local_avatar'] = true;
124
- }
125
- } else {
126
- $connected_accounts[ $new_user_id ]['local_avatar'] = false;
127
- }
128
-
129
- $options['connected_accounts'] = $connected_accounts;
130
-
131
- update_option( 'sb_instagram_settings', $options );
132
-
133
- echo sbi_json_encode( $connected_accounts[ $new_user_id ] );
134
-
135
- die();
136
- }
137
- add_action( 'wp_ajax_sbi_auto_save_tokens', 'sbi_auto_save_tokens' );
138
-
139
- function sbi_delete_local_avatar( $username ) {
140
- $upload = wp_upload_dir();
141
-
142
- $image_files = glob( trailingslashit( $upload['basedir'] ) . trailingslashit( SBI_UPLOADS_NAME ) . $username . '.jpg' ); // get all matching images
143
- foreach ( $image_files as $file ) { // iterate files
144
- if ( is_file( $file ) ) {
145
- unlink( $file );
146
- }
147
- }
148
- }
149
-
150
- function sbi_connect_business_accounts() {
151
- $nonce = $_POST['sbi_nonce'];
152
-
153
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
154
- die ( 'You did not do this the right way!' );
155
- }
156
-
157
- $accounts = isset( $_POST['accounts'] ) ? json_decode( stripslashes( $_POST['accounts'] ), true ) : false;
158
-
159
- $return = array();
160
- foreach ( $accounts as $account ) {
161
- $account['type'] = 'business';
162
-
163
- $connector = new SBI_Account_Connector();
164
-
165
- $connector->add_account_data( $account );
166
- if ( $connector->update_stored_account() ) {
167
- $connector->after_update();
168
-
169
- $return[ $connector->get_id() ] = $connector->get_account_data();
170
- }
171
- }
172
-
173
- echo sbi_json_encode( $return );
174
-
175
- die();
176
- }
177
- add_action( 'wp_ajax_sbi_connect_business_accounts', 'sbi_connect_business_accounts' );
178
-
179
- function sbi_auto_save_id() {
180
- $nonce = $_POST['sbi_nonce'];
181
-
182
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
183
- die ( 'You did not do this the right way!' );
184
- }
185
- if ( current_user_can( 'edit_posts' ) && isset( $_POST['id'] ) ) {
186
- $options = get_option( 'sb_instagram_settings', array() );
187
-
188
- $options['sb_instagram_user_id'] = array( sanitize_text_field( $_POST['id'] ) );
189
-
190
- update_option( 'sb_instagram_settings', $options );
191
- }
192
- die();
193
- }
194
- add_action( 'wp_ajax_sbi_auto_save_id', 'sbi_auto_save_id' );
195
-
196
- function sbi_formatted_error( $response ) {
197
- if ( isset( $response['error'] ) ) {
198
- $error = '<p>' . sprintf( __( 'API error %s:', 'instagram-feed' ), $response['error']['code'] ) . ' ' . $response['error']['message'] . '</p>';
199
- $error .= '<p class="sbi-error-directions"><a href="https://smashballoon.com/instagram-feed/docs/errors/" target="_blank" rel="noopener">' . __( 'Directions on how to resolve this issue', 'instagram-feed' ) . '</a></p>';
200
-
201
- return $error;
202
- } else {
203
- $message = '<p>' . sprintf( __( 'Error connecting to %s.', 'instagram-feed' ), $response['url'] ). '</p>';
204
- if ( isset( $response['response'] ) && isset( $response['response']->errors ) ) {
205
- foreach ( $response['response']->errors as $key => $item ) {
206
- '<p>' .$message .= ' '.$key . ' - ' . $item[0] . '</p>';
207
- }
208
- }
209
- $message .= '<p class="sbi-error-directions"><a href="https://smashballoon.com/instagram-feed/docs/errors/" target="_blank" rel="noopener">' . __( 'Directions on how to resolve this issue', 'instagram-feed' ) . '</a></p>';
210
-
211
- return $message;
212
- }
213
- }
214
-
215
- function sbi_test_token() {
216
- $access_token = isset( $_POST['access_token'] ) ? trim( sanitize_text_field( $_POST['access_token'] ) ) : false;
217
- $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( $_POST['account_id'] ) : false;
218
-
219
- $return = sbi_connect_new_account( $access_token, $account_id );
220
-
221
- echo $return;
222
- die();
223
- }
224
- add_action( 'wp_ajax_sbi_test_token', 'sbi_test_token' );
225
-
226
- function sbi_delete_account() {
227
- $nonce = $_POST['sbi_nonce'];
228
-
229
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
230
- die ( 'You did not do this the right way!' );
231
- }
232
- $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( $_POST['account_id'] ) : false;
233
-
234
- sbi_do_account_delete( $account_id );
235
-
236
- die();
237
- }
238
- add_action( 'wp_ajax_sbi_delete_account', 'sbi_delete_account' );
239
-
240
- function sbi_account_data_for_token( $access_token ) {
241
- $return = array(
242
- 'id' => false,
243
- 'username' => false,
244
- 'is_valid' => false,
245
- 'last_checked' => time()
246
- );
247
- $url = 'https://api.instagram.com/v1/users/self/?access_token=' . sbi_maybe_clean( $access_token );
248
- $args = array(
249
- 'timeout' => 60,
250
- 'sslverify' => false
251
- );
252
- $result = wp_remote_get( $url, $args );
253
-
254
- if ( ! is_wp_error( $result ) ) {
255
- $data = json_decode( $result['body'] );
256
- } else {
257
- $data = array();
258
- }
259
-
260
- if ( isset( $data->data->id ) ) {
261
- $return['id'] = $data->data->id;
262
- $return['username'] = $data->data->username;
263
- $return['is_valid'] = true;
264
- $return['profile_picture'] = $data->data->profile_picture;
265
-
266
- } elseif ( isset( $data->error_type ) && $data->error_type === 'OAuthRateLimitException' ) {
267
- $return['error_message'] = 'This account\'s access token is currently over the rate limit. Try removing this access token from all feeds and wait an hour before reconnecting.';
268
- } else {
269
- $return = false;
270
- }
271
-
272
- $sbi_options = get_option( 'sb_instagram_settings', array() );
273
- $sbi_options['sb_instagram_at'] = '';
274
- update_option( 'sb_instagram_settings', $sbi_options );
275
-
276
- return $return;
277
- }
278
-
279
- function sbi_do_account_delete( $account_id ) {
280
- $options = get_option( 'sb_instagram_settings', array() );
281
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
282
- global $sb_instagram_posts_manager;
283
- $sb_instagram_posts_manager->reset_api_errors();
284
- wp_cache_delete ( 'alloptions', 'options' );
285
- $username = $connected_accounts[ $account_id ]['username'];
286
- $sb_instagram_posts_manager->add_action_log( 'Deleting account ' . $username );
287
-
288
- $num_times_used = 0;
289
-
290
- $new_con_accounts = array();
291
- foreach ( $connected_accounts as $connected_account ) {
292
-
293
- if ( $connected_account['username'] === $username ) {
294
- $num_times_used++;
295
- }
296
-
297
- if ( $connected_account['username'] !== '' && $account_id !== $connected_account['user_id'] && ! empty( $connected_account['user_id'] ) ) {
298
- $new_con_accounts[ $connected_account['user_id'] ] = $connected_account;
299
- }
300
- }
301
-
302
- if ( $num_times_used < 2 ) {
303
- sbi_delete_local_avatar( $username );
304
- }
305
-
306
- $options['connected_accounts'] = $new_con_accounts;
307
-
308
- update_option( 'sb_instagram_settings', $options );
309
- }
310
-
311
- function sbi_connect_new_account( $access_token, $account_id ) {
312
- $split_id = explode( ' ', trim( $account_id ) );
313
- $account_id = preg_replace("/[^A-Za-z0-9 ]/", '', $split_id[0] );
314
- if ( ! empty( $account_id ) ) {
315
- $split_token = explode( ' ', trim( $access_token ) );
316
- $access_token = preg_replace("/[^A-Za-z0-9 ]/", '', $split_token[0] );
317
- }
318
-
319
- $account = array(
320
- 'access_token' => $access_token,
321
- 'user_id' => $account_id,
322
- 'type' => 'business'
323
- );
324
-
325
- if ( sbi_code_check( $access_token ) ) {
326
- $account['type'] = 'basic';
327
- }
328
-
329
- $connector = new SBI_Account_Connector();
330
-
331
- $response = $connector->fetch( $account );
332
-
333
- if ( isset( $response['access_token'] ) ) {
334
- $connector->add_account_data( $response );
335
- $connector->update_stored_account();
336
- $connector->after_update();
337
- return sbi_json_encode( $connector->get_account_data() );
338
- } else {
339
- return $response['error'];
340
- }
341
- }
342
-
343
- function sbi_no_js_connected_account_management() {
344
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
345
- return;
346
- }
347
- if ( isset( $_POST['sb_manual_at'] ) ) {
348
- $access_token = isset( $_POST['sb_manual_at'] ) ? trim( sanitize_text_field( $_POST['sb_manual_at'] ) ) : false;
349
- $account_id = isset( $_POST['sb_manual_account_id'] ) ? sanitize_text_field( $_POST['sb_manual_account_id'] ) : false;
350
- if ( ! $access_token || ! $account_id ) {
351
- return;
352
- }
353
- sbi_connect_new_account( $access_token, $account_id );
354
- } elseif ( isset( $_GET['disconnect'] ) && isset( $_GET['page'] ) && $_GET['page'] === 'sb-instagram-feed' ) {
355
- $account_id = sanitize_text_field( $_GET['disconnect'] );
356
- sbi_do_account_delete( $account_id );
357
- }
358
-
359
- }
360
- add_action( 'admin_init', 'sbi_no_js_connected_account_management' );
361
-
362
- function sbi_get_connected_accounts_data( $sb_instagram_at ) {
363
- $sbi_options = get_option( 'sb_instagram_settings' );
364
- $return = array();
365
- $return['connected_accounts'] = isset( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
366
-
367
- if ( ! empty( $return['connected_accounts'] ) ) {
368
- $return['access_token'] = '';
369
- } else {
370
- $return['access_token'] = $sb_instagram_at;
371
- }
372
-
373
- if ( ! sbi_is_after_deprecation_deadline() && empty( $connected_accounts ) && ! empty( $sb_instagram_at ) ) {
374
- $tokens = explode(',', $sb_instagram_at );
375
- $user_ids = array();
376
-
377
- foreach ( $tokens as $token ) {
378
- $account = sbi_account_data_for_token( $token );
379
- if ( isset( $account['is_valid'] ) ) {
380
- $split = explode( '.', $token );
381
- $return['connected_accounts'][ $split[0] ] = array(
382
- 'access_token' => sbi_get_parts( $token ),
383
- 'user_id' => $split[0],
384
- 'username' => '',
385
- 'is_valid' => true,
386
- 'last_checked' => time(),
387
- 'profile_picture' => ''
388
- );
389
- $user_ids[] = $split[0];
390
- }
391
-
392
- }
393
-
394
- $sbi_options['connected_accounts'] = $return['connected_accounts'];
395
- $sbi_options['sb_instagram_at'] = '';
396
- $sbi_options['sb_instagram_user_id'] = $user_ids;
397
-
398
- $return['user_ids'] = $user_ids;
399
-
400
- update_option( 'sb_instagram_settings', $sbi_options );
401
- }
402
-
403
- return $return;
404
- }
405
-
406
- function sbi_connect_basic_account( $new_account_details ) {
407
-
408
- $options = sbi_get_database_settings();
409
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
410
-
411
- $accounts_to_save = array();
412
- $old_account_user_id = '';
413
- $ids_to_save = array();
414
- $user_ids = is_array( $options[ 'sb_instagram_user_id' ] ) ? $options[ 'sb_instagram_user_id' ] : explode( ',', str_replace( ' ', '', $options[ 'sb_instagram_user_id' ] ) );
415
-
416
- $profile_picture = '';
417
-
418
- // do not connect as a basic display account if already connected as a business account
419
- if ( isset( $connected_accounts[ $new_account_details['user_id'] ] )
420
- && isset( $connected_accounts[ $new_account_details['user_id'] ]['type'] )
421
- && $connected_accounts[ $new_account_details['user_id'] ]['type'] === 'business' ) {
422
- return $options;
423
- }
424
-
425
- foreach ( $connected_accounts as $account ) {
426
- $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
427
- if ( ($account['username'] !== $new_account_details['username'])
428
- || $account_type === 'business' ) {
429
- $accounts_to_save[ $account['user_id'] ] = $account;
430
- } else {
431
- $old_account_user_id = $account['user_id'];
432
- $profile_picture = isset( $account['profile_picture'] ) ? $account['profile_picture'] : '';
433
- }
434
- }
435
-
436
- foreach ( $user_ids as $id ) {
437
- if ( $id === $old_account_user_id ) {
438
- $ids_to_save[] = $new_account_details['user_id'];
439
- } else {
440
- $ids_to_save[] = $id;
441
- }
442
- }
443
-
444
- $accounts_to_save[ $new_account_details['user_id'] ] = array(
445
- 'access_token' => sbi_fixer( $new_account_details['access_token'] ),
446
- 'user_id' => $new_account_details['user_id'],
447
- 'username' => $new_account_details['username'],
448
- 'is_valid' => true,
449
- 'last_checked' => time(),
450
- 'expires_timestamp' => $new_account_details['expires_timestamp'],
451
- 'profile_picture' => $profile_picture,
452
- 'account_type' => strtolower( $new_account_details['account_type'] ),
453
- 'type' => 'basic',
454
- );
455
-
456
- if ( ! empty( $old_account_user_id ) && $old_account_user_id !== $new_account_details['user_id'] ) {
457
- $accounts_to_save[ $new_account_details['user_id'] ]['old_user_id'] = $old_account_user_id;
458
-
459
- // get last saved header data
460
- $fuzzy_matches = sbi_fuzzy_matching_header_data( $old_account_user_id );
461
- if ( ! empty( $fuzzy_matches[0] ) ) {
462
- $header_data = sbi_find_matching_data_from_results( $fuzzy_matches, $old_account_user_id );
463
- $bio = SB_Instagram_Parse::get_bio( $header_data );
464
- $accounts_to_save[ $new_account_details['user_id'] ]['bio'] = sbi_sanitize_emoji( $bio );
465
- }
466
-
467
- }
468
-
469
- if ( ! empty( $profile_picture ) && !$options['sb_instagram_disable_resize'] ) {
470
- if ( sbi_create_local_avatar( $new_account_details['username'], $profile_picture ) ) {
471
- $accounts_to_save[ $new_account_details['user_id'] ]['local_avatar'] = true;
472
- }
473
- } else {
474
- $accounts_to_save[ $new_account_details['user_id'] ]['local_avatar'] = false;
475
- }
476
-
477
- delete_transient( SBI_USE_BACKUP_PREFIX . 'sbi_' . $new_account_details['user_id'] );
478
- $refresher = new SB_Instagram_Token_Refresher( $accounts_to_save[ $new_account_details['user_id'] ] );
479
- $refresher->attempt_token_refresh();
480
-
481
- if ( $refresher->get_last_error_code() === 10 ) {
482
- $accounts_to_save[ $new_account_details['user_id'] ]['private'] = true;
483
- }
484
-
485
- $options['connected_accounts'] = $accounts_to_save;
486
- $options['sb_instagram_user_id'] = $ids_to_save;
487
-
488
- update_option( 'sb_instagram_settings', $options );
489
- //global $sb_instagram_posts_manager;
490
-
491
- //$sb_instagram_posts_manager->remove_all_errors();
492
- return $options;
493
- }
494
-
495
- function sbi_fuzzy_matching_header_data( $user_id ) {
496
-
497
- if ( empty( $user_id ) || strlen( $user_id ) < 4 ) {
498
- return array();
499
- }
500
- global $wpdb;
501
- $escaped_id = esc_sql( $user_id );
502
-
503
- $values = $wpdb->get_results( "
504
- SELECT option_value
505
- FROM $wpdb->options
506
- WHERE option_name LIKE ('%!sbi\_header\_".$escaped_id."%')
507
- LIMIT 10", ARRAY_A );
508
-
509
- $regular_values = $wpdb->get_results( "
510
- SELECT option_value
511
- FROM $wpdb->options
512
- WHERE option_name LIKE ('%sbi\_header\_".$escaped_id."%')
513
- LIMIT 10", ARRAY_A );
514
-
515
- $values = array_merge( $values, $regular_values );
516
-
517
- return $values;
518
- }
519
-
520
- function sbi_find_matching_data_from_results( $results, $user_id ) {
521
-
522
- $match = array();
523
-
524
- $i = 0;
525
-
526
- while( empty( $match ) && isset( $results[ $i ] ) ) {
527
- if ( ! empty( $results[ $i ] ) ) {
528
- $header_data = json_decode( $results[ $i ]['option_value'], true );
529
- if ( isset( $header_data['id'] ) && (string)$header_data['id'] === (string)$user_id ) {
530
- $match = $header_data;
531
- }
532
- }
533
- $i++;
534
- }
535
-
536
- return $match;
537
- }
538
-
539
- function sbi_matches_existing_personal( $new_account_details ) {
540
-
541
- $options = sbi_get_database_settings();
542
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
543
-
544
- $matches_one_account = false;
545
- foreach ( $connected_accounts as $account ) {
546
- $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
547
- if ( ($account_type === 'personal' || $account_type === 'basic')
548
- && $account['username'] == $new_account_details['username'] ) {
549
- $matches_one_account = true;
550
- }
551
- }
552
-
553
- return $matches_one_account;
554
-
555
- }
556
-
557
- function sbi_business_account_request( $url, $account, $remove_access_token = true ) {
558
- $args = array(
559
- 'timeout' => 60,
560
- 'sslverify' => false
561
- );
562
- $result = wp_remote_get( $url, $args );
563
-
564
- if ( ! is_wp_error( $result ) ) {
565
- $response_no_at = $remove_access_token ? str_replace( sbi_maybe_clean( $account['access_token'] ), '{accesstoken}', $result['body'] ) : $result['body'];
566
- return $response_no_at;
567
- } else {
568
- return sbi_json_encode( $result );
569
- }
570
- }
571
-
572
- function sbi_after_connection() {
573
-
574
- if ( isset( $_POST['access_token'] ) ) {
575
- $access_token = sanitize_text_field( $_POST['access_token'] );
576
- $account_info = sbi_account_data_for_token( $access_token );
577
- echo sbi_json_encode( $account_info );
578
- }
579
-
580
- die();
581
- }
582
- add_action( 'wp_ajax_sbi_after_connection', 'sbi_after_connection' );
583
-
584
- function sbi_get_business_account_connection_modal($sb_instagram_user_id) {
585
- $access_token = sbi_maybe_clean(urldecode($_GET['sbi_access_token']));
586
- //
587
- $url = 'https://graph.facebook.com/me/accounts?fields=instagram_business_account,access_token&limit=500&access_token='.$access_token;
588
- $args = array(
589
- 'timeout' => 60,
590
- 'sslverify' => false
591
- );
592
- $result = wp_remote_get( $url, $args );
593
- $pages_data = '{}';
594
- if ( ! is_wp_error( $result ) ) {
595
- $pages_data = $result['body'];
596
- } else {
597
- $page_error = $result;
598
- }
599
-
600
- $pages_data_arr = json_decode($pages_data);
601
- $num_accounts = 0;
602
- if(isset($pages_data_arr)){
603
- $num_accounts = is_array( $pages_data_arr->data ) ? count( $pages_data_arr->data ) : 0;
604
- }
605
- ?>
606
- <div id="sbi_config_info" class="sb_list_businesses sbi_num_businesses_<?php echo $num_accounts; ?>">
607
- <div class="sbi_config_modal">
608
- <div class="sbi-managed-pages">
609
- <?php if ( isset( $page_error ) && isset( $page_error->errors ) ) {
610
- foreach ($page_error->errors as $key => $item) {
611
- echo '<div class="sbi_user_id_error" style="display:block;"><strong>Connection Error: </strong>' . $key . ': ' . $item[0] . '</div>';
612
- }
613
- }
614
- ?>
615
- <?php if( empty($pages_data_arr->data) ) : ?>
616
- <span id="sbi-bus-account-error">
617
- <p style="margin-top: 5px;"><b style="font-size: 16px">Couldn't find Business Profile</b><br />
618
- Uh oh. It looks like this Facebook account is not currently connected to an Instagram Business profile. Please check that you are logged into the <a href="https://www.facebook.com/" target="_blank">Facebook account</a> in this browser which is associated with your Instagram Business Profile.</p>
619
- <p><b style="font-size: 16px">Why do I need a Business Profile?</b><br />
620
- A Business Profile is only required if you are displaying a Hashtag feed. If you want to display a regular User feed then you can do this by selecting to connect a Personal account instead. For directions on how to convert your Personal profile into a Business profile please <a href="https://smashballoon.com/instagram-business-profiles" target="_blank">see here</a>.</p>
621
- </span>
622
-
623
- <?php elseif ( $num_accounts === 0 ): ?>
624
- <span id="sbi-bus-account-error">
625
- <p style="margin-top: 5px;"><b style="font-size: 16px">Couldn't find Business Profile</b><br />
626
- Uh oh. It looks like this Facebook account is not currently connected to an Instagram Business profile. Please check that you are logged into the <a href="https://www.facebook.com/" target="_blank">Facebook account</a> in this browser which is associated with your Instagram Business Profile.</p>
627
- <p>If you are, in fact, logged-in to the correct account please make sure you have Instagram accounts connected with your Facebook account by following <a href="https://smashballoon.com/reconnecting-an-instagram-business-profile/" target="_blank">this FAQ</a></p>
628
- </span>
629
- <?php else: ?>
630
- <p class="sbi-managed-page-intro"><b style="font-size: 16px;">Instagram Business profiles for this account</b><br /><i style="color: #666;">Note: In order to display a Hashtag feed you first need to select a Business profile below.</i></p>
631
- <?php if ( $num_accounts > 1 ) : ?>
632
- <div class="sbi-managed-page-select-all"><input type="checkbox" id="sbi-select-all" class="sbi-select-all"><label for="sbi-select-all">Select All</label></div>
633
- <?php endif; ?>
634
- <div class="sbi-scrollable-accounts">
635
-
636
- <?php foreach ( $pages_data_arr->data as $page => $page_data ) : ?>
637
-
638
- <?php if( isset( $page_data->instagram_business_account ) ) :
639
-
640
- $instagram_business_id = $page_data->instagram_business_account->id;
641
-
642
- $page_access_token = isset( $page_data->access_token ) ? $page_data->access_token : '';
643
-
644
- //Make another request to get page info
645
- $instagram_account_url = 'https://graph.facebook.com/'.$instagram_business_id.'?fields=name,username,profile_picture_url&access_token='.$access_token;
646
-
647
- $args = array(
648
- 'timeout' => 60,
649
- 'sslverify' => false
650
- );
651
- $result = wp_remote_get( $instagram_account_url, $args );
652
- $instagram_account_info = '{}';
653
- if ( ! is_wp_error( $result ) ) {
654
- $instagram_account_info = $result['body'];
655
- } else {
656
- $page_error = $result;
657
- }
658
-
659
- $instagram_account_data = json_decode($instagram_account_info);
660
-
661
- $instagram_biz_img = isset( $instagram_account_data->profile_picture_url ) ? $instagram_account_data->profile_picture_url : false;
662
- $selected_class = $instagram_business_id == $sb_instagram_user_id ? ' sbi-page-selected' : '';
663
-
664
- ?>
665
- <?php if ( isset( $page_error ) && isset( $page_error->errors ) ) :
666
- foreach ($page_error->errors as $key => $item) {
667
- echo '<div class="sbi_user_id_error" style="display:block;"><strong>Connection Error: </strong>' . $key . ': ' . $item[0] . '</div>';
668
- }
669
- else : ?>
670
- <div class="sbi-managed-page<?php echo $selected_class; ?>" data-page-token="<?php echo esc_attr( $page_access_token ); ?>" data-token="<?php echo esc_attr( $access_token ); ?>" data-page-id="<?php echo esc_attr( $instagram_business_id ); ?>">
671
- <div class="sbi-add-checkbox">
672
- <input id="sbi-<?php echo esc_attr( $instagram_business_id ); ?>" type="checkbox" name="sbi_managed_pages[]" value="<?php echo esc_attr( $instagram_account_info ); ?>">
673
- </div>
674
- <div class="sbi-managed-page-details">
675
- <label for="sbi-<?php echo esc_attr( $instagram_business_id ); ?>"><img class="sbi-page-avatar" border="0" height="50" width="50" src="<?php echo esc_url( $instagram_biz_img ); ?>"><b style="font-size: 16px;"><?php echo esc_html( $instagram_account_data->name ); ?></b>
676
- <br />@<?php echo esc_html( $instagram_account_data->username); ?><span style="font-size: 11px; margin-left: 5px;">(<?php echo esc_html( $instagram_business_id ); ?>)</span></label>
677
- </div>
678
- </div>
679
- <?php endif; ?>
680
-
681
- <?php endif; ?>
682
-
683
- <?php endforeach; ?>
684
-
685
- </div> <!-- end scrollable -->
686
- <p style="font-size: 11px; line-height: 1.5; margin-bottom: 0;"><i style="color: #666;">*<?php echo sprintf( __( 'Changing the password, updating privacy settings, or removing page admins for the related Facebook page may require %smanually reauthorizing our app%s to reconnect an account.', 'instagram-feed' ), '<a href="https://smashballoon.com/reauthorizing-our-instagram-facebook-app/" target="_blank" rel="noopener noreferrer">', '</a>' ); ?></i></p>
687
-
688
- <button id="sbi-connect-business-accounts" class="button button-primary" disabled="disabled" style="margin-top: 20px;"><?php _e( 'Connect Accounts', 'instagram-feed' ); ?></button>
689
-
690
- <?php endif; ?>
691
-
692
- <a href="JavaScript:void(0);" class="sbi_modal_close"><i class="fa fa-times"></i></a>
693
- </div>
694
- </div>
695
- </div><?php
696
- }
697
-
698
- function sbi_get_personal_connection_modal( $connected_accounts, $action_url = 'admin.php?page=sb-instagram-feed' ) {
699
- $access_token = sanitize_text_field( $_GET['sbi_access_token'] );
700
- $account_type = sanitize_text_field( $_GET['sbi_account_type'] );
701
- $user_id = sanitize_text_field( $_GET['sbi_id'] );
702
- $user_name = sanitize_text_field( $_GET['sbi_username'] );
703
- $expires_in = (int)$_GET['sbi_expires_in'];
704
- $expires_timestamp = time() + $expires_in;
705
-
706
- $new_account_details = array(
707
- 'access_token' => $access_token,
708
- 'account_type' => $account_type,
709
- 'user_id' => $user_id,
710
- 'username' => $user_name,
711
- 'expires_timestamp' => $expires_timestamp,
712
- 'profile_picture' => '',
713
- 'type' => 'basic'
714
- );
715
-
716
-
717
- $matches_existing_personal = sbi_matches_existing_personal( $new_account_details );
718
- $button_text = $matches_existing_personal ? __( 'Update This Account', 'instagram-feed' ) : __( 'Connect This Account', 'instagram-feed' );
719
-
720
- $account_json = sbi_json_encode( $new_account_details );
721
-
722
- $already_connected_as_business_account = (isset( $connected_accounts[ $user_id ] ) && $connected_accounts[ $user_id ]['type'] === 'business');
723
-
724
- ?>
725
-
726
- <div id="sbi_config_info" class="sb_get_token">
727
- <div class="sbi_config_modal">
728
- <div class="sbi_ca_username"><strong><?php echo esc_html( $user_name ); ?></strong></div>
729
- <form action="<?php echo admin_url( $action_url ); ?>" method="post">
730
- <p class="sbi_submit">
731
- <?php if ( $already_connected_as_business_account ) :
732
- _e( 'The Instagram account you are logged into is already connected as a "business" account. Remove the business account if you\'d like to connect as a basic account instead (not recommended).', 'instagram-feed' );
733
- ?>
734
- <?php else : ?>
735
- <input type="submit" name="sbi_submit" id="sbi_connect_account" class="button button-primary" value="<?php echo esc_html( $button_text ); ?>">
736
- <?php endif; ?>
737
- <input type="hidden" name="sbi_account_json" value="<?php echo esc_attr( $account_json ) ; ?>">
738
- <input type="hidden" name="sbi_connect_username" value="<?php echo esc_attr( $user_name ); ?>">
739
- <a href="JavaScript:void(0);" class="button button-secondary" id="sbi_switch_accounts"><?php esc_html_e( 'Switch Accounts', 'instagram-feed' ); ?></a>
740
- </p>
741
- </form>
742
- <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
743
- </div>
744
- </div>
745
- <?php
746
- }
747
-
748
- function sbi_account_type_display( $type, $private = false ) {
749
- if ( $type === 'basic' ) {
750
- $type = 'personal';
751
- if ( $private ) {
752
- $type .= ' (private)';
753
- }
754
- }
755
- return $type;
756
- }
757
-
758
- function sbi_clear_backups() {
759
- $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
760
-
761
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
762
- die ( 'You did not do this the right way!' );
763
- }
764
-
765
- //Delete all transients
766
- global $wpdb;
767
- $table_name = $wpdb->prefix . "options";
768
- $wpdb->query( "
769
- DELETE
770
- FROM $table_name
771
- WHERE `option_name` LIKE ('%!sbi\_%')
772
- " );
773
- $wpdb->query( "
774
- DELETE
775
- FROM $table_name
776
- WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
777
- " );
778
- $wpdb->query( "
779
- DELETE
780
- FROM $table_name
781
- WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
782
- " );
783
-
784
- die();
785
- }
786
- add_action( 'wp_ajax_sbi_clear_backups', 'sbi_clear_backups' );
787
-
788
- function sbi_reset_resized() {
789
-
790
- global $sb_instagram_posts_manager;
791
- $sb_instagram_posts_manager->delete_all_sbi_instagram_posts();
792
- delete_option( 'sbi_top_api_calls' );
793
-
794
- $sb_instagram_posts_manager->add_action_log( 'Reset resizing tables.' );
795
-
796
- echo "1";
797
-
798
- die();
799
- }
800
- add_action( 'wp_ajax_sbi_reset_resized', 'sbi_reset_resized' );
801
-
802
- function sbi_reset_log() {
803
- global $sb_instagram_posts_manager;
804
-
805
- $sb_instagram_posts_manager->remove_all_errors();
806
-
807
- echo "1";
808
-
809
- die();
810
- }
811
- add_action( 'wp_ajax_sbi_reset_log', 'sbi_reset_log' );
812
-
813
- function sbi_reset_api_errors() {
814
- global $sb_instagram_posts_manager;
815
- $sb_instagram_posts_manager->add_action_log( 'View feed and retry button clicked.' );
816
-
817
- $sb_instagram_posts_manager->reset_api_errors();
818
-
819
- echo "1";
820
-
821
- die();
822
- }
823
- add_action( 'wp_ajax_sbi_reset_api_errors', 'sbi_reset_api_errors' );
824
-
825
- function sbi_lite_dismiss() {
826
- $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
827
-
828
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
829
- die ( 'You did not do this the right way!' );
830
- }
831
-
832
- set_transient( 'instagram_feed_dismiss_lite', 'dismiss', 1 * WEEK_IN_SECONDS );
833
-
834
- die();
835
- }
836
- add_action( 'wp_ajax_sbi_lite_dismiss', 'sbi_lite_dismiss' );
837
-
838
- add_action('admin_notices', 'sbi_admin_error_notices');
839
- function sbi_admin_error_notices() {
840
-
841
- if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' )) ) {
842
-
843
- global $sb_instagram_posts_manager;
844
-
845
- $errors = $sb_instagram_posts_manager->get_errors();
846
- if ( ! empty( $errors ) && (! empty( $errors['database_create'] ) || ! empty( $errors['upload_dir'] )) ) : ?>
847
- <div class="notice notice-warning is-dismissible sbi-admin-notice">
848
- <?php if ( ! empty( $errors['database_create'] ) ) echo '<p>' . $errors['database_create'] . '</p>'; ?>
849
-
850
- <?php if ( ! empty( $errors['upload_dir'] ) ) echo '<p>' . $errors['upload_dir'] . '</p>'; ?>
851
- <p><?php _e( sprintf( 'Visit our %s page for help', '<a href="https://smashballoon.com/instagram-feed/support/faq/" target="_blank">FAQ</a>' ), 'instagram-feed' ); ?></p>
852
-
853
- </div>
854
-
855
- <?php endif;
856
- $errors = $sb_instagram_posts_manager->get_critical_errors();
857
- if ( $sb_instagram_posts_manager->are_critical_errors() && ! empty( $errors ) ) : ?>
858
- <div class="notice notice-warning is-dismissible sbi-admin-notice">
859
- <p><strong><?php echo esc_html__( 'Instagram Feed is encountering an error and your feeds may not be updating due to the following reasons:', 'instagram-feed') ; ?></strong></p>
860
-
861
- <?php echo $errors; ?>
862
-
863
- <?php
864
- $error_page = $sb_instagram_posts_manager->get_error_page();
865
- if ( $error_page ) {
866
- echo '<a href="' . get_the_permalink( $error_page ) . '" class="sbi-clear-errors-visit-page sbi-space-left button button-secondary">' . __( 'View Feed and Retry', 'instagram-feed' ) . '</a>';
867
- }
868
- ?>
869
- </div>
870
- <?php endif;
871
- }
872
-
873
- }
874
-
875
- function sbi_get_user_names_of_personal_accounts_not_also_already_updated() {
876
- $sbi_options = get_option( 'sb_instagram_settings', array() );
877
- $users_in_personal_accounts = array();
878
- $non_personal_account_users = array();
879
-
880
- $connected_accounts = isset( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
881
-
882
- if ( ! empty( $connected_accounts ) ) {
883
-
884
- foreach ( $connected_accounts as $account ) {
885
- $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
886
-
887
- if ( $account_type === 'personal' ) {
888
- $users_in_personal_accounts[] = $account['username'];
889
- } else {
890
- $non_personal_account_users[] = $account['username'];
891
- }
892
-
893
- }
894
-
895
- if ( ! empty( $users_in_personal_accounts ) ) {
896
- $user_accounts_that_need_updating = array();
897
- foreach ( $users_in_personal_accounts as $personal_user ) {
898
- if ( ! in_array( $personal_user, $non_personal_account_users, true ) && $personal_user !== '' ) {
899
- $user_accounts_that_need_updating[] = $personal_user;
900
- }
901
- }
902
-
903
- return $user_accounts_that_need_updating;
904
- }
905
- } elseif ( empty( $connected_accounts ) && ! empty( $sbi_options['sb_instagram_at'] ) ) {
906
- return array( 'your Instagram feed');
907
- }
908
-
909
- return array();
910
- }
911
-
912
- function sbi_get_current_time() {
913
- $current_time = time();
914
-
915
- // where to do tests
916
- // $current_time = strtotime( 'November 25, 2020' ) + 1;
917
-
918
- return $current_time;
919
- }
920
-
921
- // generates the html for the admin notices
922
- function sbi_notices_html() {
923
-
924
- }
925
- //add_action( 'admin_notices', 'sbi_notices_html', 8 ); // priority 12 for Twitter, priority 10 for Facebook
926
-
927
-
928
- function sbi_get_future_date( $month, $year, $week, $day, $direction ) {
929
- if ( $direction > 0 ) {
930
- $startday = 1;
931
- } else {
932
- $startday = date( 't', mktime(0, 0, 0, $month, 1, $year ) );
933
- }
934
-
935
- $start = mktime( 0, 0, 0, $month, $startday, $year );
936
- $weekday = date( 'N', $start );
937
-
938
- $offset = 0;
939
- if ( $direction * $day >= $direction * $weekday ) {
940
- $offset = -$direction * 7;
941
- }
942
-
943
- $offset += $direction * ($week * 7) + ($day - $weekday);
944
- return mktime( 0, 0, 0, $month, $startday + $offset, $year );
945
- }
946
-
947
- function sbi_admin_hide_unrelated_notices() {
948
-
949
- // Bail if we're not on a sbi screen or page.
950
- if ( ! isset( $_GET['page'] ) || ( strpos( $_GET['page'], 'sb-instagram-feed') === false && strpos( $_GET['page'], 'sbi-') === false ) ) {
951
- return;
952
- }
953
-
954
- // Extra banned classes and callbacks from third-party plugins.
955
- $blacklist = array(
956
- 'classes' => array(),
957
- 'callbacks' => array(
958
- 'sbidb_admin_notice', // 'Database for sbi' plugin.
959
- ),
960
- );
961
-
962
- global $wp_filter;
963
-
964
- foreach ( array( 'user_admin_notices', 'admin_notices', 'all_admin_notices' ) as $notices_type ) {
965
- if ( empty( $wp_filter[ $notices_type ]->callbacks ) || ! is_array( $wp_filter[ $notices_type ]->callbacks ) ) {
966
- continue;
967
- }
968
- foreach ( $wp_filter[ $notices_type ]->callbacks as $priority => $hooks ) {
969
- foreach ( $hooks as $name => $arr ) {
970
- if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
971
- unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
972
- continue;
973
- }
974
- $class = ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) ? strtolower( get_class( $arr['function'][0] ) ) : '';
975
- if (
976
- ! empty( $class ) &&
977
- strpos( $class, 'sbi' ) !== false &&
978
- ! in_array( $class, $blacklist['classes'], true )
979
- ) {
980
- continue;
981
- }
982
- if (
983
- ! empty( $name ) && (
984
- strpos( $name, 'sbi' ) === false ||
985
- in_array( $class, $blacklist['classes'], true ) ||
986
- in_array( $name, $blacklist['callbacks'], true )
987
- )
988
- ) {
989
- unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
990
- }
991
- }
992
- }
993
- }
994
- }
995
- add_action( 'admin_print_scripts', 'sbi_admin_hide_unrelated_notices' );
996
-
997
- /* Usage */
998
- add_action( 'admin_notices', 'sbi_usage_opt_in' );
999
- function sbi_usage_opt_in() {
1000
- if ( isset( $_GET['trackingdismiss'] ) ) {
1001
- $usage_tracking = get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => false ) );
1002
-
1003
- $usage_tracking['enabled'] = false;
1004
-
1005
- update_option( 'sbi_usage_tracking', $usage_tracking, false );
1006
-
1007
- return;
1008
- }
1009
-
1010
- $cap = current_user_can( 'manage_instagram_feed_options' ) ? 'manage_instagram_feed_options' : 'manage_options';
1011
-
1012
- $cap = apply_filters( 'sbi_settings_pages_capability', $cap );
1013
- if ( ! current_user_can( $cap ) ) {
1014
- return;
1015
- }
1016
- $usage_tracking = sbi_get_option( 'sbi_usage_tracking', false );
1017
- if ( $usage_tracking ) {
1018
- return;
1019
- }
1020
- ?>
1021
- <div class="notice notice-warning is-dismissible sbi-admin-notice">
1022
-
1023
- <p>
1024
- <strong><?php echo __( 'Help us improve the Instagram Feed plugin', 'instagram-feed' ); ?></strong><br>
1025
- <?php echo __( 'Understanding how you are using the plugin allows us to further improve it. Opt-in below to agree to send a weekly report of plugin usage data.', 'instagram-feed' ); ?>
1026
- <a target="_blank" rel="noopener noreferrer" href="https://smashballoon.com/instagram-feed/usage-tracking/"><?php echo __( 'More information', 'instagram-feed' ); ?></a>
1027
- </p>
1028
- <p>
1029
- <a href="<?php echo admin_url('admin.php?page=sb-instagram-feed&trackingdismiss=1') ?>" class="button button-primary sb-opt-in"><?php echo __( 'Yes, I\'d like to help', 'instagram-feed' ); ?></a>
1030
- <a href="<?php echo admin_url('admin.php?page=sb-instagram-feed&trackingdismiss=1') ?>" class="sb-no-usage-opt-out sbi-space-left button button-secondary"><?php echo __( 'No, thanks', 'instagram-feed' ); ?></a>
1031
- </p>
1032
-
1033
- </div>
1034
-
1035
- <?php
1036
- }
1037
-
1038
- function sbi_usage_opt_in_or_out() {
1039
- $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
1040
-
1041
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
1042
- die ( 'You did not do this the right way!' );
1043
- }
1044
-
1045
- $usage_tracking = sbi_get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => false ) );
1046
-
1047
- $usage_tracking['enabled'] = isset( $_POST['opted_in'] ) ? $_POST['opted_in'] === 'true' : false;
1048
-
1049
- sbi_update_option( 'sbi_usage_tracking', $usage_tracking, false );
1050
-
1051
- die();
1052
- }
1053
- add_action( 'wp_ajax_sbi_usage_opt_in_or_out', 'sbi_usage_opt_in_or_out' );
1054
-
1055
- function sbi_oembed_disable() {
1056
- $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
1057
-
1058
- if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
1059
- die ( 'You did not do this the right way!' );
1060
- }
1061
-
1062
- $oembed_settings = get_option( 'sbi_oembed_token', array() );
1063
- $oembed_settings['access_token'] = '';
1064
- $oembed_settings['disabled'] = true;
1065
- echo '<strong>';
1066
- if ( update_option( 'sbi_oembed_token', $oembed_settings ) ) {
1067
- _e( 'Instagram oEmbeds will no longer be handled by Instagram Feed.', 'instagram-feed' );
1068
- } else {
1069
- _e( 'An error occurred when trying to delete your oEmbed token.', 'instagram-feed' );
1070
- }
1071
- echo '</strong>';
1072
-
1073
- die();
1074
- }
1075
- add_action( 'wp_ajax_sbi_oembed_disable', 'sbi_oembed_disable' );
1
+ <?php
2
+ /**
3
+ * Includes functions related to actions while in the admin area.
4
+ *
5
+ * - All AJAX related features
6
+ * - Enqueueing of JS and CSS files
7
+ * - Settings link on "Plugins" page
8
+ * - Creation of local avatar image files
9
+ * - Connecting accounts on the "Configure" tab
10
+ * - Displaying admin notices
11
+ * - Clearing caches
12
+ */
13
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
+
15
+ function sb_instagram_admin_style() {
16
+ wp_register_style( 'sb_instagram_admin_css', SBI_PLUGIN_URL . 'css/sb-instagram-admin.css', array(), SBIVER );
17
+ wp_enqueue_style( 'sb_instagram_font_awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );
18
+ wp_enqueue_style( 'sb_instagram_admin_css' );
19
+ wp_enqueue_style( 'wp-color-picker' );
20
+ }
21
+ add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_style' );
22
+
23
+ function sb_instagram_admin_scripts() {
24
+ wp_enqueue_script( 'sb_instagram_admin_js', SBI_PLUGIN_URL . 'js/sb-instagram-admin-2-2.js', array(), SBIVER );
25
+ wp_localize_script( 'sb_instagram_admin_js', 'sbiA', array(
26
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
27
+ 'sbi_nonce' => wp_create_nonce( 'sbi_nonce' )
28
+ )
29
+ );
30
+ $strings = array(
31
+ 'addon_activate' => esc_html__( 'Activate', 'instagram-feed' ),
32
+ 'addon_activated' => esc_html__( 'Activated', 'instagram-feed' ),
33
+ 'addon_active' => esc_html__( 'Active', 'instagram-feed' ),
34
+ 'addon_deactivate' => esc_html__( 'Deactivate', 'instagram-feed' ),
35
+ 'addon_inactive' => esc_html__( 'Inactive', 'instagram-feed' ),
36
+ 'addon_install' => esc_html__( 'Install Addon', 'instagram-feed' ),
37
+ 'addon_error' => esc_html__( 'Could not install addon. Please download from wpforms.com and install manually.', 'instagram-feed' ),
38
+ 'plugin_error' => esc_html__( 'Could not install a plugin. Please download from WordPress.org and install manually.', 'instagram-feed' ),
39
+ 'addon_search' => esc_html__( 'Searching Addons', 'instagram-feed' ),
40
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
41
+ 'cancel' => esc_html__( 'Cancel', 'instagram-feed' ),
42
+ 'close' => esc_html__( 'Close', 'instagram-feed' ),
43
+ 'nonce' => wp_create_nonce( 'sbi-admin' ),
44
+ 'almost_done' => esc_html__( 'Almost Done', 'instagram-feed' ),
45
+ 'oops' => esc_html__( 'Oops!', 'instagram-feed' ),
46
+ 'ok' => esc_html__( 'OK', 'instagram-feed' ),
47
+ 'plugin_install_activate_btn' => esc_html__( 'Install and Activate', 'instagram-feed' ),
48
+ 'plugin_install_activate_confirm' => esc_html__( 'needs to be installed and activated to import its forms. Would you like us to install and activate it for you?', 'instagram-feed' ),
49
+ 'plugin_activate_btn' => esc_html__( 'Activate', 'instagram-feed' ),
50
+ );
51
+ $strings = apply_filters( 'sbi_admin_strings', $strings );
52
+
53
+ wp_localize_script(
54
+ 'sb_instagram_admin_js',
55
+ 'sbi_admin',
56
+ $strings
57
+ );
58
+ if( !wp_script_is('jquery-ui-draggable') ) {
59
+ wp_enqueue_script(
60
+ array(
61
+ 'jquery',
62
+ 'jquery-ui-core',
63
+ 'jquery-ui-draggable'
64
+ )
65
+ );
66
+ }
67
+ wp_enqueue_script(
68
+ array(
69
+ 'hoverIntent',
70
+ 'wp-color-picker'
71
+ )
72
+ );
73
+ }
74
+ add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_scripts' );
75
+
76
+ // Add a Settings link to the plugin on the Plugins page
77
+ $sbi_plugin_file = 'instagram-feed/instagram-feed.php';
78
+ add_filter( "plugin_action_links_{$sbi_plugin_file}", 'sbi_add_settings_link', 10, 2 );
79
+
80
+ //modify the link by unshifting the array
81
+ function sbi_add_settings_link( $links, $file ) {
82
+ $pro_link = '<a href="https://smashballoon.com/instagram-feed/demo/?utm_campaign=instagram-free&utm_source=plugins-page&utm_medium=upgrade-link" target="_blank" style="font-weight: bold; color: #1da867;">' . __( 'Try the Pro Demo', 'instagram-feed' ) . '</a>';
83
+
84
+ $sbi_settings_link = '<a href="' . admin_url( 'admin.php?page=sb-instagram-feed' ) . '">' . __( 'Settings', 'instagram-feed' ) . '</a>';
85
+ array_unshift( $links, $pro_link, $sbi_settings_link );
86
+
87
+ return $links;
88
+ }
89
+
90
+
91
+ /**
92
+ * Called via ajax to automatically save access token and access token secret
93
+ * retrieved with the big blue button
94
+ */
95
+ function sbi_auto_save_tokens() {
96
+ $nonce = $_POST['sbi_nonce'];
97
+
98
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
99
+ die ( 'You did not do this the right way!' );
100
+ }
101
+
102
+ wp_cache_delete ( 'alloptions', 'options' );
103
+
104
+ $options = sbi_get_database_settings();
105
+ $new_access_token = isset( $_POST['access_token'] ) ? sanitize_text_field( $_POST['access_token'] ) : false;
106
+ $split_token = $new_access_token ? explode( '.', $new_access_token ) : array();
107
+ $new_user_id = isset( $split_token[0] ) ? $split_token[0] : '';
108
+
109
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
110
+ $test_connection_data = sbi_account_data_for_token( $new_access_token );
111
+
112
+ $connected_accounts[ $new_user_id ] = array(
113
+ 'access_token' => sbi_get_parts( $new_access_token ),
114
+ 'user_id' => $test_connection_data['id'],
115
+ 'username' => $test_connection_data['username'],
116
+ 'is_valid' => $test_connection_data['is_valid'],
117
+ 'last_checked' => $test_connection_data['last_checked'],
118
+ 'profile_picture' => $test_connection_data['profile_picture'],
119
+ );
120
+
121
+ if ( !$options['sb_instagram_disable_resize'] ) {
122
+ if ( sbi_create_local_avatar( $test_connection_data['username'], $test_connection_data['profile_picture'] ) ) {
123
+ $connected_accounts[ $new_user_id ]['local_avatar'] = true;
124
+ }
125
+ } else {
126
+ $connected_accounts[ $new_user_id ]['local_avatar'] = false;
127
+ }
128
+
129
+ $options['connected_accounts'] = $connected_accounts;
130
+
131
+ update_option( 'sb_instagram_settings', $options );
132
+
133
+ echo sbi_json_encode( $connected_accounts[ $new_user_id ] );
134
+
135
+ die();
136
+ }
137
+ add_action( 'wp_ajax_sbi_auto_save_tokens', 'sbi_auto_save_tokens' );
138
+
139
+ function sbi_delete_local_avatar( $username ) {
140
+ $upload = wp_upload_dir();
141
+
142
+ $image_files = glob( trailingslashit( $upload['basedir'] ) . trailingslashit( SBI_UPLOADS_NAME ) . $username . '.jpg' ); // get all matching images
143
+ foreach ( $image_files as $file ) { // iterate files
144
+ if ( is_file( $file ) ) {
145
+ unlink( $file );
146
+ }
147
+ }
148
+ }
149
+
150
+ function sbi_connect_business_accounts() {
151
+ $nonce = $_POST['sbi_nonce'];
152
+
153
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
154
+ die ( 'You did not do this the right way!' );
155
+ }
156
+
157
+ $accounts = isset( $_POST['accounts'] ) ? json_decode( stripslashes( $_POST['accounts'] ), true ) : false;
158
+
159
+ $return = array();
160
+ foreach ( $accounts as $account ) {
161
+ $account['type'] = 'business';
162
+
163
+ $connector = new SBI_Account_Connector();
164
+
165
+ $connector->add_account_data( $account );
166
+ if ( $connector->update_stored_account() ) {
167
+ $connector->after_update();
168
+
169
+ $return[ $connector->get_id() ] = $connector->get_account_data();
170
+ }
171
+ }
172
+
173
+ echo sbi_json_encode( $return );
174
+
175
+ die();
176
+ }
177
+ add_action( 'wp_ajax_sbi_connect_business_accounts', 'sbi_connect_business_accounts' );
178
+
179
+ function sbi_auto_save_id() {
180
+ $nonce = $_POST['sbi_nonce'];
181
+
182
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
183
+ die ( 'You did not do this the right way!' );
184
+ }
185
+ if ( current_user_can( 'edit_posts' ) && isset( $_POST['id'] ) ) {
186
+ $options = get_option( 'sb_instagram_settings', array() );
187
+
188
+ $options['sb_instagram_user_id'] = array( sanitize_text_field( $_POST['id'] ) );
189
+
190
+ update_option( 'sb_instagram_settings', $options );
191
+ }
192
+ die();
193
+ }
194
+ add_action( 'wp_ajax_sbi_auto_save_id', 'sbi_auto_save_id' );
195
+
196
+ function sbi_formatted_error( $response ) {
197
+ if ( isset( $response['error'] ) ) {
198
+ $error = '<p>' . sprintf( __( 'API error %s:', 'instagram-feed' ), $response['error']['code'] ) . ' ' . $response['error']['message'] . '</p>';
199
+ $error .= '<p class="sbi-error-directions"><a href="https://smashballoon.com/instagram-feed/docs/errors/" target="_blank" rel="noopener">' . __( 'Directions on how to resolve this issue', 'instagram-feed' ) . '</a></p>';
200
+
201
+ return $error;
202
+ } else {
203
+ $message = '<p>' . sprintf( __( 'Error connecting to %s.', 'instagram-feed' ), $response['url'] ). '</p>';
204
+ if ( isset( $response['response'] ) && isset( $response['response']->errors ) ) {
205
+ foreach ( $response['response']->errors as $key => $item ) {
206
+ '<p>' .$message .= ' '.$key . ' - ' . $item[0] . '</p>';
207
+ }
208
+ }
209
+ $message .= '<p class="sbi-error-directions"><a href="https://smashballoon.com/instagram-feed/docs/errors/" target="_blank" rel="noopener">' . __( 'Directions on how to resolve this issue', 'instagram-feed' ) . '</a></p>';
210
+
211
+ return $message;
212
+ }
213
+ }
214
+
215
+ function sbi_test_token() {
216
+ $access_token = isset( $_POST['access_token'] ) ? trim( sanitize_text_field( $_POST['access_token'] ) ) : false;
217
+ $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( $_POST['account_id'] ) : false;
218
+
219
+ $return = sbi_connect_new_account( $access_token, $account_id );
220
+
221
+ echo $return;
222
+ die();
223
+ }
224
+ add_action( 'wp_ajax_sbi_test_token', 'sbi_test_token' );
225
+
226
+ function sbi_delete_account() {
227
+ $nonce = $_POST['sbi_nonce'];
228
+
229
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
230
+ die ( 'You did not do this the right way!' );
231
+ }
232
+ $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( $_POST['account_id'] ) : false;
233
+
234
+ sbi_do_account_delete( $account_id );
235
+
236
+ die();
237
+ }
238
+ add_action( 'wp_ajax_sbi_delete_account', 'sbi_delete_account' );
239
+
240
+ function sbi_account_data_for_token( $access_token ) {
241
+ $return = array(
242
+ 'id' => false,
243
+ 'username' => false,
244
+ 'is_valid' => false,
245
+ 'last_checked' => time()
246
+ );
247
+ $url = 'https://api.instagram.com/v1/users/self/?access_token=' . sbi_maybe_clean( $access_token );
248
+ $args = array(
249
+ 'timeout' => 60,
250
+ 'sslverify' => false
251
+ );
252
+ $result = wp_remote_get( $url, $args );
253
+
254
+ if ( ! is_wp_error( $result ) ) {
255
+ $data = json_decode( $result['body'] );
256
+ } else {
257
+ $data = array();
258
+ }
259
+
260
+ if ( isset( $data->data->id ) ) {
261
+ $return['id'] = $data->data->id;
262
+ $return['username'] = $data->data->username;
263
+ $return['is_valid'] = true;
264
+ $return['profile_picture'] = $data->data->profile_picture;
265
+
266
+ } elseif ( isset( $data->error_type ) && $data->error_type === 'OAuthRateLimitException' ) {
267
+ $return['error_message'] = 'This account\'s access token is currently over the rate limit. Try removing this access token from all feeds and wait an hour before reconnecting.';
268
+ } else {
269
+ $return = false;
270
+ }
271
+
272
+ $sbi_options = get_option( 'sb_instagram_settings', array() );
273
+ $sbi_options['sb_instagram_at'] = '';
274
+ update_option( 'sb_instagram_settings', $sbi_options );
275
+
276
+ return $return;
277
+ }
278
+
279
+ function sbi_do_account_delete( $account_id ) {
280
+ $options = get_option( 'sb_instagram_settings', array() );
281
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
282
+ global $sb_instagram_posts_manager;
283
+ $sb_instagram_posts_manager->reset_api_errors();
284
+ wp_cache_delete ( 'alloptions', 'options' );
285
+ $username = $connected_accounts[ $account_id ]['username'];
286
+ $sb_instagram_posts_manager->add_action_log( 'Deleting account ' . $username );
287
+
288
+ $num_times_used = 0;
289
+
290
+ $new_con_accounts = array();
291
+ foreach ( $connected_accounts as $connected_account ) {
292
+
293
+ if ( $connected_account['username'] === $username ) {
294
+ $num_times_used++;
295
+ }
296
+
297
+ if ( $connected_account['username'] !== '' && $account_id !== $connected_account['user_id'] && ! empty( $connected_account['user_id'] ) ) {
298
+ $new_con_accounts[ $connected_account['user_id'] ] = $connected_account;
299
+ }
300
+ }
301
+
302
+ if ( $num_times_used < 2 ) {
303
+ sbi_delete_local_avatar( $username );
304
+ }
305
+
306
+ $options['connected_accounts'] = $new_con_accounts;
307
+
308
+ update_option( 'sb_instagram_settings', $options );
309
+ }
310
+
311
+ function sbi_connect_new_account( $access_token, $account_id ) {
312
+ $split_id = explode( ' ', trim( $account_id ) );
313
+ $account_id = preg_replace("/[^A-Za-z0-9 ]/", '', $split_id[0] );
314
+ if ( ! empty( $account_id ) ) {
315
+ $split_token = explode( ' ', trim( $access_token ) );
316
+ $access_token = preg_replace("/[^A-Za-z0-9 ]/", '', $split_token[0] );
317
+ }
318
+
319
+ $account = array(
320
+ 'access_token' => $access_token,
321
+ 'user_id' => $account_id,
322
+ 'type' => 'business'
323
+ );
324
+
325
+ if ( sbi_code_check( $access_token ) ) {
326
+ $account['type'] = 'basic';
327
+ }
328
+
329
+ $connector = new SBI_Account_Connector();
330
+
331
+ $response = $connector->fetch( $account );
332
+
333
+ if ( isset( $response['access_token'] ) ) {
334
+ $connector->add_account_data( $response );
335
+ $connector->update_stored_account();
336
+ $connector->after_update();
337
+ return sbi_json_encode( $connector->get_account_data() );
338
+ } else {
339
+ return $response['error'];
340
+ }
341
+ }
342
+
343
+ function sbi_no_js_connected_account_management() {
344
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
345
+ return;
346
+ }
347
+ if ( isset( $_POST['sb_manual_at'] ) ) {
348
+ $access_token = isset( $_POST['sb_manual_at'] ) ? trim( sanitize_text_field( $_POST['sb_manual_at'] ) ) : false;
349
+ $account_id = isset( $_POST['sb_manual_account_id'] ) ? sanitize_text_field( $_POST['sb_manual_account_id'] ) : false;
350
+ if ( ! $access_token || ! $account_id ) {
351
+ return;
352
+ }
353
+ sbi_connect_new_account( $access_token, $account_id );
354
+ } elseif ( isset( $_GET['disconnect'] ) && isset( $_GET['page'] ) && $_GET['page'] === 'sb-instagram-feed' ) {
355
+ $account_id = sanitize_text_field( $_GET['disconnect'] );
356
+ sbi_do_account_delete( $account_id );
357
+ }
358
+
359
+ }
360
+ add_action( 'admin_init', 'sbi_no_js_connected_account_management' );
361
+
362
+ function sbi_get_connected_accounts_data( $sb_instagram_at ) {
363
+ $sbi_options = get_option( 'sb_instagram_settings' );
364
+ $return = array();
365
+ $return['connected_accounts'] = isset( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
366
+
367
+ if ( ! empty( $return['connected_accounts'] ) ) {
368
+ $return['access_token'] = '';
369
+ } else {
370
+ $return['access_token'] = $sb_instagram_at;
371
+ }
372
+
373
+ if ( ! sbi_is_after_deprecation_deadline() && empty( $connected_accounts ) && ! empty( $sb_instagram_at ) ) {
374
+ $tokens = explode(',', $sb_instagram_at );
375
+ $user_ids = array();
376
+
377
+ foreach ( $tokens as $token ) {
378
+ $account = sbi_account_data_for_token( $token );
379
+ if ( isset( $account['is_valid'] ) ) {
380
+ $split = explode( '.', $token );
381
+ $return['connected_accounts'][ $split[0] ] = array(
382
+ 'access_token' => sbi_get_parts( $token ),
383
+ 'user_id' => $split[0],
384
+ 'username' => '',
385
+ 'is_valid' => true,
386
+ 'last_checked' => time(),
387
+ 'profile_picture' => ''
388
+ );
389
+ $user_ids[] = $split[0];
390
+ }
391
+
392
+ }
393
+
394
+ $sbi_options['connected_accounts'] = $return['connected_accounts'];
395
+ $sbi_options['sb_instagram_at'] = '';
396
+ $sbi_options['sb_instagram_user_id'] = $user_ids;
397
+
398
+ $return['user_ids'] = $user_ids;
399
+
400
+ update_option( 'sb_instagram_settings', $sbi_options );
401
+ }
402
+
403
+ return $return;
404
+ }
405
+
406
+ function sbi_connect_basic_account( $new_account_details ) {
407
+
408
+ $options = sbi_get_database_settings();
409
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
410
+
411
+ $accounts_to_save = array();
412
+ $old_account_user_id = '';
413
+ $ids_to_save = array();
414
+ $user_ids = is_array( $options[ 'sb_instagram_user_id' ] ) ? $options[ 'sb_instagram_user_id' ] : explode( ',', str_replace( ' ', '', $options[ 'sb_instagram_user_id' ] ) );
415
+
416
+ $profile_picture = '';
417
+
418
+ // do not connect as a basic display account if already connected as a business account
419
+ if ( isset( $connected_accounts[ $new_account_details['user_id'] ] )
420
+ && isset( $connected_accounts[ $new_account_details['user_id'] ]['type'] )
421
+ && $connected_accounts[ $new_account_details['user_id'] ]['type'] === 'business' ) {
422
+ return $options;
423
+ }
424
+
425
+ foreach ( $connected_accounts as $account ) {
426
+ $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
427
+ if ( ($account['username'] !== $new_account_details['username'])
428
+ || $account_type === 'business' ) {
429
+ $accounts_to_save[ $account['user_id'] ] = $account;
430
+ } else {
431
+ $old_account_user_id = $account['user_id'];
432
+ $profile_picture = isset( $account['profile_picture'] ) ? $account['profile_picture'] : '';
433
+ }
434
+ }
435
+
436
+ foreach ( $user_ids as $id ) {
437
+ if ( $id === $old_account_user_id ) {
438
+ $ids_to_save[] = $new_account_details['user_id'];
439
+ } else {
440
+ $ids_to_save[] = $id;
441
+ }
442
+ }
443
+
444
+ $accounts_to_save[ $new_account_details['user_id'] ] = array(
445
+ 'access_token' => sbi_fixer( $new_account_details['access_token'] ),
446
+ 'user_id' => $new_account_details['user_id'],
447
+ 'username' => $new_account_details['username'],
448
+ 'is_valid' => true,
449
+ 'last_checked' => time(),
450
+ 'expires_timestamp' => $new_account_details['expires_timestamp'],
451
+ 'profile_picture' => $profile_picture,
452
+ 'account_type' => strtolower( $new_account_details['account_type'] ),
453
+ 'type' => 'basic',
454
+ );
455
+
456
+ if ( ! empty( $old_account_user_id ) && $old_account_user_id !== $new_account_details['user_id'] ) {
457
+ $accounts_to_save[ $new_account_details['user_id'] ]['old_user_id'] = $old_account_user_id;
458
+
459
+ // get last saved header data
460
+ $fuzzy_matches = sbi_fuzzy_matching_header_data( $old_account_user_id );
461
+ if ( ! empty( $fuzzy_matches[0] ) ) {
462
+ $header_data = sbi_find_matching_data_from_results( $fuzzy_matches, $old_account_user_id );
463
+ $bio = SB_Instagram_Parse::get_bio( $header_data );
464
+ $accounts_to_save[ $new_account_details['user_id'] ]['bio'] = sbi_sanitize_emoji( $bio );
465
+ }
466
+
467
+ }
468
+
469
+ if ( ! empty( $profile_picture ) && !$options['sb_instagram_disable_resize'] ) {
470
+ if ( sbi_create_local_avatar( $new_account_details['username'], $profile_picture ) ) {
471
+ $accounts_to_save[ $new_account_details['user_id'] ]['local_avatar'] = true;
472
+ }
473
+ } else {
474
+ $accounts_to_save[ $new_account_details['user_id'] ]['local_avatar'] = false;
475
+ }
476
+
477
+ delete_transient( SBI_USE_BACKUP_PREFIX . 'sbi_' . $new_account_details['user_id'] );
478
+ $refresher = new SB_Instagram_Token_Refresher( $accounts_to_save[ $new_account_details['user_id'] ] );
479
+ $refresher->attempt_token_refresh();
480
+
481
+ if ( $refresher->get_last_error_code() === 10 ) {
482
+ $accounts_to_save[ $new_account_details['user_id'] ]['private'] = true;
483
+ }
484
+
485
+ $options['connected_accounts'] = $accounts_to_save;
486
+ $options['sb_instagram_user_id'] = $ids_to_save;
487
+
488
+ update_option( 'sb_instagram_settings', $options );
489
+ //global $sb_instagram_posts_manager;
490
+
491
+ //$sb_instagram_posts_manager->remove_all_errors();
492
+ return $options;
493
+ }
494
+
495
+ function sbi_fuzzy_matching_header_data( $user_id ) {
496
+
497
+ if ( empty( $user_id ) || strlen( $user_id ) < 4 ) {
498
+ return array();
499
+ }
500
+ global $wpdb;
501
+ $escaped_id = esc_sql( $user_id );
502
+
503
+ $values = $wpdb->get_results( "
504
+ SELECT option_value
505
+ FROM $wpdb->options
506
+ WHERE option_name LIKE ('%!sbi\_header\_".$escaped_id."%')
507
+ LIMIT 10", ARRAY_A );
508
+
509
+ $regular_values = $wpdb->get_results( "
510
+ SELECT option_value
511
+ FROM $wpdb->options
512
+ WHERE option_name LIKE ('%sbi\_header\_".$escaped_id."%')
513
+ LIMIT 10", ARRAY_A );
514
+
515
+ $values = array_merge( $values, $regular_values );
516
+
517
+ return $values;
518
+ }
519
+
520
+ function sbi_find_matching_data_from_results( $results, $user_id ) {
521
+
522
+ $match = array();
523
+
524
+ $i = 0;
525
+
526
+ while( empty( $match ) && isset( $results[ $i ] ) ) {
527
+ if ( ! empty( $results[ $i ] ) ) {
528
+ $header_data = json_decode( $results[ $i ]['option_value'], true );
529
+ if ( isset( $header_data['id'] ) && (string)$header_data['id'] === (string)$user_id ) {
530
+ $match = $header_data;
531
+ }
532
+ }
533
+ $i++;
534
+ }
535
+
536
+ return $match;
537
+ }
538
+
539
+ function sbi_matches_existing_personal( $new_account_details ) {
540
+
541
+ $options = sbi_get_database_settings();
542
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
543
+
544
+ $matches_one_account = false;
545
+ foreach ( $connected_accounts as $account ) {
546
+ $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
547
+ if ( ($account_type === 'personal' || $account_type === 'basic')
548
+ && $account['username'] == $new_account_details['username'] ) {
549
+ $matches_one_account = true;
550
+ }
551
+ }
552
+
553
+ return $matches_one_account;
554
+
555
+ }
556
+
557
+ function sbi_business_account_request( $url, $account, $remove_access_token = true ) {
558
+ $args = array(
559
+ 'timeout' => 60,
560
+ 'sslverify' => false
561
+ );
562
+ $result = wp_remote_get( $url, $args );
563
+
564
+ if ( ! is_wp_error( $result ) ) {
565
+ $response_no_at = $remove_access_token ? str_replace( sbi_maybe_clean( $account['access_token'] ), '{accesstoken}', $result['body'] ) : $result['body'];
566
+ return $response_no_at;
567
+ } else {
568
+ return sbi_json_encode( $result );
569
+ }
570
+ }
571
+
572
+ function sbi_after_connection() {
573
+
574
+ if ( isset( $_POST['access_token'] ) ) {
575
+ $access_token = sanitize_text_field( $_POST['access_token'] );
576
+ $account_info = sbi_account_data_for_token( $access_token );
577
+ echo sbi_json_encode( $account_info );
578
+ }
579
+
580
+ die();
581
+ }
582
+ add_action( 'wp_ajax_sbi_after_connection', 'sbi_after_connection' );
583
+
584
+ function sbi_get_business_account_connection_modal($sb_instagram_user_id) {
585
+ $access_token = sbi_maybe_clean(urldecode($_GET['sbi_access_token']));
586
+ //
587
+ $url = 'https://graph.facebook.com/me/accounts?fields=instagram_business_account,access_token&limit=500&access_token='.$access_token;
588
+ $args = array(
589
+ 'timeout' => 60,
590
+ 'sslverify' => false
591
+ );
592
+ $result = wp_remote_get( $url, $args );
593
+ $pages_data = '{}';
594
+ if ( ! is_wp_error( $result ) ) {
595
+ $pages_data = $result['body'];
596
+ } else {
597
+ $page_error = $result;
598
+ }
599
+
600
+ $pages_data_arr = json_decode($pages_data);
601
+ $num_accounts = 0;
602
+ if(isset($pages_data_arr)){
603
+ $num_accounts = is_array( $pages_data_arr->data ) ? count( $pages_data_arr->data ) : 0;
604
+ }
605
+ ?>
606
+ <div id="sbi_config_info" class="sb_list_businesses sbi_num_businesses_<?php echo $num_accounts; ?>">
607
+ <div class="sbi_config_modal">
608
+ <div class="sbi-managed-pages">
609
+ <?php if ( isset( $page_error ) && isset( $page_error->errors ) ) {
610
+ foreach ($page_error->errors as $key => $item) {
611
+ echo '<div class="sbi_user_id_error" style="display:block;"><strong>Connection Error: </strong>' . $key . ': ' . $item[0] . '</div>';
612
+ }
613
+ }
614
+ ?>
615
+ <?php if( empty($pages_data_arr->data) ) : ?>
616
+ <span id="sbi-bus-account-error">
617
+ <p style="margin-top: 5px;"><b style="font-size: 16px">Couldn't find Business Profile</b><br />
618
+ Uh oh. It looks like this Facebook account is not currently connected to an Instagram Business profile. Please check that you are logged into the <a href="https://www.facebook.com/" target="_blank">Facebook account</a> in this browser which is associated with your Instagram Business Profile.</p>
619
+ <p><b style="font-size: 16px">Why do I need a Business Profile?</b><br />
620
+ A Business Profile is only required if you are displaying a Hashtag feed. If you want to display a regular User feed then you can do this by selecting to connect a Personal account instead. For directions on how to convert your Personal profile into a Business profile please <a href="https://smashballoon.com/instagram-business-profiles" target="_blank">see here</a>.</p>
621
+ </span>
622
+
623
+ <?php elseif ( $num_accounts === 0 ): ?>
624
+ <span id="sbi-bus-account-error">
625
+ <p style="margin-top: 5px;"><b style="font-size: 16px">Couldn't find Business Profile</b><br />
626
+ Uh oh. It looks like this Facebook account is not currently connected to an Instagram Business profile. Please check that you are logged into the <a href="https://www.facebook.com/" target="_blank">Facebook account</a> in this browser which is associated with your Instagram Business Profile.</p>
627
+ <p>If you are, in fact, logged-in to the correct account please make sure you have Instagram accounts connected with your Facebook account by following <a href="https://smashballoon.com/reconnecting-an-instagram-business-profile/" target="_blank">this FAQ</a></p>
628
+ </span>
629
+ <?php else: ?>
630
+ <p class="sbi-managed-page-intro"><b style="font-size: 16px;">Instagram Business profiles for this account</b><br /><i style="color: #666;">Note: In order to display a Hashtag feed you first need to select a Business profile below.</i></p>
631
+ <?php if ( $num_accounts > 1 ) : ?>
632
+ <div class="sbi-managed-page-select-all"><input type="checkbox" id="sbi-select-all" class="sbi-select-all"><label for="sbi-select-all">Select All</label></div>
633
+ <?php endif; ?>
634
+ <div class="sbi-scrollable-accounts">
635
+
636
+ <?php foreach ( $pages_data_arr->data as $page => $page_data ) : ?>
637
+
638
+ <?php if( isset( $page_data->instagram_business_account ) ) :
639
+
640
+ $instagram_business_id = $page_data->instagram_business_account->id;
641
+
642
+ $page_access_token = isset( $page_data->access_token ) ? $page_data->access_token : '';
643
+
644
+ //Make another request to get page info
645
+ $instagram_account_url = 'https://graph.facebook.com/'.$instagram_business_id.'?fields=name,username,profile_picture_url&access_token='.$access_token;
646
+
647
+ $args = array(
648
+ 'timeout' => 60,
649
+ 'sslverify' => false
650
+ );
651
+ $result = wp_remote_get( $instagram_account_url, $args );
652
+ $instagram_account_info = '{}';
653
+ if ( ! is_wp_error( $result ) ) {
654
+ $instagram_account_info = $result['body'];
655
+ } else {
656
+ $page_error = $result;
657
+ }
658
+
659
+ $instagram_account_data = json_decode($instagram_account_info);
660
+
661
+ $instagram_biz_img = isset( $instagram_account_data->profile_picture_url ) ? $instagram_account_data->profile_picture_url : false;
662
+ $selected_class = $instagram_business_id == $sb_instagram_user_id ? ' sbi-page-selected' : '';
663
+
664
+ ?>
665
+ <?php if ( isset( $page_error ) && isset( $page_error->errors ) ) :
666
+ foreach ($page_error->errors as $key => $item) {
667
+ echo '<div class="sbi_user_id_error" style="display:block;"><strong>Connection Error: </strong>' . $key . ': ' . $item[0] . '</div>';
668
+ }
669
+ else : ?>
670
+ <div class="sbi-managed-page<?php echo $selected_class; ?>" data-page-token="<?php echo esc_attr( $page_access_token ); ?>" data-token="<?php echo esc_attr( $access_token ); ?>" data-page-id="<?php echo esc_attr( $instagram_business_id ); ?>">
671
+ <div class="sbi-add-checkbox">
672
+ <input id="sbi-<?php echo esc_attr( $instagram_business_id ); ?>" type="checkbox" name="sbi_managed_pages[]" value="<?php echo esc_attr( $instagram_account_info ); ?>">
673
+ </div>
674
+ <div class="sbi-managed-page-details">
675
+ <label for="sbi-<?php echo esc_attr( $instagram_business_id ); ?>"><img class="sbi-page-avatar" border="0" height="50" width="50" src="<?php echo esc_url( $instagram_biz_img ); ?>"><b style="font-size: 16px;"><?php echo esc_html( $instagram_account_data->name ); ?></b>
676
+ <br />@<?php echo esc_html( $instagram_account_data->username); ?><span style="font-size: 11px; margin-left: 5px;">(<?php echo esc_html( $instagram_business_id ); ?>)</span></label>
677
+ </div>
678
+ </div>
679
+ <?php endif; ?>
680
+
681
+ <?php endif; ?>
682
+
683
+ <?php endforeach; ?>
684
+
685
+ </div> <!-- end scrollable -->
686
+ <p style="font-size: 11px; line-height: 1.5; margin-bottom: 0;"><i style="color: #666;">*<?php echo sprintf( __( 'Changing the password, updating privacy settings, or removing page admins for the related Facebook page may require %smanually reauthorizing our app%s to reconnect an account.', 'instagram-feed' ), '<a href="https://smashballoon.com/reauthorizing-our-instagram-facebook-app/" target="_blank" rel="noopener noreferrer">', '</a>' ); ?></i></p>
687
+
688
+ <button id="sbi-connect-business-accounts" class="button button-primary" disabled="disabled" style="margin-top: 20px;"><?php _e( 'Connect Accounts', 'instagram-feed' ); ?></button>
689
+
690
+ <?php endif; ?>
691
+
692
+ <a href="JavaScript:void(0);" class="sbi_modal_close"><i class="fa fa-times"></i></a>
693
+ </div>
694
+ </div>
695
+ </div><?php
696
+ }
697
+
698
+ function sbi_get_personal_connection_modal( $connected_accounts, $action_url = 'admin.php?page=sb-instagram-feed' ) {
699
+ $access_token = sanitize_text_field( $_GET['sbi_access_token'] );
700
+ $account_type = sanitize_text_field( $_GET['sbi_account_type'] );
701
+ $user_id = sanitize_text_field( $_GET['sbi_id'] );
702
+ $user_name = sanitize_text_field( $_GET['sbi_username'] );
703
+ $expires_in = (int)$_GET['sbi_expires_in'];
704
+ $expires_timestamp = time() + $expires_in;
705
+
706
+ $new_account_details = array(
707
+ 'access_token' => $access_token,
708
+ 'account_type' => $account_type,
709
+ 'user_id' => $user_id,
710
+ 'username' => $user_name,
711
+ 'expires_timestamp' => $expires_timestamp,
712
+ 'profile_picture' => '',
713
+ 'type' => 'basic'
714
+ );
715
+
716
+
717
+ $matches_existing_personal = sbi_matches_existing_personal( $new_account_details );
718
+ $button_text = $matches_existing_personal ? __( 'Update This Account', 'instagram-feed' ) : __( 'Connect This Account', 'instagram-feed' );
719
+
720
+ $account_json = sbi_json_encode( $new_account_details );
721
+
722
+ $already_connected_as_business_account = (isset( $connected_accounts[ $user_id ] ) && $connected_accounts[ $user_id ]['type'] === 'business');
723
+
724
+ ?>
725
+
726
+ <div id="sbi_config_info" class="sb_get_token">
727
+ <div class="sbi_config_modal">
728
+ <div class="sbi_ca_username"><strong><?php echo esc_html( $user_name ); ?></strong></div>
729
+ <form action="<?php echo admin_url( $action_url ); ?>" method="post">
730
+ <p class="sbi_submit">
731
+ <?php if ( $already_connected_as_business_account ) :
732
+ _e( 'The Instagram account you are logged into is already connected as a "business" account. Remove the business account if you\'d like to connect as a basic account instead (not recommended).', 'instagram-feed' );
733
+ ?>
734
+ <?php else : ?>
735
+ <input type="submit" name="sbi_submit" id="sbi_connect_account" class="button button-primary" value="<?php echo esc_html( $button_text ); ?>">
736
+ <?php endif; ?>
737
+ <input type="hidden" name="sbi_account_json" value="<?php echo esc_attr( $account_json ) ; ?>">
738
+ <input type="hidden" name="sbi_connect_username" value="<?php echo esc_attr( $user_name ); ?>">
739
+ <a href="JavaScript:void(0);" class="button button-secondary" id="sbi_switch_accounts"><?php esc_html_e( 'Switch Accounts', 'instagram-feed' ); ?></a>
740
+ </p>
741
+ </form>
742
+ <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
743
+ </div>
744
+ </div>
745
+ <?php
746
+ }
747
+
748
+ function sbi_account_type_display( $type, $private = false ) {
749
+ if ( $type === 'basic' ) {
750
+ $type = 'personal';
751
+ if ( $private ) {
752
+ $type .= ' (private)';
753
+ }
754
+ }
755
+ return $type;
756
+ }
757
+
758
+ function sbi_clear_backups() {
759
+ $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
760
+
761
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
762
+ die ( 'You did not do this the right way!' );
763
+ }
764
+
765
+ //Delete all transients
766
+ global $wpdb;
767
+ $table_name = $wpdb->prefix . "options";
768
+ $wpdb->query( "
769
+ DELETE
770
+ FROM $table_name
771
+ WHERE `option_name` LIKE ('%!sbi\_%')
772
+ " );
773
+ $wpdb->query( "
774
+ DELETE
775
+ FROM $table_name
776
+ WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
777
+ " );
778
+ $wpdb->query( "
779
+ DELETE
780
+ FROM $table_name
781
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
782
+ " );
783
+
784
+ die();
785
+ }
786
+ add_action( 'wp_ajax_sbi_clear_backups', 'sbi_clear_backups' );
787
+
788
+ function sbi_reset_resized() {
789
+
790
+ global $sb_instagram_posts_manager;
791
+ $sb_instagram_posts_manager->delete_all_sbi_instagram_posts();
792
+ delete_option( 'sbi_top_api_calls' );
793
+
794
+ $sb_instagram_posts_manager->add_action_log( 'Reset resizing tables.' );
795
+
796
+ echo "1";
797
+
798
+ die();
799
+ }
800
+ add_action( 'wp_ajax_sbi_reset_resized', 'sbi_reset_resized' );
801
+
802
+ function sbi_reset_log() {
803
+ global $sb_instagram_posts_manager;
804
+
805
+ $sb_instagram_posts_manager->remove_all_errors();
806
+
807
+ echo "1";
808
+
809
+ die();
810
+ }
811
+ add_action( 'wp_ajax_sbi_reset_log', 'sbi_reset_log' );
812
+
813
+ function sbi_reset_api_errors() {
814
+ global $sb_instagram_posts_manager;
815
+ $sb_instagram_posts_manager->add_action_log( 'View feed and retry button clicked.' );
816
+
817
+ $sb_instagram_posts_manager->reset_api_errors();
818
+
819
+ echo "1";
820
+
821
+ die();
822
+ }
823
+ add_action( 'wp_ajax_sbi_reset_api_errors', 'sbi_reset_api_errors' );
824
+
825
+ function sbi_lite_dismiss() {
826
+ $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
827
+
828
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
829
+ die ( 'You did not do this the right way!' );
830
+ }
831
+
832
+ set_transient( 'instagram_feed_dismiss_lite', 'dismiss', 1 * WEEK_IN_SECONDS );
833
+
834
+ die();
835
+ }
836
+ add_action( 'wp_ajax_sbi_lite_dismiss', 'sbi_lite_dismiss' );
837
+
838
+ add_action('admin_notices', 'sbi_admin_error_notices');
839
+ function sbi_admin_error_notices() {
840
+
841
+ if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' )) ) {
842
+
843
+ global $sb_instagram_posts_manager;
844
+
845
+ $errors = $sb_instagram_posts_manager->get_errors();
846
+ if ( ! empty( $errors ) && (! empty( $errors['database_create'] ) || ! empty( $errors['upload_dir'] )) ) : ?>
847
+ <div class="notice notice-warning is-dismissible sbi-admin-notice">
848
+ <?php if ( ! empty( $errors['database_create'] ) ) echo '<p>' . $errors['database_create'] . '</p>'; ?>
849
+
850
+ <?php if ( ! empty( $errors['upload_dir'] ) ) echo '<p>' . $errors['upload_dir'] . '</p>'; ?>
851
+ <p><?php _e( sprintf( 'Visit our %s page for help', '<a href="https://smashballoon.com/instagram-feed/support/faq/" target="_blank">FAQ</a>' ), 'instagram-feed' ); ?></p>
852
+
853
+ </div>
854
+
855
+ <?php endif;
856
+ $errors = $sb_instagram_posts_manager->get_critical_errors();
857
+ if ( $sb_instagram_posts_manager->are_critical_errors() && ! empty( $errors ) ) : ?>
858
+ <div class="notice notice-warning is-dismissible sbi-admin-notice">
859
+ <p><strong><?php echo esc_html__( 'Instagram Feed is encountering an error and your feeds may not be updating due to the following reasons:', 'instagram-feed') ; ?></strong></p>
860
+
861
+ <?php echo $errors; ?>
862
+
863
+ <?php
864
+ $error_page = $sb_instagram_posts_manager->get_error_page();
865
+ if ( $error_page ) {
866
+ echo '<a href="' . get_the_permalink( $error_page ) . '" class="sbi-clear-errors-visit-page sbi-space-left button button-secondary">' . __( 'View Feed and Retry', 'instagram-feed' ) . '</a>';
867
+ }
868
+ ?>
869
+ </div>
870
+ <?php endif;
871
+ }
872
+
873
+ }
874
+
875
+ function sbi_get_user_names_of_personal_accounts_not_also_already_updated() {
876
+ $sbi_options = get_option( 'sb_instagram_settings', array() );
877
+ $users_in_personal_accounts = array();
878
+ $non_personal_account_users = array();
879
+
880
+ $connected_accounts = isset( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
881
+
882
+ if ( ! empty( $connected_accounts ) ) {
883
+
884
+ foreach ( $connected_accounts as $account ) {
885
+ $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
886
+
887
+ if ( $account_type === 'personal' ) {
888
+ $users_in_personal_accounts[] = $account['username'];
889
+ } else {
890
+ $non_personal_account_users[] = $account['username'];
891
+ }
892
+
893
+ }
894
+
895
+ if ( ! empty( $users_in_personal_accounts ) ) {
896
+ $user_accounts_that_need_updating = array();
897
+ foreach ( $users_in_personal_accounts as $personal_user ) {
898
+ if ( ! in_array( $personal_user, $non_personal_account_users, true ) && $personal_user !== '' ) {
899
+ $user_accounts_that_need_updating[] = $personal_user;
900
+ }
901
+ }
902
+
903
+ return $user_accounts_that_need_updating;
904
+ }
905
+ } elseif ( empty( $connected_accounts ) && ! empty( $sbi_options['sb_instagram_at'] ) ) {
906
+ return array( 'your Instagram feed');
907
+ }
908
+
909
+ return array();
910
+ }
911
+
912
+ function sbi_get_current_time() {
913
+ $current_time = time();
914
+
915
+ // where to do tests
916
+ // $current_time = strtotime( 'November 25, 2020' ) + 1;
917
+
918
+ return $current_time;
919
+ }
920
+
921
+ // generates the html for the admin notices
922
+ function sbi_notices_html() {
923
+
924
+ }
925
+ //add_action( 'admin_notices', 'sbi_notices_html', 8 ); // priority 12 for Twitter, priority 10 for Facebook
926
+
927
+
928
+ function sbi_get_future_date( $month, $year, $week, $day, $direction ) {
929
+ if ( $direction > 0 ) {
930
+ $startday = 1;
931
+ } else {
932
+ $startday = date( 't', mktime(0, 0, 0, $month, 1, $year ) );
933
+ }
934
+
935
+ $start = mktime( 0, 0, 0, $month, $startday, $year );
936
+ $weekday = date( 'N', $start );
937
+
938
+ $offset = 0;
939
+ if ( $direction * $day >= $direction * $weekday ) {
940
+ $offset = -$direction * 7;
941
+ }
942
+
943
+ $offset += $direction * ($week * 7) + ($day - $weekday);
944
+ return mktime( 0, 0, 0, $month, $startday + $offset, $year );
945
+ }
946
+
947
+ function sbi_admin_hide_unrelated_notices() {
948
+
949
+ // Bail if we're not on a sbi screen or page.
950
+ if ( ! isset( $_GET['page'] ) || ( strpos( $_GET['page'], 'sb-instagram-feed') === false && strpos( $_GET['page'], 'sbi-') === false ) ) {
951
+ return;
952
+ }
953
+
954
+ // Extra banned classes and callbacks from third-party plugins.
955
+ $blacklist = array(
956
+ 'classes' => array(),
957
+ 'callbacks' => array(
958
+ 'sbidb_admin_notice', // 'Database for sbi' plugin.
959
+ ),
960
+ );
961
+
962
+ global $wp_filter;
963
+
964
+ foreach ( array( 'user_admin_notices', 'admin_notices', 'all_admin_notices' ) as $notices_type ) {
965
+ if ( empty( $wp_filter[ $notices_type ]->callbacks ) || ! is_array( $wp_filter[ $notices_type ]->callbacks ) ) {
966
+ continue;
967
+ }
968
+ foreach ( $wp_filter[ $notices_type ]->callbacks as $priority => $hooks ) {
969
+ foreach ( $hooks as $name => $arr ) {
970
+ if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
971
+ unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
972
+ continue;
973
+ }
974
+ $class = ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) ? strtolower( get_class( $arr['function'][0] ) ) : '';
975
+ if (
976
+ ! empty( $class ) &&
977
+ strpos( $class, 'sbi' ) !== false &&
978
+ ! in_array( $class, $blacklist['classes'], true )
979
+ ) {
980
+ continue;
981
+ }
982
+ if (
983
+ ! empty( $name ) && (
984
+ strpos( $name, 'sbi' ) === false ||
985
+ in_array( $class, $blacklist['classes'], true ) ||
986
+ in_array( $name, $blacklist['callbacks'], true )
987
+ )
988
+ ) {
989
+ unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
990
+ }
991
+ }
992
+ }
993
+ }
994
+ }
995
+ add_action( 'admin_print_scripts', 'sbi_admin_hide_unrelated_notices' );
996
+
997
+ /* Usage */
998
+ add_action( 'admin_notices', 'sbi_usage_opt_in' );
999
+ function sbi_usage_opt_in() {
1000
+ if ( isset( $_GET['trackingdismiss'] ) ) {
1001
+ $usage_tracking = get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => false ) );
1002
+
1003
+ $usage_tracking['enabled'] = false;
1004
+
1005
+ update_option( 'sbi_usage_tracking', $usage_tracking, false );
1006
+
1007
+ return;
1008
+ }
1009
+
1010
+ $cap = current_user_can( 'manage_instagram_feed_options' ) ? 'manage_instagram_feed_options' : 'manage_options';
1011
+
1012
+ $cap = apply_filters( 'sbi_settings_pages_capability', $cap );
1013
+ if ( ! current_user_can( $cap ) ) {
1014
+ return;
1015
+ }
1016
+ $usage_tracking = sbi_get_option( 'sbi_usage_tracking', false );
1017
+ if ( $usage_tracking ) {
1018
+ return;
1019
+ }
1020
+ ?>
1021
+ <div class="notice notice-warning is-dismissible sbi-admin-notice">
1022
+
1023
+ <p>
1024
+ <strong><?php echo __( 'Help us improve the Instagram Feed plugin', 'instagram-feed' ); ?></strong><br>
1025
+ <?php echo __( 'Understanding how you are using the plugin allows us to further improve it. Opt-in below to agree to send a weekly report of plugin usage data.', 'instagram-feed' ); ?>
1026
+ <a target="_blank" rel="noopener noreferrer" href="https://smashballoon.com/instagram-feed/usage-tracking/"><?php echo __( 'More information', 'instagram-feed' ); ?></a>
1027
+ </p>
1028
+ <p>
1029
+ <a href="<?php echo admin_url('admin.php?page=sb-instagram-feed&trackingdismiss=1') ?>" class="button button-primary sb-opt-in"><?php echo __( 'Yes, I\'d like to help', 'instagram-feed' ); ?></a>
1030
+ <a href="<?php echo admin_url('admin.php?page=sb-instagram-feed&trackingdismiss=1') ?>" class="sb-no-usage-opt-out sbi-space-left button button-secondary"><?php echo __( 'No, thanks', 'instagram-feed' ); ?></a>
1031
+ </p>
1032
+
1033
+ </div>
1034
+
1035
+ <?php
1036
+ }
1037
+
1038
+ function sbi_usage_opt_in_or_out() {
1039
+ $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
1040
+
1041
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
1042
+ die ( 'You did not do this the right way!' );
1043
+ }
1044
+
1045
+ $usage_tracking = sbi_get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => false ) );
1046
+
1047
+ $usage_tracking['enabled'] = isset( $_POST['opted_in'] ) ? $_POST['opted_in'] === 'true' : false;
1048
+
1049
+ sbi_update_option( 'sbi_usage_tracking', $usage_tracking, false );
1050
+
1051
+ die();
1052
+ }
1053
+ add_action( 'wp_ajax_sbi_usage_opt_in_or_out', 'sbi_usage_opt_in_or_out' );
1054
+
1055
+ function sbi_oembed_disable() {
1056
+ $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
1057
+
1058
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
1059
+ die ( 'You did not do this the right way!' );
1060
+ }
1061
+
1062
+ $oembed_settings = get_option( 'sbi_oembed_token', array() );
1063
+ $oembed_settings['access_token'] = '';
1064
+ $oembed_settings['disabled'] = true;
1065
+ echo '<strong>';
1066
+ if ( update_option( 'sbi_oembed_token', $oembed_settings ) ) {
1067
+ _e( 'Instagram oEmbeds will no longer be handled by Instagram Feed.', 'instagram-feed' );
1068
+ } else {
1069
+ _e( 'An error occurred when trying to delete your oEmbed token.', 'instagram-feed' );
1070
+ }
1071
+ echo '</strong>';
1072
+
1073
+ die();
1074
+ }
1075
+ add_action( 'wp_ajax_sbi_oembed_disable', 'sbi_oembed_disable' );
inc/admin/addon-functions.php CHANGED
@@ -1,175 +1,175 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
-
4
- /**
5
- * Deactivate addon.
6
- *
7
- * @since 1.0.0
8
- */
9
- function sbi_deactivate_addon() {
10
-
11
- // Run a security check.
12
- check_ajax_referer( 'sbi-admin', 'nonce' );
13
-
14
- // Check for permissions.
15
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
16
- wp_send_json_error();
17
- }
18
-
19
- $type = 'addon';
20
- if ( ! empty( $_POST['type'] ) ) {
21
- $type = sanitize_key( $_POST['type'] );
22
- }
23
-
24
- if ( isset( $_POST['plugin'] ) ) {
25
- deactivate_plugins( $_POST['plugin'] );
26
-
27
- if ( 'plugin' === $type ) {
28
- wp_send_json_success( esc_html__( 'Plugin deactivated.', 'instagram-feed' ) );
29
- } else {
30
- wp_send_json_success( esc_html__( 'Addon deactivated.', 'instagram-feed' ) );
31
- }
32
- }
33
-
34
- wp_send_json_error( esc_html__( 'Could not deactivate the addon. Please deactivate from the Plugins page.', 'instagram-feed' ) );
35
- }
36
- add_action( 'wp_ajax_sbi_deactivate_addon', 'sbi_deactivate_addon' );
37
-
38
- /**
39
- * Activate addon.
40
- *
41
- * @since 1.0.0
42
- */
43
- function sbi_activate_addon() {
44
-
45
- // Run a security check.
46
- check_ajax_referer( 'sbi-admin', 'nonce' );
47
-
48
- // Check for permissions.
49
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
50
- wp_send_json_error();
51
- }
52
-
53
- if ( isset( $_POST['plugin'] ) ) {
54
-
55
- $type = 'addon';
56
- if ( ! empty( $_POST['type'] ) ) {
57
- $type = sanitize_key( $_POST['type'] );
58
- }
59
-
60
- $activate = activate_plugins( $_POST['plugin'] );
61
-
62
- if ( ! is_wp_error( $activate ) ) {
63
- if ( 'plugin' === $type ) {
64
- wp_send_json_success( esc_html__( 'Plugin activated.', 'instagram-feed' ) );
65
- } else {
66
- wp_send_json_success( esc_html__( 'Addon activated.', 'instagram-feed' ) );
67
- }
68
- }
69
- }
70
-
71
- wp_send_json_error( esc_html__( 'Could not activate addon. Please activate from the Plugins page.', 'instagram-feed' ) );
72
- }
73
- add_action( 'wp_ajax_sbi_activate_addon', 'sbi_activate_addon' );
74
-
75
- /**
76
- * Install addon.
77
- *
78
- * @since 1.0.0
79
- */
80
- function sbi_install_addon() {
81
-
82
- // Run a security check.
83
- check_ajax_referer( 'sbi-admin', 'nonce' );
84
-
85
- // Check for permissions.
86
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
87
- wp_send_json_error();
88
- }
89
-
90
- $error = esc_html__( 'Could not install addon. Please download from wpforms.com and install manually.', 'instagram-feed' );
91
-
92
- if ( empty( $_POST['plugin'] ) ) {
93
- wp_send_json_error( $error );
94
- }
95
-
96
- // Set the current screen to avoid undefined notices.
97
- set_current_screen( 'sb-instagram-feed-about' );
98
-
99
- // Prepare variables.
100
- $url = esc_url_raw(
101
- add_query_arg(
102
- array(
103
- 'page' => 'sb-instagram-feed-about',
104
- ),
105
- admin_url( 'admin.php' )
106
- )
107
- );
108
-
109
- $creds = request_filesystem_credentials( $url, '', false, false, null );
110
-
111
- // Check for file system permissions.
112
- if ( false === $creds ) {
113
- wp_send_json_error( $error );
114
- }
115
-
116
- if ( ! WP_Filesystem( $creds ) ) {
117
- wp_send_json_error( $error );
118
- }
119
-
120
- /*
121
- * We do not need any extra credentials if we have gotten this far, so let's install the plugin.
122
- */
123
-
124
- require_once SBI_PLUGIN_DIR . 'inc/admin/class-install-skin.php';
125
-
126
- // Do not allow WordPress to search/download translations, as this will break JS output.
127
- remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
128
-
129
- // Create the plugin upgrader with our custom skin.
130
- $installer = new Sbi\Helpers\PluginSilentUpgrader( new Sbi_Install_Skin() );
131
-
132
- // Error check.
133
- if ( ! method_exists( $installer, 'install' ) || empty( $_POST['plugin'] ) ) {
134
- wp_send_json_error( $error );
135
- }
136
-
137
- $installer->install( $_POST['plugin'] ); // phpcs:ignore
138
-
139
- // Flush the cache and return the newly installed plugin basename.
140
- wp_cache_flush();
141
-
142
- $plugin_basename = $installer->plugin_info();
143
-
144
- if ( $plugin_basename ) {
145
-
146
- $type = 'addon';
147
- if ( ! empty( $_POST['type'] ) ) {
148
- $type = sanitize_key( $_POST['type'] );
149
- }
150
-
151
- // Activate the plugin silently.
152
- $activated = activate_plugin( $plugin_basename );
153
-
154
- if ( ! is_wp_error( $activated ) ) {
155
- wp_send_json_success(
156
- array(
157
- 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed & activated.', 'instagram-feed' ) : esc_html__( 'Addon installed & activated.', 'instagram-feed' ),
158
- 'is_activated' => true,
159
- 'basename' => $plugin_basename,
160
- )
161
- );
162
- } else {
163
- wp_send_json_success(
164
- array(
165
- 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed.', 'instagram-feed' ) : esc_html__( 'Addon installed.', 'instagram-feed' ),
166
- 'is_activated' => false,
167
- 'basename' => $plugin_basename,
168
- )
169
- );
170
- }
171
- }
172
-
173
- wp_send_json_error( $error );
174
- }
175
  add_action( 'wp_ajax_sbi_install_addon', 'sbi_install_addon' );
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ /**
5
+ * Deactivate addon.
6
+ *
7
+ * @since 1.0.0
8
+ */
9
+ function sbi_deactivate_addon() {
10
+
11
+ // Run a security check.
12
+ check_ajax_referer( 'sbi-admin', 'nonce' );
13
+
14
+ // Check for permissions.
15
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
16
+ wp_send_json_error();
17
+ }
18
+
19
+ $type = 'addon';
20
+ if ( ! empty( $_POST['type'] ) ) {
21
+ $type = sanitize_key( $_POST['type'] );
22
+ }
23
+
24
+ if ( isset( $_POST['plugin'] ) ) {
25
+ deactivate_plugins( $_POST['plugin'] );
26
+
27
+ if ( 'plugin' === $type ) {
28
+ wp_send_json_success( esc_html__( 'Plugin deactivated.', 'instagram-feed' ) );
29
+ } else {
30
+ wp_send_json_success( esc_html__( 'Addon deactivated.', 'instagram-feed' ) );
31
+ }
32
+ }
33
+
34
+ wp_send_json_error( esc_html__( 'Could not deactivate the addon. Please deactivate from the Plugins page.', 'instagram-feed' ) );
35
+ }
36
+ add_action( 'wp_ajax_sbi_deactivate_addon', 'sbi_deactivate_addon' );
37
+
38
+ /**
39
+ * Activate addon.
40
+ *
41
+ * @since 1.0.0
42
+ */
43
+ function sbi_activate_addon() {
44
+
45
+ // Run a security check.
46
+ check_ajax_referer( 'sbi-admin', 'nonce' );
47
+
48
+ // Check for permissions.
49
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
50
+ wp_send_json_error();
51
+ }
52
+
53
+ if ( isset( $_POST['plugin'] ) ) {
54
+
55
+ $type = 'addon';
56
+ if ( ! empty( $_POST['type'] ) ) {
57
+ $type = sanitize_key( $_POST['type'] );
58
+ }
59
+
60
+ $activate = activate_plugins( $_POST['plugin'] );
61
+
62
+ if ( ! is_wp_error( $activate ) ) {
63
+ if ( 'plugin' === $type ) {
64
+ wp_send_json_success( esc_html__( 'Plugin activated.', 'instagram-feed' ) );
65
+ } else {
66
+ wp_send_json_success( esc_html__( 'Addon activated.', 'instagram-feed' ) );
67
+ }
68
+ }
69
+ }
70
+
71
+ wp_send_json_error( esc_html__( 'Could not activate addon. Please activate from the Plugins page.', 'instagram-feed' ) );
72
+ }
73
+ add_action( 'wp_ajax_sbi_activate_addon', 'sbi_activate_addon' );
74
+
75
+ /**
76
+ * Install addon.
77
+ *
78
+ * @since 1.0.0
79
+ */
80
+ function sbi_install_addon() {
81
+
82
+ // Run a security check.
83
+ check_ajax_referer( 'sbi-admin', 'nonce' );
84
+
85
+ // Check for permissions.
86
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
87
+ wp_send_json_error();
88
+ }
89
+
90
+ $error = esc_html__( 'Could not install addon. Please download from wpforms.com and install manually.', 'instagram-feed' );
91
+
92
+ if ( empty( $_POST['plugin'] ) ) {
93
+ wp_send_json_error( $error );
94
+ }
95
+
96
+ // Set the current screen to avoid undefined notices.
97
+ set_current_screen( 'sb-instagram-feed-about' );
98
+
99
+ // Prepare variables.
100
+ $url = esc_url_raw(
101
+ add_query_arg(
102
+ array(
103
+ 'page' => 'sb-instagram-feed-about',
104
+ ),
105
+ admin_url( 'admin.php' )
106
+ )
107
+ );
108
+
109
+ $creds = request_filesystem_credentials( $url, '', false, false, null );
110
+
111
+ // Check for file system permissions.
112
+ if ( false === $creds ) {
113
+ wp_send_json_error( $error );
114
+ }
115
+
116
+ if ( ! WP_Filesystem( $creds ) ) {
117
+ wp_send_json_error( $error );
118
+ }
119
+
120
+ /*
121
+ * We do not need any extra credentials if we have gotten this far, so let's install the plugin.
122
+ */
123
+
124
+ require_once SBI_PLUGIN_DIR . 'inc/admin/class-install-skin.php';
125
+
126
+ // Do not allow WordPress to search/download translations, as this will break JS output.
127
+ remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
128
+
129
+ // Create the plugin upgrader with our custom skin.
130
+ $installer = new Sbi\Helpers\PluginSilentUpgrader( new Sbi_Install_Skin() );
131
+
132
+ // Error check.
133
+ if ( ! method_exists( $installer, 'install' ) || empty( $_POST['plugin'] ) ) {
134
+ wp_send_json_error( $error );
135
+ }
136
+
137
+ $installer->install( $_POST['plugin'] ); // phpcs:ignore
138
+
139
+ // Flush the cache and return the newly installed plugin basename.
140
+ wp_cache_flush();
141
+
142
+ $plugin_basename = $installer->plugin_info();
143
+
144
+ if ( $plugin_basename ) {
145
+
146
+ $type = 'addon';
147
+ if ( ! empty( $_POST['type'] ) ) {
148
+ $type = sanitize_key( $_POST['type'] );
149
+ }
150
+
151
+ // Activate the plugin silently.
152
+ $activated = activate_plugin( $plugin_basename );
153
+
154
+ if ( ! is_wp_error( $activated ) ) {
155
+ wp_send_json_success(
156
+ array(
157
+ 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed & activated.', 'instagram-feed' ) : esc_html__( 'Addon installed & activated.', 'instagram-feed' ),
158
+ 'is_activated' => true,
159
+ 'basename' => $plugin_basename,
160
+ )
161
+ );
162
+ } else {
163
+ wp_send_json_success(
164
+ array(
165
+ 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed.', 'instagram-feed' ) : esc_html__( 'Addon installed.', 'instagram-feed' ),
166
+ 'is_activated' => false,
167
+ 'basename' => $plugin_basename,
168
+ )
169
+ );
170
+ }
171
+ }
172
+
173
+ wp_send_json_error( $error );
174
+ }
175
  add_action( 'wp_ajax_sbi_install_addon', 'sbi_install_addon' );
inc/admin/blocks/class-sbi-blocks.php CHANGED
@@ -1,149 +1,149 @@
1
- <?php
2
- /**
3
- * Instagram Feed block with live preview.
4
- *
5
- * @since 2.3
6
- */
7
- class SB_Instagram_Blocks {
8
-
9
- /**
10
- * Indicates if current integration is allowed to load.
11
- *
12
- * @since 1.8
13
- *
14
- * @return bool
15
- */
16
- public function allow_load() {
17
- return function_exists( 'register_block_type' );
18
- }
19
-
20
- /**
21
- * Loads an integration.
22
- *
23
- * @since 2.3
24
- */
25
- public function load() {
26
- $this->hooks();
27
- }
28
-
29
- /**
30
- * Integration hooks.
31
- *
32
- * @since 2.3
33
- */
34
- protected function hooks() {
35
- add_action( 'init', array( $this, 'register_block' ) );
36
- add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) );
37
- }
38
-
39
- /**
40
- * Register Instagram Feed Gutenberg block on the backend.
41
- *
42
- * @since 2.3
43
- */
44
- public function register_block() {
45
-
46
- wp_register_style(
47
- 'sbi-blocks-styles',
48
- trailingslashit( SBI_PLUGIN_URL ) . 'css/sb-blocks.css',
49
- array( 'wp-edit-blocks' ),
50
- SBIVER
51
- );
52
-
53
- $attributes = array(
54
- 'shortcodeSettings' => array(
55
- 'type' => 'string',
56
- ),
57
- 'noNewChanges' => array(
58
- 'type' => 'boolean',
59
- )
60
- );
61
-
62
- register_block_type(
63
- 'sbi/sbi-feed-block',
64
- array(
65
- 'attributes' => $attributes,
66
- 'render_callback' => array( $this, 'get_feed_html' ),
67
- )
68
- );
69
- }
70
-
71
- /**
72
- * Load Instagram Feed Gutenberg block scripts.
73
- *
74
- * @since 2.3
75
- */
76
- public function enqueue_block_editor_assets() {
77
- $db = sbi_get_database_settings();
78
-
79
- sb_instagram_scripts_enqueue();
80
-
81
- wp_enqueue_style( 'sbi-blocks-styles' );
82
- wp_enqueue_script(
83
- 'sbi-feed-block',
84
- trailingslashit( SBI_PLUGIN_URL ) . 'js/sb-blocks.js',
85
- array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
86
- SBIVER,
87
- true
88
- );
89
-
90
- $shortcodeSettings = '';
91
-
92
- $i18n = array(
93
- 'addSettings' => esc_html__( 'Add Settings', 'instagram-feed' ),
94
- 'shortcodeSettings' => esc_html__( 'Shortcode Settings', 'instagram-feed' ),
95
- 'example' => esc_html__( 'Example', 'instagram-feed' ),
96
- 'preview' => esc_html__( 'Apply Changes', 'instagram-feed' ),
97
-
98
- );
99
-
100
- wp_localize_script(
101
- 'sbi-feed-block',
102
- 'sbi_block_editor',
103
- array(
104
- 'wpnonce' => wp_create_nonce( 'sb-instagram-blocks' ),
105
- 'canShowFeed' => ! empty( $db['connected_accounts'] ),
106
- 'configureLink' => get_admin_url() . '?page=sb-instagram-feed',
107
- 'shortcodeSettings' => $shortcodeSettings,
108
- 'i18n' => $i18n,
109
- )
110
- );
111
- }
112
-
113
- /**
114
- * Get form HTML to display in a Instagram Feed Gutenberg block.
115
- *
116
- * @param array $attr Attributes passed by Instagram Feed Gutenberg block.
117
- *
118
- * @since 2.3
119
- *
120
- * @return string
121
- */
122
- public function get_feed_html( $attr ) {
123
-
124
- $return = '';
125
-
126
- $shortcode_settings = isset( $attr['shortcodeSettings'] ) ? $attr['shortcodeSettings'] : '';
127
-
128
- $shortcode_settings = str_replace(array( '[instagram-feed', ']' ), '', $shortcode_settings );
129
-
130
- $return .= do_shortcode( '[instagram-feed '.$shortcode_settings.']' );
131
-
132
- return $return;
133
-
134
- }
135
-
136
- /**
137
- * Checking if is Gutenberg REST API call.
138
- *
139
- * @since 2.3
140
- *
141
- * @return bool True if is Gutenberg REST API call.
142
- */
143
- public static function is_gb_editor() {
144
-
145
- // TODO: Find a better way to check if is GB editor API call.
146
- return defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore
147
- }
148
-
149
- }
1
+ <?php
2
+ /**
3
+ * Instagram Feed block with live preview.
4
+ *
5
+ * @since 2.3
6
+ */
7
+ class SB_Instagram_Blocks {
8
+
9
+ /**
10
+ * Indicates if current integration is allowed to load.
11
+ *
12
+ * @since 1.8
13
+ *
14
+ * @return bool
15
+ */
16
+ public function allow_load() {
17
+ return function_exists( 'register_block_type' );
18
+ }
19
+
20
+ /**
21
+ * Loads an integration.
22
+ *
23
+ * @since 2.3
24
+ */
25
+ public function load() {
26
+ $this->hooks();
27
+ }
28
+
29
+ /**
30
+ * Integration hooks.
31
+ *
32
+ * @since 2.3
33
+ */
34
+ protected function hooks() {
35
+ add_action( 'init', array( $this, 'register_block' ) );
36
+ add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) );
37
+ }
38
+
39
+ /**
40
+ * Register Instagram Feed Gutenberg block on the backend.
41
+ *
42
+ * @since 2.3
43
+ */
44
+ public function register_block() {
45
+
46
+ wp_register_style(
47
+ 'sbi-blocks-styles',
48
+ trailingslashit( SBI_PLUGIN_URL ) . 'css/sb-blocks.css',
49
+ array( 'wp-edit-blocks' ),
50
+ SBIVER
51
+ );
52
+
53
+ $attributes = array(
54
+ 'shortcodeSettings' => array(
55
+ 'type' => 'string',
56
+ ),
57
+ 'noNewChanges' => array(
58
+ 'type' => 'boolean',
59
+ )
60
+ );
61
+
62
+ register_block_type(
63
+ 'sbi/sbi-feed-block',
64
+ array(
65
+ 'attributes' => $attributes,
66
+ 'render_callback' => array( $this, 'get_feed_html' ),
67
+ )
68
+ );
69
+ }
70
+
71
+ /**
72
+ * Load Instagram Feed Gutenberg block scripts.
73
+ *
74
+ * @since 2.3
75
+ */
76
+ public function enqueue_block_editor_assets() {
77
+ $db = sbi_get_database_settings();
78
+
79
+ sb_instagram_scripts_enqueue();
80
+
81
+ wp_enqueue_style( 'sbi-blocks-styles' );
82
+ wp_enqueue_script(
83
+ 'sbi-feed-block',
84
+ trailingslashit( SBI_PLUGIN_URL ) . 'js/sb-blocks.js',
85
+ array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
86
+ SBIVER,
87
+ true
88
+ );
89
+
90
+ $shortcodeSettings = '';
91
+
92
+ $i18n = array(
93
+ 'addSettings' => esc_html__( 'Add Settings', 'instagram-feed' ),
94
+ 'shortcodeSettings' => esc_html__( 'Shortcode Settings', 'instagram-feed' ),
95
+ 'example' => esc_html__( 'Example', 'instagram-feed' ),
96
+ 'preview' => esc_html__( 'Apply Changes', 'instagram-feed' ),
97
+
98
+ );
99
+
100
+ wp_localize_script(
101
+ 'sbi-feed-block',
102
+ 'sbi_block_editor',
103
+ array(
104
+ 'wpnonce' => wp_create_nonce( 'sb-instagram-blocks' ),
105
+ 'canShowFeed' => ! empty( $db['connected_accounts'] ),
106
+ 'configureLink' => get_admin_url() . '?page=sb-instagram-feed',
107
+ 'shortcodeSettings' => $shortcodeSettings,
108
+ 'i18n' => $i18n,
109
+ )
110
+ );
111
+ }
112
+
113
+ /**
114
+ * Get form HTML to display in a Instagram Feed Gutenberg block.
115
+ *
116
+ * @param array $attr Attributes passed by Instagram Feed Gutenberg block.
117
+ *
118
+ * @since 2.3
119
+ *
120
+ * @return string
121
+ */
122
+ public function get_feed_html( $attr ) {
123
+
124
+ $return = '';
125
+
126
+ $shortcode_settings = isset( $attr['shortcodeSettings'] ) ? $attr['shortcodeSettings'] : '';
127
+
128
+ $shortcode_settings = str_replace(array( '[instagram-feed', ']' ), '', $shortcode_settings );
129
+
130
+ $return .= do_shortcode( '[instagram-feed '.$shortcode_settings.']' );
131
+
132
+ return $return;
133
+
134
+ }
135
+
136
+ /**
137
+ * Checking if is Gutenberg REST API call.
138
+ *
139
+ * @since 2.3
140
+ *
141
+ * @return bool True if is Gutenberg REST API call.
142
+ */
143
+ public static function is_gb_editor() {
144
+
145
+ // TODO: Find a better way to check if is GB editor API call.
146
+ return defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore
147
+ }
148
+
149
+ }
inc/admin/class-install-skin.php CHANGED
@@ -1,27 +1,27 @@
1
- <?php
2
-
3
- use Sbi\Helpers\PluginSilentUpgraderSkin;
4
-
5
- /**
6
- * Skin for on-the-fly addon installations.
7
- *
8
- * @since 1.0.0
9
- * @since 1.5.6.1 Extend PluginSilentUpgraderSkin and clean up the class.
10
- */
11
- class Sbi_Install_Skin extends PluginSilentUpgraderSkin {
12
-
13
- /**
14
- * Instead of outputting HTML for errors, json_encode the errors and send them
15
- * back to the Ajax script for processing.
16
- *
17
- * @since 1.0.0
18
- *
19
- * @param array $errors Array of errors with the install process.
20
- */
21
- public function error( $errors ) {
22
-
23
- if ( ! empty( $errors ) ) {
24
- wp_send_json_error( $errors );
25
- }
26
- }
27
- }
1
+ <?php
2
+
3
+ use Sbi\Helpers\PluginSilentUpgraderSkin;
4
+
5
+ /**
6
+ * Skin for on-the-fly addon installations.
7
+ *
8
+ * @since 1.0.0
9
+ * @since 1.5.6.1 Extend PluginSilentUpgraderSkin and clean up the class.
10
+ */
11
+ class Sbi_Install_Skin extends PluginSilentUpgraderSkin {
12
+
13
+ /**
14
+ * Instead of outputting HTML for errors, json_encode the errors and send them
15
+ * back to the Ajax script for processing.
16
+ *
17
+ * @since 1.0.0
18
+ *
19
+ * @param array $errors Array of errors with the install process.
20
+ */
21
+ public function error( $errors ) {
22
+
23
+ if ( ! empty( $errors ) ) {
24
+ wp_send_json_error( $errors );
25
+ }
26
+ }
27
+ }
inc/admin/class-sbi-about.php CHANGED
@@ -1,1319 +1,1319 @@
1
- <?php
2
-
3
- /**
4
- * About Sbi admin page class.
5
- *
6
- * @since 2.4/5.5
7
- */
8
- class SB_Instagram_About {
9
-
10
- /**
11
- * Admin menu page slug.
12
- *
13
- * @since 2.4/5.5
14
- *
15
- * @var string
16
- */
17
- const SLUG = 'sb-instagram-feed-about';
18
-
19
- /**
20
- * Default view for a page.
21
- *
22
- * @since 2.4/5.5
23
- *
24
- * @var string
25
- */
26
- const DEFAULT_TAB = 'about';
27
-
28
- /**
29
- * Array of license types, that are considered being top level and has no features difference.
30
- *
31
- * @since 2.4/5.5
32
- *
33
- * @var array
34
- */
35
- public static $licenses_top = array( 'pro', 'agency', 'ultimate', 'elite' );
36
-
37
- /**
38
- * List of features that licenses are different with.
39
- *
40
- * @since 2.4/5.5
41
- *
42
- * @var array
43
- */
44
- public static $licenses_features = array();
45
-
46
- /**
47
- * The current active tab.
48
- *
49
- * @since 2.4/5.5
50
- *
51
- * @var string
52
- */
53
- public $view;
54
-
55
- /**
56
- * The core views.
57
- *
58
- * @since 2.4/5.5
59
- *
60
- * @var array
61
- */
62
- public $views = array();
63
-
64
- /**
65
- * Primary class constructor.
66
- *
67
- * @since 2.4/5.5
68
- */
69
- public function __construct() {
70
-
71
- // In old PHP we can't define this elsewhere.
72
- self::$licenses_features = array(
73
- 'entries' => esc_html__( 'Feed Types', 'instagram-feed' ),
74
- 'fields' => esc_html__( 'Layouts', 'instagram-feed' ),
75
- 'templates' => esc_html__( 'Post Information', 'instagram-feed' ),
76
- 'conditionals' => esc_html__( 'Image and Video Display', 'instagram-feed' ),
77
- 'addons' => esc_html__( 'Filtering', 'instagram-feed' ),
78
- //'marketing' => esc_html__( 'Filtering', 'instagram-feed' ),
79
- 'marketing' => esc_html__( 'Instagram Stories', 'instagram-feed' ),
80
- 'payments' => esc_html__( 'Feed Moderation', 'instagram-feed' ),
81
- 'surveys' => esc_html__( 'Header Display', 'instagram-feed' ),
82
- 'advanced' => esc_html__( 'Post Linking', 'instagram-feed' ),
83
- 'support' => esc_html__( 'Customer Support', 'instagram-feed' ),
84
- );
85
-
86
- // Maybe load tools page.
87
- add_action( 'admin_init', array( $this, 'init' ) );
88
- }
89
-
90
- /**
91
- * Determining if the user is viewing the our page, if so, party on.
92
- *
93
- * @since 2.4/5.5
94
- */
95
- public function init() {
96
-
97
- // Check what page we are on.
98
- $page = isset( $_GET['page'] ) ? $_GET['page'] : '';
99
-
100
- // Only load if we are actually on the settings page.
101
- if ( self::SLUG !== $page ) {
102
- return;
103
- }
104
-
105
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueues' ) );
106
-
107
- /*
108
- * Define the core views for the our tab.
109
- */
110
- $this->views = apply_filters(
111
- 'sbi_admin_about_views',
112
- array(
113
- esc_html__( 'About Us', 'instagram-feed' ) => array( 'about' ),
114
- esc_html__( 'Getting Started', 'instagram-feed' ) => array( 'getting-started' ),
115
- )
116
- );
117
-
118
- $license = $this->get_license_type();
119
-
120
- if (
121
- (
122
- $license === 'pro' ||
123
- ! in_array( $license, self::$licenses_top, true )
124
- )
125
- //sbi_debug()
126
- ) {
127
- $vs_tab_name = sprintf( /* translators: %1$s - current license type, %2$s - suggested license type. */
128
- esc_html__( '%1$s vs %2$s', 'instagram-feed' ),
129
- ucfirst( $license ),
130
- $this->get_next_license( $license )
131
- );
132
-
133
- $this->views[ $vs_tab_name ] = array( 'versus' );
134
- }
135
-
136
- // Determine the current active settings tab.
137
- $this->view = ! empty( $_GET['view'] ) ? esc_html( $_GET['view'] ) : self::DEFAULT_TAB;
138
-
139
- // If the user tries to load an invalid view - fallback to About Us.
140
- if (
141
- ! in_array( $this->view, call_user_func_array( 'array_merge', array_values( $this->views ) ), true ) &&
142
- ! has_action( 'sbi_admin_about_display_tab_' . sanitize_key( $this->view ) )
143
- ) {
144
- $this->view = self::DEFAULT_TAB;
145
- }
146
-
147
- add_action( 'sbi_admin_page', array( $this, 'output' ) );
148
-
149
- // Hook for addons.
150
- do_action( 'sbi_admin_about_init' );
151
- }
152
-
153
- /**
154
- * Enqueue assets for the the page.
155
- *
156
- * @since 2.4/5.5
157
- */
158
- public function enqueues() {
159
-
160
- wp_enqueue_script(
161
- 'jquery-matchheight',
162
- SBI_PLUGIN_URL . 'js/jquery.matchHeight-min.js',
163
- array( 'jquery' ),
164
- '0.7.0',
165
- false
166
- );
167
- }
168
-
169
- /**
170
- * Output the basic page structure.
171
- *
172
- * @since 2.4/5.5
173
- */
174
- public function output() {
175
-
176
- $show_nav = false;
177
- foreach ( $this->views as $view ) {
178
- if ( in_array( $this->view, (array) $view, true ) ) {
179
- $show_nav = true;
180
- break;
181
- }
182
- }
183
- ?>
184
-
185
- <div id="sbi-admin-about" class="wrap sbi-admin-wrap">
186
-
187
- <?php
188
- if ( $show_nav ) {
189
- $license = $this->get_license_type();
190
- $next_license = $this->get_next_license( $license );
191
- echo '<ul class="sbi-admin-tabs">';
192
- foreach ( $this->views as $label => $view ) {
193
- $class = in_array( $this->view, $view, true ) ? 'active' : '';
194
- echo '<li>';
195
- printf(
196
- '<a href="%s" class="%s">%s</a>',
197
- esc_url( admin_url( 'admin.php?page=' . self::SLUG . '&view=' . sanitize_key( $view[0] ) ) ),
198
- esc_attr( $class ),
199
- esc_html( $label )
200
- );
201
- echo '</li>';
202
- }
203
- echo '</ul>';
204
- }
205
- ?>
206
-
207
- <h1 class="sbi-h1-placeholder"></h1>
208
-
209
- <?php
210
- switch ( $this->view ) {
211
- case 'about':
212
- $this->output_about();
213
- break;
214
- case 'getting-started':
215
- $this->output_getting_started();
216
- break;
217
- case 'versus':
218
- $this->output_versus();
219
- break;
220
- default:
221
- do_action( 'sbi_admin_about_display_tab_' . sanitize_key( $this->view ) );
222
- break;
223
- }
224
- ?>
225
-
226
- </div>
227
-
228
- <?php
229
- }
230
-
231
- /**
232
- * Display the About tab content.
233
- *
234
- * @since 2.4/5.5
235
- */
236
- protected function output_about() {
237
-
238
- $this->output_about_info();
239
- $this->output_about_addons();
240
- }
241
-
242
- /**
243
- * Display the General Info section of About tab.
244
- *
245
- * @since 1.5.8
246
- */
247
- protected function output_about_info() {
248
-
249
- ?>
250
-
251
- <div class="sbi-admin-about-section sbi-admin-columns">
252
-
253
- <div class="sbi-admin-about-text" style="min-height: 340px;">
254
- <h3>
255
- <?php esc_html_e( 'Hello and welcome to the Instagram Feed plugin, the most beautiful, clean, and reliable Instagram feed plugin in the world. At Smash Balloon, we build software that helps you create beautiful responsive social media feeds for your website in minutes.', 'instagram-feed' ); ?>
256
- </h3>
257
-
258
- <p>
259
- <?php esc_html_e( 'Smash Balloon is a fun-loving WordPress plugin development company birthed into existence in early 2013. We specialize in creating plugins that are not only intuitive and simple to use, but also designed to integrate seamlessly into your website and allow you to display your social media content in powerful and unique ways. Over 1 million awesome people have decided to actively use our plugins, which is an incredible honor that we don’t take lightly. This compels us to try to provide the quickest and most effective customer support that we can, blowing users away with the best customer service they’ve ever experienced.', 'instagram-feed' ); ?>
260
- </p>
261
- <p>
262
- <?php esc_html_e( 'We’re a small, but dedicated, team based in Minnesota in the USA.', 'instagram-feed' ); ?>
263
- </p>
264
- <!-- <p>
265
- <?php
266
- printf(
267
- wp_kses(
268
- /* translators: %1$s - WPBeginner URL, %2$s - OptinMonster URL, %3$s - MonsterInsights URL, %4$s - RafflePress URL. */
269
- __( 'Instagram Feed is brought to you by the same team that’s behind the largest WordPress resource site, <a href="%1$s" target="_blank" rel="noopener noreferrer">WPBeginner</a>, the most popular lead-generation software, <a href="%2$s" target="_blank" rel="noopener noreferrer">OptinMonster</a>, the best WordPress analytics plugin, <a href="%3$s" target="_blank" rel="noopener noreferrer">MonsterInsights</a>, and the most powerful WordPress contest plugin, <a href="%4$s" target="_blank" rel="noopener noreferrer">RafflePress</a>.', 'instagram-feed' ),
270
- array(
271
- 'a' => array(
272
- 'href' => array(),
273
- 'rel' => array(),
274
- 'target' => array(),
275
- ),
276
- )
277
- ),
278
- 'https://www.wpbeginner.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
279
- 'https://optinmonster.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
280
- 'https://www.monsterinsights.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
281
- 'https://rafflepress.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi'
282
- );
283
- ?>
284
- </p>
285
- <p>
286
- <?php esc_html_e( 'Yup, we know a thing or two about building awesome products that customers love.', 'instagram-feed' ); ?>
287
- </p> -->
288
- </div>
289
-
290
- <div class="sbi-admin-about-image sbi-admin-column-last">
291
- <figure>
292
- <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/team.jpg" alt="<?php esc_attr_e( 'The Sbi Team photo', 'instagram-feed' ); ?>">
293
- <figcaption>
294
- <?php esc_html_e( 'The Smash Balloon Team', 'instagram-feed' ); ?><br>
295
- </figcaption>
296
- </figure>
297
- </div>
298
-
299
- </div>
300
- <?php
301
- }
302
-
303
- /**
304
- * Display the Addons section of About tab.
305
- *
306
- * @since 1.5.8
307
- */
308
- protected function output_about_addons() {
309
-
310
- if ( ! current_user_can( 'manage_instagram_feed_options' ) || version_compare( PHP_VERSION, '5.3.0' ) <= 0
311
- || version_compare( PHP_VERSION, '5.3.0' ) <= 0
312
- || version_compare( get_bloginfo('version'), '4.6' , '<' ) ){
313
- return;
314
- }
315
-
316
- $all_plugins = get_plugins();
317
- $am_plugins = $this->get_am_plugins();
318
-
319
- ?>
320
- <div id="sbi-admin-addons">
321
- <div class="addons-container">
322
- <h3><?php echo __( 'Our Other Plugins', 'instagram-feed' ); ?></h3>
323
- <?php
324
- foreach ( $am_plugins as $plugin => $details ) :
325
-
326
- $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
327
-
328
- if ( $plugin === 'wpforms-lite/wpforms.php' ) {
329
- echo '<h3>' .__( 'Plugins We Recommend', 'instagram-feed' ). '</h3>';
330
- }
331
-
332
- ?>
333
- <div class="addon-container">
334
- <div class="addon-item">
335
- <div class="details sbi-clear">
336
- <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
337
- <h5 class="addon-name">
338
- <?php echo esc_html( $plugin_data['details']['name'] ); ?>
339
- </h5>
340
- <p class="addon-desc">
341
- <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
342
- </p>
343
- </div>
344
- <div class="actions sbi-clear">
345
- <div class="status">
346
- <strong>
347
- <?php
348
- printf(
349
- /* translators: %s - addon status label. */
350
- esc_html__( 'Status: %s', 'instagram-feed' ),
351
- '<span class="status-label ' . esc_attr( $plugin_data['status_class'] ) . '">' . wp_kses_post( $plugin_data['status_text'] ) . '</span>'
352
- );
353
- ?>
354
- </strong>
355
- </div>
356
- <div class="action-button">
357
- <button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
358
- <?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
359
- </button>
360
- </div>
361
- </div>
362
- </div>
363
- </div>
364
- <?php endforeach; ?>
365
- </div>
366
- </div>
367
- <?php
368
- }
369
-
370
- /**
371
- * Get AM plugin data to display in the Addons section of About tab.
372
- *
373
- * @since 1.5.8
374
- *
375
- * @param string $plugin Plugin slug.
376
- * @param array $details Plugin details.
377
- * @param array $all_plugins List of all plugins.
378
- *
379
- * @return array
380
- */
381
- protected function get_plugin_data( $plugin, $details, $all_plugins ) {
382
-
383
- $have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
384
- $show_pro = false;
385
-
386
- $plugin_data = array();
387
-
388
- if ( $have_pro ) {
389
- if ( array_key_exists( $plugin, $all_plugins ) ) {
390
- if ( is_plugin_active( $plugin ) ) {
391
- $show_pro = true;
392
- }
393
- }
394
- if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
395
- $show_pro = true;
396
- }
397
- if ( $show_pro ) {
398
- $plugin = $details['pro']['plug'];
399
- $details = $details['pro'];
400
- }
401
- }
402
-
403
- if ( array_key_exists( $plugin, $all_plugins ) ) {
404
- if ( is_plugin_active( $plugin ) ) {
405
- // Status text/status.
406
- $plugin_data['status_class'] = 'status-active';
407
- $plugin_data['status_text'] = esc_html__( 'Active', 'instagram-feed' );
408
- // Button text/status.
409
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
410
- $plugin_data['action_text'] = esc_html__( 'Activated', 'instagram-feed' );
411
- $plugin_data['plugin_src'] = esc_attr( $plugin );
412
- } else {
413
- // Status text/status.
414
- $plugin_data['status_class'] = 'status-inactive';
415
- $plugin_data['status_text'] = esc_html__( 'Inactive', 'instagram-feed' );
416
- // Button text/status.
417
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
418
- $plugin_data['action_text'] = esc_html__( 'Activate', 'instagram-feed' );
419
- $plugin_data['plugin_src'] = esc_attr( $plugin );
420
- }
421
- } else {
422
- // Doesn't exist, install.
423
- // Status text/status.
424
- $plugin_data['status_class'] = 'status-download';
425
- if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
426
- $plugin_data['status_class'] = 'status-go-to-url';
427
- }
428
- $plugin_data['status_text'] = esc_html__( 'Not Installed', 'instagram-feed' );
429
- // Button text/status.
430
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
431
- $plugin_data['action_text'] = esc_html__( 'Install Plugin', 'instagram-feed' );
432
- $plugin_data['plugin_src'] = esc_url( $details['url'] );
433
- }
434
-
435
- $plugin_data['details'] = $details;
436
-
437
- return $plugin_data;
438
- }
439
-
440
- /**
441
- * Display the Getting Started tab content.
442
- *
443
- * @since 2.4/5.5
444
- */
445
- protected function output_getting_started() {
446
-
447
- $license = $this->get_license_type();
448
- ?>
449
-
450
- <div class="sbi-admin-about-section sbi-admin-about-section-first-form" style="display:flex;">
451
-
452
- <div class="sbi-admin-about-section-first-form-text">
453
-
454
- <h2>
455
- <?php esc_html_e( 'Creating Your First Feed', 'instagram-feed' ); ?>
456
- </h2>
457
-
458
- <p>
459
- <?php esc_html_e( 'Want to get started creating your first feed with Instagram Feed? By following the step by step instructions in this walkthrough, you can easily publish your first feed on your site.', 'instagram-feed' ); ?>
460
- </p>
461
-
462
- <p>
463
- <?php esc_html_e( 'Navigate to Instagram Feed in the admin sidebar to go the Configure page.', 'instagram-feed' ); ?>
464
- </p>
465
-
466
- <p>
467
- <?php esc_html_e( 'Click on the large blue button to connect your Instagram account. Select "Personal" if your Instagram account is a personal account, "Business" if it is a business or creator account.', 'instagram-feed' ); ?>
468
- </p>
469
-
470
- <p>
471
- <?php esc_html_e( 'Once you connect an Instagram account, you can display your feed on any post, page or widget using the shortcode [instagram-feed]. You can also use the Instagram Feed Gutenberg block if your site has the WordPress block editor enabled.', 'instagram-feed' ); ?>
472
- </p>
473
-
474
- <ul class="list-plain">
475
- <li>
476
- <a href="https://smashballoon.com/display-multiple-instagram-feeds/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=multiplefeeds" target="_blank" rel="noopener noreferrer">
477
- <?php esc_html_e( 'How to Display Multiple Feeds', 'instagram-feed' ); ?>
478
- </a>
479
- </li>
480
- <li>
481
- <a href="https://smashballoon.com/get-access-token-from-another-account/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=differentaccounts" target="_blank" rel="noopener noreferrer">
482
- <?php esc_html_e( 'Connect a Different Account', 'instagram-feed' ); ?>
483
- </a>
484
- </li>
485
- <li>
486
- <a href="https://smashballoon.com/differences-between-an-instagram-personal-and-business-account/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=personalvbusiness" target="_blank" rel="noopener noreferrer">
487
- <?php esc_html_e( 'Personal Vs Business Accounts', 'instagram-feed' ); ?>
488
- </a>
489
- </li>
490
- </ul>
491
-
492
- </div>
493
-
494
- <div class="sbi-admin-about-section-first-form-video">
495
- <iframe src="https://www.youtube-nocookie.com/embed/q6ZXVU4g970?rel=0" width="540" height="304" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
496
- </div>
497
-
498
- </div>
499
-
500
- <?php if ( ! in_array( $license, self::$licenses_top, true ) ) { ?>
501
- <div class="sbi-admin-about-section sbi-admin-about-section-hero">
502
-
503
- <div class="sbi-admin-about-section-hero-main">
504
- <h2>
505
- <?php esc_html_e( 'Get Instagram Feed Pro and Unlock all the Powerful Features', 'instagram-feed' ); ?>
506
- </h2>
507
-
508
- <p class="bigger">
509
- <?php
510
- echo wp_kses(
511
- __( 'Thanks for being a loyal Instagram Feed Lite user. <strong>Upgrade to Instagram Feed Pro</strong> to unlock all the awesome features and experience<br>why Instagram Feed is the most popular Instagram plugin.', 'instagram-feed' ),
512
- array(
513
- 'br' => array(),
514
- 'strong' => array(),
515
- )
516
- );
517
- ?>
518
- </p>
519
-
520
- <p>
521
- <?php
522
- printf(
523
- wp_kses(
524
- /* translators: %s - stars. */
525
- __( 'We know that you will truly love Instagram Feed. It has over <strong>2500+ five star ratings</strong> (%s) and is active on over 1 million websites.', 'instagram-feed' ),
526
- array(
527
- 'strong' => array(),
528
- )
529
- ),
530
- '<i class="fa fa-star" aria-hidden="true"></i>' .
531
- '<i class="fa fa-star" aria-hidden="true"></i>' .
532
- '<i class="fa fa-star" aria-hidden="true"></i>' .
533
- '<i class="fa fa-star" aria-hidden="true"></i>' .
534
- '<i class="fa fa-star" aria-hidden="true"></i>'
535
- );
536
- ?>
537
- </p>
538
- </div>
539
-
540
- <div class="sbi-admin-about-section-hero-extra">
541
- <div class="sbi-admin-columns">
542
- <div class="sbi-admin-column-50">
543
- <ul class="list-features list-plain">
544
- <li>
545
- <i class="fa fa-check" aria-hidden="true"></i>
546
- <?php esc_html_e( 'Recent hashtag, top Hashtag, and tagged feeds.', 'instagram-feed' ); ?>
547
- </li>
548
- <li>
549
- <i class="fa fa-check" aria-hidden="true"></i>
550
- <?php esc_html_e( 'More layouts - masonry, highlight, and carousel.', 'instagram-feed' ); ?>
551
- </li>
552
- <li>
553
- <i class="fa fa-check" aria-hidden="true"></i>
554
- <?php esc_html_e( 'Captions, comments, dates, likes, and comment counts.', 'instagram-feed' ); ?>
555
- </li>
556
- <li>
557
- <i class="fa fa-check" aria-hidden="true"></i>
558
- <?php esc_html_e( 'Pop-up lightbox to view images and watch videos.', 'instagram-feed' ); ?>
559
- </li>
560
- <li>
561
- <i class="fa fa-check" aria-hidden="true"></i>
562
- <?php esc_html_e( 'Filter feeds by word or hashtag.', 'instagram-feed' ); ?>
563
- </li>
564
- </ul>
565
- </div>
566
- <div class="sbi-admin-column-50 sbi-admin-column-last">
567
- <ul class="list-features list-plain">
568
- <li>
569
- <i class="fa fa-check" aria-hidden="true"></i>
570
- <?php esc_html_e( 'Display Instagram stories.', 'instagram-feed' ); ?>
571
- </li>
572
- <li>
573
- <i class="fa fa-check" aria-hidden="true"></i>
574
- <?php esc_html_e( 'Powerful visual moderation system.', 'instagram-feed' ); ?>
575
- </li>
576
- <li>
577
- <i class="fa fa-check" aria-hidden="true"></i>
578
- <?php esc_html_e( 'More customization for feed headers.', 'instagram-feed' ); ?>
579
- </li>
580
- <li>
581
- <i class="fa fa-check" aria-hidden="true"></i>
582
- <?php esc_html_e( 'Even more customization options for your feed.', 'instagram-feed' ); ?>
583
- </li>
584
- <li>
585
- <i class="fa fa-check" aria-hidden="true"></i>
586
- <?php esc_html_e( '"Shoppable" feeds.', 'instagram-feed' ); ?>
587
- </li>
588
- </ul>
589
- </div>
590
- </div>
591
-
592
- <hr />
593
-
594
- <h3 class="call-to-action">
595
- <?php
596
- if ( 'lite' === $license ) {
597
- echo '<a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">';
598
- } else {
599
- echo '<a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-pro&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">';
600
- }
601
- esc_html_e( 'Get Instagram Feed Pro Today and Unlock all the Powerful Features', 'instagram-feed' );
602
- ?>
603
- </a>
604
- </h3>
605
-
606
- <?php if ( 'lite' === $license ) { ?>
607
- <p>
608
- <?php
609
- echo wp_kses(
610
- __( 'Bonus: Instagram Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'instagram-feed' ),
611
- array(
612
- 'span' => array(
613
- 'class' => array(),
614
- ),
615
- )
616
- );
617
- ?>
618
- </p>
619
- <?php } ?>
620
- </div>
621
-
622
- </div>
623
- <?php } ?>
624
-
625
-
626
- <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
627
- <div class="sbi-admin-column-20">
628
- <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/steps.png" alt="">
629
- </div>
630
- <div class="sbi-admin-column-80">
631
- <h2>
632
- <?php esc_html_e( 'Detailed Step-By-Step Guide', 'instagram-feed' ); ?>
633
- </h2>
634
-
635
- <p>
636
- <?php esc_html_e( 'View detailed steps with related images on our website. We have a comprehensive guide to getting up and running with Instagram Feed.', 'instagram-feed' ); ?>
637
- </p>
638
-
639
- <a href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=readsetup" target="_blank" rel="noopener noreferrer" class="sbi-admin-about-section-post-link">
640
- <?php esc_html_e( 'Read Documentation', 'instagram-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
641
- </a>
642
- </div>
643
- </div>
644
-
645
- <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
646
- <div class="sbi-admin-column-20">
647
- <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/api-error.png" alt="">
648
- </div>
649
- <div class="sbi-admin-column-80">
650
- <h2>
651
- <?php esc_html_e( 'Troubleshoot Connection and API Errors', 'instagram-feed' ); ?>
652
- </h2>
653
-
654
- <p>
655
- <?php esc_html_e( 'Are you having trouble displaying your feed due to an error connecting an account or an Instagram API error? We have several articles to help you troubleshoot issues and help you solve them.', 'instagram-feed' ); ?>
656
- </p>
657
-
658
- <a href="https://smashballoon.com/instagram-feed/docs/errors/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=readerrordoc" target="_blank" rel="noopener noreferrer" class="sbi-admin-about-section-post-link">
659
- <?php esc_html_e( 'Read Documentation', 'instagram-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
660
- </a>
661
- </div>
662
- </div>
663
-
664
- <?php
665
- }
666
-
667
- /**
668
- * Get the next license type. Helper for Versus tab content.
669
- *
670
- * @since 1.5.5
671
- *
672
- * @param string $current Current license type slug.
673
- *
674
- * @return string Next license type slug.
675
- */
676
- protected function get_next_license( $current ) {
677
-
678
- $current = ucfirst( $current );
679
- $license_pairs = array(
680
- 'Lite' => 'Pro',
681
- 'Basic' => 'Pro',
682
- 'Plus' => 'Pro',
683
- 'Pro' => 'Elite',
684
- );
685
-
686
- return ! empty( $license_pairs[ $current ] ) ? $license_pairs[ $current ] : 'Elite';
687
- }
688
-
689
- /**
690
- * Display the Versus tab content.
691
- *
692
- * @since 2.4/5.5
693
- */
694
- protected function output_versus() {
695
-
696
- //$license = $this->get_license_type();
697
- //$next_license = $this->get_next_license( $license );
698
- $license = 'lite';
699
- $next_license = 'pro';
700
- ?>
701
-
702
- <div class="sbi-admin-about-section sbi-admin-about-section-squashed">
703
- <h1 class="centered">
704
- <strong><?php echo esc_html( ucfirst( $license ) ); ?></strong> vs <strong><?php echo esc_html( ucfirst( $next_license ) ); ?></strong>
705
- </h1>
706
-
707
- <p class="centered">
708
- <?php esc_html_e( 'Get the most out of your Instagram Feeds by upgrading to Pro and unlocking all of the powerful features.', 'instagram-feed' ); ?>
709
- </p>
710
- </div>
711
-
712
- <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-hero sbi-admin-about-section-table">
713
-
714
- <div class="sbi-admin-about-section-hero-main sbi-admin-columns">
715
- <div class="sbi-admin-column-33">
716
- <h3 class="no-margin">
717
- <?php esc_html_e( 'Feature', 'instagram-feed' ); ?>
718
- </h3>
719
- </div>
720
- <div class="sbi-admin-column-33">
721
- <h3 class="no-margin">
722
- <?php echo esc_html( ucfirst( $license ) ); ?>
723
- </h3>
724
- </div>
725
- <div class="sbi-admin-column-33">
726
- <h3 class="no-margin">
727
- <?php echo esc_html( ucfirst( $next_license ) ); ?>
728
- </h3>
729
- </div>
730
- </div>
731
- <div class="sbi-admin-about-section-hero-extra no-padding sbi-admin-columns">
732
-
733
- <table>
734
- <?php
735
- foreach ( self::$licenses_features as $slug => $name ) {
736
- $current = $this->get_license_data( $slug, $license );
737
- $next = $this->get_license_data( $slug, strtolower( $next_license ) );
738
-
739
- if ( empty( $current ) || empty( $next ) ) {
740
- continue;
741
- }
742
- ?>
743
- <tr class="sbi-admin-columns">
744
- <td class="sbi-admin-column-33">
745
- <p><?php echo esc_html( $name ); ?></p>
746
- </td>
747
- <td class="sbi-admin-column-33">
748
- <?php if ( is_array( $current ) ) : ?>
749
- <p class="features-<?php echo esc_attr( $current['status'] ); ?>">
750
- <?php echo wp_kses_post( implode( '<br>', $current['text'] ) ); ?>
751
- </p>
752
- <?php endif; ?>
753
- </td>
754
- <td class="sbi-admin-column-33">
755
- <?php if ( is_array( $current ) ) : ?>
756
- <p class="features-full">
757
- <?php echo wp_kses_post( implode( '<br>', $next['text'] ) ); ?>
758
- </p>
759
- <?php endif; ?>
760
- </td>
761
- </tr>
762
- <?php
763
- }
764
- ?>
765
- </table>
766
-
767
- </div>
768
-
769
- </div>
770
-
771
- <div class="sbi-admin-about-section sbi-admin-about-section-hero">
772
- <div class="sbi-admin-about-section-hero-main no-border">
773
- <h3 class="call-to-action centered">
774
- <?php
775
- if ( 'lite' === $license ) {
776
- echo '<a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">';
777
- } else {
778
- echo '<a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-pro&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">';
779
- }
780
- printf( /* translators: %s - next license level. */
781
- esc_html__( 'Get Instagram Feed Pro Today and Unlock all the Powerful Features', 'instagram-feed' ),
782
- esc_html( $next_license )
783
- );
784
- ?>
785
- </a>
786
- </h3>
787
-
788
- <?php if ( 'lite' === $license ) { ?>
789
- <p class="centered">
790
- <?php
791
- echo wp_kses(
792
- __( 'Bonus: Instagram Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'instagram-feed' ),
793
- array(
794
- 'span' => array(
795
- 'class' => array(),
796
- ),
797
- )
798
- );
799
- ?>
800
- </p>
801
- <?php } ?>
802
- </div>
803
- </div>
804
-
805
- <?php
806
- }
807
-
808
- /**
809
- * List of AM plugins that we propose to install.
810
- *
811
- * @since 2.4/5.5
812
- *
813
- * @return array
814
- */
815
- protected function get_am_plugins() {
816
-
817
- $images_url = SBI_PLUGIN_URL . 'img/about/';
818
-
819
- return array(
820
- 'custom-facebook-feed/custom-facebook-feed.php' => array(
821
- 'icon' => $images_url . 'plugin-fb.png',
822
- 'name' => esc_html__( 'Custom Facebook Feed', 'instagram-feed' ),
823
- 'desc' => esc_html__( 'Custom Facebook Feed makes displaying your Facebook posts easy. Keep your site visitors informed and increase engagement with your Facebook page by displaying a feed on your website.', 'instagram-feed' ),
824
- 'url' => 'https://downloads.wordpress.org/plugin/custom-facebook-feed.zip',
825
- 'pro' => array(
826
- 'plug' => 'custom-facebook-feed-pro/custom-facebook-feed.php',
827
- 'icon' => $images_url . 'plugin-fb.png',
828
- 'name' => esc_html__( 'Custom Facebook Feed Pro', 'instagram-feed' ),
829
- 'desc' => esc_html__( 'Custom Facebook Feed makes displaying your Facebook posts easy. Keep your site visitors informed and increase engagement with your Facebook page by displaying a feed on your website.', 'instagram-feed' ),
830
- 'url' => 'https://smashballoon.com/custom-facebook-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=cffinstaller',
831
- 'act' => 'go-to-url',
832
- ),
833
- ),
834
-
835
- 'custom-twitter-feeds/custom-twitter-feed.php' => array(
836
- 'icon' => $images_url . 'plugin-tw.jpg',
837
- 'name' => esc_html__( 'Custom Twitter Feeds', 'instagram-feed' ),
838
- 'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'instagram-feed' ),
839
- 'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
840
- 'pro' => array(
841
- 'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
842
- 'icon' => $images_url . 'plugin-tw.jpg',
843
- 'name' => esc_html__( 'Custom Twitter Feeds Pro', 'instagram-feed' ),
844
- 'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'instagram-feed' ),
845
- 'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_campaign=instagram-free&utm_source=cross&utm_medium=ctfinstaller',
846
- 'act' => 'go-to-url',
847
- ),
848
- ),
849
-
850
- 'feeds-for-youtube/youtube-feed.php' => array(
851
- 'icon' => $images_url . 'plugin-yt.png',
852
- 'name' => esc_html__( 'Feeds for YouTube', 'instagram-feed' ),
853
- 'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'instagram-feed' ),
854
- 'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
855
- 'pro' => array(
856
- 'plug' => 'youtube-feed-pro/youtube-feed.php',
857
- 'icon' => $images_url . 'plugin-yt.png',
858
- 'name' => esc_html__( 'Feeds for YouTube Pro', 'instagram-feed' ),
859
- 'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'instagram-feed' ),
860
- 'url' => 'https://smashballoon.com/youtube-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=sbyinstaller',
861
- 'act' => 'go-to-url',
862
- ),
863
- ),
864
-
865
- 'wpforms-lite/wpforms.php' => array(
866
- 'icon' => $images_url . 'plugin-wpforms.png',
867
- 'name' => esc_html__( 'WPForms', 'instagram-feed' ),
868
- 'desc' => esc_html__( 'The most beginner friendly drag & drop WordPress forms plugin allowing you to create beautiful contact forms, subscription forms, payment forms, and more in minutes, not hours!', 'instagram-feed' ),
869
- 'url' => 'https://downloads.wordpress.org/plugin/wpforms-lite.zip',
870
- 'pro' => array(
871
- 'plug' => 'wpforms/wpforms.php',
872
- 'icon' => $images_url . 'plugin-wpforms.png',
873
- 'name' => esc_html__( 'WPForms', 'instagram-feed' ),
874
- 'desc' => esc_html__( 'The most beginner friendly drag & drop WordPress forms plugin allowing you to create beautiful contact forms, subscription forms, payment forms, and more in minutes, not hours!', 'instagram-feed' ),
875
- 'url' => 'https://wpforms.com/lite-upgrade/?utm_source=WordPress&utm_campaign=liteplugin&utm_medium=sbi-about-page',
876
- 'act' => 'go-to-url',
877
- ),
878
- ),
879
-
880
- 'google-analytics-for-wordpress/googleanalytics.php' => array(
881
- 'icon' => $images_url . 'plugin-mi.png',
882
- 'name' => esc_html__( 'MonsterInsights', 'instagram-feed' ),
883
- 'desc' => esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'instagram-feed' ),
884
- 'url' => 'https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.zip',
885
- 'pro' => array(
886
- 'plug' => 'google-analytics-premium/googleanalytics-premium.php',
887
- 'icon' => $images_url . 'plugin-mi.png',
888
- 'name' => esc_html__( 'MonsterInsights Pro', 'instagram-feed' ),
889
- 'desc' => esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'instagram-feed' ),
890
- 'url' => 'https://www.monsterinsights.com/?utm_source=proplugin&utm_medium=about-page&utm_campaign=pluginurl&utm_content=7%2E0%2E0',
891
- 'act' => 'go-to-url',
892
- ),
893
- ),
894
-
895
- 'optinmonster/optin-monster-wp-api.php' => array(
896
- 'icon' => $images_url . 'plugin-om.png',
897
- 'name' => esc_html__( 'OptinMonster', 'instagram-feed' ),
898
- 'desc' => esc_html__( 'Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers.', 'instagram-feed' ),
899
- 'url' => 'https://downloads.wordpress.org/plugin/optinmonster.zip',
900
- ),
901
-
902
- 'wp-mail-smtp/wp_mail_smtp.php' => array(
903
- 'icon' => $images_url . 'plugin-smtp.png',
904
- 'name' => esc_html__( 'WP Mail SMTP', 'instagram-feed' ),
905
- 'desc' => esc_html__( 'Make sure your website\'s emails reach the inbox. Our goal is to make email deliverability easy and reliable. Trusted by over 1 million websites.', 'instagram-feed' ),
906
- 'url' => 'https://downloads.wordpress.org/plugin/wp-mail-smtp.zip',
907
- 'pro' => array(
908
- 'plug' => 'wp-mail-smtp-pro/wp_mail_smtp.php',
909
- 'icon' => $images_url . 'plugin-smtp.png',
910
- 'name' => esc_html__( 'WP Mail SMTP Pro', 'instagram-feed' ),
911
- 'desc' => esc_html__( 'Make sure your website\'s emails reach the inbox. Our goal is to make email deliverability easy and reliable. Trusted by over 1 million websites.', 'instagram-feed' ),
912
- 'url' => 'https://wpmailsmtp.com/pricing/',
913
- 'act' => 'go-to-url',
914
- ),
915
- ),
916
-
917
- 'rafflepress/rafflepress.php' => array(
918
- 'icon' => $images_url . 'plugin-rp.png',
919
- 'name' => esc_html__( 'RafflePress', 'instagram-feed' ),
920
- 'desc' => esc_html__( 'Turn your visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with powerful viral giveaways & contests.', 'instagram-feed' ),
921
- 'url' => 'https://downloads.wordpress.org/plugin/rafflepress.zip',
922
- 'pro' => array(
923
- 'plug' => 'rafflepress-pro/rafflepress-pro.php',
924
- 'icon' => $images_url . 'plugin-rp.png',
925
- 'name' => esc_html__( 'RafflePress Pro', 'instagram-feed' ),
926
- 'desc' => esc_html__( 'Turn your visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with powerful viral giveaways & contests.', 'instagram-feed' ),
927
- 'url' => 'https://rafflepress.com/pricing/',
928
- 'act' => 'go-to-url',
929
- ),
930
- ),
931
-
932
- 'all-in-one-seo-pack/all_in_one_seo_pack.php' => array(
933
- 'icon' => $images_url . 'plugin-seo.png',
934
- 'name' => esc_html__( 'All In One SEO Pack', 'instagram-feed' ),
935
- 'desc' => esc_html__( 'Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.', 'instagram-feed' ),
936
- 'url' => 'https://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip',
937
- ),
938
- );
939
- }
940
-
941
- /**
942
- * Get the array of data that compared the license data.
943
- *
944
- * @since 2.4/5.5
945
- *
946
- * @param string $feature Feature name.
947
- * @param string $license License type to get data for.
948
- *
949
- * @return array|false
950
- */
951
- protected function get_license_data( $feature, $license ) {
952
-
953
- $data = array(
954
- 'entries' => array(
955
- 'lite' => array(
956
- 'status' => 'partial',
957
- 'text' => array(
958
- '<strong>' . esc_html__( 'User feeds only', 'instagram-feed' ) . '</strong>',
959
- ),
960
- ),
961
- 'basic' => array(
962
- 'status' => 'full',
963
- 'text' => array(
964
- '<strong>' . esc_html__( 'User, Hashtag, and Tagged Feeds', 'instagram-feed' ) . '</strong>',
965
- ),
966
- ),
967
- 'plus' => array(
968
- 'status' => 'full',
969
- 'text' => array(
970
- '<strong>' . esc_html__( 'Complete Entry Management inside WordPress', 'instagram-feed' ) . '</strong>',
971
- ),
972
- ),
973
- 'pro' => array(
974
- 'status' => 'full',
975
- 'text' => array(
976
- '<strong>' . esc_html__( 'User, hashtag, and tagged feeds', 'instagram-feed' ) . '</strong>',
977
- ),
978
- ),
979
- ),
980
- 'fields' => array(
981
- 'lite' => array(
982
- 'status' => 'partial',
983
- 'text' => array(
984
- '<strong>' . esc_html__( 'Grid layout only', 'instagram-feed' ) . '</strong>',
985
- ),
986
- ),
987
- 'basic' => array(
988
- 'status' => 'full',
989
- 'text' => array(
990
- '<strong>' . esc_html__( 'Access to all Standard and Fancy Fields', 'instagram-feed' ) . '</strong>',
991
- esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'instagram-feed' ),
992
- ),
993
- ),
994
- 'plus' => array(
995
- 'status' => 'full',
996
- 'text' => array(
997
- '<strong>' . esc_html__( 'Access to all Standard and Fancy Fields', 'instagram-feed' ) . '</strong>',
998
- esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'instagram-feed' ),
999
- ),
1000
- ),
1001
- 'pro' => array(
1002
- 'status' => 'full',
1003
- 'text' => array(
1004
- '<strong>' . esc_html__( 'Grid, highlight, masonry, and carousel layouts', 'instagram-feed' ) . '</strong>',
1005
- ),
1006
- ),
1007
- ),
1008
- 'conditionals' => array(
1009
- 'lite' => array(
1010
- 'status' => 'partial',
1011
- 'text' => array(
1012
- '<strong>' . esc_html__( 'Image, carousel, and video thumbnails', 'instagram-feed' ) . '</strong>',
1013
- ),
1014
- ),
1015
- 'basic' => array(
1016
- 'status' => 'full',
1017
- 'text' => array(
1018
- '<strong>' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'instagram-feed' ) . '</strong>',
1019
- ),
1020
- ),
1021
- 'plus' => array(
1022
- 'status' => 'full',
1023
- 'text' => array(
1024
- '<strong>' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'instagram-feed' ) . '</strong>',
1025
- ),
1026
- ),
1027
- 'pro' => array(
1028
- 'status' => 'full',
1029
- 'text' => array(
1030
- '<strong>' . esc_html__( 'Display images, swipe through carousel posts, and play videos in a pop-up lightbox', 'instagram-feed' ) . '</strong>',
1031
- ),
1032
- ),
1033
- ),
1034
- 'templates' => array(
1035
- 'lite' => array(
1036
- 'status' => 'partial',
1037
- 'text' => array(
1038
- '<strong>' . esc_html__( 'Images and link only', 'instagram-feed' ) . '</strong>',
1039
- ),
1040
- ),
1041
- 'basic' => array(
1042
- 'status' => 'partial',
1043
- 'text' => array(
1044
- '<strong>' . esc_html__( 'Basic Form Templates', 'instagram-feed' ) . '</strong>',
1045
- ),
1046
- ),
1047
- 'plus' => array(
1048
- 'status' => 'partial',
1049
- 'text' => array(
1050
- '<strong>' . esc_html__( 'Basic Form Templates', 'instagram-feed' ) . '</strong>',
1051
- ),
1052
- ),
1053
- 'pro' => array(
1054
- 'status' => 'full',
1055
- 'text' => array(
1056
- '<strong>' . esc_html__( 'Thumbnails, dates, caption, comments, like counts, and comment counts.', 'instagram-feed' ) . '</strong>',
1057
- ),
1058
- ),
1059
- ),
1060
- 'marketing' => array(
1061
- 'lite' => array(
1062
- 'status' => 'none',
1063
- 'text' => array(
1064
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1065
- ),
1066
- ),
1067
- 'basic' => array(
1068
- 'status' => 'partial',
1069
- 'text' => array(
1070
- '<strong>' . esc_html__( 'Limited Marketing Integration', 'instagram-feed' ) . '</strong>',
1071
- esc_html__( 'Constant Contact only', 'instagram-feed' ),
1072
- ),
1073
- ),
1074
- 'plus' => array(
1075
- 'status' => 'partial',
1076
- 'text' => array(
1077
- '<strong>' . esc_html__( '6 Email Marketing Integrations', 'instagram-feed' ) . '</strong>',
1078
- esc_html__( 'Constant Contact, Mailchimp, AWeber, GetResponse, Campaign Monitor, and Drip', 'instagram-feed' ),
1079
- ),
1080
- ),
1081
- 'pro' => array(
1082
- 'status' => 'full',
1083
- 'text' => array(
1084
- '<strong>' . esc_html__( 'Display your latest Instagram story in a pop-up lightbox', 'instagram-feed' ) . '</strong>',
1085
- ),
1086
- ),
1087
- ),
1088
- 'payments' => array(
1089
- 'lite' => array(
1090
- 'status' => 'none',
1091
- 'text' => array(
1092
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1093
- ),
1094
- ),
1095
- 'basic' => array(
1096
- 'status' => 'none',
1097
- 'text' => array(
1098
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1099
- ),
1100
- ),
1101
- 'plus' => array(
1102
- 'status' => 'none',
1103
- 'text' => array(
1104
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1105
- ),
1106
- ),
1107
- 'pro' => array(
1108
- 'status' => 'full',
1109
- 'text' => array(
1110
- '<strong>' . esc_html__( 'Visual moderation system for removing posts or creating a "white list" of selected posts', 'instagram-feed' ) . '</strong>',
1111
- ),
1112
- ),
1113
- ),
1114
- 'surveys' => array(
1115
- 'lite' => array(
1116
- 'status' => 'partial',
1117
- 'text' => array(
1118
- '<strong>' . esc_html__( 'Standard or centered header', 'instagram-feed' ) . '</strong>',
1119
- ),
1120
- ),
1121
- 'basic' => array(
1122
- 'status' => 'none',
1123
- 'text' => array(
1124
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1125
- ),
1126
- ),
1127
- 'plus' => array(
1128
- 'status' => 'none',
1129
- 'text' => array(
1130
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1131
- ),
1132
- ),
1133
- 'pro' => array(
1134
- 'status' => 'full',
1135
- 'text' => array(
1136
- '<strong>' . esc_html__( 'Standard, centered, or boxed header that includes follower and post counts', 'instagram-feed' ) . '</strong>',
1137
- ),
1138
- ),
1139
- ),
1140
- 'advanced' => array(
1141
- 'lite' => array(
1142
- 'status' => 'partial',
1143
- 'text' => array(
1144
- '<strong>' . esc_html__( 'Posts link to the same post on Instagram', 'instagram-feed' ) . '</strong>',
1145
- ),
1146
- ),
1147
- 'basic' => array(
1148
- 'status' => 'partial',
1149
- 'text' => array(
1150
- '<strong>' . esc_html__( 'Limited Advanced Features', 'instagram-feed' ) . '</strong>',
1151
- esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'instagram-feed' ),
1152
- ),
1153
- ),
1154
- 'plus' => array(
1155
- 'status' => 'partial',
1156
- 'text' => array(
1157
- '<strong>' . esc_html__( 'Limited Advanced Features', 'instagram-feed' ) . '</strong>',
1158
- esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'instagram-feed' ),
1159
- ),
1160
- ),
1161
- 'pro' => array(
1162
- 'status' => 'full',
1163
- 'text' => array(
1164
- '<strong>' . esc_html__( 'Allow your posts to link to a URL in the caption or view in a lightbox', 'instagram-feed' ) . '</strong>',
1165
- ),
1166
- ),
1167
- ),
1168
- 'addons' => array(
1169
- 'lite' => array(
1170
- 'status' => 'none',
1171
- 'text' => array(
1172
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1173
- ),
1174
- ),
1175
- 'basic' => array(
1176
- 'status' => 'partial',
1177
- 'text' => array(
1178
- '<strong>' . esc_html__( 'Custom Captcha Addon included', 'instagram-feed' ) . '</strong>',
1179
- ),
1180
- ),
1181
- 'plus' => array(
1182
- 'status' => 'partial',
1183
- 'text' => array(
1184
- '<strong>' . esc_html__( 'Email Marketing Addons included', 'instagram-feed' ) . '</strong>',
1185
- ),
1186
- ),
1187
- 'pro' => array(
1188
- 'status' => 'full',
1189
- 'text' => array(
1190
- '<strong>' . esc_html__( 'Filter by word or hashtag', 'instagram-feed' ) . '</strong>',
1191
- ),
1192
- ),
1193
- ),
1194
- 'support' => array(
1195
- 'lite' => array(
1196
- 'status' => 'partial',
1197
- 'text' => array(
1198
- '<strong>' . esc_html__( 'Limited support', 'instagram-feed' ) . '</strong>',
1199
- ),
1200
- ),
1201
- 'basic' => array(
1202
- 'status' => 'partial',
1203
- 'text' => array(
1204
- '<strong>' . esc_html__( 'Standard Support', 'instagram-feed' ) . '</strong>',
1205
- ),
1206
- ),
1207
- 'plus' => array(
1208
- 'status' => 'partial',
1209
- 'text' => array(
1210
- '<strong>' . esc_html__( 'Standard Support', 'instagram-feed' ) . '</strong>',
1211
- ),
1212
- ),
1213
- 'pro' => array(
1214
- 'status' => 'full',
1215
- 'text' => array(
1216
- '<strong>' . esc_html__( 'Priority support', 'instagram-feed' ) . '</strong>',
1217
- ),
1218
- ),
1219
- 'elite' => array(
1220
- 'status' => 'full',
1221
- 'text' => array(
1222
- '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1223
- ),
1224
- ),
1225
- 'ultimate' => array(
1226
- 'status' => 'full',
1227
- 'text' => array(
1228
- '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1229
- ),
1230
- ),
1231
- 'agency' => array(
1232
- 'status' => 'full',
1233
- 'text' => array(
1234
- '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1235
- ),
1236
- ),
1237
- ),
1238
- 'sites' => array(
1239
- 'basic' => array(
1240
- 'status' => 'partial',
1241
- 'text' => array(
1242
- '<strong>' . esc_html__( '1 Site', 'instagram-feed' ) . '</strong>',
1243
- ),
1244
- ),
1245
- 'plus' => array(
1246
- 'status' => 'partial',
1247
- 'text' => array(
1248
- '<strong>' . esc_html__( '3 Sites', 'instagram-feed' ) . '</strong>',
1249
- ),
1250
- ),
1251
- 'pro' => array(
1252
- 'status' => 'full',
1253
- 'text' => array(
1254
- '<strong>' . esc_html__( '5 Sites', 'instagram-feed' ) . '</strong>',
1255
- ),
1256
- ),
1257
- 'elite' => array(
1258
- 'status' => 'full',
1259
- 'text' => array(
1260
- '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1261
- ),
1262
- ),
1263
- 'ultimate' => array(
1264
- 'status' => 'full',
1265
- 'text' => array(
1266
- '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1267
- ),
1268
- ),
1269
- 'agency' => array(
1270
- 'status' => 'full',
1271
- 'text' => array(
1272
- '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1273
- ),
1274
- ),
1275
- ),
1276
- );
1277
-
1278
- // Wrong feature?
1279
- if ( ! isset( $data[ $feature ] ) ) {
1280
- return false;
1281
- }
1282
-
1283
- // Is a top level license?
1284
- $is_licenses_top = in_array( $license, self::$licenses_top, true );
1285
-
1286
- // Wrong license type?
1287
- if ( ! isset( $data[ $feature ][ $license ] ) && ! $is_licenses_top ) {
1288
- return false;
1289
- }
1290
-
1291
- // Some licenses have partial data.
1292
- if ( isset( $data[ $feature ][ $license ] ) ) {
1293
- return $data[ $feature ][ $license ];
1294
- }
1295
-
1296
- // Top level plans has no feature difference with `pro` plan in most cases.
1297
- return $is_licenses_top ? $data[ $feature ]['pro'] : $data[ $feature ][ $license ];
1298
- }
1299
-
1300
- /**
1301
- * Get the current installation license type (always lowercase).
1302
- *
1303
- * @since 2.4/5.5
1304
- *
1305
- * @return string
1306
- */
1307
- protected function get_license_type() {
1308
-
1309
- //$type = sbi_setting( 'type', '', 'sbi_license' );
1310
-
1311
- //if ( empty( $type ) || ! sbi()->pro ) {
1312
- $type = 'lite';
1313
- //}
1314
-
1315
- return strtolower( $type );
1316
- }
1317
- }
1318
-
1319
- new SB_Instagram_About();
1
+ <?php
2
+
3
+ /**
4
+ * About Sbi admin page class.
5
+ *
6
+ * @since 2.4/5.5
7
+ */
8
+ class SB_Instagram_About {
9
+
10
+ /**
11
+ * Admin menu page slug.
12
+ *
13
+ * @since 2.4/5.5
14
+ *
15
+ * @var string
16
+ */
17
+ const SLUG = 'sb-instagram-feed-about';
18
+
19
+ /**
20
+ * Default view for a page.
21
+ *
22
+ * @since 2.4/5.5
23
+ *
24
+ * @var string
25
+ */
26
+ const DEFAULT_TAB = 'about';
27
+
28
+ /**
29
+ * Array of license types, that are considered being top level and has no features difference.
30
+ *
31
+ * @since 2.4/5.5
32
+ *
33
+ * @var array
34
+ */
35
+ public static $licenses_top = array( 'pro', 'agency', 'ultimate', 'elite' );
36
+
37
+ /**
38
+ * List of features that licenses are different with.
39
+ *
40
+ * @since 2.4/5.5
41
+ *
42
+ * @var array
43
+ */
44
+ public static $licenses_features = array();
45
+
46
+ /**
47
+ * The current active tab.
48
+ *
49
+ * @since 2.4/5.5
50
+ *
51
+ * @var string
52
+ */
53
+ public $view;
54
+
55
+ /**
56
+ * The core views.
57
+ *
58
+ * @since 2.4/5.5
59
+ *
60
+ * @var array
61
+ */
62
+ public $views = array();
63
+
64
+ /**
65
+ * Primary class constructor.
66
+ *
67
+ * @since 2.4/5.5
68
+ */
69
+ public function __construct() {
70
+
71
+ // In old PHP we can't define this elsewhere.
72
+ self::$licenses_features = array(
73
+ 'entries' => esc_html__( 'Feed Types', 'instagram-feed' ),
74
+ 'fields' => esc_html__( 'Layouts', 'instagram-feed' ),
75
+ 'templates' => esc_html__( 'Post Information', 'instagram-feed' ),
76
+ 'conditionals' => esc_html__( 'Image and Video Display', 'instagram-feed' ),
77
+ 'addons' => esc_html__( 'Filtering', 'instagram-feed' ),
78
+ //'marketing' => esc_html__( 'Filtering', 'instagram-feed' ),
79
+ 'marketing' => esc_html__( 'Instagram Stories', 'instagram-feed' ),
80
+ 'payments' => esc_html__( 'Feed Moderation', 'instagram-feed' ),
81
+ 'surveys' => esc_html__( 'Header Display', 'instagram-feed' ),
82
+ 'advanced' => esc_html__( 'Post Linking', 'instagram-feed' ),
83
+ 'support' => esc_html__( 'Customer Support', 'instagram-feed' ),
84
+ );
85
+
86
+ // Maybe load tools page.
87
+ add_action( 'admin_init', array( $this, 'init' ) );
88
+ }
89
+
90
+ /**
91
+ * Determining if the user is viewing the our page, if so, party on.
92
+ *
93
+ * @since 2.4/5.5
94
+ */
95
+ public function init() {
96
+
97
+ // Check what page we are on.
98
+ $page = isset( $_GET['page'] ) ? $_GET['page'] : '';
99
+
100
+ // Only load if we are actually on the settings page.
101
+ if ( self::SLUG !== $page ) {
102
+ return;
103
+ }
104
+
105
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueues' ) );
106
+
107
+ /*
108
+ * Define the core views for the our tab.
109
+ */
110
+ $this->views = apply_filters(
111
+ 'sbi_admin_about_views',
112
+ array(
113
+ esc_html__( 'About Us', 'instagram-feed' ) => array( 'about' ),
114
+ esc_html__( 'Getting Started', 'instagram-feed' ) => array( 'getting-started' ),
115
+ )
116
+ );
117
+
118
+ $license = $this->get_license_type();
119
+
120
+ if (
121
+ (
122
+ $license === 'pro' ||
123
+ ! in_array( $license, self::$licenses_top, true )
124
+ )
125
+ //sbi_debug()
126
+ ) {
127
+ $vs_tab_name = sprintf( /* translators: %1$s - current license type, %2$s - suggested license type. */
128
+ esc_html__( '%1$s vs %2$s', 'instagram-feed' ),
129
+ ucfirst( $license ),
130
+ $this->get_next_license( $license )
131
+ );
132
+
133
+ $this->views[ $vs_tab_name ] = array( 'versus' );
134
+ }
135
+
136
+ // Determine the current active settings tab.
137
+ $this->view = ! empty( $_GET['view'] ) ? esc_html( $_GET['view'] ) : self::DEFAULT_TAB;
138
+
139
+ // If the user tries to load an invalid view - fallback to About Us.
140
+ if (
141
+ ! in_array( $this->view, call_user_func_array( 'array_merge', array_values( $this->views ) ), true ) &&
142
+ ! has_action( 'sbi_admin_about_display_tab_' . sanitize_key( $this->view ) )
143
+ ) {
144
+ $this->view = self::DEFAULT_TAB;
145
+ }
146
+
147
+ add_action( 'sbi_admin_page', array( $this, 'output' ) );
148
+
149
+ // Hook for addons.
150
+ do_action( 'sbi_admin_about_init' );
151
+ }
152
+
153
+ /**
154
+ * Enqueue assets for the the page.
155
+ *
156
+ * @since 2.4/5.5
157
+ */
158
+ public function enqueues() {
159
+
160
+ wp_enqueue_script(
161
+ 'jquery-matchheight',
162
+ SBI_PLUGIN_URL . 'js/jquery.matchHeight-min.js',
163
+ array( 'jquery' ),
164
+ '0.7.0',
165
+ false
166
+ );
167
+ }
168
+
169
+ /**
170
+ * Output the basic page structure.
171
+ *
172
+ * @since 2.4/5.5
173
+ */
174
+ public function output() {
175
+
176
+ $show_nav = false;
177
+ foreach ( $this->views as $view ) {
178
+ if ( in_array( $this->view, (array) $view, true ) ) {
179
+ $show_nav = true;
180
+ break;
181
+ }
182
+ }
183
+ ?>
184
+
185
+ <div id="sbi-admin-about" class="wrap sbi-admin-wrap">
186
+
187
+ <?php
188
+ if ( $show_nav ) {
189
+ $license = $this->get_license_type();
190
+ $next_license = $this->get_next_license( $license );
191
+ echo '<ul class="sbi-admin-tabs">';
192
+ foreach ( $this->views as $label => $view ) {
193
+ $class = in_array( $this->view, $view, true ) ? 'active' : '';
194
+ echo '<li>';
195
+ printf(
196
+ '<a href="%s" class="%s">%s</a>',
197
+ esc_url( admin_url( 'admin.php?page=' . self::SLUG . '&view=' . sanitize_key( $view[0] ) ) ),
198
+ esc_attr( $class ),
199
+ esc_html( $label )
200
+ );
201
+ echo '</li>';
202
+ }
203
+ echo '</ul>';
204
+ }
205
+ ?>
206
+
207
+ <h1 class="sbi-h1-placeholder"></h1>
208
+
209
+ <?php
210
+ switch ( $this->view ) {
211
+ case 'about':
212
+ $this->output_about();
213
+ break;
214
+ case 'getting-started':
215
+ $this->output_getting_started();
216
+ break;
217
+ case 'versus':
218
+ $this->output_versus();
219
+ break;
220
+ default:
221
+ do_action( 'sbi_admin_about_display_tab_' . sanitize_key( $this->view ) );
222
+ break;
223
+ }
224
+ ?>
225
+
226
+ </div>
227
+
228
+ <?php
229
+ }
230
+
231
+ /**
232
+ * Display the About tab content.
233
+ *
234
+ * @since 2.4/5.5
235
+ */
236
+ protected function output_about() {
237
+
238
+ $this->output_about_info();
239
+ $this->output_about_addons();
240
+ }
241
+
242
+ /**
243
+ * Display the General Info section of About tab.
244
+ *
245
+ * @since 1.5.8
246
+ */
247
+ protected function output_about_info() {
248
+
249
+ ?>
250
+
251
+ <div class="sbi-admin-about-section sbi-admin-columns">
252
+
253
+ <div class="sbi-admin-about-text" style="min-height: 340px;">
254
+ <h3>
255
+ <?php esc_html_e( 'Hello and welcome to the Instagram Feed plugin, the most beautiful, clean, and reliable Instagram feed plugin in the world. At Smash Balloon, we build software that helps you create beautiful responsive social media feeds for your website in minutes.', 'instagram-feed' ); ?>
256
+ </h3>
257
+
258
+ <p>
259
+ <?php esc_html_e( 'Smash Balloon is a fun-loving WordPress plugin development company birthed into existence in early 2013. We specialize in creating plugins that are not only intuitive and simple to use, but also designed to integrate seamlessly into your website and allow you to display your social media content in powerful and unique ways. Over 1 million awesome people have decided to actively use our plugins, which is an incredible honor that we don’t take lightly. This compels us to try to provide the quickest and most effective customer support that we can, blowing users away with the best customer service they’ve ever experienced.', 'instagram-feed' ); ?>
260
+ </p>
261
+ <p>
262
+ <?php esc_html_e( 'We’re a small, but dedicated, team based in Minnesota in the USA.', 'instagram-feed' ); ?>
263
+ </p>
264
+ <!-- <p>
265
+ <?php
266
+ printf(
267
+ wp_kses(
268
+ /* translators: %1$s - WPBeginner URL, %2$s - OptinMonster URL, %3$s - MonsterInsights URL, %4$s - RafflePress URL. */
269
+ __( 'Instagram Feed is brought to you by the same team that’s behind the largest WordPress resource site, <a href="%1$s" target="_blank" rel="noopener noreferrer">WPBeginner</a>, the most popular lead-generation software, <a href="%2$s" target="_blank" rel="noopener noreferrer">OptinMonster</a>, the best WordPress analytics plugin, <a href="%3$s" target="_blank" rel="noopener noreferrer">MonsterInsights</a>, and the most powerful WordPress contest plugin, <a href="%4$s" target="_blank" rel="noopener noreferrer">RafflePress</a>.', 'instagram-feed' ),
270
+ array(
271
+ 'a' => array(
272
+ 'href' => array(),
273
+ 'rel' => array(),
274
+ 'target' => array(),
275
+ ),
276
+ )
277
+ ),
278
+ 'https://www.wpbeginner.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
279
+ 'https://optinmonster.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
280
+ 'https://www.monsterinsights.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
281
+ 'https://rafflepress.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi'
282
+ );
283
+ ?>
284
+ </p>
285
+ <p>
286
+ <?php esc_html_e( 'Yup, we know a thing or two about building awesome products that customers love.', 'instagram-feed' ); ?>
287
+ </p> -->
288
+ </div>
289
+
290
+ <div class="sbi-admin-about-image sbi-admin-column-last">
291
+ <figure>
292
+ <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/team.jpg" alt="<?php esc_attr_e( 'The Sbi Team photo', 'instagram-feed' ); ?>">
293
+ <figcaption>
294
+ <?php esc_html_e( 'The Smash Balloon Team', 'instagram-feed' ); ?><br>
295
+ </figcaption>
296
+ </figure>
297
+ </div>
298
+
299
+ </div>
300
+ <?php
301
+ }
302
+
303
+ /**
304
+ * Display the Addons section of About tab.
305
+ *
306
+ * @since 1.5.8
307
+ */
308
+ protected function output_about_addons() {
309
+
310
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) || version_compare( PHP_VERSION, '5.3.0' ) <= 0
311
+ || version_compare( PHP_VERSION, '5.3.0' ) <= 0
312
+ || version_compare( get_bloginfo('version'), '4.6' , '<' ) ){
313
+ return;
314
+ }
315
+
316
+ $all_plugins = get_plugins();
317
+ $am_plugins = $this->get_am_plugins();
318
+
319
+ ?>
320
+ <div id="sbi-admin-addons">
321
+ <div class="addons-container">
322
+ <h3><?php echo __( 'Our Other Plugins', 'instagram-feed' ); ?></h3>
323
+ <?php
324
+ foreach ( $am_plugins as $plugin => $details ) :
325
+
326
+ $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
327
+
328
+ if ( $plugin === 'wpforms-lite/wpforms.php' ) {
329
+ echo '<h3>' .__( 'Plugins We Recommend', 'instagram-feed' ). '</h3>';
330
+ }
331
+
332
+ ?>
333
+ <div class="addon-container">
334
+ <div class="addon-item">
335
+ <div class="details sbi-clear">
336
+ <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
337
+ <h5 class="addon-name">
338
+ <?php echo esc_html( $plugin_data['details']['name'] ); ?>
339
+ </h5>
340
+ <p class="addon-desc">
341
+ <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
342
+ </p>
343
+ </div>
344
+ <div class="actions sbi-clear">
345
+ <div class="status">
346
+ <strong>
347
+ <?php
348
+ printf(
349
+ /* translators: %s - addon status label. */
350
+ esc_html__( 'Status: %s', 'instagram-feed' ),
351
+ '<span class="status-label ' . esc_attr( $plugin_data['status_class'] ) . '">' . wp_kses_post( $plugin_data['status_text'] ) . '</span>'
352
+ );
353
+ ?>
354
+ </strong>
355
+ </div>
356
+ <div class="action-button">
357
+ <button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
358
+ <?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
359
+ </button>
360
+ </div>
361
+ </div>
362
+ </div>
363
+ </div>
364
+ <?php endforeach; ?>
365
+ </div>
366
+ </div>
367
+ <?php
368
+ }
369
+
370
+ /**
371
+ * Get AM plugin data to display in the Addons section of About tab.
372
+ *
373
+ * @since 1.5.8
374
+ *
375
+ * @param string $plugin Plugin slug.
376
+ * @param array $details Plugin details.
377
+ * @param array $all_plugins List of all plugins.
378
+ *
379
+ * @return array
380
+ */
381
+ protected function get_plugin_data( $plugin, $details, $all_plugins ) {
382
+
383
+ $have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
384
+ $show_pro = false;
385
+
386
+ $plugin_data = array();
387
+
388
+ if ( $have_pro ) {
389
+ if ( array_key_exists( $plugin, $all_plugins ) ) {
390
+ if ( is_plugin_active( $plugin ) ) {
391
+ $show_pro = true;
392
+ }
393
+ }
394
+ if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
395
+ $show_pro = true;
396
+ }
397
+ if ( $show_pro ) {
398
+ $plugin = $details['pro']['plug'];
399
+ $details = $details['pro'];
400
+ }
401
+ }
402
+
403
+ if ( array_key_exists( $plugin, $all_plugins ) ) {
404
+ if ( is_plugin_active( $plugin ) ) {
405
+ // Status text/status.
406
+ $plugin_data['status_class'] = 'status-active';
407
+ $plugin_data['status_text'] = esc_html__( 'Active', 'instagram-feed' );
408
+ // Button text/status.
409
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
410
+ $plugin_data['action_text'] = esc_html__( 'Activated', 'instagram-feed' );
411
+ $plugin_data['plugin_src'] = esc_attr( $plugin );
412
+ } else {
413
+ // Status text/status.
414
+ $plugin_data['status_class'] = 'status-inactive';
415
+ $plugin_data['status_text'] = esc_html__( 'Inactive', 'instagram-feed' );
416
+ // Button text/status.
417
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
418
+ $plugin_data['action_text'] = esc_html__( 'Activate', 'instagram-feed' );
419
+ $plugin_data['plugin_src'] = esc_attr( $plugin );
420
+ }
421
+ } else {
422
+ // Doesn't exist, install.
423
+ // Status text/status.
424
+ $plugin_data['status_class'] = 'status-download';
425
+ if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
426
+ $plugin_data['status_class'] = 'status-go-to-url';
427
+ }
428
+ $plugin_data['status_text'] = esc_html__( 'Not Installed', 'instagram-feed' );
429
+ // Button text/status.
430
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
431
+ $plugin_data['action_text'] = esc_html__( 'Install Plugin', 'instagram-feed' );
432
+ $plugin_data['plugin_src'] = esc_url( $details['url'] );
433
+ }
434
+
435
+ $plugin_data['details'] = $details;
436
+
437
+ return $plugin_data;
438
+ }
439
+
440
+ /**
441
+ * Display the Getting Started tab content.
442
+ *
443
+ * @since 2.4/5.5
444
+ */
445
+ protected function output_getting_started() {
446
+
447
+ $license = $this->get_license_type();
448
+ ?>
449
+
450
+ <div class="sbi-admin-about-section sbi-admin-about-section-first-form" style="display:flex;">
451
+
452
+ <div class="sbi-admin-about-section-first-form-text">
453
+
454
+ <h2>
455
+ <?php esc_html_e( 'Creating Your First Feed', 'instagram-feed' ); ?>
456
+ </h2>
457
+
458
+ <p>
459
+ <?php esc_html_e( 'Want to get started creating your first feed with Instagram Feed? By following the step by step instructions in this walkthrough, you can easily publish your first feed on your site.', 'instagram-feed' ); ?>
460
+ </p>
461
+
462
+ <p>
463
+ <?php esc_html_e( 'Navigate to Instagram Feed in the admin sidebar to go the Configure page.', 'instagram-feed' ); ?>
464
+ </p>
465
+
466
+ <p>
467
+ <?php esc_html_e( 'Click on the large blue button to connect your Instagram account. Select "Personal" if your Instagram account is a personal account, "Business" if it is a business or creator account.', 'instagram-feed' ); ?>
468
+ </p>
469
+
470
+ <p>
471
+ <?php esc_html_e( 'Once you connect an Instagram account, you can display your feed on any post, page or widget using the shortcode [instagram-feed]. You can also use the Instagram Feed Gutenberg block if your site has the WordPress block editor enabled.', 'instagram-feed' ); ?>
472
+ </p>
473
+
474
+ <ul class="list-plain">
475
+ <li>
476
+ <a href="https://smashballoon.com/display-multiple-instagram-feeds/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=multiplefeeds" target="_blank" rel="noopener noreferrer">
477
+ <?php esc_html_e( 'How to Display Multiple Feeds', 'instagram-feed' ); ?>
478
+ </a>
479
+ </li>
480
+ <li>
481
+ <a href="https://smashballoon.com/get-access-token-from-another-account/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=differentaccounts" target="_blank" rel="noopener noreferrer">
482
+ <?php esc_html_e( 'Connect a Different Account', 'instagram-feed' ); ?>
483
+ </a>
484
+ </li>
485
+ <li>
486
+ <a href="https://smashballoon.com/differences-between-an-instagram-personal-and-business-account/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=personalvbusiness" target="_blank" rel="noopener noreferrer">
487
+ <?php esc_html_e( 'Personal Vs Business Accounts', 'instagram-feed' ); ?>
488
+ </a>
489
+ </li>
490
+ </ul>
491
+
492
+ </div>
493
+
494
+ <div class="sbi-admin-about-section-first-form-video">
495
+ <iframe src="https://www.youtube-nocookie.com/embed/q6ZXVU4g970?rel=0" width="540" height="304" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
496
+ </div>
497
+
498
+ </div>
499
+
500
+ <?php if ( ! in_array( $license, self::$licenses_top, true ) ) { ?>
501
+ <div class="sbi-admin-about-section sbi-admin-about-section-hero">
502
+
503
+ <div class="sbi-admin-about-section-hero-main">
504
+ <h2>
505
+ <?php esc_html_e( 'Get Instagram Feed Pro and Unlock all the Powerful Features', 'instagram-feed' ); ?>
506
+ </h2>
507
+
508
+ <p class="bigger">
509
+ <?php
510
+ echo wp_kses(
511
+ __( 'Thanks for being a loyal Instagram Feed Lite user. <strong>Upgrade to Instagram Feed Pro</strong> to unlock all the awesome features and experience<br>why Instagram Feed is the most popular Instagram plugin.', 'instagram-feed' ),
512
+ array(
513
+ 'br' => array(),
514
+ 'strong' => array(),
515
+ )
516
+ );
517
+ ?>
518
+ </p>
519
+
520
+ <p>
521
+ <?php
522
+ printf(
523
+ wp_kses(
524
+ /* translators: %s - stars. */
525
+ __( 'We know that you will truly love Instagram Feed. It has over <strong>2500+ five star ratings</strong> (%s) and is active on over 1 million websites.', 'instagram-feed' ),
526
+ array(
527
+ 'strong' => array(),
528
+ )
529
+ ),
530
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
531
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
532
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
533
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
534
+ '<i class="fa fa-star" aria-hidden="true"></i>'
535
+ );
536
+ ?>
537
+ </p>
538
+ </div>
539
+
540
+ <div class="sbi-admin-about-section-hero-extra">
541
+ <div class="sbi-admin-columns">
542
+ <div class="sbi-admin-column-50">
543
+ <ul class="list-features list-plain">
544
+ <li>
545
+ <i class="fa fa-check" aria-hidden="true"></i>
546
+ <?php esc_html_e( 'Recent hashtag, top Hashtag, and tagged feeds.', 'instagram-feed' ); ?>
547
+ </li>
548
+ <li>
549
+ <i class="fa fa-check" aria-hidden="true"></i>
550
+ <?php esc_html_e( 'More layouts - masonry, highlight, and carousel.', 'instagram-feed' ); ?>
551
+ </li>
552
+ <li>
553
+ <i class="fa fa-check" aria-hidden="true"></i>
554
+ <?php esc_html_e( 'Captions, comments, dates, likes, and comment counts.', 'instagram-feed' ); ?>
555
+ </li>
556
+ <li>
557
+ <i class="fa fa-check" aria-hidden="true"></i>
558
+ <?php esc_html_e( 'Pop-up lightbox to view images and watch videos.', 'instagram-feed' ); ?>
559
+ </li>
560
+ <li>
561
+ <i class="fa fa-check" aria-hidden="true"></i>
562
+ <?php esc_html_e( 'Filter feeds by word or hashtag.', 'instagram-feed' ); ?>
563
+ </li>
564
+ </ul>
565
+ </div>
566
+ <div class="sbi-admin-column-50 sbi-admin-column-last">
567
+ <ul class="list-features list-plain">
568
+ <li>
569
+ <i class="fa fa-check" aria-hidden="true"></i>
570
+ <?php esc_html_e( 'Display Instagram stories.', 'instagram-feed' ); ?>
571
+ </li>
572
+ <li>
573
+ <i class="fa fa-check" aria-hidden="true"></i>
574
+ <?php esc_html_e( 'Powerful visual moderation system.', 'instagram-feed' ); ?>
575
+ </li>
576
+ <li>
577
+ <i class="fa fa-check" aria-hidden="true"></i>
578
+ <?php esc_html_e( 'More customization for feed headers.', 'instagram-feed' ); ?>
579
+ </li>
580
+ <li>
581
+ <i class="fa fa-check" aria-hidden="true"></i>
582
+ <?php esc_html_e( 'Even more customization options for your feed.', 'instagram-feed' ); ?>
583
+ </li>
584
+ <li>
585
+ <i class="fa fa-check" aria-hidden="true"></i>
586
+ <?php esc_html_e( '"Shoppable" feeds.', 'instagram-feed' ); ?>
587
+ </li>
588
+ </ul>
589
+ </div>
590
+ </div>
591
+
592
+ <hr />
593
+
594
+ <h3 class="call-to-action">
595
+ <?php
596
+ if ( 'lite' === $license ) {
597
+ echo '<a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">';
598
+ } else {
599
+ echo '<a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-pro&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">';
600
+ }
601
+ esc_html_e( 'Get Instagram Feed Pro Today and Unlock all the Powerful Features', 'instagram-feed' );
602
+ ?>
603
+ </a>
604
+ </h3>
605
+
606
+ <?php if ( 'lite' === $license ) { ?>
607
+ <p>
608
+ <?php
609
+ echo wp_kses(
610
+ __( 'Bonus: Instagram Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'instagram-feed' ),
611
+ array(
612
+ 'span' => array(
613
+ 'class' => array(),
614
+ ),
615
+ )
616
+ );
617
+ ?>
618
+ </p>
619
+ <?php } ?>
620
+ </div>
621
+
622
+ </div>
623
+ <?php } ?>
624
+
625
+
626
+ <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
627
+ <div class="sbi-admin-column-20">
628
+ <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/steps.png" alt="">
629
+ </div>
630
+ <div class="sbi-admin-column-80">
631
+ <h2>
632
+ <?php esc_html_e( 'Detailed Step-By-Step Guide', 'instagram-feed' ); ?>
633
+ </h2>
634
+
635
+ <p>
636
+ <?php esc_html_e( 'View detailed steps with related images on our website. We have a comprehensive guide to getting up and running with Instagram Feed.', 'instagram-feed' ); ?>
637
+ </p>
638
+
639
+ <a href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=readsetup" target="_blank" rel="noopener noreferrer" class="sbi-admin-about-section-post-link">
640
+ <?php esc_html_e( 'Read Documentation', 'instagram-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
641
+ </a>
642
+ </div>
643
+ </div>
644
+
645
+ <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
646
+ <div class="sbi-admin-column-20">
647
+ <img src="<?php echo SBI_PLUGIN_URL; ?>img/about/api-error.png" alt="">
648
+ </div>
649
+ <div class="sbi-admin-column-80">
650
+ <h2>
651
+ <?php esc_html_e( 'Troubleshoot Connection and API Errors', 'instagram-feed' ); ?>
652
+ </h2>
653
+
654
+ <p>
655
+ <?php esc_html_e( 'Are you having trouble displaying your feed due to an error connecting an account or an Instagram API error? We have several articles to help you troubleshoot issues and help you solve them.', 'instagram-feed' ); ?>
656
+ </p>
657
+
658
+ <a href="https://smashballoon.com/instagram-feed/docs/errors/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=readerrordoc" target="_blank" rel="noopener noreferrer" class="sbi-admin-about-section-post-link">
659
+ <?php esc_html_e( 'Read Documentation', 'instagram-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
660
+ </a>
661
+ </div>
662
+ </div>
663
+
664
+ <?php
665
+ }
666
+
667
+ /**
668
+ * Get the next license type. Helper for Versus tab content.
669
+ *
670
+ * @since 1.5.5
671
+ *
672
+ * @param string $current Current license type slug.
673
+ *
674
+ * @return string Next license type slug.
675
+ */
676
+ protected function get_next_license( $current ) {
677
+
678
+ $current = ucfirst( $current );
679
+ $license_pairs = array(
680
+ 'Lite' => 'Pro',
681
+ 'Basic' => 'Pro',
682
+ 'Plus' => 'Pro',
683
+ 'Pro' => 'Elite',
684
+ );
685
+
686
+ return ! empty( $license_pairs[ $current ] ) ? $license_pairs[ $current ] : 'Elite';
687
+ }
688
+
689
+ /**
690
+ * Display the Versus tab content.
691
+ *
692
+ * @since 2.4/5.5
693
+ */
694
+ protected function output_versus() {
695
+
696
+ //$license = $this->get_license_type();
697
+ //$next_license = $this->get_next_license( $license );
698
+ $license = 'lite';
699
+ $next_license = 'pro';
700
+ ?>
701
+
702
+ <div class="sbi-admin-about-section sbi-admin-about-section-squashed">
703
+ <h1 class="centered">
704
+ <strong><?php echo esc_html( ucfirst( $license ) ); ?></strong> vs <strong><?php echo esc_html( ucfirst( $next_license ) ); ?></strong>
705
+ </h1>
706
+
707
+ <p class="centered">
708
+ <?php esc_html_e( 'Get the most out of your Instagram Feeds by upgrading to Pro and unlocking all of the powerful features.', 'instagram-feed' ); ?>
709
+ </p>
710
+ </div>
711
+
712
+ <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-hero sbi-admin-about-section-table">
713
+
714
+ <div class="sbi-admin-about-section-hero-main sbi-admin-columns">
715
+ <div class="sbi-admin-column-33">
716
+ <h3 class="no-margin">
717
+ <?php esc_html_e( 'Feature', 'instagram-feed' ); ?>
718
+ </h3>
719
+ </div>
720
+ <div class="sbi-admin-column-33">
721
+ <h3 class="no-margin">
722
+ <?php echo esc_html( ucfirst( $license ) ); ?>
723
+ </h3>
724
+ </div>
725
+ <div class="sbi-admin-column-33">
726
+ <h3 class="no-margin">
727
+ <?php echo esc_html( ucfirst( $next_license ) ); ?>
728
+ </h3>
729
+ </div>
730
+ </div>
731
+ <div class="sbi-admin-about-section-hero-extra no-padding sbi-admin-columns">
732
+
733
+ <table>
734
+ <?php
735
+ foreach ( self::$licenses_features as $slug => $name ) {
736
+ $current = $this->get_license_data( $slug, $license );
737
+ $next = $this->get_license_data( $slug, strtolower( $next_license ) );
738
+
739
+ if ( empty( $current ) || empty( $next ) ) {
740
+ continue;
741
+ }
742
+ ?>
743
+ <tr class="sbi-admin-columns">
744
+ <td class="sbi-admin-column-33">
745
+ <p><?php echo esc_html( $name ); ?></p>
746
+ </td>
747
+ <td class="sbi-admin-column-33">
748
+ <?php if ( is_array( $current ) ) : ?>
749
+ <p class="features-<?php echo esc_attr( $current['status'] ); ?>">
750
+ <?php echo wp_kses_post( implode( '<br>', $current['text'] ) ); ?>
751
+ </p>
752
+ <?php endif; ?>
753
+ </td>
754
+ <td class="sbi-admin-column-33">
755
+ <?php if ( is_array( $current ) ) : ?>
756
+ <p class="features-full">
757
+ <?php echo wp_kses_post( implode( '<br>', $next['text'] ) ); ?>
758
+ </p>
759
+ <?php endif; ?>
760
+ </td>
761
+ </tr>
762
+ <?php
763
+ }
764
+ ?>
765
+ </table>
766
+
767
+ </div>
768
+
769
+ </div>
770
+
771
+ <div class="sbi-admin-about-section sbi-admin-about-section-hero">
772
+ <div class="sbi-admin-about-section-hero-main no-border">
773
+ <h3 class="call-to-action centered">
774
+ <?php
775
+ if ( 'lite' === $license ) {
776
+ echo '<a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">';
777
+ } else {
778
+ echo '<a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-pro&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">';
779
+ }
780
+ printf( /* translators: %s - next license level. */
781
+ esc_html__( 'Get Instagram Feed Pro Today and Unlock all the Powerful Features', 'instagram-feed' ),
782
+ esc_html( $next_license )
783
+ );
784
+ ?>
785
+ </a>
786
+ </h3>
787
+
788
+ <?php if ( 'lite' === $license ) { ?>
789
+ <p class="centered">
790
+ <?php
791
+ echo wp_kses(
792
+ __( 'Bonus: Instagram Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'instagram-feed' ),
793
+ array(
794
+ 'span' => array(
795
+ 'class' => array(),
796
+ ),
797
+ )
798
+ );
799
+ ?>
800
+ </p>
801
+ <?php } ?>
802
+ </div>
803
+ </div>
804
+
805
+ <?php
806
+ }
807
+
808
+ /**
809
+ * List of AM plugins that we propose to install.
810
+ *
811
+ * @since 2.4/5.5
812
+ *
813
+ * @return array
814
+ */
815
+ protected function get_am_plugins() {
816
+
817
+ $images_url = SBI_PLUGIN_URL . 'img/about/';
818
+
819
+ return array(
820
+ 'custom-facebook-feed/custom-facebook-feed.php' => array(
821
+ 'icon' => $images_url . 'plugin-fb.png',
822
+ 'name' => esc_html__( 'Custom Facebook Feed', 'instagram-feed' ),
823
+ 'desc' => esc_html__( 'Custom Facebook Feed makes displaying your Facebook posts easy. Keep your site visitors informed and increase engagement with your Facebook page by displaying a feed on your website.', 'instagram-feed' ),
824
+ 'url' => 'https://downloads.wordpress.org/plugin/custom-facebook-feed.zip',
825
+ 'pro' => array(
826
+ 'plug' => 'custom-facebook-feed-pro/custom-facebook-feed.php',
827
+ 'icon' => $images_url . 'plugin-fb.png',
828
+ 'name' => esc_html__( 'Custom Facebook Feed Pro', 'instagram-feed' ),
829
+ 'desc' => esc_html__( 'Custom Facebook Feed makes displaying your Facebook posts easy. Keep your site visitors informed and increase engagement with your Facebook page by displaying a feed on your website.', 'instagram-feed' ),
830
+ 'url' => 'https://smashballoon.com/custom-facebook-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=cffinstaller',
831
+ 'act' => 'go-to-url',
832
+ ),
833
+ ),
834
+
835
+ 'custom-twitter-feeds/custom-twitter-feed.php' => array(
836
+ 'icon' => $images_url . 'plugin-tw.jpg',
837
+ 'name' => esc_html__( 'Custom Twitter Feeds', 'instagram-feed' ),
838
+ 'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'instagram-feed' ),
839
+ 'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
840
+ 'pro' => array(
841
+ 'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
842
+ 'icon' => $images_url . 'plugin-tw.jpg',
843
+ 'name' => esc_html__( 'Custom Twitter Feeds Pro', 'instagram-feed' ),
844
+ 'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'instagram-feed' ),
845
+ 'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_campaign=instagram-free&utm_source=cross&utm_medium=ctfinstaller',
846
+ 'act' => 'go-to-url',
847
+ ),
848
+ ),
849
+
850
+ 'feeds-for-youtube/youtube-feed.php' => array(
851
+ 'icon' => $images_url . 'plugin-yt.png',
852
+ 'name' => esc_html__( 'Feeds for YouTube', 'instagram-feed' ),
853
+ 'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'instagram-feed' ),
854
+ 'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
855
+ 'pro' => array(
856
+ 'plug' => 'youtube-feed-pro/youtube-feed.php',
857
+ 'icon' => $images_url . 'plugin-yt.png',
858
+ 'name' => esc_html__( 'Feeds for YouTube Pro', 'instagram-feed' ),
859
+ 'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'instagram-feed' ),
860
+ 'url' => 'https://smashballoon.com/youtube-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=sbyinstaller',
861
+ 'act' => 'go-to-url',
862
+ ),
863
+ ),
864
+
865
+ 'wpforms-lite/wpforms.php' => array(
866
+ 'icon' => $images_url . 'plugin-wpforms.png',
867
+ 'name' => esc_html__( 'WPForms', 'instagram-feed' ),
868
+ 'desc' => esc_html__( 'The most beginner friendly drag & drop WordPress forms plugin allowing you to create beautiful contact forms, subscription forms, payment forms, and more in minutes, not hours!', 'instagram-feed' ),
869
+ 'url' => 'https://downloads.wordpress.org/plugin/wpforms-lite.zip',
870
+ 'pro' => array(
871
+ 'plug' => 'wpforms/wpforms.php',
872
+ 'icon' => $images_url . 'plugin-wpforms.png',
873
+ 'name' => esc_html__( 'WPForms', 'instagram-feed' ),
874
+ 'desc' => esc_html__( 'The most beginner friendly drag & drop WordPress forms plugin allowing you to create beautiful contact forms, subscription forms, payment forms, and more in minutes, not hours!', 'instagram-feed' ),
875
+ 'url' => 'https://wpforms.com/lite-upgrade/?utm_source=WordPress&utm_campaign=liteplugin&utm_medium=sbi-about-page',
876
+ 'act' => 'go-to-url',
877
+ ),
878
+ ),
879
+
880
+ 'google-analytics-for-wordpress/googleanalytics.php' => array(
881
+ 'icon' => $images_url . 'plugin-mi.png',
882
+ 'name' => esc_html__( 'MonsterInsights', 'instagram-feed' ),
883
+ 'desc' => esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'instagram-feed' ),
884
+ 'url' => 'https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.zip',
885
+ 'pro' => array(
886
+ 'plug' => 'google-analytics-premium/googleanalytics-premium.php',
887
+ 'icon' => $images_url . 'plugin-mi.png',
888
+ 'name' => esc_html__( 'MonsterInsights Pro', 'instagram-feed' ),
889
+ 'desc' => esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'instagram-feed' ),
890
+ 'url' => 'https://www.monsterinsights.com/?utm_source=proplugin&utm_medium=about-page&utm_campaign=pluginurl&utm_content=7%2E0%2E0',
891
+ 'act' => 'go-to-url',
892
+ ),
893
+ ),
894
+
895
+ 'optinmonster/optin-monster-wp-api.php' => array(
896
+ 'icon' => $images_url . 'plugin-om.png',
897
+ 'name' => esc_html__( 'OptinMonster', 'instagram-feed' ),
898
+ 'desc' => esc_html__( 'Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers.', 'instagram-feed' ),
899
+ 'url' => 'https://downloads.wordpress.org/plugin/optinmonster.zip',
900
+ ),
901
+
902
+ 'wp-mail-smtp/wp_mail_smtp.php' => array(
903
+ 'icon' => $images_url . 'plugin-smtp.png',
904
+ 'name' => esc_html__( 'WP Mail SMTP', 'instagram-feed' ),
905
+ 'desc' => esc_html__( 'Make sure your website\'s emails reach the inbox. Our goal is to make email deliverability easy and reliable. Trusted by over 1 million websites.', 'instagram-feed' ),
906
+ 'url' => 'https://downloads.wordpress.org/plugin/wp-mail-smtp.zip',
907
+ 'pro' => array(
908
+ 'plug' => 'wp-mail-smtp-pro/wp_mail_smtp.php',
909
+ 'icon' => $images_url . 'plugin-smtp.png',
910
+ 'name' => esc_html__( 'WP Mail SMTP Pro', 'instagram-feed' ),
911
+ 'desc' => esc_html__( 'Make sure your website\'s emails reach the inbox. Our goal is to make email deliverability easy and reliable. Trusted by over 1 million websites.', 'instagram-feed' ),
912
+ 'url' => 'https://wpmailsmtp.com/pricing/',
913
+ 'act' => 'go-to-url',
914
+ ),
915
+ ),
916
+
917
+ 'rafflepress/rafflepress.php' => array(
918
+ 'icon' => $images_url . 'plugin-rp.png',
919
+ 'name' => esc_html__( 'RafflePress', 'instagram-feed' ),
920
+ 'desc' => esc_html__( 'Turn your visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with powerful viral giveaways & contests.', 'instagram-feed' ),
921
+ 'url' => 'https://downloads.wordpress.org/plugin/rafflepress.zip',
922
+ 'pro' => array(
923
+ 'plug' => 'rafflepress-pro/rafflepress-pro.php',
924
+ 'icon' => $images_url . 'plugin-rp.png',
925
+ 'name' => esc_html__( 'RafflePress Pro', 'instagram-feed' ),
926
+ 'desc' => esc_html__( 'Turn your visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with powerful viral giveaways & contests.', 'instagram-feed' ),
927
+ 'url' => 'https://rafflepress.com/pricing/',
928
+ 'act' => 'go-to-url',
929
+ ),
930
+ ),
931
+
932
+ 'all-in-one-seo-pack/all_in_one_seo_pack.php' => array(
933
+ 'icon' => $images_url . 'plugin-seo.png',
934
+ 'name' => esc_html__( 'All In One SEO Pack', 'instagram-feed' ),
935
+ 'desc' => esc_html__( 'Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.', 'instagram-feed' ),
936
+ 'url' => 'https://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip',
937
+ ),
938
+ );
939
+ }
940
+
941
+ /**
942
+ * Get the array of data that compared the license data.
943
+ *
944
+ * @since 2.4/5.5
945
+ *
946
+ * @param string $feature Feature name.
947
+ * @param string $license License type to get data for.
948
+ *
949
+ * @return array|false
950
+ */
951
+ protected function get_license_data( $feature, $license ) {
952
+
953
+ $data = array(
954
+ 'entries' => array(
955
+ 'lite' => array(
956
+ 'status' => 'partial',
957
+ 'text' => array(
958
+ '<strong>' . esc_html__( 'User feeds only', 'instagram-feed' ) . '</strong>',
959
+ ),
960
+ ),
961
+ 'basic' => array(
962
+ 'status' => 'full',
963
+ 'text' => array(
964
+ '<strong>' . esc_html__( 'User, Hashtag, and Tagged Feeds', 'instagram-feed' ) . '</strong>',
965
+ ),
966
+ ),
967
+ 'plus' => array(
968
+ 'status' => 'full',
969
+ 'text' => array(
970
+ '<strong>' . esc_html__( 'Complete Entry Management inside WordPress', 'instagram-feed' ) . '</strong>',
971
+ ),
972
+ ),
973
+ 'pro' => array(
974
+ 'status' => 'full',
975
+ 'text' => array(
976
+ '<strong>' . esc_html__( 'User, hashtag, and tagged feeds', 'instagram-feed' ) . '</strong>',
977
+ ),
978
+ ),
979
+ ),
980
+ 'fields' => array(
981
+ 'lite' => array(
982
+ 'status' => 'partial',
983
+ 'text' => array(
984
+ '<strong>' . esc_html__( 'Grid layout only', 'instagram-feed' ) . '</strong>',
985
+ ),
986
+ ),
987
+ 'basic' => array(
988
+ 'status' => 'full',
989
+ 'text' => array(
990
+ '<strong>' . esc_html__( 'Access to all Standard and Fancy Fields', 'instagram-feed' ) . '</strong>',
991
+ esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'instagram-feed' ),
992
+ ),
993
+ ),
994
+ 'plus' => array(
995
+ 'status' => 'full',
996
+ 'text' => array(
997
+ '<strong>' . esc_html__( 'Access to all Standard and Fancy Fields', 'instagram-feed' ) . '</strong>',
998
+ esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'instagram-feed' ),
999
+ ),
1000
+ ),
1001
+ 'pro' => array(
1002
+ 'status' => 'full',
1003
+ 'text' => array(
1004
+ '<strong>' . esc_html__( 'Grid, highlight, masonry, and carousel layouts', 'instagram-feed' ) . '</strong>',
1005
+ ),
1006
+ ),
1007
+ ),
1008
+ 'conditionals' => array(
1009
+ 'lite' => array(
1010
+ 'status' => 'partial',
1011
+ 'text' => array(
1012
+ '<strong>' . esc_html__( 'Image, carousel, and video thumbnails', 'instagram-feed' ) . '</strong>',
1013
+ ),
1014
+ ),
1015
+ 'basic' => array(
1016
+ 'status' => 'full',
1017
+ 'text' => array(
1018
+ '<strong>' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'instagram-feed' ) . '</strong>',
1019
+ ),
1020
+ ),
1021
+ 'plus' => array(
1022
+ 'status' => 'full',
1023
+ 'text' => array(
1024
+ '<strong>' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'instagram-feed' ) . '</strong>',
1025
+ ),
1026
+ ),
1027
+ 'pro' => array(
1028
+ 'status' => 'full',
1029
+ 'text' => array(
1030
+ '<strong>' . esc_html__( 'Display images, swipe through carousel posts, and play videos in a pop-up lightbox', 'instagram-feed' ) . '</strong>',
1031
+ ),
1032
+ ),
1033
+ ),
1034
+ 'templates' => array(
1035
+ 'lite' => array(
1036
+ 'status' => 'partial',
1037
+ 'text' => array(
1038
+ '<strong>' . esc_html__( 'Images and link only', 'instagram-feed' ) . '</strong>',
1039
+ ),
1040
+ ),
1041
+ 'basic' => array(
1042
+ 'status' => 'partial',
1043
+ 'text' => array(
1044
+ '<strong>' . esc_html__( 'Basic Form Templates', 'instagram-feed' ) . '</strong>',
1045
+ ),
1046
+ ),
1047
+ 'plus' => array(
1048
+ 'status' => 'partial',
1049
+ 'text' => array(
1050
+ '<strong>' . esc_html__( 'Basic Form Templates', 'instagram-feed' ) . '</strong>',
1051
+ ),
1052
+ ),
1053
+ 'pro' => array(
1054
+ 'status' => 'full',
1055
+ 'text' => array(
1056
+ '<strong>' . esc_html__( 'Thumbnails, dates, caption, comments, like counts, and comment counts.', 'instagram-feed' ) . '</strong>',
1057
+ ),
1058
+ ),
1059
+ ),
1060
+ 'marketing' => array(
1061
+ 'lite' => array(
1062
+ 'status' => 'none',
1063
+ 'text' => array(
1064
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1065
+ ),
1066
+ ),
1067
+ 'basic' => array(
1068
+ 'status' => 'partial',
1069
+ 'text' => array(
1070
+ '<strong>' . esc_html__( 'Limited Marketing Integration', 'instagram-feed' ) . '</strong>',
1071
+ esc_html__( 'Constant Contact only', 'instagram-feed' ),
1072
+ ),
1073
+ ),
1074
+ 'plus' => array(
1075
+ 'status' => 'partial',
1076
+ 'text' => array(
1077
+ '<strong>' . esc_html__( '6 Email Marketing Integrations', 'instagram-feed' ) . '</strong>',
1078
+ esc_html__( 'Constant Contact, Mailchimp, AWeber, GetResponse, Campaign Monitor, and Drip', 'instagram-feed' ),
1079
+ ),
1080
+ ),
1081
+ 'pro' => array(
1082
+ 'status' => 'full',
1083
+ 'text' => array(
1084
+ '<strong>' . esc_html__( 'Display your latest Instagram story in a pop-up lightbox', 'instagram-feed' ) . '</strong>',
1085
+ ),
1086
+ ),
1087
+ ),
1088
+ 'payments' => array(
1089
+ 'lite' => array(
1090
+ 'status' => 'none',
1091
+ 'text' => array(
1092
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1093
+ ),
1094
+ ),
1095
+ 'basic' => array(
1096
+ 'status' => 'none',
1097
+ 'text' => array(
1098
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1099
+ ),
1100
+ ),
1101
+ 'plus' => array(
1102
+ 'status' => 'none',
1103
+ 'text' => array(
1104
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1105
+ ),
1106
+ ),
1107
+ 'pro' => array(
1108
+ 'status' => 'full',
1109
+ 'text' => array(
1110
+ '<strong>' . esc_html__( 'Visual moderation system for removing posts or creating a "white list" of selected posts', 'instagram-feed' ) . '</strong>',
1111
+ ),
1112
+ ),
1113
+ ),
1114
+ 'surveys' => array(
1115
+ 'lite' => array(
1116
+ 'status' => 'partial',
1117
+ 'text' => array(
1118
+ '<strong>' . esc_html__( 'Standard or centered header', 'instagram-feed' ) . '</strong>',
1119
+ ),
1120
+ ),
1121
+ 'basic' => array(
1122
+ 'status' => 'none',
1123
+ 'text' => array(
1124
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1125
+ ),
1126
+ ),
1127
+ 'plus' => array(
1128
+ 'status' => 'none',
1129
+ 'text' => array(
1130
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1131
+ ),
1132
+ ),
1133
+ 'pro' => array(
1134
+ 'status' => 'full',
1135
+ 'text' => array(
1136
+ '<strong>' . esc_html__( 'Standard, centered, or boxed header that includes follower and post counts', 'instagram-feed' ) . '</strong>',
1137
+ ),
1138
+ ),
1139
+ ),
1140
+ 'advanced' => array(
1141
+ 'lite' => array(
1142
+ 'status' => 'partial',
1143
+ 'text' => array(
1144
+ '<strong>' . esc_html__( 'Posts link to the same post on Instagram', 'instagram-feed' ) . '</strong>',
1145
+ ),
1146
+ ),
1147
+ 'basic' => array(
1148
+ 'status' => 'partial',
1149
+ 'text' => array(
1150
+ '<strong>' . esc_html__( 'Limited Advanced Features', 'instagram-feed' ) . '</strong>',
1151
+ esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'instagram-feed' ),
1152
+ ),
1153
+ ),
1154
+ 'plus' => array(
1155
+ 'status' => 'partial',
1156
+ 'text' => array(
1157
+ '<strong>' . esc_html__( 'Limited Advanced Features', 'instagram-feed' ) . '</strong>',
1158
+ esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'instagram-feed' ),
1159
+ ),
1160
+ ),
1161
+ 'pro' => array(
1162
+ 'status' => 'full',
1163
+ 'text' => array(
1164
+ '<strong>' . esc_html__( 'Allow your posts to link to a URL in the caption or view in a lightbox', 'instagram-feed' ) . '</strong>',
1165
+ ),
1166
+ ),
1167
+ ),
1168
+ 'addons' => array(
1169
+ 'lite' => array(
1170
+ 'status' => 'none',
1171
+ 'text' => array(
1172
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1173
+ ),
1174
+ ),
1175
+ 'basic' => array(
1176
+ 'status' => 'partial',
1177
+ 'text' => array(
1178
+ '<strong>' . esc_html__( 'Custom Captcha Addon included', 'instagram-feed' ) . '</strong>',
1179
+ ),
1180
+ ),
1181
+ 'plus' => array(
1182
+ 'status' => 'partial',
1183
+ 'text' => array(
1184
+ '<strong>' . esc_html__( 'Email Marketing Addons included', 'instagram-feed' ) . '</strong>',
1185
+ ),
1186
+ ),
1187
+ 'pro' => array(
1188
+ 'status' => 'full',
1189
+ 'text' => array(
1190
+ '<strong>' . esc_html__( 'Filter by word or hashtag', 'instagram-feed' ) . '</strong>',
1191
+ ),
1192
+ ),
1193
+ ),
1194
+ 'support' => array(
1195
+ 'lite' => array(
1196
+ 'status' => 'partial',
1197
+ 'text' => array(
1198
+ '<strong>' . esc_html__( 'Limited support', 'instagram-feed' ) . '</strong>',
1199
+ ),
1200
+ ),
1201
+ 'basic' => array(
1202
+ 'status' => 'partial',
1203
+ 'text' => array(
1204
+ '<strong>' . esc_html__( 'Standard Support', 'instagram-feed' ) . '</strong>',
1205
+ ),
1206
+ ),
1207
+ 'plus' => array(
1208
+ 'status' => 'partial',
1209
+ 'text' => array(
1210
+ '<strong>' . esc_html__( 'Standard Support', 'instagram-feed' ) . '</strong>',
1211
+ ),
1212
+ ),
1213
+ 'pro' => array(
1214
+ 'status' => 'full',
1215
+ 'text' => array(
1216
+ '<strong>' . esc_html__( 'Priority support', 'instagram-feed' ) . '</strong>',
1217
+ ),
1218
+ ),
1219
+ 'elite' => array(
1220
+ 'status' => 'full',
1221
+ 'text' => array(
1222
+ '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1223
+ ),
1224
+ ),
1225
+ 'ultimate' => array(
1226
+ 'status' => 'full',
1227
+ 'text' => array(
1228
+ '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1229
+ ),
1230
+ ),
1231
+ 'agency' => array(
1232
+ 'status' => 'full',
1233
+ 'text' => array(
1234
+ '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1235
+ ),
1236
+ ),
1237
+ ),
1238
+ 'sites' => array(
1239
+ 'basic' => array(
1240
+ 'status' => 'partial',
1241
+ 'text' => array(
1242
+ '<strong>' . esc_html__( '1 Site', 'instagram-feed' ) . '</strong>',
1243
+ ),
1244
+ ),
1245
+ 'plus' => array(
1246
+ 'status' => 'partial',
1247
+ 'text' => array(
1248
+ '<strong>' . esc_html__( '3 Sites', 'instagram-feed' ) . '</strong>',
1249
+ ),
1250
+ ),
1251
+ 'pro' => array(
1252
+ 'status' => 'full',
1253
+ 'text' => array(
1254
+ '<strong>' . esc_html__( '5 Sites', 'instagram-feed' ) . '</strong>',
1255
+ ),
1256
+ ),
1257
+ 'elite' => array(
1258
+ 'status' => 'full',
1259
+ 'text' => array(
1260
+ '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1261
+ ),
1262
+ ),
1263
+ 'ultimate' => array(
1264
+ 'status' => 'full',
1265
+ 'text' => array(
1266
+ '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1267
+ ),
1268
+ ),
1269
+ 'agency' => array(
1270
+ 'status' => 'full',
1271
+ 'text' => array(
1272
+ '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1273
+ ),
1274
+ ),
1275
+ ),
1276
+ );
1277
+
1278
+ // Wrong feature?
1279
+ if ( ! isset( $data[ $feature ] ) ) {
1280
+ return false;
1281
+ }
1282
+
1283
+ // Is a top level license?
1284
+ $is_licenses_top = in_array( $license, self::$licenses_top, true );
1285
+
1286
+ // Wrong license type?
1287
+ if ( ! isset( $data[ $feature ][ $license ] ) && ! $is_licenses_top ) {
1288
+ return false;
1289
+ }
1290
+
1291
+ // Some licenses have partial data.
1292
+ if ( isset( $data[ $feature ][ $license ] ) ) {
1293
+ return $data[ $feature ][ $license ];
1294
+ }
1295
+
1296
+ // Top level plans has no feature difference with `pro` plan in most cases.
1297
+ return $is_licenses_top ? $data[ $feature ]['pro'] : $data[ $feature ][ $license ];
1298
+ }
1299
+
1300
+ /**
1301
+ * Get the current installation license type (always lowercase).
1302
+ *
1303
+ * @since 2.4/5.5
1304
+ *
1305
+ * @return string
1306
+ */
1307
+ protected function get_license_type() {
1308
+
1309
+ //$type = sbi_setting( 'type', '', 'sbi_license' );
1310
+
1311
+ //if ( empty( $type ) || ! sbi()->pro ) {
1312
+ $type = 'lite';
1313
+ //}
1314
+
1315
+ return strtolower( $type );
1316
+ }
1317
+ }
1318
+
1319
+ new SB_Instagram_About();
inc/admin/class-sbi-account-connector.php CHANGED
@@ -1,246 +1,246 @@
1
- <?php
2
- /**
3
- * Class SBI_Account_Connector
4
- *
5
- * Connecting new accounts from
6
- *
7
- * @since 5.10
8
- */
9
-
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- die( '-1' );
12
- }
13
-
14
- class SBI_Account_Connector {
15
-
16
- /**
17
- * @var array
18
- *
19
- * @since 5.10
20
- */
21
- private $account_data;
22
-
23
- /**
24
- * @var int
25
- *
26
- * @since 5.10
27
- */
28
- private $id;
29
-
30
- public function construct() {
31
- $this->account_data = array();
32
- }
33
-
34
- /**
35
- * When connecting accounts, modals are launched for various parts of the
36
- * sequence
37
- *
38
- * @param $sb_instagram_user_id string
39
- *
40
- * @since 5.10
41
- */
42
- public static function maybe_launch_modals( $sb_instagram_user_id ) {
43
- if ( ! empty( $_POST ) ) {
44
- return;
45
- }
46
- $connected_accounts = SBI_Account_Connector::stored_connected_accounts();
47
- if( isset( $_GET['sbi_access_token'] ) && isset( $_GET['sbi_graph_api'] ) ) {
48
- sbi_get_business_account_connection_modal( $sb_instagram_user_id );
49
- } elseif ( isset( $_GET['sbi_access_token'] ) && isset( $_GET['sbi_account_type'] ) ) {
50
- sbi_get_personal_connection_modal( $connected_accounts );
51
- }
52
- }
53
-
54
- /**
55
- * @return int
56
- *
57
- * @since 5.10
58
- */
59
- public function get_id() {
60
- return $this->id;
61
- }
62
-
63
- /**
64
- * @return array
65
- *
66
- * @since 5.10
67
- */
68
- public function get_account_data() {
69
- return $this->account_data;
70
- }
71
-
72
- /**
73
- * Get API data for the connected account using the account access
74
- * token and ID
75
- *
76
- * @param $data array
77
- *
78
- * @return array
79
- *
80
- * @since 5.10
81
- */
82
- public function fetch( $data ) {
83
- if ( ! isset( $data['user_id'] ) ) {
84
- return array( 'error' => __( 'Invalid account ID', 'instagram-feed' ) );
85
- }
86
- if ( ! isset( $data['access_token'] ) ) {
87
- return array( 'error' => __( 'Invalid access token', 'instagram-feed' ) );
88
- }
89
-
90
- $connection = new SB_Instagram_API_Connect( $data, 'header', array() );
91
- $connection->connect();
92
-
93
- if ( !$connection->is_wp_error() && ! $connection->is_instagram_error() ) {
94
- $new_data = $connection->get_data();
95
-
96
- if ( $data['type'] === 'basic' ) {
97
- $basic_account_access_token_connect = new SB_Instagram_API_Connect( $data, 'access_token', array() );
98
- $basic_account_access_token_connect->connect();
99
- $token_data = $basic_account_access_token_connect->get_data();
100
-
101
- if ( !$basic_account_access_token_connect->is_wp_error() && ! $basic_account_access_token_connect->is_instagram_error() ) {
102
- $expires_in = $token_data['expires_in'];
103
- $expires_timestamp = time() + $expires_in;
104
- } else {
105
- $expires_timestamp = time() + 60 * DAY_IN_SECONDS;
106
- }
107
-
108
- $new_connected_account = array(
109
- 'access_token' => $data['access_token'],
110
- 'account_type' => 'personal',
111
- 'user_id' => $new_data['id'],
112
- 'username' => $new_data['username'],
113
- 'expires_timestamp' => $expires_timestamp,
114
- 'type' => 'basic',
115
- 'profile_picture' => ''
116
- );
117
-
118
- } else {
119
- $new_connected_account = array(
120
- 'access_token' => $data['access_token'],
121
- 'id' => $new_data['id'],
122
- 'username' => $new_data['username'],
123
- 'type' => 'business',
124
- 'is_valid' => true,
125
- 'last_checked' => time(),
126
- 'profile_picture' => $new_data['profile_picture_url']
127
- );
128
- }
129
-
130
- return $new_connected_account;
131
-
132
- } else {
133
-
134
- if ( $connection->is_wp_error() ) {
135
- $error = $connection->get_wp_error();
136
- } else {
137
- $error = $connection->get_data();
138
- }
139
- return array( 'error' => sbi_formatted_error( $error ) );
140
- }
141
-
142
-
143
- }
144
-
145
- /**
146
- * Add data to current set of information about the account
147
- * being connected
148
- *
149
- * @param $data array
150
- *
151
- * @return bool
152
- *
153
- * @since 5.10
154
- */
155
- public function add_account_data( $data ) {
156
- $data['id'] = isset( $data['id'] ) ? $data['id'] : $data['user_id'];
157
- if ( ! isset( $data['id'] ) ) {
158
- return false;
159
- }
160
- if ( ! isset( $data['access_token'] ) ) {
161
- return false;
162
- }
163
-
164
- $access_token = isset( $data['access_token'] ) ? $data['access_token'] : '';
165
- $page_access_token = isset( $data['page_access_token'] ) ? $data['page_access_token'] : '';
166
- $username = isset( $data['username'] ) ? $data['username'] : '';
167
- $name = isset( $data['name'] ) ? $data['name'] : '';
168
- $profile_picture = isset( $data['profile_picture_url'] ) ? $data['profile_picture_url'] : '';
169
- if ( empty( $profile_picture ) ) {
170
- $profile_picture = isset( $data['profile_picture'] ) ? $data['profile_picture'] : '';
171
- }
172
- $user_id = isset( $data['id'] ) ? $data['id'] : '';
173
- $type = isset( $data['type'] ) ? $data['type'] : 'basic';
174
- $account_type = isset( $data['account_type'] ) ? $data['account_type'] : 'business';
175
- $this->id = $user_id;
176
- $this->account_data = array(
177
- 'access_token' => $access_token,
178
- 'user_id' => $user_id,
179
- 'username' => $username,
180
- 'is_valid' => true,
181
- 'last_checked' => time(),
182
- 'type' => $type,
183
- 'account_type' => $account_type,
184
- 'profile_picture' => ''
185
- );
186
-
187
- if ( $type === 'business' ) {
188
- $this->account_data['use_tagged'] = '1';
189
- $this->account_data['name'] = sbi_sanitize_emoji( $name );
190
- $this->account_data['profile_picture'] = $profile_picture;
191
- $this->account_data['local_avatar'] = SB_Instagram_Connected_Account::create_local_avatar( $username, $profile_picture );
192
- $this->account_data['page_access_token'] = $page_access_token;
193
- }
194
-
195
- if ( isset( $data[ 'expires_timestamp']) ) {
196
- $this->account_data['expires_timestamp'] = $data[ 'expires_timestamp'];
197
- }
198
-
199
- return true;
200
- }
201
-
202
- /**
203
- * Save data for new or existing connected account
204
- *
205
- * @return bool
206
- *
207
- * @since 5.10
208
- */
209
- public function update_stored_account() {
210
- $options = sbi_get_database_settings();
211
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
212
- $options['connected_accounts'] = $connected_accounts;
213
-
214
- if ( ! empty( $this->account_data ) ) {
215
- $options['connected_accounts'][ $this->id ] = $this->account_data;
216
- update_option( 'sb_instagram_settings', $options );
217
-
218
- return true;
219
- }
220
- return false;
221
- }
222
-
223
- /**
224
- * Actions after updating or connecting an account
225
- *
226
- * @since 5.10
227
- */
228
- public function after_update() {
229
- global $sb_instagram_posts_manager;
230
- $sb_instagram_posts_manager->remove_connected_account_error( $this->account_data );
231
- $sb_instagram_posts_manager->add_action_log( 'Connection or updating account ' . $this->account_data['username'] );
232
-
233
- do_action( 'sbi_account_connector_after_update', $this->account_data );
234
- }
235
-
236
- /**
237
- * @return array
238
- *
239
- * @since 5.10
240
- */
241
- public static function stored_connected_accounts() {
242
- $options = sbi_get_database_settings();
243
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
244
- return $connected_accounts;
245
- }
246
  }
1
+ <?php
2
+ /**
3
+ * Class SBI_Account_Connector
4
+ *
5
+ * Connecting new accounts from
6
+ *
7
+ * @since 5.10
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ die( '-1' );
12
+ }
13
+
14
+ class SBI_Account_Connector {
15
+
16
+ /**
17
+ * @var array
18
+ *
19
+ * @since 5.10
20
+ */
21
+ private $account_data;
22
+
23
+ /**
24
+ * @var int
25
+ *
26
+ * @since 5.10
27
+ */
28
+ private $id;
29
+
30
+ public function construct() {
31
+ $this->account_data = array();
32
+ }
33
+
34
+ /**
35
+ * When connecting accounts, modals are launched for various parts of the
36
+ * sequence
37
+ *
38
+ * @param $sb_instagram_user_id string
39
+ *
40
+ * @since 5.10
41
+ */
42
+ public static function maybe_launch_modals( $sb_instagram_user_id ) {
43
+ if ( ! empty( $_POST ) ) {
44
+ return;
45
+ }
46
+ $connected_accounts = SBI_Account_Connector::stored_connected_accounts();
47
+ if( isset( $_GET['sbi_access_token'] ) && isset( $_GET['sbi_graph_api'] ) ) {
48
+ sbi_get_business_account_connection_modal( $sb_instagram_user_id );
49
+ } elseif ( isset( $_GET['sbi_access_token'] ) && isset( $_GET['sbi_account_type'] ) ) {
50
+ sbi_get_personal_connection_modal( $connected_accounts );
51
+ }
52
+ }
53
+
54
+ /**
55
+ * @return int
56
+ *
57
+ * @since 5.10
58
+ */
59
+ public function get_id() {
60
+ return $this->id;
61
+ }
62
+
63
+ /**
64
+ * @return array
65
+ *
66
+ * @since 5.10
67
+ */
68
+ public function get_account_data() {
69
+ return $this->account_data;
70
+ }
71
+
72
+ /**
73
+ * Get API data for the connected account using the account access
74
+ * token and ID
75
+ *
76
+ * @param $data array
77
+ *
78
+ * @return array
79
+ *
80
+ * @since 5.10
81
+ */
82
+ public function fetch( $data ) {
83
+ if ( ! isset( $data['user_id'] ) ) {
84
+ return array( 'error' => __( 'Invalid account ID', 'instagram-feed' ) );
85
+ }
86
+ if ( ! isset( $data['access_token'] ) ) {
87
+ return array( 'error' => __( 'Invalid access token', 'instagram-feed' ) );
88
+ }
89
+
90
+ $connection = new SB_Instagram_API_Connect( $data, 'header', array() );
91
+ $connection->connect();
92
+
93
+ if ( !$connection->is_wp_error() && ! $connection->is_instagram_error() ) {
94
+ $new_data = $connection->get_data();
95
+
96
+ if ( $data['type'] === 'basic' ) {
97
+ $basic_account_access_token_connect = new SB_Instagram_API_Connect( $data, 'access_token', array() );
98
+ $basic_account_access_token_connect->connect();
99
+ $token_data = $basic_account_access_token_connect->get_data();
100
+
101
+ if ( !$basic_account_access_token_connect->is_wp_error() && ! $basic_account_access_token_connect->is_instagram_error() ) {
102
+ $expires_in = $token_data['expires_in'];
103
+ $expires_timestamp = time() + $expires_in;
104
+ } else {
105
+ $expires_timestamp = time() + 60 * DAY_IN_SECONDS;
106
+ }
107
+
108
+ $new_connected_account = array(
109
+ 'access_token' => $data['access_token'],
110
+ 'account_type' => 'personal',
111
+ 'user_id' => $new_data['id'],
112
+ 'username' => $new_data['username'],
113
+ 'expires_timestamp' => $expires_timestamp,
114
+ 'type' => 'basic',
115
+ 'profile_picture' => ''
116
+ );
117
+
118
+ } else {
119
+ $new_connected_account = array(
120
+ 'access_token' => $data['access_token'],
121
+ 'id' => $new_data['id'],
122
+ 'username' => $new_data['username'],
123
+ 'type' => 'business',
124
+ 'is_valid' => true,
125
+ 'last_checked' => time(),
126
+ 'profile_picture' => $new_data['profile_picture_url']
127
+ );
128
+ }
129
+
130
+ return $new_connected_account;
131
+
132
+ } else {
133
+
134
+ if ( $connection->is_wp_error() ) {
135
+ $error = $connection->get_wp_error();
136
+ } else {
137
+ $error = $connection->get_data();
138
+ }
139
+ return array( 'error' => sbi_formatted_error( $error ) );
140
+ }
141
+
142
+
143
+ }
144
+
145
+ /**
146
+ * Add data to current set of information about the account
147
+ * being connected
148
+ *
149
+ * @param $data array
150
+ *
151
+ * @return bool
152
+ *
153
+ * @since 5.10
154
+ */
155
+ public function add_account_data( $data ) {
156
+ $data['id'] = isset( $data['id'] ) ? $data['id'] : $data['user_id'];
157
+ if ( ! isset( $data['id'] ) ) {
158
+ return false;
159
+ }
160
+ if ( ! isset( $data['access_token'] ) ) {
161
+ return false;
162
+ }
163
+
164
+ $access_token = isset( $data['access_token'] ) ? $data['access_token'] : '';
165
+ $page_access_token = isset( $data['page_access_token'] ) ? $data['page_access_token'] : '';
166
+ $username = isset( $data['username'] ) ? $data['username'] : '';
167
+ $name = isset( $data['name'] ) ? $data['name'] : '';
168
+ $profile_picture = isset( $data['profile_picture_url'] ) ? $data['profile_picture_url'] : '';
169
+ if ( empty( $profile_picture ) ) {
170
+ $profile_picture = isset( $data['profile_picture'] ) ? $data['profile_picture'] : '';
171
+ }
172
+ $user_id = isset( $data['id'] ) ? $data['id'] : '';
173
+ $type = isset( $data['type'] ) ? $data['type'] : 'basic';
174
+ $account_type = isset( $data['account_type'] ) ? $data['account_type'] : 'business';
175
+ $this->id = $user_id;
176
+ $this->account_data = array(
177
+ 'access_token' => $access_token,
178
+ 'user_id' => $user_id,
179
+ 'username' => $username,
180
+ 'is_valid' => true,
181
+ 'last_checked' => time(),
182
+ 'type' => $type,
183
+ 'account_type' => $account_type,
184
+ 'profile_picture' => ''
185
+ );
186
+
187
+ if ( $type === 'business' ) {
188
+ $this->account_data['use_tagged'] = '1';
189
+ $this->account_data['name'] = sbi_sanitize_emoji( $name );
190
+ $this->account_data['profile_picture'] = $profile_picture;
191
+ $this->account_data['local_avatar'] = SB_Instagram_Connected_Account::create_local_avatar( $username, $profile_picture );
192
+ $this->account_data['page_access_token'] = $page_access_token;
193
+ }
194
+
195
+ if ( isset( $data[ 'expires_timestamp']) ) {
196
+ $this->account_data['expires_timestamp'] = $data[ 'expires_timestamp'];
197
+ }
198
+
199
+ return true;
200
+ }
201
+
202
+ /**
203
+ * Save data for new or existing connected account
204
+ *
205
+ * @return bool
206
+ *
207
+ * @since 5.10
208
+ */
209
+ public function update_stored_account() {
210
+ $options = sbi_get_database_settings();
211
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
212
+ $options['connected_accounts'] = $connected_accounts;
213
+
214
+ if ( ! empty( $this->account_data ) ) {
215
+ $options['connected_accounts'][ $this->id ] = $this->account_data;
216
+ update_option( 'sb_instagram_settings', $options );
217
+
218
+ return true;
219
+ }
220
+ return false;
221
+ }
222
+
223
+ /**
224
+ * Actions after updating or connecting an account
225
+ *
226
+ * @since 5.10
227
+ */
228
+ public function after_update() {
229
+ global $sb_instagram_posts_manager;
230
+ $sb_instagram_posts_manager->remove_connected_account_error( $this->account_data );
231
+ $sb_instagram_posts_manager->add_action_log( 'Connection or updating account ' . $this->account_data['username'] );
232
+
233
+ do_action( 'sbi_account_connector_after_update', $this->account_data );
234
+ }
235
+
236
+ /**
237
+ * @return array
238
+ *
239
+ * @since 5.10
240
+ */
241
+ public static function stored_connected_accounts() {
242
+ $options = sbi_get_database_settings();
243
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
244
+ return $connected_accounts;
245
+ }
246
  }
inc/admin/class-sbi-new-user.php CHANGED
@@ -1,387 +1,387 @@
1
- <?php
2
- /**
3
- * SBI_New_User.
4
- *
5
- * @since 2.6
6
- */
7
-
8
- // Exit if accessed directly
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class SBI_New_User extends SBI_Notifications {
14
-
15
- /**
16
- * Source of notifications content.
17
- *
18
- * @since 2.6
19
- *
20
- * @var string
21
- */
22
- const SOURCE_URL = 'http://plugin.smashballoon.com/newuser.json';
23
-
24
- /**
25
- * @var string
26
- */
27
- const OPTION_NAME = 'sbi_newuser_notifications';
28
-
29
- /**
30
- * Register hooks.
31
- *
32
- * @since 2.6
33
- */
34
- public function hooks() {
35
- add_action( 'admin_notices', array( $this, 'output' ), 8 );
36
-
37
- add_action( 'admin_init', array( $this, 'dismiss' ) );
38
- }
39
-
40
- public function option_name() {
41
- return self::OPTION_NAME;
42
- }
43
-
44
- public function source_url() {
45
- return self::SOURCE_URL;
46
- }
47
-
48
- /**
49
- * Verify notification data before it is saved.
50
- *
51
- * @param array $notifications Array of notifications items to verify.
52
- *
53
- * @return array
54
- *
55
- * @since 2.6
56
- */
57
- public function verify( $notifications ) {
58
- $data = array();
59
-
60
- if ( ! is_array( $notifications ) || empty( $notifications ) ) {
61
- return $data;
62
- }
63
-
64
- $option = $this->get_option();
65
-
66
- foreach ( $notifications as $key => $notification ) {
67
-
68
- // The message should never be empty, if they are, ignore.
69
- if ( empty( $notification['content'] ) ) {
70
- continue;
71
- }
72
-
73
- // Ignore if notification has already been dismissed.
74
- if ( ! empty( $option['dismissed'] ) && in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
75
- continue;
76
- }
77
-
78
- $data[ $key ] = $notification;
79
- }
80
-
81
- return $data;
82
- }
83
-
84
- /**
85
- * Verify saved notification data for active notifications.
86
- *
87
- * @since 2.6
88
- *
89
- * @param array $notifications Array of notifications items to verify.
90
- *
91
- * @return array
92
- */
93
- public function verify_active( $notifications ) {
94
- if ( ! is_array( $notifications ) || empty( $notifications ) ) {
95
- return array();
96
- }
97
-
98
- $sbi_statuses_option = get_option( 'sbi_statuses', array() );
99
- $current_time = sbi_get_current_time();
100
-
101
- // rating notice logic
102
- $sbi_rating_notice_option = get_option( 'sbi_rating_notice', false );
103
- $sbi_rating_notice_waiting = get_transient( 'instagram_feed_rating_notice_waiting' );
104
- $should_show_rating_notice = ($sbi_rating_notice_waiting !== 'waiting' && $sbi_rating_notice_option !== 'dismissed');
105
-
106
- // new user discount logic
107
- $in_new_user_month_range = true;
108
- $should_show_new_user_discount = false;
109
- $has_been_one_month_since_rating_dismissal = isset( $sbi_statuses_option['rating_notice_dismissed'] ) ? ((int)$sbi_statuses_option['rating_notice_dismissed'] + ((int)$notifications['review']['wait'] * DAY_IN_SECONDS)) < $current_time + 1: true;
110
-
111
- if ( isset( $sbi_statuses_option['first_install'] ) && $sbi_statuses_option['first_install'] === 'from_update' ) {
112
- global $current_user;
113
- $user_id = $current_user->ID;
114
- $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice' );
115
- $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
116
- if ( $ignore_new_user_sale_notice_meta !== 'always' ) {
117
- $should_show_new_user_discount = true;
118
- }
119
- } elseif ( $in_new_user_month_range && $has_been_one_month_since_rating_dismissal && $sbi_rating_notice_waiting !== 'waiting' ) {
120
- global $current_user;
121
- $user_id = $current_user->ID;
122
- $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice' );
123
- $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
124
-
125
- if ( $ignore_new_user_sale_notice_meta !== 'always'
126
- && isset( $sbi_statuses_option['first_install'] )
127
- && $current_time > (int)$sbi_statuses_option['first_install'] + ((int)$notifications['discount']['wait'] * DAY_IN_SECONDS) ) {
128
- $should_show_new_user_discount = true;
129
- }
130
- }
131
-
132
- if ( isset( $notifications['review'] ) && $should_show_rating_notice ) {
133
- return array( $notifications['review'] );
134
- } elseif ( isset( $notifications['discount'] ) && $should_show_new_user_discount ) {
135
- return array( $notifications['discount'] );
136
- }
137
-
138
- return array();
139
- }
140
-
141
- /**
142
- * Get notification data.
143
- *
144
- * @since 2.6
145
- *
146
- * @return array
147
- */
148
- public function get() {
149
- if ( ! $this->has_access() ) {
150
- return array();
151
- }
152
-
153
- $option = $this->get_option();
154
-
155
- // Only update if does not exist.
156
- if ( empty( $option['update'] ) ) {
157
- $this->update();
158
- }
159
-
160
- $events = ! empty( $option['events'] ) ? $this->verify_active( $option['events'] ) : array();
161
- $feed = ! empty( $option['feed'] ) ? $this->verify_active( $option['feed'] ) : array();
162
-
163
- return array_merge( $events, $feed );
164
- }
165
-
166
- /**
167
- * Add a manual notification event.
168
- *
169
- * @since 2.6
170
- *
171
- * @param array $notification Notification data.
172
- */
173
- public function add( $notification ) {
174
- if ( empty( $notification['id'] ) ) {
175
- return;
176
- }
177
-
178
- $option = $this->get_option();
179
-
180
- if ( in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
181
- return;
182
- }
183
-
184
- foreach ( $option['events'] as $item ) {
185
- if ( $item['id'] === $notification['id'] ) {
186
- return;
187
- }
188
- }
189
-
190
- $notification = $this->verify( array( $notification ) );
191
-
192
- update_option(
193
- $this->option_name(),
194
- array(
195
- 'update' => $option['update'],
196
- 'feed' => $option['feed'],
197
- 'events' => array_merge( $notification, $option['events'] ),
198
- 'dismissed' => $option['dismissed'],
199
- )
200
- );
201
- }
202
-
203
- /**
204
- * Update notification data from feed.
205
- *
206
- * @since 2.6
207
- */
208
- public function update() {
209
- $feed = $this->fetch_feed();
210
- $option = $this->get_option();
211
-
212
- update_option(
213
- $this->option_name(),
214
- array(
215
- 'update' => time(),
216
- 'feed' => $feed,
217
- 'events' => $option['events'],
218
- 'dismissed' => $option['dismissed'],
219
- )
220
- );
221
- }
222
-
223
- /**
224
- * Do not enqueue anything extra.
225
- *
226
- * @since 2.6
227
- */
228
- public function enqueues() {
229
-
230
- }
231
-
232
- /**
233
- * Output notifications on Form Overview admin area.
234
- *
235
- * @since 2.6
236
- */
237
- public function output() {
238
- $notifications = $this->get();
239
-
240
- if ( empty( $notifications ) ) {
241
- return;
242
- }
243
-
244
- // new user notices included in regular settings page notifications so this
245
- // checks to see if user is one of those pages
246
- if ( ! empty( $_GET['page'] )
247
- && strpos( $_GET['page'], 'sb-instagram-feed' ) !== false ) {
248
- return;
249
- }
250
-
251
- $content_allowed_tags = array(
252
- 'em' => array(),
253
- 'strong' => array(),
254
- 'span' => array(
255
- 'style' => array(),
256
- ),
257
- 'a' => array(
258
- 'href' => array(),
259
- 'target' => array(),
260
- 'rel' => array(),
261
- ),
262
- );
263
- $image_overlay = '';
264
-
265
- foreach ( $notifications as $notification ) {
266
- $type = sanitize_text_field( $notification['id'] );
267
- $close_href = add_query_arg( array( 'sbi_dismiss' => $type ) );
268
- $img_src = SBI_PLUGIN_URL . 'img/' . sanitize_text_field( $notification['image'] );
269
- $content = '';
270
- if ( ! empty( $notification['content'] ) ) {
271
- $content = wp_kses( $this->replace_merge_fields( $notification['content'], $notification ), $content_allowed_tags );
272
- }
273
- $buttons = array();
274
- if ( ! empty( $notification['btns'] ) && is_array( $notification['btns'] ) ) {
275
- foreach ( $notification['btns'] as $btn_type => $btn ) {
276
- if ( ! is_array( $btn['url'] ) ) {
277
- $buttons[ $btn_type ]['url'] = $this->replace_merge_fields( $btn['url'], $notification );
278
- } elseif ( is_array( $btn['url'] ) ) {
279
- $buttons[ $btn_type ]['url'] = add_query_arg( $btn['url'] );
280
- }
281
-
282
- $buttons[ $btn_type ]['attr'] = '';
283
- if ( ! empty( $btn['attr'] ) ) {
284
- $buttons[ $btn_type ]['attr'] = ' target="_blank" rel="noopener noreferrer"';
285
- }
286
-
287
- $buttons[ $btn_type ]['class'] = '';
288
- if ( ! empty( $btn['class'] ) ) {
289
- $buttons[ $btn_type ]['class'] = ' ' . $btn['class'];
290
- }
291
-
292
- $buttons[ $btn_type ]['text'] = '';
293
- if ( ! empty( $btn['text'] ) ) {
294
- $buttons[ $btn_type ]['text'] = wp_kses( $btn['text'], $content_allowed_tags );
295
- }
296
- }
297
- }
298
- if ( isset( $notification['image_overlay'] ) ) {
299
- $image_overlay = '<div class="img-overlay">'. esc_html( $notification['image_overlay'] ).'</div>';
300
- }
301
- }
302
- ?>
303
-
304
- <div class="sbi_notice sbi_<?php echo esc_attr( $type ); ?>_notice">
305
- <div class="sbi_thumb">
306
- <img src="<?php echo esc_url( $img_src ); ?>" alt="notice">
307
- <?php echo $image_overlay; ?>
308
- </div>
309
- <div class="sbi-notice-text">
310
- <p style="padding-top: 4px;"><?php echo $content; ?></p>
311
- <p class="links">
312
- <?php foreach ( $buttons as $button ) : ?>
313
- <a class="<?php echo esc_attr( $button['class'] ); ?>" href="<?php echo esc_attr( $button['url'] ); ?>"<?php echo $button['attr']; ?>><?php echo $button['text']; ?></a>
314
- <?php endforeach; ?>
315
- </p>
316
- </div>
317
- <a class="sbi_notice_close" href="<?php echo esc_attr( $close_href ); ?>"><i class="fa fa-close"></i></a>
318
- </div>
319
- <?php
320
- }
321
-
322
- /**
323
- * Hide messages permanently or some can be dismissed temporarily
324
- *
325
- * @since 2.6
326
- */
327
- public function dismiss() {
328
- global $current_user;
329
- $user_id = $current_user->ID;
330
- $sbi_statuses_option = get_option( 'sbi_statuses', array() );
331
-
332
- if ( isset( $_GET['sbi_ignore_rating_notice_nag'] ) ) {
333
- if ( (int)$_GET['sbi_ignore_rating_notice_nag'] === 1 ) {
334
- update_option( 'sbi_rating_notice', 'dismissed', false );
335
- $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
336
- update_option( 'sbi_statuses', $sbi_statuses_option, false );
337
-
338
- } elseif ( $_GET['sbi_ignore_rating_notice_nag'] === 'later' ) {
339
- set_transient( 'instagram_feed_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS );
340
- update_option( 'sbi_rating_notice', 'pending', false );
341
- }
342
- }
343
-
344
- if ( isset( $_GET['sbi_ignore_new_user_sale_notice'] ) ) {
345
- $response = sanitize_text_field( $_GET['sbi_ignore_new_user_sale_notice'] );
346
- if ( $response === 'always' ) {
347
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
348
-
349
- $current_month_number = (int)date('n', sbi_get_current_time() );
350
- $not_early_in_the_year = ($current_month_number > 5);
351
-
352
- if ( $not_early_in_the_year ) {
353
- update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
354
- }
355
-
356
- }
357
- }
358
-
359
- if ( isset( $_GET['sbi_ignore_bfcm_sale_notice'] ) ) {
360
- $response = sanitize_text_field( $_GET['sbi_ignore_bfcm_sale_notice'] );
361
- if ( $response === 'always' ) {
362
- update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', 'always' );
363
- } elseif ( $response === date( 'Y', sbi_get_current_time() ) ) {
364
- update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
365
- }
366
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
367
- }
368
-
369
- if ( isset( $_GET['sbi_dismiss'] ) ) {
370
- if ( $_GET['sbi_dismiss'] === 'review' ) {
371
- update_option( 'sbi_rating_notice', 'dismissed', false );
372
- $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
373
- update_option( 'sbi_statuses', $sbi_statuses_option, false );
374
- } elseif ( $_GET['sbi_dismiss'] === 'discount' ) {
375
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
376
-
377
- $current_month_number = (int)date('n', sbi_get_current_time() );
378
- $not_early_in_the_year = ($current_month_number > 5);
379
-
380
- if ( $not_early_in_the_year ) {
381
- update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
382
- }
383
- }
384
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
385
- }
386
- }
387
- }
1
+ <?php
2
+ /**
3
+ * SBI_New_User.
4
+ *
5
+ * @since 2.6
6
+ */
7
+
8
+ // Exit if accessed directly
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class SBI_New_User extends SBI_Notifications {
14
+
15
+ /**
16
+ * Source of notifications content.
17
+ *
18
+ * @since 2.6
19
+ *
20
+ * @var string
21
+ */
22
+ const SOURCE_URL = 'http://plugin.smashballoon.com/newuser.json';
23
+
24
+ /**
25
+ * @var string
26
+ */
27
+ const OPTION_NAME = 'sbi_newuser_notifications';
28
+
29
+ /**
30
+ * Register hooks.
31
+ *
32
+ * @since 2.6
33
+ */
34
+ public function hooks() {
35
+ add_action( 'admin_notices', array( $this, 'output' ), 8 );
36
+
37
+ add_action( 'admin_init', array( $this, 'dismiss' ) );
38
+ }
39
+
40
+ public function option_name() {
41
+ return self::OPTION_NAME;
42
+ }
43
+
44
+ public function source_url() {
45
+ return self::SOURCE_URL;
46
+ }
47
+
48
+ /**
49
+ * Verify notification data before it is saved.
50
+ *
51
+ * @param array $notifications Array of notifications items to verify.
52
+ *
53
+ * @return array
54
+ *
55
+ * @since 2.6
56
+ */
57
+ public function verify( $notifications ) {
58
+ $data = array();
59
+
60
+ if ( ! is_array( $notifications ) || empty( $notifications ) ) {
61
+ return $data;
62
+ }
63
+
64
+ $option = $this->get_option();
65
+
66
+ foreach ( $notifications as $key => $notification ) {
67
+
68
+ // The message should never be empty, if they are, ignore.
69
+ if ( empty( $notification['content'] ) ) {
70
+ continue;
71
+ }
72
+
73
+ // Ignore if notification has already been dismissed.
74
+ if ( ! empty( $option['dismissed'] ) && in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
75
+ continue;
76
+ }
77
+
78
+ $data[ $key ] = $notification;
79
+ }
80
+
81
+ return $data;
82
+ }
83
+
84
+ /**
85
+ * Verify saved notification data for active notifications.
86
+ *
87
+ * @since 2.6
88
+ *
89
+ * @param array $notifications Array of notifications items to verify.
90
+ *
91
+ * @return array
92
+ */
93
+ public function verify_active( $notifications ) {
94
+ if ( ! is_array( $notifications ) || empty( $notifications ) ) {
95
+ return array();
96
+ }
97
+
98
+ $sbi_statuses_option = get_option( 'sbi_statuses', array() );
99
+ $current_time = sbi_get_current_time();
100
+
101
+ // rating notice logic
102
+ $sbi_rating_notice_option = get_option( 'sbi_rating_notice', false );
103
+ $sbi_rating_notice_waiting = get_transient( 'instagram_feed_rating_notice_waiting' );
104
+ $should_show_rating_notice = ($sbi_rating_notice_waiting !== 'waiting' && $sbi_rating_notice_option !== 'dismissed');
105
+
106
+ // new user discount logic
107
+ $in_new_user_month_range = true;
108
+ $should_show_new_user_discount = false;
109
+ $has_been_one_month_since_rating_dismissal = isset( $sbi_statuses_option['rating_notice_dismissed'] ) ? ((int)$sbi_statuses_option['rating_notice_dismissed'] + ((int)$notifications['review']['wait'] * DAY_IN_SECONDS)) < $current_time + 1: true;
110
+
111
+ if ( isset( $sbi_statuses_option['first_install'] ) && $sbi_statuses_option['first_install'] === 'from_update' ) {
112
+ global $current_user;
113
+ $user_id = $current_user->ID;
114
+ $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice' );
115
+ $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
116
+ if ( $ignore_new_user_sale_notice_meta !== 'always' ) {
117
+ $should_show_new_user_discount = true;
118
+ }
119
+ } elseif ( $in_new_user_month_range && $has_been_one_month_since_rating_dismissal && $sbi_rating_notice_waiting !== 'waiting' ) {
120
+ global $current_user;
121
+ $user_id = $current_user->ID;
122
+ $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice' );
123
+ $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
124
+
125
+ if ( $ignore_new_user_sale_notice_meta !== 'always'
126
+ && isset( $sbi_statuses_option['first_install'] )
127
+ && $current_time > (int)$sbi_statuses_option['first_install'] + ((int)$notifications['discount']['wait'] * DAY_IN_SECONDS) ) {
128
+ $should_show_new_user_discount = true;
129
+ }
130
+ }
131
+
132
+ if ( isset( $notifications['review'] ) && $should_show_rating_notice ) {
133
+ return array( $notifications['review'] );
134
+ } elseif ( isset( $notifications['discount'] ) && $should_show_new_user_discount ) {
135
+ return array( $notifications['discount'] );
136
+ }
137
+
138
+ return array();
139
+ }
140
+
141
+ /**
142
+ * Get notification data.
143
+ *
144
+ * @since 2.6
145
+ *
146
+ * @return array
147
+ */
148
+ public function get() {
149
+ if ( ! $this->has_access() ) {
150
+ return array();
151
+ }
152
+
153
+ $option = $this->get_option();
154
+
155
+ // Only update if does not exist.
156
+ if ( empty( $option['update'] ) ) {
157
+ $this->update();
158
+ }
159
+
160
+ $events = ! empty( $option['events'] ) ? $this->verify_active( $option['events'] ) : array();
161
+ $feed = ! empty( $option['feed'] ) ? $this->verify_active( $option['feed'] ) : array();
162
+
163
+ return array_merge( $events, $feed );
164
+ }
165
+
166
+ /**
167
+ * Add a manual notification event.
168
+ *
169
+ * @since 2.6
170
+ *
171
+ * @param array $notification Notification data.
172
+ */
173
+ public function add( $notification ) {
174
+ if ( empty( $notification['id'] ) ) {
175
+ return;
176
+ }
177
+
178
+ $option = $this->get_option();
179
+
180
+ if ( in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
181
+ return;
182
+ }
183
+
184
+ foreach ( $option['events'] as $item ) {
185
+ if ( $item['id'] === $notification['id'] ) {
186
+ return;
187
+ }
188
+ }
189
+
190
+ $notification = $this->verify( array( $notification ) );
191
+
192
+ update_option(
193
+ $this->option_name(),
194
+ array(
195
+ 'update' => $option['update'],
196
+ 'feed' => $option['feed'],
197
+ 'events' => array_merge( $notification, $option['events'] ),
198
+ 'dismissed' => $option['dismissed'],
199
+ )
200
+ );
201
+ }
202
+
203
+ /**
204
+ * Update notification data from feed.
205
+ *
206
+ * @since 2.6
207
+ */
208
+ public function update() {
209
+ $feed = $this->fetch_feed();
210
+ $option = $this->get_option();
211
+
212
+ update_option(
213
+ $this->option_name(),
214
+ array(
215
+ 'update' => time(),
216
+ 'feed' => $feed,
217
+ 'events' => $option['events'],
218
+ 'dismissed' => $option['dismissed'],
219
+ )
220
+ );
221
+ }
222
+
223
+ /**
224
+ * Do not enqueue anything extra.
225
+ *
226
+ * @since 2.6
227
+ */
228
+ public function enqueues() {
229
+
230
+ }
231
+
232
+ /**
233
+ * Output notifications on Form Overview admin area.
234
+ *
235
+ * @since 2.6
236
+ */
237
+ public function output() {
238
+ $notifications = $this->get();
239
+
240
+ if ( empty( $notifications ) ) {
241
+ return;
242
+ }
243
+
244
+ // new user notices included in regular settings page notifications so this
245
+ // checks to see if user is one of those pages
246
+ if ( ! empty( $_GET['page'] )
247
+ && strpos( $_GET['page'], 'sb-instagram-feed' ) !== false ) {
248
+ return;
249
+ }
250
+
251
+ $content_allowed_tags = array(
252
+ 'em' => array(),
253
+ 'strong' => array(),
254
+ 'span' => array(
255
+ 'style' => array(),
256
+ ),
257
+ 'a' => array(
258
+ 'href' => array(),
259
+ 'target' => array(),
260
+ 'rel' => array(),
261
+ ),
262
+ );
263
+ $image_overlay = '';
264
+
265
+ foreach ( $notifications as $notification ) {
266
+ $type = sanitize_text_field( $notification['id'] );
267
+ $close_href = add_query_arg( array( 'sbi_dismiss' => $type ) );
268
+ $img_src = SBI_PLUGIN_URL . 'img/' . sanitize_text_field( $notification['image'] );
269
+ $content = '';
270
+ if ( ! empty( $notification['content'] ) ) {
271
+ $content = wp_kses( $this->replace_merge_fields( $notification['content'], $notification ), $content_allowed_tags );
272
+ }
273
+ $buttons = array();
274
+ if ( ! empty( $notification['btns'] ) && is_array( $notification['btns'] ) ) {
275
+ foreach ( $notification['btns'] as $btn_type => $btn ) {
276
+ if ( ! is_array( $btn['url'] ) ) {
277
+ $buttons[ $btn_type ]['url'] = $this->replace_merge_fields( $btn['url'], $notification );
278
+ } elseif ( is_array( $btn['url'] ) ) {
279
+ $buttons[ $btn_type ]['url'] = add_query_arg( $btn['url'] );
280
+ }
281
+
282
+ $buttons[ $btn_type ]['attr'] = '';
283
+ if ( ! empty( $btn['attr'] ) ) {
284
+ $buttons[ $btn_type ]['attr'] = ' target="_blank" rel="noopener noreferrer"';
285
+ }
286
+
287
+ $buttons[ $btn_type ]['class'] = '';
288
+ if ( ! empty( $btn['class'] ) ) {
289
+ $buttons[ $btn_type ]['class'] = ' ' . $btn['class'];
290
+ }
291
+
292
+ $buttons[ $btn_type ]['text'] = '';
293
+ if ( ! empty( $btn['text'] ) ) {
294
+ $buttons[ $btn_type ]['text'] = wp_kses( $btn['text'], $content_allowed_tags );
295
+ }
296
+ }
297
+ }
298
+ if ( isset( $notification['image_overlay'] ) ) {
299
+ $image_overlay = '<div class="img-overlay">'. esc_html( $notification['image_overlay'] ).'</div>';
300
+ }
301
+ }
302
+ ?>
303
+
304
+ <div class="sbi_notice sbi_<?php echo esc_attr( $type ); ?>_notice">
305
+ <div class="sbi_thumb">
306
+ <img src="<?php echo esc_url( $img_src ); ?>" alt="notice">
307
+ <?php echo $image_overlay; ?>
308
+ </div>
309
+ <div class="sbi-notice-text">
310
+ <p style="padding-top: 4px;"><?php echo $content; ?></p>
311
+ <p class="links">
312
+ <?php foreach ( $buttons as $button ) : ?>
313
+ <a class="<?php echo esc_attr( $button['class'] ); ?>" href="<?php echo esc_attr( $button['url'] ); ?>"<?php echo $button['attr']; ?>><?php echo $button['text']; ?></a>
314
+ <?php endforeach; ?>
315
+ </p>
316
+ </div>
317
+ <a class="sbi_notice_close" href="<?php echo esc_attr( $close_href ); ?>"><i class="fa fa-close"></i></a>
318
+ </div>
319
+ <?php
320
+ }
321
+
322
+ /**
323
+ * Hide messages permanently or some can be dismissed temporarily
324
+ *
325
+ * @since 2.6
326
+ */
327
+ public function dismiss() {
328
+ global $current_user;
329
+ $user_id = $current_user->ID;
330
+ $sbi_statuses_option = get_option( 'sbi_statuses', array() );
331
+
332
+ if ( isset( $_GET['sbi_ignore_rating_notice_nag'] ) ) {
333
+ if ( (int)$_GET['sbi_ignore_rating_notice_nag'] === 1 ) {
334
+ update_option( 'sbi_rating_notice', 'dismissed', false );
335
+ $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
336
+ update_option( 'sbi_statuses', $sbi_statuses_option, false );
337
+
338
+ } elseif ( $_GET['sbi_ignore_rating_notice_nag'] === 'later' ) {
339
+ set_transient( 'instagram_feed_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS );
340
+ update_option( 'sbi_rating_notice', 'pending', false );
341
+ }
342
+ }
343
+
344
+ if ( isset( $_GET['sbi_ignore_new_user_sale_notice'] ) ) {
345
+ $response = sanitize_text_field( $_GET['sbi_ignore_new_user_sale_notice'] );
346
+ if ( $response === 'always' ) {
347
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
348
+
349
+ $current_month_number = (int)date('n', sbi_get_current_time() );
350
+ $not_early_in_the_year = ($current_month_number > 5);
351
+
352
+ if ( $not_early_in_the_year ) {
353
+ update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
354
+ }
355
+
356
+ }
357
+ }
358
+
359
+ if ( isset( $_GET['sbi_ignore_bfcm_sale_notice'] ) ) {
360
+ $response = sanitize_text_field( $_GET['sbi_ignore_bfcm_sale_notice'] );
361
+ if ( $response === 'always' ) {
362
+ update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', 'always' );
363
+ } elseif ( $response === date( 'Y', sbi_get_current_time() ) ) {
364
+ update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
365
+ }
366
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
367
+ }
368
+
369
+ if ( isset( $_GET['sbi_dismiss'] ) ) {
370
+ if ( $_GET['sbi_dismiss'] === 'review' ) {
371
+ update_option( 'sbi_rating_notice', 'dismissed', false );
372
+ $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
373
+ update_option( 'sbi_statuses', $sbi_statuses_option, false );
374
+ } elseif ( $_GET['sbi_dismiss'] === 'discount' ) {
375
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
376
+
377
+ $current_month_number = (int)date('n', sbi_get_current_time() );
378
+ $not_early_in_the_year = ($current_month_number > 5);
379
+
380
+ if ( $not_early_in_the_year ) {
381
+ update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
382
+ }
383
+ }
384
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
385
+ }
386
+ }
387
+ }
inc/admin/class-sbi-notifications.php CHANGED
@@ -1,573 +1,573 @@
1
- <?php
2
- /**
3
- * SBI_Notifications.
4
- *
5
- * @since 2.6/5.9
6
- */
7
-
8
- // Exit if accessed directly
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class SBI_Notifications {
14
-
15
- /**
16
- * Source of notifications content.
17
- *
18
- * @var string
19
- */
20
- const SOURCE_URL = 'http://plugin.smashballoon.com/notifications.json';
21
-
22
- /**
23
- * @var string
24
- */
25
- const OPTION_NAME = 'sbi_notifications';
26
-
27
- /**
28
- * JSON data contains notices for all plugins. This is used
29
- * to select messages only meant for this plugin
30
- *
31
- * @var string
32
- */
33
- const PLUGIN = 'instagram';
34
-
35
- /**
36
- * Option value.
37
- *
38
- * @since 2.6/5.9
39
- *
40
- * @var bool|array
41
- */
42
- public $option = false;
43
-
44
- /**
45
- * Initialize class.
46
- *
47
- * @since 2.6/5.9
48
- */
49
- public function init() {
50
- $this->hooks();
51
- }
52
-
53
- /**
54
- * Use this function to get the option name to allow
55
- * inheritance for the New_User class
56
- *
57
- * @return string
58
- */
59
- public function option_name() {
60
- return self::OPTION_NAME;
61
- }
62
-
63
- /**
64
- * Use this function to get the source URL to allow
65
- * inheritance for the New_User class
66
- *
67
- * @return string
68
- */
69
- public function source_url() {
70
- return self::SOURCE_URL;
71
- }
72
-
73
- /**
74
- * Register hooks.
75
- *
76
- * @since 2.6/5.9
77
- */
78
- public function hooks() {
79
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueues' ) );
80
-
81
- add_action( 'sbi_admin_overview_before_table', array( $this, 'output' ) );
82
-
83
- // on cron. Once a week?
84
- add_action( 'sbi_notification_update', array( $this, 'update' ) );
85
-
86
- add_action( 'wp_ajax_sbi_dashboard_notification_dismiss', array( $this, 'dismiss' ) );
87
- }
88
-
89
-
90
- /**
91
- * Check if user has access and is enabled.
92
- *
93
- * @since 2.6/5.9
94
- *
95
- * @return bool
96
- */
97
- public function has_access() {
98
- $access = false;
99
-
100
- if ( current_user_can( 'manage_instagram_feed_options' ) ) {
101
- $access = true;
102
- }
103
-
104
- return apply_filters( 'sbi_admin_notifications_has_access', $access );
105
- }
106
-
107
- /**
108
- * Get option value.
109
- *
110
- * @since 2.6/5.9
111
- *
112
- * @param bool $cache Reference property cache if available.
113
- *
114
- * @return array
115
- */
116
- public function get_option( $cache = true ) {
117
- if ( $this->option && $cache ) {
118
- return $this->option;
119
- }
120
-
121
- $option = get_option( $this->option_name(), array() );
122
-
123
- $this->option = array(
124
- 'update' => ! empty( $option['update'] ) ? $option['update'] : 0,
125
- 'events' => ! empty( $option['events'] ) ? $option['events'] : array(),
126
- 'feed' => ! empty( $option['feed'] ) ? $option['feed'] : array(),
127
- 'dismissed' => ! empty( $option['dismissed'] ) ? $option['dismissed'] : array(),
128
- );
129
-
130
- return $this->option;
131
- }
132
-
133
- /**
134
- * Fetch notifications from feed.
135
- *
136
- * @since 2.6/5.9
137
- *
138
- * @return array
139
- */
140
- public function fetch_feed() {
141
- $res = wp_remote_get( $this->source_url() );
142
-
143
- if ( is_wp_error( $res ) ) {
144
- return array();
145
- }
146
-
147
- $body = wp_remote_retrieve_body( $res );
148
-
149
- if ( empty( $body ) ) {
150
- return array();
151
- }
152
-
153
- return $this->verify( json_decode( $body, true ) );
154
- }
155
-
156
- /**
157
- * Verify notification data before it is saved.
158
- *
159
- * @since 2.6/5.9
160
- *
161
- * @param array $notifications Array of notifications items to verify.
162
- *
163
- * @return array
164
- */
165
- public function verify( $notifications ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
166
- $data = array();
167
-
168
- if ( ! is_array( $notifications ) || empty( $notifications ) ) {
169
- return $data;
170
- }
171
-
172
- $option = $this->get_option();
173
-
174
- foreach ( $notifications as $notification ) {
175
-
176
- // The message and license should never be empty, if they are, ignore.
177
- if ( empty( $notification['content'] ) || empty( $notification['type'] ) ) {
178
- continue;
179
- }
180
-
181
- // Ignore if license type does not match.
182
- $license = sbi_is_pro_version() ? 'pro' : 'free';
183
-
184
- if ( ! in_array( $license, $notification['type'], true ) ) {
185
- continue;
186
- }
187
-
188
- // Ignore if expired.
189
- if ( ! empty( $notification['end'] ) && sbi_get_current_time() > strtotime( $notification['end'] ) ) {
190
- continue;
191
- }
192
-
193
- // Ignore if notification has already been dismissed.
194
- if ( ! empty( $option['dismissed'] ) && in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
195
- continue;
196
- }
197
-
198
- // TODO: Ignore if notification existed before installing SBI.
199
- // Prevents bombarding the user with notifications after activation.
200
- $activated = false;
201
- if ( ! empty( $activated )
202
- && ! empty( $notification['start'] )
203
- && $activated > strtotime( $notification['start'] ) ) {
204
- continue;
205
- }
206
-
207
- $data[] = $notification;
208
- }
209
-
210
- return $data;
211
- }
212
-
213
- /**
214
- * Verify saved notification data for active notifications.
215
- *
216
- * @since 2.6/5.9
217
- *
218
- * @param array $notifications Array of notifications items to verify.
219
- *
220
- * @return array
221
- */
222
- public function verify_active( $notifications ) {
223
- if ( ! is_array( $notifications ) || empty( $notifications ) ) {
224
- return array();
225
- }
226
-
227
- // Remove notfications that are not active.
228
- foreach ( $notifications as $key => $notification ) {
229
- if ( ( ! empty( $notification['start'] ) && sbi_get_current_time() < strtotime( $notification['start'] ) )
230
- || ( ! empty( $notification['end'] ) && sbi_get_current_time() > strtotime( $notification['end'] ) ) ) {
231
- unset( $notifications[ $key ] );
232
- }
233
- }
234
-
235
- return $notifications;
236
- }
237
-
238
- /**
239
- * Get notification data.
240
- *
241
- * @since 2.6/5.9
242
- *
243
- * @return array
244
- */
245
- public function get() {
246
- if ( ! $this->has_access() ) {
247
- return array();
248
- }
249
-
250
- $option = $this->get_option();
251
-
252
- // Update notifications using async task.
253
- if ( empty( $option['update'] ) || sbi_get_current_time() > $option['update'] + DAY_IN_SECONDS ) {
254
- $this->update();
255
- }
256
-
257
- $events = ! empty( $option['events'] ) ? $this->verify_active( $option['events'] ) : array();
258
- $feed = ! empty( $option['feed'] ) ? $this->verify_active( $option['feed'] ) : array();
259
-
260
- // If there is a new user notification, add it to the beginning of the notification list
261
- $sbi_newuser = new SBI_New_User();
262
- $newuser_notifications = $sbi_newuser->get();
263
-
264
- if ( ! empty( $newuser_notifications ) ) {
265
- $events = array_merge( $newuser_notifications, $events );
266
- }
267
-
268
- return array_merge( $events, $feed );
269
- }
270
-
271
- /**
272
- * Get notification count.
273
- *
274
- * @since 2.6/5.9
275
- *
276
- * @return int
277
- */
278
- public function get_count() {
279
- return count( $this->get() );
280
- }
281
-
282
- /**
283
- * Add a manual notification event.
284
- *
285
- * @since 2.6/5.9
286
- *
287
- * @param array $notification Notification data.
288
- */
289
- public function add( $notification ) {
290
- if ( empty( $notification['id'] ) ) {
291
- return;
292
- }
293
-
294
- $option = $this->get_option();
295
-
296
- if ( in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
297
- return;
298
- }
299
-
300
- foreach ( $option['events'] as $item ) {
301
- if ( $item['id'] === $notification['id'] ) {
302
- return;
303
- }
304
- }
305
-
306
- $notification = $this->verify( array( $notification ) );
307
-
308
- update_option(
309
- 'sbi_notifications',
310
- array(
311
- 'update' => $option['update'],
312
- 'feed' => $option['feed'],
313
- 'events' => array_merge( $notification, $option['events'] ),
314
- 'dismissed' => $option['dismissed'],
315
- )
316
- );
317
- }
318
-
319
- /**
320
- * Update notification data from feed.
321
- *
322
- * @since 2.6/5.9
323
- */
324
- public function update() {
325
- $feed = $this->fetch_feed();
326
- $option = $this->get_option();
327
-
328
- update_option(
329
- 'sbi_notifications',
330
- array(
331
- 'update' => sbi_get_current_time(),
332
- 'feed' => $feed,
333
- 'events' => $option['events'],
334
- 'dismissed' => $option['dismissed'],
335
- )
336
- );
337
- }
338
-
339
- /**
340
- * Admin area Form Overview enqueues.
341
- *
342
- * @since 2.6/5.9
343
- */
344
- public function enqueues() {
345
- if ( ! $this->has_access() ) {
346
- return;
347
- }
348
-
349
- $notifications = $this->get();
350
-
351
- if ( empty( $notifications ) ) {
352
- return;
353
- }
354
-
355
- $min = '';
356
-
357
- wp_enqueue_style(
358
- 'sbi-admin-notifications',
359
- SBI_PLUGIN_URL . "css/admin-notifications{$min}.css",
360
- array(),
361
- SBIVER
362
- );
363
-
364
- wp_enqueue_script(
365
- 'sbi-admin-notifications',
366
- SBI_PLUGIN_URL . "js/admin-notifications{$min}.js",
367
- array( 'jquery' ),
368
- SBIVER,
369
- true
370
- );
371
- }
372
-
373
- /**
374
- * Fields from the remote source contain placeholders to allow
375
- * some messages to be used for multiple plugins.
376
- *
377
- * @param $content string
378
- * @param $notification array
379
- *
380
- * @return string
381
- *
382
- * @since 2.6/5.9
383
- */
384
- public function replace_merge_fields( $content, $notification ) {
385
- $merge_fields = array(
386
- '{plugin}' => 'Instagram Feed',
387
- '{amount}' => isset( $notification['amount'] ) ? $notification['amount'] : '',
388
- '{platform}' => 'Instagram',
389
- '{lowerplatform}' => 'instagram',
390
- '{review-url}' => 'https://wordpress.org/support/plugin/instagram-feed/reviews/',
391
- '{slug}' => 'instagram-feed',
392
- '{campaign}' => 'instagram-free'
393
- );
394
-
395
- if ( sbi_is_pro_version() ) {
396
- $merge_fields['{campaign}'] = 'instagram-pro';
397
- $merge_fields['{plugin}'] = 'Instagram Feed Pro';
398
- }
399
-
400
- foreach ( $merge_fields as $find => $replace ) {
401
- $content = str_replace( $find, $replace, $content );
402
- }
403
-
404
- return $content;
405
- }
406
-
407
- /**
408
- * Output notifications on Instagram Feed admin area.
409
- *
410
- * @since 2.6/5.9
411
- */
412
- public function output() {
413
- $notifications = $this->get();
414
-
415
- if ( empty( $notifications ) ) {
416
- return;
417
- }
418
-
419
- $notifications_html = '';
420
- $current_class = ' current';
421
- $content_allowed_tags = array(
422
- 'em' => array(),
423
- 'strong' => array(),
424
- 'span' => array(
425
- 'style' => array(),
426
- ),
427
- 'a' => array(
428
- 'href' => array(),
429
- 'target' => array(),
430
- 'rel' => array(),
431
- ),
432
- );
433
-
434
- foreach ( $notifications as $notification ) {
435
-
436
- // Buttons HTML.
437
- $buttons_html = '';
438
- if ( ! empty( $notification['btns'] ) && is_array( $notification['btns'] ) ) {
439
- foreach ( $notification['btns'] as $btn_type => $btn ) {
440
- if ( is_array( $btn['url'] ) ) {
441
- $btn['url'] = add_query_arg( $btn['url'] );
442
- }
443
- if ( ! empty( $btn['attr'] ) ) {
444
- $btn['target'] = '_blank';
445
- }
446
- $buttons_html .= sprintf(
447
- '<a href="%1$s" class="button button-%2$s"%3$s>%4$s</a>',
448
- ! empty( $btn['url'] ) ? esc_url( $this->replace_merge_fields( $btn['url'], $notification ) ) : '',
449
- $btn_type === 'primary' ? 'primary' : 'secondary',
450
- ! empty( $btn['target'] ) && $btn['target'] === '_blank' ? ' target="_blank" rel="noopener noreferrer"' : '',
451
- ! empty( $btn['text'] ) ? sanitize_text_field( $btn['text'] ) : ''
452
- );
453
- }
454
- $buttons_html = ! empty( $buttons_html ) ? '<div class="buttons">' . $buttons_html . '</div>' : '';
455
- }
456
-
457
- if ( empty( $notification['image'] ) ) {
458
- $image_html = '<div class="bell">';
459
-
460
- $image_html .= '<svg xmlns="http://www.w3.org/2000/svg" width="42" height="48" viewBox="0 0 42 48"><defs><style>.a{fill:#777;}.b{fill:#ca4a1f;}</style></defs><path class="a" d="M23-79a6.005,6.005,0,0,1-6-6h10.06a12.066,12.066,0,0,0,1.791,1.308,6.021,6.021,0,0,1-2.077,3.352A6.008,6.008,0,0,1,23-79Zm1.605-9H5.009a2.955,2.955,0,0,1-2.173-.923A3.088,3.088,0,0,1,2-91a2.919,2.919,0,0,1,.807-2.036c.111-.12.229-.243.351-.371a14.936,14.936,0,0,0,3.126-4.409A23.283,23.283,0,0,0,8.007-107.5a14.846,14.846,0,0,1,.906-5.145,14.5,14.5,0,0,1,2.509-4.324A15.279,15.279,0,0,1,20-122.046V-124a3,3,0,0,1,3-3,3,3,0,0,1,3,3v1.954a15.28,15.28,0,0,1,8.58,5.078,14.5,14.5,0,0,1,2.509,4.324,14.846,14.846,0,0,1,.906,5.145c0,.645.016,1.281.047,1.888A12.036,12.036,0,0,0,35-106a11.921,11.921,0,0,0-8.485,3.515A11.923,11.923,0,0,0,23-94a12,12,0,0,0,1.6,6Z" transform="translate(-2 127)"/><circle class="b" cx="9" cy="9" r="9" transform="translate(24 24)"/></svg>';
461
- $image_html .= '</div>';
462
- } else {
463
- if ( $notification['image'] === 'balloon'
464
- || $notification['id'] === 'review'
465
- || $notification['id'] === 'discount') {
466
- $image_html = '<div class="bell">';
467
-
468
- $image_html .= '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1438 1878" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">';
469
- $image_html .= ' <path d="M671.51004 492.9884C539.9423 433.8663 402.90125 345.5722 274.97656 304.47286c45.45163 108.39592 83.81332 223.88017 123.51 338.03105C319.308 702.00293 226.8217 748.19258 138.46278 798.51607c75.1914 74.32371 181.67968 117.34651 266.52444 182.01607-67.96124 83.86195-201.48527 171.01801-234.02107 247.01998 140.6922-17.6268 304.63688-46.21031 435.53794-52.00418 28.76427 144.58328 43.5987 303.09763 84.50756 435.53713 60.92033-175.26574 116.0014-356.37317 188.51594-520.0451 111.90644 46.2857 248.29012 102.72607 357.52902 130.01188-76.64636-107.5347-146.59346-221.76948-214.5166-338.02903 100.51162-72.83876 202.1718-144.52451 299.02538-221.02092-136.89514-12.61229-278.73428-20.28827-422.53618-25.99865-22.85288-148.33212-16.84826-325.51604-52.005-461.53983-53.19327 111.4882-115.96694 213.39155-175.51418 318.52497m65.00513 1228.60735c-18.0795 77.37586 41.4876 109.11326 32.50298 156.01215-58.8141-20.268-103.0576-30.67962-182.01567-19.50203 2.47018-60.37036 56.76662-68.90959 45.50432-143.0108C-208.90184 1619.4318-210.59186 99.02478 626.00572 5.44992c1046.0409-117.00405 1078.86445 1689.2596 110.50945 1716.14582" fill="#e34f0e"/>';
470
- $image_html .= ' <path d="M847.02422 174.46342c35.15674 136.02379 29.15212 313.20771 52.0046 461.53578 143.8023 5.71443 285.63982 13.38636 422.53658 26.0027-96.85317 76.4964-198.51497 148.18216-299.02579 221.0189 67.92355 116.26239 137.87024 230.49432 214.51864 338.03024-109.24093-27.28662-245.62461-83.72577-357.53106-130.01269-72.51454 163.67274-127.5956 344.78017-188.51553 520.0459-40.90926-132.4395-55.74329-290.95384-84.50796-435.53712-130.90066 5.79549-294.84493 34.37738-435.53754 52.00418 32.5358-76.00075 166.05902-163.156 234.02026-247.02038-84.84516-64.67037-191.33222-107.69074-266.52363-182.01486 88.35892-50.32349 180.8436-96.51314 260.02295-156.0162-39.69708-114.14683-78.05674-229.63108-123.50878-338.027C402.89923 345.5722 539.9423 433.86629 671.51004 492.98839c59.54684-105.13342 122.3209-207.03677 175.51418-318.52497" fill="#fff"/>';
471
- $image_html .= '</svg>';
472
- } else {
473
- $image_html = '<div class="thumb">';
474
- $img_src = SBY_PLUGIN_URL . 'img/' . sanitize_text_field( $notification['image'] );
475
- $image_html .= '<img src="'.esc_url( $img_src ).'" alt="notice">';
476
-
477
- if ( isset( $notification['image_overlay'] ) ) {
478
- $image_html .= '<div class="img-overlay">'. esc_html( str_replace( '%', '%%', $notification['image_overlay'] ) ).'</div>';
479
- }
480
- }
481
- $image_html .= '</div>';
482
-
483
- }
484
-
485
- // Notification HTML.
486
- $notifications_html .= sprintf(
487
- '<div class="message%5$s" data-message-id="%4$s">' . $image_html . '
488
- <h3 class="title">%1$s</h3>
489
- <p class="content">%2$s</p>
490
- %3$s
491
- </div>',
492
- ! empty( $notification['title'] ) ? $this->replace_merge_fields( sanitize_text_field( $notification['title'] ), $notification ) : '',
493
- ! empty( $notification['content'] ) ? wp_kses( $this->replace_merge_fields( $notification['content'], $notification ), $content_allowed_tags ) : '',
494
- $buttons_html,
495
- ! empty( $notification['id'] ) ? esc_attr( sanitize_text_field( $notification['id'] ) ) : 0,
496
- $current_class
497
- );
498
-
499
- // Only first notification is current.
500
- $current_class = '';
501
- }
502
- ?>
503
-
504
- <div id="sbi-notifications">
505
- <a class="dismiss" title="<?php echo esc_attr__( 'Dismiss this message', 'instagram-feed' ); ?>"><i class="fa fa-times-circle" aria-hidden="true"></i></a>
506
-
507
- <div class="navigation">
508
- <a class="prev disabled" title="<?php echo esc_attr__( 'Previous message', 'instagram-feed' ); ?>"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-left" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" class="svg-inline--fa fa-chevron-left fa-w-10"><path fill="currentColor" d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z" class=""></path></svg></a>
509
- <a class="next disabled" title="<?php echo esc_attr__( 'Next message', 'instagram-feed' ); ?>"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" class="svg-inline--fa fa-chevron-right fa-w-10"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" class=""></path></svg></a>
510
- </div>
511
-
512
- <div class="messages">
513
- <?php echo $notifications_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
514
- </div>
515
- </div>
516
- <?php
517
- }
518
-
519
- /**
520
- * Dismiss notification via AJAX. If it's a new user message, also dismiss it
521
- * on all admin pages.
522
- *
523
- * @since 2.6/5.9
524
- */
525
- public function dismiss() {
526
- // Run a security check.
527
- check_ajax_referer( 'sbi-admin', 'nonce' );
528
-
529
- // Check for access and required param.
530
- if ( ! $this->has_access() || empty( $_POST['id'] ) ) {
531
- wp_send_json_error();
532
- }
533
-
534
- $id = sanitize_text_field( wp_unslash( $_POST['id'] ) );
535
-
536
- if ( $id === 'review' ) {
537
- $sbi_statuses_option = get_option( 'sbi_statuses', array() );
538
-
539
- update_option( 'sbi_rating_notice', 'dismissed', false );
540
- $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
541
- update_option( 'sbi_statuses', $sbi_statuses_option, false );
542
- } elseif ( $id === 'discount' ) {
543
- update_user_meta( get_current_user_id(), 'sbi_ignore_new_user_sale_notice', 'always' );
544
-
545
- $current_month_number = (int)date('n', sbi_get_current_time() );
546
- $not_early_in_the_year = ($current_month_number > 5);
547
-
548
- if ( $not_early_in_the_year ) {
549
- update_user_meta( get_current_user_id(), 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
550
- }
551
- }
552
-
553
- $option = $this->get_option();
554
- $type = is_numeric( $id ) ? 'feed' : 'events';
555
-
556
- $option['dismissed'][] = $id;
557
- $option['dismissed'] = array_unique( $option['dismissed'] );
558
-
559
- // Remove notification.
560
- if ( is_array( $option[ $type ] ) && ! empty( $option[ $type ] ) ) {
561
- foreach ( $option[ $type ] as $key => $notification ) {
562
- if ( $notification['id'] == $id ) { // phpcs:ignore WordPress.PHP.StrictComparisons
563
- unset( $option[ $type ][ $key ] );
564
- break;
565
- }
566
- }
567
- }
568
-
569
- update_option( 'sbi_notifications', $option );
570
-
571
- wp_send_json_success();
572
- }
573
- }
1
+ <?php
2
+ /**
3
+ * SBI_Notifications.
4
+ *
5
+ * @since 2.6/5.9
6
+ */
7
+
8
+ // Exit if accessed directly
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class SBI_Notifications {
14
+
15
+ /**
16
+ * Source of notifications content.
17
+ *
18
+ * @var string
19
+ */
20
+ const SOURCE_URL = 'http://plugin.smashballoon.com/notifications.json';
21
+
22
+ /**
23
+ * @var string
24
+ */
25
+ const OPTION_NAME = 'sbi_notifications';
26
+
27
+ /**
28
+ * JSON data contains notices for all plugins. This is used
29
+ * to select messages only meant for this plugin
30
+ *
31
+ * @var string
32
+ */
33
+ const PLUGIN = 'instagram';
34
+
35
+ /**
36
+ * Option value.
37
+ *
38
+ * @since 2.6/5.9
39
+ *
40
+ * @var bool|array
41
+ */
42
+ public $option = false;
43
+
44
+ /**
45
+ * Initialize class.
46
+ *
47
+ * @since 2.6/5.9
48
+ */
49
+ public function init() {
50
+ $this->hooks();
51
+ }
52
+
53
+ /**
54
+ * Use this function to get the option name to allow
55
+ * inheritance for the New_User class
56
+ *
57
+ * @return string
58
+ */
59
+ public function option_name() {
60
+ return self::OPTION_NAME;
61
+ }
62
+
63
+ /**
64
+ * Use this function to get the source URL to allow
65
+ * inheritance for the New_User class
66
+ *
67
+ * @return string
68
+ */
69
+ public function source_url() {
70
+ return self::SOURCE_URL;
71
+ }
72
+
73
+ /**
74
+ * Register hooks.
75
+ *
76
+ * @since 2.6/5.9
77
+ */
78
+ public function hooks() {
79
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueues' ) );
80
+
81
+ add_action( 'sbi_admin_overview_before_table', array( $this, 'output' ) );
82
+
83
+ // on cron. Once a week?
84
+ add_action( 'sbi_notification_update', array( $this, 'update' ) );
85
+
86
+ add_action( 'wp_ajax_sbi_dashboard_notification_dismiss', array( $this, 'dismiss' ) );
87
+ }
88
+
89
+
90
+ /**
91
+ * Check if user has access and is enabled.
92
+ *
93
+ * @since 2.6/5.9
94
+ *
95
+ * @return bool
96
+ */
97
+ public function has_access() {
98
+ $access = false;
99
+
100
+ if ( current_user_can( 'manage_instagram_feed_options' ) ) {
101
+ $access = true;
102
+ }
103
+
104
+ return apply_filters( 'sbi_admin_notifications_has_access', $access );
105
+ }
106
+
107
+ /**
108
+ * Get option value.
109
+ *
110
+ * @since 2.6/5.9
111
+ *
112
+ * @param bool $cache Reference property cache if available.
113
+ *
114
+ * @return array
115
+ */
116
+ public function get_option( $cache = true ) {
117
+ if ( $this->option && $cache ) {
118
+ return $this->option;
119
+ }
120
+
121
+ $option = get_option( $this->option_name(), array() );
122
+
123
+ $this->option = array(
124
+ 'update' => ! empty( $option['update'] ) ? $option['update'] : 0,
125
+ 'events' => ! empty( $option['events'] ) ? $option['events'] : array(),
126
+ 'feed' => ! empty( $option['feed'] ) ? $option['feed'] : array(),
127
+ 'dismissed' => ! empty( $option['dismissed'] ) ? $option['dismissed'] : array(),
128
+ );
129
+
130
+ return $this->option;
131
+ }
132
+
133
+ /**
134
+ * Fetch notifications from feed.
135
+ *
136
+ * @since 2.6/5.9
137
+ *
138
+ * @return array
139
+ */
140
+ public function fetch_feed() {
141
+ $res = wp_remote_get( $this->source_url() );
142
+
143
+ if ( is_wp_error( $res ) ) {
144
+ return array();
145
+ }
146
+
147
+ $body = wp_remote_retrieve_body( $res );
148
+
149
+ if ( empty( $body ) ) {
150
+ return array();
151
+ }
152
+
153
+ return $this->verify( json_decode( $body, true ) );
154
+ }
155
+
156
+ /**
157
+ * Verify notification data before it is saved.
158
+ *
159
+ * @since 2.6/5.9
160
+ *
161
+ * @param array $notifications Array of notifications items to verify.
162
+ *
163
+ * @return array
164
+ */
165
+ public function verify( $notifications ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
166
+ $data = array();
167
+
168
+ if ( ! is_array( $notifications ) || empty( $notifications ) ) {
169
+ return $data;
170
+ }
171
+
172
+ $option = $this->get_option();
173
+
174
+ foreach ( $notifications as $notification ) {
175
+
176
+ // The message and license should never be empty, if they are, ignore.
177
+ if ( empty( $notification['content'] ) || empty( $notification['type'] ) ) {
178
+ continue;
179
+ }
180
+
181
+ // Ignore if license type does not match.
182
+ $license = sbi_is_pro_version() ? 'pro' : 'free';
183
+
184
+ if ( ! in_array( $license, $notification['type'], true ) ) {
185
+ continue;
186
+ }
187
+
188
+ // Ignore if expired.
189
+ if ( ! empty( $notification['end'] ) && sbi_get_current_time() > strtotime( $notification['end'] ) ) {
190
+ continue;
191
+ }
192
+
193
+ // Ignore if notification has already been dismissed.
194
+ if ( ! empty( $option['dismissed'] ) && in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
195
+ continue;
196
+ }
197
+
198
+ // TODO: Ignore if notification existed before installing SBI.
199
+ // Prevents bombarding the user with notifications after activation.
200
+ $activated = false;
201
+ if ( ! empty( $activated )
202
+ && ! empty( $notification['start'] )
203
+ && $activated > strtotime( $notification['start'] ) ) {
204
+ continue;
205
+ }
206
+
207
+ $data[] = $notification;
208
+ }
209
+
210
+ return $data;
211
+ }
212
+
213
+ /**
214
+ * Verify saved notification data for active notifications.
215
+ *
216
+ * @since 2.6/5.9
217
+ *
218
+ * @param array $notifications Array of notifications items to verify.
219
+ *
220
+ * @return array
221
+ */
222
+ public function verify_active( $notifications ) {
223
+ if ( ! is_array( $notifications ) || empty( $notifications ) ) {
224
+ return array();
225
+ }
226
+
227
+ // Remove notfications that are not active.
228
+ foreach ( $notifications as $key => $notification ) {
229
+ if ( ( ! empty( $notification['start'] ) && sbi_get_current_time() < strtotime( $notification['start'] ) )
230
+ || ( ! empty( $notification['end'] ) && sbi_get_current_time() > strtotime( $notification['end'] ) ) ) {
231
+ unset( $notifications[ $key ] );
232
+ }
233
+ }
234
+
235
+ return $notifications;
236
+ }
237
+
238
+ /**
239
+ * Get notification data.
240
+ *
241
+ * @since 2.6/5.9
242
+ *
243
+ * @return array
244
+ */
245
+ public function get() {
246
+ if ( ! $this->has_access() ) {
247
+ return array();
248
+ }
249
+
250
+ $option = $this->get_option();
251
+
252
+ // Update notifications using async task.
253
+ if ( empty( $option['update'] ) || sbi_get_current_time() > $option['update'] + DAY_IN_SECONDS ) {
254
+ $this->update();
255
+ }
256
+
257
+ $events = ! empty( $option['events'] ) ? $this->verify_active( $option['events'] ) : array();
258
+ $feed = ! empty( $option['feed'] ) ? $this->verify_active( $option['feed'] ) : array();
259
+
260
+ // If there is a new user notification, add it to the beginning of the notification list
261
+ $sbi_newuser = new SBI_New_User();
262
+ $newuser_notifications = $sbi_newuser->get();
263
+
264
+ if ( ! empty( $newuser_notifications ) ) {
265
+ $events = array_merge( $newuser_notifications, $events );
266
+ }
267
+
268
+ return array_merge( $events, $feed );
269
+ }
270
+
271
+ /**
272
+ * Get notification count.
273
+ *
274
+ * @since 2.6/5.9
275
+ *
276
+ * @return int
277
+ */
278
+ public function get_count() {
279
+ return count( $this->get() );
280
+ }
281
+
282
+ /**
283
+ * Add a manual notification event.
284
+ *
285
+ * @since 2.6/5.9
286
+ *
287
+ * @param array $notification Notification data.
288
+ */
289
+ public function add( $notification ) {
290
+ if ( empty( $notification['id'] ) ) {
291
+ return;
292
+ }
293
+
294
+ $option = $this->get_option();
295
+
296
+ if ( in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
297
+ return;
298
+ }
299
+
300
+ foreach ( $option['events'] as $item ) {
301
+ if ( $item['id'] === $notification['id'] ) {
302
+ return;
303
+ }
304
+ }
305
+
306
+ $notification = $this->verify( array( $notification ) );
307
+
308
+ update_option(
309
+ 'sbi_notifications',
310
+ array(
311
+ 'update' => $option['update'],
312
+ 'feed' => $option['feed'],
313
+ 'events' => array_merge( $notification, $option['events'] ),
314
+ 'dismissed' => $option['dismissed'],
315
+ )
316
+ );
317
+ }
318
+
319
+ /**
320
+ * Update notification data from feed.
321
+ *
322
+ * @since 2.6/5.9
323
+ */
324
+ public function update() {
325
+ $feed = $this->fetch_feed();
326
+ $option = $this->get_option();
327
+
328
+ update_option(
329
+ 'sbi_notifications',
330
+ array(
331
+ 'update' => sbi_get_current_time(),
332
+ 'feed' => $feed,
333
+ 'events' => $option['events'],
334
+ 'dismissed' => $option['dismissed'],
335
+ )
336
+ );
337
+ }
338
+
339
+ /**
340
+ * Admin area Form Overview enqueues.
341
+ *
342
+ * @since 2.6/5.9
343
+ */
344
+ public function enqueues() {
345
+ if ( ! $this->has_access() ) {
346
+ return;
347
+ }
348
+
349
+ $notifications = $this->get();
350
+
351
+ if ( empty( $notifications ) ) {
352
+ return;
353
+ }
354
+
355
+ $min = '';
356
+
357
+ wp_enqueue_style(
358
+ 'sbi-admin-notifications',
359
+ SBI_PLUGIN_URL . "css/admin-notifications{$min}.css",
360
+ array(),
361
+ SBIVER
362
+ );
363
+
364
+ wp_enqueue_script(
365
+ 'sbi-admin-notifications',
366
+ SBI_PLUGIN_URL . "js/admin-notifications{$min}.js",
367
+ array( 'jquery' ),
368
+ SBIVER,
369
+ true
370
+ );
371
+ }
372
+
373
+ /**
374
+ * Fields from the remote source contain placeholders to allow
375
+ * some messages to be used for multiple plugins.
376
+ *
377
+ * @param $content string
378
+ * @param $notification array
379
+ *
380
+ * @return string
381
+ *
382
+ * @since 2.6/5.9
383
+ */
384
+ public function replace_merge_fields( $content, $notification ) {
385
+ $merge_fields = array(
386
+ '{plugin}' => 'Instagram Feed',
387
+ '{amount}' => isset( $notification['amount'] ) ? $notification['amount'] : '',
388
+ '{platform}' => 'Instagram',
389
+ '{lowerplatform}' => 'instagram',
390
+ '{review-url}' => 'https://wordpress.org/support/plugin/instagram-feed/reviews/',
391
+ '{slug}' => 'instagram-feed',
392
+ '{campaign}' => 'instagram-free'
393
+ );
394
+
395
+ if ( sbi_is_pro_version() ) {
396
+ $merge_fields['{campaign}'] = 'instagram-pro';
397
+ $merge_fields['{plugin}'] = 'Instagram Feed Pro';
398
+ }
399
+
400
+ foreach ( $merge_fields as $find => $replace ) {
401
+ $content = str_replace( $find, $replace, $content );
402
+ }
403
+
404
+ return $content;
405
+ }
406
+
407
+ /**
408
+ * Output notifications on Instagram Feed admin area.
409
+ *
410
+ * @since 2.6/5.9
411
+ */
412
+ public function output() {
413
+ $notifications = $this->get();
414
+
415
+ if ( empty( $notifications ) ) {
416
+ return;
417
+ }
418
+
419
+ $notifications_html = '';
420
+ $current_class = ' current';
421
+ $content_allowed_tags = array(
422
+ 'em' => array(),
423
+ 'strong' => array(),
424
+ 'span' => array(
425
+ 'style' => array(),
426
+ ),
427
+ 'a' => array(
428
+ 'href' => array(),
429
+ 'target' => array(),
430
+ 'rel' => array(),
431
+ ),
432
+ );
433
+
434
+ foreach ( $notifications as $notification ) {
435
+
436
+ // Buttons HTML.
437
+ $buttons_html = '';
438
+ if ( ! empty( $notification['btns'] ) && is_array( $notification['btns'] ) ) {
439
+ foreach ( $notification['btns'] as $btn_type => $btn ) {
440
+ if ( is_array( $btn['url'] ) ) {
441
+ $btn['url'] = add_query_arg( $btn['url'] );
442
+ }
443
+ if ( ! empty( $btn['attr'] ) ) {
444
+ $btn['target'] = '_blank';
445
+ }
446
+ $buttons_html .= sprintf(
447
+ '<a href="%1$s" class="button button-%2$s"%3$s>%4$s</a>',
448
+ ! empty( $btn['url'] ) ? esc_url( $this->replace_merge_fields( $btn['url'], $notification ) ) : '',
449
+ $btn_type === 'primary' ? 'primary' : 'secondary',
450
+ ! empty( $btn['target'] ) && $btn['target'] === '_blank' ? ' target="_blank" rel="noopener noreferrer"' : '',
451
+ ! empty( $btn['text'] ) ? sanitize_text_field( $btn['text'] ) : ''
452
+ );
453
+ }
454
+ $buttons_html = ! empty( $buttons_html ) ? '<div class="buttons">' . $buttons_html . '</div>' : '';
455
+ }
456
+
457
+ if ( empty( $notification['image'] ) ) {
458
+ $image_html = '<div class="bell">';
459
+
460
+ $image_html .= '<svg xmlns="http://www.w3.org/2000/svg" width="42" height="48" viewBox="0 0 42 48"><defs><style>.a{fill:#777;}.b{fill:#ca4a1f;}</style></defs><path class="a" d="M23-79a6.005,6.005,0,0,1-6-6h10.06a12.066,12.066,0,0,0,1.791,1.308,6.021,6.021,0,0,1-2.077,3.352A6.008,6.008,0,0,1,23-79Zm1.605-9H5.009a2.955,2.955,0,0,1-2.173-.923A3.088,3.088,0,0,1,2-91a2.919,2.919,0,0,1,.807-2.036c.111-.12.229-.243.351-.371a14.936,14.936,0,0,0,3.126-4.409A23.283,23.283,0,0,0,8.007-107.5a14.846,14.846,0,0,1,.906-5.145,14.5,14.5,0,0,1,2.509-4.324A15.279,15.279,0,0,1,20-122.046V-124a3,3,0,0,1,3-3,3,3,0,0,1,3,3v1.954a15.28,15.28,0,0,1,8.58,5.078,14.5,14.5,0,0,1,2.509,4.324,14.846,14.846,0,0,1,.906,5.145c0,.645.016,1.281.047,1.888A12.036,12.036,0,0,0,35-106a11.921,11.921,0,0,0-8.485,3.515A11.923,11.923,0,0,0,23-94a12,12,0,0,0,1.6,6Z" transform="translate(-2 127)"/><circle class="b" cx="9" cy="9" r="9" transform="translate(24 24)"/></svg>';
461
+ $image_html .= '</div>';
462
+ } else {
463
+ if ( $notification['image'] === 'balloon'
464
+ || $notification['id'] === 'review'
465
+ || $notification['id'] === 'discount') {
466
+ $image_html = '<div class="bell">';
467
+
468
+ $image_html .= '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1438 1878" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">';
469
+ $image_html .= ' <path d="M671.51004 492.9884C539.9423 433.8663 402.90125 345.5722 274.97656 304.47286c45.45163 108.39592 83.81332 223.88017 123.51 338.03105C319.308 702.00293 226.8217 748.19258 138.46278 798.51607c75.1914 74.32371 181.67968 117.34651 266.52444 182.01607-67.96124 83.86195-201.48527 171.01801-234.02107 247.01998 140.6922-17.6268 304.63688-46.21031 435.53794-52.00418 28.76427 144.58328 43.5987 303.09763 84.50756 435.53713 60.92033-175.26574 116.0014-356.37317 188.51594-520.0451 111.90644 46.2857 248.29012 102.72607 357.52902 130.01188-76.64636-107.5347-146.59346-221.76948-214.5166-338.02903 100.51162-72.83876 202.1718-144.52451 299.02538-221.02092-136.89514-12.61229-278.73428-20.28827-422.53618-25.99865-22.85288-148.33212-16.84826-325.51604-52.005-461.53983-53.19327 111.4882-115.96694 213.39155-175.51418 318.52497m65.00513 1228.60735c-18.0795 77.37586 41.4876 109.11326 32.50298 156.01215-58.8141-20.268-103.0576-30.67962-182.01567-19.50203 2.47018-60.37036 56.76662-68.90959 45.50432-143.0108C-208.90184 1619.4318-210.59186 99.02478 626.00572 5.44992c1046.0409-117.00405 1078.86445 1689.2596 110.50945 1716.14582" fill="#e34f0e"/>';
470
+ $image_html .= ' <path d="M847.02422 174.46342c35.15674 136.02379 29.15212 313.20771 52.0046 461.53578 143.8023 5.71443 285.63982 13.38636 422.53658 26.0027-96.85317 76.4964-198.51497 148.18216-299.02579 221.0189 67.92355 116.26239 137.87024 230.49432 214.51864 338.03024-109.24093-27.28662-245.62461-83.72577-357.53106-130.01269-72.51454 163.67274-127.5956 344.78017-188.51553 520.0459-40.90926-132.4395-55.74329-290.95384-84.50796-435.53712-130.90066 5.79549-294.84493 34.37738-435.53754 52.00418 32.5358-76.00075 166.05902-163.156 234.02026-247.02038-84.84516-64.67037-191.33222-107.69074-266.52363-182.01486 88.35892-50.32349 180.8436-96.51314 260.02295-156.0162-39.69708-114.14683-78.05674-229.63108-123.50878-338.027C402.89923 345.5722 539.9423 433.86629 671.51004 492.98839c59.54684-105.13342 122.3209-207.03677 175.51418-318.52497" fill="#fff"/>';
471
+ $image_html .= '</svg>';
472
+ } else {
473
+ $image_html = '<div class="thumb">';
474
+ $img_src = SBY_PLUGIN_URL . 'img/' . sanitize_text_field( $notification['image'] );
475
+ $image_html .= '<img src="'.esc_url( $img_src ).'" alt="notice">';
476
+
477
+ if ( isset( $notification['image_overlay'] ) ) {
478
+ $image_html .= '<div class="img-overlay">'. esc_html( str_replace( '%', '%%', $notification['image_overlay'] ) ).'</div>';
479
+ }
480
+ }
481
+ $image_html .= '</div>';
482
+
483
+ }
484
+
485
+ // Notification HTML.
486
+ $notifications_html .= sprintf(
487
+ '<div class="message%5$s" data-message-id="%4$s">' . $image_html . '
488
+ <h3 class="title">%1$s</h3>
489
+ <p class="content">%2$s</p>
490
+ %3$s
491
+ </div>',
492
+ ! empty( $notification['title'] ) ? $this->replace_merge_fields( sanitize_text_field( $notification['title'] ), $notification ) : '',
493
+ ! empty( $notification['content'] ) ? wp_kses( $this->replace_merge_fields( $notification['content'], $notification ), $content_allowed_tags ) : '',
494
+ $buttons_html,
495
+ ! empty( $notification['id'] ) ? esc_attr( sanitize_text_field( $notification['id'] ) ) : 0,
496
+ $current_class
497
+ );
498
+
499
+ // Only first notification is current.
500
+ $current_class = '';
501
+ }
502
+ ?>
503
+
504
+ <div id="sbi-notifications">
505
+ <a class="dismiss" title="<?php echo esc_attr__( 'Dismiss this message', 'instagram-feed' ); ?>"><i class="fa fa-times-circle" aria-hidden="true"></i></a>
506
+
507
+ <div class="navigation">
508
+ <a class="prev disabled" title="<?php echo esc_attr__( 'Previous message', 'instagram-feed' ); ?>"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-left" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" class="svg-inline--fa fa-chevron-left fa-w-10"><path fill="currentColor" d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z" class=""></path></svg></a>
509
+ <a class="next disabled" title="<?php echo esc_attr__( 'Next message', 'instagram-feed' ); ?>"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" class="svg-inline--fa fa-chevron-right fa-w-10"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" class=""></path></svg></a>
510
+ </div>
511
+
512
+ <div class="messages">
513
+ <?php echo $notifications_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
514
+ </div>
515
+ </div>
516
+ <?php
517
+ }
518
+
519
+ /**
520
+ * Dismiss notification via AJAX. If it's a new user message, also dismiss it
521
+ * on all admin pages.
522
+ *
523
+ * @since 2.6/5.9
524
+ */
525
+ public function dismiss() {
526
+ // Run a security check.
527
+ check_ajax_referer( 'sbi-admin', 'nonce' );
528
+
529
+ // Check for access and required param.
530
+ if ( ! $this->has_access() || empty( $_POST['id'] ) ) {
531
+ wp_send_json_error();
532
+ }
533
+
534
+ $id = sanitize_text_field( wp_unslash( $_POST['id'] ) );
535
+
536
+ if ( $id === 'review' ) {
537
+ $sbi_statuses_option = get_option( 'sbi_statuses', array() );
538
+
539
+ update_option( 'sbi_rating_notice', 'dismissed', false );
540
+ $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
541
+ update_option( 'sbi_statuses', $sbi_statuses_option, false );
542
+ } elseif ( $id === 'discount' ) {
543
+ update_user_meta( get_current_user_id(), 'sbi_ignore_new_user_sale_notice', 'always' );
544
+
545
+ $current_month_number = (int)date('n', sbi_get_current_time() );
546
+ $not_early_in_the_year = ($current_month_number > 5);
547
+
548
+ if ( $not_early_in_the_year ) {
549
+ update_user_meta( get_current_user_id(), 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
550
+ }
551
+ }
552
+
553
+ $option = $this->get_option();
554
+ $type = is_numeric( $id ) ? 'feed' : 'events';
555
+
556
+ $option['dismissed'][] = $id;
557
+ $option['dismissed'] = array_unique( $option['dismissed'] );
558
+
559
+ // Remove notification.
560
+ if ( is_array( $option[ $type ] ) && ! empty( $option[ $type ] ) ) {
561
+ foreach ( $option[ $type ] as $key => $notification ) {
562
+ if ( $notification['id'] == $id ) { // phpcs:ignore WordPress.PHP.StrictComparisons
563
+ unset( $option[ $type ][ $key ] );
564
+ break;
565
+ }
566
+ }
567
+ }
568
+
569
+ update_option( 'sbi_notifications', $option );
570
+
571
+ wp_send_json_success();
572
+ }
573
+ }
inc/admin/class-sbi-sitehealth.php CHANGED
@@ -1,82 +1,82 @@
1
- <?php
2
-
3
- class SB_Instagram_SiteHealth {
4
-
5
- /**
6
- * Indicates if current integration is allowed to load.
7
- *
8
- * @since 1.5.5
9
- *
10
- * @return bool
11
- */
12
- public function allow_load() {
13
-
14
- global $wp_version;
15
-
16
- return version_compare( $wp_version, '5.2', '>=' );
17
- }
18
-
19
- /**
20
- * Loads an integration.
21
- *
22
- * @since 1.5.5
23
- */
24
- public function load() {
25
-
26
- $this->hooks();
27
- }
28
-
29
- /**
30
- * Integration hooks.
31
- *
32
- * @since 1.5.5
33
- */
34
- protected function hooks() {
35
- add_filter( 'site_status_tests', array( $this, 'add_tests' ) );
36
- }
37
-
38
- /**
39
- * Add MonsterInsights WP Site Health tests.
40
- *
41
- * @param array $tests The current filters array.
42
- *
43
- * @return array
44
- */
45
- public function add_tests( $tests ) {
46
- $tests['direct']['sbi_test_check_errors'] = array(
47
- 'label' => __( 'Instagram Feed Errors', 'instagram-feed' ),
48
- 'test' => array( $this, 'test_check_errors' )
49
- );
50
-
51
- return $tests;
52
- }
53
-
54
- /**
55
- * Checks if there are Instagram API Errors
56
- */
57
- public function test_check_errors() {
58
- $result = array(
59
- 'label' => __( 'Instagram Feed has no critical errors', 'instagram-feed' ),
60
- 'status' => 'good',
61
- 'badge' => array(
62
- 'label' => __( 'Instagram Feed', 'instagram-feed' ),
63
- 'color' => 'blue',
64
- ),
65
- 'description' => __( 'No critical errors have been detected.', 'instagram-feed' ),
66
- 'test' => 'sbi_test_check_errors',
67
- );
68
-
69
- global $sb_instagram_posts_manager;
70
-
71
-
72
- if ( $sb_instagram_posts_manager->are_critical_errors() ) {
73
- $link = admin_url( '?page=sb-instagram-feed');
74
- $result['status'] = 'critical';
75
- $result['label'] = __( 'Your Instagram Feed is experiencing an error.', 'instagram-feed' );
76
- $result['description'] = sprintf( __( 'A critical issue has been detected with your Instagram Feed. Visit the %sInstagram Feed settings page%s to fix the issue.', 'instagram-feed' ), '<a href="' . esc_url( $link ) . '">', '</a>' );
77
- }
78
-
79
-
80
- return $result;
81
- }
82
  }
1
+ <?php
2
+
3
+ class SB_Instagram_SiteHealth {
4
+
5
+ /**
6
+ * Indicates if current integration is allowed to load.
7
+ *
8
+ * @since 1.5.5
9
+ *
10
+ * @return bool
11
+ */
12
+ public function allow_load() {
13
+
14
+ global $wp_version;
15
+
16
+ return version_compare( $wp_version, '5.2', '>=' );
17
+ }
18
+
19
+ /**
20
+ * Loads an integration.
21
+ *
22
+ * @since 1.5.5
23
+ */
24
+ public function load() {
25
+
26
+ $this->hooks();
27
+ }
28
+
29
+ /**
30
+ * Integration hooks.
31
+ *
32
+ * @since 1.5.5
33
+ */
34
+ protected function hooks() {
35
+ add_filter( 'site_status_tests', array( $this, 'add_tests' ) );
36
+ }
37
+
38
+ /**
39
+ * Add MonsterInsights WP Site Health tests.
40
+ *
41
+ * @param array $tests The current filters array.
42
+ *
43
+ * @return array
44
+ */
45
+ public function add_tests( $tests ) {
46
+ $tests['direct']['sbi_test_check_errors'] = array(
47
+ 'label' => __( 'Instagram Feed Errors', 'instagram-feed' ),
48
+ 'test' => array( $this, 'test_check_errors' )
49
+ );
50
+
51
+ return $tests;
52
+ }
53
+
54
+ /**
55
+ * Checks if there are Instagram API Errors
56
+ */
57
+ public function test_check_errors() {
58
+ $result = array(
59
+ 'label' => __( 'Instagram Feed has no critical errors', 'instagram-feed' ),
60
+ 'status' => 'good',
61
+ 'badge' => array(
62
+ 'label' => __( 'Instagram Feed', 'instagram-feed' ),
63
+ 'color' => 'blue',
64
+ ),
65
+ 'description' => __( 'No critical errors have been detected.', 'instagram-feed' ),
66
+ 'test' => 'sbi_test_check_errors',
67
+ );
68
+
69
+ global $sb_instagram_posts_manager;
70
+
71
+
72
+ if ( $sb_instagram_posts_manager->are_critical_errors() ) {
73
+ $link = admin_url( '?page=sb-instagram-feed');
74
+ $result['status'] = 'critical';
75
+ $result['label'] = __( 'Your Instagram Feed is experiencing an error.', 'instagram-feed' );
76
+ $result['description'] = sprintf( __( 'A critical issue has been detected with your Instagram Feed. Visit the %sInstagram Feed settings page%s to fix the issue.', 'instagram-feed' ), '<a href="' . esc_url( $link ) . '">', '</a>' );
77
+ }
78
+
79
+
80
+ return $result;
81
+ }
82
  }
inc/admin/class-sbi-tracking.php CHANGED
@@ -1,334 +1,334 @@
1
- <?php
2
- /**
3
- * Tracking functions for reporting plugin usage to the Smash Balloon site for users that have opted in
4
- *
5
- * @copyright Copyright (c) 2018, Chris Christoff
6
- * @since 5.6
7
- */
8
-
9
- // Exit if accessed directly
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- exit;
12
- }
13
-
14
- /**
15
- * Usage tracking
16
- *
17
- * @access public
18
- * @since 5.6
19
- * @return void
20
- */
21
- class SB_Instagram_Tracking {
22
-
23
- public function __construct() {
24
- add_action( 'init', array( $this, 'schedule_send' ) );
25
- add_filter( 'cron_schedules', array( $this, 'add_schedules' ) );
26
- add_action( 'sbi_usage_tracking_cron', array( $this, 'send_checkin' ) );
27
- }
28
-
29
- private function normalize_and_format( $key, $value ) {
30
- $normal_bools = array(
31
- 'sb_instagram_preserve_settings',
32
- 'sb_instagram_ajax_theme',
33
- 'enqueue_js_in_head',
34
- 'disable_js_image_loading',
35
- 'sb_instagram_disable_resize',
36
- 'sb_instagram_favor_local',
37
- 'sbi_hover_inc_username',
38
- 'sbi_hover_inc_icon',
39
- 'sbi_hover_inc_date',
40
- 'sbi_hover_inc_instagram',
41
- 'sbi_hover_inc_location',
42
- 'sbi_hover_inc_caption',
43
- 'sbi_hover_inc_likes',
44
- 'sb_instagram_disable_lightbox',
45
- 'sb_instagram_captionlinks',
46
- 'sb_instagram_show_btn',
47
- 'sb_instagram_show_caption',
48
- 'sb_instagram_lightbox_comments',
49
- 'sb_instagram_show_meta',
50
- 'sb_instagram_show_header',
51
- 'sb_instagram_show_followers',
52
- 'sb_instagram_show_bio',
53
- 'sb_instagram_outside_scrollable',
54
- 'sb_instagram_stories',
55
- 'sb_instagram_show_follow_btn',
56
- 'sb_instagram_autoscroll',
57
- 'sb_instagram_disable_font',
58
- 'sb_instagram_backup',
59
- 'sb_instagram_at',
60
- 'sb_ajax_initial',
61
- 'sbi_br_adjust',
62
- 'sb_instagram_feed_width_resp',
63
- 'enqueue_css_in_shortcode',
64
- 'sb_instagram_disable_mob_swipe',
65
- 'sb_instagram_disable_awesome',
66
- 'sb_instagram_media_vine',
67
- 'custom_template',
68
- 'disable_admin_notice',
69
- 'enable_email_report',
70
- 'sb_instagram_carousel',
71
- 'sb_instagram_carousel_arrows',
72
- 'sb_instagram_carousel_pag',
73
- 'sb_instagram_carousel_autoplay',
74
- );
75
- $custom_text_settings = array(
76
- 'sb_instagram_btn_text',
77
- 'sb_instagram_follow_btn_text',
78
- 'sb_instagram_custom_bio',
79
- 'sb_instagram_custom_avatar',
80
- 'sb_instagram_custom_css',
81
- 'sb_instagram_custom_js',
82
- 'email_notification_addresses'
83
- );
84
- $comma_separate_counts_settings = array(
85
- 'sb_instagram_user_id',
86
- 'sb_instagram_tagged_ids',
87
- 'sb_instagram_hashtag',
88
- 'sb_instagram_highlight_ids',
89
- 'sb_instagram_highlight_hashtag',
90
- 'sb_instagram_hide_photos',
91
- 'sb_instagram_exclude_words',
92
- 'sb_instagram_include_words'
93
- );
94
- $defaults = class_exists( 'SB_Instagram_Settings_Pro' ) ? SB_Instagram_Settings_Pro::default_settings() : SB_Instagram_Settings::default_settings();
95
-
96
- if ( is_array( $value ) ) {
97
- if ( empty( $value ) ) {
98
- return 0;
99
- }
100
- return count( $value );
101
- // 0 for anything that might be false, 1 for everything else
102
- } elseif ( in_array( $key, $normal_bools, true ) ) {
103
- if ( in_array( $value, array( false, 0, '0', 'false', '' ), true ) ) {
104
- return 0;
105
- }
106
- return 1;
107
-
108
- // if a custom text setting, we just want to know if it's different than the default
109
- } elseif ( in_array( $key, $custom_text_settings, true ) ) {
110
- if ( $defaults[ $key ] === $value ) {
111
- return 0;
112
- }
113
- return 1;
114
- } elseif ( in_array( $key, $comma_separate_counts_settings, true ) ) {
115
- if ( str_replace( ' ', '', $value ) === '' ) {
116
- return 0;
117
- }
118
- $split_at_comma = explode( ',', $value );
119
- return count( $split_at_comma );
120
- }
121
-
122
- return $value;
123
-
124
- }
125
-
126
- private function get_data() {
127
- $data = array();
128
-
129
- // Retrieve current theme info
130
- $theme_data = wp_get_theme();
131
-
132
- $count_b = 1;
133
- if ( is_multisite() ) {
134
- if ( function_exists( 'get_blog_count' ) ) {
135
- $count_b = get_blog_count();
136
- } else {
137
- $count_b = 'Not Set';
138
- }
139
- }
140
-
141
- $php_version = rtrim( ltrim( sanitize_text_field( phpversion() ) ) );
142
- $php_version = ! empty( $php_version ) ? substr( $php_version, 0, strpos( $php_version, '.', strpos( $php_version, '.' ) + 1 ) ) : phpversion();
143
-
144
- global $wp_version;
145
- $data['this_plugin'] = 'if';
146
- $data['php_version'] = $php_version;
147
- $data['mi_version'] = SBIVER;
148
- $data['wp_version'] = $wp_version;
149
- $data['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
150
- $data['multisite'] = is_multisite();
151
- $data['url'] = home_url();
152
- $data['themename'] = $theme_data->Name;
153
- $data['themeversion'] = $theme_data->Version;
154
- $data['settings'] = array();
155
- $data['pro'] = (int) sbi_is_pro_version();
156
- $data['sites'] = $count_b;
157
- $data['usagetracking'] = get_option( 'sbi_usage_tracking_config', false );
158
- $num_users = function_exists( 'count_users' ) ? count_users() : 'Not Set';
159
- $data['usercount'] = is_array( $num_users ) ? $num_users['total_users'] : 1;
160
- $data['timezoneoffset']= date('P');
161
-
162
- $settings_to_send = array();
163
- $raw_settings = get_option( 'sb_instagram_settings', array() );
164
-
165
- foreach ( $raw_settings as $key => $value ) {
166
- $value = $this->normalize_and_format( $key, $value );
167
-
168
- if ( $value !== false ) {
169
- $key = str_replace( array( 'sb_instagram_', 'sbi_' ), '', $key );
170
- $settings_to_send[ $key ] = $value;
171
- }
172
- }
173
- $con_bus_accounts = 0;
174
- $recently_searched_hashtags = 0;
175
- $access_tokens_tried = array();
176
- if ( isset( $raw_settings['connected_accounts'] ) ) {
177
- foreach ( $raw_settings['connected_accounts'] as $connected_account ) {
178
- if ( isset( $connected_account['type'] ) && $connected_account['type'] === 'business') {
179
- $con_bus_accounts++;
180
-
181
- if ( ! in_array( $connected_account['access_token'], $access_tokens_tried, true ) && class_exists( 'SB_Instagram_API_Connect_Pro' ) ) {
182
- $access_tokens_tried[] = $connected_account['access_token'];
183
- $connection = new SB_Instagram_API_Connect_Pro( $connected_account, 'recently_searched_hashtags', array( 'hashtag' => '' ) );
184
- $connection->connect();
185
-
186
- $recently_searched_data = !$connection->is_wp_error() ? $connection->get_data() : false;
187
- $num_hashatags_searched = $recently_searched_data && isset( $recently_searched_data ) && ! isset( $recently_searched_data['data'] ) && is_array( $recently_searched_data ) ? count( $recently_searched_data ) : 0;
188
- $recently_searched_hashtags = $recently_searched_hashtags + $num_hashatags_searched;
189
- }
190
-
191
-
192
- }
193
- }
194
- }
195
- $settings_to_send['business_accounts'] = $con_bus_accounts;
196
- $settings_to_send['recently_searched_hashtags'] = $recently_searched_hashtags;
197
-
198
- $feed_caches = SB_Instagram_Cron_Updater::get_feed_cache_option_names();
199
- $settings_to_send['num_found_feed_caches'] = count( $feed_caches );
200
-
201
-
202
- if ( isset( $settings_to_send['caching_type'] ) && $settings_to_send['caching_type'] !== 'background' ) {
203
- $settings_to_send['recently_requested_caches'] = $settings_to_send['num_found_feed_caches'];
204
- } else {
205
- $settings_to_send['recently_requested_caches'] = 0;
206
- foreach ( $feed_caches as $feed_cache ) {
207
- $feed_id = str_replace( '_transient_', '', $feed_cache['option_name'] );
208
-
209
- $transient = get_transient( $feed_id );
210
-
211
- if ( $transient ) {
212
- $feed_data = json_decode( $transient, true );
213
- $last_requested = isset( $feed_data['last_requested'] ) ? (int) $feed_data['last_requested'] : false;
214
-
215
- if ( !$last_requested || $last_requested > time() - 5 * 3600 * 24 ) {
216
- $settings_to_send['recently_requested_caches']++;
217
- }
218
- }
219
-
220
- }
221
- }
222
-
223
- $settings_to_send['custom_header_template'] = '' !== locate_template( 'sbi/header.php', false, false ) ? 1 : 0;
224
- $settings_to_send['custom_header_boxed_template'] = '' !== locate_template( 'sbi/header-boxed.php', false, false ) ? 1 : 0;
225
- $settings_to_send['custom_header_generic_template'] = '' !== locate_template( 'sbi/header-generic.php', false, false ) ? 1 : 0;
226
- $settings_to_send['custom_item_template'] = '' !== locate_template( 'sbi/item.php', false, false ) ? 1 : 0;
227
- $settings_to_send['custom_footer_template'] = '' !== locate_template( 'sbi/footer.php', false, false ) ? 1 : 0;
228
- $settings_to_send['custom_feed_template'] = '' !== locate_template( 'sbi/feed.php', false, false ) ? 1 : 0;
229
-
230
- $sbi_current_white_names = get_option( 'sb_instagram_white_list_names', array() );
231
- if( empty( $sbi_current_white_names ) ){
232
- $settings_to_send['num_white_lists'] = 0;
233
- } else {
234
- $settings_to_send['num_white_lists'] = count( $sbi_current_white_names );
235
- }
236
-
237
- $data['settings'] = $settings_to_send;
238
-
239
- // Retrieve current plugin information
240
- if( ! function_exists( 'get_plugins' ) ) {
241
- include ABSPATH . '/wp-admin/includes/plugin.php';
242
- }
243
-
244
- $plugins = get_plugins();
245
- $active_plugins = get_option( 'active_plugins', array() );
246
- $plugins_to_send = array();
247
-
248
- foreach ( $plugins as $plugin_path => $plugin ) {
249
- // If the plugin isn't active, don't show it.
250
- if ( ! in_array( $plugin_path, $active_plugins ) )
251
- continue;
252
-
253
- $plugins_to_send[] = $plugin['Name'];
254
- }
255
-
256
- $data['active_plugins'] = $plugins_to_send;
257
- $data['locale'] = get_locale();
258
-
259
- return $data;
260
- }
261
-
262
- public function send_checkin( $override = false, $ignore_last_checkin = false ) {
263
-
264
- $home_url = trailingslashit( home_url() );
265
- if ( strpos( $home_url, 'smashballoon.com' ) !== false ) {
266
- return false;
267
- }
268
-
269
- if( ! $this->tracking_allowed() && ! $override ) {
270
- return false;
271
- }
272
-
273
- // Send a maximum of once per week
274
- $usage_tracking = get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => sbi_is_pro_version() ) );
275
- if ( is_numeric( $usage_tracking['last_send'] ) && $usage_tracking['last_send'] > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
276
- return false;
277
- }
278
-
279
- $request = wp_remote_post( 'https://usage.smashballoon.com/v1/checkin/', array(
280
- 'method' => 'POST',
281
- 'timeout' => 5,
282
- 'redirection' => 5,
283
- 'httpversion' => '1.1',
284
- 'blocking' => false,
285
- 'body' => $this->get_data(),
286
- 'user-agent' => 'MI/' . SBIVER . '; ' . get_bloginfo( 'url' )
287
- ) );
288
-
289
- // If we have completed successfully, recheck in 1 week
290
- $usage_tracking['last_send'] = time();
291
- update_option( 'sbi_usage_tracking', $usage_tracking, false );
292
- return true;
293
- }
294
-
295
- private function tracking_allowed() {
296
- $usage_tracking = sbi_get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => sbi_is_pro_version() ) );
297
- $tracking_allowed = isset( $usage_tracking['enabled'] ) ? $usage_tracking['enabled'] : sbi_is_pro_version();
298
-
299
- return $tracking_allowed;
300
- }
301
-
302
- public function schedule_send() {
303
- if ( ! wp_next_scheduled( 'sbi_usage_tracking_cron' ) ) {
304
- $tracking = array();
305
- $tracking['day'] = rand( 0, 6 );
306
- $tracking['hour'] = rand( 0, 23 );
307
- $tracking['minute'] = rand( 0, 59 );
308
- $tracking['second'] = rand( 0, 59 );
309
- $tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) +
310
- ( $tracking['hour'] * HOUR_IN_SECONDS ) +
311
- ( $tracking['minute'] * MINUTE_IN_SECONDS ) +
312
- $tracking['second'];
313
- $last_sunday = strtotime("next sunday") - (7 * DAY_IN_SECONDS);
314
- if ( ($last_sunday + $tracking['offset']) > time() + 6 * HOUR_IN_SECONDS ) {
315
- $tracking['initsend'] = $last_sunday + $tracking['offset'];
316
- } else {
317
- $tracking['initsend'] = strtotime("next sunday") + $tracking['offset'];
318
- }
319
-
320
- wp_schedule_event( $tracking['initsend'], 'weekly', 'sbi_usage_tracking_cron' );
321
- update_option( 'sbi_usage_tracking_config', $tracking );
322
- }
323
- }
324
-
325
- public function add_schedules( $schedules = array() ) {
326
- // Adds once weekly to the existing schedules.
327
- $schedules['weekly'] = array(
328
- 'interval' => 604800,
329
- 'display' => __( 'Once Weekly', 'instagram-feed' )
330
- );
331
- return $schedules;
332
- }
333
- }
334
  new SB_Instagram_Tracking();
1
+ <?php
2
+ /**
3
+ * Tracking functions for reporting plugin usage to the Smash Balloon site for users that have opted in
4
+ *
5
+ * @copyright Copyright (c) 2018, Chris Christoff
6
+ * @since 5.6
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ /**
15
+ * Usage tracking
16
+ *
17
+ * @access public
18
+ * @since 5.6
19
+ * @return void
20
+ */
21
+ class SB_Instagram_Tracking {
22
+
23
+ public function __construct() {
24
+ add_action( 'init', array( $this, 'schedule_send' ) );
25
+ add_filter( 'cron_schedules', array( $this, 'add_schedules' ) );
26
+ add_action( 'sbi_usage_tracking_cron', array( $this, 'send_checkin' ) );
27
+ }
28
+
29
+ private function normalize_and_format( $key, $value ) {
30
+ $normal_bools = array(
31
+ 'sb_instagram_preserve_settings',
32
+ 'sb_instagram_ajax_theme',
33
+ 'enqueue_js_in_head',
34
+ 'disable_js_image_loading',
35
+ 'sb_instagram_disable_resize',
36
+ 'sb_instagram_favor_local',
37
+ 'sbi_hover_inc_username',
38
+ 'sbi_hover_inc_icon',
39
+ 'sbi_hover_inc_date',
40
+ 'sbi_hover_inc_instagram',
41
+ 'sbi_hover_inc_location',
42
+ 'sbi_hover_inc_caption',
43
+ 'sbi_hover_inc_likes',
44
+ 'sb_instagram_disable_lightbox',
45
+ 'sb_instagram_captionlinks',
46
+ 'sb_instagram_show_btn',
47
+ 'sb_instagram_show_caption',
48
+ 'sb_instagram_lightbox_comments',
49
+ 'sb_instagram_show_meta',
50
+ 'sb_instagram_show_header',
51
+ 'sb_instagram_show_followers',
52
+ 'sb_instagram_show_bio',
53
+ 'sb_instagram_outside_scrollable',
54
+ 'sb_instagram_stories',
55
+ 'sb_instagram_show_follow_btn',
56
+ 'sb_instagram_autoscroll',
57
+ 'sb_instagram_disable_font',
58
+ 'sb_instagram_backup',
59
+ 'sb_instagram_at',
60
+ 'sb_ajax_initial',
61
+ 'sbi_br_adjust',
62
+ 'sb_instagram_feed_width_resp',
63
+ 'enqueue_css_in_shortcode',
64
+ 'sb_instagram_disable_mob_swipe',
65
+ 'sb_instagram_disable_awesome',
66
+ 'sb_instagram_media_vine',
67
+ 'custom_template',
68
+ 'disable_admin_notice',
69
+ 'enable_email_report',
70
+ 'sb_instagram_carousel',
71
+ 'sb_instagram_carousel_arrows',
72
+ 'sb_instagram_carousel_pag',
73
+ 'sb_instagram_carousel_autoplay',
74
+ );
75
+ $custom_text_settings = array(
76
+ 'sb_instagram_btn_text',
77
+ 'sb_instagram_follow_btn_text',
78
+ 'sb_instagram_custom_bio',
79
+ 'sb_instagram_custom_avatar',
80
+ 'sb_instagram_custom_css',
81
+ 'sb_instagram_custom_js',
82
+ 'email_notification_addresses'
83
+ );
84
+ $comma_separate_counts_settings = array(
85
+ 'sb_instagram_user_id',
86
+ 'sb_instagram_tagged_ids',
87
+ 'sb_instagram_hashtag',
88
+ 'sb_instagram_highlight_ids',
89
+ 'sb_instagram_highlight_hashtag',
90
+ 'sb_instagram_hide_photos',
91
+ 'sb_instagram_exclude_words',
92
+ 'sb_instagram_include_words'
93
+ );
94
+ $defaults = class_exists( 'SB_Instagram_Settings_Pro' ) ? SB_Instagram_Settings_Pro::default_settings() : SB_Instagram_Settings::default_settings();
95
+
96
+ if ( is_array( $value ) ) {
97
+ if ( empty( $value ) ) {
98
+ return 0;
99
+ }
100
+ return count( $value );
101
+ // 0 for anything that might be false, 1 for everything else
102
+ } elseif ( in_array( $key, $normal_bools, true ) ) {
103
+ if ( in_array( $value, array( false, 0, '0', 'false', '' ), true ) ) {
104
+ return 0;
105
+ }
106
+ return 1;
107
+
108
+ // if a custom text setting, we just want to know if it's different than the default
109
+ } elseif ( in_array( $key, $custom_text_settings, true ) ) {
110
+ if ( $defaults[ $key ] === $value ) {
111
+ return 0;
112
+ }
113
+ return 1;
114
+ } elseif ( in_array( $key, $comma_separate_counts_settings, true ) ) {
115
+ if ( str_replace( ' ', '', $value ) === '' ) {
116
+ return 0;
117
+ }
118
+ $split_at_comma = explode( ',', $value );
119
+ return count( $split_at_comma );
120
+ }
121
+
122
+ return $value;
123
+
124
+ }
125
+
126
+ private function get_data() {
127
+ $data = array();
128
+
129
+ // Retrieve current theme info
130
+ $theme_data = wp_get_theme();
131
+
132
+ $count_b = 1;
133
+ if ( is_multisite() ) {
134
+ if ( function_exists( 'get_blog_count' ) ) {
135
+ $count_b = get_blog_count();
136
+ } else {
137
+ $count_b = 'Not Set';
138
+ }
139
+ }
140
+
141
+ $php_version = rtrim( ltrim( sanitize_text_field( phpversion() ) ) );
142
+ $php_version = ! empty( $php_version ) ? substr( $php_version, 0, strpos( $php_version, '.', strpos( $php_version, '.' ) + 1 ) ) : phpversion();
143
+
144
+ global $wp_version;
145
+ $data['this_plugin'] = 'if';
146
+ $data['php_version'] = $php_version;
147
+ $data['mi_version'] = SBIVER;
148
+ $data['wp_version'] = $wp_version;
149
+ $data['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
150
+ $data['multisite'] = is_multisite();
151
+ $data['url'] = home_url();
152
+ $data['themename'] = $theme_data->Name;
153
+ $data['themeversion'] = $theme_data->Version;
154
+ $data['settings'] = array();
155
+ $data['pro'] = (int) sbi_is_pro_version();
156
+ $data['sites'] = $count_b;
157
+ $data['usagetracking'] = get_option( 'sbi_usage_tracking_config', false );
158
+ $num_users = function_exists( 'count_users' ) ? count_users() : 'Not Set';
159
+ $data['usercount'] = is_array( $num_users ) ? $num_users['total_users'] : 1;
160
+ $data['timezoneoffset']= date('P');
161
+
162
+ $settings_to_send = array();
163
+ $raw_settings = get_option( 'sb_instagram_settings', array() );
164
+
165
+ foreach ( $raw_settings as $key => $value ) {
166
+ $value = $this->normalize_and_format( $key, $value );
167
+
168
+ if ( $value !== false ) {
169
+ $key = str_replace( array( 'sb_instagram_', 'sbi_' ), '', $key );
170
+ $settings_to_send[ $key ] = $value;
171
+ }
172
+ }
173
+ $con_bus_accounts = 0;
174
+ $recently_searched_hashtags = 0;
175
+ $access_tokens_tried = array();
176
+ if ( isset( $raw_settings['connected_accounts'] ) ) {
177
+ foreach ( $raw_settings['connected_accounts'] as $connected_account ) {
178
+ if ( isset( $connected_account['type'] ) && $connected_account['type'] === 'business') {
179
+ $con_bus_accounts++;
180
+
181
+ if ( ! in_array( $connected_account['access_token'], $access_tokens_tried, true ) && class_exists( 'SB_Instagram_API_Connect_Pro' ) ) {
182
+ $access_tokens_tried[] = $connected_account['access_token'];
183
+ $connection = new SB_Instagram_API_Connect_Pro( $connected_account, 'recently_searched_hashtags', array( 'hashtag' => '' ) );
184
+ $connection->connect();
185
+
186
+ $recently_searched_data = !$connection->is_wp_error() ? $connection->get_data() : false;
187
+ $num_hashatags_searched = $recently_searched_data && isset( $recently_searched_data ) && ! isset( $recently_searched_data['data'] ) && is_array( $recently_searched_data ) ? count( $recently_searched_data ) : 0;
188
+ $recently_searched_hashtags = $recently_searched_hashtags + $num_hashatags_searched;
189
+ }
190
+
191
+
192
+ }
193
+ }
194
+ }
195
+ $settings_to_send['business_accounts'] = $con_bus_accounts;
196
+ $settings_to_send['recently_searched_hashtags'] = $recently_searched_hashtags;
197
+
198
+ $feed_caches = SB_Instagram_Cron_Updater::get_feed_cache_option_names();
199
+ $settings_to_send['num_found_feed_caches'] = count( $feed_caches );
200
+
201
+
202
+ if ( isset( $settings_to_send['caching_type'] ) && $settings_to_send['caching_type'] !== 'background' ) {
203
+ $settings_to_send['recently_requested_caches'] = $settings_to_send['num_found_feed_caches'];
204
+ } else {
205
+ $settings_to_send['recently_requested_caches'] = 0;
206
+ foreach ( $feed_caches as $feed_cache ) {
207
+ $feed_id = str_replace( '_transient_', '', $feed_cache['option_name'] );
208
+
209
+ $transient = get_transient( $feed_id );
210
+
211
+ if ( $transient ) {
212
+ $feed_data = json_decode( $transient, true );
213
+ $last_requested = isset( $feed_data['last_requested'] ) ? (int) $feed_data['last_requested'] : false;
214
+
215
+ if ( !$last_requested || $last_requested > time() - 5 * 3600 * 24 ) {
216
+ $settings_to_send['recently_requested_caches']++;
217
+ }
218
+ }
219
+
220
+ }
221
+ }
222
+
223
+ $settings_to_send['custom_header_template'] = '' !== locate_template( 'sbi/header.php', false, false ) ? 1 : 0;
224
+ $settings_to_send['custom_header_boxed_template'] = '' !== locate_template( 'sbi/header-boxed.php', false, false ) ? 1 : 0;
225
+ $settings_to_send['custom_header_generic_template'] = '' !== locate_template( 'sbi/header-generic.php', false, false ) ? 1 : 0;
226
+ $settings_to_send['custom_item_template'] = '' !== locate_template( 'sbi/item.php', false, false ) ? 1 : 0;
227
+ $settings_to_send['custom_footer_template'] = '' !== locate_template( 'sbi/footer.php', false, false ) ? 1 : 0;
228
+ $settings_to_send['custom_feed_template'] = '' !== locate_template( 'sbi/feed.php', false, false ) ? 1 : 0;
229
+
230
+ $sbi_current_white_names = get_option( 'sb_instagram_white_list_names', array() );
231
+ if( empty( $sbi_current_white_names ) ){
232
+ $settings_to_send['num_white_lists'] = 0;
233
+ } else {
234
+ $settings_to_send['num_white_lists'] = count( $sbi_current_white_names );
235
+ }
236
+
237
+ $data['settings'] = $settings_to_send;
238
+
239
+ // Retrieve current plugin information
240
+ if( ! function_exists( 'get_plugins' ) ) {
241
+ include ABSPATH . '/wp-admin/includes/plugin.php';
242
+ }
243
+
244
+ $plugins = get_plugins();
245
+ $active_plugins = get_option( 'active_plugins', array() );
246
+ $plugins_to_send = array();
247
+
248
+ foreach ( $plugins as $plugin_path => $plugin ) {
249
+ // If the plugin isn't active, don't show it.
250
+ if ( ! in_array( $plugin_path, $active_plugins ) )
251
+ continue;
252
+
253
+ $plugins_to_send[] = $plugin['Name'];
254
+ }
255
+
256
+ $data['active_plugins'] = $plugins_to_send;
257
+ $data['locale'] = get_locale();
258
+
259
+ return $data;
260
+ }
261
+
262
+ public function send_checkin( $override = false, $ignore_last_checkin = false ) {
263
+
264
+ $home_url = trailingslashit( home_url() );
265
+ if ( strpos( $home_url, 'smashballoon.com' ) !== false ) {
266
+ return false;
267
+ }
268
+
269
+ if( ! $this->tracking_allowed() && ! $override ) {
270
+ return false;
271
+ }
272
+
273
+ // Send a maximum of once per week
274
+ $usage_tracking = get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => sbi_is_pro_version() ) );
275
+ if ( is_numeric( $usage_tracking['last_send'] ) && $usage_tracking['last_send'] > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
276
+ return false;
277
+ }
278
+
279
+ $request = wp_remote_post( 'https://usage.smashballoon.com/v1/checkin/', array(
280
+ 'method' => 'POST',
281
+ 'timeout' => 5,
282
+ 'redirection' => 5,
283
+ 'httpversion' => '1.1',
284
+ 'blocking' => false,
285
+ 'body' => $this->get_data(),
286
+ 'user-agent' => 'MI/' . SBIVER . '; ' . get_bloginfo( 'url' )
287
+ ) );
288
+
289
+ // If we have completed successfully, recheck in 1 week
290
+ $usage_tracking['last_send'] = time();
291
+ update_option( 'sbi_usage_tracking', $usage_tracking, false );
292
+ return true;
293
+ }
294
+
295
+ private function tracking_allowed() {
296
+ $usage_tracking = sbi_get_option( 'sbi_usage_tracking', array( 'last_send' => 0, 'enabled' => sbi_is_pro_version() ) );
297
+ $tracking_allowed = isset( $usage_tracking['enabled'] ) ? $usage_tracking['enabled'] : sbi_is_pro_version();
298
+
299
+ return $tracking_allowed;
300
+ }
301
+
302
+ public function schedule_send() {
303
+ if ( ! wp_next_scheduled( 'sbi_usage_tracking_cron' ) ) {
304
+ $tracking = array();
305
+ $tracking['day'] = rand( 0, 6 );
306
+ $tracking['hour'] = rand( 0, 23 );
307
+ $tracking['minute'] = rand( 0, 59 );
308
+ $tracking['second'] = rand( 0, 59 );
309
+ $tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) +
310
+ ( $tracking['hour'] * HOUR_IN_SECONDS ) +
311
+ ( $tracking['minute'] * MINUTE_IN_SECONDS ) +
312
+ $tracking['second'];
313
+ $last_sunday = strtotime("next sunday") - (7 * DAY_IN_SECONDS);
314
+ if ( ($last_sunday + $tracking['offset']) > time() + 6 * HOUR_IN_SECONDS ) {
315
+ $tracking['initsend'] = $last_sunday + $tracking['offset'];
316
+ } else {
317
+ $tracking['initsend'] = strtotime("next sunday") + $tracking['offset'];
318
+ }
319
+
320
+ wp_schedule_event( $tracking['initsend'], 'weekly', 'sbi_usage_tracking_cron' );
321
+ update_option( 'sbi_usage_tracking_config', $tracking );
322
+ }
323
+ }
324
+
325
+ public function add_schedules( $schedules = array() ) {
326
+ // Adds once weekly to the existing schedules.
327
+ $schedules['weekly'] = array(
328
+ 'interval' => 604800,
329
+ 'display' => __( 'Once Weekly', 'instagram-feed' )
330
+ );
331
+ return $schedules;
332
+ }
333
+ }
334
  new SB_Instagram_Tracking();
inc/admin/main.php CHANGED
@@ -1,3543 +1,3545 @@
1
- <?php
2
- /**
3
- * Includes functions for all admin page templates and
4
- * functions that add menu pages in the dashboard. Also
5
- * has code for saving settings with defaults.
6
- */
7
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
8
-
9
- function sb_instagram_menu() {
10
- $cap = current_user_can( 'manage_instagram_feed_options' ) ? 'manage_instagram_feed_options' : 'manage_options';
11
-
12
- $cap = apply_filters( 'sbi_settings_pages_capability', $cap );
13
-
14
- global $sb_instagram_posts_manager;
15
- $notice = '';
16
- if ( $sb_instagram_posts_manager->are_critical_errors() ) {
17
- $notice = ' <span class="update-plugins sbi-error-alert"><span>!</span></span>';
18
- }
19
-
20
- add_menu_page(
21
- __( 'Instagram Feed', 'instagram-feed' ),
22
- __( 'Instagram Feed', 'instagram-feed' ) . $notice,
23
- $cap,
24
- 'sb-instagram-feed',
25
- 'sb_instagram_settings_page'
26
- );
27
- add_submenu_page(
28
- 'sb-instagram-feed',
29
- __( 'Settings', 'instagram-feed' ),
30
- __( 'Settings', 'instagram-feed' ) . $notice,
31
- $cap,
32
- 'sb-instagram-feed',
33
- 'sb_instagram_settings_page'
34
- );
35
- add_submenu_page(
36
- 'sb-instagram-feed',
37
- __( 'About Us', 'instagram-feed' ),
38
- __( 'About Us', 'instagram-feed' ),
39
- $cap,
40
- 'sb-instagram-feed-about',
41
- 'sb_instagram_about_page'
42
- );
43
-
44
- add_submenu_page(
45
- 'sb-instagram-feed',
46
- __( 'oEmbeds', 'instagram-feed' ),
47
- '<svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="far" data-icon="code" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-code fa-w-18 fa-2x"><path fill="currentColor" d="M234.8 511.7L196 500.4c-4.2-1.2-6.7-5.7-5.5-9.9L331.3 5.8c1.2-4.2 5.7-6.7 9.9-5.5L380 11.6c4.2 1.2 6.7 5.7 5.5 9.9L244.7 506.2c-1.2 4.3-5.6 6.7-9.9 5.5zm-83.2-121.1l27.2-29c3.1-3.3 2.8-8.5-.5-11.5L72.2 256l106.1-94.1c3.4-3 3.6-8.2.5-11.5l-27.2-29c-3-3.2-8.1-3.4-11.3-.4L2.5 250.2c-3.4 3.2-3.4 8.5 0 11.7L140.3 391c3.2 3 8.2 2.8 11.3-.4zm284.1.4l137.7-129.1c3.4-3.2 3.4-8.5 0-11.7L435.7 121c-3.2-3-8.3-2.9-11.3.4l-27.2 29c-3.1 3.3-2.8 8.5.5 11.5L503.8 256l-106.1 94.1c-3.4 3-3.6 8.2-.5 11.5l27.2 29c3.1 3.2 8.1 3.4 11.3.4z" class=""></path></svg>' . __( 'oEmbeds', 'instagram-feed' ),
48
- $cap,
49
- 'sbi-oembeds',
50
- 'sbi_oembeds_page'
51
- );
52
-
53
- //Show a Instagram plugin menu item if it isn't already installed
54
- if( !is_plugin_active( 'custom-facebook-feed/custom-facebook-feed.php' ) && !is_plugin_active( 'custom-facebook-feed-pro/custom-facebook-feed.php' ) ){
55
- add_submenu_page(
56
- 'sb-instagram-feed',
57
- __( 'Facebook Feed', 'instagram-feed' ),
58
- '<span class="sbi_get_cff"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-facebook fa-w-16 fa-2x"><path fill="currentColor" d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z" class=""></path></svg>' . __( 'Facebook Feed', 'instagram-feed' ) . '</span>',
59
- $cap,
60
- 'admin.php?page=sb-instagram-feed&tab=more',
61
- ''
62
- );
63
- }
64
-
65
- //Show a Twitter plugin menu item if it isn't already installed
66
- if( !is_plugin_active( 'custom-twitter-feeds/custom-twitter-feed.php' ) && !is_plugin_active( 'custom-twitter-feeds-pro/custom-twitter-feed.php' ) ){
67
- add_submenu_page(
68
- 'sb-instagram-feed',
69
- __( 'Twitter Feed', 'instagram-feed' ),
70
- '<span class="sbi_get_ctf"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-twitter fa-w-16 fa-2x"><path fill="currentColor" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" class=""></path></svg>' . __( 'Twitter Feed', 'instagram-feed' ) . '</span>',
71
- $cap,
72
- 'admin.php?page=sb-instagram-feed&tab=more',
73
- ''
74
- );
75
- }
76
-
77
- //Show a YouTube plugin menu item if it isn't already installed
78
- if( !is_plugin_active( 'feeds-for-youtube/youtube-feed.php' ) && !is_plugin_active( 'youtube-feed-pro/youtube-feed.php' ) ){
79
- add_submenu_page(
80
- 'sb-instagram-feed',
81
- __( 'YouTube Feed', 'instagram-feed' ),
82
- '<span class="sbi_get_yt"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="youtube" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-youtube fa-w-18 fa-2x"><path fill="currentColor" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" class=""></path></svg>' . __( 'YouTube Feed', 'instagram-feed' ) . '</span>',
83
- $cap,
84
- 'admin.php?page=sb-instagram-feed&tab=more',
85
- ''
86
- );
87
- }
88
-
89
- add_submenu_page(
90
- 'sb-instagram-feed',
91
- __( 'Social Wall', 'instagram-feed' ),
92
- '<span><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="th" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-th fa-w-16 fa-2x"><path fill="currentColor" d="M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z" class=""></path></svg>' . __( 'Social Wall', 'instagram-feed' ) . '</span>',
93
- $cap,
94
- 'sbi-sw',
95
- 'sbi_social_wall_page'
96
- );
97
-
98
- add_submenu_page(
99
- 'sb-instagram-feed',
100
- __( 'Try the Pro Demo', 'instagram-feed' ),
101
- __( '<span class="sbi_get_pro">Try the Pro Demo</span>', 'instagram-feed' ),
102
- $cap,
103
- 'https://smashballoon.com/instagram-feed/demo/?utm_campaign=instagram-free&utm_source=menu-link&utm_medium=upgrade-link',
104
- ''
105
- );
106
-
107
-
108
- }
109
- add_action('admin_menu', 'sb_instagram_menu');
110
-
111
- function sb_instagram_about_page() {
112
- do_action('sbi_admin_page' );
113
- }
114
- function sbi_oembeds_page() {
115
- ( is_plugin_active( 'social-wall/social-wall.php' ) ) ? $sbi_sw_active = true : $sbi_sw_active = false;
116
- ?>
117
-
118
- <div id="sbi_admin" class="wrap sbi-oembeds">
119
- <?php
120
- $lite_notice_dismissed = get_transient( 'instagram_feed_dismiss_lite' );
121
-
122
- if ( ! $lite_notice_dismissed ) :
123
- ?>
124
- <div id="sbi-notice-bar" style="display:none">
125
- <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
126
- <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
127
- </button>
128
- </div>
129
- <?php endif; ?>
130
- <div id="header">
131
- <h1><?php _e('Instagram oEmbeds', 'instagram-feed'); ?></h1>
132
- </div>
133
-
134
- <p>
135
- <?php
136
- _e( "You can use the Instagram Feed plugin to power your Instagram oEmbeds, both old and new.", 'instagram-feed' );
137
- if ( ! SB_Instagram_Oembed::can_do_oembed() ) {
138
- echo ' ';
139
- _e( "Just click the button below and we'll do the rest.", 'instagram-feed' );
140
- }
141
- ?>
142
- </p>
143
-
144
- <div class="sbi-oembed-button">
145
-
146
- <?php
147
- $admin_url_state = admin_url('admin.php?page=sbi-oembeds');
148
- //If the admin_url isn't returned correctly then use a fallback
149
- if ( $admin_url_state == '/wp-admin/admin.php?page=sbi-oembeds' ){
150
- $admin_url_state = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
151
- }
152
- $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
153
- $saved_access_token_data = isset( $oembed_token_settings['access_token'] ) ? $oembed_token_settings['access_token'] : false;
154
-
155
- $access_token_error = false;
156
- $valid_new_access_token = false;
157
- $error_message = '';
158
- $show_token_expiration_modal = false;
159
- if ( ! empty( $_GET['sbi_access_token'] ) && strlen( $_GET['sbi_access_token'] ) <= 20 ) {
160
- $access_token_error = true;
161
- $error_message = __("There was a problem with the access token that was retrieved.", 'instagram-feed' );
162
-
163
- } elseif ( ! empty( $_GET['transfer'] ) ) {
164
- if ( class_exists( 'CFF_Oembed' ) ) {
165
- $cff_oembed_token = CFF_Oembed::last_access_token();
166
- $valid_new_access_token = $cff_oembed_token;
167
- }
168
- } else {
169
- $valid_new_access_token = ! empty( $_GET['sbi_access_token'] ) && strlen( $_GET['sbi_access_token'] ) > 20 && $saved_access_token_data !== $_GET['sbi_access_token'] ? sanitize_text_field( $_GET['sbi_access_token'] ) : false;
170
- if ( $valid_new_access_token && ! empty( $_GET['sbi_access_token'] ) ) {
171
- $url = esc_url_raw( 'https://graph.facebook.com/me/accounts?limit=500&access_token=' . $valid_new_access_token );
172
- $pages_data_connection = wp_remote_get( $url );
173
-
174
- if ( ! is_wp_error( $pages_data_connection ) && isset( $pages_data_connection['body'] ) ) {
175
- $pages_data = json_decode( $pages_data_connection['body'], true );
176
- if ( isset( $pages_data['data'][0]['access_token'] ) ) {
177
- $oembed_token_settings['expiration_date'] = 'never';
178
- } else {
179
- $oembed_token_settings['expiration_date'] = time() + (60 * DAY_IN_SECONDS);
180
- $show_token_expiration_modal = true;
181
- }
182
- } else {
183
- $oembed_token_settings['expiration_date'] = 'unknown';
184
- }
185
- }
186
-
187
- }
188
-
189
-
190
- if ( ! $saved_access_token_data && ! $valid_new_access_token && ! SB_Instagram_Oembed::can_do_oembed() ) {
191
- if ( $access_token_error ) { ?>
192
- <p class="sbi-error"><?php echo $error_message; ?></p>
193
- <?php }
194
- $need_to_connect_class = ' sbi-need-to-connect';
195
- $token_href = 'https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=' . $admin_url_state;
196
- if ( class_exists( 'CFF_Oembed' ) ) {
197
- $cff_oembed_token = CFF_Oembed::last_access_token();
198
-
199
- if ( ! empty( $cff_oembed_token ) ) {
200
- $need_to_connect_class = '';
201
- $token_href = add_query_arg( 'transfer', '1', $admin_url_state );
202
- }
203
- }
204
-
205
- ?>
206
- <a href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn<?php echo $need_to_connect_class; ?>"><i class="fa fa-instagram"></i> <?php _e( 'Enable Instagram oEmbeds', 'instagram-feed' ); ?></a>
207
- <div id="sbi_config_info" class="sb_get_token" style="display: none;">
208
- <div class="sbi_config_modal">
209
- <?php _e( 'As Instagram is part of Facebook, in order to display Instagram oEmbeds, you must connect to Facebook. Click on the button below to connect', 'instagram-feed' ); ?>
210
-
211
- <p>
212
- <a style="display: inline-block; float: none; margin-bottom: 0;" href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn"><?php _e( 'Connect to Facebook', 'instagram-feed' ); ?></a>
213
- </p>
214
-
215
- <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
216
- </div>
217
- </div>
218
- <div class="sbi-oembed-promo sbi-oembed-desc">
219
- <div class="sbi-col">
220
- <h2><?php _e("What are oEmbeds?", "instagram-feed"); ?></h2>
221
- <p><?php _e("Anytime you share a link to an Instagram post in WordPress, it is automatically converted into an embedded version of that Instagram post (an \"oEmbed\").</p><p>However, WordPress is discontinuing support for Instagram oEmbeds due to them now requiring an Access Token to work. Don't worry though, we have your back. Just use the button above to connect to Facebook and we'll make sure your Instagram oEmbeds keep working.", "instagram-feed"); ?></p>
222
- </div>
223
-
224
- <img src="<?php echo SBI_PLUGIN_URL . 'img/sbi-oembed.png'; ?>" style="padding: 0px; background: white;">
225
- </div>
226
- <?php } else {
227
- if ( $valid_new_access_token ) {
228
- if ( ! is_array( $oembed_token_settings ) ) {
229
- $oembed_token_settings = array(
230
- 'access_token' => '',
231
- 'disabled' => '',
232
- );
233
- }
234
- $oembed_token_settings['access_token'] = $valid_new_access_token;
235
- $oembed_token_settings['disabled'] = false;
236
- update_option( 'sbi_oembed_token', $oembed_token_settings );
237
- ?>
238
- <div><p class="sbi-success-message"><?php _e("You're all set! Instagram Feed will replace your old oEmbeds automatically and generate all new content for all new links.", 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php _e("Disable", 'instagram-feed' ); ?></a></p></div>
239
- <?php if ( $show_token_expiration_modal ) : ?>
240
- <div id="sbi_config_info" class="sb_get_token">
241
- <div class="sbi_config_modal">
242
- <p><strong><?php _e( 'Heads up!', 'instagram-feed' ); ?></strong><br></p>
243
-
244
- <p>
245
- <?php _e( 'Your access token will expire in 60 days. Facebook requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Click the button below for instructions on creating a Facebook page and extending your access token to never expire.', 'instagram-feed' ); ?>
246
- </p>
247
- <p>
248
- <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" class="sbi-oembed-connect-btn" target="_blank" rel="noopener"><?php _e( 'How to Create a Facebook Page', 'instagram-feed' ); ?></a>
249
- &nbsp;&nbsp;<a href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="button button-secondary" style="height: 47px;line-height: 47px;font-size: 14px;padding: 0 21px;"><?php _e( 'Try Again', 'instagram-feed' ); ?></a>
250
- </p>
251
-
252
- <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
253
- </div>
254
- </div>
255
- <?php endif; ?>
256
- <?php } else {
257
- if ( ! isset( $oembed_token_settings['expiration_date'] ) || (int)$oembed_token_settings['expiration_date'] === 0 || $oembed_token_settings['expiration_date'] > time() ) :
258
- ?>
259
- <div><p class="sbi-success-message"><?php _e("The Instagram Feed plugin is now powering your Instagram oEmbeds.", 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php _e("Disable", 'instagram-feed' ); ?></a></p></div>
260
- <?php
261
- endif;
262
- if ( ! empty( $oembed_token_settings['expiration_date'] )
263
- && $oembed_token_settings['expiration_date'] !== 'never' ) :
264
- $link_1 = '<a href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" target="_blank" rel="noopener">';
265
- $link_2 = '</a>';
266
- $class = 'sbi_warning';
267
- if ( $oembed_token_settings['expiration_date'] > time() ) {
268
- $days_to_expire = floor( ( $oembed_token_settings['expiration_date'] - time() ) / DAY_IN_SECONDS );
269
- $message = sprintf( __( '%1sImportant:%2s Your access token for powering oEmbeds will expire in %3s days.', 'instagram-feed' ), '<strong>', '</strong>', $days_to_expire );
270
- } else {
271
- $class = 'sb_instagram_notice';
272
- $message = __( 'Your access token for powering oEmbeds has expired.', 'instagram-feed' );
273
- }
274
- ?>
275
- <div class="<?php echo $class; ?>" style="display:inline-block;width: auto;">
276
- <p>
277
- <?php echo $message ; ?>
278
- </p>
279
- <p>
280
- <?php echo sprintf( __( 'Instagram requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Visit %1sthis link%2s for instructions on extending your access token to never expire.', 'instagram-feed' ), $link_1, $link_2 ); ?>
281
- </p>
282
- <p>
283
- <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="sbi-oembed-connect-btn"><?php _e( 'Connect to Facebook and Recheck Access Token', 'instagram-feed' ); ?></a>
284
- </p>
285
- </div>
286
-
287
- <?php endif; ?>
288
-
289
- <?php } ?>
290
- <div class="sbi-oembed-promo">
291
- <h2><?php _e("Did you know, you can also use this Instagram Feed plugin to easily add Instagram content on your website?", 'instagram-feed'); ?></h2>
292
- <div class="sbi-reasons">
293
- <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="clock" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-clock fa-w-16 fa-2x"><path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z" class=""></path></svg><span><?php _e("Save time", 'instagram-feed'); ?></span></div>
294
- <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-line" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-line fa-w-16 fa-2x"><path fill="currentColor" d="M117.65 277.65c6.25 6.25 16.38 6.25 22.63 0L192 225.94l84.69 84.69c6.25 6.25 16.38 6.25 22.63 0L409.54 200.4l29.49 29.5c15.12 15.12 40.97 4.41 40.97-16.97V112c0-8.84-7.16-16-16-16H363.07c-21.38 0-32.09 25.85-16.97 40.97l29.5 29.49-87.6 87.6-84.69-84.69c-6.25-6.25-16.38-6.25-22.63 0l-74.34 74.34c-6.25 6.25-6.25 16.38 0 22.63l11.31 11.31zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z" class=""></path></svg><span><?php _e("Increase social engagement", 'instagram-feed'); ?></span></div>
295
- <div><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-heart fa-w-16 fa-2x"><path fill="currentColor" d="M462.3 62.7c-54.5-46.4-136-38.7-186.6 13.5L256 96.6l-19.7-20.3C195.5 34.1 113.2 8.7 49.7 62.7c-62.8 53.6-66.1 149.8-9.9 207.8l193.5 199.8c6.2 6.4 14.4 9.7 22.6 9.7 8.2 0 16.4-3.2 22.6-9.7L472 270.5c56.4-58 53.1-154.2-9.7-207.8zm-13.1 185.6L256.4 448.1 62.8 248.3c-38.4-39.6-46.4-115.1 7.7-161.2 54.8-46.8 119.2-12.9 142.8 11.5l42.7 44.1 42.7-44.1c23.2-24 88.2-58 142.8-11.5 54 46 46.1 121.5 7.7 161.2z" class=""></path></svg><span><?php _e("Keep Your Site Looking Fresh.", 'instagram-feed'); ?></span></div>
296
- </div>
297
- <p>
298
- <?php $check_svg = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-check fa-w-16 fa-2x"><path fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg>'; ?>
299
- <?php echo $check_svg; ?><span><?php _e("Super simple to set up", 'instagram-feed'); ?></span>
300
- <?php echo $check_svg; ?><span><?php _e("Optimized for speed", 'instagram-feed'); ?></span>
301
- <?php echo $check_svg; ?><span><?php _e("Completely customizable", 'instagram-feed'); ?></span>
302
- <?php echo $check_svg; ?><span><?php _e("SEO friendly", 'instagram-feed'); ?></span>
303
- </p>
304
- <a href="?page=sb-instagram-feed" class="button button-primary"><?php _e("Add an Instagram feed now", 'instagram-feed'); ?></a>
305
- </div>
306
-
307
- <?php } ?>
308
-
309
- </div>
310
- </div>
311
- <?php }
312
-
313
- function sbi_social_wall_page() {
314
-
315
- ( is_plugin_active( 'social-wall/social-wall.php' ) ) ? $sbi_sw_active = true : $sbi_sw_active = false;
316
-
317
- ?>
318
-
319
- <div id="sbi_admin" class="wrap sw-landing-page">
320
-
321
- <?php $plus_svg = '<span class="sbi-sb-plus"><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" class="svg-inline--fa fa-plus fa-w-12 fa-2x"><path fill="currentColor" d="M376 232H216V72c0-4.42-3.58-8-8-8h-32c-4.42 0-8 3.58-8 8v160H8c-4.42 0-8 3.58-8 8v32c0 4.42 3.58 8 8 8h160v160c0 4.42 3.58 8 8 8h32c4.42 0 8-3.58 8-8V280h160c4.42 0 8-3.58 8-8v-32c0-4.42-3.58-8-8-8z" class=""></path></svg></span>'; ?>
322
-
323
- <div class="sbi-sw-icons">
324
-
325
- <span style="display: inline-block; padding: 0 0 12px 0; width: 360px; max-width: 100%;">
326
- <svg viewBox="0 0 9161 1878" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">
327
- <path d="M671.51192 492.98498c-131.56765-59.12206-268.60859-147.41608-396.53319-188.5154 45.4516 108.39585 83.81326 223.88002 123.5099 338.03081-79.17849 59.49897-171.6647 105.68858-260.02357 156.01204C213.65642 872.8361 320.1446 915.85885 404.9893 980.52836c-67.96118 83.8619-201.48512 171.0179-234.02089 247.0198 140.6921-17.62678 304.63665-46.21028 435.53762-52.00414 28.76425 144.58318 43.59867 303.0974 84.5075 435.5368 60.92028-175.2656 116.0013-356.3729 188.5158-520.0447 111.90636 46.28566 248.28994 102.72599 357.52876 130.01178-76.6463-107.53462-146.59336-221.76932-214.51645-338.02878 100.51155-72.83872 202.17166-144.52441 299.02516-221.02077-136.89504-12.61227-278.73407-20.28825-422.53587-25.99863-22.85286-148.332-16.84825-325.5158-52.00496-461.53949-53.19323 111.48812-115.96685 213.3914-175.51405 318.52475m65.00509 1228.60643c-18.07949 77.37581 41.48757 109.11319 32.50294 156.01204-58.81404-20.26799-103.0575-30.6796-182.01552-19.50201 2.47017-60.37032 56.76657-68.90954 45.50428-143.0107-841.40803-95.6632-843.09804-1616.06909-6.50107-1709.64388C1672.04777-111.55711 1704.8713 1694.70523 736.517 1721.5914" fill="#e34f0e"/>
328
- <path d="M847.02597 174.46023c35.15671 136.0237 29.1521 313.20749 52.00455 461.53544 143.80221 5.71443 285.63962 13.38636 422.53628 26.00268-96.8531 76.49636-198.51483 148.18205-299.02556 221.01874 67.92349 116.2623 137.87014 230.49416 214.51847 338.03-109.24085-27.2866-245.62443-83.72572-357.5308-130.0126-72.51448 163.67262-127.5955 344.77992-188.51538 520.04553-40.90924-132.4394-55.74325-290.95364-84.5079-435.53681-130.90057 5.79548-294.84472 34.37736-435.53722 52.00415 32.53577-76.0007 166.0589-163.15589 234.02008-247.02021-84.8451-64.67032-191.33207-107.69066-266.52343-182.01472 88.35886-50.32346 180.84346-96.51307 260.02276-156.01609-39.69705-114.14674-78.05668-229.63091-123.50868-338.02675C402.9013 345.5689 539.94427 433.86292 671.51192 492.98498c59.5468-105.13335 122.32082-207.03663 175.51405-318.52475" fill="#fff"/>
329
- <path d="M1782.27033 1236.51938c41.18267 21.61921 126.79927 44.31938 214.58338 44.31938 213.49962 0 311.03752-107.01507 311.03752-232.40646 0-101.61027-58.52274-171.87269-189.65702-220.5159-92.11913-33.50977-131.13429-48.6432-131.13429-85.39586 0-32.4288 32.51263-54.04801 92.11913-54.04801 72.61154 0 126.79927 20.53824 158.22814 34.59073l41.18267-155.65828c-47.6852-21.6192-110.54295-37.83361-197.2433-37.83361-184.23826 0-293.69746 99.44834-293.69746 228.08262 0 108.09602 82.36534 176.19652 205.91335 219.43493 82.36533 28.10497 114.87797 48.64321 114.87797 84.3149 0 36.75265-32.51264 59.45282-99.70541 59.45282-73.6953 0-145.2231-22.70017-189.65703-45.40034l-36.84765 161.06308zM3019.37602 1270.02915h189.65702l-36.84765-728.56722h-256.8498l-55.27148 194.57285c-21.67508 76.74818-45.51768 179.4394-66.10902 268.07815h-3.25126c-15.17256-88.63875-36.84765-185.92517-57.43898-266.99719l-47.6852-195.6538h-263.35233l-45.51768 728.56721h179.90323l11.9213-260.51142c3.25127-83.23394 6.50253-191.32997 10.83755-294.0212h2.1675c17.34008 99.44835 39.01517 207.54438 58.52274 286.45448l60.69025 252.9447h152.80938l72.61154-254.02566c23.8426-79.99106 54.18773-189.16805 76.94657-285.37352h3.25126c0 113.50083 1.08376 210.78726 4.33502 294.0212l8.67004 260.51142zM3699.9738 1101.39935l46.60144 168.6298h211.33211l-217.83464-728.56722H3478.8879l-211.33211 728.56722h202.66208l41.18267-168.6298h188.57327zm-162.56317-143.76772l31.42888-130.79619c9.7538-41.07649 20.59134-101.61026 31.42888-143.76771h2.1675c11.9213 42.15745 26.01012 102.69122 36.84766 143.76771l33.59639 130.7962h-135.4693zM4016.4301 1236.51938c41.18266 21.61921 126.79926 44.31938 214.58337 44.31938 213.49962 0 311.03752-107.01507 311.03752-232.40646 0-101.61027-58.52274-171.87269-189.65702-220.5159-92.11913-33.50977-131.1343-48.6432-131.1343-85.39586 0-32.4288 32.51264-54.04801 92.11914-54.04801 72.61154 0 126.79926 20.53824 158.22814 34.59073l41.18267-155.65828c-47.6852-21.6192-110.54295-37.83361-197.2433-37.83361-184.23826 0-293.69746 99.44834-293.69746 228.08262 0 108.09602 82.36534 176.19652 205.91335 219.43493 82.36533 28.10497 114.87797 48.64321 114.87797 84.3149 0 36.75265-32.51264 59.45282-99.70541 59.45282-73.6953 0-145.2231-22.70017-189.65703-45.40034l-36.84765 161.06308zM4623.27688 541.46193v728.56722h196.15955V981.41276h237.34222v288.6164h196.15955V541.46192h-196.15955v269.1591h-237.34222v-269.1591h-196.15955z" fill="#282828" fill-rule="nonzero"/>
330
- <g>
331
- <path d="M6900.00785 293.7053c5.29-14.371 11.90999-24.77099 19.84998-31.19998 7.94-6.429 16.07-9.644 24.38998-9.644 8.32 0 15.7 2.08 22.12999 6.241 6.43 4.16 10.39999 9.265 11.90999 15.31599 2.27 43.86896 4.16 92.65493 5.67 146.35689 1.51 53.70296 2.65 109.86291 3.4 168.48187.76 58.61796 1.52 118.74891 2.26999 180.39386.76 61.64396 1.33 122.71991 1.71 183.22987.37 60.50695.56 119.1269.56 175.85686 0 56.72996.38 109.28992 1.14 157.69988-3.78 12.1-10.59 20.98999-20.41999 26.65998-9.83999 5.68-19.85998 8.14-30.06997 7.38-10.21-.76-19.28999-4.73-27.22998-11.91-7.94-7.18999-11.91-17.58998-11.91-31.19997l-3.4-983.66226zm173.57987 0c5.3-14.371 11.90999-24.77099 19.85998-31.19998 7.94-6.429 16.06999-9.644 24.38998-9.644 8.32 0 15.69 2.08 22.11999 6.241 6.43 4.16 10.39999 9.265 11.91999 15.31599 2.27 43.86896 4.15 92.65493 5.67 146.35689 1.51 53.70296 2.64 109.86291 3.4 168.48187.76 58.61796 1.51999 118.74891 2.26999 180.39386.76 61.64396 1.33 122.71991 1.7 183.22987.38 60.50695.57 119.1269.57 175.85686 0 56.72996.38 109.28992 1.13 157.69988-3.78 12.1-10.59 20.98999-20.41999 26.65998-9.82999 5.68-19.84998 8.14-30.05998 7.38-10.20999-.76-19.28998-4.73-27.22997-11.91-7.94-7.18999-11.92-17.58998-11.92-31.19997l-3.4-983.66226zm-419.49969 980.25225c-6.81-4.54-13.60999-12.66999-20.41998-24.38998-6.81-11.71999-13.61-24.57998-20.41999-38.57997-6.81-13.98999-13.61999-28.16998-20.41998-42.53997-6.81-14.36999-13.99999-26.84998-21.55998-37.43997-7.56-10.58999-15.51-18.33998-23.82999-23.25998-8.31999-4.92-17.38998-4.73-27.22998.57-15.11998 24.95998-30.43997 49.15996-45.93996 72.60994-15.50999 23.44999-32.52998 43.48997-51.05996 60.12996-18.52999 16.63999-39.70997 28.35998-63.52995 35.16997-23.82999 6.81-51.62997 6.05-83.38994-2.27-31.01998-8.31999-56.16996-24.57998-75.44994-48.77996-19.28999-24.20998-33.65998-52.94996-43.10997-86.22993-9.46-33.27998-14.19-69.77995-14.19-109.48992 0-39.70397 4.35-79.22394 13.05-118.55591 8.7-39.33097 21.36998-77.14894 38.00997-113.45492 16.63999-36.30597 36.67997-67.50595 60.12995-93.60093 23.44999-26.09398 50.10997-45.75996 79.98994-58.99595 29.86998-13.237 62.20996-16.82999 96.99993-10.779 32.51998 6.051 59.36996 19.855 80.54994 41.41198 21.17998 21.55598 38.76997 47.65096 52.75996 78.28394 13.98999 30.63297 24.95998 64.47995 32.89998 101.54192 7.93999 37.06197 15.12998 74.12394 21.55998 111.18692 6.43 37.06197 12.85999 72.42194 19.28999 106.08192 6.41999 33.65997 14.92998 62.58995 25.51998 86.78993 10.58999 24.20998 24.01998 41.97997 40.27997 53.32996 16.25998 11.34 37.62997 12.84999 64.09995 4.53 30.25997-31.00998 54.45996-51.61996 72.60994-61.82996 18.15999-10.20999 31.38998-13.60999 39.70997-10.20999 8.32 3.4 11.91 11.91 10.78 25.52998-1.13 13.61-6.05 28.73998-14.75 45.37997-8.69999 16.63999-20.60998 32.89997-35.73997 48.77996-15.11999 15.88999-32.32997 27.98998-51.61996 36.30997-19.28998 8.32-40.46997 11.16-63.52995 8.51-23.06998-2.65-47.08997-14.56-72.04995-35.73998zm2413.83818 6.81c-2.26-39.32997-5.67-82.25994-10.20999-128.7699-4.53-46.51997-10.58-92.84993-18.14999-138.9899-7.55999-46.13396-16.63998-89.81493-27.22998-131.0369-10.58999-41.22197-23.06998-76.01494-37.43997-104.37892-14.36999-28.36298-30.81997-48.21797-49.34996-59.56396-18.52999-11.34499-39.51997-9.83199-62.96995 4.539-23.44998 14.37099-49.34997 43.30197-77.71994 86.79293-28.35998 43.49097-59.93996 106.08092-94.72993 187.76786-3.03 6.05-7 15.88-11.91 29.49998-4.91999 13.60999-10.20999 28.92998-15.88998 45.94997-5.67 17.01998-11.91 34.97997-18.71999 53.88996-6.8 18.90998-13.03999 37.05997-18.71998 54.45995-5.67 17.4-10.78 32.89998-15.31 46.50997-4.53999 13.61999-7.56999 23.82998-9.07998 30.63998-6.05 15.11998-13.62 23.62998-22.68999 25.52998-9.08 1.89-18.14998.18-27.22998-5.11-9.07999-5.3-17.39998-12.47999-24.95998-21.55998-7.56-9.07-12.09999-17.01999-13.61999-23.81999 6.81-26.47998 12.86-55.96995 18.15999-88.49993 5.29-32.51997 9.45-69.57995 12.47999-111.17991 3.02-41.60397 4.16-88.68794 3.4-141.2559-.76-52.56696-4.54-112.13091-11.35-178.69186 8.32-17.39599 16.65-27.03998 24.96999-28.93098 8.31999-1.891 16.63998.756 24.94998 7.942 8.32 7.18499 16.07999 17.77498 23.25998 31.76697 7.19 13.99299 13.61999 28.17498 19.28999 42.54597 5.67 14.37099 10.20999 27.79698 13.61998 40.27697 3.4 12.47999 5.1 20.61098 5.1 24.39298 16.63999-14.371 31.95998-32.71298 45.94997-55.02596 13.98999-22.31298 28.35997-44.62597 43.10996-66.93895 14.75-22.31298 30.82998-42.16697 48.21997-59.56396 17.39998-17.39598 38.19997-27.98597 62.39995-31.76697 49.91996-9.077 92.27993-3.215 127.0699 17.58499 34.79998 20.79998 63.34996 50.67696 85.65994 89.62993 22.30998 38.95297 39.32997 84.14593 51.05996 135.5789 11.72 51.43296 20.03999 103.05492 24.95998 154.86588 4.91 51.80996 6.99 101.34992 6.24 148.62989-.76 47.26996-2.65 86.02993-5.68 116.2899-8.32 17.39-19.46998 26.08999-33.46997 26.08999-13.99 0-25.13998-8.7-33.46998-26.08998zm-1029.72922-9.08c-43.86997-18.14998-78.46994-41.97996-103.80992-71.46994-25.33998-29.49998-43.10997-61.83995-53.32996-97.00993-10.21-35.16997-13.61-72.03994-10.21-110.61791 3.41-38.57497 12.48-76.20395 27.22999-112.88792 14.74998-36.68397 34.41997-71.28794 58.99995-103.81092 24.57998-32.52398 52.56996-60.32095 83.95994-83.38994 31.38997-23.06898 65.79995-40.08797 103.23992-51.05496 37.43997-10.967 76.20994-13.42599 116.28991-7.375 33.27998 5.295 61.83995 20.99 85.65994 47.08397 23.82998 26.09498 42.73996 58.42996 56.72995 97.00493 13.99 38.57397 22.87999 80.93094 26.65998 127.0699 3.78 46.13797 1.7 91.70893-6.24 136.7079-7.93999 45.00996-21.55997 86.79993-40.83996 125.3699-19.28999 38.57998-44.62997 69.77995-76.01994 93.59993-31.38998 23.82999-69.39995 37.81998-114.01992 41.97997-44.62996 4.16-96.05992-6.24-154.29988-31.19997zm-642.42952 0c-43.86996-18.14998-78.46994-41.97996-103.80992-71.46994-25.33998-29.49998-43.10997-61.83995-53.31996-97.00993-10.20999-35.16997-13.61999-72.03994-10.20999-110.61791 3.4-38.57497 12.48-76.20395 27.21998-112.88792 14.74999-36.68397 34.41997-71.28794 58.99996-103.81092 24.57998-32.52398 52.56996-60.32095 83.95993-83.38994 31.38998-23.06898 65.79995-40.08797 103.23992-51.05496 37.43998-10.967 76.20995-13.42599 116.29992-7.375 33.27997 5.295 61.82995 20.99 85.64993 47.08397 23.82998 26.09498 42.73997 58.42996 56.72996 97.00493 13.98999 38.57397 22.87998 80.93094 26.65998 127.0699 3.79 46.13797 1.71 91.70893-6.24 136.7079-7.94 45.00996-21.54998 86.79993-40.83997 125.3699-19.28998 38.57998-44.62996 69.77995-76.01994 93.59993-31.38997 23.82999-69.38995 37.81998-114.01991 41.97997-44.61997 4.16-96.05993-6.24-154.29989-31.19997zm-1823.64862-14.69998c-5.29-34.31998-9.64-71.39995-13.04999-111.24992-3.4-39.85997-6.24-80.95994-8.5-123.2999-2.27-42.34497-3.79-85.24294-4.54-128.6939-.75999-43.45198-1.13999-86.07294-1.13999-127.86391 0-41.78997.38-81.91994 1.14-120.38991.75-38.46997 1.89-74.30995 3.4-107.52092 2.27-9.41 8.13-15.63699 17.58998-18.68199 9.45-3.044 19.65999-3.736 30.62998-2.075 10.97 1.66 20.98998 5.12 30.06998 10.378 9.07 5.259 13.98999 11.48599 14.73999 18.68198-1.51 31.54998-2.64 62.40896-3.4 92.57593-.76 30.16698-.57 59.91796.57 89.25494 1.13 29.33597 3.4 58.81095 6.81 88.42493 3.4 29.61298 8.12999 59.64095 14.17998 90.08493 35.54998-34.31797 72.03995-55.90596 109.47992-64.76195 37.43997-8.856 72.79995-8.441 106.07992 1.245 33.27998 9.687 63.72995 26.56898 91.32993 50.64796 27.60998 24.07798 49.54996 51.61496 65.80995 82.61194 16.25999 31.00198 25.89998 63.65195 28.92998 97.97192 3.02 34.31998-3.22 66.41995-18.71999 96.30993-15.50998 29.88998-41.40996 55.62996-77.71994 77.21994-36.29997 21.58999-85.46993 35.42998-147.48989 41.50997-27.22998 2.77-50.86996 4.99-70.90994 6.65-20.03999 1.66-38.94997 1.8-56.72996.41-17.76999-1.38-35.91997-5.12-54.45996-11.21-18.52998-6.08999-39.89997-15.49998-64.09995-28.22997zm85.08994-154.42989c-9.83 32.09998-11.34 58.25996-4.53 78.45994 6.8 20.20999 18.89998 35.00998 36.29997 44.41997 17.39999 9.41 38.57997 14.11999 63.53995 14.11999 24.95998 0 50.66997-3.74 77.13995-11.21 26.47998-7.46999 52.37996-18.12998 77.71994-31.96997 25.33998-13.83999 47.08996-30.15997 65.23995-48.97996 13.60999-13.83999 20.79998-30.58998 21.55998-50.23996.75-19.64999-2.84-39.70997-10.78-60.18996-7.94998-20.47998-19.85998-40.13097-35.73996-58.95095-15.88-18.81999-33.65998-34.31798-53.31996-46.49597-19.66999-12.17699-40.65997-19.64998-62.96996-22.41698-22.31998-2.768-44.24996 1.799-65.80995 13.69899-21.54998 11.90099-41.78996 32.10397-60.69995 60.61095-18.90999 28.50398-34.78997 68.22395-47.64996 119.14391zm2380.9882 74.95995c49.15996 31.76997 93.21993 45.00996 132.1799 39.70997 38.94997-5.29 71.65995-21.92999 98.12993-49.91997 26.47998-27.97997 46.32996-63.71995 59.56995-107.20991 13.24-43.48997 18.90999-87.92994 17.01999-133.3119-1.9-45.38197-11.73-87.54994-29.49998-126.5029-17.77999-38.95298-44.81997-68.26196-81.11994-87.92694-20.41998-10.59-44.24997-10.022-71.47994 1.701-27.22998 11.72399-53.88996 30.63297-79.97994 56.72795-26.09998 26.09498-49.73997 57.29496-70.90995 93.60093-21.17999 36.30498-35.54997 73.55695-43.11997 111.75292-7.56 38.19897-6.62 75.06894 2.84 110.61892 9.45 35.54997 31.57998 65.79995 66.36995 90.75993zm-642.42952 0c49.16997 31.76997 93.21993 45.00996 132.1799 39.70997 38.94997-5.29 71.65995-21.92999 98.13993-49.91997 26.46998-27.97997 46.31997-63.71995 59.55996-107.20991 13.23999-43.48997 18.90998-87.92994 17.01998-133.3119-1.89-45.38197-11.71999-87.54994-29.49998-126.5029-17.76998-38.95298-44.80996-68.26196-81.11993-87.92694-20.41999-10.59-44.24997-10.022-71.47995 1.701-27.22998 11.72399-53.88996 30.63297-79.97994 56.72795-26.09998 26.09498-49.72996 57.29496-70.90995 93.60093-21.17998 36.30498-35.54997 73.55695-43.10996 111.75292-7.57 38.19897-6.62 75.06894 2.83 110.61892 9.45999 35.54997 31.57997 65.79995 66.36994 90.75993zm-1159.18912-39.69997c19.65998 30.24997 40.26997 47.64996 61.82995 52.18996 21.55999 4.53 42.53997.56 62.96995-11.92 20.41999-12.47998 39.70997-31.00997 57.85996-55.58995 18.14999-24.57998 33.65998-50.86996 46.51997-78.84994 12.84999-27.98998 22.30998-55.40696 28.35997-82.25794 6.05-26.85098 7.56-48.97496 4.54-66.37095-3.78-18.15299-6.81-34.41497-9.08-48.78596-2.27-14.371-4.72999-27.22898-7.36999-38.57497-2.65-11.345-5.68-21.74599-9.07999-31.19998-3.4-9.455-8.13-19.09799-14.17999-28.93098-30.25998-21.17898-58.42996-29.49898-84.52994-24.95998-26.08998 4.538-49.53996 17.39599-70.33994 38.57397-20.79999 21.17898-38.18997 48.40796-52.18996 81.68794-13.99 33.27997-24.19998 68.07295-30.62998 104.37892-6.43 36.30597-8.51 71.47995-6.24 105.50992 2.27 34.03998 9.45 62.39995 21.55999 85.09994z" fill="#282828" fill-rule="nonzero"/>
332
- <path d="M6892.93785 1141.07765l-2.93-847.33736c-.01-1.191.2-2.374.61-3.492 6.06-16.43098 13.87-28.16497 22.94999-35.51497 9.95999-8.065 20.24998-11.87199 30.67997-11.87199 10.37 0 19.54999 2.66 27.55998 7.845 8.86 5.732 14.1 12.94799 16.18 21.28698.16.625.25 1.264.29 1.908 2.26999 43.93997 4.15999 92.80393 5.67999 146.59289 1.51 53.75096 2.65 109.96191 3.4 168.63387.76 58.61996 1.52 118.75391 2.27 180.39986.76 61.66396 1.33 122.76091 1.71 183.28987.37 60.52995.56 119.1699.56 175.91986 0 56.66996.38 109.18992 1.13999 157.54988.01 1.06-.14 2.12-.46 3.13-4.6 14.73-12.99999 25.43998-24.96998 32.34998-11.7 6.75-23.64998 9.58-35.79997 8.68-12.44-.92-23.51999-5.71-33.19998-14.47-9.87-8.93-15.19999-21.69998-15.19999-38.57997l-.25-72.25994c-2.06 5.06-4.48 10.24999-7.27 15.58998-9.08998 17.41-21.52998 34.43998-37.35996 51.04997-16.08 16.88998-34.38998 29.74997-54.89996 38.58997-20.83999 8.98999-43.70997 12.12999-68.62995 9.25999-24.60998-2.82-50.33996-15.20999-76.94994-37.68997-7.62-5.23-15.41999-14.25-23.02998-27.34998-6.92-11.92-13.84-24.98998-20.75999-39.21997-6.83-14.02-13.64999-28.23998-20.46998-42.63997-6.53-13.77999-13.4-25.75998-20.65999-35.90997-6.62-9.27-13.48999-16.15999-20.76998-20.45999-4.67-2.76-9.71-2.7-15.12-.35-14.69998 24.18998-29.57997 47.66997-44.62996 70.42995-16.00999 24.20998-33.58997 44.87997-52.71996 62.05995-19.67998 17.66999-42.16997 30.11998-67.46995 37.34997-25.32998 7.23-54.88996 6.63-88.72993-2.23-33.15997-8.89999-60.03995-26.31997-80.66994-52.20995-20.07998-25.18998-35.06997-55.08996-44.90996-89.72994-9.7-34.10997-14.57-71.50994-14.57-112.21991 0-40.42697 4.43-80.66694 13.29-120.71491 8.84999-40.02697 21.73998-78.51394 38.67997-115.46191 17.08998-37.28898 37.69997-69.31695 61.77995-96.11793 24.43998-27.19398 52.23996-47.66197 83.36994-61.45595 31.65997-14.024 65.90995-17.899 102.88992-11.467 34.67997 6.452 63.26995 21.24799 85.85994 44.23397 21.94998 22.34798 40.20996 49.38096 54.70995 81.13794 14.28 31.25498 25.48998 65.78695 33.58998 103.60192 7.97 37.19097 15.17999 74.38195 21.62998 111.57192 6.42 37.00197 12.84 72.31194 19.25999 105.91192 6.27 32.82997 14.53999 61.05995 24.85998 84.65993 9.73 22.24999 21.89998 38.70997 36.83997 49.12997 13.55 9.45999 31.25998 10.32999 53.02996 3.92 30.31998-30.90998 54.72996-51.40997 73.05995-61.72996 12.16999-6.84 22.40998-10.8 30.62997-12.17 7.06-1.17999 12.97-.53999 17.76999 1.42 3.08 1.26 5.82 2.97 8.15 5.15zm171.26987-850.82935c-.41 1.118-.62 2.301-.62 3.492l3.4 983.65725c0 16.87999 5.34 29.64998 15.21 38.57997 9.67998 8.76 20.75997 13.55 33.19997 14.47 12.14999.9 24.09998-1.93 35.79997-8.68 11.95999-6.91 20.36998-17.61999 24.96998-32.34998.32-1.01.47-2.07.45-3.13-.75-48.35996-1.13-100.87992-1.13-157.54988 0-56.74995-.19-115.3899-.57-175.91986-.38-60.52896-.94-121.62591-1.7-183.28987-.76-61.64595-1.51-121.7799-2.27-180.39986-.76-58.67196-1.89-114.88291-3.41-168.63387-1.51-53.78896-3.4-102.65292-5.67999-146.5929-.03-.644-.13-1.283-.28-1.90799-2.09-8.339-7.32-15.55499-16.17999-21.28698-8.02-5.185-17.18998-7.845-27.55998-7.845-10.43999 0-20.71998 3.807-30.68997 11.872-9.08 7.34999-16.88999 19.08398-22.93999 35.51497zm1588.0788 521.3466c11.02-11.49199 21.36999-24.98198 31.06998-40.44997 14.03-22.37998 28.44998-44.75996 43.23997-67.13995 15.13999-22.89798 31.63998-43.26796 49.48996-61.12095 18.93999-18.93699 41.57997-30.45998 67.67995-34.53497 52.65996-9.574 97.29993-3.098 133.9899 18.84098 36.21997 21.64899 65.98995 52.69896 89.20993 93.24193 22.76999 39.74697 40.15997 85.84694 52.12996 138.3279 11.82 51.85696 20.20999 103.90492 25.15998 156.14788 4.96 52.18996 7.05 102.09992 6.29 149.72989-.77 47.60996-2.68 86.64993-5.73 117.1199-.11 1.16-.43 2.28-.92 3.32-10.40999 21.74999-24.99998 31.77998-42.49996 31.77998-17.48999 0-32.07998-10.03-42.48997-31.77997-.56-1.17-.88-2.44-.96-3.73-2.26-39.21997-5.65-82.00994-10.18-128.3799-4.51999-46.29997-10.53998-92.40994-18.06998-138.3399-7.51-45.82997-16.51999-89.21993-27.03998-130.1689-10.38999-40.41497-22.58998-74.53795-36.67997-102.34693-13.35999-26.36698-28.42998-45.00796-45.64997-55.55495-15.47998-9.474-32.93997-7.465-52.51996 4.536-22.56998 13.82998-47.26996 41.87496-74.56994 83.72993-28.12998 43.12897-59.40996 105.21592-93.90993 186.22486-.08.19-.17.37-.26.55-2.91 5.83-6.71 15.30999-11.45 28.42998-4.88999 13.53999-10.15998 28.77998-15.79998 45.70996-5.7 17.09-11.95999 35.12998-18.79998 54.11996-6.77 18.80999-12.98 36.85997-18.61999 54.16996-5.68 17.41999-10.79 32.93998-15.33999 46.57997-4.39 13.16999-7.33 23.04998-8.8 29.63997-.12.52-.28 1.04-.48 1.54-7.70999 19.27999-18.35998 29.19998-29.92997 31.59998-11.43 2.39-22.87998.41-34.30997-6.25-10.03-5.85-19.24999-13.76999-27.59998-23.78998-8.86-10.63999-13.93-20.08998-15.7-28.05998-.33999-1.54-.30999-3.14.08-4.66 6.74-26.20997 12.73-55.41995 17.97-87.60993 5.25-32.26997 9.36999-69.03995 12.36999-110.30991 3.01-41.34297 4.13-88.13794 3.38-140.3819-.75-52.31096-4.52-111.58291-11.29-177.81786-.19-1.829.13-3.674.92-5.332 10.19-21.30698 21.57999-32.05198 31.76998-34.36797 11.17999-2.541 22.52998.468 33.70997 10.12499 9.13 7.881 17.73999 19.41898 25.61998 34.76697 7.34 14.288 13.9 28.76898 19.68999 43.44197 5.82 14.74199 10.46999 28.51598 13.95999 41.31797.7 2.54 1.32 4.919 1.87 7.135zm-1260.43904 469.29265c-45.43997-18.81999-81.21994-43.59997-107.46992-74.15995-26.30998-30.62997-44.73997-64.20995-55.34996-100.72992-10.55-36.33997-14.07999-74.42994-10.56-114.28691 3.48-39.54797 12.79-78.12894 27.90999-115.73892 15.06999-37.49597 35.16997-72.86794 60.28995-106.11092 25.18998-33.31797 53.85996-61.78595 86.01994-85.41793 32.32997-23.76398 67.77995-41.29597 106.34992-52.59396 38.82997-11.373 79.02994-13.941 120.6799-7.653 35.51998 5.652 66.02996 22.35899 91.46994 50.21697 24.64998 26.99898 44.25996 60.42495 58.73995 100.33692 14.28 39.36297 23.36998 82.58094 27.22998 129.6629 3.85 46.99997 1.73 93.42293-6.36 139.2649-8.10999 45.98996-22.03998 88.68993-41.74996 128.1099-20.00999 40.01997-46.33997 72.36995-78.90994 97.08993-32.80998 24.89998-72.49995 39.61997-119.13991 43.96996-46.01997 4.29-99.08993-6.22-159.14988-31.95997zm642.41951 0c-45.43996-18.81999-81.21994-43.59997-107.46992-74.15995-26.30998-30.62997-44.73996-64.20995-55.33995-100.72992-10.55-36.33997-14.08-74.42994-10.57-114.28691 3.49-39.54797 12.79-78.12894 27.90998-115.73892 15.08-37.49597 35.17998-72.86794 60.29996-106.11092 25.17998-33.31797 53.85996-61.78595 86.00993-85.41793 32.33998-23.76398 67.78995-41.29597 106.35992-52.59396 38.82997-11.373 79.01994-13.941 120.66991-7.653 35.52997 5.652 66.03995 22.35899 91.47993 50.21697 24.64998 26.99898 44.25997 60.42495 58.73996 100.33692 14.27999 39.36297 23.36998 82.58094 27.22998 129.6629 3.85 46.99997 1.73 93.42293-6.36 139.2649-8.12 45.98996-22.03998 88.68993-41.74997 128.1099-20.00998 40.01997-46.33996 72.36995-78.90994 97.08993-32.80997 24.89998-72.49994 39.61997-119.1399 43.96996-46.01997 4.29-99.09993-6.22-159.15989-31.95997zM6968.3578 276.0543c-1.1-3.399-3.7-6.152-7.41999-8.557-4.84-3.135-10.41999-4.636-16.68999-4.636-6.2 0-12.17999 2.622-18.09998 7.417-6.5 5.259-11.73 13.762-16.13999 25.24198l3.4 981.84726c0 10.31 2.6 18.33999 8.62 23.77998 6.20999 5.62 13.27998 8.76 21.25998 9.36 8.26999.61 16.35998-1.47 24.32998-6.07 7.31-4.21 12.36999-10.78 15.39999-19.52998-.75-47.98997-1.12-100.04993-1.12-156.16989 0-56.70995-.19-115.30991-.56-175.79486-.38-60.48896-.95-121.54591-1.7-183.16987-.76-61.64195-1.52-121.7709-2.27-180.38686-.76-58.56596-1.89-114.67491-3.4-168.32887-1.5-53.15996-3.37-101.49493-5.61-145.0029zm173.57988 0c-1.1-3.399-3.69-6.152-7.41-8.557-4.84-3.135-10.42-4.636-16.68999-4.636-6.21 0-12.17999 2.622-18.09998 7.417-6.5 5.259-11.74 13.762-16.14 25.24198l3.39 981.84726c0 10.31 2.61 18.33999 8.63 23.77998 6.2 5.62 13.27999 8.76 21.25998 9.36 8.27.61 16.36-1.47 24.31999-6.07 7.31-4.21 12.36999-10.78 15.39998-19.52998-.74-47.98997-1.11-100.04993-1.11-156.16989 0-56.70995-.19-115.30991-.57-175.79486-.37-60.48896-.94-121.54591-1.7-183.16987-.75-61.64195-1.51-121.7709-2.27-180.38686-.75-58.56596-1.88999-114.67491-3.39999-168.32887-1.49-53.15996-3.36-101.49493-5.61-145.0029zm-1474.8589 611.05154c32.78998-28.61098 66.40996-46.87097 100.71993-54.98596 39.23997-9.282 76.29994-8.777 111.17992 1.375 34.64997 10.08599 66.35995 27.64098 95.10993 52.71196 28.56997 24.91798 51.24996 53.42596 68.07995 85.50393 16.88998 32.18698 26.89997 66.10695 30.03997 101.73693 3.2 36.27997-3.42 70.20994-19.80998 101.79992-16.27999 31.37997-43.34997 58.53995-81.47994 81.19994-37.32997 22.19998-87.83993 36.60997-151.58989 42.86996-27.29998 2.78-50.99996 5-71.08994 6.66-20.60999 1.71-40.05997 1.84-58.32996.42-18.53999-1.44-37.47997-5.33-56.80996-11.68-18.96998-6.22999-40.84997-15.83998-65.62995-28.87997-2.81-1.47-4.75-4.19-5.23-7.32-5.32999-34.52997-9.70999-71.83994-13.12998-111.92991-3.41-39.95997-6.26-81.15994-8.53-123.6199-2.28-42.45897-3.79-85.47694-4.55-129.0499-.76-43.51098-1.14-86.18994-1.14-128.03791 0-41.85797.38-82.05394 1.14-120.58691.76-38.56197 1.89-74.48795 3.41-107.77892.03-.637.12-1.27.27-1.889 3.13-12.99999 11.18-21.65098 24.23999-25.85598 10.86999-3.498 22.58998-4.353 35.19997-2.445 12.24999 1.856 23.43998 5.739 33.57997 11.614 12.52 7.25499 18.62999 16.35998 19.67999 26.28797.05.506.07 1.016.04 1.524-1.51 31.47298-2.64 62.25596-3.39 92.34793-.75 29.95198-.57 59.49096.56 88.61794 1.12 29.08597 3.37 58.30895 6.75 87.66993 2.72 23.63898 6.28 47.54596 10.70999 71.71995zm992.55926 378.53171c-5.84-3.89-11.48-11.03-17.31999-21.08998-6.7-11.53-13.38999-24.16999-20.07998-37.92998-6.79-13.95998-13.58-28.10997-20.37999-42.44996-7.08-14.97-14.57999-27.94998-22.44998-38.97997-8.51-11.9-17.51999-20.51999-26.87998-26.04998-11.32-6.69-23.67998-6.83-37.05997.37-1.57.85-2.88 2.1-3.81 3.62-15.05999 24.84997-30.29998 48.93996-45.73996 72.27994-15 22.68998-31.45998 42.10997-49.38997 58.20995-17.37998 15.61-37.24997 26.60998-59.59995 32.99998-22.31999 6.37-48.34997 5.46-78.10994-2.33-28.79998-7.73-52.21996-22.82998-70.15995-45.34996-18.49999-23.20999-32.24998-50.79997-41.31997-82.71994-9.21-32.44998-13.79999-68.03995-13.79999-106.75992 0-38.98097 4.27-77.78094 12.81-116.39591 8.54998-38.63497 20.98998-75.78495 37.33996-111.44792 16.19-35.32397 35.65998-65.69495 58.47996-91.08393 22.45998-24.99598 47.97996-43.85797 76.59994-56.53696 28.08998-12.44899 58.50996-15.75999 91.23993-10.069 30.24998 5.628 55.35996 18.44 75.12995 38.56698 20.39998 20.76598 37.30997 45.92097 50.78996 75.43094 13.70999 30.00998 24.43998 63.17396 32.21997 99.48293 7.92 36.93297 15.08 73.86594 21.48999 110.79991 6.43 37.12298 12.86999 72.53295 19.30998 106.24292 6.59 34.48998 15.34 64.12996 26.18998 88.92994 11.45 26.16998 26.13998 45.24996 43.71997 57.51995 18.48999 12.9 42.71997 15.33 72.81994 5.87 1.58-.49 3.01-1.37 4.16-2.55 29.34998-30.08998 52.73996-50.19996 70.35995-60.09995 8.15-4.59 15.17999-7.72 21.11998-9.24 4.06-1.05 7.35-1.48 9.9-.44 4.83 1.98 5.26 7.53 4.6 15.45-1.04 12.47998-5.67 26.31997-13.65 41.57996-8.3 15.86999-19.68998 31.36998-34.11997 46.51997-14.17 14.87998-30.26998 26.22998-48.33997 34.01997-17.73998 7.65-37.21997 10.19-58.42995 7.76-21.40999-2.46-43.55997-13.78-66.71995-33.42998l-.92-.7zm2465.44814 12.35c2.91-29.76999 4.72-67.65996 5.46-113.66992.75-46.92997-1.32-96.09993-6.2-147.5199-4.87-51.38895-13.12999-102.58491-24.74998-153.59388-11.49-50.38496-28.12998-94.67092-49.98996-132.8309-21.39999-37.36197-48.73997-66.06595-82.10994-86.01693-32.88998-19.65999-72.95995-24.90898-120.38991-16.28799-22.05998 3.447-41.01997 13.102-56.87996 28.95798-16.93999 16.93999-32.57997 36.27997-46.93996 58.00796-14.71 22.24498-29.03998 44.49096-42.98997 66.73695-14.56999 23.23798-30.54998 42.31396-47.87996 57.28095-2.96 2.557-7.14 3.153-10.7 1.525-3.56-1.628-5.84-5.181-5.84-9.093 0-3.38099-1.70999-10.60698-4.74999-21.76198-3.32-12.15799-7.74-25.23598-13.26999-39.23597-5.55-14.06799-11.84999-27.95098-18.87998-41.64996-6.49-12.637-13.39-22.27799-20.89999-28.76698-5.47-4.718-10.73999-7-16.20999-5.759-2.45.558-4.67 2.587-7.11999 5.432-3.3 3.817-6.54 9.02999-9.82 15.58699 6.66 65.73995 10.36 124.6399 11.11 176.70886.76 52.89196-.39 100.26493-3.43 142.1199-3.05 41.92996-7.25 79.28994-12.57999 112.06991-5.18 31.79998-11.08 60.72995-17.68999 86.79993 1.68 5.13 5.45 10.9 10.96 17.51 6.77 8.11999 14.18999 14.57998 22.31998 19.31998 6.72 3.93 13.41999 5.36 20.14998 3.96 6.46-1.35 10.86-8.16 15.16-18.77 1.62-7.01999 4.65999-17.27998 9.15999-30.76997 4.53-13.58999 9.62999-29.07998 15.29998-46.44996 5.7-17.48999 11.97-35.73998 18.80999-54.74996 6.78-18.82999 12.99999-36.71997 18.63999-53.65996 5.71-17.10999 11.02999-32.49998 15.96998-46.18997 5.02-13.88999 9.11-23.97298 12.22-30.26797 35.04997-82.24394 66.88994-145.2539 95.45992-189.06286 29.42998-45.12797 56.52996-74.94494 80.85994-89.85593 27.31998-16.744 51.82996-17.75999 73.41995-4.541 19.83998 12.144 37.66997 33.21197 53.04996 63.57295 14.64998 28.91898 27.40998 64.38095 38.20997 106.40992 10.65999 41.49597 19.79998 85.46594 27.40998 131.9149 7.6 46.34997 13.67999 92.88993 18.23998 139.6299 4.47 45.84996 7.84 88.22993 10.12 127.1199 6.08999 12 13.56998 18.70999 23.59998 18.70999 10.08999 0 17.58998-6.77 23.68998-18.86999zm-1725.4887-15.54c-42.25997-17.47998-75.64994-40.33997-100.04992-68.74995-24.36999-28.36997-41.48997-59.44995-51.30996-93.27993-9.87-33.99997-13.14-69.64994-9.85-106.94891 3.31-37.60098 12.17-74.27895 26.53998-110.03592 14.43-35.87297 33.65998-69.70795 57.69996-101.51292 23.97998-31.72998 51.27996-58.85496 81.89994-81.36094 30.43997-22.37399 63.81995-38.87897 100.12992-49.51597 36.05997-10.56199 73.38995-12.91099 111.98992-7.084 30.95997 4.925 57.54995 19.607 79.76994 43.93898 22.99998 25.18998 41.19997 56.43395 54.70996 93.67193 13.70999 37.78597 22.38998 79.28094 26.09998 124.4769 3.71 45.27597 1.67 89.99593-6.12 134.1609-7.77 44.01997-21.07998 84.89994-39.94997 122.6299-18.55999 37.11998-42.89997 67.17996-73.10994 90.10994-29.96998 22.74998-66.29995 36.00997-108.90992 39.98997-43.22997 4.03-93.00993-6.26-149.42989-30.43998l-.11-.05zm642.41952 0c-42.24997-17.47998-75.63995-40.33997-100.04993-68.74995-24.35998-28.36997-41.47997-59.44995-51.29996-93.27993-9.87-33.99997-13.14999-69.64994-9.86-106.94891 3.32-37.60098 12.17-74.27895 26.54999-110.03592 14.41999-35.87297 33.65997-69.70795 57.69995-101.51292 23.97999-31.72998 51.27997-58.85496 81.89994-81.36094 30.43998-22.37399 63.81995-38.87897 100.12993-49.51597 36.05997-10.56199 73.38994-12.91099 111.98991-7.084 30.94998 4.925 57.54996 19.607 79.76994 43.93898 22.99999 25.18998 41.19997 56.43395 54.70996 93.67193 13.7 37.78597 22.38998 79.28094 26.08998 124.4769 3.71 45.27597 1.68 89.99593-6.12 134.1609-7.76999 44.01997-21.06998 84.89994-39.93996 122.6299-18.55999 37.11998-42.90997 67.17996-73.10995 90.10994-29.96998 22.74998-66.29995 36.00997-108.90992 39.98997-43.22996 4.03-93.00993-6.26-149.42988-30.43998l-.12-.05zM5632.4288 546.7151c-.72-4.174-4.34-7.351-9.72999-10.47199-8.01-4.642-16.86999-7.678-26.54998-9.144-9.33-1.413-18.01998-.883-26.06998 1.707-5.56 1.792-9.16 5.322-10.71 10.675-1.47999 32.83197-2.59999 68.23495-3.33999 106.20592-.76 38.40597-1.14 78.47094-1.14 120.1929 0 41.73398.38 84.29694 1.14 127.68891.75 43.32997 2.26 86.10694 4.52 128.3289 2.26 42.23997 5.09 83.22994 8.49 122.97991 3.21999 37.68997 7.27999 72.88995 12.20998 105.58992 21.78999 11.26 41.14997 19.67999 58.09996 25.24998 17.72999 5.83 35.09997 9.42 52.10996 10.74 17.26999 1.35 35.64997 1.2 55.11996-.41 19.99998-1.66 43.56997-3.87 70.75994-6.63 60.26996-5.91 108.08992-19.17999 143.3599-40.15997 34.48997-20.49998 59.21995-44.82997 73.94994-73.21994 14.61999-28.18998 20.48999-58.46996 17.63999-90.82994-2.91-32.99997-12.19-64.39995-27.82998-94.20593-15.68999-29.91597-36.86997-56.48395-63.51995-79.72193-26.46998-23.08499-55.63996-39.29498-87.54994-48.58197-31.67997-9.221-65.34995-9.546-100.98992-1.115-35.87997 8.488-70.76995 29.33298-104.83992 62.22396-2.63 2.541-6.44 3.442-9.93 2.349-3.49-1.093-6.10999-4.005-6.81999-7.594-6.11-30.71598-10.88-61.01395-14.30999-90.89293-3.43-29.86598-5.72-59.59296-6.86-89.17993-1.15-29.54598-1.34-59.50996-.58-89.89194.75-29.94797 1.88-60.57595 3.37-91.88193zm15.14 553.17259c13.18998-52.14997 29.57997-92.78993 48.95996-122.00191 19.95998-30.08698 41.44996-51.27696 64.19995-63.83695 23.53998-12.994 47.49996-17.891 71.86994-14.869 23.73999 2.944 46.07997 10.883 66.99995 23.83899 20.53999 12.71799 39.10997 28.89298 55.69996 48.54796 16.63999 19.71899 29.09998 40.32097 37.41997 61.78096 8.47 21.83998 12.25 43.24996 11.45 64.19995-.86 22.23998-9.01 41.18997-24.34999 56.78995-18.82998 19.51999-41.36997 36.46998-67.63995 50.81997-26.01998 14.20999-52.61996 25.13998-79.79994 32.80997-27.39998 7.74-54.02996 11.59-79.85994 11.59-26.84998 0-49.58996-5.2-68.29994-15.32-19.60999-10.60999-33.33998-27.23998-41.01997-50.02996-7.32-21.70998-6.15-49.83996 4.37-84.31993zm19.33998 5.12c12.51999-49.58997 27.86998-88.30994 46.28996-116.06692 17.85999-26.92498 36.82998-46.14197 57.19996-57.38296 19.56999-10.80799 39.46997-15.04399 59.73996-12.52999 20.87998 2.59 40.51996 9.597 58.92995 20.99499 18.78999 11.63699 35.76997 26.45898 50.94996 44.44396 15.12 17.92099 26.48998 36.61097 34.04998 56.11096 7.42 19.12999 10.81999 37.84997 10.10999 56.19996-.65 17.04998-6.87 31.58997-18.68999 43.59996-17.54998 18.2-38.49997 33.89998-62.89995 47.22997-24.65998 13.46999-49.86996 23.83998-75.63994 31.10998-25.53998 7.20999-50.34996 10.83999-74.42995 10.83999-23.07998 0-42.69996-4.21-58.77995-12.91-15.18-8.20999-25.64998-21.19998-31.58998-38.81996-6.28-18.63999-4.44-42.72997 4.63-72.33995l.13-.48zm1723.4387 80.90993c51.62996 33.36998 98.03992 46.77997 138.9499 41.21997 41.29996-5.61 75.97994-23.27998 104.04991-52.95996 27.45998-29.02998 48.13997-66.05995 61.86996-111.16992 13.55999-44.57996 19.37998-90.12293 17.43998-136.6379-1.95-46.72396-12.08999-90.13293-30.38997-130.2379-18.71999-41.02096-47.21997-71.85994-85.45994-92.56893-23.01998-11.93999-49.70996-11.81599-80.18994 1.31-28.27998 12.173-56.00995 31.74398-83.09993 58.84096-26.66998 26.66498-50.83997 58.53395-72.47995 95.63293-21.75998 37.30897-36.50997 75.59694-44.27997 114.84991-7.87999 39.75097-6.86 78.13094 2.98 115.13091 10.02 37.67997 33.31998 69.85995 70.19995 96.31993l.41.27zm642.41951 0c51.62996 33.36998 98.04993 46.77997 138.9499 41.21997 41.30997-5.61 75.98994-23.27998 104.05992-52.95996 27.45998-29.02998 48.12996-66.05995 61.86995-111.16992 13.56-44.57996 19.37999-90.12293 17.43999-136.6379-1.95-46.72396-12.09-90.13293-30.38998-130.2379-18.71998-41.02096-47.22996-71.85994-85.45993-92.56893-23.01998-11.93999-49.70996-11.81599-80.18994 1.31-28.27998 12.173-56.00996 31.74398-83.10994 58.84096-26.65998 26.66498-50.82996 58.53395-72.46994 95.63293-21.76999 37.30897-36.51998 75.59694-44.28997 114.84991-7.87 39.75097-6.86 78.13094 2.98 115.13091 10.02999 37.67997 33.32997 69.85995 70.20994 96.31993l.4.27zm11.07-16.65999c46.60996 30.07998 88.23993 43.08997 125.1899 38.06997 36.59997-4.98 67.34995-20.58998 92.21993-46.88996 25.47998-26.93998 44.51997-61.38995 57.25996-103.24992 12.90999-42.40997 18.43998-85.73594 16.58999-129.9859-1.83-44.03997-11.35-84.96594-28.59998-122.76691-16.82999-36.88497-42.40997-64.66495-76.62995-83.20194-17.97998-9.323-38.93997-8.313-62.91995 2.009-26.17998 11.274-51.76996 29.52098-76.85994 54.61396-25.52998 25.52498-48.62996 56.05596-69.34995 91.56793-20.58998 35.30297-34.57997 71.51695-41.93997 108.65792-7.24999 36.63597-6.38 72.00594 2.69 106.10592 8.87 33.34997 29.74998 61.62995 62.34996 85.06993zm-642.42952 0c46.60996 30.07998 88.24993 43.08997 125.1899 38.06997 36.59998-4.98 67.34995-20.58998 92.21994-46.88996 25.48998-26.93998 44.51996-61.38995 57.25995-103.24992 12.91-42.40997 18.43999-85.73594 16.59999-129.9859-1.84-44.03997-11.36-84.96594-28.60998-122.76691-16.82999-36.88497-42.39997-64.66495-76.61994-83.20194-17.97999-9.323-38.94997-8.313-62.91995 2.009-26.18998 11.274-51.77996 29.52098-76.86995 54.61396-25.52998 25.52498-48.62996 56.05596-69.33994 91.56793-20.59999 35.30297-34.58998 71.51695-41.94997 108.65792-7.25 36.63597-6.37 72.00594 2.7 106.10592 8.86999 33.34997 29.73997 61.62995 62.33995 85.06993zm-1173.21912-25.98998c21.51999 33.09998 44.56997 51.54996 68.15995 56.51996 24.03999 5.06 47.46997.75 70.23995-13.16999 21.39998-13.06999 41.66997-32.41998 60.68995-58.17996 18.56-25.12998 34.41998-52.00996 47.55997-80.61994 13.16999-28.64997 22.83998-56.73495 29.03998-84.22993 6.4-28.42898 7.83-51.86396 4.63-70.28295l-.06-.326c-3.75-17.97399-6.74-34.07597-8.99-48.30596-2.31-14.636-4.82-27.73198-7.52-39.28697-2.74-11.752-5.86999-22.52199-9.39999-32.31498-3.62-10.059-8.64-20.32498-15.06999-30.78498-.72-1.164-1.67-2.168-2.79-2.952-32.86997-23.00798-63.61995-31.54997-91.96992-26.61997-28.08998 4.885-53.36996 18.62598-75.75995 41.41997-21.60998 21.99998-39.73997 50.24796-54.27996 84.81893-14.26999 33.96098-24.69998 69.46395-31.25997 106.51092-6.57 37.13497-8.69 73.11395-6.37 107.92392 2.38 35.65997 10.03 65.34995 22.70999 89.12993l.44.75zm223.31984-388.7207c-26.98998-18.50399-52.01996-26.18998-75.36995-22.12799-24.10998 4.192-45.70996 16.16699-64.91995 35.72898-19.99998 20.35698-36.65997 46.56796-50.10996 78.55694-13.70999 32.59997-23.70998 66.68295-29.99998 102.24692-6.29 35.47697-8.33 69.84595-6.11 103.10592 2.15 32.21998 8.8 59.13996 20.2 80.67994 17.73998 27.17998 35.82996 43.38997 55.26995 47.47996 19.06999 4.02 37.61997.38 55.68996-10.65999 19.44998-11.87999 37.74997-29.59997 55.02996-52.99996 17.74998-24.02998 32.90997-49.72996 45.47996-77.08994 12.55-27.30998 21.78999-54.06896 27.68998-80.27594 5.69-25.21598 7.29-45.98996 4.46-62.34495-3.79-18.24499-6.83-34.59698-9.12-49.05396-2.22-14.106-4.63-26.72698-7.22999-37.86298-2.55-10.93899-5.47-20.96898-8.75-30.08497-2.98-8.28-7.05999-16.709-12.20998-25.29798z" fill="#fff"/>
333
- </g>
334
- </svg>
335
- </span>
336
- <br />
337
-
338
- <span style="width: 34px; top: -5px;"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-facebook fa-w-16 fa-2x"><path fill="#475e8f" d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z" class=""></path></svg></span>
339
-
340
- <?php echo $plus_svg; ?>
341
-
342
- <span><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-instagram fa-w-14 fa-2x"><path fill="#e15073" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z" class=""></path></svg></span>
343
-
344
- <?php echo $plus_svg; ?>
345
-
346
- <span style="top: -4px;"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-twitter fa-w-16 fa-2x"><path fill="#1a92dc" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" class=""></path></svg></span>
347
-
348
- <?php echo $plus_svg; ?>
349
-
350
- <span style="width: 35px; top: -5px;"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="youtube" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-youtube fa-w-18 fa-2x"><path fill="#f5413d" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" class=""></path></svg></span>
351
- </div>
352
-
353
- <h1>Combine all your social media channels into one single wall.</h1>
354
- <h2>Maximize your social content and get more followers.</h2>
355
-
356
- <div style="text-align: center;">
357
- <a href="https://smashballoon.com/social-wall/?utm_source=plugin-pro&utm_campaign=sbi&utm_medium=sw-cta-1" target="_blank" class="cta button button-primary">Get the Social Wall plugin</a>
358
- </div>
359
-
360
- <div class="sbi-sw-info">
361
- <div class="sbi-sw-features">
362
- <p><span>A dash of Instagram</span>Add posts from your profile, public hashtag posts, or posts you're tagged in.</p>
363
- <p><span>A sprinkle of Facebook</span>Include posts from your page or group timeline, or from your photos, videos, albums, and events pages.</p>
364
- <p><span>A spoonful of Twitter</span>Add Tweets from any Twitter account, hashtag Tweets, mentions, and more.</p>
365
- <p><span>And a dollop of YouTube</span>Embed videos from any public YouTube channel, playlists, searches, and more.</p>
366
- <p><span>All in the same feed</span>Combine feeds from all of our Smash Balloon Pro plugins into one single wall feed, and show off all your social media content in one place.</p>
367
- </div>
368
- <a class="sbi-sw-screenshot" href="https://smashballoon.com/social-wall/demo?utm_source=plugin-pro&utm_campaign=sbi&utm_medium=sw-demo" target="_blank">
369
- <span class="cta">View Demo</span>
370
-
371
- <img src="<?php echo SBI_PLUGIN_URL . 'img/sw-screenshot.png'; ?>" alt="Smash Balloon Social Wall plugin screenshot showing Facebook, Instagram, Twitter, and YouTube posts combined into one wall.">
372
- </a>
373
- </div>
374
-
375
- <div class="sbi-sw-footer-cta">
376
- <a href="https://smashballoon.com/social-wall/?utm_source=plugin-pro&utm_campaign=sbi&utm_medium=sw-cta-2" target="_blank"><span>🚀</span>Get Social Wall and Increase Engagement >></a>
377
- </div>
378
-
379
- </div>
380
-
381
- <?php
382
- }
383
-
384
- function sb_instagram_settings_page() {
385
-
386
- //Hidden fields
387
- $sb_instagram_settings_hidden_field = 'sb_instagram_settings_hidden_field';
388
- $sb_instagram_configure_hidden_field = 'sb_instagram_configure_hidden_field';
389
- $sb_instagram_customize_hidden_field = 'sb_instagram_customize_hidden_field';
390
-
391
- //Declare defaults
392
- $sb_instagram_settings_defaults = array(
393
- 'sb_instagram_at' => '',
394
- 'sb_instagram_user_id' => '',
395
- 'sb_instagram_preserve_settings' => '',
396
- 'sb_instagram_cache_time' => 1,
397
- 'sb_instagram_cache_time_unit' => 'hours',
398
- 'sbi_caching_type' => 'page',
399
- 'sbi_cache_cron_interval' => '12hours',
400
- 'sbi_cache_cron_time' => '1',
401
- 'sbi_cache_cron_am_pm' => 'am',
402
- 'sb_instagram_width' => '100',
403
- 'sb_instagram_width_unit' => '%',
404
- 'sb_instagram_feed_width_resp' => false,
405
- 'sb_instagram_height' => '',
406
- 'sb_instagram_num' => '20',
407
- 'sb_instagram_height_unit' => '',
408
- 'sb_instagram_cols' => '4',
409
- 'sb_instagram_disable_mobile' => false,
410
- 'sb_instagram_image_padding' => '5',
411
- 'sb_instagram_image_padding_unit' => 'px',
412
- 'sb_instagram_sort' => 'none',
413
- 'sb_instagram_background' => '',
414
- 'sb_instagram_show_btn' => true,
415
- 'sb_instagram_btn_background' => '',
416
- 'sb_instagram_btn_text_color' => '',
417
- 'sb_instagram_btn_text' => __( 'Load More...', 'instagram-feed' ),
418
- 'sb_instagram_image_res' => 'auto',
419
- //Header
420
- 'sb_instagram_show_header' => true,
421
- 'sb_instagram_header_size' => 'small',
422
- 'sb_instagram_header_color' => '',
423
- 'sb_instagram_custom_bio' => '',
424
- 'sb_instagram_custom_avatar' => '',
425
- //Follow button
426
- 'sb_instagram_show_follow_btn' => true,
427
- 'sb_instagram_folow_btn_background' => '',
428
- 'sb_instagram_follow_btn_text_color' => '',
429
- 'sb_instagram_follow_btn_text' => __( 'Follow on Instagram', 'instagram-feed' ),
430
- //Misc
431
- 'sb_instagram_custom_css' => '',
432
- 'sb_instagram_custom_js' => '',
433
- 'sb_instagram_cron' => 'no',
434
- 'sb_instagram_backup' => true,
435
- 'sb_ajax_initial' => false,
436
- 'enqueue_css_in_shortcode' => false,
437
- 'sb_instagram_ajax_theme' => false,
438
- 'gdpr' => 'auto',
439
- 'sb_instagram_disable_resize' => false,
440
- 'sb_instagram_favor_local' => true,
441
- 'sb_instagram_minnum' => 0,
442
- 'disable_js_image_loading' => false,
443
- 'enqueue_js_in_head' => false,
444
- 'sb_instagram_disable_mob_swipe' => false,
445
- 'custom_template' => false,
446
- 'disable_admin_notice' => false,
447
- 'enable_email_report' => 'on',
448
- 'email_notification' => 'monday',
449
- 'email_notification_addresses' => get_option( 'admin_email' ),
450
- );
451
- //Save defaults in an array
452
- $options = wp_parse_args(get_option('sb_instagram_settings'), $sb_instagram_settings_defaults);
453
- update_option( 'sb_instagram_settings', $options );
454
-
455
- //Set the page variables
456
- $sb_instagram_at = $options[ 'sb_instagram_at' ];
457
- $sb_instagram_user_id = $options[ 'sb_instagram_user_id' ];
458
- $sb_instagram_preserve_settings = $options[ 'sb_instagram_preserve_settings' ];
459
- $sb_instagram_ajax_theme = $options[ 'sb_instagram_ajax_theme' ];
460
- $gdpr = $options[ 'gdpr' ];
461
- $enqueue_js_in_head = $options[ 'enqueue_js_in_head' ];
462
- $disable_js_image_loading = $options[ 'disable_js_image_loading' ];
463
- $sb_instagram_disable_resize = $options[ 'sb_instagram_disable_resize' ];
464
- $sb_instagram_favor_local = $options[ 'sb_instagram_favor_local' ];
465
- $sb_instagram_minnum = $options[ 'sb_instagram_minnum' ];
466
-
467
- $sb_instagram_cache_time = $options[ 'sb_instagram_cache_time' ];
468
- $sb_instagram_cache_time_unit = $options[ 'sb_instagram_cache_time_unit' ];
469
-
470
- $sbi_caching_type = $options[ 'sbi_caching_type' ];
471
- $sbi_cache_cron_interval = $options[ 'sbi_cache_cron_interval' ];
472
- $sbi_cache_cron_time = $options[ 'sbi_cache_cron_time' ];
473
- $sbi_cache_cron_am_pm = $options[ 'sbi_cache_cron_am_pm' ];
474
-
475
- $sb_instagram_width = $options[ 'sb_instagram_width' ];
476
- $sb_instagram_width_unit = $options[ 'sb_instagram_width_unit' ];
477
- $sb_instagram_feed_width_resp = $options[ 'sb_instagram_feed_width_resp' ];
478
- $sb_instagram_height = $options[ 'sb_instagram_height' ];
479
- $sb_instagram_height_unit = $options[ 'sb_instagram_height_unit' ];
480
- $sb_instagram_num = $options[ 'sb_instagram_num' ];
481
- $sb_instagram_cols = $options[ 'sb_instagram_cols' ];
482
- $sb_instagram_disable_mobile = $options[ 'sb_instagram_disable_mobile' ];
483
- $sb_instagram_image_padding = $options[ 'sb_instagram_image_padding' ];
484
- $sb_instagram_image_padding_unit = $options[ 'sb_instagram_image_padding_unit' ];
485
- $sb_instagram_sort = $options[ 'sb_instagram_sort' ];
486
- $sb_instagram_background = $options[ 'sb_instagram_background' ];
487
- $sb_instagram_show_btn = $options[ 'sb_instagram_show_btn' ];
488
- $sb_instagram_btn_background = $options[ 'sb_instagram_btn_background' ];
489
- $sb_instagram_btn_text_color = $options[ 'sb_instagram_btn_text_color' ];
490
- $sb_instagram_btn_text = $options[ 'sb_instagram_btn_text' ];
491
- $sb_instagram_image_res = $options[ 'sb_instagram_image_res' ];
492
- //Header
493
- $sb_instagram_show_header = $options[ 'sb_instagram_show_header' ];
494
- $sb_instagram_header_size = $options[ 'sb_instagram_header_size' ];
495
- $sb_instagram_show_bio = isset( $options[ 'sb_instagram_show_bio' ] ) ? $options[ 'sb_instagram_show_bio' ] : true;
496
- $sb_instagram_custom_bio = $options[ 'sb_instagram_custom_bio' ];
497
- $sb_instagram_custom_avatar = $options[ 'sb_instagram_custom_avatar' ];
498
- $sb_instagram_header_color = $options[ 'sb_instagram_header_color' ];
499
- //Follow button
500
- $sb_instagram_show_follow_btn = $options[ 'sb_instagram_show_follow_btn' ];
501
- $sb_instagram_folow_btn_background = $options[ 'sb_instagram_folow_btn_background' ];
502
- $sb_instagram_follow_btn_text_color = $options[ 'sb_instagram_follow_btn_text_color' ];
503
- $sb_instagram_follow_btn_text = $options[ 'sb_instagram_follow_btn_text' ];
504
- //Misc
505
- $sb_instagram_custom_css = $options[ 'sb_instagram_custom_css' ];
506
- $sb_instagram_custom_js = $options[ 'sb_instagram_custom_js' ];
507
- $sb_instagram_cron = $options[ 'sb_instagram_cron' ];
508
- $sb_instagram_backup = $options[ 'sb_instagram_backup' ];
509
- $sb_ajax_initial = $options[ 'sb_ajax_initial' ];
510
- $enqueue_css_in_shortcode = $options[ 'enqueue_css_in_shortcode' ];
511
- $sb_instagram_custom_template = $options[ 'custom_template' ];
512
- $sb_instagram_disable_admin_notice = $options[ 'disable_admin_notice' ];
513
- $sb_instagram_enable_email_report = $options[ 'enable_email_report' ];
514
- $sb_instagram_email_notification = $options[ 'email_notification' ];
515
- $sb_instagram_email_notification_addresses = $options[ 'email_notification_addresses' ];
516
- //Check nonce before saving data
517
- if ( ! isset( $_POST['sb_instagram_settings_nonce'] ) || ! wp_verify_nonce( $_POST['sb_instagram_settings_nonce'], 'sb_instagram_saving_settings' ) ) {
518
- //Nonce did not verify
519
- } else {
520
- // See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
521
- if( isset($_POST[ $sb_instagram_settings_hidden_field ]) && $_POST[ $sb_instagram_settings_hidden_field ] == 'Y' ) {
522
-
523
- if( isset($_POST[ $sb_instagram_configure_hidden_field ]) && $_POST[ $sb_instagram_configure_hidden_field ] == 'Y' ) {
524
-
525
- $sb_instagram_at = sanitize_text_field( $_POST[ 'sb_instagram_at' ] );
526
- $sb_instagram_user_id = array();
527
- if ( isset( $_POST[ 'sb_instagram_user_id' ] )) {
528
- if ( is_array( $_POST[ 'sb_instagram_user_id' ] ) ) {
529
- foreach( $_POST[ 'sb_instagram_user_id' ] as $user_id ) {
530
- $sb_instagram_user_id[] = sanitize_text_field( $user_id );
531
- }
532
- } else {
533
- $sb_instagram_user_id[] = sanitize_text_field( $_POST[ 'sb_instagram_user_id' ] );
534
- }
535
- }
536
- isset($_POST[ 'sb_instagram_preserve_settings' ]) ? $sb_instagram_preserve_settings = sanitize_text_field( $_POST[ 'sb_instagram_preserve_settings' ] ) : $sb_instagram_preserve_settings = '';
537
- isset($_POST[ 'sb_instagram_cache_time' ]) ? $sb_instagram_cache_time = sanitize_text_field( $_POST[ 'sb_instagram_cache_time' ] ) : $sb_instagram_cache_time = '';
538
- isset($_POST[ 'sb_instagram_cache_time_unit' ]) ? $sb_instagram_cache_time_unit = sanitize_text_field( $_POST[ 'sb_instagram_cache_time_unit' ] ) : $sb_instagram_cache_time_unit = '';
539
-
540
- isset($_POST[ 'sbi_caching_type' ]) ? $sbi_caching_type = sanitize_text_field( $_POST[ 'sbi_caching_type' ] ) : $sbi_caching_type = '';
541
- isset($_POST[ 'sbi_cache_cron_interval' ]) ? $sbi_cache_cron_interval = sanitize_text_field( $_POST[ 'sbi_cache_cron_interval' ] ) : $sbi_cache_cron_interval = '';
542
- isset($_POST[ 'sbi_cache_cron_time' ]) ? $sbi_cache_cron_time = sanitize_text_field( $_POST[ 'sbi_cache_cron_time' ] ) : $sbi_cache_cron_time = '';
543
- isset($_POST[ 'sbi_cache_cron_am_pm' ]) ? $sbi_cache_cron_am_pm = sanitize_text_field( $_POST[ 'sbi_cache_cron_am_pm' ] ) : $sbi_cache_cron_am_pm = '';
544
-
545
- $options[ 'sb_instagram_at' ] = $sb_instagram_at;
546
- $options[ 'sb_instagram_user_id' ] = $sb_instagram_user_id;
547
- $options[ 'sb_instagram_preserve_settings' ] = $sb_instagram_preserve_settings;
548
-
549
- $options[ 'sb_instagram_cache_time' ] = $sb_instagram_cache_time;
550
- $options[ 'sb_instagram_cache_time_unit' ] = $sb_instagram_cache_time_unit;
551
-
552
- $options[ 'sbi_caching_type' ] = $sbi_caching_type;
553
- $options[ 'sbi_cache_cron_interval' ] = $sbi_cache_cron_interval;
554
- $options[ 'sbi_cache_cron_time' ] = $sbi_cache_cron_time;
555
- $options[ 'sbi_cache_cron_am_pm' ] = $sbi_cache_cron_am_pm;
556
-
557
-
558
- //Delete all SBI transients
559
- global $wpdb;
560
- $table_name = $wpdb->prefix . "options";
561
- $wpdb->query( "
562
- DELETE
563
- FROM $table_name
564
- WHERE `option_name` LIKE ('%\_transient\_sbi\_%')
565
- " );
566
- $wpdb->query( "
567
- DELETE
568
- FROM $table_name
569
- WHERE `option_name` LIKE ('%\_transient\_timeout\_sbi\_%')
570
- " );
571
- $wpdb->query( "
572
- DELETE
573
- FROM $table_name
574
- WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
575
- " );
576
- $wpdb->query( "
577
- DELETE
578
- FROM $table_name
579
- WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
580
- " );
581
-
582
- if ( $sbi_caching_type === 'background' ) {
583
- delete_option( 'sbi_cron_report' );
584
- SB_Instagram_Cron_Updater::start_cron_job( $sbi_cache_cron_interval, $sbi_cache_cron_time, $sbi_cache_cron_am_pm );
585
- }
586
-
587
- global $sb_instagram_posts_manager;
588
- $sb_instagram_posts_manager->add_action_log( 'Saved settings on the configure tab.' );
589
- $sb_instagram_posts_manager->clear_api_request_delays();
590
-
591
- } //End config tab post
592
-
593
- if( isset($_POST[ $sb_instagram_customize_hidden_field ]) && $_POST[ $sb_instagram_customize_hidden_field ] == 'Y' ) {
594
-
595
- //Validate and sanitize width field
596
- $safe_width = intval( sanitize_text_field( $_POST['sb_instagram_width'] ) );
597
- if ( ! $safe_width ) $safe_width = '';
598
- if ( strlen( $safe_width ) > 4 ) $safe_width = substr( $safe_width, 0, 4 );
599
- $sb_instagram_width = $safe_width;
600
-
601
- $sb_instagram_width_unit = sanitize_text_field( $_POST[ 'sb_instagram_width_unit' ] );
602
- isset($_POST[ 'sb_instagram_feed_width_resp' ]) ? $sb_instagram_feed_width_resp = sanitize_text_field( $_POST[ 'sb_instagram_feed_width_resp' ] ) : $sb_instagram_feed_width_resp = '';
603
-
604
- //Validate and sanitize height field
605
- $safe_height = intval( sanitize_text_field( $_POST['sb_instagram_height'] ) );
606
- if ( ! $safe_height ) $safe_height = '';
607
- if ( strlen( $safe_height ) > 4 ) $safe_height = substr( $safe_height, 0, 4 );
608
- $sb_instagram_height = $safe_height;
609
-
610
- $sb_instagram_height_unit = sanitize_text_field( $_POST[ 'sb_instagram_height_unit' ] );
611
-
612
- //Validate and sanitize number of photos field
613
- $safe_num = intval( sanitize_text_field( $_POST['sb_instagram_num'] ) );
614
- if ( ! $safe_num ) $safe_num = '';
615
- if ( strlen( $safe_num ) > 4 ) $safe_num = substr( $safe_num, 0, 4 );
616
- $sb_instagram_num = $safe_num;
617
-
618
- $sb_instagram_cols = sanitize_text_field( $_POST[ 'sb_instagram_cols' ] );
619
- isset($_POST[ 'sb_instagram_disable_mobile' ]) ? $sb_instagram_disable_mobile = sanitize_text_field( $_POST[ 'sb_instagram_disable_mobile' ] ) : $sb_instagram_disable_mobile = '';
620
-
621
- //Validate and sanitize padding field
622
- $safe_padding = intval( sanitize_text_field( $_POST['sb_instagram_image_padding'] ) );
623
- if ( ! $safe_padding ) $safe_padding = '';
624
- if ( strlen( $safe_padding ) > 4 ) $safe_padding = substr( $safe_padding, 0, 4 );
625
- $sb_instagram_image_padding = $safe_padding;
626
-
627
- $sb_instagram_image_padding_unit = sanitize_text_field( $_POST[ 'sb_instagram_image_padding_unit' ] );
628
- $sb_instagram_sort = sanitize_text_field( $_POST[ 'sb_instagram_sort' ] );
629
- $sb_instagram_background = sanitize_text_field( $_POST[ 'sb_instagram_background' ] );
630
- isset($_POST[ 'sb_instagram_show_btn' ]) ? $sb_instagram_show_btn = sanitize_text_field( $_POST[ 'sb_instagram_show_btn' ] ) : $sb_instagram_show_btn = '';
631
- $sb_instagram_btn_background = sanitize_text_field( $_POST[ 'sb_instagram_btn_background' ] );
632
- $sb_instagram_btn_text_color = sanitize_text_field( $_POST[ 'sb_instagram_btn_text_color' ] );
633
- $sb_instagram_btn_text = sanitize_text_field( $_POST[ 'sb_instagram_btn_text' ] );
634
- $sb_instagram_image_res = sanitize_text_field( $_POST[ 'sb_instagram_image_res' ] );
635
- //Header
636
- isset($_POST[ 'sb_instagram_show_header' ]) ? $sb_instagram_show_header = sanitize_text_field( $_POST[ 'sb_instagram_show_header' ] ) : $sb_instagram_show_header = '';
637
- isset($_POST[ 'sb_instagram_show_bio' ]) ? $sb_instagram_show_bio = sanitize_text_field( $_POST[ 'sb_instagram_show_bio' ] ) : $sb_instagram_show_bio = '';
638
- if ( function_exists( 'sanitize_textarea_field' ) ) {
639
- isset($_POST[ 'sb_instagram_custom_bio' ]) ? $sb_instagram_custom_bio = sanitize_textarea_field( $_POST[ 'sb_instagram_custom_bio' ] ) : $sb_instagram_custom_bio = '';
640
- } else {
641
- isset($_POST[ 'sb_instagram_custom_bio' ]) ? $sb_instagram_custom_bio = sanitize_text_field( $_POST[ 'sb_instagram_custom_bio' ] ) : $sb_instagram_custom_bio = '';
642
- }
643
- isset($_POST[ 'sb_instagram_custom_avatar' ]) ? $sb_instagram_custom_avatar = sanitize_text_field( $_POST[ 'sb_instagram_custom_avatar' ] ) : $sb_instagram_custom_avatar = '';
644
- if (isset($_POST[ 'sb_instagram_header_size' ]) ) $sb_instagram_header_size = $_POST[ 'sb_instagram_header_size' ];
645
-
646
- $sb_instagram_header_color = sanitize_text_field( $_POST[ 'sb_instagram_header_color' ] );
647
- //Follow button
648
- isset($_POST[ 'sb_instagram_show_follow_btn' ]) ? $sb_instagram_show_follow_btn = sanitize_text_field( $_POST[ 'sb_instagram_show_follow_btn' ] ) : $sb_instagram_show_follow_btn = '';
649
- $sb_instagram_folow_btn_background = sanitize_text_field( $_POST[ 'sb_instagram_folow_btn_background' ] );
650
- $sb_instagram_follow_btn_text_color = sanitize_text_field( $_POST[ 'sb_instagram_follow_btn_text_color' ] );
651
- $sb_instagram_follow_btn_text = sanitize_text_field( $_POST[ 'sb_instagram_follow_btn_text' ] );
652
- //Misc
653
- $sb_instagram_custom_css = $_POST[ 'sb_instagram_custom_css' ];
654
- $sb_instagram_custom_js = $_POST[ 'sb_instagram_custom_js' ];
655
- isset($_POST[ 'sb_instagram_ajax_theme' ]) ? $sb_instagram_ajax_theme = sanitize_text_field( $_POST[ 'sb_instagram_ajax_theme' ] ) : $sb_instagram_ajax_theme = '';
656
- isset($_POST[ 'gdpr' ]) ? $gdpr = sanitize_text_field( $_POST[ 'gdpr' ] ) : $gdpr = '';
657
- isset($_POST[ 'enqueue_js_in_head' ]) ? $enqueue_js_in_head = $_POST[ 'enqueue_js_in_head' ] : $enqueue_js_in_head = '';
658
- isset($_POST[ 'disable_js_image_loading' ]) ? $disable_js_image_loading = $_POST[ 'disable_js_image_loading' ] : $disable_js_image_loading = '';
659
- isset($_POST[ 'sb_instagram_disable_resize' ]) ? $sb_instagram_disable_resize= sanitize_text_field( $_POST[ 'sb_instagram_disable_resize' ] ) : $sb_instagram_disable_resize = '';
660
- isset($_POST[ 'sb_instagram_favor_local' ]) ? $sb_instagram_favor_local = sanitize_text_field( $_POST[ 'sb_instagram_favor_local' ] ) : $sb_instagram_favor_local = '';
661
- isset($_POST[ 'sb_instagram_minnum' ]) ? $sb_instagram_minnum = sanitize_text_field( $_POST[ 'sb_instagram_minnum' ] ) : $sb_instagram_minnum = '';
662
-
663
- if (isset($_POST[ 'sb_instagram_cron' ]) ) $sb_instagram_cron = $_POST[ 'sb_instagram_cron' ];
664
- isset($_POST[ 'sb_instagram_backup' ]) ? $sb_instagram_backup = $_POST[ 'sb_instagram_backup' ] : $sb_instagram_backup = '';
665
- isset($_POST[ 'sb_ajax_initial' ]) ? $sb_ajax_initial = $_POST[ 'sb_ajax_initial' ] : $sb_ajax_initial = '';
666
- isset($_POST[ 'enqueue_css_in_shortcode' ]) ? $enqueue_css_in_shortcode = $_POST[ 'enqueue_css_in_shortcode' ] : $enqueue_css_in_shortcode = '';
667
-
668
- $options[ 'sb_instagram_width' ] = $sb_instagram_width;
669
- $options[ 'sb_instagram_width_unit' ] = $sb_instagram_width_unit;
670
- $options[ 'sb_instagram_feed_width_resp' ] = $sb_instagram_feed_width_resp;
671
- $options[ 'sb_instagram_height' ] = $sb_instagram_height;
672
- $options[ 'sb_instagram_height_unit' ] = $sb_instagram_height_unit;
673
- $options[ 'sb_instagram_num' ] = $sb_instagram_num;
674
- $options[ 'sb_instagram_cols' ] = $sb_instagram_cols;
675
- $options[ 'sb_instagram_disable_mobile' ] = $sb_instagram_disable_mobile;
676
- $options[ 'sb_instagram_image_padding' ] = $sb_instagram_image_padding;
677
- $options[ 'sb_instagram_image_padding_unit' ] = $sb_instagram_image_padding_unit;
678
- $options[ 'sb_instagram_sort' ] = $sb_instagram_sort;
679
- $options[ 'sb_instagram_background' ] = $sb_instagram_background;
680
- $options[ 'sb_instagram_show_btn' ] = $sb_instagram_show_btn;
681
- $options[ 'sb_instagram_btn_background' ] = $sb_instagram_btn_background;
682
- $options[ 'sb_instagram_btn_text_color' ] = $sb_instagram_btn_text_color;
683
- $options[ 'sb_instagram_btn_text' ] = $sb_instagram_btn_text;
684
- $options[ 'sb_instagram_image_res' ] = $sb_instagram_image_res;
685
- //Header
686
- $options[ 'sb_instagram_show_header' ] = $sb_instagram_show_header;
687
- $options[ 'sb_instagram_header_size' ] = $sb_instagram_header_size;
688
- $options[ 'sb_instagram_show_bio' ] = $sb_instagram_show_bio;
689
- $options[ 'sb_instagram_custom_bio' ] = $sb_instagram_custom_bio;
690
- $options[ 'sb_instagram_custom_avatar' ] = $sb_instagram_custom_avatar;
691
- $options[ 'sb_instagram_custom_bio' ] = $sb_instagram_custom_bio;
692
- $options[ 'sb_instagram_custom_avatar' ] = $sb_instagram_custom_avatar;
693
- $options[ 'sb_instagram_header_color' ] = $sb_instagram_header_color;
694
- //Follow button
695
- $options[ 'sb_instagram_show_follow_btn' ] = $sb_instagram_show_follow_btn;
696
- $options[ 'sb_instagram_folow_btn_background' ] = $sb_instagram_folow_btn_background;
697
- $options[ 'sb_instagram_follow_btn_text_color' ] = $sb_instagram_follow_btn_text_color;
698
- $options[ 'sb_instagram_follow_btn_text' ] = $sb_instagram_follow_btn_text;
699
- //Misc
700
- $options[ 'sb_instagram_custom_css' ] = $sb_instagram_custom_css;
701
- $options[ 'sb_instagram_custom_js' ] = $sb_instagram_custom_js;
702
- $options[ 'sb_instagram_ajax_theme' ] = $sb_instagram_ajax_theme;
703
- $options[ 'gdpr' ] = $gdpr;
704
- $options[ 'enqueue_js_in_head' ] = $enqueue_js_in_head;
705
- $options[ 'disable_js_image_loading' ] = $disable_js_image_loading;
706
- $options[ 'sb_instagram_disable_resize' ] = $sb_instagram_disable_resize;
707
- $options[ 'sb_instagram_favor_local' ] = $sb_instagram_favor_local;
708
- $options[ 'sb_instagram_minnum' ] = $sb_instagram_minnum;
709
-
710
- $options[ 'sb_ajax_initial' ] = $sb_ajax_initial;
711
- $options[ 'sb_instagram_cron' ] = $sb_instagram_cron;
712
- $options['sb_instagram_backup'] = $sb_instagram_backup;
713
- $options['enqueue_css_in_shortcode'] = $enqueue_css_in_shortcode;
714
-
715
- isset($_POST[ 'sb_instagram_custom_template' ]) ? $sb_instagram_custom_template = $_POST[ 'sb_instagram_custom_template' ] : $sb_instagram_custom_template = '';
716
- $options['custom_template'] = $sb_instagram_custom_template;
717
- isset($_POST[ 'sb_instagram_disable_admin_notice' ]) ? $sb_instagram_disable_admin_notice = $_POST[ 'sb_instagram_disable_admin_notice' ] : $sb_instagram_disable_admin_notice = '';
718
- $options['disable_admin_notice'] = $sb_instagram_disable_admin_notice;
719
- isset($_POST[ 'sb_instagram_enable_email_report' ]) ? $sb_instagram_enable_email_report = $_POST[ 'sb_instagram_enable_email_report' ] : $sb_instagram_enable_email_report = '';
720
- $options['enable_email_report'] = $sb_instagram_enable_email_report;
721
- isset($_POST[ 'sb_instagram_email_notification' ]) ? $sb_instagram_email_notification = $_POST[ 'sb_instagram_email_notification' ] : $sb_instagram_email_notification = '';
722
- $original = $options['email_notification'];
723
- $options['email_notification'] = $sb_instagram_email_notification;
724
- isset($_POST[ 'sb_instagram_email_notification_addresses' ]) ? $sb_instagram_email_notification_addresses = $_POST[ 'sb_instagram_email_notification_addresses' ] : $sb_instagram_email_notification_addresses = get_option( 'admin_email' );
725
- $options['email_notification_addresses'] = $sb_instagram_email_notification_addresses;
726
-
727
- if ( $original !== $sb_instagram_email_notification && $sb_instagram_enable_email_report === 'on' ){
728
- //Clear the existing cron event
729
- wp_clear_scheduled_hook('sb_instagram_feed_issue_email');
730
-
731
- $input = sanitize_text_field($_POST[ 'sb_instagram_email_notification' ] );
732
- $timestamp = strtotime( 'next ' . $input );
733
-
734
- if ( $timestamp - (3600 * 1) < time() ) {
735
- $timestamp = $timestamp + (3600 * 24 * 7);
736
- }
737
- $six_am_local = $timestamp + sbi_get_utc_offset() + (6*60*60);
738
-
739
- wp_schedule_event( $six_am_local, 'sbiweekly', 'sb_instagram_feed_issue_email' );
740
- }
741
-
742
-
743
- //Delete all SBI transients
744
- global $wpdb;
745
- $table_name = $wpdb->prefix . "options";
746
- $wpdb->query( "
747
- DELETE
748
- FROM $table_name
749
- WHERE `option_name` LIKE ('%\_transient\_sbi\_%')
750
- " );
751
- $wpdb->query( "
752
- DELETE
753
- FROM $table_name
754
- WHERE `option_name` LIKE ('%\_transient\_timeout\_sbi\_%')
755
- " );
756
- $wpdb->query( "
757
- DELETE
758
- FROM $table_name
759
- WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
760
- " );
761
- $wpdb->query( "
762
- DELETE
763
- FROM $table_name
764
- WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
765
- " );
766
-
767
- if( $sb_instagram_cron == 'no' ) wp_clear_scheduled_hook('sb_instagram_cron_job');
768
-
769
- //Run cron when Misc settings are saved
770
- if( $sb_instagram_cron == 'yes' ){
771
- //Clear the existing cron event
772
- wp_clear_scheduled_hook('sb_instagram_cron_job');
773
-
774
- $sb_instagram_cache_time = $options[ 'sb_instagram_cache_time' ];
775
- $sb_instagram_cache_time_unit = $options[ 'sb_instagram_cache_time_unit' ];
776
-
777
- //Set the event schedule based on what the caching time is set to
778
- $sb_instagram_cron_schedule = 'hourly';
779
- if( $sb_instagram_cache_time_unit == 'hours' && $sb_instagram_cache_time > 5 ) $sb_instagram_cron_schedule = 'twicedaily';
780
- if( $sb_instagram_cache_time_unit == 'days' ) $sb_instagram_cron_schedule = 'daily';
781
-
782
- wp_schedule_event(time(), $sb_instagram_cron_schedule, 'sb_instagram_cron_job');
783
-
784
- sb_instagram_clear_page_caches();
785
- }
786
-
787
- } //End customize tab post
788
-
789
- //Save the settings to the settings array
790
- update_option( 'sb_instagram_settings', $options );
791
-
792
- ?>
793
- <div class="updated"><p><strong><?php _e( 'Settings saved.', 'instagram-feed' ); ?></strong></p></div>
794
- <?php } ?>
795
-
796
- <?php } //End nonce check ?>
797
-
798
-
799
- <div id="sbi_admin" class="wrap">
800
- <?php
801
- $lite_notice_dismissed = get_transient( 'instagram_feed_dismiss_lite' );
802
-
803
- if ( ! $lite_notice_dismissed ) :
804
- ?>
805
- <div id="sbi-notice-bar" style="display:none">
806
- <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
807
- <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
808
- </button>
809
- </div>
810
- <?php endif; ?>
811
-
812
- <?php do_action( 'sbi_admin_overview_before_table' ); ?>
813
-
814
-
815
- <div id="header">
816
- <h1><?php _e( 'Instagram Feed', 'instagram-feed' ); ?></h1>
817
- </div>
818
- <?php
819
- $sb_instagram_type = 'user';
820
- $new_user_name = false;
821
- $returned_data = sbi_get_connected_accounts_data( $sb_instagram_at );
822
- $sb_instagram_at = $returned_data['access_token'];
823
- $connected_accounts = $returned_data['connected_accounts'];
824
- $user_feeds_returned = isset( $returned_data['user_ids'] ) ? $returned_data['user_ids'] : false;
825
- if ( $user_feeds_returned ) {
826
- $user_feed_ids = $user_feeds_returned;
827
- } else {
828
- $user_feed_ids = ! is_array( $sb_instagram_user_id ) ? explode( ',', $sb_instagram_user_id ) : $sb_instagram_user_id;
829
- }
830
-
831
- $new_user_name = false;
832
-
833
- SBI_Account_Connector::maybe_launch_modals( $sb_instagram_user_id );
834
- if ( isset( $_POST['sbi_connect_username'] ) ) {
835
- $new_user_name = sanitize_text_field( $_POST['sbi_connect_username'] );
836
- $new_account_details = json_decode( stripslashes( $_POST['sbi_account_json'] ), true );
837
- array_map( 'sanitize_text_field', $new_account_details );
838
-
839
- $updated_options = sbi_connect_basic_account( $new_account_details );
840
- $connected_accounts = $updated_options['connected_accounts'];
841
- $user_feed_ids = $updated_options['sb_instagram_user_id'];
842
- }
843
-
844
- //Display connected page
845
- if (isset( $sbi_connected_page ) && strpos($sbi_connected_page, ':') !== false) {
846
-
847
- $sbi_connected_page_pieces = explode(":", $sbi_connected_page);
848
- $sbi_connected_page_id = $sbi_connected_page_pieces[0];
849
- $sbi_connected_page_name = $sbi_connected_page_pieces[1];
850
- $sbi_connected_page_image = $sbi_connected_page_pieces[2];
851
-
852
- echo '&nbsp;';
853
- echo '<p style="font-weight: bold; margin-bottom: 5px;">Connected Business Profile:</p>';
854
- echo '<div class="sbi-managed-page sbi-no-select">';
855
- echo '<p><img class="sbi-page-avatar" border="0" height="50" width="50" src="'.$sbi_connected_page_image.'"><b>'.$sbi_connected_page_name.'</b> &nbsp; ('.$sbi_connected_page_id.')</p>';
856
- echo '</div>';
857
- }
858
-
859
- ?>
860
-
861
- <form name="form1" method="post" action="">
862
- <input type="hidden" name="<?php echo $sb_instagram_settings_hidden_field; ?>" value="Y">
863
- <?php wp_nonce_field( 'sb_instagram_saving_settings', 'sb_instagram_settings_nonce' ); ?>
864
-
865
- <?php $sbi_active_tab = isset( $_GET[ 'tab' ] ) ? sanitize_text_field( $_GET['tab'] ) : 'configure'; ?>
866
- <h2 class="nav-tab-wrapper">
867
- <a href="?page=sb-instagram-feed&amp;tab=configure" class="nav-tab <?php echo $sbi_active_tab == 'configure' ? 'nav-tab-active' : ''; ?>"><?php _e( '1. Configure', 'instagram-feed' ); ?></a>
868
- <a href="?page=sb-instagram-feed&amp;tab=customize" class="nav-tab <?php echo $sbi_active_tab == 'customize' ? 'nav-tab-active' : ''; ?>"><?php _e( '2. Customize', 'instagram-feed' ); ?></a>
869
- <a href="?page=sb-instagram-feed&amp;tab=display" class="nav-tab <?php echo $sbi_active_tab == 'display' ? 'nav-tab-active' : ''; ?>"><?php _e( '3. Display Your Feed', 'instagram-feed' ); ?></a>
870
- <a href="?page=sb-instagram-feed&amp;tab=support" class="nav-tab <?php echo $sbi_active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Support', 'instagram-feed' ); ?></a>
871
- <a href="?page=sb-instagram-feed&amp;tab=more" class="nav-tab <?php echo $sbi_active_tab == 'more' ? 'nav-tab-active' : ''; ?>"><?php _e( 'More Social Feeds', 'instagram-feed' ); ?>
872
- <?php
873
- $seen_more_plugins_page = get_user_meta(get_current_user_id(), 'seen_more_plugins_page_1', true);
874
- if( !$seen_more_plugins_page ) echo '<span class="sbi-alert-bubble">1</span>';
875
- ?>
876
- </a>
877
- </h2>
878
-
879
- <?php if( $sbi_active_tab == 'configure' ) { //Start Configure tab ?>
880
- <input type="hidden" name="<?php echo $sb_instagram_configure_hidden_field; ?>" value="Y">
881
-
882
- <table class="form-table">
883
- <tbody>
884
- <h3><?php _e( 'Configure', 'instagram-feed' ); ?></h3>
885
-
886
- <div id="sbi_config">
887
- <a data-personal-basic-api="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>"
888
- data-new-api="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=manage_pages,instagram_basic,instagram_manage_insights,instagram_manage_comments&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>"
889
- href="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>" class="sbi_admin_btn"><i class="fa fa-user-plus" aria-hidden="true" style="font-size: 20px;"></i>&nbsp; <?php _e('Connect an Instagram Account', 'instagram-feed' ); ?></a>
890
- <a href="https://smashballoon.com/instagram-feed/token/" target="_blank" style="position: relative; top: 14px; left: 15px;"><?php _e('Button not working?', 'instagram-feed'); ?></a>
891
- </div>
892
-
893
- <!-- Old Access Token -->
894
- <input name="sb_instagram_at" id="sb_instagram_at" type="hidden" value="<?php echo esc_attr( $sb_instagram_at ); ?>" size="80" maxlength="100" placeholder="Click button above to get your Access Token" />
895
-
896
- <tr valign="top">
897
- <th scope="row"><label><?php _e( 'Instagram Accounts', 'instagram-feed' ); ?></label><span style="font-weight:normal; font-style:italic; font-size: 12px; display: block;"><?php _e('Use the button above to connect an Instagram account', 'instagram-feed'); ?></span></th>
898
- <td class="sbi_connected_accounts_wrap">
899
- <?php if ( empty( $connected_accounts ) ) : ?>
900
- <p class="sbi_no_accounts"><?php _e( 'No Instagram accounts connected. Click the button above to connect an account.', 'instagram-feed' ); ?></p><br />
901
- <?php else:
902
- $doing_account_error_messages = count( $connected_accounts ) > 1;
903
- global $sb_instagram_posts_manager;
904
-
905
- ?>
906
- <?php foreach ( $connected_accounts as $account ) :
907
- $username = $account['username'] ? $account['username'] : $account['user_id'];
908
- if ( isset( $account['local_avatar'] ) && $account['local_avatar'] && isset( $options['sb_instagram_favor_local'] ) && $options['sb_instagram_favor_local' ] === 'on' ) {
909
- $upload = wp_upload_dir();
910
- $resized_url = trailingslashit( $upload['baseurl'] ) . trailingslashit( SBI_UPLOADS_NAME );
911
- $profile_picture = '<img class="sbi_ca_avatar" src="'.$resized_url . $account['username'].'.jpg" />'; //Could add placeholder avatar image
912
- } else {
913
- $profile_picture = $account['profile_picture'] ? '<img class="sbi_ca_avatar" src="'.$account['profile_picture'].'" />' : ''; //Could add placeholder avatar image
914
- }
915
-
916
- $is_invalid_class = ! $account['is_valid'] ? ' sbi_account_invalid' : '';
917
- $in_user_feed = in_array( $account['user_id'], $user_feed_ids, true );
918
- $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
919
- $use_tagged = isset( $account['use_tagged'] ) && $account['use_tagged'] == '1';
920
- $is_private = isset( $account['private'] ) && $account['private'] !== false;
921
-
922
- if ( empty( $profile_picture ) && $account_type === 'personal' ) {
923
- $account_update = sbi_account_data_for_token( $account['access_token'] );
924
- if ( isset( $account['is_valid'] ) ) {
925
- $split = explode( '.', $account['access_token'] );
926
- $connected_accounts[ $split[0] ] = array(
927
- 'access_token' => $account['access_token'],
928
- 'user_id' => $split[0],
929
- 'username' => $account_update['username'],
930
- 'is_valid' => true,
931
- 'last_checked' => time(),
932
- 'profile_picture' => $account_update['profile_picture']
933
- );
934
-
935
- $sbi_options = get_option( 'sb_instagram_settings', array() );
936
- $sbi_options['connected_accounts'] = $connected_accounts;
937
- update_option( 'sb_instagram_settings', $sbi_options );
938
- }
939
-
940
- }
941
- $updated_or_new_account_class = $new_user_name === $username && $account_type !== 'business' ? ' sbi_ca_new_or_updated' : '';
942
-
943
- ?>
944
- <div class="sbi_connected_account<?php echo $is_invalid_class . $updated_or_new_account_class; ?><?php if ( $in_user_feed ) echo ' sbi_account_active' ?> sbi_account_type_<?php echo $account_type; ?>" id="sbi_connected_account_<?php esc_attr_e( $account['user_id'] ); ?>" data-accesstoken="<?php esc_attr_e( $account['access_token'] ); ?>" data-userid="<?php esc_attr_e( $account['user_id'] ); ?>" data-username="<?php esc_attr_e( $account['username'] ); ?>" data-type="<?php esc_attr_e( $account_type ); ?>" data-permissions="<?php if ( $use_tagged ) echo 'tagged'; ?>">
945
- <?php if ( $doing_account_error_messages && $sb_instagram_posts_manager->connected_account_has_error( $account ) ) : ?>
946
- <div class="sbi_deprecated">
947
- <span><i class="fa fa-exclamation-circle" aria-hidden="true"></i><?php _e( 'Feeds using this account might not be updating due to an error. Try viewing these feeds after reconnecting the account and saving your settings below.', 'instagram-feed' ); ?></span>
948
- </div>
949
- <?php endif; ?>
950
- <div class="sbi_ca_alert">
951
- <span><?php _e( 'The Access Token for this account is expired or invalid. Click the button above to attempt to renew it.', 'instagram-feed' ); ?></span>
952
- </div>
953
- <div class="sbi_ca_info">
954
-
955
- <div class="sbi_ca_delete">
956
- <a href="<?php echo add_query_arg( 'disconnect', $account['user_id'], get_admin_url( null, 'admin.php?page=sb-instagram-feed' ) ); ?>" class="sbi_delete_account"><i class="fa fa-times"></i><span class="sbi_remove_text"><?php _e( 'Remove', 'instagram-feed' ); ?></span></a>
957
- </div>
958
-
959
- <div class="sbi_ca_username">
960
- <?php echo $profile_picture; ?>
961
- <strong><?php echo $username; ?><span><?php echo sbi_account_type_display( $account_type, isset( $account['private'] ) ); ?></span></strong>
962
- </div>
963
-
964
- <div class="sbi_ca_actions">
965
- <?php if ( ! $in_user_feed ) : ?>
966
- <a href="JavaScript:void(0);" class="sbi_use_in_user_feed button-primary"><i class="fa fa-plus-circle" aria-hidden="true"></i><?php _e( 'Add to Primary Feed', 'instagram-feed' ); ?></a>
967
- <?php else : ?>
968
- <a href="JavaScript:void(0);" class="sbi_remove_from_user_feed button-primary"><i class="fa fa-minus-circle" aria-hidden="true"></i><?php _e( 'Remove from Primary Feed', 'instagram-feed' ); ?></a>
969
- <?php endif; ?>
970
- <a class="sbi_ca_token_shortcode button-secondary" href="JavaScript:void(0);"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i><?php _e( 'Add to another Feed', 'instagram-feed' ); ?></a>
971
- <a class="sbi_ca_show_token button-secondary" href="JavaScript:void(0);" title="<?php _e('Show access token and account info', 'instagram-feed'); ?>"><i class="fa fa-cog"></i></a>
972
- <?php if ( $is_private ) :
973
- $expires_in = max( 0, floor( ($account['expires_timestamp'] - time()) / DAY_IN_SECONDS ) );
974
- $message = $expires_in > 0 ? sprintf( __( 'Expires in %s days', 'instagram-feed' ), $expires_in ) : __( 'Access Token Expired', 'instagram-feed' );
975
- $alert_class = $expires_in < 10 ? ' sbi_alert' : '';
976
- ?>
977
- <div class="sbi_is_private<?php echo esc_attr( $alert_class ); ?>">
978
- <span><?php echo esc_html( $message ); ?></span>
979
- <a class="sbi_tooltip_link sbi_tooltip_outside" href="JavaScript:void(0);" style="position: relative; top: 2px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
980
-
981
- <a href="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url( 'admin.php?page=sb-instagram-feed' ); ?>" class="button button-secondary"><?php _e( 'Refresh now', 'instagram-feed' ); ?></a>
982
- </div>
983
- <p class="sbi_tooltip sbi-more-info" style="display: none; width: 100%; box-sizing: border-box;"><?php echo sprintf( __( 'This account is a "private" account on Instagram. It needs to be manually reconnected every 60 days. %sChange this account to be "public"%s to have access tokens that are automatically refreshed.', 'instagram-feed' ), '<a href="https://help.instagram.com/116024195217477/In" target="_blank">', '</a>' ); ?></p>
984
- <?php endif; ?>
985
-
986
- </div>
987
-
988
- <div class="sbi_ca_shortcode">
989
-
990
- <p><?php _e('Copy and paste this shortcode into your page or widget area', 'instagram-feed'); ?>:<br>
991
- <?php if ( !empty( $account['username'] ) ) : ?>
992
- <code>[instagram-feed user="<?php echo $account['username']; ?>"]</code>
993
- <?php endif; ?>
994
- </p>
995
-
996
- <p><?php _e('To add multiple users in the same feed, simply separate them using commas', 'instagram-feed'); ?>:<br>
997
- <?php if ( !empty( $account['username'] ) ) : ?>
998
- <code>[instagram-feed user="<?php echo $account['username']; ?>, a_second_user, a_third_user"]</code>
999
- <?php endif; ?>
1000
-
1001
- <p><?php echo sprintf( __('Click on the %s tab to learn more about shortcodes', 'instagram-feed'), '<a href="?page=sb-instagram-feed&tab=display" target="_blank">'. __( 'Display Your Feed', 'instagram-feed' ) . '</a>' ); ?></p>
1002
- </div>
1003
-
1004
- <div class="sbi_ca_accesstoken">
1005
- <span class="sbi_ca_token_label"><?php _e('Access Token', 'instagram-feed');?>:</span><input type="text" class="sbi_ca_token" value="<?php echo $account['access_token']; ?>" readonly="readonly" onclick="this.focus();this.select()" title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed');?>"><br>
1006
- <span class="sbi_ca_token_label"><?php _e('User ID', 'instagram-feed');?>:</span><input type="text" class="sbi_ca_user_id" value="<?php echo $account['user_id']; ?>" readonly="readonly" onclick="this.focus();this.select()" title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed');?>"><br>
1007
- </div>
1008
-
1009
- </div>
1010
-
1011
- </div>
1012
-
1013
- <?php endforeach; ?>
1014
- <?php endif; ?>
1015
- <a href="JavaScript:void(0);" class="sbi_manually_connect button-secondary"><?php _e( 'Manually Connect an Account', 'instagram-feed' ); ?></a>
1016
- <div class="sbi_manually_connect_wrap">
1017
- <input name="sb_manual_at" id="sb_manual_at" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="64" minlength="15" maxlength="400" placeholder="<?php esc_attr_e( 'Enter a valid Instagram Access Token', 'instagram-feed' ); ?>" /><span class='sbi_business_profile_tag'><?php _e('Business or Basic Display', 'instagram-feed');?></span>
1018
- <div class="sbi_manual_account_id_toggle">
1019
- <label><?php _e('Please enter the User ID for this Profile:', 'instagram-feed');?></label>
1020
- <input name="sb_manual_account_id" id="sb_manual_account_id" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="40" minlength="5" maxlength="100" placeholder="Eg: 15641403491391489" />
1021
- </div>
1022
- <p id="sbi_no_js_warning" class="sbi_nojs_notice"><?php echo sprintf( __('It looks like JavaScript is not working on this page. Some features may not work fully. Visit %sthis page%s for help resolving this issue.', 'instagram-feed'), '<a href="https://smashballoon.com/i-cant-connect-or-manage-accounts-on-the-instagram-feed-settings-page/" target="_blank" rel="noopener">', '</a>' ); ?></p>
1023
- <p class="sbi_submit" style="display: inline-block;"><input type="submit" name="sbi_submit" id="sbi_manual_submit" class="button button-primary" value="<?php _e('Connect This Account', 'instagram-feed' );?>"></p>
1024
- </div>
1025
- </td>
1026
- </tr>
1027
-
1028
- <tr valign="top" class="sbi_feed_type">
1029
- <th scope="row"><label><?php _e('Select a Feed Type', 'instagram-feed'); ?>:</label><code class="sbi_shortcode"> type
1030
- Eg: type=user user=smashballoon
1031
- </code>
1032
- <?php if ( SB_Instagram_Feed_Locator::count_unique() > 1 ) : ?>
1033
- <div class="sbi_locations_link">
1034
- <a href="?page=sb-instagram-feed&amp;tab=allfeeds"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="search" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-search fa-w-16 fa-2x"><path fill="currentColor" d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z" class=""></path></svg> <?php _e('Feed Finder', 'instagram-feed'); ?></a>
1035
- </div>
1036
- <?php endif; ?>
1037
-
1038
- </th>
1039
- <td>
1040
- <div class="sbi_row">
1041
- <div class="sbi_col sbi_one">
1042
- <input type="radio" name="sb_instagram_type" id="sb_instagram_type_user" value="user" <?php if($sb_instagram_type == "user") echo "checked"; ?> />
1043
- <label class="sbi_radio_label" for="sb_instagram_type_user"><?php _e( 'User Account:', 'instagram-feed' ); ?></label>
1044
- </div>
1045
- <div class="sbi_col sbi_two">
1046
- <div class="sbi_user_feed_ids_wrap">
1047
- <?php foreach ( $user_feed_ids as $feed_id ) : if ( $feed_id !== '' ) :?>
1048
- <?php if( count($connected_accounts) > 0 ) { ?><div id="sbi_user_feed_id_<?php echo $feed_id; ?>" class="sbi_user_feed_account_wrap"><?php } ?>
1049
-
1050
- <?php if ( isset( $connected_accounts[ $feed_id ] ) && ! empty( $connected_accounts[ $feed_id ]['username'] ) ) : ?>
1051
- <strong><?php echo $connected_accounts[ $feed_id ]['username']; ?></strong> <span>(<?php echo $feed_id; ?>)</span>
1052
- <input name="sb_instagram_user_id[]" id="sb_instagram_user_id" type="hidden" value="<?php echo esc_attr( $feed_id ); ?>" />
1053
- <?php elseif ( isset( $connected_accounts[ $feed_id ] ) && ! empty( $connected_accounts[ $feed_id ]['access_token'] ) ) : ?>
1054
- <strong><?php echo $feed_id; ?></strong>
1055
- <input name="sb_instagram_user_id[]" id="sb_instagram_user_id" type="hidden" value="<?php echo esc_attr( $feed_id ); ?>" />
1056
- <?php endif; ?>
1057
-
1058
- <?php if( count($connected_accounts) > 0 ) { ?></div><?php } ?>
1059
- <?php endif; endforeach; ?>
1060
- </div>
1061
-
1062
- <?php if ( empty( $user_feed_ids ) ) : ?>
1063
- <p class="sbi_no_accounts" style="margin-top: -3px; margin-right: 10px;"><?php _e( 'Connect a user account above', 'instagram-feed' ); ?></p>
1064
- <?php endif; ?>
1065
-
1066
- <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="margin: 5px 0 10px 0; display: inline-block; height: 19px;"><?php _e("How to display User feeds", 'instagram-feed' ); ?></a>
1067
- <div class="sbi_tooltip"><?php _e("<p><b>Displaying Posts from Your User Account</b><br />Simply connect an account using the button above.</p><p style='padding-top:8px;'><b>Displaying Posts from Other Instagram Accounts</b><br />Due to recent changes in the Instagram API it is no longer possible to display photos from other Instagram accounts which you do not have access to. You can only display the user feed of an account which you connect above. You can connect as many account as you like by logging in using the button above, or manually copy/pasting an Access Token by selecting the 'Manually Connect an Account' option.</p><p style='padding-top:10px;'><b>Multiple Acounts</b><br />It is only possible to display feeds from Instagram accounts which you own. In order to display feeds from multiple accounts, first connect them above and then use the buttons to add the account either to your primary feed or to another feed on your site.</p>", 'instagram-feed'); ?></div><br />
1068
- </div>
1069
-
1070
- </div>
1071
-
1072
- <div class="sbi_pro sbi_row">
1073
- <div class="sbi_col sbi_one">
1074
- <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_hashtag" value="hashtag" <?php if($sb_instagram_type == "hashtag") echo "checked"; ?> />
1075
- <label class="sbi_radio_label" for="sb_instagram_type_hashtag"><?php _e( 'Hashtag:', 'instagram-feed' ); ?></label>
1076
- </div>
1077
- <div class="sbi_col sbi_two">
1078
-
1079
- <p class="sbi_pro_tooltip"><?php _e( 'Upgrade to the Pro version to display Hashtag and Tagged feeds', 'instagram-feed' ); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1080
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=hashtags" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php _e('Pro', 'instagram-feed'); ?></a>
1081
-
1082
- <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1083
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1084
-
1085
- <p class="sbi_tooltip"><?php _e( 'Display posts from a specific hashtag instead of from a user', 'instagram-feed' ); ?></p>
1086
- </div>
1087
- </div>
1088
-
1089
- <div class="sbi_pro sbi_row">
1090
- <div class="sbi_col sbi_one">
1091
- <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_tagged" value="tagged" <?php if($sb_instagram_type == "tagged") echo "checked"; ?> />
1092
- <label class="sbi_radio_label" for="sb_instagram_type_tagged"><?php _e( 'Tagged:', 'instagram-feed' ); ?></label>
1093
- </div>
1094
- <div class="sbi_col sbi_two">
1095
- <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1096
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1097
-
1098
- <p class="sbi_tooltip"><?php _e( 'Display posts that your account has been tagged in.', 'instagram-feed' ); ?></p>
1099
- </div>
1100
- </div>
1101
-
1102
- <div class="sbi_pro sbi_row sbi_mixed_directions">
1103
- <div class="sbi_col sbi_one">
1104
- <input type="radio" name="sb_instagram_type" disabled />
1105
- <label class="sbi_radio_label" for="sb_instagram_type_mixed">Mixed:</label>
1106
- </div>
1107
- <div class="sbi_col sbi_two">
1108
- <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1109
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1110
-
1111
- <div class="sbi_tooltip sbi_type_tooltip">
1112
- <p>
1113
- <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add the user name or hashtag for each feed into the shortcode, like so: %s. This will combine a user feed and a hashtag feed into the same feed.', 'instagram-feed'), 'type="mixed"', '<code>[instagram-feed type="mixed" user="smashballoon" hashtag="#awesomeplugins"]</code>' ); ?>
1114
- </p>
1115
- <p style="padding-top: 8px;"><b>Note:</b> To display a hashtag feed, it is required that you first connect an Instagram Business Profile using the <b>"Connect an Instagram Account"</b> button above. &nbsp;<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">Why is this required?</a>
1116
- </p>
1117
- </div>
1118
- </div>
1119
-
1120
- </div>
1121
-
1122
- <div class="sbi_row sbi_pro">
1123
- <br>
1124
- <a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);" style="margin-left: 0;"><i class="fa fa-question-circle" aria-hidden="true" style="margin-right: 6px;"></i><?php _e('Combine multiple feed types into a single feed', 'instagram-feed'); ?></a>
1125
- <p class="sbi_tooltip">
1126
- <b><?php _e( 'Please note: this is only available in the <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=multipletypes" target="_blank">Pro version</a>', 'instagram-feed' ); ?>.</b><br />
1127
- <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add each user name or hashtag of each feed into the shortcode, like so: %s. This will combine a user feed and a hashtag feed into the same feed.', 'instagram-feed'), 'type="mixed"', '<code>[instagram-feed type="mixed" user="smashballoon" hashtag="#awesomeplugins"]</code>' ); ?>
1128
- </p>
1129
- </div>
1130
-
1131
- </td>
1132
- </tr>
1133
-
1134
- <tr>
1135
- <th class="bump-left"><label for="sb_instagram_preserve_settings" class="bump-left"><?php _e("Preserve settings when plugin is removed", 'instagram-feed'); ?></label></th>
1136
- <td>
1137
- <input name="sb_instagram_preserve_settings" type="checkbox" id="sb_instagram_preserve_settings" <?php if($sb_instagram_preserve_settings == true) echo "checked"; ?> />
1138
- <label for="sb_instagram_preserve_settings"><?php _e('Yes', 'instagram-feed'); ?></label>
1139
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1140
- <p class="sbi_tooltip"><?php _e('When removing the plugin your settings are automatically erased. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.', 'instagram-feed'); ?></p>
1141
- </td>
1142
- </tr>
1143
-
1144
-
1145
- <tr valign="top" class="sbi_cron_cache_opts">
1146
- <th scope="row"><?php _e( 'Check for new posts', 'instagram-feed' ); ?></th>
1147
- <td>
1148
- <div class="sbi_row">
1149
- <input type="radio" name="sbi_caching_type" id="sbi_caching_type_cron" value="background" <?php if ( $sbi_caching_type === 'background' ) echo 'checked'; ?>>
1150
- <label for="sbi_caching_type_cron"><?php _e( 'In the background', 'instagram-feed' ); ?></label>
1151
- <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 2px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
1152
- <p class="sbi_tooltip sbi-more-info"><?php _e( 'Your Instagram post data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data', 'instagram-feed' ); ?>:<br><br>
1153
- <?php _e( '<b>1. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from Instagram when the page first loads, but then after that will check in the background on the schedule selected - unless the cache is cleared.', 'instagram-feed' ); ?>
1154
- <br><br>
1155
- <?php _e( '<b>2. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check Instagram for new posts the next time that the feed is loaded. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you\'re experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>\'Force cache to clear on interval\'</b> which is located on the \'Customize\' tab.', 'instagram-feed' ) . '</p>'; ?>
1156
-
1157
- </div>
1158
- <div class="sbi_row sbi-caching-cron-options" style="display: block;">
1159
-
1160
- <select name="sbi_cache_cron_interval" id="sbi_cache_cron_interval">
1161
- <option value="30mins" <?php if ( $sbi_cache_cron_interval === '30mins' ) echo 'selected'; ?>><?php _e( 'Every 30 minutes', 'instagram-feed' ); ?></option>
1162
- <option value="1hour" <?php if ( $sbi_cache_cron_interval === '1hour' ) echo 'selected'; ?>><?php _e( 'Every hour', 'instagram-feed' ); ?></option>
1163
- <option value="12hours" <?php if ( $sbi_cache_cron_interval === '12hours' ) echo 'selected'; ?>><?php _e( 'Every 12 hours', 'instagram-feed' ); ?></option>
1164
- <option value="24hours" <?php if ( $sbi_cache_cron_interval === '24hours' ) echo 'selected'; ?>><?php _e( 'Every 24 hours', 'instagram-feed' ); ?></option>
1165
- </select>
1166
-
1167
- <div id="sbi-caching-time-settings" style="display: none;">
1168
- <?php _e('at' ); ?>
1169
-
1170
- <select name="sbi_cache_cron_time" style="width: 80px">
1171
- <option value="1" <?php if ( $sbi_cache_cron_time === '1' ) echo 'selected'; ?>>1:00</option>
1172
- <option value="2" <?php if ( $sbi_cache_cron_time === '2' ) echo 'selected'; ?>>2:00</option>
1173
- <option value="3" <?php if ( $sbi_cache_cron_time === '3' ) echo 'selected'; ?>>3:00</option>
1174
- <option value="4" <?php if ( $sbi_cache_cron_time === '4' ) echo 'selected'; ?>>4:00</option>
1175
- <option value="5" <?php if ( $sbi_cache_cron_time === '5' ) echo 'selected'; ?>>5:00</option>
1176
- <option value="6" <?php if ( $sbi_cache_cron_time === '6' ) echo 'selected'; ?>>6:00</option>
1177
- <option value="7" <?php if ( $sbi_cache_cron_time === '7' ) echo 'selected'; ?>>7:00</option>
1178
- <option value="8" <?php if ( $sbi_cache_cron_time === '8' ) echo 'selected'; ?>>8:00</option>
1179
- <option value="9" <?php if ( $sbi_cache_cron_time === '9' ) echo 'selected'; ?>>9:00</option>
1180
- <option value="10" <?php if ( $sbi_cache_cron_time === '10' ) echo 'selected'; ?>>10:00</option>
1181
- <option value="11" <?php if ( $sbi_cache_cron_time === '11' ) echo 'selected'; ?>>11:00</option>
1182
- <option value="0" <?php if ( $sbi_cache_cron_time === '0' ) echo 'selected'; ?>>12:00</option>
1183
- </select>
1184
-
1185
- <select name="sbi_cache_cron_am_pm" style="width: 50px">
1186
- <option value="am" <?php if ( $sbi_cache_cron_am_pm === 'am' ) echo 'selected'; ?>>AM</option>
1187
- <option value="pm" <?php if ( $sbi_cache_cron_am_pm === 'pm' ) echo 'selected'; ?>>PM</option>
1188
- </select>
1189
- </div>
1190
-
1191
- <?php
1192
- if ( wp_next_scheduled( 'sbi_feed_update' ) ) {
1193
- $time_format = get_option( 'time_format' );
1194
- if ( ! $time_format ) {
1195
- $time_format = 'g:i a';
1196
- }
1197
- //
1198
- $schedule = wp_get_schedule( 'sbi_feed_update' );
1199
- if ( $schedule == '30mins' ) $schedule = __( 'every 30 minutes', 'instagram-feed' );
1200
- if ( $schedule == 'twicedaily' ) $schedule = __( 'every 12 hours', 'instagram-feed' );
1201
- $sbi_next_cron_event = wp_next_scheduled( 'sbi_feed_update' );
1202
- echo '<p class="sbi-caching-sched-notice"><span><b>' . __( 'Next check', 'instagram-feed' ) . ': ' . date( $time_format, $sbi_next_cron_event + sbi_get_utc_offset() ) . ' (' . $schedule . ')</b> - ' . __( 'Note: Saving the settings on this page will clear the cache and reset this schedule', 'instagram-feed' ) . '</span></p>';
1203
- } else {
1204
- echo '<p style="font-size: 11px; color: #666;">' . __( 'Nothing currently scheduled', 'instagram-feed' ) . '</p>';
1205
- }
1206
- ?>
1207
-
1208
- </div>
1209
- <div class="sbi_row">
1210
- <input type="radio" name="sbi_caching_type" id="sbi_caching_type_page" value="page" <?php if ( $sbi_caching_type === 'page' ) echo 'checked'; ?>>
1211
- <label for="sbi_caching_type_page"><?php _e( 'When the page loads', 'instagram-feed' ); ?></label>
1212
- </div>
1213
- <div class="sbi_row sbi-caching-page-options" style="display: none;">
1214
- <?php _e( 'Every', 'instagram-feed' ); ?>:
1215
- <input name="sb_instagram_cache_time" type="text" value="<?php echo esc_attr( $sb_instagram_cache_time ); ?>" size="4" />
1216
- <select name="sb_instagram_cache_time_unit">
1217
- <option value="minutes" <?php if($sb_instagram_cache_time_unit == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes', 'instagram-feed'); ?></option>
1218
- <option value="hours" <?php if($sb_instagram_cache_time_unit == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'instagram-feed'); ?></option>
1219
- <option value="days" <?php if($sb_instagram_cache_time_unit == "days") echo 'selected="selected"' ?> ><?php _e('Days', 'instagram-feed'); ?></option>
1220
- </select>
1221
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1222
- <p class="sbi_tooltip"><?php _e('Your Instagram posts are temporarily cached by the plugin in your WordPress database. You can choose how long the posts should be cached for. If you set the time to 1 hour then the plugin will clear the cache after that length of time and check Instagram for posts again.', 'instagram-feed'); ?></p>
1223
- </div>
1224
-
1225
- </td>
1226
- </tr>
1227
-
1228
- </tbody>
1229
- </table>
1230
-
1231
- <?php submit_button(); ?>
1232
- </form>
1233
-
1234
- <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php _e('Next Step: <a href="?page=sb-instagram-feed&tab=customize">Customize your Feed</a>', 'instagram-feed'); ?></p>
1235
-
1236
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=supportpage&utm_medium=setupdirections" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
1237
-
1238
-
1239
- <?php } // End Configure tab ?>
1240
-
1241
- <?php if ( $sbi_active_tab == 'allfeeds' ) {
1242
- $locator_summary = SB_Instagram_Feed_Locator::summary();
1243
- include_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/admin/templates/locator-summary.php';
1244
- } ?>
1245
-
1246
-
1247
- <?php if( $sbi_active_tab == 'customize' ) { //Start Configure tab ?>
1248
-
1249
- <p class="sb_instagram_contents_links" id="general">
1250
- <span><?php _e( 'Quick links:', 'instagram-feed' ); ?> </span>
1251
- <a href="#general"><?php _e( 'General', 'instagram-feed' ); ?></a>
1252
- <a href="#layout"><?php _e( 'Layout', 'instagram-feed' ); ?></a>
1253
- <a href="#photos"><?php _e( 'Photos', 'instagram-feed' ); ?></a>
1254
- <a href="#headeroptions"><?php _e( 'Header', 'instagram-feed' ); ?></a>
1255
- <a href="#loadmore"><?php _e( "'Load More' Button", 'instagram-feed' ); ?></a>
1256
- <a href="#follow"><?php _e( "'Follow' Button", 'instagram-feed' ); ?></a>
1257
- <a href="#gdpr"><?php _e( 'GDPR', 'instagram-feed' ); ?></a>
1258
- <a href="#customcss"><?php _e( 'Custom CSS', 'instagram-feed' ); ?></a>
1259
- <a href="#customjs"><?php _e( 'Custom JavaScript', 'instagram-feed' ); ?></a>
1260
- </p>
1261
-
1262
- <input type="hidden" name="<?php echo $sb_instagram_customize_hidden_field; ?>" value="Y">
1263
-
1264
- <h3><?php _e( 'General', 'instagram-feed' ); ?></h3>
1265
-
1266
- <table class="form-table">
1267
- <tbody>
1268
- <tr valign="top">
1269
- <th scope="row"><label><?php _e('Width of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> width widthunit
1270
- Eg: width=50 widthunit=%</code></th>
1271
- <td>
1272
- <input name="sb_instagram_width" type="text" value="<?php echo esc_attr( $sb_instagram_width ); ?>" id="sb_instagram_width" size="4" maxlength="4" />
1273
- <select name="sb_instagram_width_unit" id="sb_instagram_width_unit">
1274
- <option value="px" <?php if($sb_instagram_width_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1275
- <option value="%" <?php if($sb_instagram_width_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1276
- </select>
1277
- <div id="sb_instagram_width_options">
1278
- <input name="sb_instagram_feed_width_resp" type="checkbox" id="sb_instagram_feed_width_resp" <?php if($sb_instagram_feed_width_resp == true) echo "checked"; ?> /><label for="sb_instagram_feed_width_resp"><?php _e('Set to be 100% width on mobile?', 'instagram-feed'); ?></label>
1279
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does this mean?', 'instagram-feed' ); ?></a>
1280
- <p class="sbi_tooltip"><?php _e("If you set a width on the feed then this will be used on mobile as well as desktop. Check this setting to set the feed width to be 100% on mobile so that it is responsive.", 'instagram-feed'); ?></p>
1281
- </div>
1282
- </td>
1283
- </tr>
1284
- <tr valign="top">
1285
- <th scope="row"><label><?php _e('Height of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> height heightunit
1286
- Eg: height=500 heightunit=px</code></th>
1287
- <td>
1288
- <input name="sb_instagram_height" type="text" value="<?php echo esc_attr( $sb_instagram_height ); ?>" size="4" maxlength="4" />
1289
- <select name="sb_instagram_height_unit">
1290
- <option value="px" <?php if($sb_instagram_height_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1291
- <option value="%" <?php if($sb_instagram_height_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1292
- </select>
1293
- </td>
1294
- </tr>
1295
- <tr valign="top">
1296
- <th scope="row"><label><?php _e('Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> background
1297
- Eg: background=d89531</code></th>
1298
- <td>
1299
- <input name="sb_instagram_background" type="text" value="<?php echo esc_attr( $sb_instagram_background ); ?>" class="sbi_colorpick" />
1300
- </td>
1301
- </tr>
1302
- </tbody>
1303
- </table>
1304
-
1305
- <hr id="layout" />
1306
- <h3><?php _e('Layout', 'instagram-feed'); ?></h3>
1307
-
1308
- <table class="form-table">
1309
- <tbody>
1310
- <?php
1311
- $selected_type = isset( $sb_instagram_layout_type ) ? $sb_instagram_layout_type : 'grid';
1312
- $layout_types = array(
1313
- 'grid' => __( 'Grid', 'instagram-feed' ),
1314
- 'carousel' => __( 'Carousel', 'instagram-feed' ),
1315
- 'masonry' => __( 'Masonry', 'instagram-feed' ),
1316
- 'highlight' => __( 'Highlight', 'instagram-feed' )
1317
- );
1318
- $layout_images = array(
1319
- 'grid' => SBI_PLUGIN_URL . 'img/grid.png',
1320
- 'carousel' => SBI_PLUGIN_URL . 'img/carousel.png',
1321
- 'masonry' => SBI_PLUGIN_URL . 'img/masonry.png',
1322
- 'highlight' => SBI_PLUGIN_URL . 'img/highlight.png'
1323
- );
1324
- ?>
1325
- <tr valign="top">
1326
- <th scope="row" class="sbi_pro"><label title="<?php _e('Click for shortcode option', 'instagram-feed'); ?>"><?php _e('Layout Type', 'instagram-feed'); ?></label><br /><span class="sbi_note" style="margin: 5px 0 0 0; font-weight: normal;"><?php _e('Select a layout to see associated<br />options', 'instagram-feed'); ?></span></th>
1327
- <td>
1328
- <div class="sbi_layouts">
1329
- <?php foreach( $layout_types as $layout_type => $label ) : ?>
1330
- <div class="sbi_layout_cell sbi_pro">
1331
- <input class="sb_layout_type" id="sb_layout_type_<?php echo esc_attr( $layout_type ); ?>" name="sb_instagram_layout_type" type="radio" value="<?php echo esc_attr( $layout_type ); ?>" <?php if ( $selected_type === $layout_type ) echo 'checked'; ?>/><label for="sb_layout_type_<?php echo esc_attr( $layout_type ); ?>"><span class="sbi_label"><?php echo esc_html( $label ); ?></span><img src="<?php echo esc_url( $layout_images[ $layout_type ] ); ?>" /></label>
1332
- </div>
1333
- <?php endforeach; ?>
1334
-
1335
- <p class="sbi_pro_tooltip"><?php _e('Upgrade to the Pro version to unlock these layouts', 'instagram-feed'); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1336
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=layouts" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php _e('Pro', 'instagram-feed'); ?></a>
1337
-
1338
- </div>
1339
- <div class="sb_layout_options_wrap sbi_pro">
1340
- <a href="JavaScript:void(0);" class="sbi_close_options"><i class="fa fa-close"></i></a>
1341
- <div class="sb_instagram_layout_settings sbi_layout_type_grid">
1342
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('A uniform grid of square-cropped images.', 'instagram-feed'); ?></span>
1343
- </div>
1344
- <div class="sb_instagram_layout_settings sbi_layout_type_masonry">
1345
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Images in their original aspect ratios with no vertical space between posts.', 'instagram-feed'); ?></span>
1346
- </div>
1347
- <div class="sb_instagram_layout_settings sbi_layout_type_carousel">
1348
- <div class="sb_instagram_layout_setting">
1349
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Posts are displayed in a slideshow carousel.', 'instagram-feed'); ?></span>
1350
- </div>
1351
- <div class="sb_instagram_layout_setting">
1352
-
1353
- <label><?php _e('Number of Rows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselrows
1354
- Eg: carouselrows=2</code>
1355
- <br>
1356
- <span class="sbi_note" style="margin: -5px 0 -10px 0; display: block;"><?php _e('Use the "Number of Columns" setting below this section to set how many posts are visible in the carousel at a given time.', 'instagram-feed'); ?></span>
1357
- <br>
1358
- <select name="sb_instagram_carousel_rows" id="sb_instagram_carousel_rows">
1359
- <option value="1">1</option>
1360
- <option value="2" selected="selected">2</option>
1361
- </select>
1362
- </div>
1363
- <div class="sb_instagram_layout_setting">
1364
- <label><?php _e('Loop Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselloop
1365
- Eg: carouselloop=rewind
1366
- carouselloop=infinity</code>
1367
- <br>
1368
- <select name="sb_instagram_carousel_loop" id="sb_instagram_carousel_loop">
1369
- <option value="rewind"><?php _e('Rewind', 'instagram-feed'); ?></option>
1370
- <option value="infinity" selected="selected"><?php _e('Infinity', 'instagram-feed'); ?></option>
1371
- </select>
1372
- </div>
1373
- <div class="sb_instagram_layout_setting">
1374
- <input type="checkbox" name="sb_instagram_carousel_arrows" id="sb_instagram_carousel_arrows" checked="checked">
1375
- <label><?php _e('Show Navigation Arrows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselarrows
1376
- Eg: carouselarrows=true</code>
1377
- </div>
1378
- <div class="sb_instagram_layout_setting">
1379
- <input type="checkbox" name="sb_instagram_carousel_pag" id="sb_instagram_carousel_pag">
1380
- <label><?php _e('Show Pagination', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselpag
1381
- Eg: carouselpag=true</code>
1382
- </div>
1383
- <div class="sb_instagram_layout_setting">
1384
- <input type="checkbox" name="sb_instagram_carousel_autoplay" id="sb_instagram_carousel_autoplay">
1385
- <label><?php _e('Enable Autoplay', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselautoplay
1386
- Eg: carouselautoplay=true</code>
1387
- </div>
1388
- <div class="sb_instagram_layout_setting">
1389
- <label><?php _e('Interval Time', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouseltime
1390
- Eg: carouseltime=8000</code>
1391
- <br>
1392
- <input name="sb_instagram_carousel_interval" type="text" value="5000" size="6"><?php _e("miliseconds", 'instagram-feed'); ?>
1393
- </div>
1394
- </div>
1395
-
1396
- <div class="sb_instagram_layout_settings sbi_layout_type_highlight">
1397
- <div class="sb_instagram_layout_setting">
1398
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Masonry style, square-cropped, image only (no captions or likes/comments below image). "Highlighted" posts are twice as large.', 'instagram-feed'); ?></span>
1399
- </div>
1400
- <div class="sb_instagram_layout_setting">
1401
- <label title="Click for shortcode option"><?php _e('Highlighting Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlighttype
1402
- Eg: highlighttype=pattern</code>
1403
- <br>
1404
- <select name="sb_instagram_highlight_type" id="sb_instagram_highlight_type">
1405
- <option value="pattern" selected="selected"><?php _e('Pattern', 'instagram-feed'); ?></option>
1406
- <option value="id"><?php _e('Post ID', 'instagram-feed'); ?></option>
1407
- <option value="hashtag"><?php _e('Hashtag', 'instagram-feed'); ?></option>
1408
- </select>
1409
- </div>
1410
- <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1411
- <label></label><code class="sbi_shortcode"> highlightoffset
1412
- Eg: highlightoffset=2</code>
1413
- <br>
1414
- <input name="sb_instagram_highlight_offset" type="number" min="0" value="0" style="width: 50px;">
1415
- </div>
1416
- <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1417
- <label><?php _e('Pattern', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlightpattern
1418
- Eg: highlightpattern=3</code>
1419
- <br>
1420
- <span><?php _e('Highlight every', 'instagram-feed'); ?></span><input name="sb_instagram_highlight_factor" type="number" min="2" value="6" style="width: 50px;"><span><?php _e('posts', 'instagram-feed'); ?></span>
1421
- </div>
1422
- <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_hashtag sb_instagram_layout_setting" style="display: none;">
1423
- <label><?php _e('Highlight Posts with these Hashtags', 'instagram-feed'); ?></label>
1424
- <input name="sb_instagram_highlight_hashtag" id="sb_instagram_highlight_hashtag" type="text" size="40" value="#fishing">&nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is this?', 'instagram-feed'); ?></a>
1425
- <br>
1426
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate multiple hashtags using commas', 'instagram-feed'); ?></span>
1427
-
1428
-
1429
- <p class="sbi_tooltip"><?php _e('You can use this setting to highlight posts by a hashtag. Use a specified hashtag in your posts and they will be automatically highlighted in your feed.', 'instagram-feed'); ?></p>
1430
- </div>
1431
- <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_ids sb_instagram_layout_setting" style="display: none;">
1432
- <label><?php _e('Highlight Posts by ID', 'instagram-feed'); ?></label>
1433
- <textarea name="sb_instagram_highlight_ids" id="sb_instagram_highlight_ids" style="width: 100%;" rows="3">sbi_1852317219231323590_3269008872</textarea>
1434
- <br>
1435
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate IDs using commas', 'instagram-feed'); ?></span>
1436
-
1437
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is this?', 'instagram-feed'); ?></a>
1438
- <p class="sbi_tooltip"><?php _e('You can use this setting to highlight posts by their ID. Enable and use "moderation mode", check the box to show post IDs underneath posts, then copy and paste IDs into this text box.', 'instagram-feed'); ?></p>
1439
- </div>
1440
- </div>
1441
-
1442
- </div>
1443
- </td>
1444
- </tr>
1445
- <tr valign="top">
1446
- <th scope="row"><label><?php _e('Number of Photos', 'instagram-feed'); ?></label><code class="sbi_shortcode"> num
1447
- Eg: num=6</code></th>
1448
- <td>
1449
- <input name="sb_instagram_num" type="text" value="<?php echo esc_attr( $sb_instagram_num ); ?>" size="4" maxlength="4" />
1450
- <span class="sbi_note"><?php _e('Number of photos to show initially.', 'instagram-feed'); ?></span>
1451
- </td>
1452
- </tr>
1453
- <tr valign="top">
1454
- <th scope="row"><label><?php _e('Number of Columns', 'instagram-feed'); ?></label><code class="sbi_shortcode"> cols
1455
- Eg: cols=3</code></th>
1456
- <td>
1457
- <select name="sb_instagram_cols">
1458
- <option value="1" <?php if($sb_instagram_cols == "1") echo 'selected="selected"' ?> ><?php _e('1', 'instagram-feed'); ?></option>
1459
- <option value="2" <?php if($sb_instagram_cols == "2") echo 'selected="selected"' ?> ><?php _e('2', 'instagram-feed'); ?></option>
1460
- <option value="3" <?php if($sb_instagram_cols == "3") echo 'selected="selected"' ?> ><?php _e('3', 'instagram-feed'); ?></option>
1461
- <option value="4" <?php if($sb_instagram_cols == "4") echo 'selected="selected"' ?> ><?php _e('4', 'instagram-feed'); ?></option>
1462
- <option value="5" <?php if($sb_instagram_cols == "5") echo 'selected="selected"' ?> ><?php _e('5', 'instagram-feed'); ?></option>
1463
- <option value="6" <?php if($sb_instagram_cols == "6") echo 'selected="selected"' ?> ><?php _e('6', 'instagram-feed'); ?></option>
1464
- <option value="7" <?php if($sb_instagram_cols == "7") echo 'selected="selected"' ?> ><?php _e('7', 'instagram-feed'); ?></option>
1465
- <option value="8" <?php if($sb_instagram_cols == "8") echo 'selected="selected"' ?> ><?php _e('8', 'instagram-feed'); ?></option>
1466
- <option value="9" <?php if($sb_instagram_cols == "9") echo 'selected="selected"' ?> ><?php _e('9', 'instagram-feed'); ?></option>
1467
- <option value="10" <?php if($sb_instagram_cols == "10") echo 'selected="selected"' ?> ><?php _e('10', 'instagram-feed'); ?></option>
1468
- </select>
1469
- </td>
1470
- </tr>
1471
- <tr valign="top">
1472
- <th scope="row"><label><?php _e('Padding around Images', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imagepadding imagepaddingunit</code></th>
1473
- <td>
1474
- <input name="sb_instagram_image_padding" type="text" value="<?php echo esc_attr( $sb_instagram_image_padding ); ?>" size="4" maxlength="4" />
1475
- <select name="sb_instagram_image_padding_unit">
1476
- <option value="px" <?php if($sb_instagram_image_padding_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1477
- <option value="%" <?php if($sb_instagram_image_padding_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1478
- </select>
1479
- </td>
1480
- </tr>
1481
- <tr valign="top">
1482
- <th scope="row"><label><?php _e("Disable mobile layout", 'instagram-feed'); ?></label><code class="sbi_shortcode"> disablemobile
1483
- Eg: disablemobile=true</code></th>
1484
- <td>
1485
- <input type="checkbox" name="sb_instagram_disable_mobile" id="sb_instagram_disable_mobile" <?php if($sb_instagram_disable_mobile == true) echo 'checked="checked"' ?> />
1486
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does this mean?', 'instagram-feed' ); ?></a>
1487
- <p class="sbi_tooltip"><?php _e("By default on mobile devices the layout automatically changes to use fewer columns. Checking this setting disables the mobile layout.", 'instagram-feed'); ?></p>
1488
- </td>
1489
- </tr>
1490
- </tbody>
1491
- </table>
1492
-
1493
- <?php submit_button(); ?>
1494
-
1495
- <hr id="photos" />
1496
- <h3><?php _e('Photos', 'instagram-feed'); ?></h3>
1497
-
1498
- <table class="form-table">
1499
- <tbody>
1500
- <tr valign="top">
1501
- <th scope="row"><label><?php _e('Sort Photos By', 'instagram-feed'); ?></label><code class="sbi_shortcode"> sortby
1502
- Eg: sortby=random</code></th>
1503
- <td>
1504
- <select name="sb_instagram_sort">
1505
- <option value="none" <?php if($sb_instagram_sort == "none") echo 'selected="selected"' ?> ><?php _e('Newest to oldest', 'instagram-feed'); ?></option>
1506
- <option value="random" <?php if($sb_instagram_sort == "random") echo 'selected="selected"' ?> ><?php _e('Random', 'instagram-feed'); ?></option>
1507
- </select>
1508
- </td>
1509
- </tr>
1510
- <tr valign="top">
1511
- <th scope="row"><label><?php _e('Image Resolution', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imageres
1512
- Eg: imageres=thumb</code></th>
1513
- <td>
1514
-
1515
- <select name="sb_instagram_image_res">
1516
- <option value="auto" <?php if($sb_instagram_image_res == "auto") echo 'selected="selected"' ?> ><?php _e('Auto-detect (recommended)', 'instagram-feed'); ?></option>
1517
- <option value="thumb" <?php if($sb_instagram_image_res == "thumb") echo 'selected="selected"' ?> ><?php _e('Thumbnail (150x150)', 'instagram-feed'); ?></option>
1518
- <option value="medium" <?php if($sb_instagram_image_res == "medium") echo 'selected="selected"' ?> ><?php _e('Medium (320x320)', 'instagram-feed'); ?></option>
1519
- <option value="full" <?php if($sb_instagram_image_res == "full") echo 'selected="selected"' ?> ><?php _e('Full size (640x640)', 'instagram-feed'); ?></option>
1520
- </select>
1521
-
1522
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does Auto-detect mean?', 'instagram-feed'); ?></a>
1523
- <p class="sbi_tooltip"><?php _e("Auto-detect means that the plugin automatically sets the image resolution based on the size of your feed.", 'instagram-feed'); ?></p>
1524
-
1525
- </td>
1526
- </tr>
1527
- </tbody>
1528
- </table>
1529
-
1530
- <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a></span>
1531
-
1532
- <div class="sbi-pro-options">
1533
- <p class="sbi-upgrade-link">
1534
- <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1535
- </p>
1536
- <table class="form-table">
1537
- <tbody>
1538
- <tr valign="top" class="sbi_pro">
1539
- <th scope="row"><label><?php _e('Media Type to Display','instagram-feed'); ?></label></th>
1540
- <td>
1541
- <select name="sb_instagram_media_type" disabled>
1542
- <option value="all"><?php _e('All','instagram-feed'); ?></option>
1543
- <option value="photos"><?php _e('Photos only','instagram-feed'); ?></option>
1544
- <option value="videos"><?php _e('Videos only','instagram-feed'); ?></option>
1545
- </select>
1546
- </td>
1547
- </tr>
1548
-
1549
- <tr valign="top" class="sbi_pro">
1550
- <th scope="row"><label><?php _e("Enable Pop-up Lightbox", 'instagram-feed'); ?></label></th>
1551
- <td>
1552
- <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1553
- </td>
1554
- </tr>
1555
-
1556
- <tr valign="top" class="sbi_pro">
1557
- <th scope="row"><label><?php _e("Link Posts to URL in Caption (Shoppable feed)",'instagram-feed'); ?></label></th>
1558
- <td>
1559
- <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1560
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e("What will this do?",'instagram-feed'); ?></a>
1561
- <p class="sbi_tooltip"><?php _e("Checking this box will change the link for each post to any url included in the caption for that Instagram post. The lightbox will be disabled. Visit <a href='https://smashballoon.com/make-a-shoppable-feed?utm_campaign=instagram-free&utm_source=settings&utm_medium=shoppable'>this link</a> to learn how this works.",'instagram-feed'); ?></p>
1562
- </td>
1563
- </tr>
1564
- </tbody>
1565
- </table>
1566
- </div>
1567
-
1568
-
1569
- <hr />
1570
- <h3><?php _e('Photo Hover Style','instagram-feed'); ?></h3>
1571
-
1572
- <p style="padding-bottom: 18px;">
1573
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=photohover" target="_blank"><?php _e('Upgrade to Pro to enable Photo Hover styles','instagram-feed'); ?></a><br />
1574
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options','instagram-feed'); ?></a>
1575
- </p>
1576
-
1577
- <div class="sbi-pro-options" style="margin-top: -15px;">
1578
- <table class="form-table">
1579
- <tbody>
1580
- <tr valign="top" class="sbi_pro">
1581
- <th scope="row"><label><?php _e('Hover Background Color', 'instagram-feed'); ?></label></th>
1582
- <td>
1583
- <input name="sb_hover_background" type="text" disabled class="sbi_colorpick" />
1584
- </td>
1585
- </tr>
1586
- <tr valign="top" class="sbi_pro">
1587
- <th scope="row"><label><?php _e('Hover Text Color', 'instagram-feed'); ?></label></th>
1588
- <td>
1589
- <input name="sb_hover_text" type="text" disabled class="sbi_colorpick" />
1590
- </td>
1591
- </tr>
1592
- <tr valign="top" class="sbi_pro">
1593
- <th scope="row"><label><?php _e('Information to display', 'instagram-feed'); ?></label></th>
1594
- <td>
1595
- <div>
1596
- <input name="sbi_hover_inc_username" type="checkbox" disabled />
1597
- <label for="sbi_hover_inc_username"><?php _e('Username', 'instagram-feed'); ?></label>
1598
- </div>
1599
- <div>
1600
- <input name="sbi_hover_inc_icon" type="checkbox" disabled />
1601
- <label for="sbi_hover_inc_icon"><?php _e('Expand Icon', 'instagram-feed'); ?></label>
1602
- </div>
1603
- <div>
1604
- <input name="sbi_hover_inc_date" type="checkbox" disabled />
1605
- <label for="sbi_hover_inc_date"><?php _e('Date', 'instagram-feed'); ?></label>
1606
- </div>
1607
- <div>
1608
- <input name="sbi_hover_inc_instagram" type="checkbox" disabled />
1609
- <label for="sbi_hover_inc_instagram"><?php _e('Instagram Icon/Link', 'instagram-feed'); ?></label>
1610
- </div>
1611
- <div>
1612
- <input name="sbi_hover_inc_location" type="checkbox" disabled />
1613
- <label for="sbi_hover_inc_location"><?php _e('Location', 'instagram-feed'); ?></label>
1614
- </div>
1615
- <div>
1616
- <input name="sbi_hover_inc_caption" type="checkbox" disabled />
1617
- <label for="sbi_hover_inc_caption"><?php _e('Caption', 'instagram-feed'); ?></label>
1618
- </div>
1619
- <div>
1620
- <input name="sbi_hover_inc_likes" type="checkbox" disabled />
1621
- <label for="sbi_hover_inc_likes"><?php _e('Like/Comment Icons', 'instagram-feed'); ?></label>
1622
- </div>
1623
- </td>
1624
- </tr>
1625
-
1626
- </tbody>
1627
- </table>
1628
- </div>
1629
-
1630
-
1631
- <hr />
1632
- <h3><?php _e( 'Carousel', 'instagram-feed' ); ?></h3>
1633
- <p style="padding-bottom: 18px;">
1634
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=carousel" target="_blank"><?php _e('Upgrade to Pro to enable Carousels', 'instagram-feed'); ?></a><br />
1635
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1636
- </p>
1637
-
1638
- <div class="sbi-pro-options" style="margin-top: -15px;">
1639
- <table class="form-table">
1640
- <tbody>
1641
- <tr valign="top" class="sbi_pro">
1642
- <th scope="row"><label><?php _e("Enable Carousel", 'instagram-feed'); ?></label></th>
1643
- <td>
1644
- <input type="checkbox" disabled />
1645
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1646
- <p class="sbi_tooltip"><?php _e("Enable this setting to create a carousel slider out of your photos.", 'instagram-feed'); ?></p>
1647
- </td>
1648
- </tr>
1649
- <tr valign="top" class="sbi_pro">
1650
- <th scope="row"><label><?php _e("Show Navigation Arrows", 'instagram-feed'); ?></label></th>
1651
- <td>
1652
- <input type="checkbox" disabled />
1653
- </td>
1654
- </tr>
1655
- <tr valign="top" class="sbi_pro">
1656
- <th scope="row"><label><?php _e("Show Pagination", 'instagram-feed'); ?></label></th>
1657
- <td>
1658
- <input type="checkbox" disabled />
1659
- </td>
1660
- </tr>
1661
- <tr valign="top" class="sbi_pro">
1662
- <th scope="row"><label><?php _e("Enable Autoplay", 'instagram-feed'); ?></label></th>
1663
- <td>
1664
- <input type="checkbox" disabled />
1665
- </td>
1666
- </tr>
1667
- <tr valign="top" class="sbi_pro">
1668
- <th scope="row"><label><?php _e("Interval Time", 'instagram-feed'); ?></label></th>
1669
- <td>
1670
- <input name="sb_instagram_carousel_interval" type="text" disabled size="6" /><?php _e("milliseconds", 'instagram-feed'); ?>
1671
- </td>
1672
- </tr>
1673
- </tbody>
1674
- </table>
1675
- </div>
1676
-
1677
-
1678
-
1679
- <hr id="headeroptions" />
1680
- <h3><?php _e("Header", 'instagram-feed'); ?></h3>
1681
- <table class="form-table">
1682
- <tbody>
1683
- <tr valign="top">
1684
- <th scope="row"><label><?php _e("Show Feed Header", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showheader
1685
- Eg: showheader=false</code></th>
1686
- <td>
1687
- <input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header" <?php if($sb_instagram_show_header == true) echo 'checked="checked"' ?> />
1688
- </td>
1689
- </tr>
1690
- <tr valign="top">
1691
- <th scope="row"><label><?php _e('Header Size', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headersize
1692
- Eg: headersize=medium</code></th>
1693
- <td>
1694
- <select name="sb_instagram_header_size" id="sb_instagram_header_size" style="float: left;">
1695
- <option value="small" <?php if($sb_instagram_header_size == "small") echo 'selected="selected"' ?> ><?php _e('Small', 'instagram-feed'); ?></option>
1696
- <option value="medium" <?php if($sb_instagram_header_size == "medium") echo 'selected="selected"' ?> ><?php _e('Medium', 'instagram-feed'); ?></option>
1697
- <option value="large" <?php if($sb_instagram_header_size == "large") echo 'selected="selected"' ?> ><?php _e('Large', 'instagram-feed'); ?></option>
1698
- </select>
1699
- </td>
1700
- </tr>
1701
- <tr valign="top">
1702
- <th scope="row"><label><?php _e("Show Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbio
1703
- Eg: showbio=false</code></th>
1704
- <td>
1705
- <?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
1706
- <input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio" <?php if($sb_instagram_show_bio == true) echo 'checked="checked"' ?> />
1707
- <span class="sbi_note"><?php _e("Only applies for Instagram accounts with bios", 'instagram-feed'); ?></span>
1708
- <div class="sb_instagram_box" style="display: block;">
1709
- <div class="sb_instagram_box_setting" style="display: block;">
1710
- <label style="padding-bottom: 0;"><?php _e("Add Custom Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode" style="margin-top: 5px;"> custombio
1711
- Eg: custombio="My custom bio."</code>
1712
- <br>
1713
- <span class="sbi_aside" style="padding-bottom: 5px; display: block;"><?php _e("Use your own custom bio text in the feed header. Bio text is automatically retrieved from Instagram for Business accounts.", 'instagram-feed'); ?></span>
1714
-
1715
- <textarea type="text" name="sb_instagram_custom_bio" id="sb_instagram_custom_bio" ><?php echo esc_textarea( stripslashes( $sb_instagram_custom_bio ) ); ?></textarea>
1716
- &nbsp;<a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php _e("Why is my bio not displaying automatically?", 'instagram-feed'); ?></a>
1717
- <p class="sbi_tooltip" style="padding: 10px 0 0 0; width: 99%;"><?php echo sprintf( __("Instagram is deprecating their old API for Personal accounts on June 1, 2020. The plugin supports their new API, however, their new API does not yet include the bio text for Personal accounts. If you require this feature then it is available if you convert your Instagram account from a Personal to a Business account by following %s. Note: If you previously had a Personal account connected then the plugin has saved the avatar for that feed and will continue to use it automatically.", 'instagram-feed'), '<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">these directions</a>' ); ?></p>
1718
- </div>
1719
- </div>
1720
-
1721
- </td>
1722
- </tr>
1723
-
1724
- <tr valign="top">
1725
- <th scope="row"><label><?php _e("Use Custom Avatar", 'instagram-feed'); ?></label><code class="sbi_shortcode"> customavatar
1726
- Eg: customavatar="https://my-website.com/avatar.jpg"</code></th>
1727
- <td>
1728
- <input type="text" name="sb_instagram_custom_avatar" class="large-text" id="sb_instagram_custom_avatar" value="<?php echo esc_attr( stripslashes( $sb_instagram_custom_avatar ) ); ?>" placeholder="https://example.com/avatar.jpg" />
1729
- <span class="sbi_aside"><?php _e("Avatar is automatically retrieved from Instagram for Business accounts", 'instagram-feed'); ?></span>
1730
- <br>
1731
- <a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php _e("Why is my avatar not displaying automatically?", 'instagram-feed'); ?></a>
1732
-
1733
- <p class="sbi_tooltip sbi_tooltip_under_text" style="padding: 10px 0 0 0;"><?php echo sprintf( __("Instagram is deprecating their old API for Personal accounts on June 1, 2020. The plugin supports their new API, however, their new API does not yet include the avatar image for Personal accounts. If you require this feature then it is available if you convert your Instagram account from a Personal to a Business account by following %s. Note: If you previously had a Personal account connected then the plugin has saved the bio text for that feed and will continue to use it automatically.", 'instagram-feed'), '<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">these directions</a>' ); ?></p>
1734
-
1735
- </td>
1736
- </tr>
1737
- <tr valign="top">
1738
- <th scope="row"><label><?php _e('Header Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headercolor
1739
- Eg: headercolor=fff</code></th>
1740
- <td>
1741
- <input name="sb_instagram_header_color" type="text" value="<?php echo esc_attr( $sb_instagram_header_color ); ?>" class="sbi_colorpick" />
1742
- </td>
1743
- </tr>
1744
- </tbody>
1745
- </table>
1746
-
1747
- <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a></span>
1748
-
1749
- <div class="sbi-pro-options">
1750
- <p class="sbi-upgrade-link">
1751
- <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=header" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1752
- </p>
1753
- <table class="form-table">
1754
- <tbody>
1755
- <tr valign="top" class="sbi_pro">
1756
- <th scope="row"><label><?php _e('Header Style','instagram-feed'); ?></label></th>
1757
- <td>
1758
- <select name="sb_instagram_header_style" style="float: left;">
1759
- <option value="circle"><?php _e('Standard','instagram-feed'); ?></option>
1760
- <option value="boxed"><?php _e('Boxed','instagram-feed'); ?></option>
1761
- <option value="centered"><?php _e('Centered','instagram-feed'); ?></option>
1762
- </select>
1763
- </td>
1764
- </tr>
1765
- <tr valign="top" class="sbi_pro">
1766
- <th scope="row"><label><?php _e("Show Number of Followers",'instagram-feed'); ?></label></th>
1767
- <td>
1768
- <input type="checkbox" disabled />
1769
- <span class="sbi_note"><?php _e("This only applies when displaying photos from a User ID",'instagram-feed'); ?></span>
1770
- </td>
1771
- </tr>
1772
- </tbody>
1773
- </table>
1774
- </div>
1775
-
1776
- <?php submit_button(); ?>
1777
-
1778
-
1779
- <hr />
1780
- <h3><?php _e("Caption", 'instagram-feed'); ?></h3>
1781
- <p style="padding-bottom: 18px;">
1782
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=caption" target="_blank"><?php _e("Upgrade to Pro to enable Photo Captions", 'instagram-feed'); ?></a><br />
1783
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e("Show Pro Options", 'instagram-feed'); ?></a>
1784
- </p>
1785
-
1786
- <div class="sbi-pro-options" style="margin-top: -15px;">
1787
- <table class="form-table">
1788
- <tbody>
1789
- <tr valign="top" class="sbi_pro">
1790
- <th scope="row"><label><?php _e("Show Caption", 'instagram-feed'); ?></label></th>
1791
- <td>
1792
- <input type="checkbox" disabled />
1793
- </td>
1794
- </tr>
1795
- <tr valign="top" class="sbi_pro">
1796
- <th scope="row"><label><?php _e("Maximum Text Length", 'instagram-feed'); ?></label></th>
1797
- <td>
1798
- <input disabled size="4" />Characters
1799
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1800
- <p class="sbi_tooltip"><?php _e("The number of characters of text to display in the caption. An elipsis link will be added to allow the user to reveal more text if desired.", 'instagram-feed'); ?></p>
1801
- </td>
1802
- </tr>
1803
- <tr valign="top" class="sbi_pro">
1804
- <th scope="row"><label><?php _e('Text Color', 'instagram-feed'); ?></label></th>
1805
- <td>
1806
- <input type="text" disabled class="sbi_colorpick" />
1807
- </td>
1808
- </tr>
1809
- <tr valign="top" class="sbi_pro">
1810
- <th scope="row"><label><?php _e('Text Size', 'instagram-feed'); ?></label></th>
1811
- <td>
1812
- <select name="sb_instagram_caption_size" style="width: 180px;" disabled>
1813
- <option value="inherit" ><?php _e('Inherit from theme', 'instagram-feed'); ?></option>
1814
- <option value="10" >10px</option>
1815
- <option value="11" >11px</option>
1816
- <option value="12" >12px</option>
1817
- <option value="13" >13px</option>
1818
- <option value="14" >14px</option>
1819
- <option value="16" >16px</option>
1820
- <option value="18" >18px</option>
1821
- <option value="20" >20px</option>
1822
- <option value="24" >24px</option>
1823
- <option value="28" >28px</option>
1824
- <option value="32" >32px</option>
1825
- <option value="36" >36px</option>
1826
- <option value="40" >40px</option>
1827
- </select>
1828
- </td>
1829
- </tr>
1830
- </tbody>
1831
- </table>
1832
- </div>
1833
-
1834
-
1835
- <hr />
1836
- <h3><?php _e("Likes &amp; Comments", 'instagram-feed'); ?></h3>
1837
- <p style="padding-bottom: 18px;">
1838
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=stats" target="_blank"><?php _e("Upgrade to Pro to enable Likes &amp; Comments", 'instagram-feed'); ?></a><br />
1839
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e("Show Pro Options", 'instagram-feed'); ?></a>
1840
- </p>
1841
-
1842
- <div class="sbi-pro-options" style="margin-top: -15px;">
1843
- <table class="form-table">
1844
- <tbody>
1845
- <tr valign="top" class="sbi_pro">
1846
- <th scope="row"><label><?php _e("Show Icons", 'instagram-feed'); ?></label></th>
1847
- <td>
1848
- <input type="checkbox" disabled />
1849
- </td>
1850
- </tr>
1851
- <tr valign="top" class="sbi_pro">
1852
- <th scope="row"><label><?php _e('Icon Color', 'instagram-feed'); ?></label></th>
1853
- <td>
1854
- <input type="text" disabled class="sbi_colorpick" />
1855
- </td>
1856
- </tr>
1857
- <tr valign="top" class="sbi_pro">
1858
- <th scope="row"><label><?php _e('Icon Size', 'instagram-feed'); ?></label></th>
1859
- <td>
1860
- <select disabled name="sb_instagram_meta_size" style="width: 180px;">
1861
- <option value="inherit"><?php _e('Inherit from theme', 'instagram-feed'); ?></option>
1862
- <option value="10" >10px</option>
1863
- <option value="11" >11px</option>
1864
- <option value="12" >12px</option>
1865
- <option value="13" >13px</option>
1866
- <option value="14" >14px</option>
1867
- <option value="16" >16px</option>
1868
- <option value="18" >18px</option>
1869
- <option value="20" >20px</option>
1870
- <option value="24" >24px</option>
1871
- <option value="28" >28px</option>
1872
- <option value="32" >32px</option>
1873
- <option value="36" >36px</option>
1874
- <option value="40" >40px</option>
1875
- </select>
1876
- </td>
1877
- </tr>
1878
- </tbody>
1879
- </table>
1880
- </div>
1881
-
1882
-
1883
- <hr />
1884
- <h3><?php _e('Lightbox Comments', 'instagram-feed'); ?></h3>
1885
-
1886
- <p style="padding-bottom: 18px;">
1887
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=comments" target="_blank"><?php _e('Upgrade to Pro to enable Comments', 'instagram-feed'); ?></a><br />
1888
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1889
- </p>
1890
-
1891
- <div class="sbi-pro-options" style="margin-top: -15px;">
1892
- <table class="form-table">
1893
- <tbody>
1894
-
1895
- <tr valign="top" class="sbi_pro">
1896
- <th scope="row"><label><?php _e('Show Comments in Lightbox', 'instagram-feed'); ?></label></th>
1897
- <td style="padding: 5px 10px 0 10px;">
1898
- <input type="checkbox" disabled style="margin-right: 15px;" />
1899
- <input class="button-secondary" style="margin-top: -5px;" disabled value="<?php echo esc_attr( 'Clear Comment Cache', 'instagram-feed' ); ?>" />
1900
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1901
- <p class="sbi_tooltip"><?php _e("This will remove the cached comments saved in the database", 'instagram-feed'); ?></p>
1902
- </td>
1903
- </tr>
1904
- <tr valign="top" class="sbi_pro">
1905
- <th scope="row"><label><?php _e('Number of Comments', 'instagram-feed'); ?></label></th>
1906
- <td>
1907
- <input name="sb_instagram_num_comments" type="text" disabled size="4" />
1908
- <span class="sbi_note"><?php _e('Max number of latest comments.', 'instagram-feed'); ?></span>
1909
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1910
- <p class="sbi_tooltip"><?php _e("This is the maximum number of comments that will be shown in the lightbox. If there are more comments available than the number set, only the latest comments will be shown", 'instagram-feed'); ?></p>
1911
- </td>
1912
- </tr>
1913
-
1914
- </tbody>
1915
- </table>
1916
- </div>
1917
-
1918
-
1919
- <hr id="loadmore" />
1920
- <h3><?php _e("'Load More' Button", 'instagram-feed'); ?></h3>
1921
- <table class="form-table">
1922
- <tbody>
1923
- <tr valign="top">
1924
- <th scope="row"><label><?php _e("Show the 'Load More' button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbutton
1925
- Eg: showbutton=false</code></th>
1926
- <td>
1927
- <input type="checkbox" name="sb_instagram_show_btn" id="sb_instagram_show_btn" <?php if($sb_instagram_show_btn == true) echo 'checked="checked"' ?> />
1928
- </td>
1929
- </tr>
1930
- <tr valign="top">
1931
- <th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttoncolor
1932
- Eg: buttoncolor=8224e3</code></th>
1933
- <td>
1934
- <input name="sb_instagram_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_btn_background ); ?>" class="sbi_colorpick" />
1935
- </td>
1936
- </tr>
1937
- <tr valign="top">
1938
- <th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontextcolor
1939
- Eg: buttontextcolor=eeee22</code></th>
1940
- <td>
1941
- <input name="sb_instagram_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_btn_text_color ); ?>" class="sbi_colorpick" />
1942
- </td>
1943
- </tr>
1944
- <tr valign="top">
1945
- <th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontext
1946
- Eg: buttontext="Show more.."</code></th>
1947
- <td>
1948
- <input name="sb_instagram_btn_text" type="text" value="<?php echo esc_attr( stripslashes( $sb_instagram_btn_text ) ); ?>" size="20" />
1949
- </td>
1950
- </tr>
1951
- </tbody>
1952
- </table>
1953
-
1954
- <?php submit_button(); ?>
1955
-
1956
- <hr id="follow" />
1957
- <h3><?php _e("'Follow' Button", 'instagram-feed'); ?></h3>
1958
- <table class="form-table">
1959
- <tbody>
1960
- <tr valign="top">
1961
- <th scope="row"><label><?php _e("Show the Follow button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showfollow
1962
- Eg: showfollow=true</code></th>
1963
- <td>
1964
- <input type="checkbox" name="sb_instagram_show_follow_btn" id="sb_instagram_show_follow_btn" <?php if($sb_instagram_show_follow_btn == true) echo 'checked="checked"' ?> />
1965
- </td>
1966
- </tr>
1967
-
1968
- <tr valign="top">
1969
- <th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followcolor
1970
- Eg: followcolor=28a1bf</code></th>
1971
- <td>
1972
- <input name="sb_instagram_folow_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_folow_btn_background ); ?>" class="sbi_colorpick" />
1973
- </td>
1974
- </tr>
1975
- <tr valign="top">
1976
- <th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtextcolor
1977
- Eg: followtextcolor=000</code></th>
1978
- <td>
1979
- <input name="sb_instagram_follow_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_follow_btn_text_color ); ?>" class="sbi_colorpick" />
1980
- </td>
1981
- </tr>
1982
- <tr valign="top">
1983
- <th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtext
1984
- Eg: followtext="Follow me"</code></th>
1985
- <td>
1986
- <input name="sb_instagram_follow_btn_text" type="text" value="<?php echo esc_attr( stripslashes( $sb_instagram_follow_btn_text ) ); ?>" size="30" />
1987
- </td>
1988
- </tr>
1989
- </tbody>
1990
- </table>
1991
-
1992
- <hr id="filtering" />
1993
- <h3><?php _e('Post Filtering', 'instagram-feed'); ?></h3>
1994
-
1995
- <p style="padding-bottom: 18px;">
1996
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=filtering" target="_blank"><?php _e('Upgrade to Pro to enable Post Filtering options', 'instagram-feed'); ?></a><br />
1997
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1998
- </p>
1999
-
2000
- <div class="sbi-pro-options" style="margin-top: -15px;">
2001
-
2002
- <table class="form-table">
2003
- <tbody>
2004
- <tr valign="top" class="sbi_pro">
2005
- <th scope="row"><label><?php _e('Remove photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
2006
- <td>
2007
- <div class="sb_instagram_apply_labels">
2008
- <p><?php _e('Apply to:', 'instagram-feed'); ?></p>
2009
- <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php _e('All feeds', 'instagram-feed'); ?></label>
2010
- <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php _e('One feed', 'instagram-feed'); ?></label>
2011
- </div>
2012
-
2013
- <input disabled name="sb_instagram_exclude_words" id="sb_instagram_exclude_words" type="text" style="width: 70%;" value="" />
2014
- <br />
2015
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate words/hashtags using commas', 'instagram-feed'); ?></span>
2016
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed'); ?></a>
2017
- <p class="sbi_tooltip"><?php _e("You can use this setting to remove photos which contain certain words or hashtags in the caption. Separate multiple words or hashtags using commas.", 'instagram-feed'); ?></p>
2018
- </td>
2019
- </tr>
2020
-
2021
- <tr valign="top" class="sbi_pro">
2022
- <th scope="row"><label><?php _e('Show photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
2023
- <td>
2024
- <div class="sb_instagram_apply_labels">
2025
- <p><?php _e('Apply to:', 'instagram-feed'); ?></p>
2026
- <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php _e('All feeds', 'instagram-feed'); ?></label>
2027
- <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php _e('One feed', 'instagram-feed'); ?></label>
2028
- </div>
2029
-
2030
- <input disabled name="sb_instagram_include_words" id="sb_instagram_include_words" type="text" style="width: 70%;" value="" />
2031
- <br />
2032
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate words/hashtags using commas', 'instagram-feed'); ?></span>
2033
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed'); ?></a>
2034
- <p class="sbi_tooltip"><?php _e("You can use this setting to only show photos which contain certain words or hashtags in the caption. For example, adding <code>sheep, cow, dog</code> will show any photos which contain either the word sheep, cow, or dog. Separate multiple words or hashtags using commas.", 'instagram-feed'); ?></p>
2035
- </td>
2036
- </tr>
2037
- </tbody>
2038
- </table>
2039
- </div>
2040
-
2041
-
2042
- <hr id="moderation" />
2043
- <h3><?php _e('Moderation', 'instagram-feed'); ?></h3>
2044
-
2045
- <p style="padding-bottom: 18px;">
2046
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=moderation" target="_blank"><?php _e('Upgrade to Pro to enable Moderation options', 'instagram-feed'); ?></a><br />
2047
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
2048
- </p>
2049
-
2050
- <div class="sbi-pro-options" style="margin-top: -15px;">
2051
- <table class="form-table">
2052
- <tbody>
2053
- <tr valign="top" class="sbi_pro">
2054
- <th scope="row"><label><?php _e('Moderation Type', 'instagram-feed'); ?></label></th>
2055
- <td>
2056
- <input class="sb_instagram_moderation_mode" checked="checked" disabled type="radio" value="visual" style="margin-top: 0;" /><label><?php _e('Visual', 'instagram-feed'); ?></label>
2057
- <input class="sb_instagram_moderation_mode" disabled type="radio" value="manual" style="margin-top: 0; margin-left: 10px;"/><label><?php _e('Manual', 'instagram-feed'); ?></label>
2058
-
2059
- <p class="sbi_tooltip" style="display: block;"><?php _e("<b>Visual Moderation Mode</b><br />This adds a button to each feed that will allow you to hide posts, block users, and create white lists from the front end using a visual interface. Visit <a href='https://smashballoon.com/guide-to-moderation-mode/?utm_campaign=instagram-free&utm_source=settings&utm_medium=moderationmode' target='_blank'>this page</a> for details", 'instagram-feed'); ?></p>
2060
-
2061
- </td>
2062
- </tr>
2063
-
2064
- <tr valign="top" class="sbi_pro">
2065
- <th scope="row"><label><?php _e('Only show posts by these users', 'instagram-feed'); ?></label></th>
2066
- <td>
2067
- <input type="text" style="width: 70%;" disabled /><br />
2068
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate usernames using commas', 'instagram-feed'); ?></span>
2069
-
2070
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
2071
- <p class="sbi_tooltip"><?php _e("You can use this setting to show photos only from certain users in your feed. Just enter the usernames here which you want to show. Separate multiple usernames using commas.", 'instagram-feed'); ?></p>
2072
- </td>
2073
- </tr>
2074
- <tr valign="top" class="sbi_pro">
2075
- <th scope="row"><label><?php _e('White lists', 'instagram-feed'); ?></label></th>
2076
- <td>
2077
- <div class="sbi_white_list_names_wrapper">
2078
- <?php _e("No white lists currently created", 'instagram-feed'); ?>
2079
- </div>
2080
-
2081
- <input disabled class="button-secondary" type="submit" value="<?php esc_attr_e( 'Clear White Lists', 'instagram-feed' ); ?>" />
2082
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);" style="display: inline-block; margin-top: 5px;"><?php _e("What is this?", 'instagram-feed'); ?></a>
2083
- <p class="sbi_tooltip"><?php _e("This will remove all of the white lists from the database", 'instagram-feed'); ?></p>
2084
- </td>
2085
- </tr>
2086
-
2087
- </tbody>
2088
- </table>
2089
- </div>
2090
-
2091
- <hr id="gdpr" />
2092
- <h3><?php _e('GDPR', 'instagram-feed'); ?></h3>
2093
-
2094
- <table class="form-table">
2095
- <tbody>
2096
- <tr>
2097
- <th class="bump-left"><label class="bump-left"><?php _e("Enable GDPR settings", 'instagram-feed'); ?></label><code class="sbi_shortcode"> gdpr
2098
- Eg: gdpr=yes</code></th>
2099
- <td>
2100
-
2101
- <?php
2102
- $select_options = array(
2103
- array(
2104
- 'label' => __( 'Automatic', 'instagram-feed' ),
2105
- 'value' => 'auto'
2106
- ),
2107
- array(
2108
- 'label' => __( 'Yes', 'instagram-feed' ),
2109
- 'value' => 'yes'
2110
- ),
2111
- array(
2112
- 'label' => __( 'No', 'instagram-feed' ),
2113
- 'value' => 'no'
2114
- )
2115
- )
2116
- ?>
2117
- <?php
2118
- $gdpr_list = "<ul class='sbi-list'>
2119
- <li>" . __('Only local images (not from Instagram\'s CDN) will be displayed in the feed.', 'instagram-feed') . "</li>
2120
- <li>" . __('Placeholder blank images will be displayed until images are available.', 'instagram-feed') . "</li>
2121
- </ul>";
2122
- ?>
2123
- <div>
2124
- <select name="gdpr" id="sbi_gdpr_setting">
2125
- <?php foreach ( $select_options as $select_option ) :
2126
- $selected = $select_option['value'] === $gdpr ? ' selected' : '';
2127
- ?>
2128
- <option value="<?php echo esc_attr( $select_option['value'] ); ?>"<?php echo $selected; ?> ><?php echo esc_html( $select_option['label'] ); ?></option>
2129
- <?php endforeach; ?>
2130
- </select>
2131
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2132
- <div class="sbi_tooltip gdpr_tooltip">
2133
-
2134
- <p><span><?php _e("Yes", "instagram-feed" ); ?>:</span> <?php _e("Enabling this setting prevents all images and videos from being loaded directly from Instagram's servers (CDN) to prevent any requests to external websites in your browser. To accommodate this, some features of the plugin will be disabled or limited.", "instagram-feed" ); ?> <a href="JavaScript:void(0);" class="sbi_show_gdpr_list"><?php _e( 'What will be limited?', 'instagram-feed' ); ?></a></p>
2135
-
2136
- <?php echo "<div class='sbi_gdpr_list'>" . $gdpr_list . '</div>'; ?>
2137
-
2138
-
2139
- <p><span><?php _e("No", "instagram-feed" ); ?>:</span> <?php _e("The plugin will still make some requests to load and display images and videos directly from Instagram.", "instagram-feed" ); ?></p>
2140
-
2141
-
2142
- <p><span><?php _e("Automatic", "instagram-feed" ); ?>:</span> <?php echo sprintf( __( 'The plugin will only load images and videos directly from Instagram if consent has been given by one of these integrated %s', 'instagram-feed' ), '<a href="https://smashballoon.com/doc/gdpr-plugin-list/?instagram" target="_blank" rel="noopener">' . __( 'GDPR cookie plugins', 'instagram-feed' ) . '</a>' ); ?></p>
2143
-
2144
- <p><?php echo sprintf( __( '%s to learn more about GDPR compliance in the Instagram Feed plugin.', 'instagram-feed' ), '<a href="https://smashballoon.com/doc/instagram-feed-gdpr-compliance/?instagram" target="_blank" rel="noopener">'. __( 'Click here', 'instagram-feed' ).'</a>' ); ?></p>
2145
- </div>
2146
- </div>
2147
-
2148
- <?php if ( ! SB_Instagram_GDPR_Integrations::gdpr_tests_successful( isset( $_GET['retest'] ) ) ) :
2149
- $errors = SB_Instagram_GDPR_Integrations::gdpr_tests_error_message();
2150
- ?>
2151
- <div class="sb_instagram_box sbi_gdpr_error">
2152
- <div class="sb_instagram_box_setting">
2153
- <p>
2154
- <strong><?php _e( 'Error:', 'instagram-feed' ); ?></strong> <?php _e("Due to a configuration issue on your web server, the GDPR setting is unable to be enabled.", "instagram-feed" ); ?></p>
2155
- <p>
2156
- <?php echo $errors; ?>
2157
- </p>
2158
- </div>
2159
- </div>
2160
- <?php else: ?>
2161
-
2162
- <div class="sbi_gdpr_auto">
2163
- <?php if ( SB_Instagram_GDPR_Integrations::gdpr_plugins_active() ) :
2164
- $active_plugin = SB_Instagram_GDPR_Integrations::gdpr_plugins_active();
2165
- ?>
2166
- <div class="sbi_gdpr_plugin_active">
2167
- <div class="sbi_active">
2168
- <p>
2169
- <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-check-circle fa-w-16 fa-2x"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z" class=""></path></svg>
2170
- <b><?php echo sprintf( __( '%s detected', 'instagram-feed' ), $active_plugin ); ?></b>
2171
- <br />
2172
- <?php _e( 'Some Instagram Feed features will be limited for visitors to ensure GDPR compliance until they give consent.', 'instagram-feed' ); ?>
2173
- <a href="JavaScript:void(0);" class="sbi_show_gdpr_list"><?php _e( 'What will be limited?', 'instagram-feed' ); ?></a>
2174
- </p>
2175
- <?php echo "<div class='sbi_gdpr_list'>" . $gdpr_list . '</div>'; ?>
2176
- </div>
2177
-
2178
- </div>
2179
- <?php else: ?>
2180
- <div class="sb_instagram_box">
2181
- <div class="sb_instagram_box_setting">
2182
- <p><?php echo sprintf( __( 'No GDPR consent plugin detected. Install a compatible %sGDPR consent plugin%s, or manually enable the setting above to display a GDPR compliant version of the feed to all visitors.', 'instagram-feed' ), '<a href="https://smashballoon.com/doc/gdpr-plugin-list/?instagram" target="_blank" rel="noopener">', '</a>' ); ?></p>
2183
- </div>
2184
- </div>
2185
- <?php endif; ?>
2186
- </div>
2187
-
2188
- <div class="sb_instagram_box sbi_gdpr_yes">
2189
- <div class="sb_instagram_box_setting">
2190
- <p><?php _e( "No requests will be made to third-party websites. To accommodate this, some features of the plugin will be limited:", 'instagram-feed' ); ?></p>
2191
- <?php echo $gdpr_list; ?>
2192
- </div>
2193
- </div>
2194
-
2195
- <div class="sb_instagram_box sbi_gdpr_no">
2196
- <div class="sb_instagram_box_setting">
2197
- <p><?php _e( "The plugin will function as normal and load images directly from Instagram.", 'instagram-feed' ); ?></p>
2198
- </div>
2199
- </div>
2200
-
2201
- <?php endif; ?>
2202
- </td>
2203
- </tr>
2204
-
2205
- </tbody>
2206
- </table>
2207
-
2208
- <hr id="customcss" />
2209
- <h3><?php _e('Misc', 'instagram-feed'); ?></h3>
2210
-
2211
- <table class="form-table">
2212
- <tbody>
2213
- <tr valign="top">
2214
- <td style="padding-bottom: 0;">
2215
- <?php _e('<strong style="font-size: 15px;">Custom CSS</strong><br />Enter your own custom CSS in the box below', 'instagram-feed'); ?>
2216
- </td>
2217
- </tr>
2218
- <tr valign="top">
2219
- <td>
2220
- <textarea name="sb_instagram_custom_css" id="sb_instagram_custom_css" style="width: 70%;" rows="7"><?php echo esc_textarea( stripslashes($sb_instagram_custom_css), 'instagram-feed' ); ?></textarea>
2221
- </td>
2222
- </tr>
2223
- <tr valign="top" id="customjs">
2224
- <td style="padding-bottom: 0;">
2225
- <?php _e('<strong style="font-size: 15px;">Custom JavaScript</strong><br />Enter your own custom JavaScript/jQuery in the box below', 'instagram-feed'); ?>
2226
- </td>
2227
- </tr>
2228
- <tr valign="top">
2229
- <td>
2230
- <textarea name="sb_instagram_custom_js" id="sb_instagram_custom_js" style="width: 70%;" rows="7"><?php echo esc_textarea( stripslashes($sb_instagram_custom_js), 'instagram-feed' ); ?></textarea>
2231
- </td>
2232
- </tr>
2233
- </tbody>
2234
- </table>
2235
- <table class="form-table">
2236
- <tbody>
2237
-
2238
- <tr valign="top">
2239
- <th scope="row"><label for="sb_instagram_ajax_theme" class="bump-left"><?php _e("Are you using an Ajax powered theme?", 'instagram-feed'); ?></label></th>
2240
- <td>
2241
- <input name="sb_instagram_ajax_theme" type="checkbox" id="sb_instagram_ajax_theme" <?php if($sb_instagram_ajax_theme == true) echo "checked"; ?> />
2242
- <label for="sb_instagram_ajax_theme"><?php _e('Yes', 'instagram-feed'); ?></label>
2243
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2244
- <p class="sbi_tooltip"><?php _e("When navigating your site, if your theme uses Ajax to load content into your pages (meaning your page doesn't refresh) then check this setting. If you're not sure then please check with the theme author.", 'instagram-feed'); ?></p>
2245
- </td>
2246
- </tr>
2247
-
2248
- <tr>
2249
- <th class="bump-left"><label class="bump-left"><?php _e("Image Resizing", 'instagram-feed'); ?></label></th>
2250
- <td>
2251
- <input name="sb_instagram_disable_resize" type="checkbox" id="sb_instagram_disable_resize" <?php if($sb_instagram_disable_resize == true) echo "checked"; ?> />
2252
- <label for="sb_instagram_disable_resize"><?php _e('Disable Local Image Storing and Resizing', 'instagram-feed'); ?></label><br><br>
2253
- <input name="sb_instagram_favor_local" type="checkbox" id="sb_instagram_favor_local" <?php if($sb_instagram_favor_local == true) echo "checked"; ?> />
2254
- <label for="sb_instagram_favor_local"><?php _e('Favor Local Images', 'instagram-feed'); ?></label><br><br>
2255
-
2256
- <input id="sbi_reset_resized" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Reset Resized Images' ); ?>" style="vertical-align: middle;"/>
2257
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2258
- <p class="sbi_tooltip"><?php _e("The plugin creates and stores resized versions of images in order to serve a more optimized resolution size in the feed. Click this button to clear all data related to resized images. Enable the setting to favor local images to always use a local, resized image if one is available.", 'instagram-feed'); ?></p>
2259
- </td>
2260
- </tr>
2261
-
2262
- <tr valign="top">
2263
- <th scope="row"><label><?php _e('API request size', 'instagram-feed'); ?></label><code class="sbi_shortcode"> minnum
2264
- Eg: minnum=25</code></th>
2265
- <td>
2266
- <input name="sb_instagram_minnum" type="number" min="0" max="100" value="<?php echo esc_attr( $sb_instagram_minnum ); ?>" />
2267
- <span class="sbi_note"><?php _e('Leave at "0" for default', 'instagram-feed'); ?></span>
2268
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2269
- <p class="sbi_tooltip"><?php _e("If your feed contains a lot of IG TV posts or your feed is not displaying any posts despite there being posts available on Instagram.com, try increasing this number to 25 or more.", 'instagram-feed'); ?></p>
2270
- </td>
2271
- </tr>
2272
-
2273
- <tr valign="top">
2274
- <th scope="row"><label><?php _e('Enqueue JS file in head', 'instagram-feed'); ?></label></th>
2275
- <td>
2276
- <input type="checkbox" name="enqueue_js_in_head" id="sb_instagram_enqueue_js_in_head" <?php if($enqueue_js_in_head == true) echo 'checked="checked"' ?> />
2277
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2278
- <p class="sbi_tooltip"><?php _e("Check this box if you'd like to enqueue the JavaScript file for the plugin in the head instead of the footer.", 'instagram-feed'); ?></p>
2279
- </td>
2280
- </tr>
2281
-
2282
- <tr valign="top">
2283
- <th scope="row"><label><?php _e('Enqueue CSS file with shortcode', 'instagram-feed'); ?></label></th>
2284
- <td>
2285
- <input type="checkbox" name="enqueue_css_in_shortcode" id="sb_instagram_enqueue_css_in_shortcode" <?php if($enqueue_css_in_shortcode == true) echo 'checked="checked"' ?> />
2286
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2287
- <p class="sbi_tooltip"><?php _e("Check this box if you'd like to only include the CSS file for the plugin when the feed is on the page.", 'instagram-feed'); ?></p>
2288
- </td>
2289
- </tr>
2290
-
2291
- <tr valign="top">
2292
- <th scope="row"><label><?php _e('Disable JS Image Loading', 'instagram-feed'); ?></label></th>
2293
- <td>
2294
- <input type="checkbox" name="disable_js_image_loading" id="sb_instagram_disable_js_image_loading" <?php if($disable_js_image_loading == true) echo 'checked="checked"' ?> />
2295
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2296
- <p class="sbi_tooltip"><?php _e("Check this box to have images loaded server side instead of with JS.", 'instagram-feed'); ?></p>
2297
- </td>
2298
- </tr>
2299
-
2300
- <tr valign="top">
2301
- <th><label><?php _e("Enable Backup Caching", 'instagram-feed'); ?></label></th>
2302
- <td class="sbi-customize-tab-opt">
2303
- <input name="sb_instagram_backup" type="checkbox" id="sb_instagram_backup" <?php if($sb_instagram_backup == true) echo "checked"; ?> />
2304
- <input id="sbi_clear_backups" class="button-secondary" type="submit" style="position: relative; top: -4px;" value="<?php esc_attr_e( 'Clear Backup Cache', 'instagram-feed' ); ?>" />
2305
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2306
- <p class="sbi_tooltip"><?php _e('Every feed will save a duplicate version of itself in the database to be used if the normal cache is not available.', 'instagram-feed'); ?></p>
2307
- </td>
2308
- </tr>
2309
-
2310
- <tr>
2311
- <th class="bump-left">
2312
- <label class="bump-left"><?php _e("Load initial posts with AJAX", 'instagram-feed'); ?></label>
2313
- </th>
2314
- <td>
2315
- <input name="sb_ajax_initial" type="checkbox" id="sb_ajax_initial" <?php if($sb_ajax_initial == true) echo "checked"; ?> />
2316
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2317
- <p class="sbi_tooltip"><?php _e("Initial posts will be loaded using AJAX instead of added to the page directly. If you use page caching, this will allow the feed to update according to the \"Check for new posts every\" setting on the \"Configure\" tab.", 'instagram-feed'); ?></p>
2318
- </td>
2319
- </tr>
2320
-
2321
- <tr>
2322
- <th class="bump-left">
2323
- <label for="sb_instagram_cron" class="bump-left"><?php _e("Force cache to clear on interval", 'instagram-feed'); ?></label>
2324
- </th>
2325
- <td>
2326
- <select name="sb_instagram_cron">
2327
- <option value="unset" <?php if($sb_instagram_cron == "unset") echo 'selected="selected"' ?> > - </option>
2328
- <option value="yes" <?php if($sb_instagram_cron == "yes") echo 'selected="selected"' ?> ><?php _e('Yes', 'instagram-feed'); ?></option>
2329
- <option value="no" <?php if($sb_instagram_cron == "no") echo 'selected="selected"' ?> ><?php _e('No', 'instagram-feed'); ?></option>
2330
- </select>
2331
-
2332
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2333
- <p class="sbi_tooltip"><?php _e("If you're experiencing an issue with the plugin not auto-updating then you can set this to 'Yes' to run a scheduled event behind the scenes which forces the plugin cache to clear on a regular basis and retrieve new data from Instagram.", 'instagram-feed'); ?></p>
2334
- </td>
2335
- </tr>
2336
- </tbody>
2337
- </table>
2338
- <table class="form-table">
2339
- <tbody>
2340
- <tr>
2341
- <th class="bump-left"><label class="bump-left"><?php _e("Enable Custom Templates", 'instagram-feed'); ?></label></th>
2342
- <td>
2343
- <input name="sb_instagram_custom_template" type="checkbox" id="sb_instagram_custom_template" <?php if($sb_instagram_custom_template == true) echo "checked"; ?> />
2344
- <label for="sb_instagram_custom_template"><?php _e('Yes', 'instagram-feed'); ?></label>
2345
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2346
- <p class="sbi_tooltip"><?php _e("The default HTML for the feed can be replaced with custom templates added to your theme's folder. Enable this setting to use these templates. See <a href=\"https://smashballoon.com/guide-to-creating-custom-templates/\" target=\"_blank\">this guide</a>", 'instagram-feed'); ?></p>
2347
- </td>
2348
- </tr>
2349
- <tr>
2350
- <th class="bump-left"><label class="bump-left"><?php _e("Disable Admin Error Notice", 'instagram-feed'); ?></label></th>
2351
- <td>
2352
- <input name="sb_instagram_disable_admin_notice" type="checkbox" id="sb_instagram_disable_admin_notice" <?php if($sb_instagram_disable_admin_notice == true) echo "checked"; ?> />
2353
- <label for="sb_instagram_disable_admin_notice"><?php _e('Yes', 'instagram-feed'); ?></label>
2354
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2355
- <p class="sbi_tooltip"><?php _e("This will permanently disable the feed error notice that displays in the bottom right corner for admins on the front end of your site.", 'instagram-feed'); ?></p>
2356
- </td>
2357
- </tr>
2358
- <tr>
2359
- <th class="bump-left"><label class="bump-left"><?php _e("Feed Issue Email Report", 'instagram-feed'); ?></label></th>
2360
- <td>
2361
- <input name="sb_instagram_enable_email_report" type="checkbox" id="sb_instagram_enable_email_report" <?php if($sb_instagram_enable_email_report == 'on') echo "checked"; ?> />
2362
- <label for="sb_instagram_enable_email_report"><?php _e('Yes', 'instagram-feed'); ?></label>
2363
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
2364
- <p class="sbi_tooltip"><?php _e("Instagram Feed will send a weekly notification email using your site's wp_mail() function if one or more of your feeds is not updating or is not displaying. If you're not receiving the emails in your inbox, you may need to configure an SMTP service using another plugin like WP Mail SMTP.", 'instagram-feed'); ?></p>
2365
-
2366
- <div class="sb_instagram_box" style="display: block;">
2367
- <div class="sb_instagram_box_setting">
2368
- <label><?php _e('Schedule Weekly on', 'instagram-feed'); ?></label><br>
2369
- <?php
2370
- $schedule_options = array(
2371
- array(
2372
- 'val' => 'monday',
2373
- 'label' => __( 'Monday', 'instagram-feed' )
2374
- ),
2375
- array(
2376
- 'val' => 'tuesday',
2377
- 'label' => __( 'Tuesday', 'instagram-feed' )
2378
- ),
2379
- array(
2380
- 'val' => 'wednesday',
2381
- 'label' => __( 'Wednesday', 'instagram-feed' )
2382
- ),
2383
- array(
2384
- 'val' => 'thursday',
2385
- 'label' => __( 'Thursday', 'instagram-feed' )
2386
- ),
2387
- array(
2388
- 'val' => 'friday',
2389
- 'label' => __( 'Friday', 'instagram-feed' )
2390
- ),
2391
- array(
2392
- 'val' => 'saturday',
2393
- 'label' => __( 'Saturday', 'instagram-feed' )
2394
- ),
2395
- array(
2396
- 'val' => 'sunday',
2397
- 'label' => __( 'Sunday', 'instagram-feed' )
2398
- ),
2399
- );
2400
-
2401
- if ( isset( $_GET['flag'] ) ){
2402
- echo '<span id="sbi-goto"></span>';
2403
- }
2404
- ?>
2405
- <select name="sb_instagram_email_notification" id="sb_instagram_email_notification">
2406
- <?php foreach ( $schedule_options as $schedule_option ) : ?>
2407
- <option value="<?php echo esc_attr( $schedule_option['val'] ) ; ?>" <?php if ( $schedule_option['val'] === $sb_instagram_email_notification ) { echo 'selected';} ?>><?php echo esc_html( $schedule_option['label'] ) ; ?></option>
2408
- <?php endforeach; ?>
2409
- </select>
2410
- </div>
2411
- <div class="sb_instagram_box_setting">
2412
- <label><?php _e('Email Recipients', 'instagram-feed'); ?></label><br><input class="regular-text" type="text" name="sb_instagram_email_notification_addresses" value="<?php echo esc_attr( $sb_instagram_email_notification_addresses ); ?>"><span class="sbi_note"><?php _e('separate multiple emails with commas', 'instagram-feed'); ?></span>
2413
- <br><br><?php _e( 'Emails not working?', 'instagram-feed' ) ?> <a href="https://smashballoon.com/email-report-is-not-in-my-inbox/" target="_blank"><?php _e( 'See our related FAQ', 'instagram-feed' ) ?></a>
2414
- </div>
2415
- </div>
2416
-
2417
- </td>
2418
- </tr>
2419
- <?php
2420
- $usage_tracking = get_option( 'sbi_usage_tracking', false );
2421
- if ( $usage_tracking !== false ) :
2422
-
2423
- if ( isset( $_POST['sb_instagram_enable_email_report'] ) ) {
2424
- $usage_tracking['enabled'] = false;
2425
- if ( isset( $_POST['sbi_usage_tracking_enable'] ) ) {
2426
- $usage_tracking['enabled'] = true;
2427
- }
2428
- update_option( 'sbi_usage_tracking', $usage_tracking, false );
2429
- }
2430
- $sbi_usage_tracking_enable = isset( $usage_tracking['enabled'] ) ? $usage_tracking['enabled'] : true;
2431
-
2432
- // only show this setting after they have opted in or opted out using the admin notice
2433
- ?>
2434
- <tr>
2435
-
2436
- <th class="bump-left"><label class="bump-left"><?php _e("Enable Usage Tracking", 'instagram-feed'); ?></label></th>
2437
- <td>
2438
- <input name="sbi_usage_tracking_enable" type="checkbox" id="sbi_usage_tracking_enable" <?php if( $sbi_usage_tracking_enable ) echo "checked"; ?> />
2439
- <label for="sbi_usage_tracking_enable"><?php _e('Yes', 'instagram-feed'); ?></label>
2440
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is usage tracking?', 'instagram-feed'); ?></a>
2441
- <p class="sbi_tooltip"><?php _e("Instagram Feed will record information and statistics about your site in order for the team at Smash Balloon to learn more about how our plugins are used. The plugin will never collect any sensitive information like access tokens, email addresses, or user information.", 'instagram-feed'); ?></p>
2442
- </td>
2443
- </tr>
2444
- <?php endif; ?>
2445
-
2446
- </tbody>
2447
- </table>
2448
-
2449
- <?php submit_button(); ?>
2450
-
2451
- </form>
2452
-
2453
- <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php _e('Next Step: <a href="?page=sb-instagram-feed&tab=display">Display your Feed</a>', 'instagram-feed'); ?></p>
2454
-
2455
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=settings&utm_medium=display" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
2456
-
2457
-
2458
- <?php } //End Customize tab ?>
2459
-
2460
-
2461
-
2462
- <?php if( $sbi_active_tab == 'display' ) { //Start Display tab ?>
2463
-
2464
- <h3><?php _e('Display your Feed', 'instagram-feed'); ?></h3>
2465
- <p><?php _e("Copy and paste the following shortcode directly into the page, post or widget where you'd like the feed to show up:", 'instagram-feed'); ?></p>
2466
- <input type="text" value="[instagram-feed]" size="16" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed'); ?>" />
2467
-
2468
- <h3 style="padding-top: 10px;"><?php _e( 'Multiple Feeds', 'instagram-feed' ); ?></h3>
2469
- <p><?php _e("If you'd like to display multiple feeds then you can set different settings directly in the shortcode like so:", 'instagram-feed'); ?>
2470
- <code>[instagram-feed num=9 cols=3]</code></p>
2471
- <p><?php _e( 'You can display as many different feeds as you like, on either the same page or on different pages, by just using the shortcode options below. For example:', 'instagram-feed' ); ?><br />
2472
- <code>[instagram-feed]</code><br />
2473
- <code>[instagram-feed num=4 cols=4 showfollow=false]</code><br />
2474
- </p>
2475
- <p><?php _e("See the table below for a full list of available shortcode options:", 'instagram-feed'); ?></p>
2476
-
2477
- <p><span class="sbi_table_key"></span><?php _e('Pro version only', 'instagram-feed'); ?></p>
2478
-
2479
- <table class="sbi_shortcode_table">
2480
- <tbody>
2481
- <tr valign="top">
2482
- <th scope="row"><?php _e('Shortcode option', 'instagram-feed'); ?></th>
2483
- <th scope="row"><?php _e('Description', 'instagram-feed'); ?></th>
2484
- <th scope="row"><?php _e('Example', 'instagram-feed'); ?></th>
2485
- </tr>
2486
-
2487
- <tr class="sbi_table_header"><td colspan=3><?php _e("Configure Options", 'instagram-feed'); ?></td></tr>
2488
- <tr class="sbi_pro">
2489
- <td>type</td>
2490
- <td><?php _e("Display photos from a User ID (user)<br />Display posts from a Hashtag (hashtag)", 'instagram-feed'); ?><br /><?php _e("Display photos that the account was tagged in (tagged)", 'instagram-feed'); ?></td>
2491
- <td><code>[instagram-feed type=user]</code><br /><code>[instagram-feed type=hashtag]</code><br /><code>[instagram-feed type=tagged]</code></td>
2492
- </tr>
2493
- <tr>
2494
- <td>user</td>
2495
- <td><?php _e('Your Instagram User Name. This must be from a connected account on the "Configure" tab.', 'instagram-feed'); ?></td>
2496
- <td><code>[instagram-feed user="smashballoon"]</code></td>
2497
- </tr>
2498
- <tr class="sbi_pro">
2499
- <td>hashtag</td>
2500
- <td><?php _e('Any hashtag. Separate multiple hashtags by commas.', 'instagram-feed'); ?></td>
2501
- <td><code>[instagram-feed hashtag="#awesome"]</code></td>
2502
- </tr>
2503
- <tr class="sbi_pro">
2504
- <td>tagged</td>
2505
- <td><?php _e('Your Instagram User Name. Separate multiple users by commas.', 'instagram-feed'); ?></td>
2506
- <td><code>[instagram-feed tagged="smashballoon"]</code></td>
2507
- </tr>
2508
-
2509
- <tr class="sbi_table_header"><td colspan=3><?php _e("Customize Options", 'instagram-feed'); ?></td></tr>
2510
- <tr>
2511
- <td>width</td>
2512
- <td><?php _e("The width of your feed. Any number.", 'instagram-feed'); ?></td>
2513
- <td><code>[instagram-feed width=50]</code></td>
2514
- </tr>
2515
- <tr>
2516
- <td>widthunit</td>
2517
- <td><?php _e("The unit of the width. 'px' or '%'", 'instagram-feed'); ?></td>
2518
- <td><code>[instagram-feed widthunit=%]</code></td>
2519
- </tr>
2520
- <tr>
2521
- <td>height</td>
2522
- <td><?php _e("The height of your feed. Any number.", 'instagram-feed'); ?></td>
2523
- <td><code>[instagram-feed height=250]</code></td>
2524
- </tr>
2525
- <tr>
2526
- <td>heightunit</td>
2527
- <td><?php _e("The unit of the height. 'px' or '%'", 'instagram-feed'); ?></td>
2528
- <td><code>[instagram-feed heightunit=px]</code></td>
2529
- </tr>
2530
- <tr>
2531
- <td>background</td>
2532
- <td><?php _e("The background color of the feed. Any hex color code.", 'instagram-feed'); ?></td>
2533
- <td><code>[instagram-feed background=#ffff00]</code></td>
2534
- </tr>
2535
- <tr>
2536
- <td>class</td>
2537
- <td><?php _e("Add a CSS class to the feed container", 'instagram-feed'); ?></td>
2538
- <td><code>[instagram-feed class=feedOne]</code></td>
2539
- </tr>
2540
-
2541
- <tr class="sbi_table_header"><td colspan=3><?php _e("Layout Options", 'instagram-feed'); ?></td></tr>
2542
- <tr class="sbi_pro">
2543
- <td>layout</td>
2544
- <td><?php _e("How posts are arranged visually in the feed. There are four layouts: Grid, Carousel Slider, Masonry Grid, or Highlight Grid. Options:", 'instagram-feed' ); ?> 'grid', 'carousel', 'masonry', or 'highlight'</td>
2545
- <td><code>[instagram-feed layout=grid]</code></td>
2546
- </tr>
2547
- <tr>
2548
- <td>num</td>
2549
- <td><?php _e("The number of photos to display initially. Maximum is 33.", 'instagram-feed'); ?></td>
2550
- <td><code>[instagram-feed num=10]</code></td>
2551
- </tr>
2552
- <tr class="sbi_pro">
2553
- <td>nummobile</td>
2554
- <td><?php _e("The number of photos to display initially for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
2555
- <td><code>[instagram-feed nummobile=6]</code></td>
2556
- </tr>
2557
- <tr>
2558
- <td>cols</td>
2559
- <td><?php _e("The number of columns in your feed. 1 - 10.", 'instagram-feed'); ?></td>
2560
- <td><code>[instagram-feed cols=5]</code></td>
2561
- </tr>
2562
- <tr class="sbi_pro">
2563
- <td>colsmobile</td>
2564
- <td><?php _e("The number of columns in your feed for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
2565
- <td><code>[instagram-feed colsmobile=2]</code></td>
2566
- </tr>
2567
- <tr>
2568
- <td>imagepadding</td>
2569
- <td><?php _e("The spacing around your photos", 'instagram-feed'); ?></td>
2570
- <td><code>[instagram-feed imagepadding=10]</code></td>
2571
- </tr>
2572
- <tr>
2573
- <td>imagepaddingunit</td>
2574
- <td><?php _e("The unit of the padding. 'px' or '%'", 'instagram-feed'); ?></td>
2575
- <td><code>[instagram-feed imagepaddingunit=px]</code></td>
2576
- </tr>
2577
-
2578
- <tr class="sbi_table_header"><td colspan=3><?php _e("Carousel Options", 'instagram-feed'); ?></td></tr>
2579
- <tr class="sbi_pro">
2580
- <td>carouselrows</td>
2581
- <td><?php _e("Choose 1 or 2 rows of posts in the carousel", 'instagram-feed'); ?></td>
2582
- <td><code>[instagram-feed carouselrows=1]</code></td>
2583
- </tr>
2584
- <tr class="sbi_pro">
2585
- <td>carouselloop</td>
2586
- <td><?php _e("Infinitely loop through posts or rewind", 'instagram-feed'); ?></td>
2587
- <td><code>[instagram-feed carouselloop=rewind]</code></td>
2588
- </tr>
2589
- <tr class="sbi_pro">
2590
- <td>carouselarrows</td>
2591
- <td><?php _e("Display directional arrows on the carousel", 'instagram-feed'); ?></td>
2592
- <td><code>[instagram-feed carouselarrows=true]</code></td>
2593
- </tr>
2594
- <tr class="sbi_pro">
2595
- <td>carouselpag</td>
2596
- <td><?php _e("Display pagination links below the carousel", 'instagram-feed'); ?></td>
2597
- <td><code>[instagram-feed carouselpag=true]</code></td>
2598
- </tr>
2599
- <tr class="sbi_pro">
2600
- <td>carouselautoplay</td>
2601
- <td><?php _e("Make the carousel autoplay", 'instagram-feed'); ?></td>
2602
- <td><code>[instagram-feed carouselautoplay=true]</code></td>
2603
- </tr>
2604
- <tr class="sbi_pro">
2605
- <td>carouseltime</td>
2606
- <td><?php _e("The interval time between slides for autoplay. Time in miliseconds.", 'instagram-feed'); ?></td>
2607
- <td><code>[instagram-feed carouseltime=8000]</code></td>
2608
- </tr>
2609
-
2610
- <tr class="sbi_table_header"><td colspan=3><?php _e("Highlight Options", 'instagram-feed'); ?></td></tr>
2611
- <tr class="sbi_pro">
2612
- <td>highlighttype</td>
2613
- <td><?php _e("Choose from 3 different ways of highlighting posts including by pattern, hashtag, post id or. Options:", 'instagram-feed'); ?> 'pattern', 'hashtag', 'id'.</td>
2614
- <td><code>[instagram-feed highlighttype=hashtag]</code></td>
2615
- </tr>
2616
- <tr class="sbi_pro">
2617
- <td>highlightpattern</td>
2618
- <td><?php _e("How often a post is highlighted.", 'instagram-feed'); ?></td>
2619
- <td><code>[instagram-feed highlightpattern=7]</code></td>
2620
- </tr>
2621
- <tr class="sbi_pro">
2622
- <td>highlightoffset</td>
2623
- <td><?php _e("When to start the highlight pattern.", 'instagram-feed'); ?></td>
2624
- <td><code>[instagram-feed highlightoffset=3]</code></td>
2625
- </tr>
2626
- <tr class="sbi_pro">
2627
- <td>highlighthashtag</td>
2628
- <td><?php _e("Highlight posts with these hashtags.", 'instagram-feed'); ?></td>
2629
- <td><code>[instagram-feed highlighthashtag=best]</code></td>
2630
- </tr>
2631
-
2632
-
2633
-
2634
-
2635
-
2636
- <tr class="sbi_table_header"><td colspan=3><?php _e("Photos Options", 'instagram-feed'); ?></td></tr>
2637
- <tr>
2638
- <td>sortby</td>
2639
- <td><?php _e("Sort the posts by Newest to Oldest (none) or Random (random)", 'instagram-feed'); ?></td>
2640
- <td><code>[instagram-feed sortby=random]</code></td>
2641
- </tr>
2642
- <tr>
2643
- <td>imageres</td>
2644
- <td><?php _e("The resolution/size of the photos including full, medium, thumbnail, and auto (based on size of image on page). Options:", 'instagram-feed'); ?> 'auto', full', 'medium' or 'thumb'.</td>
2645
- <td><code>[instagram-feed imageres=full]</code></td>
2646
- </tr>
2647
- <tr class="sbi_pro">
2648
- <td>media</td>
2649
- <td><?php _e("Display all media, only photos, or only videos", 'instagram-feed'); ?></td>
2650
- <td><code>[instagram-feed media=photos]</code></td>
2651
- </tr>
2652
- <tr class="sbi_pro">
2653
- <td>disablelightbox</td>
2654
- <td><?php _e("Whether to disable the photo Lightbox. It is enabled by default.", 'instagram-feed'); ?></td>
2655
- <td><code>[instagram-feed disablelightbox=true]</code></td>
2656
- </tr>
2657
- <tr>
2658
- <td>disablemobile</td>
2659
- <td><?php _e("Disable the mobile layout. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2660
- <td><code>[instagram-feed disablemobile=true]</code></td>
2661
- </tr>
2662
- <tr class="sbi_pro">
2663
- <td>captionlinks</td>
2664
- <td><?php _e("Whether to use urls in captions for the photo's link instead of linking to instagram.com.", 'instagram-feed'); ?></td>
2665
- <td><code>[instagram-feed captionlinks=true]</code></td>
2666
- </tr>
2667
-
2668
- <tr class="sbi_table_header"><td colspan=3><?php _e("Lightbox Comments Options", 'instagram-feed'); ?></td></tr>
2669
- <tr class="sbi_pro">
2670
- <td>lightboxcomments</td>
2671
- <td><?php _e("Whether to show comments in the lightbox for this feed.", 'instagram-feed'); ?></td>
2672
- <td><code>[instagram-feed lightboxcomments=true]</code></td>
2673
- </tr>
2674
- <tr class="sbi_pro">
2675
- <td>numcomments</td>
2676
- <td><?php _e("Number of comments to show starting from the most recent.", 'instagram-feed'); ?></td>
2677
- <td><code>[instagram-feed numcomments=10]</code></td>
2678
- </tr>
2679
-
2680
- <tr class="sbi_table_header"><td colspan=3><?php _e("Photos Hover Style Options", 'instagram-feed'); ?></td></tr>
2681
- <tr class="sbi_pro">
2682
- <td>hovercolor</td>
2683
- <td><?php _e("The background color when hovering over a photo. Any hex color code.", 'instagram-feed'); ?></td>
2684
- <td><code>[instagram-feed hovercolor=#ff0000]</code></td>
2685
- </tr>
2686
- <tr class="sbi_pro">
2687
- <td>hovertextcolor</td>
2688
- <td><?php _e("The text/icon color when hovering over a photo. Any hex color code.", 'instagram-feed'); ?></td>
2689
- <td><code>[instagram-feed hovertextcolor=#fff]</code></td>
2690
- </tr>
2691
- <tr class="sbi_pro">
2692
- <td>hoverdisplay</td>
2693
- <td><?php _e("The info to display when hovering over the photo such as the user name, post date, Instagram icon, location, caption, and like counts. Options:", 'instagram-feed'); ?><br />username, date, instagram, location, caption, likes</td>
2694
- <td><code>[instagram-feed hoverdisplay="date, location, likes"]</code></td>
2695
- </tr>
2696
-
2697
- <tr class="sbi_table_header"><td colspan=3><?php _e("Header Options", 'instagram-feed'); ?></td></tr>
2698
- <tr>
2699
- <td>showheader</td>
2700
- <td><?php _e("Whether to show the feed Header. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2701
- <td><code>[instagram-feed showheader=false]</code></td>
2702
- </tr>
2703
- <tr>
2704
- <td>showbio</td>
2705
- <td><?php _e("Display the bio in the header. Options:", 'instagram-feed'); ?> 'true' or 'false'</td>
2706
- <td><code>[instagram-feed showbio=true]</code></td>
2707
- </tr>
2708
- <tr>
2709
- <td>custombio</td>
2710
- <td><?php _e("Display a custom bio in the header", 'instagram-feed'); ?></td>
2711
- <td><code>[instagram-feed custombio="My custom bio."]</code></td>
2712
- </tr>
2713
- <tr>
2714
- <td>customavatar</td>
2715
- <td><?php _e("Display a custom avatar in the header. Enter the full URL of an image file.", 'instagram-feed'); ?></td>
2716
- <td><code>[instagram-feed customavatar="https://example.com/avatar.jpg"]</code></td>
2717
- </tr>
2718
- <tr>
2719
- <td>headersize</td>
2720
- <td><?php _e("Size of the header including small, medium and large. Options:", 'instagram-feed'); ?> small, medium, or large.</td>
2721
- <td><code>[instagram-feed headersize=medium]</code></td>
2722
- </tr>
2723
- <tr>
2724
- <td>headercolor</td>
2725
- <td><?php _e("The color of the Header text. Any hex color code.", 'instagram-feed'); ?></td>
2726
- <td><code>[instagram-feed headercolor=#333]</code></td>
2727
- </tr>
2728
-
2729
- <tr class="sbi_table_header"><td colspan=3><?php _e("'Load More' Button Options", 'instagram-feed'); ?></td></tr>
2730
- <tr>
2731
- <td>showbutton</td>
2732
- <td><?php _e("Whether to show the 'Load More' button. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2733
- <td><code>[instagram-feed showbutton=false]</code></td>
2734
- </tr>
2735
- <tr>
2736
- <td>buttoncolor</td>
2737
- <td><?php _e("The background color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2738
- <td><code>[instagram-feed buttoncolor=#000]</code></td>
2739
- </tr>
2740
- <tr>
2741
- <td>buttontextcolor</td>
2742
- <td><?php _e("The text color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2743
- <td><code>[instagram-feed buttontextcolor=#fff]</code></td>
2744
- </tr>
2745
- <tr>
2746
- <td>buttontext</td>
2747
- <td><?php _e("The text used for the button.", 'instagram-feed'); ?></td>
2748
- <td><code>[instagram-feed buttontext="Load More Photos"]</code></td>
2749
- </tr>
2750
-
2751
- <tr class="sbi_table_header"><td colspan=3><?php _e("'Follow on Instagram' Button Options", 'instagram-feed'); ?></td></tr>
2752
- <tr>
2753
- <td>showfollow</td>
2754
- <td><?php _e("Whether to show the 'Follow on Instagram' button. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2755
- <td><code>[instagram-feed showfollow=false]</code></td>
2756
- </tr>
2757
- <tr>
2758
- <td>followcolor</td>
2759
- <td><?php _e("The background color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2760
- <td><code>[instagram-feed followcolor=#ff0000]</code></td>
2761
- </tr>
2762
- <tr>
2763
- <td>followtextcolor</td>
2764
- <td><?php _e("The text color of the button. Any hex color code.", 'instagram-feed'); ?></td>
2765
- <td><code>[instagram-feed followtextcolor=#fff]</code></td>
2766
- </tr>
2767
- <tr>
2768
- <td>followtext</td>
2769
- <td><?php _e("The text used for the button.", 'instagram-feed'); ?></td>
2770
- <td><code>[instagram-feed followtext="Follow me"]</code></td>
2771
- </tr>
2772
-
2773
- <tr class="sbi_table_header"><td colspan=3><?php _e("Caption Options", 'instagram-feed'); ?></td></tr>
2774
- <tr class="sbi_pro">
2775
- <td>showcaption</td>
2776
- <td><?php _e("Whether to show the photo caption. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2777
- <td><code>[instagram-feed showcaption=false]</code></td>
2778
- </tr>
2779
- <tr class="sbi_pro">
2780
- <td>captionlength</td>
2781
- <td><?php _e("The number of characters of the caption to display", 'instagram-feed'); ?></td>
2782
- <td><code>[instagram-feed captionlength=50]</code></td>
2783
- </tr>
2784
- <tr class="sbi_pro">
2785
- <td>captioncolor</td>
2786
- <td><?php _e("The text color of the caption. Any hex color code.", 'instagram-feed'); ?></td>
2787
- <td><code>[instagram-feed captioncolor=#000]</code></td>
2788
- </tr>
2789
- <tr class="sbi_pro">
2790
- <td>captionsize</td>
2791
- <td><?php _e("The size of the caption text. Any number.", 'instagram-feed'); ?></td>
2792
- <td><code>[instagram-feed captionsize=24]</code></td>
2793
- </tr>
2794
-
2795
- <tr class="sbi_table_header"><td colspan=3><?php _e("Likes &amp; Comments Options", 'instagram-feed'); ?></td></tr>
2796
- <tr class="sbi_pro">
2797
- <td>showlikes</td>
2798
- <td><?php _e("Whether to show the Likes &amp; Comments. Options:", 'instagram-feed'); ?> 'true' or 'false'.</td>
2799
- <td><code>[instagram-feed showlikes=false]</code></td>
2800
- </tr>
2801
- <tr class="sbi_pro">
2802
- <td>likescolor</td>
2803
- <td><?php _e("The color of the Likes &amp; Comments. Any hex color code.", 'instagram-feed'); ?></td>
2804
- <td><code>[instagram-feed likescolor=#FF0000]</code></td>
2805
- </tr>
2806
- <tr class="sbi_pro">
2807
- <td>likessize</td>
2808
- <td><?php _e("The size of the Likes &amp; Comments. Any number.", 'instagram-feed'); ?></td>
2809
- <td><code>[instagram-feed likessize=14]</code></td>
2810
- </tr>
2811
-
2812
- <tr class="sbi_table_header"><td colspan=3><?php _e("Post Filtering Options", 'instagram-feed'); ?></td></tr>
2813
- <tr class="sbi_pro">
2814
- <td>excludewords</td>
2815
- <td><?php _e("Remove posts which contain certain words or hashtags in the caption.", 'instagram-feed'); ?></td>
2816
- <td><code>[instagram-feed excludewords="bad, words"]</code></td>
2817
- </tr>
2818
- <tr class="sbi_pro">
2819
- <td>includewords</td>
2820
- <td><?php _e("Only display posts which contain certain words or hashtags in the caption.", 'instagram-feed'); ?></td>
2821
- <td><code>[instagram-feed includewords="sunshine"]</code></td>
2822
- </tr>
2823
-
2824
- <tr class="sbi_table_header"><td colspan=3><?php _e("Auto Load More on Scroll", 'instagram-feed'); ?></td></tr>
2825
- <tr class="sbi_pro">
2826
- <td>autoscroll</td>
2827
- <td><?php _e("Load more posts automatically as the user scrolls down the page.", 'instagram-feed'); ?></td>
2828
- <td><code>[instagram-feed autoscroll=true]</code></td>
2829
- </tr>
2830
- <tr class="sbi_pro">
2831
- <td>autoscrolldistance</td>
2832
- <td><?php _e("Distance before the end of feed or page that triggers the loading of more posts.", 'instagram-feed'); ?></td>
2833
- <td><code>[instagram-feed autoscrolldistance=200]</code></td>
2834
- </tr>
2835
-
2836
- </tbody>
2837
- </table>
2838
-
2839
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=display&utm_medium=supportsetup" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
2840
-
2841
- <?php } //End Display tab ?>
2842
-
2843
-
2844
- <?php if( $sbi_active_tab == 'support' ) { //Start Support tab ?>
2845
-
2846
- <div class="sbi_support">
2847
-
2848
- <h3 style="padding-bottom: 10px;"><?php _e("Need help?", 'instagram-feed'); ?></h3>
2849
-
2850
- <p>
2851
- <span class="sbi-support-title"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <a
2852
- href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general"
2853
- target="_blank"><?php _e( 'Setup Directions', 'instagram-feed' ); ?></a></span>
2854
- <?php _e( 'A step-by-step guide on how to setup and use the plugin.', 'instagram-feed' ); ?>
2855
- </p>
2856
-
2857
- <p>
2858
- <span class="sbi-support-title"><i class="fa fa-youtube-play" aria-hidden="true"></i>&nbsp; <a
2859
- href="https://www.youtube.com/embed/q6ZXVU4g970" target="_blank"
2860
- id="sbi-play-support-video"><?php _e( 'Watch a Video', 'instagram-feed' ); ?></a></span>
2861
- <?php _e( "Watch a short video demonstrating how to set up, customize and use the plugin.<br /><b>Please note</b> that the video shows the set up and use of the <b><a href='https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general' target='_blank'>Pro version</a></b> of the plugin, but the process is the same for this free version. The only difference is some of the features available.", 'instagram-feed' ); ?>
2862
-
2863
- <iframe id="sbi-support-video"
2864
- src="//www.youtube.com/embed/q6ZXVU4g970?theme=light&amp;showinfo=0&amp;controls=2" width="960"
2865
- height="540" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
2866
- </p>
2867
-
2868
- <p>
2869
- <span class="sbi-support-title"><i class="fa fa-question-circle" aria-hidden="true"></i>&nbsp; <a
2870
- href="https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqs"
2871
- target="_blank"><?php _e( 'FAQs and Docs', 'instagram-feed' ); ?></a></span>
2872
- <?php _e( 'View our expansive library of FAQs and documentation to help solve your problem as quickly as possible.', 'instagram-feed' ); ?>
2873
- </p>
2874
-
2875
- <div class="sbi-support-faqs">
2876
-
2877
- <ul>
2878
- <li><b><?php _e( 'FAQs', 'instagram-feed' ); ?></b></li>
2879
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-photos-wont-load/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqsnophotos" target="_blank">My Instagram Feed Won\'t Load</a>', 'instagram-feed' ); ?></li>
2880
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-instagram-access-token-keep-expiring/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqsexpiring" target="_blank">My Access Token Keeps Expiring</a>', 'instagram-feed' ); ?></li>
2881
- <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqs" target="_blank"><?php _e( 'See All', 'instagram-feed' ); ?><i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
2882
- </ul>
2883
-
2884
- <ul>
2885
- <li><b><?php _e("Documentation", 'instagram-feed'); ?></b></li>
2886
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed/free?utm_campaign=instagram-free&utm_source=support&utm_medium=installation" target="_blank">Installation and Configuration</a>', 'instagram-feed' ); ?></li>
2887
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/display-multiple-instagram-feeds/?utm_campaign=instagram-free&utm_source=support&utm_medium=multiple" target="_blank">Displaying multiple feeds</a>', 'instagram-feed' ); ?></li>
2888
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed-faq/customization/?utm_campaign=instagram-free&utm_source=support&utm_medium=customizing" target="_blank">Customizing your Feed</a>', 'instagram-feed' ); ?></li>
2889
- </ul>
2890
- </div>
2891
-
2892
- <p>
2893
- <span class="sbi-support-title"><i class="fa fa-envelope" aria-hidden="true"></i>&nbsp; <a
2894
- href="https://smashballoon.com/instagram-feed/support/?utm_campaign=instagram-free&utm_source=support&utm_medium=contact"
2895
- target="_blank"><?php _e( 'Request Support', 'instagram-feed' ); ?></a></span>
2896
- <?php _e( 'Still need help? Submit a ticket and one of our support experts will get back to you as soon as possible.<br /><b>Important:</b> Please include your <b>System Info</b> below with all support requests.', 'instagram-feed' ); ?>
2897
- </p>
2898
- </div>
2899
-
2900
- <hr />
2901
-
2902
- <h3><?php _e('System Info &nbsp; <i style="color: #666; font-size: 11px; font-weight: normal;">Click the text below to select all</i>', 'instagram-feed'); ?></h3>
2903
-
2904
-
2905
-
2906
-
2907
- <?php $sbi_options = get_option('sb_instagram_settings'); ?>
2908
- <textarea readonly="readonly" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)." style="width: 100%; max-width: 960px; height: 500px; white-space: pre; font-family: Menlo,Monaco,monospace;">
2909
- ## SITE/SERVER INFO: ##
2910
- Site URL: <?php echo site_url() . "\n"; ?>
2911
- Home URL: <?php echo home_url() . "\n"; ?>
2912
- WordPress Version: <?php echo get_bloginfo( 'version' ) . "\n"; ?>
2913
- PHP Version: <?php echo PHP_VERSION . "\n"; ?>
2914
- Web Server Info: <?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?>
2915
-
2916
- ## ACTIVE PLUGINS: ##
2917
- <?php
2918
- $plugins = get_plugins();
2919
- $active_plugins = get_option( 'active_plugins', array() );
2920
-
2921
- foreach ( $plugins as $plugin_path => $plugin ) {
2922
- // If the plugin isn't active, don't show it.
2923
- if ( ! in_array( $plugin_path, $active_plugins ) )
2924
- continue;
2925
-
2926
- echo $plugin['Name'] . ': ' . $plugin['Version'] ."\n";
2927
- }
2928
- ?>
2929
-
2930
- ## PLUGIN SETTINGS: ##
2931
- sb_instagram_plugin_type => Instagram Feed Free
2932
- <?php
2933
- global $wpdb;
2934
- foreach( $sbi_options as $key => $val ) {
2935
- if ( $key !== 'connected_accounts' ) {
2936
- if ( is_array( $val ) ) {
2937
- foreach ( $val as $item ) {
2938
- if ( is_array( $item ) ) {
2939
- foreach ( $item as $key2 => $val2 ) {
2940
- echo "$key2 => $val2\n";
2941
- }
2942
- } else {
2943
- echo "$key => $item\n";
2944
- }
2945
- }
2946
- } else {
2947
- echo "$key => $val\n";
2948
- }
2949
- }
2950
-
2951
- }
2952
- ?>
2953
-
2954
- ## CONNECTED ACCOUNTS: ##<?php echo "\n";
2955
- $con_accounts = isset( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
2956
- $business_accounts = array();
2957
- $basic_accounts = array();
2958
- if ( ! empty( $con_accounts ) ) {
2959
- foreach ( $con_accounts as $account ) {
2960
- $type = isset( $account['type'] ) ? $account['type'] : 'personal';
2961
-
2962
- if ( $type === 'business' ) {
2963
- $business_accounts[] = $account;
2964
- } elseif ( $type === 'basic' ) {
2965
- $basic_accounts[] = $account;
2966
- }
2967
- echo '*' . $account['user_id'] . '*' . "\n";
2968
- var_export( $account );
2969
- echo "\n";
2970
- }
2971
- }
2972
- ?>
2973
-
2974
- ## API RESPONSE: ##
2975
- <?php
2976
- $first_con_basic_account = isset( $basic_accounts[0] ) ? $basic_accounts[0] : array();
2977
- $first_con_business_account = isset( $business_accounts[0] ) ? $business_accounts[0] : array();
2978
-
2979
- if ( ! empty( $first_con_basic_account ) ) {
2980
- echo '*BASIC ACCOUNT*';
2981
- echo "\n";
2982
- $connection = new SB_Instagram_API_Connect( $first_con_basic_account, 'header' );
2983
- $connection->connect();
2984
- if ( ! $connection->is_wp_error() && ! $connection->is_instagram_error() ) {
2985
- foreach ( $connection->get_data() as $key => $item ) {
2986
- if ( is_array ( $item ) ) {
2987
- foreach ( $item as $key2 => $item2 ) {
2988
- echo $key2 . ' => ' . esc_html( $item2 ) . "\n";
2989
- }
2990
- } else {
2991
- echo $key . ' => ' . esc_html( $item ) . "\n";
2992
- }
2993
- }
2994
- } else {
2995
- if ( $connection->is_wp_error() ) {
2996
- $response = $connection->get_wp_error();
2997
- if ( isset( $response ) && isset( $response->errors ) ) {
2998
- foreach ( $response->errors as $key => $item ) {
2999
- echo $key . ' => ' . $item[0] . "\n";
3000
- }
3001
- }
3002
- } else {
3003
- $error = $connection->get_data();
3004
- var_export( $error );
3005
- }
3006
- }
3007
- echo "\n";
3008
- } else {
3009
- echo 'no connected basic accounts';
3010
- echo "\n";
3011
- }
3012
- if ( ! empty( $first_con_business_account ) ) {
3013
- echo '*BUSINESS ACCOUNT*';
3014
- echo "\n";
3015
- $connection = new SB_Instagram_API_Connect( $first_con_business_account, 'header' );
3016
- $connection->connect();
3017
- if ( ! $connection->is_wp_error() && ! $connection->is_instagram_error() ) {
3018
- foreach ( $connection->get_data() as $key => $item ) {
3019
- if ( is_array ( $item ) ) {
3020
- foreach ( $item as $key2 => $item2 ) {
3021
- echo $key2 . ' => ' . esc_html( $item2 ) . "\n";
3022
- }
3023
- } else {
3024
- echo $key . ' => ' . esc_html( $item ) . "\n";
3025
- }
3026
- }
3027
- } else {
3028
- if ( $connection->is_wp_error() ) {
3029
- $response = $connection->get_wp_error();
3030
- if ( isset( $response ) && isset( $response->errors ) ) {
3031
- foreach ( $response->errors as $key => $item ) {
3032
- echo $key . ' => ' . $item[0] . "\n";
3033
- }
3034
- }
3035
- } else {
3036
- $error = $connection->get_data();
3037
- var_export( $error );
3038
- }
3039
- }
3040
- } else {
3041
- echo 'no connected business accounts';
3042
- } ?>
3043
-
3044
- ## Cron Events: ##
3045
- <?php
3046
- $cron = _get_cron_array();
3047
- foreach ( $cron as $key => $data ) {
3048
- $is_target = false;
3049
- foreach ( $data as $key2 => $val ) {
3050
- if ( strpos( $key2, 'sbi' ) !== false || strpos( $key2, 'sb_instagram' ) !== false ) {
3051
- $is_target = true;
3052
- echo $key2;
3053
- echo "\n";
3054
- }
3055
- }
3056
- if ( $is_target) {
3057
- echo date( "Y-m-d H:i:s", $key );
3058
- echo "\n";
3059
- echo 'Next Scheduled: ' . ((int)$key - time())/60 . ' minutes';
3060
- echo "\n\n";
3061
- }
3062
- }
3063
- ?>
3064
- ## Cron Cache Report: ##
3065
- <?php $cron_report = get_option( 'sbi_cron_report', array() );
3066
- if ( ! empty( $cron_report ) ) {
3067
- var_export( $cron_report );
3068
- }
3069
- echo "\n";
3070
- ?>
3071
-
3072
- ## Access Token Refresh: ##
3073
- <?php $cron_report = get_option( 'sbi_refresh_report', array() );
3074
- if ( ! empty( $cron_report ) ) {
3075
- var_export( $cron_report );
3076
- }
3077
- echo "\n";
3078
- ?>
3079
-
3080
- ## Resizing: ##
3081
- <?php $upload = wp_upload_dir();
3082
- $upload_dir = $upload['basedir'];
3083
- $upload_dir = trailingslashit( $upload_dir ) . SBI_UPLOADS_NAME;
3084
- if ( file_exists( $upload_dir ) ) {
3085
- echo 'upload directory exists';
3086
- } else {
3087
- $created = wp_mkdir_p( $upload_dir );
3088
-
3089
- if ( ! $created ) {
3090
- echo 'cannot create upload directory';
3091
- }
3092
- }
3093
- echo "\n";
3094
- echo "\n";
3095
-
3096
- $table_name = esc_sql( $wpdb->prefix . SBI_INSTAGRAM_POSTS_TYPE );
3097
- $feeds_posts_table_name = esc_sql( $wpdb->prefix . SBI_INSTAGRAM_FEEDS_POSTS );
3098
-
3099
- if ( $wpdb->get_var( "show tables like '$feeds_posts_table_name'" ) != $feeds_posts_table_name ) {
3100
- echo 'no feeds posts table';
3101
- echo "\n";
3102
-
3103
- } else {
3104
- $last_result = $wpdb->get_results( "SELECT * FROM $feeds_posts_table_name ORDER BY id DESC LIMIT 1;" );
3105
- if ( is_array( $last_result ) && isset( $last_result[0] ) ) {
3106
- echo '*FEEDS POSTS TABLE*';
3107
- echo "\n";
3108
-
3109
- foreach ( $last_result as $column ) {
3110
-
3111
- foreach ( $column as $key => $value ) {
3112
- echo $key . ': ' . esc_html( $value ) . "\n";;
3113
- }
3114
- }
3115
-
3116
- } else {
3117
- echo 'feeds posts has no rows';
3118
- echo "\n";
3119
- }
3120
- }
3121
- echo "\n";
3122
-
3123
- if ( $wpdb->get_var( "show tables like '$table_name'" ) != $table_name ) {
3124
- echo 'no posts table';
3125
- echo "\n";
3126
-
3127
- } else {
3128
-
3129
-
3130
- $last_result = $wpdb->get_results( "SELECT * FROM $table_name ORDER BY id DESC LIMIT 1;" );
3131
- if ( is_array( $last_result ) && isset( $last_result[0] ) ) {
3132
- echo '*POSTS TABLE*';
3133
- echo "\n";
3134
- foreach ( $last_result as $column ) {
3135
-
3136
- foreach ( $column as $key => $value ) {
3137
- echo $key . ': ' . esc_html( $value ) . "\n";;
3138
- }
3139
- }
3140
-
3141
- } else {
3142
- echo 'feeds posts has no rows';
3143
- echo "\n";
3144
- }
3145
- }
3146
- ?>
3147
-
3148
- ## Errors: ##
3149
- <?php
3150
- global $sb_instagram_posts_manager;
3151
- $errors = $sb_instagram_posts_manager->get_errors();
3152
- if ( ! empty( $errors['resizing'] ) ) :
3153
- echo '* Resizing *' . "\n";
3154
- echo $errors['resizing'] . "\n";
3155
- endif;
3156
- if ( ! empty( $errors['database_create'] ) ) :
3157
- echo '* Database Create *' . "\n";
3158
- echo $errors['database_create'] . "\n";
3159
- endif;
3160
- if ( ! empty( $errors['upload_dir'] ) ) :
3161
- echo '* Uploads Directory *' . "\n";
3162
- echo $errors['upload_dir'] . "\n";
3163
- endif;
3164
- if ( ! empty( $errors['connection'] ) ) :
3165
- echo '* API/WP_HTTP Request *' . "\n";
3166
- var_export( $errors['connection'] );
3167
- endif;
3168
- ?>
3169
-
3170
- ## Error Log: ##
3171
- <?php
3172
- $error_log = $sb_instagram_posts_manager->get_error_log();
3173
- if ( ! empty( $error_log ) ) :
3174
- foreach ( $error_log as $error ) :
3175
- echo $error . "\n";
3176
- endforeach;
3177
- endif;
3178
- ?>
3179
-
3180
- ## Action Log: ##
3181
- <?php
3182
- $actions = $sb_instagram_posts_manager->get_action_log();
3183
- if ( ! empty( $actions ) ) :
3184
- foreach ( $actions as $action ) :
3185
- echo $action . "\n";
3186
- endforeach;
3187
- endif;
3188
- /*
3189
- $error_page = $sb_instagram_posts_manager->get_error_page();
3190
- if ( $error_page ) {
3191
- echo 'Feed with error: ' . esc_url( get_the_permalink( $error_page ) ). "\n";
3192
- }*/?>
3193
-
3194
- ## Location Summary: ##
3195
- <?php
3196
- $locator_summary = SB_Instagram_Feed_Locator::summary();
3197
- $condensed_shortcode_atts = array( 'type', 'user', 'hashtag', 'tagged', 'num', 'cols', 'layout', 'whitelist', 'includewords' );
3198
-
3199
- if ( ! empty( $locator_summary) ) {
3200
-
3201
- foreach ( $locator_summary as $locator_section ) {
3202
- if ( ! empty( $locator_section['results'] ) ) {
3203
- $first_five = array_slice( $locator_section['results'], 0, 5 );
3204
- foreach ( $first_five as $result ) {
3205
- $condensed_shortcode_string = '[instagram-feed';
3206
- $shortcode_atts = json_decode( $result['shortcode_atts'], true );
3207
- $shortcode_atts = is_array( $shortcode_atts ) ? $shortcode_atts : array();
3208
- foreach ( $shortcode_atts as $key => $value ) {
3209
- if ( in_array( $key, $condensed_shortcode_atts, true ) ) {
3210
- $condensed_shortcode_string .= ' ' . esc_html( $key ). '="' . esc_html( $value ) . '"';
3211
- }
3212
- }
3213
- $condensed_shortcode_string .= ']';
3214
- echo esc_url( get_the_permalink( $result['post_id'] ) ) . ' ' . $condensed_shortcode_string . "\n";
3215
- }
3216
-
3217
- }
3218
- }
3219
- }?>
3220
-
3221
- ## GDPR: ##
3222
- <?php
3223
- if ( ! SB_Instagram_GDPR_Integrations::gdpr_tests_successful() ) :
3224
- $errors = SB_Instagram_GDPR_Integrations::gdpr_tests_error_message();
3225
- ?><?php echo $errors; ?>
3226
- <?php endif; ?>
3227
-
3228
- ## oEmbed: ##
3229
- <?php
3230
- $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
3231
- foreach( $oembed_token_settings as $key => $value ) {
3232
- echo $key . ': ' . esc_attr( $value ) . "\n";
3233
- }
3234
-
3235
- $single = new SB_Instagram_Single( 'https://www.instagram.com/p/CCq1D_cMYMF/' );
3236
- $post = $single->fetch();
3237
- $message = '';
3238
- if ( isset( $post['thumbnail_url'] ) ) {
3239
- $message = 'success';
3240
- } else {
3241
- $error = $single->get_error();
3242
-
3243
- if ( ! empty( $error ) ) {
3244
- $message = $error;
3245
- }
3246
- }
3247
- echo 'oEmbed request test: ' . esc_attr( $message );
3248
-
3249
- ?>
3250
- </textarea>
3251
- <div><input id="sbi_reset_log" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Reset Error Log' ); ?>" style="vertical-align: middle;"/></div>
3252
-
3253
- <?php
3254
- } //End Support tab
3255
-
3256
-
3257
- if( $sbi_active_tab == 'more' ) { //Start More Social Feeds tab
3258
-
3259
- add_user_meta(get_current_user_id(), 'seen_more_plugins_page_1', 'true', true); //Iterate when adding a new plugin
3260
- ?>
3261
-
3262
- <div class="sbi_more_plugins" id="sbi-admin-about">
3263
-
3264
- <div class="sbi-more-plugins-intro">
3265
- <h3><?php _e( "Here's some more <span>free</span> plugins you might like!", 'instagram-feed' ); ?></h3>
3266
- <p><?php _e( "As you're already using one of our free plugins we thought we'd suggest some others you might like to. Check out our other free plugins below:", 'instagram-feed' ); ?></p>
3267
- </div>
3268
-
3269
- <?php function get_am_plugins() {
3270
-
3271
- $images_url = SBI_PLUGIN_URL . 'img/about/';
3272
-
3273
- return array(
3274
- 'instagram-feed/instagram-feed.php' => array(
3275
- 'icon' => $images_url . 'plugin-if.png',
3276
- 'name' => esc_html__( 'Instagram Feed', 'custom-facebook-feed' ),
3277
- 'desc' => esc_html__( 'Instagram Feed is a clean and beautiful way to add your Instagram posts to your website. Grab your visitors attention and keep them engaged with your site longer.', 'custom-facebook-feed' ),
3278
- 'url' => 'https://downloads.wordpress.org/plugin/instagram-feed.zip',
3279
- 'pro' => array(
3280
- 'plug' => 'instagram-feed-pro/instagram-feed.php',
3281
- 'icon' => $images_url . 'plugin-if.png',
3282
- 'name' => esc_html__( 'Instagram Feed Pro', 'custom-facebook-feed' ),
3283
- 'desc' => esc_html__( 'Instagram Feed is a clean and beautiful way to add your Instagram posts to your website. Grab your visitors attention and keep them engaged with your site longer.', 'custom-facebook-feed' ),
3284
- 'url' => 'https://smashballoon.com/instagram-feed/?utm_campaign=facebook-free&utm_source=cross&utm_medium=sbiinstaller',
3285
- 'act' => 'go-to-url',
3286
- ),
3287
- ),
3288
- 'custom-facebook-feed/custom-facebook-feed.php' => array(
3289
- 'icon' => $images_url . 'plugin-fb.png',
3290
- 'name' => esc_html__( 'Custom Facebook Feed', 'instagram-feed' ),
3291
- 'desc' => esc_html__( 'Custom Facebook Feed makes displaying your Facebook posts easy. Keep your site visitors informed and increase engagement with your Facebook page by displaying a feed on your website.', 'instagram-feed' ),
3292
- 'url' => 'https://downloads.wordpress.org/plugin/custom-facebook-feed.zip',
3293
- 'pro' => array(
3294
- 'plug' => 'custom-facebook-feed-pro/custom-facebook-feed.php',
3295
- 'icon' => $images_url . 'plugin-fb.png',
3296
- 'name' => esc_html__( 'Custom Facebook Feed Pro', 'instagram-feed' ),
3297
- 'desc' => esc_html__( 'Custom Facebook Feed makes displaying your Facebook posts easy. Keep your site visitors informed and increase engagement with your Facebook page by displaying a feed on your website.', 'instagram-feed' ),
3298
- 'url' => 'https://smashballoon.com/custom-facebook-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=cffinstaller',
3299
- 'act' => 'go-to-url',
3300
- )
3301
- ),
3302
-
3303
- 'custom-twitter-feeds/custom-twitter-feed.php' => array(
3304
- 'icon' => $images_url . 'plugin-tw.jpg',
3305
- 'name' => esc_html__( 'Custom Twitter Feeds', 'instagram-feed' ),
3306
- 'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'instagram-feed' ),
3307
- 'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
3308
- 'pro' => array(
3309
- 'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
3310
- 'icon' => $images_url . 'plugin-tw.jpg',
3311
- 'name' => esc_html__( 'Custom Twitter Feeds Pro', 'instagram-feed' ),
3312
- 'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'instagram-feed' ),
3313
- 'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_campaign=instagram-free&utm_source=cross&utm_medium=ctfinstaller',
3314
- 'act' => 'go-to-url',
3315
- )
3316
- ),
3317
-
3318
- 'feeds-for-youtube/youtube-feed.php' => array(
3319
- 'icon' => $images_url . 'plugin-yt.png',
3320
- 'name' => esc_html__( 'Feeds for YouTube', 'instagram-feed' ),
3321
- 'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'instagram-feed' ),
3322
- 'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
3323
- 'pro' => array(
3324
- 'plug' => 'youtube-feed-pro/youtube-feed.php',
3325
- 'icon' => $images_url . 'plugin-yt.png',
3326
- 'name' => esc_html__( 'Feeds for YouTube Pro', 'instagram-feed' ),
3327
- 'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'instagram-feed' ),
3328
- 'url' => 'https://smashballoon.com/youtube-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=sbyinstaller',
3329
- 'act' => 'go-to-url',
3330
- )
3331
- ),
3332
- );
3333
-
3334
- }
3335
-
3336
- function output_about_addons() {
3337
-
3338
- if ( version_compare( PHP_VERSION, '5.3.0' ) <= 0
3339
- || version_compare( get_bloginfo('version'), '4.6' , '<' ) ){
3340
- return;
3341
- }
3342
-
3343
- $all_plugins = get_plugins();
3344
- $am_plugins = get_am_plugins();
3345
- $has_all_plugins = true;
3346
-
3347
- ?>
3348
- <div id="sbi-admin-addons">
3349
- <div class="addons-container">
3350
- <?php
3351
- foreach ( $am_plugins as $plugin => $details ) :
3352
-
3353
- $free_only = true;
3354
- $plugin_data = get_the_plugin_data( $plugin, $details, $all_plugins, $free_only );
3355
- $plugin_slug = strtolower( str_replace( ' ', '_', $plugin_data['details']['name'] ) );
3356
-
3357
- //Only show the plugin if both free/pro versions aren't already active
3358
- isset( $plugin_data['details']['plug'] ) ? $pro_plugin_source = $plugin_data['details']['plug'] : $pro_plugin_source = '';
3359
- if( !is_plugin_active( $plugin ) && !is_plugin_active( $pro_plugin_source ) ){
3360
- $has_all_plugins = false;
3361
- ?>
3362
- <div class="addon-container" id="install_<?php echo $plugin_slug; ?>">
3363
- <div class="addon-item">
3364
- <div class="details sbi-clear">
3365
- <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
3366
- <h5 class="addon-name">
3367
- <?php echo esc_html( $plugin_data['details']['name'] ); ?>
3368
- </h5>
3369
- <p class="addon-desc">
3370
- <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
3371
- </p>
3372
- </div>
3373
- <div class="actions sbi-clear">
3374
- <div class="status">
3375
- <strong>
3376
- <?php _e( 'Price:', 'instagram-feed' );
3377
- echo ' <span style="color: green;">';
3378
- _e( 'Free', 'instagram-feed' );
3379
- echo '</span>'; ?>
3380
- </strong>
3381
- </div>
3382
- <div class="action-button">
3383
- <button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
3384
- <?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
3385
- </button>
3386
- </div>
3387
- </div>
3388
- </div>
3389
- </div>
3390
-
3391
- <?php } ?>
3392
-
3393
- <?php endforeach;
3394
-
3395
- if( $has_all_plugins == true ){ ?>
3396
-
3397
- <style type="text/css">.sbi-more-plugins-intro{display:none;}</style>
3398
- <h2><?php _e( 'You already have all of our free plugins. Awesome!', 'instagram-feed' ); ?></h2>
3399
-
3400
- <p><?php _e( 'Thank you so much for using our plugins. We appreciate you trusting us to power your social media feeds.', 'instagram-feed' ); ?></p>
3401
- <p><?php _e( 'If you want to support us in our mission to make bringing social media content to your website both easy and reliable, then consider upgrading to one of our Pro plugins.', 'instagram-feed' ); ?></p>
3402
-
3403
- <div class="sbi-cols-4">
3404
- <?php //Show a list of Pro plugins which aren't currently active ?>
3405
- <?php foreach ( $am_plugins as $plugin => $details ) :
3406
-
3407
- $plugin_data = get_the_plugin_data( $plugin, $details, $all_plugins );
3408
- $plugin_slug = strtolower( str_replace( ' ', '_', $plugin_data['details']['name'] ) );
3409
-
3410
- isset( $plugin_data['details']['plug'] ) ? $pro_plugin_source = $plugin_data['details']['plug'] : $pro_plugin_source = '';
3411
- if( !is_plugin_active( $pro_plugin_source ) ){
3412
- ?>
3413
-
3414
- <div class="addon-container" id="install_<?php echo $plugin_slug; ?>">
3415
- <div class="addon-item">
3416
- <div class="details sbi-clear">
3417
- <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
3418
- <h5 class="addon-name">
3419
- <?php echo esc_html( $plugin_data['details']['name'] ); ?>
3420
- </h5>
3421
- <p class="addon-desc">
3422
- <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
3423
- </p>
3424
- </div>
3425
- <div class="actions sbi-clear">
3426
- <div class="action-button">
3427
- <a href="<?php echo esc_attr( $details['pro']['url'] ); ?>" target="_blank" class="status-go-to-url button button-primary">
3428
- <?php _e( 'Upgrade to Pro', 'instagram-feed' ); ?>
3429
- </a>
3430
- </div>
3431
- </div>
3432
- </div>
3433
- </div>
3434
-
3435
- <?php } ?>
3436
-
3437
- <?php endforeach; ?>
3438
- </div>
3439
-
3440
- <?php } ?>
3441
-
3442
- </div>
3443
- </div>
3444
- <?php
3445
- }
3446
-
3447
-
3448
- function get_the_plugin_data( $plugin, $details, $all_plugins, $free_only = false ) {
3449
-
3450
- $have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
3451
- $show_pro = false;
3452
-
3453
- $plugin_data = array();
3454
-
3455
- if( $free_only ) $have_pro = false;
3456
-
3457
- if ( $have_pro ) {
3458
- if ( array_key_exists( $plugin, $all_plugins ) ) {
3459
- if ( is_plugin_active( $plugin ) ) {
3460
- $show_pro = true;
3461
- }
3462
- }
3463
- if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
3464
- $show_pro = true;
3465
- }
3466
- if ( $show_pro ) {
3467
- $plugin = $details['pro']['plug'];
3468
- $details = $details['pro'];
3469
- }
3470
- }
3471
-
3472
- if( $free_only ) $show_pro = false;
3473
-
3474
- if ( array_key_exists( $plugin, $all_plugins ) ) {
3475
- if ( is_plugin_active( $plugin ) ) {
3476
- // Status text/status.
3477
- $plugin_data['status_class'] = 'status-active';
3478
- $plugin_data['status_text'] = esc_html__( 'Active', 'instagram-feed' );
3479
- // Button text/status.
3480
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
3481
- $plugin_data['action_text'] = esc_html__( 'Activated', 'instagram-feed' );
3482
- $plugin_data['plugin_src'] = esc_attr( $plugin );
3483
- } else {
3484
- // Status text/status.
3485
- $plugin_data['status_class'] = 'status-inactive';
3486
- $plugin_data['status_text'] = esc_html__( 'Inactive', 'instagram-feed' );
3487
- // Button text/status.
3488
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
3489
- $plugin_data['action_text'] = esc_html__( 'Activate', 'instagram-feed' );
3490
- $plugin_data['plugin_src'] = esc_attr( $plugin );
3491
- }
3492
- } else {
3493
- // Doesn't exist, install.
3494
- // Status text/status.
3495
- $plugin_data['status_class'] = 'status-download';
3496
- if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
3497
- $plugin_data['status_class'] = 'status-go-to-url';
3498
- }
3499
- $plugin_data['status_text'] = esc_html__( 'Not Installed', 'instagram-feed' );
3500
- // Button text/status.
3501
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
3502
- $plugin_data['action_text'] = esc_html__( 'Install Plugin', 'instagram-feed' );
3503
- $plugin_data['plugin_src'] = esc_url( $details['url'] );
3504
- }
3505
-
3506
- $plugin_data['details'] = $details;
3507
-
3508
- return $plugin_data;
3509
- }
3510
-
3511
-
3512
- output_about_addons();
3513
-
3514
- ?>
3515
- <style>.sbi_quickstart, .sbi-pro-notice, .sbi_plugins_promo, .sbi_share_plugin{ display: none !Important; }</style>
3516
- </div>
3517
-
3518
- <?php
3519
- } //End More tab ?>
3520
-
3521
-
3522
-
3523
- <div class="sbi_quickstart">
3524
- <h3><i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <?php _e('Display your feed', 'instagram-feed'); ?></h3>
3525
- <p><?php _e('Copy and paste this shortcode directly into the page, post or widget where you\'d like to display the feed:', 'instagram-feed'); ?> <input type="text" value="[instagram-feed]" size="15" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p>
3526
- <p><?php _e('Find out how to display <a href="?page=sb-instagram-feed&amp;tab=display">multiple feeds</a>.', 'instagram-feed'); ?></p>
3527
- </div>
3528
-
3529
- <a href="https://smashballoon.com/instagram-feed/demo/?utm_campaign=instagram-free&utm_source=footer&utm_medium=ad" target="_blank" class="sbi-pro-notice">
3530
- <img src="<?php echo SBI_PLUGIN_URL . 'img/instagram-pro-promo.png?2019'; ?>" alt="<?php esc_attr_e( 'Instagram Feed Pro', 'instagram-feed' ); ?>">
3531
- </a>
3532
-
3533
- <p class="sbi_plugins_promo dashicons-before dashicons-admin-plugins"> <?php _e('Check out our other free plugins: <a href="https://wordpress.org/plugins/custom-facebook-feed/" target="_blank">Facebook</a>, <a href="https://wordpress.org/plugins/custom-twitter-feeds/" target="_blank">Twitter</a>, and <a href="https://wordpress.org/plugins/feeds-for-youtube/" target="_blank">YouTube</a>.', 'instagram-feed' ); ?></p>
3534
-
3535
- <div class="sbi_share_plugin">
3536
- <h3><?php _e('Like the plugin? Help spread the word!', 'instagram-feed'); ?></h3>
3537
-
3538
- <button id="sbi_admin_show_share_links" class="button secondary" style="margin-bottom: 1px;"><i class="fa fa-share-alt" aria-hidden="true"></i>&nbsp;&nbsp;Share the plugin</button> <div id="sbi_admin_share_links"></div>
3539
- </div>
3540
-
3541
- </div> <!-- end #sbi_admin -->
3542
-
1
+ <?php
2
+ /**
3
+ * Includes functions for all admin page templates and
4
+ * functions that add menu pages in the dashboard. Also
5
+ * has code for saving settings with defaults.
6
+ */
7
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
8
+
9
+ function sb_instagram_menu() {
10
+ $cap = current_user_can( 'manage_instagram_feed_options' ) ? 'manage_instagram_feed_options' : 'manage_options';
11
+
12
+ $cap = apply_filters( 'sbi_settings_pages_capability', $cap );
13
+
14
+ global $sb_instagram_posts_manager;
15
+ $notice = '';
16
+ if ( $sb_instagram_posts_manager->are_critical_errors() ) {
17
+ $notice = ' <span class="update-plugins sbi-error-alert"><span>!</span></span>';
18
+ }
19
+
20
+ add_menu_page(
21
+ __( 'Instagram Feed', 'instagram-feed' ),
22
+ __( 'Instagram Feed', 'instagram-feed' ) . $notice,
23
+ $cap,
24
+ 'sb-instagram-feed',
25
+ 'sb_instagram_settings_page'
26
+ );
27
+ add_submenu_page(
28
+ 'sb-instagram-feed',
29
+ __( 'Settings', 'instagram-feed' ),
30
+ __( 'Settings', 'instagram-feed' ) . $notice,
31
+ $cap,
32
+ 'sb-instagram-feed',
33
+ 'sb_instagram_settings_page'
34
+ );
35
+ add_submenu_page(
36
+ 'sb-instagram-feed',
37
+ __( 'About Us', 'instagram-feed' ),
38
+ __( 'About Us', 'instagram-feed' ),
39
+ $cap,
40
+ 'sb-instagram-feed-about',
41
+ 'sb_instagram_about_page'
42
+ );
43
+
44
+ add_submenu_page(
45
+ 'sb-instagram-feed',
46
+ __( 'oEmbeds', 'instagram-feed' ),
47
+ '<svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="far" data-icon="code" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-code fa-w-18 fa-2x"><path fill="currentColor" d="M234.8 511.7L196 500.4c-4.2-1.2-6.7-5.7-5.5-9.9L331.3 5.8c1.2-4.2 5.7-6.7 9.9-5.5L380 11.6c4.2 1.2 6.7 5.7 5.5 9.9L244.7 506.2c-1.2 4.3-5.6 6.7-9.9 5.5zm-83.2-121.1l27.2-29c3.1-3.3 2.8-8.5-.5-11.5L72.2 256l106.1-94.1c3.4-3 3.6-8.2.5-11.5l-27.2-29c-3-3.2-8.1-3.4-11.3-.4L2.5 250.2c-3.4 3.2-3.4 8.5 0 11.7L140.3 391c3.2 3 8.2 2.8 11.3-.4zm284.1.4l137.7-129.1c3.4-3.2 3.4-8.5 0-11.7L435.7 121c-3.2-3-8.3-2.9-11.3.4l-27.2 29c-3.1 3.3-2.8 8.5.5 11.5L503.8 256l-106.1 94.1c-3.4 3-3.6 8.2-.5 11.5l27.2 29c3.1 3.2 8.1 3.4 11.3.4z" class=""></path></svg>' . __( 'oEmbeds', 'instagram-feed' ),
48
+ $cap,
49
+ 'sbi-oembeds',
50
+ 'sbi_oembeds_page'
51
+ );
52
+
53
+ //Show a Instagram plugin menu item if it isn't already installed
54
+ if( !is_plugin_active( 'custom-facebook-feed/custom-facebook-feed.php' ) && !is_plugin_active( 'custom-facebook-feed-pro/custom-facebook-feed.php' ) ){
55
+ add_submenu_page(
56
+ 'sb-instagram-feed',
57
+ __( 'Facebook Feed', 'instagram-feed' ),
58
+ '<span class="sbi_get_cff"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-facebook fa-w-16 fa-2x"><path fill="currentColor" d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z" class=""></path></svg>' . __( 'Facebook Feed', 'instagram-feed' ) . '</span>',
59
+ $cap,
60
+ 'admin.php?page=sb-instagram-feed&tab=more',
61
+ ''
62
+ );
63
+ }
64
+
65
+ //Show a Twitter plugin menu item if it isn't already installed
66
+ if( !is_plugin_active( 'custom-twitter-feeds/custom-twitter-feed.php' ) && !is_plugin_active( 'custom-twitter-feeds-pro/custom-twitter-feed.php' ) ){
67
+ add_submenu_page(
68
+ 'sb-instagram-feed',
69
+ __( 'Twitter Feed', 'instagram-feed' ),
70
+ '<span class="sbi_get_ctf"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-twitter fa-w-16 fa-2x"><path fill="currentColor" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" class=""></path></svg>' . __( 'Twitter Feed', 'instagram-feed' ) . '</span>',
71
+ $cap,
72
+ 'admin.php?page=sb-instagram-feed&tab=more',
73
+ ''
74
+ );
75
+ }
76
+
77
+ //Show a YouTube plugin menu item if it isn't already installed
78
+ if( !is_plugin_active( 'feeds-for-youtube/youtube-feed.php' ) && !is_plugin_active( 'youtube-feed-pro/youtube-feed.php' ) ){
79
+ add_submenu_page(
80
+ 'sb-instagram-feed',
81
+ __( 'YouTube Feed', 'instagram-feed' ),
82
+ '<span class="sbi_get_yt"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="youtube" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-youtube fa-w-18 fa-2x"><path fill="currentColor" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" class=""></path></svg>' . __( 'YouTube Feed', 'instagram-feed' ) . '</span>',
83
+ $cap,
84
+ 'admin.php?page=sb-instagram-feed&tab=more',
85
+ ''
86
+ );
87
+ }
88
+
89
+ add_submenu_page(
90
+ 'sb-instagram-feed',
91
+ __( 'Social Wall', 'instagram-feed' ),
92
+ '<span><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="th" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-th fa-w-16 fa-2x"><path fill="currentColor" d="M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z" class=""></path></svg>' . __( 'Social Wall', 'instagram-feed' ) . '</span>',
93
+ $cap,
94
+ 'sbi-sw',
95
+ 'sbi_social_wall_page'
96
+ );
97
+
98
+ add_submenu_page(
99
+ 'sb-instagram-feed',
100
+ __( 'Try the Pro Demo', 'instagram-feed' ),
101
+ __( '<span class="sbi_get_pro">Try the Pro Demo</span>', 'instagram-feed' ),
102
+ $cap,
103
+ 'https://smashballoon.com/instagram-feed/demo/?utm_campaign=instagram-free&utm_source=menu-link&utm_medium=upgrade-link',
104
+ ''
105
+ );
106
+
107
+
108
+ }
109
+ add_action('admin_menu', 'sb_instagram_menu');
110
+
111
+ function sb_instagram_about_page() {
112
+ do_action('sbi_admin_page' );
113
+ }
114
+ function sbi_oembeds_page() {
115
+ ( is_plugin_active( 'social-wall/social-wall.php' ) ) ? $sbi_sw_active = true : $sbi_sw_active = false;
116
+ ?>
117
+
118
+ <div id="sbi_admin" class="wrap sbi-oembeds">
119
+ <?php
120
+ $lite_notice_dismissed = get_transient( 'instagram_feed_dismiss_lite' );
121
+
122
+ if ( ! $lite_notice_dismissed ) :
123
+ ?>
124
+ <div id="sbi-notice-bar" style="display:none">
125
+ <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
126
+ <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
127
+ </button>
128
+ </div>
129
+ <?php endif; ?>
130
+ <div id="header">
131
+ <h1><?php _e('Instagram oEmbeds', 'instagram-feed'); ?></h1>
132
+ </div>
133
+
134
+ <p>
135
+ <?php
136
+ _e( "You can use the Instagram Feed plugin to power your Instagram oEmbeds, both old and new.", 'instagram-feed' );
137
+ if ( ! SB_Instagram_Oembed::can_do_oembed() ) {
138
+ echo ' ';
139
+ _e( "Just click the button below and we'll do the rest.", 'instagram-feed' );
140
+ }
141
+ ?>
142
+ </p>
143
+
144
+ <div class="sbi-oembed-button">
145
+
146
+ <?php
147
+ $admin_url_state = admin_url('admin.php?page=sbi-oembeds');
148
+ //If the admin_url isn't returned correctly then use a fallback
149
+ if ( $admin_url_state == '/wp-admin/admin.php?page=sbi-oembeds' ){
150
+ $admin_url_state = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
151
+ }
152
+ $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
153
+ $saved_access_token_data = isset( $oembed_token_settings['access_token'] ) ? $oembed_token_settings['access_token'] : false;
154
+
155
+ $access_token_error = false;
156
+ $valid_new_access_token = false;
157
+ $error_message = '';
158
+ $show_token_expiration_modal = false;
159
+ if ( ! empty( $_GET['sbi_access_token'] ) && strlen( $_GET['sbi_access_token'] ) <= 20 ) {
160
+ $access_token_error = true;
161
+ $error_message = __("There was a problem with the access token that was retrieved.", 'instagram-feed' );
162
+
163
+ } elseif ( ! empty( $_GET['transfer'] ) ) {
164
+ if ( class_exists( 'CFF_Oembed' ) ) {
165
+ $cff_oembed_token = CFF_Oembed::last_access_token();
166
+ $valid_new_access_token = $cff_oembed_token;
167
+ }
168
+ } else {
169
+ $valid_new_access_token = ! empty( $_GET['sbi_access_token'] ) && strlen( $_GET['sbi_access_token'] ) > 20 && $saved_access_token_data !== $_GET['sbi_access_token'] ? sanitize_text_field( $_GET['sbi_access_token'] ) : false;
170
+ if ( $valid_new_access_token && ! empty( $_GET['sbi_access_token'] ) ) {
171
+ $url = esc_url_raw( 'https://graph.facebook.com/me/accounts?limit=500&access_token=' . $valid_new_access_token );
172
+ $pages_data_connection = wp_remote_get( $url );
173
+
174
+ if ( ! is_wp_error( $pages_data_connection ) && isset( $pages_data_connection['body'] ) ) {
175
+ $pages_data = json_decode( $pages_data_connection['body'], true );
176
+ if ( isset( $pages_data['data'][0]['access_token'] ) ) {
177
+ $oembed_token_settings['expiration_date'] = 'never';
178
+ } else {
179
+ $oembed_token_settings['expiration_date'] = time() + (60 * DAY_IN_SECONDS);
180
+ $show_token_expiration_modal = true;
181
+ }
182
+ } else {
183
+ $oembed_token_settings['expiration_date'] = 'unknown';
184
+ }
185
+ }
186
+
187
+ }
188
+
189
+
190
+ if ( ! $saved_access_token_data && ! $valid_new_access_token && ! SB_Instagram_Oembed::can_do_oembed() ) {
191
+ if ( $access_token_error ) { ?>
192
+ <p class="sbi-error"><?php echo $error_message; ?></p>
193
+ <?php }
194
+ $need_to_connect_class = ' sbi-need-to-connect';
195
+ $token_href = 'https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=' . $admin_url_state;
196
+ if ( class_exists( 'CFF_Oembed' ) ) {
197
+ $cff_oembed_token = CFF_Oembed::last_access_token();
198
+
199
+ if ( ! empty( $cff_oembed_token ) ) {
200
+ $need_to_connect_class = '';
201
+ $token_href = add_query_arg( 'transfer', '1', $admin_url_state );
202
+ }
203
+ }
204
+
205
+ ?>
206
+ <a href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn<?php echo $need_to_connect_class; ?>"><i class="fa fa-instagram"></i> <?php _e( 'Enable Instagram oEmbeds', 'instagram-feed' ); ?></a>
207
+ <div id="sbi_config_info" class="sb_get_token" style="display: none;">
208
+ <div class="sbi_config_modal">
209
+ <?php _e( 'As Instagram is part of Facebook, in order to display Instagram oEmbeds, you must connect to Facebook. Click on the button below to connect', 'instagram-feed' ); ?>
210
+
211
+ <p>
212
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn"><?php _e( 'Connect to Facebook', 'instagram-feed' ); ?></a>
213
+ </p>
214
+
215
+ <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
216
+ </div>
217
+ </div>
218
+ <div class="sbi-oembed-promo sbi-oembed-desc">
219
+ <div class="sbi-col">
220
+ <h2><?php _e("What are oEmbeds?", "instagram-feed"); ?></h2>
221
+ <p><?php _e("Anytime you share a link to an Instagram post in WordPress, it is automatically converted into an embedded version of that Instagram post (an \"oEmbed\").</p><p>However, WordPress is discontinuing support for Instagram oEmbeds due to them now requiring an Access Token to work. Don't worry though, we have your back. Just use the button above to connect to Facebook and we'll make sure your Instagram oEmbeds keep working.", "instagram-feed"); ?></p>
222
+ </div>
223
+
224
+ <img src="<?php echo SBI_PLUGIN_URL . 'img/sbi-oembed.png'; ?>" style="padding: 0px; background: white;">
225
+ </div>
226
+ <?php } else {
227
+ if ( $valid_new_access_token ) {
228
+ if ( ! is_array( $oembed_token_settings ) ) {
229
+ $oembed_token_settings = array(
230
+ 'access_token' => '',
231
+ 'disabled' => '',
232
+ );
233
+ }
234
+ $oembed_token_settings['access_token'] = $valid_new_access_token;
235
+ $oembed_token_settings['disabled'] = false;
236
+ update_option( 'sbi_oembed_token', $oembed_token_settings );
237
+ ?>
238
+ <div><p class="sbi-success-message"><?php _e("You're all set! Instagram Feed will replace your old oEmbeds automatically and generate all new content for all new links.", 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php _e("Disable", 'instagram-feed' ); ?></a></p></div>
239
+ <?php if ( $show_token_expiration_modal ) : ?>
240
+ <div id="sbi_config_info" class="sb_get_token">
241
+ <div class="sbi_config_modal">
242
+ <p><strong><?php _e( 'Heads up!', 'instagram-feed' ); ?></strong><br></p>
243
+
244
+ <p>
245
+ <?php _e( 'Your access token will expire in 60 days. Facebook requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Click the button below for instructions on creating a Facebook page and extending your access token to never expire.', 'instagram-feed' ); ?>
246
+ </p>
247
+ <p>
248
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" class="sbi-oembed-connect-btn" target="_blank" rel="noopener"><?php _e( 'How to Create a Facebook Page', 'instagram-feed' ); ?></a>
249
+ &nbsp;&nbsp;<a href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="button button-secondary" style="height: 47px;line-height: 47px;font-size: 14px;padding: 0 21px;"><?php _e( 'Try Again', 'instagram-feed' ); ?></a>
250
+ </p>
251
+
252
+ <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
253
+ </div>
254
+ </div>
255
+ <?php endif; ?>
256
+ <?php } else {
257
+ if ( ! isset( $oembed_token_settings['expiration_date'] ) || (int)$oembed_token_settings['expiration_date'] === 0 || $oembed_token_settings['expiration_date'] > time() ) :
258
+ ?>
259
+ <div><p class="sbi-success-message"><?php _e("The Instagram Feed plugin is now powering your Instagram oEmbeds.", 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php _e("Disable", 'instagram-feed' ); ?></a></p></div>
260
+ <?php
261
+ endif;
262
+ if ( ! empty( $oembed_token_settings['expiration_date'] )
263
+ && $oembed_token_settings['expiration_date'] !== 'never' ) :
264
+ $link_1 = '<a href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" target="_blank" rel="noopener">';
265
+ $link_2 = '</a>';
266
+ $class = 'sbi_warning';
267
+ if ( $oembed_token_settings['expiration_date'] > time() ) {
268
+ $days_to_expire = floor( ( $oembed_token_settings['expiration_date'] - time() ) / DAY_IN_SECONDS );
269
+ $message = sprintf( __( '%1sImportant:%2s Your access token for powering oEmbeds will expire in %3s days.', 'instagram-feed' ), '<strong>', '</strong>', $days_to_expire );
270
+ } else {
271
+ $class = 'sb_instagram_notice';
272
+ $message = __( 'Your access token for powering oEmbeds has expired.', 'instagram-feed' );
273
+ }
274
+ ?>
275
+ <div class="<?php echo $class; ?>" style="display:inline-block;width: auto;">
276
+ <p>
277
+ <?php echo $message ; ?>
278
+ </p>
279
+ <p>
280
+ <?php echo sprintf( __( 'Instagram requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Visit %1sthis link%2s for instructions on extending your access token to never expire.', 'instagram-feed' ), $link_1, $link_2 ); ?>
281
+ </p>
282
+ <p>
283
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/v2/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="sbi-oembed-connect-btn"><?php _e( 'Connect to Facebook and Recheck Access Token', 'instagram-feed' ); ?></a>
284
+ </p>
285
+ </div>
286
+
287
+ <?php endif; ?>
288
+
289
+ <?php } ?>
290
+ <div class="sbi-oembed-promo">
291
+ <h2><?php _e("Did you know, you can also use this Instagram Feed plugin to easily add Instagram content on your website?", 'instagram-feed'); ?></h2>
292
+ <div class="sbi-reasons">
293
+ <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="clock" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-clock fa-w-16 fa-2x"><path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z" class=""></path></svg><span><?php _e("Save time", 'instagram-feed'); ?></span></div>
294
+ <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-line" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-line fa-w-16 fa-2x"><path fill="currentColor" d="M117.65 277.65c6.25 6.25 16.38 6.25 22.63 0L192 225.94l84.69 84.69c6.25 6.25 16.38 6.25 22.63 0L409.54 200.4l29.49 29.5c15.12 15.12 40.97 4.41 40.97-16.97V112c0-8.84-7.16-16-16-16H363.07c-21.38 0-32.09 25.85-16.97 40.97l29.5 29.49-87.6 87.6-84.69-84.69c-6.25-6.25-16.38-6.25-22.63 0l-74.34 74.34c-6.25 6.25-6.25 16.38 0 22.63l11.31 11.31zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z" class=""></path></svg><span><?php _e("Increase social engagement", 'instagram-feed'); ?></span></div>
295
+ <div><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-heart fa-w-16 fa-2x"><path fill="currentColor" d="M462.3 62.7c-54.5-46.4-136-38.7-186.6 13.5L256 96.6l-19.7-20.3C195.5 34.1 113.2 8.7 49.7 62.7c-62.8 53.6-66.1 149.8-9.9 207.8l193.5 199.8c6.2 6.4 14.4 9.7 22.6 9.7 8.2 0 16.4-3.2 22.6-9.7L472 270.5c56.4-58 53.1-154.2-9.7-207.8zm-13.1 185.6L256.4 448.1 62.8 248.3c-38.4-39.6-46.4-115.1 7.7-161.2 54.8-46.8 119.2-12.9 142.8 11.5l42.7 44.1 42.7-44.1c23.2-24 88.2-58 142.8-11.5 54 46 46.1 121.5 7.7 161.2z" class=""></path></svg><span><?php _e("Keep Your Site Looking Fresh.", 'instagram-feed'); ?></span></div>
296
+ </div>
297
+ <p>
298
+ <?php $check_svg = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-check fa-w-16 fa-2x"><path fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg>'; ?>
299
+ <?php echo $check_svg; ?><span><?php _e("Super simple to set up", 'instagram-feed'); ?></span>
300
+ <?php echo $check_svg; ?><span><?php _e("Optimized for speed", 'instagram-feed'); ?></span>
301
+ <?php echo $check_svg; ?><span><?php _e("Completely customizable", 'instagram-feed'); ?></span>
302
+ <?php echo $check_svg; ?><span><?php _e("SEO friendly", 'instagram-feed'); ?></span>
303
+ </p>
304
+ <a href="?page=sb-instagram-feed" class="button button-primary"><?php _e("Add an Instagram feed now", 'instagram-feed'); ?></a>
305
+ </div>
306
+
307
+ <?php } ?>
308
+
309
+ </div>
310
+ </div>
311
+ <?php }
312
+
313
+ function sbi_social_wall_page() {
314
+
315
+ ( is_plugin_active( 'social-wall/social-wall.php' ) ) ? $sbi_sw_active = true : $sbi_sw_active = false;
316
+
317
+ ?>
318
+
319
+ <div id="sbi_admin" class="wrap sw-landing-page">
320
+
321
+ <?php $plus_svg = '<span class="sbi-sb-plus"><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" class="svg-inline--fa fa-plus fa-w-12 fa-2x"><path fill="currentColor" d="M376 232H216V72c0-4.42-3.58-8-8-8h-32c-4.42 0-8 3.58-8 8v160H8c-4.42 0-8 3.58-8 8v32c0 4.42 3.58 8 8 8h160v160c0 4.42 3.58 8 8 8h32c4.42 0 8-3.58 8-8V280h160c4.42 0 8-3.58 8-8v-32c0-4.42-3.58-8-8-8z" class=""></path></svg></span>'; ?>
322
+
323
+ <div class="sbi-sw-icons">
324
+
325
+ <span style="display: inline-block; padding: 0 0 12px 0; width: 360px; max-width: 100%;">
326
+ <svg viewBox="0 0 9161 1878" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">
327
+ <path d="M671.51192 492.98498c-131.56765-59.12206-268.60859-147.41608-396.53319-188.5154 45.4516 108.39585 83.81326 223.88002 123.5099 338.03081-79.17849 59.49897-171.6647 105.68858-260.02357 156.01204C213.65642 872.8361 320.1446 915.85885 404.9893 980.52836c-67.96118 83.8619-201.48512 171.0179-234.02089 247.0198 140.6921-17.62678 304.63665-46.21028 435.53762-52.00414 28.76425 144.58318 43.59867 303.0974 84.5075 435.5368 60.92028-175.2656 116.0013-356.3729 188.5158-520.0447 111.90636 46.28566 248.28994 102.72599 357.52876 130.01178-76.6463-107.53462-146.59336-221.76932-214.51645-338.02878 100.51155-72.83872 202.17166-144.52441 299.02516-221.02077-136.89504-12.61227-278.73407-20.28825-422.53587-25.99863-22.85286-148.332-16.84825-325.5158-52.00496-461.53949-53.19323 111.48812-115.96685 213.3914-175.51405 318.52475m65.00509 1228.60643c-18.07949 77.37581 41.48757 109.11319 32.50294 156.01204-58.81404-20.26799-103.0575-30.6796-182.01552-19.50201 2.47017-60.37032 56.76657-68.90954 45.50428-143.0107-841.40803-95.6632-843.09804-1616.06909-6.50107-1709.64388C1672.04777-111.55711 1704.8713 1694.70523 736.517 1721.5914" fill="#e34f0e"/>
328
+ <path d="M847.02597 174.46023c35.15671 136.0237 29.1521 313.20749 52.00455 461.53544 143.80221 5.71443 285.63962 13.38636 422.53628 26.00268-96.8531 76.49636-198.51483 148.18205-299.02556 221.01874 67.92349 116.2623 137.87014 230.49416 214.51847 338.03-109.24085-27.2866-245.62443-83.72572-357.5308-130.0126-72.51448 163.67262-127.5955 344.77992-188.51538 520.04553-40.90924-132.4394-55.74325-290.95364-84.5079-435.53681-130.90057 5.79548-294.84472 34.37736-435.53722 52.00415 32.53577-76.0007 166.0589-163.15589 234.02008-247.02021-84.8451-64.67032-191.33207-107.69066-266.52343-182.01472 88.35886-50.32346 180.84346-96.51307 260.02276-156.01609-39.69705-114.14674-78.05668-229.63091-123.50868-338.02675C402.9013 345.5689 539.94427 433.86292 671.51192 492.98498c59.5468-105.13335 122.32082-207.03663 175.51405-318.52475" fill="#fff"/>
329
+ <path d="M1782.27033 1236.51938c41.18267 21.61921 126.79927 44.31938 214.58338 44.31938 213.49962 0 311.03752-107.01507 311.03752-232.40646 0-101.61027-58.52274-171.87269-189.65702-220.5159-92.11913-33.50977-131.13429-48.6432-131.13429-85.39586 0-32.4288 32.51263-54.04801 92.11913-54.04801 72.61154 0 126.79927 20.53824 158.22814 34.59073l41.18267-155.65828c-47.6852-21.6192-110.54295-37.83361-197.2433-37.83361-184.23826 0-293.69746 99.44834-293.69746 228.08262 0 108.09602 82.36534 176.19652 205.91335 219.43493 82.36533 28.10497 114.87797 48.64321 114.87797 84.3149 0 36.75265-32.51264 59.45282-99.70541 59.45282-73.6953 0-145.2231-22.70017-189.65703-45.40034l-36.84765 161.06308zM3019.37602 1270.02915h189.65702l-36.84765-728.56722h-256.8498l-55.27148 194.57285c-21.67508 76.74818-45.51768 179.4394-66.10902 268.07815h-3.25126c-15.17256-88.63875-36.84765-185.92517-57.43898-266.99719l-47.6852-195.6538h-263.35233l-45.51768 728.56721h179.90323l11.9213-260.51142c3.25127-83.23394 6.50253-191.32997 10.83755-294.0212h2.1675c17.34008 99.44835 39.01517 207.54438 58.52274 286.45448l60.69025 252.9447h152.80938l72.61154-254.02566c23.8426-79.99106 54.18773-189.16805 76.94657-285.37352h3.25126c0 113.50083 1.08376 210.78726 4.33502 294.0212l8.67004 260.51142zM3699.9738 1101.39935l46.60144 168.6298h211.33211l-217.83464-728.56722H3478.8879l-211.33211 728.56722h202.66208l41.18267-168.6298h188.57327zm-162.56317-143.76772l31.42888-130.79619c9.7538-41.07649 20.59134-101.61026 31.42888-143.76771h2.1675c11.9213 42.15745 26.01012 102.69122 36.84766 143.76771l33.59639 130.7962h-135.4693zM4016.4301 1236.51938c41.18266 21.61921 126.79926 44.31938 214.58337 44.31938 213.49962 0 311.03752-107.01507 311.03752-232.40646 0-101.61027-58.52274-171.87269-189.65702-220.5159-92.11913-33.50977-131.1343-48.6432-131.1343-85.39586 0-32.4288 32.51264-54.04801 92.11914-54.04801 72.61154 0 126.79926 20.53824 158.22814 34.59073l41.18267-155.65828c-47.6852-21.6192-110.54295-37.83361-197.2433-37.83361-184.23826 0-293.69746 99.44834-293.69746 228.08262 0 108.09602 82.36534 176.19652 205.91335 219.43493 82.36533 28.10497 114.87797 48.64321 114.87797 84.3149 0 36.75265-32.51264 59.45282-99.70541 59.45282-73.6953 0-145.2231-22.70017-189.65703-45.40034l-36.84765 161.06308zM4623.27688 541.46193v728.56722h196.15955V981.41276h237.34222v288.6164h196.15955V541.46192h-196.15955v269.1591h-237.34222v-269.1591h-196.15955z" fill="#282828" fill-rule="nonzero"/>
330
+ <g>
331
+ <path d="M6900.00785 293.7053c5.29-14.371 11.90999-24.77099 19.84998-31.19998 7.94-6.429 16.07-9.644 24.38998-9.644 8.32 0 15.7 2.08 22.12999 6.241 6.43 4.16 10.39999 9.265 11.90999 15.31599 2.27 43.86896 4.16 92.65493 5.67 146.35689 1.51 53.70296 2.65 109.86291 3.4 168.48187.76 58.61796 1.52 118.74891 2.26999 180.39386.76 61.64396 1.33 122.71991 1.71 183.22987.37 60.50695.56 119.1269.56 175.85686 0 56.72996.38 109.28992 1.14 157.69988-3.78 12.1-10.59 20.98999-20.41999 26.65998-9.83999 5.68-19.85998 8.14-30.06997 7.38-10.21-.76-19.28999-4.73-27.22998-11.91-7.94-7.18999-11.91-17.58998-11.91-31.19997l-3.4-983.66226zm173.57987 0c5.3-14.371 11.90999-24.77099 19.85998-31.19998 7.94-6.429 16.06999-9.644 24.38998-9.644 8.32 0 15.69 2.08 22.11999 6.241 6.43 4.16 10.39999 9.265 11.91999 15.31599 2.27 43.86896 4.15 92.65493 5.67 146.35689 1.51 53.70296 2.64 109.86291 3.4 168.48187.76 58.61796 1.51999 118.74891 2.26999 180.39386.76 61.64396 1.33 122.71991 1.7 183.22987.38 60.50695.57 119.1269.57 175.85686 0 56.72996.38 109.28992 1.13 157.69988-3.78 12.1-10.59 20.98999-20.41999 26.65998-9.82999 5.68-19.84998 8.14-30.05998 7.38-10.20999-.76-19.28998-4.73-27.22997-11.91-7.94-7.18999-11.92-17.58998-11.92-31.19997l-3.4-983.66226zm-419.49969 980.25225c-6.81-4.54-13.60999-12.66999-20.41998-24.38998-6.81-11.71999-13.61-24.57998-20.41999-38.57997-6.81-13.98999-13.61999-28.16998-20.41998-42.53997-6.81-14.36999-13.99999-26.84998-21.55998-37.43997-7.56-10.58999-15.51-18.33998-23.82999-23.25998-8.31999-4.92-17.38998-4.73-27.22998.57-15.11998 24.95998-30.43997 49.15996-45.93996 72.60994-15.50999 23.44999-32.52998 43.48997-51.05996 60.12996-18.52999 16.63999-39.70997 28.35998-63.52995 35.16997-23.82999 6.81-51.62997 6.05-83.38994-2.27-31.01998-8.31999-56.16996-24.57998-75.44994-48.77996-19.28999-24.20998-33.65998-52.94996-43.10997-86.22993-9.46-33.27998-14.19-69.77995-14.19-109.48992 0-39.70397 4.35-79.22394 13.05-118.55591 8.7-39.33097 21.36998-77.14894 38.00997-113.45492 16.63999-36.30597 36.67997-67.50595 60.12995-93.60093 23.44999-26.09398 50.10997-45.75996 79.98994-58.99595 29.86998-13.237 62.20996-16.82999 96.99993-10.779 32.51998 6.051 59.36996 19.855 80.54994 41.41198 21.17998 21.55598 38.76997 47.65096 52.75996 78.28394 13.98999 30.63297 24.95998 64.47995 32.89998 101.54192 7.93999 37.06197 15.12998 74.12394 21.55998 111.18692 6.43 37.06197 12.85999 72.42194 19.28999 106.08192 6.41999 33.65997 14.92998 62.58995 25.51998 86.78993 10.58999 24.20998 24.01998 41.97997 40.27997 53.32996 16.25998 11.34 37.62997 12.84999 64.09995 4.53 30.25997-31.00998 54.45996-51.61996 72.60994-61.82996 18.15999-10.20999 31.38998-13.60999 39.70997-10.20999 8.32 3.4 11.91 11.91 10.78 25.52998-1.13 13.61-6.05 28.73998-14.75 45.37997-8.69999 16.63999-20.60998 32.89997-35.73997 48.77996-15.11999 15.88999-32.32997 27.98998-51.61996 36.30997-19.28998 8.32-40.46997 11.16-63.52995 8.51-23.06998-2.65-47.08997-14.56-72.04995-35.73998zm2413.83818 6.81c-2.26-39.32997-5.67-82.25994-10.20999-128.7699-4.53-46.51997-10.58-92.84993-18.14999-138.9899-7.55999-46.13396-16.63998-89.81493-27.22998-131.0369-10.58999-41.22197-23.06998-76.01494-37.43997-104.37892-14.36999-28.36298-30.81997-48.21797-49.34996-59.56396-18.52999-11.34499-39.51997-9.83199-62.96995 4.539-23.44998 14.37099-49.34997 43.30197-77.71994 86.79293-28.35998 43.49097-59.93996 106.08092-94.72993 187.76786-3.03 6.05-7 15.88-11.91 29.49998-4.91999 13.60999-10.20999 28.92998-15.88998 45.94997-5.67 17.01998-11.91 34.97997-18.71999 53.88996-6.8 18.90998-13.03999 37.05997-18.71998 54.45995-5.67 17.4-10.78 32.89998-15.31 46.50997-4.53999 13.61999-7.56999 23.82998-9.07998 30.63998-6.05 15.11998-13.62 23.62998-22.68999 25.52998-9.08 1.89-18.14998.18-27.22998-5.11-9.07999-5.3-17.39998-12.47999-24.95998-21.55998-7.56-9.07-12.09999-17.01999-13.61999-23.81999 6.81-26.47998 12.86-55.96995 18.15999-88.49993 5.29-32.51997 9.45-69.57995 12.47999-111.17991 3.02-41.60397 4.16-88.68794 3.4-141.2559-.76-52.56696-4.54-112.13091-11.35-178.69186 8.32-17.39599 16.65-27.03998 24.96999-28.93098 8.31999-1.891 16.63998.756 24.94998 7.942 8.32 7.18499 16.07999 17.77498 23.25998 31.76697 7.19 13.99299 13.61999 28.17498 19.28999 42.54597 5.67 14.37099 10.20999 27.79698 13.61998 40.27697 3.4 12.47999 5.1 20.61098 5.1 24.39298 16.63999-14.371 31.95998-32.71298 45.94997-55.02596 13.98999-22.31298 28.35997-44.62597 43.10996-66.93895 14.75-22.31298 30.82998-42.16697 48.21997-59.56396 17.39998-17.39598 38.19997-27.98597 62.39995-31.76697 49.91996-9.077 92.27993-3.215 127.0699 17.58499 34.79998 20.79998 63.34996 50.67696 85.65994 89.62993 22.30998 38.95297 39.32997 84.14593 51.05996 135.5789 11.72 51.43296 20.03999 103.05492 24.95998 154.86588 4.91 51.80996 6.99 101.34992 6.24 148.62989-.76 47.26996-2.65 86.02993-5.68 116.2899-8.32 17.39-19.46998 26.08999-33.46997 26.08999-13.99 0-25.13998-8.7-33.46998-26.08998zm-1029.72922-9.08c-43.86997-18.14998-78.46994-41.97996-103.80992-71.46994-25.33998-29.49998-43.10997-61.83995-53.32996-97.00993-10.21-35.16997-13.61-72.03994-10.21-110.61791 3.41-38.57497 12.48-76.20395 27.22999-112.88792 14.74998-36.68397 34.41997-71.28794 58.99995-103.81092 24.57998-32.52398 52.56996-60.32095 83.95994-83.38994 31.38997-23.06898 65.79995-40.08797 103.23992-51.05496 37.43997-10.967 76.20994-13.42599 116.28991-7.375 33.27998 5.295 61.83995 20.99 85.65994 47.08397 23.82998 26.09498 42.73996 58.42996 56.72995 97.00493 13.99 38.57397 22.87999 80.93094 26.65998 127.0699 3.78 46.13797 1.7 91.70893-6.24 136.7079-7.93999 45.00996-21.55997 86.79993-40.83996 125.3699-19.28999 38.57998-44.62997 69.77995-76.01994 93.59993-31.38998 23.82999-69.39995 37.81998-114.01992 41.97997-44.62996 4.16-96.05992-6.24-154.29988-31.19997zm-642.42952 0c-43.86996-18.14998-78.46994-41.97996-103.80992-71.46994-25.33998-29.49998-43.10997-61.83995-53.31996-97.00993-10.20999-35.16997-13.61999-72.03994-10.20999-110.61791 3.4-38.57497 12.48-76.20395 27.21998-112.88792 14.74999-36.68397 34.41997-71.28794 58.99996-103.81092 24.57998-32.52398 52.56996-60.32095 83.95993-83.38994 31.38998-23.06898 65.79995-40.08797 103.23992-51.05496 37.43998-10.967 76.20995-13.42599 116.29992-7.375 33.27997 5.295 61.82995 20.99 85.64993 47.08397 23.82998 26.09498 42.73997 58.42996 56.72996 97.00493 13.98999 38.57397 22.87998 80.93094 26.65998 127.0699 3.79 46.13797 1.71 91.70893-6.24 136.7079-7.94 45.00996-21.54998 86.79993-40.83997 125.3699-19.28998 38.57998-44.62996 69.77995-76.01994 93.59993-31.38997 23.82999-69.38995 37.81998-114.01991 41.97997-44.61997 4.16-96.05993-6.24-154.29989-31.19997zm-1823.64862-14.69998c-5.29-34.31998-9.64-71.39995-13.04999-111.24992-3.4-39.85997-6.24-80.95994-8.5-123.2999-2.27-42.34497-3.79-85.24294-4.54-128.6939-.75999-43.45198-1.13999-86.07294-1.13999-127.86391 0-41.78997.38-81.91994 1.14-120.38991.75-38.46997 1.89-74.30995 3.4-107.52092 2.27-9.41 8.13-15.63699 17.58998-18.68199 9.45-3.044 19.65999-3.736 30.62998-2.075 10.97 1.66 20.98998 5.12 30.06998 10.378 9.07 5.259 13.98999 11.48599 14.73999 18.68198-1.51 31.54998-2.64 62.40896-3.4 92.57593-.76 30.16698-.57 59.91796.57 89.25494 1.13 29.33597 3.4 58.81095 6.81 88.42493 3.4 29.61298 8.12999 59.64095 14.17998 90.08493 35.54998-34.31797 72.03995-55.90596 109.47992-64.76195 37.43997-8.856 72.79995-8.441 106.07992 1.245 33.27998 9.687 63.72995 26.56898 91.32993 50.64796 27.60998 24.07798 49.54996 51.61496 65.80995 82.61194 16.25999 31.00198 25.89998 63.65195 28.92998 97.97192 3.02 34.31998-3.22 66.41995-18.71999 96.30993-15.50998 29.88998-41.40996 55.62996-77.71994 77.21994-36.29997 21.58999-85.46993 35.42998-147.48989 41.50997-27.22998 2.77-50.86996 4.99-70.90994 6.65-20.03999 1.66-38.94997 1.8-56.72996.41-17.76999-1.38-35.91997-5.12-54.45996-11.21-18.52998-6.08999-39.89997-15.49998-64.09995-28.22997zm85.08994-154.42989c-9.83 32.09998-11.34 58.25996-4.53 78.45994 6.8 20.20999 18.89998 35.00998 36.29997 44.41997 17.39999 9.41 38.57997 14.11999 63.53995 14.11999 24.95998 0 50.66997-3.74 77.13995-11.21 26.47998-7.46999 52.37996-18.12998 77.71994-31.96997 25.33998-13.83999 47.08996-30.15997 65.23995-48.97996 13.60999-13.83999 20.79998-30.58998 21.55998-50.23996.75-19.64999-2.84-39.70997-10.78-60.18996-7.94998-20.47998-19.85998-40.13097-35.73996-58.95095-15.88-18.81999-33.65998-34.31798-53.31996-46.49597-19.66999-12.17699-40.65997-19.64998-62.96996-22.41698-22.31998-2.768-44.24996 1.799-65.80995 13.69899-21.54998 11.90099-41.78996 32.10397-60.69995 60.61095-18.90999 28.50398-34.78997 68.22395-47.64996 119.14391zm2380.9882 74.95995c49.15996 31.76997 93.21993 45.00996 132.1799 39.70997 38.94997-5.29 71.65995-21.92999 98.12993-49.91997 26.47998-27.97997 46.32996-63.71995 59.56995-107.20991 13.24-43.48997 18.90999-87.92994 17.01999-133.3119-1.9-45.38197-11.73-87.54994-29.49998-126.5029-17.77999-38.95298-44.81997-68.26196-81.11994-87.92694-20.41998-10.59-44.24997-10.022-71.47994 1.701-27.22998 11.72399-53.88996 30.63297-79.97994 56.72795-26.09998 26.09498-49.73997 57.29496-70.90995 93.60093-21.17999 36.30498-35.54997 73.55695-43.11997 111.75292-7.56 38.19897-6.62 75.06894 2.84 110.61892 9.45 35.54997 31.57998 65.79995 66.36995 90.75993zm-642.42952 0c49.16997 31.76997 93.21993 45.00996 132.1799 39.70997 38.94997-5.29 71.65995-21.92999 98.13993-49.91997 26.46998-27.97997 46.31997-63.71995 59.55996-107.20991 13.23999-43.48997 18.90998-87.92994 17.01998-133.3119-1.89-45.38197-11.71999-87.54994-29.49998-126.5029-17.76998-38.95298-44.80996-68.26196-81.11993-87.92694-20.41999-10.59-44.24997-10.022-71.47995 1.701-27.22998 11.72399-53.88996 30.63297-79.97994 56.72795-26.09998 26.09498-49.72996 57.29496-70.90995 93.60093-21.17998 36.30498-35.54997 73.55695-43.10996 111.75292-7.57 38.19897-6.62 75.06894 2.83 110.61892 9.45999 35.54997 31.57997 65.79995 66.36994 90.75993zm-1159.18912-39.69997c19.65998 30.24997 40.26997 47.64996 61.82995 52.18996 21.55999 4.53 42.53997.56 62.96995-11.92 20.41999-12.47998 39.70997-31.00997 57.85996-55.58995 18.14999-24.57998 33.65998-50.86996 46.51997-78.84994 12.84999-27.98998 22.30998-55.40696 28.35997-82.25794 6.05-26.85098 7.56-48.97496 4.54-66.37095-3.78-18.15299-6.81-34.41497-9.08-48.78596-2.27-14.371-4.72999-27.22898-7.36999-38.57497-2.65-11.345-5.68-21.74599-9.07999-31.19998-3.4-9.455-8.13-19.09799-14.17999-28.93098-30.25998-21.17898-58.42996-29.49898-84.52994-24.95998-26.08998 4.538-49.53996 17.39599-70.33994 38.57397-20.79999 21.17898-38.18997 48.40796-52.18996 81.68794-13.99 33.27997-24.19998 68.07295-30.62998 104.37892-6.43 36.30597-8.51 71.47995-6.24 105.50992 2.27 34.03998 9.45 62.39995 21.55999 85.09994z" fill="#282828" fill-rule="nonzero"/>
332
+ <path d="M6892.93785 1141.07765l-2.93-847.33736c-.01-1.191.2-2.374.61-3.492 6.06-16.43098 13.87-28.16497 22.94999-35.51497 9.95999-8.065 20.24998-11.87199 30.67997-11.87199 10.37 0 19.54999 2.66 27.55998 7.845 8.86 5.732 14.1 12.94799 16.18 21.28698.16.625.25 1.264.29 1.908 2.26999 43.93997 4.15999 92.80393 5.67999 146.59289 1.51 53.75096 2.65 109.96191 3.4 168.63387.76 58.61996 1.52 118.75391 2.27 180.39986.76 61.66396 1.33 122.76091 1.71 183.28987.37 60.52995.56 119.1699.56 175.91986 0 56.66996.38 109.18992 1.13999 157.54988.01 1.06-.14 2.12-.46 3.13-4.6 14.73-12.99999 25.43998-24.96998 32.34998-11.7 6.75-23.64998 9.58-35.79997 8.68-12.44-.92-23.51999-5.71-33.19998-14.47-9.87-8.93-15.19999-21.69998-15.19999-38.57997l-.25-72.25994c-2.06 5.06-4.48 10.24999-7.27 15.58998-9.08998 17.41-21.52998 34.43998-37.35996 51.04997-16.08 16.88998-34.38998 29.74997-54.89996 38.58997-20.83999 8.98999-43.70997 12.12999-68.62995 9.25999-24.60998-2.82-50.33996-15.20999-76.94994-37.68997-7.62-5.23-15.41999-14.25-23.02998-27.34998-6.92-11.92-13.84-24.98998-20.75999-39.21997-6.83-14.02-13.64999-28.23998-20.46998-42.63997-6.53-13.77999-13.4-25.75998-20.65999-35.90997-6.62-9.27-13.48999-16.15999-20.76998-20.45999-4.67-2.76-9.71-2.7-15.12-.35-14.69998 24.18998-29.57997 47.66997-44.62996 70.42995-16.00999 24.20998-33.58997 44.87997-52.71996 62.05995-19.67998 17.66999-42.16997 30.11998-67.46995 37.34997-25.32998 7.23-54.88996 6.63-88.72993-2.23-33.15997-8.89999-60.03995-26.31997-80.66994-52.20995-20.07998-25.18998-35.06997-55.08996-44.90996-89.72994-9.7-34.10997-14.57-71.50994-14.57-112.21991 0-40.42697 4.43-80.66694 13.29-120.71491 8.84999-40.02697 21.73998-78.51394 38.67997-115.46191 17.08998-37.28898 37.69997-69.31695 61.77995-96.11793 24.43998-27.19398 52.23996-47.66197 83.36994-61.45595 31.65997-14.024 65.90995-17.899 102.88992-11.467 34.67997 6.452 63.26995 21.24799 85.85994 44.23397 21.94998 22.34798 40.20996 49.38096 54.70995 81.13794 14.28 31.25498 25.48998 65.78695 33.58998 103.60192 7.97 37.19097 15.17999 74.38195 21.62998 111.57192 6.42 37.00197 12.84 72.31194 19.25999 105.91192 6.27 32.82997 14.53999 61.05995 24.85998 84.65993 9.73 22.24999 21.89998 38.70997 36.83997 49.12997 13.55 9.45999 31.25998 10.32999 53.02996 3.92 30.31998-30.90998 54.72996-51.40997 73.05995-61.72996 12.16999-6.84 22.40998-10.8 30.62997-12.17 7.06-1.17999 12.97-.53999 17.76999 1.42 3.08 1.26 5.82 2.97 8.15 5.15zm171.26987-850.82935c-.41 1.118-.62 2.301-.62 3.492l3.4 983.65725c0 16.87999 5.34 29.64998 15.21 38.57997 9.67998 8.76 20.75997 13.55 33.19997 14.47 12.14999.9 24.09998-1.93 35.79997-8.68 11.95999-6.91 20.36998-17.61999 24.96998-32.34998.32-1.01.47-2.07.45-3.13-.75-48.35996-1.13-100.87992-1.13-157.54988 0-56.74995-.19-115.3899-.57-175.91986-.38-60.52896-.94-121.62591-1.7-183.28987-.76-61.64595-1.51-121.7799-2.27-180.39986-.76-58.67196-1.89-114.88291-3.41-168.63387-1.51-53.78896-3.4-102.65292-5.67999-146.5929-.03-.644-.13-1.283-.28-1.90799-2.09-8.339-7.32-15.55499-16.17999-21.28698-8.02-5.185-17.18998-7.845-27.55998-7.845-10.43999 0-20.71998 3.807-30.68997 11.872-9.08 7.34999-16.88999 19.08398-22.93999 35.51497zm1588.0788 521.3466c11.02-11.49199 21.36999-24.98198 31.06998-40.44997 14.03-22.37998 28.44998-44.75996 43.23997-67.13995 15.13999-22.89798 31.63998-43.26796 49.48996-61.12095 18.93999-18.93699 41.57997-30.45998 67.67995-34.53497 52.65996-9.574 97.29993-3.098 133.9899 18.84098 36.21997 21.64899 65.98995 52.69896 89.20993 93.24193 22.76999 39.74697 40.15997 85.84694 52.12996 138.3279 11.82 51.85696 20.20999 103.90492 25.15998 156.14788 4.96 52.18996 7.05 102.09992 6.29 149.72989-.77 47.60996-2.68 86.64993-5.73 117.1199-.11 1.16-.43 2.28-.92 3.32-10.40999 21.74999-24.99998 31.77998-42.49996 31.77998-17.48999 0-32.07998-10.03-42.48997-31.77997-.56-1.17-.88-2.44-.96-3.73-2.26-39.21997-5.65-82.00994-10.18-128.3799-4.51999-46.29997-10.53998-92.40994-18.06998-138.3399-7.51-45.82997-16.51999-89.21993-27.03998-130.1689-10.38999-40.41497-22.58998-74.53795-36.67997-102.34693-13.35999-26.36698-28.42998-45.00796-45.64997-55.55495-15.47998-9.474-32.93997-7.465-52.51996 4.536-22.56998 13.82998-47.26996 41.87496-74.56994 83.72993-28.12998 43.12897-59.40996 105.21592-93.90993 186.22486-.08.19-.17.37-.26.55-2.91 5.83-6.71 15.30999-11.45 28.42998-4.88999 13.53999-10.15998 28.77998-15.79998 45.70996-5.7 17.09-11.95999 35.12998-18.79998 54.11996-6.77 18.80999-12.98 36.85997-18.61999 54.16996-5.68 17.41999-10.79 32.93998-15.33999 46.57997-4.39 13.16999-7.33 23.04998-8.8 29.63997-.12.52-.28 1.04-.48 1.54-7.70999 19.27999-18.35998 29.19998-29.92997 31.59998-11.43 2.39-22.87998.41-34.30997-6.25-10.03-5.85-19.24999-13.76999-27.59998-23.78998-8.86-10.63999-13.93-20.08998-15.7-28.05998-.33999-1.54-.30999-3.14.08-4.66 6.74-26.20997 12.73-55.41995 17.97-87.60993 5.25-32.26997 9.36999-69.03995 12.36999-110.30991 3.01-41.34297 4.13-88.13794 3.38-140.3819-.75-52.31096-4.52-111.58291-11.29-177.81786-.19-1.829.13-3.674.92-5.332 10.19-21.30698 21.57999-32.05198 31.76998-34.36797 11.17999-2.541 22.52998.468 33.70997 10.12499 9.13 7.881 17.73999 19.41898 25.61998 34.76697 7.34 14.288 13.9 28.76898 19.68999 43.44197 5.82 14.74199 10.46999 28.51598 13.95999 41.31797.7 2.54 1.32 4.919 1.87 7.135zm-1260.43904 469.29265c-45.43997-18.81999-81.21994-43.59997-107.46992-74.15995-26.30998-30.62997-44.73997-64.20995-55.34996-100.72992-10.55-36.33997-14.07999-74.42994-10.56-114.28691 3.48-39.54797 12.79-78.12894 27.90999-115.73892 15.06999-37.49597 35.16997-72.86794 60.28995-106.11092 25.18998-33.31797 53.85996-61.78595 86.01994-85.41793 32.32997-23.76398 67.77995-41.29597 106.34992-52.59396 38.82997-11.373 79.02994-13.941 120.6799-7.653 35.51998 5.652 66.02996 22.35899 91.46994 50.21697 24.64998 26.99898 44.25996 60.42495 58.73995 100.33692 14.28 39.36297 23.36998 82.58094 27.22998 129.6629 3.85 46.99997 1.73 93.42293-6.36 139.2649-8.10999 45.98996-22.03998 88.68993-41.74996 128.1099-20.00999 40.01997-46.33997 72.36995-78.90994 97.08993-32.80998 24.89998-72.49995 39.61997-119.13991 43.96996-46.01997 4.29-99.08993-6.22-159.14988-31.95997zm642.41951 0c-45.43996-18.81999-81.21994-43.59997-107.46992-74.15995-26.30998-30.62997-44.73996-64.20995-55.33995-100.72992-10.55-36.33997-14.08-74.42994-10.57-114.28691 3.49-39.54797 12.79-78.12894 27.90998-115.73892 15.08-37.49597 35.17998-72.86794 60.29996-106.11092 25.17998-33.31797 53.85996-61.78595 86.00993-85.41793 32.33998-23.76398 67.78995-41.29597 106.35992-52.59396 38.82997-11.373 79.01994-13.941 120.66991-7.653 35.52997 5.652 66.03995 22.35899 91.47993 50.21697 24.64998 26.99898 44.25997 60.42495 58.73996 100.33692 14.27999 39.36297 23.36998 82.58094 27.22998 129.6629 3.85 46.99997 1.73 93.42293-6.36 139.2649-8.12 45.98996-22.03998 88.68993-41.74997 128.1099-20.00998 40.01997-46.33996 72.36995-78.90994 97.08993-32.80997 24.89998-72.49994 39.61997-119.1399 43.96996-46.01997 4.29-99.09993-6.22-159.15989-31.95997zM6968.3578 276.0543c-1.1-3.399-3.7-6.152-7.41999-8.557-4.84-3.135-10.41999-4.636-16.68999-4.636-6.2 0-12.17999 2.622-18.09998 7.417-6.5 5.259-11.73 13.762-16.13999 25.24198l3.4 981.84726c0 10.31 2.6 18.33999 8.62 23.77998 6.20999 5.62 13.27998 8.76 21.25998 9.36 8.26999.61 16.35998-1.47 24.32998-6.07 7.31-4.21 12.36999-10.78 15.39999-19.52998-.75-47.98997-1.12-100.04993-1.12-156.16989 0-56.70995-.19-115.30991-.56-175.79486-.38-60.48896-.95-121.54591-1.7-183.16987-.76-61.64195-1.52-121.7709-2.27-180.38686-.76-58.56596-1.89-114.67491-3.4-168.32887-1.5-53.15996-3.37-101.49493-5.61-145.0029zm173.57988 0c-1.1-3.399-3.69-6.152-7.41-8.557-4.84-3.135-10.42-4.636-16.68999-4.636-6.21 0-12.17999 2.622-18.09998 7.417-6.5 5.259-11.74 13.762-16.14 25.24198l3.39 981.84726c0 10.31 2.61 18.33999 8.63 23.77998 6.2 5.62 13.27999 8.76 21.25998 9.36 8.27.61 16.36-1.47 24.31999-6.07 7.31-4.21 12.36999-10.78 15.39998-19.52998-.74-47.98997-1.11-100.04993-1.11-156.16989 0-56.70995-.19-115.30991-.57-175.79486-.37-60.48896-.94-121.54591-1.7-183.16987-.75-61.64195-1.51-121.7709-2.27-180.38686-.75-58.56596-1.88999-114.67491-3.39999-168.32887-1.49-53.15996-3.36-101.49493-5.61-145.0029zm-1474.8589 611.05154c32.78998-28.61098 66.40996-46.87097 100.71993-54.98596 39.23997-9.282 76.29994-8.777 111.17992 1.375 34.64997 10.08599 66.35995 27.64098 95.10993 52.71196 28.56997 24.91798 51.24996 53.42596 68.07995 85.50393 16.88998 32.18698 26.89997 66.10695 30.03997 101.73693 3.2 36.27997-3.42 70.20994-19.80998 101.79992-16.27999 31.37997-43.34997 58.53995-81.47994 81.19994-37.32997 22.19998-87.83993 36.60997-151.58989 42.86996-27.29998 2.78-50.99996 5-71.08994 6.66-20.60999 1.71-40.05997 1.84-58.32996.42-18.53999-1.44-37.47997-5.33-56.80996-11.68-18.96998-6.22999-40.84997-15.83998-65.62995-28.87997-2.81-1.47-4.75-4.19-5.23-7.32-5.32999-34.52997-9.70999-71.83994-13.12998-111.92991-3.41-39.95997-6.26-81.15994-8.53-123.6199-2.28-42.45897-3.79-85.47694-4.55-129.0499-.76-43.51098-1.14-86.18994-1.14-128.03791 0-41.85797.38-82.05394 1.14-120.58691.76-38.56197 1.89-74.48795 3.41-107.77892.03-.637.12-1.27.27-1.889 3.13-12.99999 11.18-21.65098 24.23999-25.85598 10.86999-3.498 22.58998-4.353 35.19997-2.445 12.24999 1.856 23.43998 5.739 33.57997 11.614 12.52 7.25499 18.62999 16.35998 19.67999 26.28797.05.506.07 1.016.04 1.524-1.51 31.47298-2.64 62.25596-3.39 92.34793-.75 29.95198-.57 59.49096.56 88.61794 1.12 29.08597 3.37 58.30895 6.75 87.66993 2.72 23.63898 6.28 47.54596 10.70999 71.71995zm992.55926 378.53171c-5.84-3.89-11.48-11.03-17.31999-21.08998-6.7-11.53-13.38999-24.16999-20.07998-37.92998-6.79-13.95998-13.58-28.10997-20.37999-42.44996-7.08-14.97-14.57999-27.94998-22.44998-38.97997-8.51-11.9-17.51999-20.51999-26.87998-26.04998-11.32-6.69-23.67998-6.83-37.05997.37-1.57.85-2.88 2.1-3.81 3.62-15.05999 24.84997-30.29998 48.93996-45.73996 72.27994-15 22.68998-31.45998 42.10997-49.38997 58.20995-17.37998 15.61-37.24997 26.60998-59.59995 32.99998-22.31999 6.37-48.34997 5.46-78.10994-2.33-28.79998-7.73-52.21996-22.82998-70.15995-45.34996-18.49999-23.20999-32.24998-50.79997-41.31997-82.71994-9.21-32.44998-13.79999-68.03995-13.79999-106.75992 0-38.98097 4.27-77.78094 12.81-116.39591 8.54998-38.63497 20.98998-75.78495 37.33996-111.44792 16.19-35.32397 35.65998-65.69495 58.47996-91.08393 22.45998-24.99598 47.97996-43.85797 76.59994-56.53696 28.08998-12.44899 58.50996-15.75999 91.23993-10.069 30.24998 5.628 55.35996 18.44 75.12995 38.56698 20.39998 20.76598 37.30997 45.92097 50.78996 75.43094 13.70999 30.00998 24.43998 63.17396 32.21997 99.48293 7.92 36.93297 15.08 73.86594 21.48999 110.79991 6.43 37.12298 12.86999 72.53295 19.30998 106.24292 6.59 34.48998 15.34 64.12996 26.18998 88.92994 11.45 26.16998 26.13998 45.24996 43.71997 57.51995 18.48999 12.9 42.71997 15.33 72.81994 5.87 1.58-.49 3.01-1.37 4.16-2.55 29.34998-30.08998 52.73996-50.19996 70.35995-60.09995 8.15-4.59 15.17999-7.72 21.11998-9.24 4.06-1.05 7.35-1.48 9.9-.44 4.83 1.98 5.26 7.53 4.6 15.45-1.04 12.47998-5.67 26.31997-13.65 41.57996-8.3 15.86999-19.68998 31.36998-34.11997 46.51997-14.17 14.87998-30.26998 26.22998-48.33997 34.01997-17.73998 7.65-37.21997 10.19-58.42995 7.76-21.40999-2.46-43.55997-13.78-66.71995-33.42998l-.92-.7zm2465.44814 12.35c2.91-29.76999 4.72-67.65996 5.46-113.66992.75-46.92997-1.32-96.09993-6.2-147.5199-4.87-51.38895-13.12999-102.58491-24.74998-153.59388-11.49-50.38496-28.12998-94.67092-49.98996-132.8309-21.39999-37.36197-48.73997-66.06595-82.10994-86.01693-32.88998-19.65999-72.95995-24.90898-120.38991-16.28799-22.05998 3.447-41.01997 13.102-56.87996 28.95798-16.93999 16.93999-32.57997 36.27997-46.93996 58.00796-14.71 22.24498-29.03998 44.49096-42.98997 66.73695-14.56999 23.23798-30.54998 42.31396-47.87996 57.28095-2.96 2.557-7.14 3.153-10.7 1.525-3.56-1.628-5.84-5.181-5.84-9.093 0-3.38099-1.70999-10.60698-4.74999-21.76198-3.32-12.15799-7.74-25.23598-13.26999-39.23597-5.55-14.06799-11.84999-27.95098-18.87998-41.64996-6.49-12.637-13.39-22.27799-20.89999-28.76698-5.47-4.718-10.73999-7-16.20999-5.759-2.45.558-4.67 2.587-7.11999 5.432-3.3 3.817-6.54 9.02999-9.82 15.58699 6.66 65.73995 10.36 124.6399 11.11 176.70886.76 52.89196-.39 100.26493-3.43 142.1199-3.05 41.92996-7.25 79.28994-12.57999 112.06991-5.18 31.79998-11.08 60.72995-17.68999 86.79993 1.68 5.13 5.45 10.9 10.96 17.51 6.77 8.11999 14.18999 14.57998 22.31998 19.31998 6.72 3.93 13.41999 5.36 20.14998 3.96 6.46-1.35 10.86-8.16 15.16-18.77 1.62-7.01999 4.65999-17.27998 9.15999-30.76997 4.53-13.58999 9.62999-29.07998 15.29998-46.44996 5.7-17.48999 11.97-35.73998 18.80999-54.74996 6.78-18.82999 12.99999-36.71997 18.63999-53.65996 5.71-17.10999 11.02999-32.49998 15.96998-46.18997 5.02-13.88999 9.11-23.97298 12.22-30.26797 35.04997-82.24394 66.88994-145.2539 95.45992-189.06286 29.42998-45.12797 56.52996-74.94494 80.85994-89.85593 27.31998-16.744 51.82996-17.75999 73.41995-4.541 19.83998 12.144 37.66997 33.21197 53.04996 63.57295 14.64998 28.91898 27.40998 64.38095 38.20997 106.40992 10.65999 41.49597 19.79998 85.46594 27.40998 131.9149 7.6 46.34997 13.67999 92.88993 18.23998 139.6299 4.47 45.84996 7.84 88.22993 10.12 127.1199 6.08999 12 13.56998 18.70999 23.59998 18.70999 10.08999 0 17.58998-6.77 23.68998-18.86999zm-1725.4887-15.54c-42.25997-17.47998-75.64994-40.33997-100.04992-68.74995-24.36999-28.36997-41.48997-59.44995-51.30996-93.27993-9.87-33.99997-13.14-69.64994-9.85-106.94891 3.31-37.60098 12.17-74.27895 26.53998-110.03592 14.43-35.87297 33.65998-69.70795 57.69996-101.51292 23.97998-31.72998 51.27996-58.85496 81.89994-81.36094 30.43997-22.37399 63.81995-38.87897 100.12992-49.51597 36.05997-10.56199 73.38995-12.91099 111.98992-7.084 30.95997 4.925 57.54995 19.607 79.76994 43.93898 22.99998 25.18998 41.19997 56.43395 54.70996 93.67193 13.70999 37.78597 22.38998 79.28094 26.09998 124.4769 3.71 45.27597 1.67 89.99593-6.12 134.1609-7.77 44.01997-21.07998 84.89994-39.94997 122.6299-18.55999 37.11998-42.89997 67.17996-73.10994 90.10994-29.96998 22.74998-66.29995 36.00997-108.90992 39.98997-43.22997 4.03-93.00993-6.26-149.42989-30.43998l-.11-.05zm642.41952 0c-42.24997-17.47998-75.63995-40.33997-100.04993-68.74995-24.35998-28.36997-41.47997-59.44995-51.29996-93.27993-9.87-33.99997-13.14999-69.64994-9.86-106.94891 3.32-37.60098 12.17-74.27895 26.54999-110.03592 14.41999-35.87297 33.65997-69.70795 57.69995-101.51292 23.97999-31.72998 51.27997-58.85496 81.89994-81.36094 30.43998-22.37399 63.81995-38.87897 100.12993-49.51597 36.05997-10.56199 73.38994-12.91099 111.98991-7.084 30.94998 4.925 57.54996 19.607 79.76994 43.93898 22.99999 25.18998 41.19997 56.43395 54.70996 93.67193 13.7 37.78597 22.38998 79.28094 26.08998 124.4769 3.71 45.27597 1.68 89.99593-6.12 134.1609-7.76999 44.01997-21.06998 84.89994-39.93996 122.6299-18.55999 37.11998-42.90997 67.17996-73.10995 90.10994-29.96998 22.74998-66.29995 36.00997-108.90992 39.98997-43.22996 4.03-93.00993-6.26-149.42988-30.43998l-.12-.05zM5632.4288 546.7151c-.72-4.174-4.34-7.351-9.72999-10.47199-8.01-4.642-16.86999-7.678-26.54998-9.144-9.33-1.413-18.01998-.883-26.06998 1.707-5.56 1.792-9.16 5.322-10.71 10.675-1.47999 32.83197-2.59999 68.23495-3.33999 106.20592-.76 38.40597-1.14 78.47094-1.14 120.1929 0 41.73398.38 84.29694 1.14 127.68891.75 43.32997 2.26 86.10694 4.52 128.3289 2.26 42.23997 5.09 83.22994 8.49 122.97991 3.21999 37.68997 7.27999 72.88995 12.20998 105.58992 21.78999 11.26 41.14997 19.67999 58.09996 25.24998 17.72999 5.83 35.09997 9.42 52.10996 10.74 17.26999 1.35 35.64997 1.2 55.11996-.41 19.99998-1.66 43.56997-3.87 70.75994-6.63 60.26996-5.91 108.08992-19.17999 143.3599-40.15997 34.48997-20.49998 59.21995-44.82997 73.94994-73.21994 14.61999-28.18998 20.48999-58.46996 17.63999-90.82994-2.91-32.99997-12.19-64.39995-27.82998-94.20593-15.68999-29.91597-36.86997-56.48395-63.51995-79.72193-26.46998-23.08499-55.63996-39.29498-87.54994-48.58197-31.67997-9.221-65.34995-9.546-100.98992-1.115-35.87997 8.488-70.76995 29.33298-104.83992 62.22396-2.63 2.541-6.44 3.442-9.93 2.349-3.49-1.093-6.10999-4.005-6.81999-7.594-6.11-30.71598-10.88-61.01395-14.30999-90.89293-3.43-29.86598-5.72-59.59296-6.86-89.17993-1.15-29.54598-1.34-59.50996-.58-89.89194.75-29.94797 1.88-60.57595 3.37-91.88193zm15.14 553.17259c13.18998-52.14997 29.57997-92.78993 48.95996-122.00191 19.95998-30.08698 41.44996-51.27696 64.19995-63.83695 23.53998-12.994 47.49996-17.891 71.86994-14.869 23.73999 2.944 46.07997 10.883 66.99995 23.83899 20.53999 12.71799 39.10997 28.89298 55.69996 48.54796 16.63999 19.71899 29.09998 40.32097 37.41997 61.78096 8.47 21.83998 12.25 43.24996 11.45 64.19995-.86 22.23998-9.01 41.18997-24.34999 56.78995-18.82998 19.51999-41.36997 36.46998-67.63995 50.81997-26.01998 14.20999-52.61996 25.13998-79.79994 32.80997-27.39998 7.74-54.02996 11.59-79.85994 11.59-26.84998 0-49.58996-5.2-68.29994-15.32-19.60999-10.60999-33.33998-27.23998-41.01997-50.02996-7.32-21.70998-6.15-49.83996 4.37-84.31993zm19.33998 5.12c12.51999-49.58997 27.86998-88.30994 46.28996-116.06692 17.85999-26.92498 36.82998-46.14197 57.19996-57.38296 19.56999-10.80799 39.46997-15.04399 59.73996-12.52999 20.87998 2.59 40.51996 9.597 58.92995 20.99499 18.78999 11.63699 35.76997 26.45898 50.94996 44.44396 15.12 17.92099 26.48998 36.61097 34.04998 56.11096 7.42 19.12999 10.81999 37.84997 10.10999 56.19996-.65 17.04998-6.87 31.58997-18.68999 43.59996-17.54998 18.2-38.49997 33.89998-62.89995 47.22997-24.65998 13.46999-49.86996 23.83998-75.63994 31.10998-25.53998 7.20999-50.34996 10.83999-74.42995 10.83999-23.07998 0-42.69996-4.21-58.77995-12.91-15.18-8.20999-25.64998-21.19998-31.58998-38.81996-6.28-18.63999-4.44-42.72997 4.63-72.33995l.13-.48zm1723.4387 80.90993c51.62996 33.36998 98.03992 46.77997 138.9499 41.21997 41.29996-5.61 75.97994-23.27998 104.04991-52.95996 27.45998-29.02998 48.13997-66.05995 61.86996-111.16992 13.55999-44.57996 19.37998-90.12293 17.43998-136.6379-1.95-46.72396-12.08999-90.13293-30.38997-130.2379-18.71999-41.02096-47.21997-71.85994-85.45994-92.56893-23.01998-11.93999-49.70996-11.81599-80.18994 1.31-28.27998 12.173-56.00995 31.74398-83.09993 58.84096-26.66998 26.66498-50.83997 58.53395-72.47995 95.63293-21.75998 37.30897-36.50997 75.59694-44.27997 114.84991-7.87999 39.75097-6.86 78.13094 2.98 115.13091 10.02 37.67997 33.31998 69.85995 70.19995 96.31993l.41.27zm642.41951 0c51.62996 33.36998 98.04993 46.77997 138.9499 41.21997 41.30997-5.61 75.98994-23.27998 104.05992-52.95996 27.45998-29.02998 48.12996-66.05995 61.86995-111.16992 13.56-44.57996 19.37999-90.12293 17.43999-136.6379-1.95-46.72396-12.09-90.13293-30.38998-130.2379-18.71998-41.02096-47.22996-71.85994-85.45993-92.56893-23.01998-11.93999-49.70996-11.81599-80.18994 1.31-28.27998 12.173-56.00996 31.74398-83.10994 58.84096-26.65998 26.66498-50.82996 58.53395-72.46994 95.63293-21.76999 37.30897-36.51998 75.59694-44.28997 114.84991-7.87 39.75097-6.86 78.13094 2.98 115.13091 10.02999 37.67997 33.32997 69.85995 70.20994 96.31993l.4.27zm11.07-16.65999c46.60996 30.07998 88.23993 43.08997 125.1899 38.06997 36.59997-4.98 67.34995-20.58998 92.21993-46.88996 25.47998-26.93998 44.51997-61.38995 57.25996-103.24992 12.90999-42.40997 18.43998-85.73594 16.58999-129.9859-1.83-44.03997-11.35-84.96594-28.59998-122.76691-16.82999-36.88497-42.40997-64.66495-76.62995-83.20194-17.97998-9.323-38.93997-8.313-62.91995 2.009-26.17998 11.274-51.76996 29.52098-76.85994 54.61396-25.52998 25.52498-48.62996 56.05596-69.34995 91.56793-20.58998 35.30297-34.57997 71.51695-41.93997 108.65792-7.24999 36.63597-6.38 72.00594 2.69 106.10592 8.87 33.34997 29.74998 61.62995 62.34996 85.06993zm-642.42952 0c46.60996 30.07998 88.24993 43.08997 125.1899 38.06997 36.59998-4.98 67.34995-20.58998 92.21994-46.88996 25.48998-26.93998 44.51996-61.38995 57.25995-103.24992 12.91-42.40997 18.43999-85.73594 16.59999-129.9859-1.84-44.03997-11.36-84.96594-28.60998-122.76691-16.82999-36.88497-42.39997-64.66495-76.61994-83.20194-17.97999-9.323-38.94997-8.313-62.91995 2.009-26.18998 11.274-51.77996 29.52098-76.86995 54.61396-25.52998 25.52498-48.62996 56.05596-69.33994 91.56793-20.59999 35.30297-34.58998 71.51695-41.94997 108.65792-7.25 36.63597-6.37 72.00594 2.7 106.10592 8.86999 33.34997 29.73997 61.62995 62.33995 85.06993zm-1173.21912-25.98998c21.51999 33.09998 44.56997 51.54996 68.15995 56.51996 24.03999 5.06 47.46997.75 70.23995-13.16999 21.39998-13.06999 41.66997-32.41998 60.68995-58.17996 18.56-25.12998 34.41998-52.00996 47.55997-80.61994 13.16999-28.64997 22.83998-56.73495 29.03998-84.22993 6.4-28.42898 7.83-51.86396 4.63-70.28295l-.06-.326c-3.75-17.97399-6.74-34.07597-8.99-48.30596-2.31-14.636-4.82-27.73198-7.52-39.28697-2.74-11.752-5.86999-22.52199-9.39999-32.31498-3.62-10.059-8.64-20.32498-15.06999-30.78498-.72-1.164-1.67-2.168-2.79-2.952-32.86997-23.00798-63.61995-31.54997-91.96992-26.61997-28.08998 4.885-53.36996 18.62598-75.75995 41.41997-21.60998 21.99998-39.73997 50.24796-54.27996 84.81893-14.26999 33.96098-24.69998 69.46395-31.25997 106.51092-6.57 37.13497-8.69 73.11395-6.37 107.92392 2.38 35.65997 10.03 65.34995 22.70999 89.12993l.44.75zm223.31984-388.7207c-26.98998-18.50399-52.01996-26.18998-75.36995-22.12799-24.10998 4.192-45.70996 16.16699-64.91995 35.72898-19.99998 20.35698-36.65997 46.56796-50.10996 78.55694-13.70999 32.59997-23.70998 66.68295-29.99998 102.24692-6.29 35.47697-8.33 69.84595-6.11 103.10592 2.15 32.21998 8.8 59.13996 20.2 80.67994 17.73998 27.17998 35.82996 43.38997 55.26995 47.47996 19.06999 4.02 37.61997.38 55.68996-10.65999 19.44998-11.87999 37.74997-29.59997 55.02996-52.99996 17.74998-24.02998 32.90997-49.72996 45.47996-77.08994 12.55-27.30998 21.78999-54.06896 27.68998-80.27594 5.69-25.21598 7.29-45.98996 4.46-62.34495-3.79-18.24499-6.83-34.59698-9.12-49.05396-2.22-14.106-4.63-26.72698-7.22999-37.86298-2.55-10.93899-5.47-20.96898-8.75-30.08497-2.98-8.28-7.05999-16.709-12.20998-25.29798z" fill="#fff"/>
333
+ </g>
334
+ </svg>
335
+ </span>
336
+ <br />
337
+
338
+ <span style="width: 34px; top: -5px;"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-facebook fa-w-16 fa-2x"><path fill="#475e8f" d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z" class=""></path></svg></span>
339
+
340
+ <?php echo $plus_svg; ?>
341
+
342
+ <span><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-instagram fa-w-14 fa-2x"><path fill="#e15073" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z" class=""></path></svg></span>
343
+
344
+ <?php echo $plus_svg; ?>
345
+
346
+ <span style="top: -4px;"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-twitter fa-w-16 fa-2x"><path fill="#1a92dc" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" class=""></path></svg></span>
347
+
348
+ <?php echo $plus_svg; ?>
349
+
350
+ <span style="width: 35px; top: -5px;"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="youtube" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-youtube fa-w-18 fa-2x"><path fill="#f5413d" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" class=""></path></svg></span>
351
+ </div>
352
+
353
+ <h1>Combine all your social media channels into one single wall.</h1>
354
+ <h2>Maximize your social content and get more followers.</h2>
355
+
356
+ <div style="text-align: center;">
357
+ <a href="https://smashballoon.com/social-wall/?utm_source=plugin-pro&utm_campaign=sbi&utm_medium=sw-cta-1" target="_blank" class="cta button button-primary">Get the Social Wall plugin</a>
358
+ </div>
359
+
360
+ <div class="sbi-sw-info">
361
+ <div class="sbi-sw-features">
362
+ <p><span>A dash of Instagram</span>Add posts from your profile, public hashtag posts, or posts you're tagged in.</p>
363
+ <p><span>A sprinkle of Facebook</span>Include posts from your page or group timeline, or from your photos, videos, albums, and events pages.</p>
364
+ <p><span>A spoonful of Twitter</span>Add Tweets from any Twitter account, hashtag Tweets, mentions, and more.</p>
365
+ <p><span>And a dollop of YouTube</span>Embed videos from any public YouTube channel, playlists, searches, and more.</p>
366
+ <p><span>All in the same feed</span>Combine feeds from all of our Smash Balloon Pro plugins into one single wall feed, and show off all your social media content in one place.</p>
367
+ </div>
368
+ <a class="sbi-sw-screenshot" href="https://smashballoon.com/social-wall/demo?utm_source=plugin-pro&utm_campaign=sbi&utm_medium=sw-demo" target="_blank">
369
+ <span class="cta">View Demo</span>
370
+
371
+ <img src="<?php echo SBI_PLUGIN_URL . 'img/sw-screenshot.png'; ?>" alt="Smash Balloon Social Wall plugin screenshot showing Facebook, Instagram, Twitter, and YouTube posts combined into one wall.">
372
+ </a>
373
+ </div>
374
+
375
+ <div class="sbi-sw-footer-cta">
376
+ <a href="https://smashballoon.com/social-wall/?utm_source=plugin-pro&utm_campaign=sbi&utm_medium=sw-cta-2" target="_blank"><span>🚀</span>Get Social Wall and Increase Engagement >></a>
377
+ </div>
378
+
379
+ </div>
380
+
381
+ <?php
382
+ }
383
+
384
+ function sb_instagram_settings_page() {
385
+
386
+ //Hidden fields
387
+ $sb_instagram_settings_hidden_field = 'sb_instagram_settings_hidden_field';
388
+ $sb_instagram_configure_hidden_field = 'sb_instagram_configure_hidden_field';
389
+ $sb_instagram_customize_hidden_field = 'sb_instagram_customize_hidden_field';
390
+
391
+ //Declare defaults
392
+ $sb_instagram_settings_defaults = array(
393
+ 'sb_instagram_at' => '',
394
+ 'sb_instagram_user_id' => '',
395
+ 'sb_instagram_preserve_settings' => '',
396
+ 'sb_instagram_cache_time' => 1,
397
+ 'sb_instagram_cache_time_unit' => 'hours',
398
+ 'sbi_caching_type' => 'page',
399
+ 'sbi_cache_cron_interval' => '12hours',
400
+ 'sbi_cache_cron_time' => '1',
401
+ 'sbi_cache_cron_am_pm' => 'am',
402
+ 'sb_instagram_width' => '100',
403
+ 'sb_instagram_width_unit' => '%',
404
+ 'sb_instagram_feed_width_resp' => false,
405
+ 'sb_instagram_height' => '',
406
+ 'sb_instagram_num' => '20',
407
+ 'sb_instagram_height_unit' => '',
408
+ 'sb_instagram_cols' => '4',
409
+ 'sb_instagram_disable_mobile' => false,
410
+ 'sb_instagram_image_padding' => '5',
411
+ 'sb_instagram_image_padding_unit' => 'px',
412
+ 'sb_instagram_sort' => 'none',
413
+ 'sb_instagram_background' => '',
414
+ 'sb_instagram_show_btn' => true,
415
+ 'sb_instagram_btn_background' => '',
416
+ 'sb_instagram_btn_text_color' => '',
417
+ 'sb_instagram_btn_text' => __( 'Load More...', 'instagram-feed' ),
418
+ 'sb_instagram_image_res' => 'auto',
419
+ //Header
420
+ 'sb_instagram_show_header' => true,
421
+ 'sb_instagram_header_size' => 'small',
422
+ 'sb_instagram_header_color' => '',
423
+ 'sb_instagram_custom_bio' => '',
424
+ 'sb_instagram_custom_avatar' => '',
425
+ //Follow button
426
+ 'sb_instagram_show_follow_btn' => true,
427
+ 'sb_instagram_folow_btn_background' => '',
428
+ 'sb_instagram_follow_btn_text_color' => '',
429
+ 'sb_instagram_follow_btn_text' => __( 'Follow on Instagram', 'instagram-feed' ),
430
+ //Misc
431
+ 'sb_instagram_custom_css' => '',
432
+ 'sb_instagram_custom_js' => '',
433
+ 'sb_instagram_cron' => 'no',
434
+ 'sb_instagram_backup' => true,
435
+ 'sb_ajax_initial' => false,
436
+ 'enqueue_css_in_shortcode' => false,
437
+ 'sb_instagram_ajax_theme' => false,
438
+ 'gdpr' => 'auto',
439
+ 'sb_instagram_disable_resize' => false,
440
+ 'sb_instagram_favor_local' => true,
441
+ 'sb_instagram_minnum' => 0,
442
+ 'disable_js_image_loading' => false,
443
+ 'enqueue_js_in_head' => false,
444
+ 'sb_instagram_disable_mob_swipe' => false,
445
+ 'custom_template' => false,
446
+ 'disable_admin_notice' => false,
447
+ 'enable_email_report' => 'on',
448
+ 'email_notification' => 'monday',
449
+ 'email_notification_addresses' => get_option( 'admin_email' ),
450
+ );
451
+ //Save defaults in an array
452
+ $options = wp_parse_args(get_option('sb_instagram_settings'), $sb_instagram_settings_defaults);
453
+ update_option( 'sb_instagram_settings', $options );
454
+
455
+ //Set the page variables
456
+ $sb_instagram_at = $options[ 'sb_instagram_at' ];
457
+ $sb_instagram_user_id = $options[ 'sb_instagram_user_id' ];
458
+ $sb_instagram_preserve_settings = $options[ 'sb_instagram_preserve_settings' ];
459
+ $sb_instagram_ajax_theme = $options[ 'sb_instagram_ajax_theme' ];
460
+ $gdpr = $options[ 'gdpr' ];
461
+ $enqueue_js_in_head = $options[ 'enqueue_js_in_head' ];
462
+ $disable_js_image_loading = $options[ 'disable_js_image_loading' ];
463
+ $sb_instagram_disable_resize = $options[ 'sb_instagram_disable_resize' ];
464
+ $sb_instagram_favor_local = $options[ 'sb_instagram_favor_local' ];
465
+ $sb_instagram_minnum = $options[ 'sb_instagram_minnum' ];
466
+
467
+ $sb_instagram_cache_time = $options[ 'sb_instagram_cache_time' ];
468
+ $sb_instagram_cache_time_unit = $options[ 'sb_instagram_cache_time_unit' ];
469
+
470
+ $sbi_caching_type = $options[ 'sbi_caching_type' ];
471
+ $sbi_cache_cron_interval = $options[ 'sbi_cache_cron_interval' ];
472
+ $sbi_cache_cron_time = $options[ 'sbi_cache_cron_time' ];
473
+ $sbi_cache_cron_am_pm = $options[ 'sbi_cache_cron_am_pm' ];
474
+
475
+ $sb_instagram_width = $options[ 'sb_instagram_width' ];
476
+ $sb_instagram_width_unit = $options[ 'sb_instagram_width_unit' ];
477
+ $sb_instagram_feed_width_resp = $options[ 'sb_instagram_feed_width_resp' ];
478
+ $sb_instagram_height = $options[ 'sb_instagram_height' ];
479
+ $sb_instagram_height_unit = $options[ 'sb_instagram_height_unit' ];
480
+ $sb_instagram_num = $options[ 'sb_instagram_num' ];
481
+ $sb_instagram_cols = $options[ 'sb_instagram_cols' ];
482
+ $sb_instagram_disable_mobile = $options[ 'sb_instagram_disable_mobile' ];
483
+ $sb_instagram_image_padding = $options[ 'sb_instagram_image_padding' ];
484
+ $sb_instagram_image_padding_unit = $options[ 'sb_instagram_image_padding_unit' ];
485
+ $sb_instagram_sort = $options[ 'sb_instagram_sort' ];
486
+ $sb_instagram_background = $options[ 'sb_instagram_background' ];
487
+ $sb_instagram_show_btn = $options[ 'sb_instagram_show_btn' ];
488
+ $sb_instagram_btn_background = $options[ 'sb_instagram_btn_background' ];
489
+ $sb_instagram_btn_text_color = $options[ 'sb_instagram_btn_text_color' ];
490
+ $sb_instagram_btn_text = $options[ 'sb_instagram_btn_text' ];
491
+ $sb_instagram_image_res = $options[ 'sb_instagram_image_res' ];
492
+ //Header
493
+ $sb_instagram_show_header = $options[ 'sb_instagram_show_header' ];
494
+ $sb_instagram_header_size = $options[ 'sb_instagram_header_size' ];
495
+ $sb_instagram_show_bio = isset( $options[ 'sb_instagram_show_bio' ] ) ? $options[ 'sb_instagram_show_bio' ] : true;
496
+ $sb_instagram_custom_bio = $options[ 'sb_instagram_custom_bio' ];
497
+ $sb_instagram_custom_avatar = $options[ 'sb_instagram_custom_avatar' ];
498
+ $sb_instagram_header_color = $options[ 'sb_instagram_header_color' ];
499
+ //Follow button
500
+ $sb_instagram_show_follow_btn = $options[ 'sb_instagram_show_follow_btn' ];
501
+ $sb_instagram_folow_btn_background = $options[ 'sb_instagram_folow_btn_background' ];
502
+ $sb_instagram_follow_btn_text_color = $options[ 'sb_instagram_follow_btn_text_color' ];
503
+ $sb_instagram_follow_btn_text = $options[ 'sb_instagram_follow_btn_text' ];
504
+ //Misc
505
+ $sb_instagram_custom_css = $options[ 'sb_instagram_custom_css' ];
506
+ $sb_instagram_custom_js = $options[ 'sb_instagram_custom_js' ];
507
+ $sb_instagram_cron = $options[ 'sb_instagram_cron' ];
508
+ $sb_instagram_backup = $options[ 'sb_instagram_backup' ];
509
+ $sb_ajax_initial = $options[ 'sb_ajax_initial' ];
510
+ $enqueue_css_in_shortcode = $options[ 'enqueue_css_in_shortcode' ];
511
+ $sb_instagram_custom_template = $options[ 'custom_template' ];
512
+ $sb_instagram_disable_admin_notice = $options[ 'disable_admin_notice' ];
513
+ $sb_instagram_enable_email_report = $options[ 'enable_email_report' ];
514
+ $sb_instagram_email_notification = $options[ 'email_notification' ];
515
+ $sb_instagram_email_notification_addresses = $options[ 'email_notification_addresses' ];
516
+ //Check nonce before saving data
517
+ if ( ! isset( $_POST['sb_instagram_settings_nonce'] ) || ! wp_verify_nonce( $_POST['sb_instagram_settings_nonce'], 'sb_instagram_saving_settings' ) ) {
518
+ //Nonce did not verify
519
+ } else {
520
+ // See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
521
+ if( isset($_POST[ $sb_instagram_settings_hidden_field ]) && $_POST[ $sb_instagram_settings_hidden_field ] == 'Y' ) {
522
+
523
+ if( isset($_POST[ $sb_instagram_configure_hidden_field ]) && $_POST[ $sb_instagram_configure_hidden_field ] == 'Y' ) {
524
+
525
+ $sb_instagram_at = sanitize_text_field( $_POST[ 'sb_instagram_at' ] );
526
+ $sb_instagram_user_id = array();
527
+ if ( isset( $_POST[ 'sb_instagram_user_id' ] )) {
528
+ if ( is_array( $_POST[ 'sb_instagram_user_id' ] ) ) {
529
+ foreach( $_POST[ 'sb_instagram_user_id' ] as $user_id ) {
530
+ $sb_instagram_user_id[] = sanitize_text_field( $user_id );
531
+ }
532
+ } else {
533
+ $sb_instagram_user_id[] = sanitize_text_field( $_POST[ 'sb_instagram_user_id' ] );
534
+ }
535
+ }
536
+ isset($_POST[ 'sb_instagram_preserve_settings' ]) ? $sb_instagram_preserve_settings = sanitize_text_field( $_POST[ 'sb_instagram_preserve_settings' ] ) : $sb_instagram_preserve_settings = '';
537
+ isset($_POST[ 'sb_instagram_cache_time' ]) ? $sb_instagram_cache_time = sanitize_text_field( $_POST[ 'sb_instagram_cache_time' ] ) : $sb_instagram_cache_time = '';
538
+ isset($_POST[ 'sb_instagram_cache_time_unit' ]) ? $sb_instagram_cache_time_unit = sanitize_text_field( $_POST[ 'sb_instagram_cache_time_unit' ] ) : $sb_instagram_cache_time_unit = '';
539
+
540
+ isset($_POST[ 'sbi_caching_type' ]) ? $sbi_caching_type = sanitize_text_field( $_POST[ 'sbi_caching_type' ] ) : $sbi_caching_type = '';
541
+ isset($_POST[ 'sbi_cache_cron_interval' ]) ? $sbi_cache_cron_interval = sanitize_text_field( $_POST[ 'sbi_cache_cron_interval' ] ) : $sbi_cache_cron_interval = '';
542
+ isset($_POST[ 'sbi_cache_cron_time' ]) ? $sbi_cache_cron_time = sanitize_text_field( $_POST[ 'sbi_cache_cron_time' ] ) : $sbi_cache_cron_time = '';
543
+ isset($_POST[ 'sbi_cache_cron_am_pm' ]) ? $sbi_cache_cron_am_pm = sanitize_text_field( $_POST[ 'sbi_cache_cron_am_pm' ] ) : $sbi_cache_cron_am_pm = '';
544
+
545
+ $options[ 'sb_instagram_at' ] = $sb_instagram_at;
546
+ $options[ 'sb_instagram_user_id' ] = $sb_instagram_user_id;
547
+ $options[ 'sb_instagram_preserve_settings' ] = $sb_instagram_preserve_settings;
548
+
549
+ $options[ 'sb_instagram_cache_time' ] = $sb_instagram_cache_time;
550
+ $options[ 'sb_instagram_cache_time_unit' ] = $sb_instagram_cache_time_unit;
551
+
552
+ $options[ 'sbi_caching_type' ] = $sbi_caching_type;
553
+ $options[ 'sbi_cache_cron_interval' ] = $sbi_cache_cron_interval;
554
+ $options[ 'sbi_cache_cron_time' ] = $sbi_cache_cron_time;
555
+ $options[ 'sbi_cache_cron_am_pm' ] = $sbi_cache_cron_am_pm;
556
+
557
+
558
+ //Delete all SBI transients
559
+ global $wpdb;
560
+ $table_name = $wpdb->prefix . "options";
561
+ $wpdb->query( "
562
+ DELETE
563
+ FROM $table_name
564
+ WHERE `option_name` LIKE ('%\_transient\_sbi\_%')
565
+ " );
566
+ $wpdb->query( "
567
+ DELETE
568
+ FROM $table_name
569
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_sbi\_%')
570
+ " );
571
+ $wpdb->query( "
572
+ DELETE
573
+ FROM $table_name
574
+ WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
575
+ " );
576
+ $wpdb->query( "
577
+ DELETE
578
+ FROM $table_name
579
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
580
+ " );
581
+
582
+ if ( $sbi_caching_type === 'background' ) {
583
+ delete_option( 'sbi_cron_report' );
584
+ SB_Instagram_Cron_Updater::start_cron_job( $sbi_cache_cron_interval, $sbi_cache_cron_time, $sbi_cache_cron_am_pm );
585
+ }
586
+
587
+ global $sb_instagram_posts_manager;
588
+ $sb_instagram_posts_manager->add_action_log( 'Saved settings on the configure tab.' );
589
+ $sb_instagram_posts_manager->clear_api_request_delays();
590
+
591
+ } //End config tab post
592
+
593
+ if( isset($_POST[ $sb_instagram_customize_hidden_field ]) && $_POST[ $sb_instagram_customize_hidden_field ] == 'Y' ) {
594
+
595
+ //Validate and sanitize width field
596
+ $safe_width = intval( sanitize_text_field( $_POST['sb_instagram_width'] ) );
597
+ if ( ! $safe_width ) $safe_width = '';
598
+ if ( strlen( $safe_width ) > 4 ) $safe_width = substr( $safe_width, 0, 4 );
599
+ $sb_instagram_width = $safe_width;
600
+
601
+ $sb_instagram_width_unit = sanitize_text_field( $_POST[ 'sb_instagram_width_unit' ] );
602
+ isset($_POST[ 'sb_instagram_feed_width_resp' ]) ? $sb_instagram_feed_width_resp = sanitize_text_field( $_POST[ 'sb_instagram_feed_width_resp' ] ) : $sb_instagram_feed_width_resp = '';
603
+
604
+ //Validate and sanitize height field
605
+ $safe_height = intval( sanitize_text_field( $_POST['sb_instagram_height'] ) );
606
+ if ( ! $safe_height ) $safe_height = '';
607
+ if ( strlen( $safe_height ) > 4 ) $safe_height = substr( $safe_height, 0, 4 );
608
+ $sb_instagram_height = $safe_height;
609
+
610
+ $sb_instagram_height_unit = sanitize_text_field( $_POST[ 'sb_instagram_height_unit' ] );
611
+
612
+ //Validate and sanitize number of photos field
613
+ $safe_num = intval( sanitize_text_field( $_POST['sb_instagram_num'] ) );
614
+ if ( ! $safe_num ) $safe_num = '';
615
+ if ( strlen( $safe_num ) > 4 ) $safe_num = substr( $safe_num, 0, 4 );
616
+ $sb_instagram_num = $safe_num;
617
+
618
+ $sb_instagram_cols = sanitize_text_field( $_POST[ 'sb_instagram_cols' ] );
619
+ isset($_POST[ 'sb_instagram_disable_mobile' ]) ? $sb_instagram_disable_mobile = sanitize_text_field( $_POST[ 'sb_instagram_disable_mobile' ] ) : $sb_instagram_disable_mobile = '';
620
+
621
+ //Validate and sanitize padding field
622
+ $safe_padding = intval( sanitize_text_field( $_POST['sb_instagram_image_padding'] ) );
623
+ if ( ! $safe_padding ) $safe_padding = '';
624
+ if ( strlen( $safe_padding ) > 4 ) $safe_padding = substr( $safe_padding, 0, 4 );
625
+ $sb_instagram_image_padding = $safe_padding;
626
+
627
+ $sb_instagram_image_padding_unit = sanitize_text_field( $_POST[ 'sb_instagram_image_padding_unit' ] );
628
+ $sb_instagram_sort = sanitize_text_field( $_POST[ 'sb_instagram_sort' ] );
629
+ $sb_instagram_background = sanitize_text_field( $_POST[ 'sb_instagram_background' ] );
630
+ isset($_POST[ 'sb_instagram_show_btn' ]) ? $sb_instagram_show_btn = sanitize_text_field( $_POST[ 'sb_instagram_show_btn' ] ) : $sb_instagram_show_btn = '';
631
+ $sb_instagram_btn_background = sanitize_text_field( $_POST[ 'sb_instagram_btn_background' ] );
632
+ $sb_instagram_btn_text_color = sanitize_text_field( $_POST[ 'sb_instagram_btn_text_color' ] );
633
+ $sb_instagram_btn_text = sanitize_text_field( $_POST[ 'sb_instagram_btn_text' ] );
634
+ $sb_instagram_image_res = sanitize_text_field( $_POST[ 'sb_instagram_image_res' ] );
635
+ //Header
636
+ isset($_POST[ 'sb_instagram_show_header' ]) ? $sb_instagram_show_header = sanitize_text_field( $_POST[ 'sb_instagram_show_header' ] ) : $sb_instagram_show_header = '';
637
+ isset($_POST[ 'sb_instagram_show_bio' ]) ? $sb_instagram_show_bio = sanitize_text_field( $_POST[ 'sb_instagram_show_bio' ] ) : $sb_instagram_show_bio = '';
638
+ if ( function_exists( 'sanitize_textarea_field' ) ) {
639
+ isset($_POST[ 'sb_instagram_custom_bio' ]) ? $sb_instagram_custom_bio = sanitize_textarea_field( $_POST[ 'sb_instagram_custom_bio' ] ) : $sb_instagram_custom_bio = '';
640
+ } else {
641
+ isset($_POST[ 'sb_instagram_custom_bio' ]) ? $sb_instagram_custom_bio = sanitize_text_field( $_POST[ 'sb_instagram_custom_bio' ] ) : $sb_instagram_custom_bio = '';
642
+ }
643
+ isset($_POST[ 'sb_instagram_custom_avatar' ]) ? $sb_instagram_custom_avatar = sanitize_text_field( $_POST[ 'sb_instagram_custom_avatar' ] ) : $sb_instagram_custom_avatar = '';
644
+ if (isset($_POST[ 'sb_instagram_header_size' ]) ) $sb_instagram_header_size = $_POST[ 'sb_instagram_header_size' ];
645
+
646
+ $sb_instagram_header_color = sanitize_text_field( $_POST[ 'sb_instagram_header_color' ] );
647
+ //Follow button
648
+ isset($_POST[ 'sb_instagram_show_follow_btn' ]) ? $sb_instagram_show_follow_btn = sanitize_text_field( $_POST[ 'sb_instagram_show_follow_btn' ] ) : $sb_instagram_show_follow_btn = '';
649
+ $sb_instagram_folow_btn_background = sanitize_text_field( $_POST[ 'sb_instagram_folow_btn_background' ] );
650
+ $sb_instagram_follow_btn_text_color = sanitize_text_field( $_POST[ 'sb_instagram_follow_btn_text_color' ] );
651
+ $sb_instagram_follow_btn_text = sanitize_text_field( $_POST[ 'sb_instagram_follow_btn_text' ] );
652
+ //Misc
653
+ $sb_instagram_custom_css = $_POST[ 'sb_instagram_custom_css' ];
654
+ $sb_instagram_custom_js = $_POST[ 'sb_instagram_custom_js' ];
655
+ isset($_POST[ 'sb_instagram_ajax_theme' ]) ? $sb_instagram_ajax_theme = sanitize_text_field( $_POST[ 'sb_instagram_ajax_theme' ] ) : $sb_instagram_ajax_theme = '';
656
+ isset($_POST[ 'gdpr' ]) ? $gdpr = sanitize_text_field( $_POST[ 'gdpr' ] ) : $gdpr = '';
657
+ isset($_POST[ 'enqueue_js_in_head' ]) ? $enqueue_js_in_head = $_POST[ 'enqueue_js_in_head' ] : $enqueue_js_in_head = '';
658
+ isset($_POST[ 'disable_js_image_loading' ]) ? $disable_js_image_loading = $_POST[ 'disable_js_image_loading' ] : $disable_js_image_loading = '';
659
+ isset($_POST[ 'sb_instagram_disable_resize' ]) ? $sb_instagram_disable_resize= sanitize_text_field( $_POST[ 'sb_instagram_disable_resize' ] ) : $sb_instagram_disable_resize = '';
660
+ isset($_POST[ 'sb_instagram_favor_local' ]) ? $sb_instagram_favor_local = sanitize_text_field( $_POST[ 'sb_instagram_favor_local' ] ) : $sb_instagram_favor_local = '';
661
+ isset($_POST[ 'sb_instagram_minnum' ]) ? $sb_instagram_minnum = sanitize_text_field( $_POST[ 'sb_instagram_minnum' ] ) : $sb_instagram_minnum = '';
662
+
663
+ if (isset($_POST[ 'sb_instagram_cron' ]) ) $sb_instagram_cron = $_POST[ 'sb_instagram_cron' ];
664
+ isset($_POST[ 'sb_instagram_backup' ]) ? $sb_instagram_backup = $_POST[ 'sb_instagram_backup' ] : $sb_instagram_backup = '';
665
+ isset($_POST[ 'sb_ajax_initial' ]) ? $sb_ajax_initial = $_POST[ 'sb_ajax_initial' ] : $sb_ajax_initial = '';
666
+ isset($_POST[ 'enqueue_css_in_shortcode' ]) ? $enqueue_css_in_shortcode = $_POST[ 'enqueue_css_in_shortcode' ] : $enqueue_css_in_shortcode = '';
667
+
668
+ $options[ 'sb_instagram_width' ] = $sb_instagram_width;
669
+ $options[ 'sb_instagram_width_unit' ] = $sb_instagram_width_unit;
670
+ $options[ 'sb_instagram_feed_width_resp' ] = $sb_instagram_feed_width_resp;
671
+ $options[ 'sb_instagram_height' ] = $sb_instagram_height;
672
+ $options[ 'sb_instagram_height_unit' ] = $sb_instagram_height_unit;
673
+ $options[ 'sb_instagram_num' ] = $sb_instagram_num;
674
+ $options[ 'sb_instagram_cols' ] = $sb_instagram_cols;
675
+ $options[ 'sb_instagram_disable_mobile' ] = $sb_instagram_disable_mobile;
676
+ $options[ 'sb_instagram_image_padding' ] = $sb_instagram_image_padding;
677
+ $options[ 'sb_instagram_image_padding_unit' ] = $sb_instagram_image_padding_unit;
678
+ $options[ 'sb_instagram_sort' ] = $sb_instagram_sort;
679
+ $options[ 'sb_instagram_background' ] = $sb_instagram_background;
680
+ $options[ 'sb_instagram_show_btn' ] = $sb_instagram_show_btn;
681
+ $options[ 'sb_instagram_btn_background' ] = $sb_instagram_btn_background;
682
+ $options[ 'sb_instagram_btn_text_color' ] = $sb_instagram_btn_text_color;
683
+ $options[ 'sb_instagram_btn_text' ] = $sb_instagram_btn_text;
684
+ $options[ 'sb_instagram_image_res' ] = $sb_instagram_image_res;
685
+ //Header
686
+ $options[ 'sb_instagram_show_header' ] = $sb_instagram_show_header;
687
+ $options[ 'sb_instagram_header_size' ] = $sb_instagram_header_size;
688
+ $options[ 'sb_instagram_show_bio' ] = $sb_instagram_show_bio;
689
+ $options[ 'sb_instagram_custom_bio' ] = $sb_instagram_custom_bio;
690
+ $options[ 'sb_instagram_custom_avatar' ] = $sb_instagram_custom_avatar;
691
+ $options[ 'sb_instagram_custom_bio' ] = $sb_instagram_custom_bio;
692
+ $options[ 'sb_instagram_custom_avatar' ] = $sb_instagram_custom_avatar;
693
+ $options[ 'sb_instagram_header_color' ] = $sb_instagram_header_color;
694
+ //Follow button
695
+ $options[ 'sb_instagram_show_follow_btn' ] = $sb_instagram_show_follow_btn;
696
+ $options[ 'sb_instagram_folow_btn_background' ] = $sb_instagram_folow_btn_background;
697
+ $options[ 'sb_instagram_follow_btn_text_color' ] = $sb_instagram_follow_btn_text_color;
698
+ $options[ 'sb_instagram_follow_btn_text' ] = $sb_instagram_follow_btn_text;
699
+ //Misc
700
+ $options[ 'sb_instagram_custom_css' ] = $sb_instagram_custom_css;
701
+ $options[ 'sb_instagram_custom_js' ] = $sb_instagram_custom_js;
702
+ $options[ 'sb_instagram_ajax_theme' ] = $sb_instagram_ajax_theme;
703
+ $options[ 'gdpr' ] = $gdpr;
704
+ $options[ 'enqueue_js_in_head' ] = $enqueue_js_in_head;
705
+ $options[ 'disable_js_image_loading' ] = $disable_js_image_loading;
706
+ $options[ 'sb_instagram_disable_resize' ] = $sb_instagram_disable_resize;
707
+ $options[ 'sb_instagram_favor_local' ] = $sb_instagram_favor_local;
708
+ $options[ 'sb_instagram_minnum' ] = $sb_instagram_minnum;
709
+
710
+ $options[ 'sb_ajax_initial' ] = $sb_ajax_initial;
711
+ $options[ 'sb_instagram_cron' ] = $sb_instagram_cron;
712
+ $options['sb_instagram_backup'] = $sb_instagram_backup;
713
+ $options['enqueue_css_in_shortcode'] = $enqueue_css_in_shortcode;
714
+
715
+ isset($_POST[ 'sb_instagram_custom_template' ]) ? $sb_instagram_custom_template = $_POST[ 'sb_instagram_custom_template' ] : $sb_instagram_custom_template = '';
716
+ $options['custom_template'] = $sb_instagram_custom_template;
717
+ isset($_POST[ 'sb_instagram_disable_admin_notice' ]) ? $sb_instagram_disable_admin_notice = $_POST[ 'sb_instagram_disable_admin_notice' ] : $sb_instagram_disable_admin_notice = '';
718
+ $options['disable_admin_notice'] = $sb_instagram_disable_admin_notice;
719
+ isset($_POST[ 'sb_instagram_enable_email_report' ]) ? $sb_instagram_enable_email_report = $_POST[ 'sb_instagram_enable_email_report' ] : $sb_instagram_enable_email_report = '';
720
+ $options['enable_email_report'] = $sb_instagram_enable_email_report;
721
+ isset($_POST[ 'sb_instagram_email_notification' ]) ? $sb_instagram_email_notification = $_POST[ 'sb_instagram_email_notification' ] : $sb_instagram_email_notification = '';
722
+ $original = $options['email_notification'];
723
+ $options['email_notification'] = $sb_instagram_email_notification;
724
+ isset($_POST[ 'sb_instagram_email_notification_addresses' ]) ? $sb_instagram_email_notification_addresses = $_POST[ 'sb_instagram_email_notification_addresses' ] : $sb_instagram_email_notification_addresses = get_option( 'admin_email' );
725
+ $options['email_notification_addresses'] = $sb_instagram_email_notification_addresses;
726
+
727
+ if ( $original !== $sb_instagram_email_notification && $sb_instagram_enable_email_report === 'on' ){
728
+ //Clear the existing cron event
729
+ wp_clear_scheduled_hook('sb_instagram_feed_issue_email');
730
+
731
+ $input = sanitize_text_field($_POST[ 'sb_instagram_email_notification' ] );
732
+ $timestamp = strtotime( 'next ' . $input );
733
+
734
+ if ( $timestamp - (3600 * 1) < time() ) {
735
+ $timestamp = $timestamp + (3600 * 24 * 7);
736
+ }
737
+ $six_am_local = $timestamp + sbi_get_utc_offset() + (6*60*60);
738
+
739
+ wp_schedule_event( $six_am_local, 'sbiweekly', 'sb_instagram_feed_issue_email' );
740
+ }
741
+
742
+
743
+ //Delete all SBI transients
744
+ global $wpdb;
745
+ $table_name = $wpdb->prefix . "options";
746
+ $wpdb->query( "
747
+ DELETE
748
+ FROM $table_name
749
+ WHERE `option_name` LIKE ('%\_transient\_sbi\_%')
750
+ " );
751
+ $wpdb->query( "
752
+ DELETE
753
+ FROM $table_name
754
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_sbi\_%')
755
+ " );
756
+ $wpdb->query( "
757
+ DELETE
758
+ FROM $table_name
759
+ WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
760
+ " );
761
+ $wpdb->query( "
762
+ DELETE
763
+ FROM $table_name
764
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
765
+ " );
766
+
767
+ if( $sb_instagram_cron == 'no' ) wp_clear_scheduled_hook('sb_instagram_cron_job');
768
+
769
+ //Run cron when Misc settings are saved
770
+ if( $sb_instagram_cron == 'yes' ){
771
+ //Clear the existing cron event
772
+ wp_clear_scheduled_hook('sb_instagram_cron_job');
773
+
774
+ $sb_instagram_cache_time = $options[ 'sb_instagram_cache_time' ];
775
+ $sb_instagram_cache_time_unit = $options[ 'sb_instagram_cache_time_unit' ];
776
+
777
+ //Set the event schedule based on what the caching time is set to
778
+ $sb_instagram_cron_schedule = 'hourly';
779
+ if( $sb_instagram_cache_time_unit == 'hours' && $sb_instagram_cache_time > 5 ) $sb_instagram_cron_schedule = 'twicedaily';
780
+ if( $sb_instagram_cache_time_unit == 'days' ) $sb_instagram_cron_schedule = 'daily';
781
+
782
+ wp_schedule_event(time(), $sb_instagram_cron_schedule, 'sb_instagram_cron_job');
783
+
784
+ sb_instagram_clear_page_caches();
785
+ }
786
+
787
+ } //End customize tab post
788
+
789
+ //Save the settings to the settings array
790
+ update_option( 'sb_instagram_settings', $options );
791
+
792
+ ?>
793
+ <div class="updated"><p><strong><?php _e( 'Settings saved.', 'instagram-feed' ); ?></strong></p></div>
794
+ <?php } ?>
795
+
796
+ <?php } //End nonce check ?>
797
+
798
+
799
+ <div id="sbi_admin" class="wrap">
800
+ <?php
801
+ $lite_notice_dismissed = get_transient( 'instagram_feed_dismiss_lite' );
802
+
803
+ if ( ! $lite_notice_dismissed ) :
804
+ ?>
805
+ <div id="sbi-notice-bar" style="display:none">
806
+ <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
807
+ <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
808
+ </button>
809
+ </div>
810
+ <?php endif; ?>
811
+
812
+ <?php do_action( 'sbi_admin_overview_before_table' ); ?>
813
+
814
+
815
+ <div id="header">
816
+ <h1><?php _e( 'Instagram Feed', 'instagram-feed' ); ?></h1>
817
+ </div>
818
+ <?php
819
+ $sb_instagram_type = 'user';
820
+ $new_user_name = false;
821
+ $returned_data = sbi_get_connected_accounts_data( $sb_instagram_at );
822
+ $sb_instagram_at = $returned_data['access_token'];
823
+ $connected_accounts = $returned_data['connected_accounts'];
824
+ $user_feeds_returned = isset( $returned_data['user_ids'] ) ? $returned_data['user_ids'] : false;
825
+ if ( $user_feeds_returned ) {
826
+ $user_feed_ids = $user_feeds_returned;
827
+ } else {
828
+ $user_feed_ids = ! is_array( $sb_instagram_user_id ) ? explode( ',', $sb_instagram_user_id ) : $sb_instagram_user_id;
829
+ }
830
+
831
+ $new_user_name = false;
832
+
833
+ SBI_Account_Connector::maybe_launch_modals( $sb_instagram_user_id );
834
+ if ( isset( $_POST['sbi_connect_username'] ) ) {
835
+ $new_user_name = sanitize_text_field( $_POST['sbi_connect_username'] );
836
+ $new_account_details = json_decode( stripslashes( $_POST['sbi_account_json'] ), true );
837
+ array_map( 'sanitize_text_field', $new_account_details );
838
+
839
+ $updated_options = sbi_connect_basic_account( $new_account_details );
840
+ $connected_accounts = $updated_options['connected_accounts'];
841
+ $user_feed_ids = $updated_options['sb_instagram_user_id'];
842
+ }
843
+
844
+ //Display connected page
845
+ if (isset( $sbi_connected_page ) && strpos($sbi_connected_page, ':') !== false) {
846
+
847
+ $sbi_connected_page_pieces = explode(":", $sbi_connected_page);
848
+ $sbi_connected_page_id = $sbi_connected_page_pieces[0];
849
+ $sbi_connected_page_name = $sbi_connected_page_pieces[1];
850
+ $sbi_connected_page_image = $sbi_connected_page_pieces[2];
851
+
852
+ echo '&nbsp;';
853
+ echo '<p style="font-weight: bold; margin-bottom: 5px;">Connected Business Profile:</p>';
854
+ echo '<div class="sbi-managed-page sbi-no-select">';
855
+ echo '<p><img class="sbi-page-avatar" border="0" height="50" width="50" src="'.$sbi_connected_page_image.'"><b>'.$sbi_connected_page_name.'</b> &nbsp; ('.$sbi_connected_page_id.')</p>';
856
+ echo '</div>';
857
+ }
858
+
859
+ ?>
860
+
861
+ <form name="form1" method="post" action="">
862
+ <input type="hidden" name="<?php echo $sb_instagram_settings_hidden_field; ?>" value="Y">
863
+ <?php wp_nonce_field( 'sb_instagram_saving_settings', 'sb_instagram_settings_nonce' ); ?>
864
+
865
+ <?php $sbi_active_tab = isset( $_GET[ 'tab' ] ) ? sanitize_text_field( $_GET['tab'] ) : 'configure'; ?>
866
+ <h2 class="nav-tab-wrapper">
867
+ <a href="?page=sb-instagram-feed&amp;tab=configure" class="nav-tab <?php echo $sbi_active_tab == 'configure' ? 'nav-tab-active' : ''; ?>"><?php _e( '1. Configure', 'instagram-feed' ); ?></a>
868
+ <a href="?page=sb-instagram-feed&amp;tab=customize" class="nav-tab <?php echo $sbi_active_tab == 'customize' ? 'nav-tab-active' : ''; ?>"><?php _e( '2. Customize', 'instagram-feed' ); ?></a>
869
+ <a href="?page=sb-instagram-feed&amp;tab=display" class="nav-tab <?php echo $sbi_active_tab == 'display' ? 'nav-tab-active' : ''; ?>"><?php _e( '3. Display Your Feed', 'instagram-feed' ); ?></a>
870
+ <a href="?page=sb-instagram-feed&amp;tab=support" class="nav-tab <?php echo $sbi_active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Support', 'instagram-feed' ); ?></a>
871
+ <a href="?page=sb-instagram-feed&amp;tab=more" class="nav-tab <?php echo $sbi_active_tab == 'more' ? 'nav-tab-active' : ''; ?>"><?php _e( 'More Social Feeds', 'instagram-feed' ); ?>
872
+ <?php
873
+ $seen_more_plugins_page = get_user_meta(get_current_user_id(), 'seen_more_plugins_page_1', true);
874
+ if( !$seen_more_plugins_page ) echo '<span class="sbi-alert-bubble">1</span>';
875
+ ?>
876
+ </a>
877
+ </h2>
878
+
879
+ <?php if( $sbi_active_tab == 'configure' ) { //Start Configure tab ?>
880
+ <input type="hidden" name="<?php echo $sb_instagram_configure_hidden_field; ?>" value="Y">
881
+
882
+ <table class="form-table">
883
+ <tbody>
884
+ <h3><?php _e( 'Configure', 'instagram-feed' ); ?></h3>
885
+ <?php $sb_admin_email = get_option('admin_email');
886
+ $connect_url = 'https://connect.smashballoon.com/auth/ig/?wordpress_user=' . $sb_admin_email . '&state=' . admin_url('admin.php?page=sb-instagram-feed');
887
+ ?>
888
+ <div id="sbi_config">
889
+ <a data-personal-basic-api="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>"
890
+ data-new-api="<?php echo esc_attr( $connect_url ); ?>"
891
+ href="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>" class="sbi_admin_btn"><i class="fa fa-user-plus" aria-hidden="true" style="font-size: 20px;"></i>&nbsp; <?php _e('Connect an Instagram Account', 'instagram-feed' ); ?></a>
892
+ <a href="https://smashballoon.com/instagram-feed/token/" target="_blank" style="position: relative; top: 14px; left: 15px;"><?php _e('Button not working?', 'instagram-feed'); ?></a>
893
+ </div>
894
+
895
+ <!-- Old Access Token -->
896
+ <input name="sb_instagram_at" id="sb_instagram_at" type="hidden" value="<?php echo esc_attr( $sb_instagram_at ); ?>" size="80" maxlength="100" placeholder="Click button above to get your Access Token" />
897
+
898
+ <tr valign="top">
899
+ <th scope="row"><label><?php _e( 'Instagram Accounts', 'instagram-feed' ); ?></label><span style="font-weight:normal; font-style:italic; font-size: 12px; display: block;"><?php _e('Use the button above to connect an Instagram account', 'instagram-feed'); ?></span></th>
900
+ <td class="sbi_connected_accounts_wrap">
901
+ <?php if ( empty( $connected_accounts ) ) : ?>
902
+ <p class="sbi_no_accounts"><?php _e( 'No Instagram accounts connected. Click the button above to connect an account.', 'instagram-feed' ); ?></p><br />
903
+ <?php else:
904
+ $doing_account_error_messages = count( $connected_accounts ) > 1;
905
+ global $sb_instagram_posts_manager;
906
+
907
+ ?>
908
+ <?php foreach ( $connected_accounts as $account ) :
909
+ $username = $account['username'] ? $account['username'] : $account['user_id'];
910
+ if ( isset( $account['local_avatar'] ) && $account['local_avatar'] && isset( $options['sb_instagram_favor_local'] ) && $options['sb_instagram_favor_local' ] === 'on' ) {
911
+ $upload = wp_upload_dir();
912
+ $resized_url = trailingslashit( $upload['baseurl'] ) . trailingslashit( SBI_UPLOADS_NAME );
913
+ $profile_picture = '<img class="sbi_ca_avatar" src="'.$resized_url . $account['username'].'.jpg" />'; //Could add placeholder avatar image
914
+ } else {
915
+ $profile_picture = $account['profile_picture'] ? '<img class="sbi_ca_avatar" src="'.$account['profile_picture'].'" />' : ''; //Could add placeholder avatar image
916
+ }
917
+
918
+ $is_invalid_class = ! $account['is_valid'] ? ' sbi_account_invalid' : '';
919
+ $in_user_feed = in_array( $account['user_id'], $user_feed_ids, true );
920
+ $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
921
+ $use_tagged = isset( $account['use_tagged'] ) && $account['use_tagged'] == '1';
922
+ $is_private = isset( $account['private'] ) && $account['private'] !== false;
923
+
924
+ if ( empty( $profile_picture ) && $account_type === 'personal' ) {
925
+ $account_update = sbi_account_data_for_token( $account['access_token'] );
926
+ if ( isset( $account['is_valid'] ) ) {
927
+ $split = explode( '.', $account['access_token'] );
928
+ $connected_accounts[ $split[0] ] = array(
929
+ 'access_token' => $account['access_token'],
930
+ 'user_id' => $split[0],
931
+ 'username' => $account_update['username'],
932
+ 'is_valid' => true,
933
+ 'last_checked' => time(),
934
+ 'profile_picture' => $account_update['profile_picture']
935
+ );
936
+
937
+ $sbi_options = get_option( 'sb_instagram_settings', array() );
938
+ $sbi_options['connected_accounts'] = $connected_accounts;
939
+ update_option( 'sb_instagram_settings', $sbi_options );
940
+ }
941
+
942
+ }
943
+ $updated_or_new_account_class = $new_user_name === $username && $account_type !== 'business' ? ' sbi_ca_new_or_updated' : '';
944
+
945
+ ?>
946
+ <div class="sbi_connected_account<?php echo $is_invalid_class . $updated_or_new_account_class; ?><?php if ( $in_user_feed ) echo ' sbi_account_active' ?> sbi_account_type_<?php echo $account_type; ?>" id="sbi_connected_account_<?php esc_attr_e( $account['user_id'] ); ?>" data-accesstoken="<?php esc_attr_e( $account['access_token'] ); ?>" data-userid="<?php esc_attr_e( $account['user_id'] ); ?>" data-username="<?php esc_attr_e( $account['username'] ); ?>" data-type="<?php esc_attr_e( $account_type ); ?>" data-permissions="<?php if ( $use_tagged ) echo 'tagged'; ?>">
947
+ <?php if ( $doing_account_error_messages && $sb_instagram_posts_manager->connected_account_has_error( $account ) ) : ?>
948
+ <div class="sbi_deprecated">
949
+ <span><i class="fa fa-exclamation-circle" aria-hidden="true"></i><?php _e( 'Feeds using this account might not be updating due to an error. Try viewing these feeds after reconnecting the account and saving your settings below.', 'instagram-feed' ); ?></span>
950
+ </div>
951
+ <?php endif; ?>
952
+ <div class="sbi_ca_alert">
953
+ <span><?php _e( 'The Access Token for this account is expired or invalid. Click the button above to attempt to renew it.', 'instagram-feed' ); ?></span>
954
+ </div>
955
+ <div class="sbi_ca_info">
956
+
957
+ <div class="sbi_ca_delete">
958
+ <a href="<?php echo add_query_arg( 'disconnect', $account['user_id'], get_admin_url( null, 'admin.php?page=sb-instagram-feed' ) ); ?>" class="sbi_delete_account"><i class="fa fa-times"></i><span class="sbi_remove_text"><?php _e( 'Remove', 'instagram-feed' ); ?></span></a>
959
+ </div>
960
+
961
+ <div class="sbi_ca_username">
962
+ <?php echo $profile_picture; ?>
963
+ <strong><?php echo $username; ?><span><?php echo sbi_account_type_display( $account_type, isset( $account['private'] ) ); ?></span></strong>
964
+ </div>
965
+
966
+ <div class="sbi_ca_actions">
967
+ <?php if ( ! $in_user_feed ) : ?>
968
+ <a href="JavaScript:void(0);" class="sbi_use_in_user_feed button-primary"><i class="fa fa-plus-circle" aria-hidden="true"></i><?php _e( 'Add to Primary Feed', 'instagram-feed' ); ?></a>
969
+ <?php else : ?>
970
+ <a href="JavaScript:void(0);" class="sbi_remove_from_user_feed button-primary"><i class="fa fa-minus-circle" aria-hidden="true"></i><?php _e( 'Remove from Primary Feed', 'instagram-feed' ); ?></a>
971
+ <?php endif; ?>
972
+ <a class="sbi_ca_token_shortcode button-secondary" href="JavaScript:void(0);"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i><?php _e( 'Add to another Feed', 'instagram-feed' ); ?></a>
973
+ <a class="sbi_ca_show_token button-secondary" href="JavaScript:void(0);" title="<?php _e('Show access token and account info', 'instagram-feed'); ?>"><i class="fa fa-cog"></i></a>
974
+ <?php if ( $is_private ) :
975
+ $expires_in = max( 0, floor( ($account['expires_timestamp'] - time()) / DAY_IN_SECONDS ) );
976
+ $message = $expires_in > 0 ? sprintf( __( 'Expires in %s days', 'instagram-feed' ), $expires_in ) : __( 'Access Token Expired', 'instagram-feed' );
977
+ $alert_class = $expires_in < 10 ? ' sbi_alert' : '';
978
+ ?>
979
+ <div class="sbi_is_private<?php echo esc_attr( $alert_class ); ?>">
980
+ <span><?php echo esc_html( $message ); ?></span>
981
+ <a class="sbi_tooltip_link sbi_tooltip_outside" href="JavaScript:void(0);" style="position: relative; top: 2px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
982
+
983
+ <a href="https://api.instagram.com/oauth/authorize?client_id=423965861585747&redirect_uri=https://api.smashballoon.com/v2/instagram-basic-display-redirect.php&response_type=code&scope=user_profile,user_media&state=<?php echo admin_url( 'admin.php?page=sb-instagram-feed' ); ?>" class="button button-secondary"><?php _e( 'Refresh now', 'instagram-feed' ); ?></a>
984
+ </div>
985
+ <p class="sbi_tooltip sbi-more-info" style="display: none; width: 100%; box-sizing: border-box;"><?php echo sprintf( __( 'This account is a "private" account on Instagram. It needs to be manually reconnected every 60 days. %sChange this account to be "public"%s to have access tokens that are automatically refreshed.', 'instagram-feed' ), '<a href="https://help.instagram.com/116024195217477/In" target="_blank">', '</a>' ); ?></p>
986
+ <?php endif; ?>
987
+
988
+ </div>
989
+
990
+ <div class="sbi_ca_shortcode">
991
+
992
+ <p><?php _e('Copy and paste this shortcode into your page or widget area', 'instagram-feed'); ?>:<br>
993
+ <?php if ( !empty( $account['username'] ) ) : ?>
994
+ <code>[instagram-feed user="<?php echo $account['username']; ?>"]</code>
995
+ <?php endif; ?>
996
+ </p>
997
+
998
+ <p><?php _e('To add multiple users in the same feed, simply separate them using commas', 'instagram-feed'); ?>:<br>
999
+ <?php if ( !empty( $account['username'] ) ) : ?>
1000
+ <code>[instagram-feed user="<?php echo $account['username']; ?>, a_second_user, a_third_user"]</code>
1001
+ <?php endif; ?>
1002
+
1003
+ <p><?php echo sprintf( __('Click on the %s tab to learn more about shortcodes', 'instagram-feed'), '<a href="?page=sb-instagram-feed&tab=display" target="_blank">'. __( 'Display Your Feed', 'instagram-feed' ) . '</a>' ); ?></p>
1004
+ </div>
1005
+
1006
+ <div class="sbi_ca_accesstoken">
1007
+ <span class="sbi_ca_token_label"><?php _e('Access Token', 'instagram-feed');?>:</span><input type="text" class="sbi_ca_token" value="<?php echo $account['access_token']; ?>" readonly="readonly" onclick="this.focus();this.select()" title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed');?>"><br>
1008
+ <span class="sbi_ca_token_label"><?php _e('User ID', 'instagram-feed');?>:</span><input type="text" class="sbi_ca_user_id" value="<?php echo $account['user_id']; ?>" readonly="readonly" onclick="this.focus();this.select()" title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed');?>"><br>
1009
+ </div>
1010
+
1011
+ </div>
1012
+
1013
+ </div>
1014
+
1015
+ <?php endforeach; ?>
1016
+ <?php endif; ?>
1017
+ <a href="JavaScript:void(0);" class="sbi_manually_connect button-secondary"><?php _e( 'Manually Connect an Account', 'instagram-feed' ); ?></a>
1018
+ <div class="sbi_manually_connect_wrap">
1019
+ <input name="sb_manual_at" id="sb_manual_at" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="64" minlength="15" maxlength="400" placeholder="<?php esc_attr_e( 'Enter a valid Instagram Access Token', 'instagram-feed' ); ?>" /><span class='sbi_business_profile_tag'><?php _e('Business or Basic Display', 'instagram-feed');?></span>
1020
+ <div class="sbi_manual_account_id_toggle">
1021
+ <label><?php _e('Please enter the User ID for this Profile:', 'instagram-feed');?></label>
1022
+ <input name="sb_manual_account_id" id="sb_manual_account_id" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="40" minlength="5" maxlength="100" placeholder="Eg: 15641403491391489" />
1023
+ </div>
1024
+ <p id="sbi_no_js_warning" class="sbi_nojs_notice"><?php echo sprintf( __('It looks like JavaScript is not working on this page. Some features may not work fully. Visit %sthis page%s for help resolving this issue.', 'instagram-feed'), '<a href="https://smashballoon.com/i-cant-connect-or-manage-accounts-on-the-instagram-feed-settings-page/" target="_blank" rel="noopener">', '</a>' ); ?></p>
1025
+ <p class="sbi_submit" style="display: inline-block;"><input type="submit" name="sbi_submit" id="sbi_manual_submit" class="button button-primary" value="<?php _e('Connect This Account', 'instagram-feed' );?>"></p>
1026
+ </div>
1027
+ </td>
1028
+ </tr>
1029
+
1030
+ <tr valign="top" class="sbi_feed_type">
1031
+ <th scope="row"><label><?php _e('Select a Feed Type', 'instagram-feed'); ?>:</label><code class="sbi_shortcode"> type
1032
+ Eg: type=user user=smashballoon
1033
+ </code>
1034
+ <?php if ( SB_Instagram_Feed_Locator::count_unique() > 1 ) : ?>
1035
+ <div class="sbi_locations_link">
1036
+ <a href="?page=sb-instagram-feed&amp;tab=allfeeds"><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="search" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-search fa-w-16 fa-2x"><path fill="currentColor" d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z" class=""></path></svg> <?php _e('Feed Finder', 'instagram-feed'); ?></a>
1037
+ </div>
1038
+ <?php endif; ?>
1039
+
1040
+ </th>
1041
+ <td>
1042
+ <div class="sbi_row">
1043
+ <div class="sbi_col sbi_one">
1044
+ <input type="radio" name="sb_instagram_type" id="sb_instagram_type_user" value="user" <?php if($sb_instagram_type == "user") echo "checked"; ?> />
1045
+ <label class="sbi_radio_label" for="sb_instagram_type_user"><?php _e( 'User Account:', 'instagram-feed' ); ?></label>
1046
+ </div>
1047
+ <div class="sbi_col sbi_two">
1048
+ <div class="sbi_user_feed_ids_wrap">
1049
+ <?php foreach ( $user_feed_ids as $feed_id ) : if ( $feed_id !== '' ) :?>
1050
+ <?php if( count($connected_accounts) > 0 ) { ?><div id="sbi_user_feed_id_<?php echo $feed_id; ?>" class="sbi_user_feed_account_wrap"><?php } ?>
1051
+
1052
+ <?php if ( isset( $connected_accounts[ $feed_id ] ) && ! empty( $connected_accounts[ $feed_id ]['username'] ) ) : ?>
1053
+ <strong><?php echo $connected_accounts[ $feed_id ]['username']; ?></strong> <span>(<?php echo $feed_id; ?>)</span>
1054
+ <input name="sb_instagram_user_id[]" id="sb_instagram_user_id" type="hidden" value="<?php echo esc_attr( $feed_id ); ?>" />
1055
+ <?php elseif ( isset( $connected_accounts[ $feed_id ] ) && ! empty( $connected_accounts[ $feed_id ]['access_token'] ) ) : ?>
1056
+ <strong><?php echo $feed_id; ?></strong>
1057
+ <input name="sb_instagram_user_id[]" id="sb_instagram_user_id" type="hidden" value="<?php echo esc_attr( $feed_id ); ?>" />
1058
+ <?php endif; ?>
1059
+
1060
+ <?php if( count($connected_accounts) > 0 ) { ?></div><?php } ?>
1061
+ <?php endif; endforeach; ?>
1062
+ </div>
1063
+
1064
+ <?php if ( empty( $user_feed_ids ) ) : ?>
1065
+ <p class="sbi_no_accounts" style="margin-top: -3px; margin-right: 10px;"><?php _e( 'Connect a user account above', 'instagram-feed' ); ?></p>
1066
+ <?php endif; ?>
1067
+
1068
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="margin: 5px 0 10px 0; display: inline-block; height: 19px;"><?php _e("How to display User feeds", 'instagram-feed' ); ?></a>
1069
+ <div class="sbi_tooltip"><?php _e("<p><b>Displaying Posts from Your User Account</b><br />Simply connect an account using the button above.</p><p style='padding-top:8px;'><b>Displaying Posts from Other Instagram Accounts</b><br />Due to recent changes in the Instagram API it is no longer possible to display photos from other Instagram accounts which you do not have access to. You can only display the user feed of an account which you connect above. You can connect as many account as you like by logging in using the button above, or manually copy/pasting an Access Token by selecting the 'Manually Connect an Account' option.</p><p style='padding-top:10px;'><b>Multiple Acounts</b><br />It is only possible to display feeds from Instagram accounts which you own. In order to display feeds from multiple accounts, first connect them above and then use the buttons to add the account either to your primary feed or to another feed on your site.</p>", 'instagram-feed'); ?></div><br />
1070
+ </div>
1071
+
1072
+ </div>
1073
+
1074
+ <div class="sbi_pro sbi_row">
1075
+ <div class="sbi_col sbi_one">
1076
+ <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_hashtag" value="hashtag" <?php if($sb_instagram_type == "hashtag") echo "checked"; ?> />
1077
+ <label class="sbi_radio_label" for="sb_instagram_type_hashtag"><?php _e( 'Hashtag:', 'instagram-feed' ); ?></label>
1078
+ </div>
1079
+ <div class="sbi_col sbi_two">
1080
+
1081
+ <p class="sbi_pro_tooltip"><?php _e( 'Upgrade to the Pro version to display Hashtag and Tagged feeds', 'instagram-feed' ); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1082
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=hashtags" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php _e('Pro', 'instagram-feed'); ?></a>
1083
+
1084
+ <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1085
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1086
+
1087
+ <p class="sbi_tooltip"><?php _e( 'Display posts from a specific hashtag instead of from a user', 'instagram-feed' ); ?></p>
1088
+ </div>
1089
+ </div>
1090
+
1091
+ <div class="sbi_pro sbi_row">
1092
+ <div class="sbi_col sbi_one">
1093
+ <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_tagged" value="tagged" <?php if($sb_instagram_type == "tagged") echo "checked"; ?> />
1094
+ <label class="sbi_radio_label" for="sb_instagram_type_tagged"><?php _e( 'Tagged:', 'instagram-feed' ); ?></label>
1095
+ </div>
1096
+ <div class="sbi_col sbi_two">
1097
+ <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1098
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1099
+
1100
+ <p class="sbi_tooltip"><?php _e( 'Display posts that your account has been tagged in.', 'instagram-feed' ); ?></p>
1101
+ </div>
1102
+ </div>
1103
+
1104
+ <div class="sbi_pro sbi_row sbi_mixed_directions">
1105
+ <div class="sbi_col sbi_one">
1106
+ <input type="radio" name="sb_instagram_type" disabled />
1107
+ <label class="sbi_radio_label" for="sb_instagram_type_mixed">Mixed:</label>
1108
+ </div>
1109
+ <div class="sbi_col sbi_two">
1110
+ <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1111
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
1112
+
1113
+ <div class="sbi_tooltip sbi_type_tooltip">
1114
+ <p>
1115
+ <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add the user name or hashtag for each feed into the shortcode, like so: %s. This will combine a user feed and a hashtag feed into the same feed.', 'instagram-feed'), 'type="mixed"', '<code>[instagram-feed type="mixed" user="smashballoon" hashtag="#awesomeplugins"]</code>' ); ?>
1116
+ </p>
1117
+ <p style="padding-top: 8px;"><b>Note:</b> To display a hashtag feed, it is required that you first connect an Instagram Business Profile using the <b>"Connect an Instagram Account"</b> button above. &nbsp;<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">Why is this required?</a>
1118
+ </p>
1119
+ </div>
1120
+ </div>
1121
+
1122
+ </div>
1123
+
1124
+ <div class="sbi_row sbi_pro">
1125
+ <br>
1126
+ <a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);" style="margin-left: 0;"><i class="fa fa-question-circle" aria-hidden="true" style="margin-right: 6px;"></i><?php _e('Combine multiple feed types into a single feed', 'instagram-feed'); ?></a>
1127
+ <p class="sbi_tooltip">
1128
+ <b><?php _e( 'Please note: this is only available in the <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=multipletypes" target="_blank">Pro version</a>', 'instagram-feed' ); ?>.</b><br />
1129
+ <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add each user name or hashtag of each feed into the shortcode, like so: %s. This will combine a user feed and a hashtag feed into the same feed.', 'instagram-feed'), 'type="mixed"', '<code>[instagram-feed type="mixed" user="smashballoon" hashtag="#awesomeplugins"]</code>' ); ?>
1130
+ </p>
1131
+ </div>
1132
+
1133
+ </td>
1134
+ </tr>
1135
+
1136
+ <tr>
1137
+ <th class="bump-left"><label for="sb_instagram_preserve_settings" class="bump-left"><?php _e("Preserve settings when plugin is removed", 'instagram-feed'); ?></label></th>
1138
+ <td>
1139
+ <input name="sb_instagram_preserve_settings" type="checkbox" id="sb_instagram_preserve_settings" <?php if($sb_instagram_preserve_settings == true) echo "checked"; ?> />
1140
+ <label for="sb_instagram_preserve_settings"><?php _e('Yes', 'instagram-feed'); ?></label>
1141
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1142
+ <p class="sbi_tooltip"><?php _e('When removing the plugin your settings are automatically erased. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.', 'instagram-feed'); ?></p>
1143
+ </td>
1144
+ </tr>
1145
+
1146
+
1147
+ <tr valign="top" class="sbi_cron_cache_opts">
1148
+ <th scope="row"><?php _e( 'Check for new posts', 'instagram-feed' ); ?></th>
1149
+ <td>
1150
+ <div class="sbi_row">
1151
+ <input type="radio" name="sbi_caching_type" id="sbi_caching_type_cron" value="background" <?php if ( $sbi_caching_type === 'background' ) echo 'checked'; ?>>
1152
+ <label for="sbi_caching_type_cron"><?php _e( 'In the background', 'instagram-feed' ); ?></label>
1153
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 2px;"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
1154
+ <p class="sbi_tooltip sbi-more-info"><?php _e( 'Your Instagram post data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data', 'instagram-feed' ); ?>:<br><br>
1155
+ <?php _e( '<b>1. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from Instagram when the page first loads, but then after that will check in the background on the schedule selected - unless the cache is cleared.', 'instagram-feed' ); ?>
1156
+ <br><br>
1157
+ <?php _e( '<b>2. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check Instagram for new posts the next time that the feed is loaded. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you\'re experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>\'Force cache to clear on interval\'</b> which is located on the \'Customize\' tab.', 'instagram-feed' ) . '</p>'; ?>
1158
+
1159
+ </div>
1160
+ <div class="sbi_row sbi-caching-cron-options" style="display: block;">
1161
+
1162
+ <select name="sbi_cache_cron_interval" id="sbi_cache_cron_interval">
1163
+ <option value="30mins" <?php if ( $sbi_cache_cron_interval === '30mins' ) echo 'selected'; ?>><?php _e( 'Every 30 minutes', 'instagram-feed' ); ?></option>
1164
+ <option value="1hour" <?php if ( $sbi_cache_cron_interval === '1hour' ) echo 'selected'; ?>><?php _e( 'Every hour', 'instagram-feed' ); ?></option>
1165
+ <option value="12hours" <?php if ( $sbi_cache_cron_interval === '12hours' ) echo 'selected'; ?>><?php _e( 'Every 12 hours', 'instagram-feed' ); ?></option>
1166
+ <option value="24hours" <?php if ( $sbi_cache_cron_interval === '24hours' ) echo 'selected'; ?>><?php _e( 'Every 24 hours', 'instagram-feed' ); ?></option>
1167
+ </select>
1168
+
1169
+ <div id="sbi-caching-time-settings" style="display: none;">
1170
+ <?php _e('at' ); ?>
1171
+
1172
+ <select name="sbi_cache_cron_time" style="width: 80px">
1173
+ <option value="1" <?php if ( $sbi_cache_cron_time === '1' ) echo 'selected'; ?>>1:00</option>
1174
+ <option value="2" <?php if ( $sbi_cache_cron_time === '2' ) echo 'selected'; ?>>2:00</option>
1175
+ <option value="3" <?php if ( $sbi_cache_cron_time === '3' ) echo 'selected'; ?>>3:00</option>
1176
+ <option value="4" <?php if ( $sbi_cache_cron_time === '4' ) echo 'selected'; ?>>4:00</option>
1177
+ <option value="5" <?php if ( $sbi_cache_cron_time === '5' ) echo 'selected'; ?>>5:00</option>
1178
+ <option value="6" <?php if ( $sbi_cache_cron_time === '6' ) echo 'selected'; ?>>6:00</option>
1179
+ <option value="7" <?php if ( $sbi_cache_cron_time === '7' ) echo 'selected'; ?>>7:00</option>
1180
+ <option value="8" <?php if ( $sbi_cache_cron_time === '8' ) echo 'selected'; ?>>8:00</option>
1181
+ <option value="9" <?php if ( $sbi_cache_cron_time === '9' ) echo 'selected'; ?>>9:00</option>
1182
+ <option value="10" <?php if ( $sbi_cache_cron_time === '10' ) echo 'selected'; ?>>10:00</option>
1183
+ <option value="11" <?php if ( $sbi_cache_cron_time === '11' ) echo 'selected'; ?>>11:00</option>
1184
+ <option value="0" <?php if ( $sbi_cache_cron_time === '0' ) echo 'selected'; ?>>12:00</option>
1185
+ </select>
1186
+
1187
+ <select name="sbi_cache_cron_am_pm" style="width: 50px">
1188
+ <option value="am" <?php if ( $sbi_cache_cron_am_pm === 'am' ) echo 'selected'; ?>>AM</option>
1189
+ <option value="pm" <?php if ( $sbi_cache_cron_am_pm === 'pm' ) echo 'selected'; ?>>PM</option>
1190
+ </select>
1191
+ </div>
1192
+
1193
+ <?php
1194
+ if ( wp_next_scheduled( 'sbi_feed_update' ) ) {
1195
+ $time_format = get_option( 'time_format' );
1196
+ if ( ! $time_format ) {
1197
+ $time_format = 'g:i a';
1198
+ }
1199
+ //
1200
+ $schedule = wp_get_schedule( 'sbi_feed_update' );
1201
+ if ( $schedule == '30mins' ) $schedule = __( 'every 30 minutes', 'instagram-feed' );
1202
+ if ( $schedule == 'twicedaily' ) $schedule = __( 'every 12 hours', 'instagram-feed' );
1203
+ $sbi_next_cron_event = wp_next_scheduled( 'sbi_feed_update' );
1204
+ echo '<p class="sbi-caching-sched-notice"><span><b>' . __( 'Next check', 'instagram-feed' ) . ': ' . date( $time_format, $sbi_next_cron_event + sbi_get_utc_offset() ) . ' (' . $schedule . ')</b> - ' . __( 'Note: Saving the settings on this page will clear the cache and reset this schedule', 'instagram-feed' ) . '</span></p>';
1205
+ } else {
1206
+ echo '<p style="font-size: 11px; color: #666;">' . __( 'Nothing currently scheduled', 'instagram-feed' ) . '</p>';
1207
+ }
1208
+ ?>
1209
+
1210
+ </div>
1211
+ <div class="sbi_row">
1212
+ <input type="radio" name="sbi_caching_type" id="sbi_caching_type_page" value="page" <?php if ( $sbi_caching_type === 'page' ) echo 'checked'; ?>>
1213
+ <label for="sbi_caching_type_page"><?php _e( 'When the page loads', 'instagram-feed' ); ?></label>
1214
+ </div>
1215
+ <div class="sbi_row sbi-caching-page-options" style="display: none;">
1216
+ <?php _e( 'Every', 'instagram-feed' ); ?>:
1217
+ <input name="sb_instagram_cache_time" type="text" value="<?php echo esc_attr( $sb_instagram_cache_time ); ?>" size="4" />
1218
+ <select name="sb_instagram_cache_time_unit">
1219
+ <option value="minutes" <?php if($sb_instagram_cache_time_unit == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes', 'instagram-feed'); ?></option>
1220
+ <option value="hours" <?php if($sb_instagram_cache_time_unit == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'instagram-feed'); ?></option>
1221
+ <option value="days" <?php if($sb_instagram_cache_time_unit == "days") echo 'selected="selected"' ?> ><?php _e('Days', 'instagram-feed'); ?></option>
1222
+ </select>
1223
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1224
+ <p class="sbi_tooltip"><?php _e('Your Instagram posts are temporarily cached by the plugin in your WordPress database. You can choose how long the posts should be cached for. If you set the time to 1 hour then the plugin will clear the cache after that length of time and check Instagram for posts again.', 'instagram-feed'); ?></p>
1225
+ </div>
1226
+
1227
+ </td>
1228
+ </tr>
1229
+
1230
+ </tbody>
1231
+ </table>
1232
+
1233
+ <?php submit_button(); ?>
1234
+ </form>
1235
+
1236
+ <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php _e('Next Step: <a href="?page=sb-instagram-feed&tab=customize">Customize your Feed</a>', 'instagram-feed'); ?></p>
1237
+
1238
+ <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=supportpage&utm_medium=setupdirections" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
1239
+
1240
+
1241
+ <?php } // End Configure tab ?>
1242
+
1243
+ <?php if ( $sbi_active_tab == 'allfeeds' ) {
1244
+ $locator_summary = SB_Instagram_Feed_Locator::summary();
1245
+ include_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/admin/templates/locator-summary.php';
1246
+ } ?>
1247
+
1248
+
1249
+ <?php if( $sbi_active_tab == 'customize' ) { //Start Configure tab ?>
1250
+
1251
+ <p class="sb_instagram_contents_links" id="general">
1252
+ <span><?php _e( 'Quick links:', 'instagram-feed' ); ?> </span>
1253
+ <a href="#general"><?php _e( 'General', 'instagram-feed' ); ?></a>
1254
+ <a href="#layout"><?php _e( 'Layout', 'instagram-feed' ); ?></a>
1255
+ <a href="#photos"><?php _e( 'Photos', 'instagram-feed' ); ?></a>
1256
+ <a href="#headeroptions"><?php _e( 'Header', 'instagram-feed' ); ?></a>
1257
+ <a href="#loadmore"><?php _e( "'Load More' Button", 'instagram-feed' ); ?></a>
1258
+ <a href="#follow"><?php _e( "'Follow' Button", 'instagram-feed' ); ?></a>
1259
+ <a href="#gdpr"><?php _e( 'GDPR', 'instagram-feed' ); ?></a>
1260
+ <a href="#customcss"><?php _e( 'Custom CSS', 'instagram-feed' ); ?></a>
1261
+ <a href="#customjs"><?php _e( 'Custom JavaScript', 'instagram-feed' ); ?></a>
1262
+ </p>
1263
+
1264
+ <input type="hidden" name="<?php echo $sb_instagram_customize_hidden_field; ?>" value="Y">
1265
+
1266
+ <h3><?php _e( 'General', 'instagram-feed' ); ?></h3>
1267
+
1268
+ <table class="form-table">
1269
+ <tbody>
1270
+ <tr valign="top">
1271
+ <th scope="row"><label><?php _e('Width of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> width widthunit
1272
+ Eg: width=50 widthunit=%</code></th>
1273
+ <td>
1274
+ <input name="sb_instagram_width" type="text" value="<?php echo esc_attr( $sb_instagram_width ); ?>" id="sb_instagram_width" size="4" maxlength="4" />
1275
+ <select name="sb_instagram_width_unit" id="sb_instagram_width_unit">
1276
+ <option value="px" <?php if($sb_instagram_width_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1277
+ <option value="%" <?php if($sb_instagram_width_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1278
+ </select>
1279
+ <div id="sb_instagram_width_options">
1280
+ <input name="sb_instagram_feed_width_resp" type="checkbox" id="sb_instagram_feed_width_resp" <?php if($sb_instagram_feed_width_resp == true) echo "checked"; ?> /><label for="sb_instagram_feed_width_resp"><?php _e('Set to be 100% width on mobile?', 'instagram-feed'); ?></label>
1281
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does this mean?', 'instagram-feed' ); ?></a>
1282
+ <p class="sbi_tooltip"><?php _e("If you set a width on the feed then this will be used on mobile as well as desktop. Check this setting to set the feed width to be 100% on mobile so that it is responsive.", 'instagram-feed'); ?></p>
1283
+ </div>
1284
+ </td>
1285
+ </tr>
1286
+ <tr valign="top">
1287
+ <th scope="row"><label><?php _e('Height of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> height heightunit
1288
+ Eg: height=500 heightunit=px</code></th>
1289
+ <td>
1290
+ <input name="sb_instagram_height" type="text" value="<?php echo esc_attr( $sb_instagram_height ); ?>" size="4" maxlength="4" />
1291
+ <select name="sb_instagram_height_unit">
1292
+ <option value="px" <?php if($sb_instagram_height_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1293
+ <option value="%" <?php if($sb_instagram_height_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1294
+ </select>
1295
+ </td>
1296
+ </tr>
1297
+ <tr valign="top">
1298
+ <th scope="row"><label><?php _e('Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> background
1299
+ Eg: background=d89531</code></th>
1300
+ <td>
1301
+ <input name="sb_instagram_background" type="text" value="<?php echo esc_attr( $sb_instagram_background ); ?>" class="sbi_colorpick" />
1302
+ </td>
1303
+ </tr>
1304
+ </tbody>
1305
+ </table>
1306
+
1307
+ <hr id="layout" />
1308
+ <h3><?php _e('Layout', 'instagram-feed'); ?></h3>
1309
+
1310
+ <table class="form-table">
1311
+ <tbody>
1312
+ <?php
1313
+ $selected_type = isset( $sb_instagram_layout_type ) ? $sb_instagram_layout_type : 'grid';
1314
+ $layout_types = array(
1315
+ 'grid' => __( 'Grid', 'instagram-feed' ),
1316
+ 'carousel' => __( 'Carousel', 'instagram-feed' ),
1317
+ 'masonry' => __( 'Masonry', 'instagram-feed' ),
1318
+ 'highlight' => __( 'Highlight', 'instagram-feed' )
1319
+ );
1320
+ $layout_images = array(
1321
+ 'grid' => SBI_PLUGIN_URL . 'img/grid.png',
1322
+ 'carousel' => SBI_PLUGIN_URL . 'img/carousel.png',
1323
+ 'masonry' => SBI_PLUGIN_URL . 'img/masonry.png',
1324
+ 'highlight' => SBI_PLUGIN_URL . 'img/highlight.png'
1325
+ );
1326
+ ?>
1327
+ <tr valign="top">
1328
+ <th scope="row" class="sbi_pro"><label title="<?php _e('Click for shortcode option', 'instagram-feed'); ?>"><?php _e('Layout Type', 'instagram-feed'); ?></label><br /><span class="sbi_note" style="margin: 5px 0 0 0; font-weight: normal;"><?php _e('Select a layout to see associated<br />options', 'instagram-feed'); ?></span></th>
1329
+ <td>
1330
+ <div class="sbi_layouts">
1331
+ <?php foreach( $layout_types as $layout_type => $label ) : ?>
1332
+ <div class="sbi_layout_cell sbi_pro">
1333
+ <input class="sb_layout_type" id="sb_layout_type_<?php echo esc_attr( $layout_type ); ?>" name="sb_instagram_layout_type" type="radio" value="<?php echo esc_attr( $layout_type ); ?>" <?php if ( $selected_type === $layout_type ) echo 'checked'; ?>/><label for="sb_layout_type_<?php echo esc_attr( $layout_type ); ?>"><span class="sbi_label"><?php echo esc_html( $label ); ?></span><img src="<?php echo esc_url( $layout_images[ $layout_type ] ); ?>" /></label>
1334
+ </div>
1335
+ <?php endforeach; ?>
1336
+
1337
+ <p class="sbi_pro_tooltip"><?php _e('Upgrade to the Pro version to unlock these layouts', 'instagram-feed'); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1338
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=layouts" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php _e('Pro', 'instagram-feed'); ?></a>
1339
+
1340
+ </div>
1341
+ <div class="sb_layout_options_wrap sbi_pro">
1342
+ <a href="JavaScript:void(0);" class="sbi_close_options"><i class="fa fa-close"></i></a>
1343
+ <div class="sb_instagram_layout_settings sbi_layout_type_grid">
1344
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('A uniform grid of square-cropped images.', 'instagram-feed'); ?></span>
1345
+ </div>
1346
+ <div class="sb_instagram_layout_settings sbi_layout_type_masonry">
1347
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Images in their original aspect ratios with no vertical space between posts.', 'instagram-feed'); ?></span>
1348
+ </div>
1349
+ <div class="sb_instagram_layout_settings sbi_layout_type_carousel">
1350
+ <div class="sb_instagram_layout_setting">
1351
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Posts are displayed in a slideshow carousel.', 'instagram-feed'); ?></span>
1352
+ </div>
1353
+ <div class="sb_instagram_layout_setting">
1354
+
1355
+ <label><?php _e('Number of Rows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselrows
1356
+ Eg: carouselrows=2</code>
1357
+ <br>
1358
+ <span class="sbi_note" style="margin: -5px 0 -10px 0; display: block;"><?php _e('Use the "Number of Columns" setting below this section to set how many posts are visible in the carousel at a given time.', 'instagram-feed'); ?></span>
1359
+ <br>
1360
+ <select name="sb_instagram_carousel_rows" id="sb_instagram_carousel_rows">
1361
+ <option value="1">1</option>
1362
+ <option value="2" selected="selected">2</option>
1363
+ </select>
1364
+ </div>
1365
+ <div class="sb_instagram_layout_setting">
1366
+ <label><?php _e('Loop Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselloop
1367
+ Eg: carouselloop=rewind
1368
+ carouselloop=infinity</code>
1369
+ <br>
1370
+ <select name="sb_instagram_carousel_loop" id="sb_instagram_carousel_loop">
1371
+ <option value="rewind"><?php _e('Rewind', 'instagram-feed'); ?></option>
1372
+ <option value="infinity" selected="selected"><?php _e('Infinity', 'instagram-feed'); ?></option>
1373
+ </select>
1374
+ </div>
1375
+ <div class="sb_instagram_layout_setting">
1376
+ <input type="checkbox" name="sb_instagram_carousel_arrows" id="sb_instagram_carousel_arrows" checked="checked">
1377
+ <label><?php _e('Show Navigation Arrows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselarrows
1378
+ Eg: carouselarrows=true</code>
1379
+ </div>
1380
+ <div class="sb_instagram_layout_setting">
1381
+ <input type="checkbox" name="sb_instagram_carousel_pag" id="sb_instagram_carousel_pag">
1382
+ <label><?php _e('Show Pagination', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselpag
1383
+ Eg: carouselpag=true</code>
1384
+ </div>
1385
+ <div class="sb_instagram_layout_setting">
1386
+ <input type="checkbox" name="sb_instagram_carousel_autoplay" id="sb_instagram_carousel_autoplay">
1387
+ <label><?php _e('Enable Autoplay', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselautoplay
1388
+ Eg: carouselautoplay=true</code>
1389
+ </div>
1390
+ <div class="sb_instagram_layout_setting">
1391
+ <label><?php _e('Interval Time', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouseltime
1392
+ Eg: carouseltime=8000</code>
1393
+ <br>
1394
+ <input name="sb_instagram_carousel_interval" type="text" value="5000" size="6"><?php _e("miliseconds", 'instagram-feed'); ?>
1395
+ </div>
1396
+ </div>
1397
+
1398
+ <div class="sb_instagram_layout_settings sbi_layout_type_highlight">
1399
+ <div class="sb_instagram_layout_setting">
1400
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Masonry style, square-cropped, image only (no captions or likes/comments below image). "Highlighted" posts are twice as large.', 'instagram-feed'); ?></span>
1401
+ </div>
1402
+ <div class="sb_instagram_layout_setting">
1403
+ <label title="Click for shortcode option"><?php _e('Highlighting Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlighttype
1404
+ Eg: highlighttype=pattern</code>
1405
+ <br>
1406
+ <select name="sb_instagram_highlight_type" id="sb_instagram_highlight_type">
1407
+ <option value="pattern" selected="selected"><?php _e('Pattern', 'instagram-feed'); ?></option>
1408
+ <option value="id"><?php _e('Post ID', 'instagram-feed'); ?></option>
1409
+ <option value="hashtag"><?php _e('Hashtag', 'instagram-feed'); ?></option>
1410
+ </select>
1411
+ </div>
1412
+ <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1413
+ <label></label><code class="sbi_shortcode"> highlightoffset
1414
+ Eg: highlightoffset=2</code>
1415
+ <br>
1416
+ <input name="sb_instagram_highlight_offset" type="number" min="0" value="0" style="width: 50px;">
1417
+ </div>
1418
+ <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1419
+ <label><?php _e('Pattern', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlightpattern
1420
+ Eg: highlightpattern=3</code>
1421
+ <br>
1422
+ <span><?php _e('Highlight every', 'instagram-feed'); ?></span><input name="sb_instagram_highlight_factor" type="number" min="2" value="6" style="width: 50px;"><span><?php _e('posts', 'instagram-feed'); ?></span>
1423
+ </div>
1424
+ <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_hashtag sb_instagram_layout_setting" style="display: none;">
1425
+ <label><?php _e('Highlight Posts with these Hashtags', 'instagram-feed'); ?></label>
1426
+ <input name="sb_instagram_highlight_hashtag" id="sb_instagram_highlight_hashtag" type="text" size="40" value="#fishing">&nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is this?', 'instagram-feed'); ?></a>
1427
+ <br>
1428
+ <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate multiple hashtags using commas', 'instagram-feed'); ?></span>
1429
+
1430
+
1431
+ <p class="sbi_tooltip"><?php _e('You can use this setting to highlight posts by a hashtag. Use a specified hashtag in your posts and they will be automatically highlighted in your feed.', 'instagram-feed'); ?></p>
1432
+ </div>
1433
+ <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_ids sb_instagram_layout_setting" style="display: none;">
1434
+ <label><?php _e('Highlight Posts by ID', 'instagram-feed'); ?></label>
1435
+ <textarea name="sb_instagram_highlight_ids" id="sb_instagram_highlight_ids" style="width: 100%;" rows="3">sbi_1852317219231323590_3269008872</textarea>
1436
+ <br>
1437
+ <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate IDs using commas', 'instagram-feed'); ?></span>
1438
+
1439
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is this?', 'instagram-feed'); ?></a>
1440
+ <p class="sbi_tooltip"><?php _e('You can use this setting to highlight posts by their ID. Enable and use "moderation mode", check the box to show post IDs underneath posts, then copy and paste IDs into this text box.', 'instagram-feed'); ?></p>
1441
+ </div>
1442
+ </div>
1443
+
1444
+ </div>
1445
+ </td>
1446
+ </tr>
1447
+ <tr valign="top">
1448
+ <th scope="row"><label><?php _e('Number of Photos', 'instagram-feed'); ?></label><code class="sbi_shortcode"> num
1449
+ Eg: num=6</code></th>
1450
+ <td>
1451
+ <input name="sb_instagram_num" type="text" value="<?php echo esc_attr( $sb_instagram_num ); ?>" size="4" maxlength="4" />
1452
+ <span class="sbi_note"><?php _e('Number of photos to show initially.', 'instagram-feed'); ?></span>
1453
+ </td>
1454
+ </tr>
1455
+ <tr valign="top">
1456
+ <th scope="row"><label><?php _e('Number of Columns', 'instagram-feed'); ?></label><code class="sbi_shortcode"> cols
1457
+ Eg: cols=3</code></th>
1458
+ <td>
1459
+ <select name="sb_instagram_cols">
1460
+ <option value="1" <?php if($sb_instagram_cols == "1") echo 'selected="selected"' ?> ><?php _e('1', 'instagram-feed'); ?></option>
1461
+ <option value="2" <?php if($sb_instagram_cols == "2") echo 'selected="selected"' ?> ><?php _e('2', 'instagram-feed'); ?></option>
1462
+ <option value="3" <?php if($sb_instagram_cols == "3") echo 'selected="selected"' ?> ><?php _e('3', 'instagram-feed'); ?></option>
1463
+ <option value="4" <?php if($sb_instagram_cols == "4") echo 'selected="selected"' ?> ><?php _e('4', 'instagram-feed'); ?></option>
1464
+ <option value="5" <?php if($sb_instagram_cols == "5") echo 'selected="selected"' ?> ><?php _e('5', 'instagram-feed'); ?></option>
1465
+ <option value="6" <?php if($sb_instagram_cols == "6") echo 'selected="selected"' ?> ><?php _e('6', 'instagram-feed'); ?></option>
1466
+ <option value="7" <?php if($sb_instagram_cols == "7") echo 'selected="selected"' ?> ><?php _e('7', 'instagram-feed'); ?></option>
1467
+ <option value="8" <?php if($sb_instagram_cols == "8") echo 'selected="selected"' ?> ><?php _e('8', 'instagram-feed'); ?></option>
1468
+ <option value="9" <?php if($sb_instagram_cols == "9") echo 'selected="selected"' ?> ><?php _e('9', 'instagram-feed'); ?></option>
1469
+ <option value="10" <?php if($sb_instagram_cols == "10") echo 'selected="selected"' ?> ><?php _e('10', 'instagram-feed'); ?></option>
1470
+ </select>
1471
+ </td>
1472
+ </tr>
1473
+ <tr valign="top">
1474
+ <th scope="row"><label><?php _e('Padding around Images', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imagepadding imagepaddingunit</code></th>
1475
+ <td>
1476
+ <input name="sb_instagram_image_padding" type="text" value="<?php echo esc_attr( $sb_instagram_image_padding ); ?>" size="4" maxlength="4" />
1477
+ <select name="sb_instagram_image_padding_unit">
1478
+ <option value="px" <?php if($sb_instagram_image_padding_unit == "px") echo 'selected="selected"' ?> ><?php _e('px', 'instagram-feed'); ?></option>
1479
+ <option value="%" <?php if($sb_instagram_image_padding_unit == "%") echo 'selected="selected"' ?> ><?php _e('%', 'instagram-feed'); ?></option>
1480
+ </select>
1481
+ </td>
1482
+ </tr>
1483
+ <tr valign="top">
1484
+ <th scope="row"><label><?php _e("Disable mobile layout", 'instagram-feed'); ?></label><code class="sbi_shortcode"> disablemobile
1485
+ Eg: disablemobile=true</code></th>
1486
+ <td>
1487
+ <input type="checkbox" name="sb_instagram_disable_mobile" id="sb_instagram_disable_mobile" <?php if($sb_instagram_disable_mobile == true) echo 'checked="checked"' ?> />
1488
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does this mean?', 'instagram-feed' ); ?></a>
1489
+ <p class="sbi_tooltip"><?php _e("By default on mobile devices the layout automatically changes to use fewer columns. Checking this setting disables the mobile layout.", 'instagram-feed'); ?></p>
1490
+ </td>
1491
+ </tr>
1492
+ </tbody>
1493
+ </table>
1494
+
1495
+ <?php submit_button(); ?>
1496
+
1497
+ <hr id="photos" />
1498
+ <h3><?php _e('Photos', 'instagram-feed'); ?></h3>
1499
+
1500
+ <table class="form-table">
1501
+ <tbody>
1502
+ <tr valign="top">
1503
+ <th scope="row"><label><?php _e('Sort Photos By', 'instagram-feed'); ?></label><code class="sbi_shortcode"> sortby
1504
+ Eg: sortby=random</code></th>
1505
+ <td>
1506
+ <select name="sb_instagram_sort">
1507
+ <option value="none" <?php if($sb_instagram_sort == "none") echo 'selected="selected"' ?> ><?php _e('Newest to oldest', 'instagram-feed'); ?></option>
1508
+ <option value="random" <?php if($sb_instagram_sort == "random") echo 'selected="selected"' ?> ><?php _e('Random', 'instagram-feed'); ?></option>
1509
+ </select>
1510
+ </td>
1511
+ </tr>
1512
+ <tr valign="top">
1513
+ <th scope="row"><label><?php _e('Image Resolution', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imageres
1514
+ Eg: imageres=thumb</code></th>
1515
+ <td>
1516
+
1517
+ <select name="sb_instagram_image_res">
1518
+ <option value="auto" <?php if($sb_instagram_image_res == "auto") echo 'selected="selected"' ?> ><?php _e('Auto-detect (recommended)', 'instagram-feed'); ?></option>
1519
+ <option value="thumb" <?php if($sb_instagram_image_res == "thumb") echo 'selected="selected"' ?> ><?php _e('Thumbnail (150x150)', 'instagram-feed'); ?></option>
1520
+ <option value="medium" <?php if($sb_instagram_image_res == "medium") echo 'selected="selected"' ?> ><?php _e('Medium (320x320)', 'instagram-feed'); ?></option>
1521
+ <option value="full" <?php if($sb_instagram_image_res == "full") echo 'selected="selected"' ?> ><?php _e('Full size (640x640)', 'instagram-feed'); ?></option>
1522
+ </select>
1523
+
1524
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e( 'What does Auto-detect mean?', 'instagram-feed'); ?></a>
1525
+ <p class="sbi_tooltip"><?php _e("Auto-detect means that the plugin automatically sets the image resolution based on the size of your feed.", 'instagram-feed'); ?></p>
1526
+
1527
+ </td>
1528
+ </tr>
1529
+ </tbody>
1530
+ </table>
1531
+
1532
+ <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a></span>
1533
+
1534
+ <div class="sbi-pro-options">
1535
+ <p class="sbi-upgrade-link">
1536
+ <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1537
+ </p>
1538
+ <table class="form-table">
1539
+ <tbody>
1540
+ <tr valign="top" class="sbi_pro">
1541
+ <th scope="row"><label><?php _e('Media Type to Display','instagram-feed'); ?></label></th>
1542
+ <td>
1543
+ <select name="sb_instagram_media_type" disabled>
1544
+ <option value="all"><?php _e('All','instagram-feed'); ?></option>
1545
+ <option value="photos"><?php _e('Photos only','instagram-feed'); ?></option>
1546
+ <option value="videos"><?php _e('Videos only','instagram-feed'); ?></option>
1547
+ </select>
1548
+ </td>
1549
+ </tr>
1550
+
1551
+ <tr valign="top" class="sbi_pro">
1552
+ <th scope="row"><label><?php _e("Enable Pop-up Lightbox", 'instagram-feed'); ?></label></th>
1553
+ <td>
1554
+ <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1555
+ </td>
1556
+ </tr>
1557
+
1558
+ <tr valign="top" class="sbi_pro">
1559
+ <th scope="row"><label><?php _e("Link Posts to URL in Caption (Shoppable feed)",'instagram-feed'); ?></label></th>
1560
+ <td>
1561
+ <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1562
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e("What will this do?",'instagram-feed'); ?></a>
1563
+ <p class="sbi_tooltip"><?php _e("Checking this box will change the link for each post to any url included in the caption for that Instagram post. The lightbox will be disabled. Visit <a href='https://smashballoon.com/make-a-shoppable-feed?utm_campaign=instagram-free&utm_source=settings&utm_medium=shoppable'>this link</a> to learn how this works.",'instagram-feed'); ?></p>
1564
+ </td>
1565
+ </tr>
1566
+ </tbody>
1567
+ </table>
1568
+ </div>
1569
+
1570
+
1571
+ <hr />
1572
+ <h3><?php _e('Photo Hover Style','instagram-feed'); ?></h3>
1573
+
1574
+ <p style="padding-bottom: 18px;">
1575
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=photohover" target="_blank"><?php _e('Upgrade to Pro to enable Photo Hover styles','instagram-feed'); ?></a><br />
1576
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options','instagram-feed'); ?></a>
1577
+ </p>
1578
+
1579
+ <div class="sbi-pro-options" style="margin-top: -15px;">
1580
+ <table class="form-table">
1581
+ <tbody>
1582
+ <tr valign="top" class="sbi_pro">
1583
+ <th scope="row"><label><?php _e('Hover Background Color', 'instagram-feed'); ?></label></th>
1584
+ <td>
1585
+ <input name="sb_hover_background" type="text" disabled class="sbi_colorpick" />
1586
+ </td>
1587
+ </tr>
1588
+ <tr valign="top" class="sbi_pro">
1589
+ <th scope="row"><label><?php _e('Hover Text Color', 'instagram-feed'); ?></label></th>
1590
+ <td>
1591
+ <input name="sb_hover_text" type="text" disabled class="sbi_colorpick" />
1592
+ </td>
1593
+ </tr>
1594
+ <tr valign="top" class="sbi_pro">
1595
+ <th scope="row"><label><?php _e('Information to display', 'instagram-feed'); ?></label></th>
1596
+ <td>
1597
+ <div>
1598
+ <input name="sbi_hover_inc_username" type="checkbox" disabled />
1599
+ <label for="sbi_hover_inc_username"><?php _e('Username', 'instagram-feed'); ?></label>
1600
+ </div>
1601
+ <div>
1602
+ <input name="sbi_hover_inc_icon" type="checkbox" disabled />
1603
+ <label for="sbi_hover_inc_icon"><?php _e('Expand Icon', 'instagram-feed'); ?></label>
1604
+ </div>
1605
+ <div>
1606
+ <input name="sbi_hover_inc_date" type="checkbox" disabled />
1607
+ <label for="sbi_hover_inc_date"><?php _e('Date', 'instagram-feed'); ?></label>
1608
+ </div>
1609
+ <div>
1610
+ <input name="sbi_hover_inc_instagram" type="checkbox" disabled />
1611
+ <label for="sbi_hover_inc_instagram"><?php _e('Instagram Icon/Link', 'instagram-feed'); ?></label>
1612
+ </div>
1613
+ <div>
1614
+ <input name="sbi_hover_inc_location" type="checkbox" disabled />
1615
+ <label for="sbi_hover_inc_location"><?php _e('Location', 'instagram-feed'); ?></label>
1616
+ </div>
1617
+ <div>
1618
+ <input name="sbi_hover_inc_caption" type="checkbox" disabled />
1619
+ <label for="sbi_hover_inc_caption"><?php _e('Caption', 'instagram-feed'); ?></label>
1620
+ </div>
1621
+ <div>
1622
+ <input name="sbi_hover_inc_likes" type="checkbox" disabled />
1623
+ <label for="sbi_hover_inc_likes"><?php _e('Like/Comment Icons', 'instagram-feed'); ?></label>
1624
+ </div>
1625
+ </td>
1626
+ </tr>
1627
+
1628
+ </tbody>
1629
+ </table>
1630
+ </div>
1631
+
1632
+
1633
+ <hr />
1634
+ <h3><?php _e( 'Carousel', 'instagram-feed' ); ?></h3>
1635
+ <p style="padding-bottom: 18px;">
1636
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=carousel" target="_blank"><?php _e('Upgrade to Pro to enable Carousels', 'instagram-feed'); ?></a><br />
1637
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1638
+ </p>
1639
+
1640
+ <div class="sbi-pro-options" style="margin-top: -15px;">
1641
+ <table class="form-table">
1642
+ <tbody>
1643
+ <tr valign="top" class="sbi_pro">
1644
+ <th scope="row"><label><?php _e("Enable Carousel", 'instagram-feed'); ?></label></th>
1645
+ <td>
1646
+ <input type="checkbox" disabled />
1647
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1648
+ <p class="sbi_tooltip"><?php _e("Enable this setting to create a carousel slider out of your photos.", 'instagram-feed'); ?></p>
1649
+ </td>
1650
+ </tr>
1651
+ <tr valign="top" class="sbi_pro">
1652
+ <th scope="row"><label><?php _e("Show Navigation Arrows", 'instagram-feed'); ?></label></th>
1653
+ <td>
1654
+ <input type="checkbox" disabled />
1655
+ </td>
1656
+ </tr>
1657
+ <tr valign="top" class="sbi_pro">
1658
+ <th scope="row"><label><?php _e("Show Pagination", 'instagram-feed'); ?></label></th>
1659
+ <td>
1660
+ <input type="checkbox" disabled />
1661
+ </td>
1662
+ </tr>
1663
+ <tr valign="top" class="sbi_pro">
1664
+ <th scope="row"><label><?php _e("Enable Autoplay", 'instagram-feed'); ?></label></th>
1665
+ <td>
1666
+ <input type="checkbox" disabled />
1667
+ </td>
1668
+ </tr>
1669
+ <tr valign="top" class="sbi_pro">
1670
+ <th scope="row"><label><?php _e("Interval Time", 'instagram-feed'); ?></label></th>
1671
+ <td>
1672
+ <input name="sb_instagram_carousel_interval" type="text" disabled size="6" /><?php _e("milliseconds", 'instagram-feed'); ?>
1673
+ </td>
1674
+ </tr>
1675
+ </tbody>
1676
+ </table>
1677
+ </div>
1678
+
1679
+
1680
+
1681
+ <hr id="headeroptions" />
1682
+ <h3><?php _e("Header", 'instagram-feed'); ?></h3>
1683
+ <table class="form-table">
1684
+ <tbody>
1685
+ <tr valign="top">
1686
+ <th scope="row"><label><?php _e("Show Feed Header", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showheader
1687
+ Eg: showheader=false</code></th>
1688
+ <td>
1689
+ <input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header" <?php if($sb_instagram_show_header == true) echo 'checked="checked"' ?> />
1690
+ </td>
1691
+ </tr>
1692
+ <tr valign="top">
1693
+ <th scope="row"><label><?php _e('Header Size', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headersize
1694
+ Eg: headersize=medium</code></th>
1695
+ <td>
1696
+ <select name="sb_instagram_header_size" id="sb_instagram_header_size" style="float: left;">
1697
+ <option value="small" <?php if($sb_instagram_header_size == "small") echo 'selected="selected"' ?> ><?php _e('Small', 'instagram-feed'); ?></option>
1698
+ <option value="medium" <?php if($sb_instagram_header_size == "medium") echo 'selected="selected"' ?> ><?php _e('Medium', 'instagram-feed'); ?></option>
1699
+ <option value="large" <?php if($sb_instagram_header_size == "large") echo 'selected="selected"' ?> ><?php _e('Large', 'instagram-feed'); ?></option>
1700
+ </select>
1701
+ </td>
1702
+ </tr>
1703
+ <tr valign="top">
1704
+ <th scope="row"><label><?php _e("Show Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbio
1705
+ Eg: showbio=false</code></th>
1706
+ <td>
1707
+ <?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
1708
+ <input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio" <?php if($sb_instagram_show_bio == true) echo 'checked="checked"' ?> />
1709
+ <span class="sbi_note"><?php _e("Only applies for Instagram accounts with bios", 'instagram-feed'); ?></span>
1710
+ <div class="sb_instagram_box" style="display: block;">
1711
+ <div class="sb_instagram_box_setting" style="display: block;">
1712
+ <label style="padding-bottom: 0;"><?php _e("Add Custom Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode" style="margin-top: 5px;"> custombio
1713
+ Eg: custombio="My custom bio."</code>
1714
+ <br>
1715
+ <span class="sbi_aside" style="padding-bottom: 5px; display: block;"><?php _e("Use your own custom bio text in the feed header. Bio text is automatically retrieved from Instagram for Business accounts.", 'instagram-feed'); ?></span>
1716
+
1717
+ <textarea type="text" name="sb_instagram_custom_bio" id="sb_instagram_custom_bio" ><?php echo esc_textarea( stripslashes( $sb_instagram_custom_bio ) ); ?></textarea>
1718
+ &nbsp;<a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php _e("Why is my bio not displaying automatically?", 'instagram-feed'); ?></a>
1719
+ <p class="sbi_tooltip" style="padding: 10px 0 0 0; width: 99%;"><?php echo sprintf( __("Instagram is deprecating their old API for Personal accounts on June 1, 2020. The plugin supports their new API, however, their new API does not yet include the bio text for Personal accounts. If you require this feature then it is available if you convert your Instagram account from a Personal to a Business account by following %s. Note: If you previously had a Personal account connected then the plugin has saved the avatar for that feed and will continue to use it automatically.", 'instagram-feed'), '<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">these directions</a>' ); ?></p>
1720
+ </div>
1721
+ </div>
1722
+
1723
+ </td>
1724
+ </tr>
1725
+
1726
+ <tr valign="top">
1727
+ <th scope="row"><label><?php _e("Use Custom Avatar", 'instagram-feed'); ?></label><code class="sbi_shortcode"> customavatar
1728
+ Eg: customavatar="https://my-website.com/avatar.jpg"</code></th>
1729
+ <td>
1730
+ <input type="text" name="sb_instagram_custom_avatar" class="large-text" id="sb_instagram_custom_avatar" value="<?php echo esc_attr( stripslashes( $sb_instagram_custom_avatar ) ); ?>" placeholder="https://example.com/avatar.jpg" />
1731
+ <span class="sbi_aside"><?php _e("Avatar is automatically retrieved from Instagram for Business accounts", 'instagram-feed'); ?></span>
1732
+ <br>
1733
+ <a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php _e("Why is my avatar not displaying automatically?", 'instagram-feed'); ?></a>
1734
+
1735
+ <p class="sbi_tooltip sbi_tooltip_under_text" style="padding: 10px 0 0 0;"><?php echo sprintf( __("Instagram is deprecating their old API for Personal accounts on June 1, 2020. The plugin supports their new API, however, their new API does not yet include the avatar image for Personal accounts. If you require this feature then it is available if you convert your Instagram account from a Personal to a Business account by following %s. Note: If you previously had a Personal account connected then the plugin has saved the bio text for that feed and will continue to use it automatically.", 'instagram-feed'), '<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">these directions</a>' ); ?></p>
1736
+
1737
+ </td>
1738
+ </tr>
1739
+ <tr valign="top">
1740
+ <th scope="row"><label><?php _e('Header Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headercolor
1741
+ Eg: headercolor=fff</code></th>
1742
+ <td>
1743
+ <input name="sb_instagram_header_color" type="text" value="<?php echo esc_attr( $sb_instagram_header_color ); ?>" class="sbi_colorpick" />
1744
+ </td>
1745
+ </tr>
1746
+ </tbody>
1747
+ </table>
1748
+
1749
+ <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a></span>
1750
+
1751
+ <div class="sbi-pro-options">
1752
+ <p class="sbi-upgrade-link">
1753
+ <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=header" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1754
+ </p>
1755
+ <table class="form-table">
1756
+ <tbody>
1757
+ <tr valign="top" class="sbi_pro">
1758
+ <th scope="row"><label><?php _e('Header Style','instagram-feed'); ?></label></th>
1759
+ <td>
1760
+ <select name="sb_instagram_header_style" style="float: left;">
1761
+ <option value="circle"><?php _e('Standard','instagram-feed'); ?></option>
1762
+ <option value="boxed"><?php _e('Boxed','instagram-feed'); ?></option>
1763
+ <option value="centered"><?php _e('Centered','instagram-feed'); ?></option>
1764
+ </select>
1765
+ </td>
1766
+ </tr>
1767
+ <tr valign="top" class="sbi_pro">
1768
+ <th scope="row"><label><?php _e("Show Number of Followers",'instagram-feed'); ?></label></th>
1769
+ <td>
1770
+ <input type="checkbox" disabled />
1771
+ <span class="sbi_note"><?php _e("This only applies when displaying photos from a User ID",'instagram-feed'); ?></span>
1772
+ </td>
1773
+ </tr>
1774
+ </tbody>
1775
+ </table>
1776
+ </div>
1777
+
1778
+ <?php submit_button(); ?>
1779
+
1780
+
1781
+ <hr />
1782
+ <h3><?php _e("Caption", 'instagram-feed'); ?></h3>
1783
+ <p style="padding-bottom: 18px;">
1784
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=caption" target="_blank"><?php _e("Upgrade to Pro to enable Photo Captions", 'instagram-feed'); ?></a><br />
1785
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e("Show Pro Options", 'instagram-feed'); ?></a>
1786
+ </p>
1787
+
1788
+ <div class="sbi-pro-options" style="margin-top: -15px;">
1789
+ <table class="form-table">
1790
+ <tbody>
1791
+ <tr valign="top" class="sbi_pro">
1792
+ <th scope="row"><label><?php _e("Show Caption", 'instagram-feed'); ?></label></th>
1793
+ <td>
1794
+ <input type="checkbox" disabled />
1795
+ </td>
1796
+ </tr>
1797
+ <tr valign="top" class="sbi_pro">
1798
+ <th scope="row"><label><?php _e("Maximum Text Length", 'instagram-feed'); ?></label></th>
1799
+ <td>
1800
+ <input disabled size="4" />Characters
1801
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1802
+ <p class="sbi_tooltip"><?php _e("The number of characters of text to display in the caption. An elipsis link will be added to allow the user to reveal more text if desired.", 'instagram-feed'); ?></p>
1803
+ </td>
1804
+ </tr>
1805
+ <tr valign="top" class="sbi_pro">
1806
+ <th scope="row"><label><?php _e('Text Color', 'instagram-feed'); ?></label></th>
1807
+ <td>
1808
+ <input type="text" disabled class="sbi_colorpick" />
1809
+ </td>
1810
+ </tr>
1811
+ <tr valign="top" class="sbi_pro">
1812
+ <th scope="row"><label><?php _e('Text Size', 'instagram-feed'); ?></label></th>
1813
+ <td>
1814
+ <select name="sb_instagram_caption_size" style="width: 180px;" disabled>
1815
+ <option value="inherit" ><?php _e('Inherit from theme', 'instagram-feed'); ?></option>
1816
+ <option value="10" >10px</option>
1817
+ <option value="11" >11px</option>
1818
+ <option value="12" >12px</option>
1819
+ <option value="13" >13px</option>
1820
+ <option value="14" >14px</option>
1821
+ <option value="16" >16px</option>
1822
+ <option value="18" >18px</option>
1823
+ <option value="20" >20px</option>
1824
+ <option value="24" >24px</option>
1825
+ <option value="28" >28px</option>
1826
+ <option value="32" >32px</option>
1827
+ <option value="36" >36px</option>
1828
+ <option value="40" >40px</option>
1829
+ </select>
1830
+ </td>
1831
+ </tr>
1832
+ </tbody>
1833
+ </table>
1834
+ </div>
1835
+
1836
+
1837
+ <hr />
1838
+ <h3><?php _e("Likes &amp; Comments", 'instagram-feed'); ?></h3>
1839
+ <p style="padding-bottom: 18px;">
1840
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=stats" target="_blank"><?php _e("Upgrade to Pro to enable Likes &amp; Comments", 'instagram-feed'); ?></a><br />
1841
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e("Show Pro Options", 'instagram-feed'); ?></a>
1842
+ </p>
1843
+
1844
+ <div class="sbi-pro-options" style="margin-top: -15px;">
1845
+ <table class="form-table">
1846
+ <tbody>
1847
+ <tr valign="top" class="sbi_pro">
1848
+ <th scope="row"><label><?php _e("Show Icons", 'instagram-feed'); ?></label></th>
1849
+ <td>
1850
+ <input type="checkbox" disabled />
1851
+ </td>
1852
+ </tr>
1853
+ <tr valign="top" class="sbi_pro">
1854
+ <th scope="row"><label><?php _e('Icon Color', 'instagram-feed'); ?></label></th>
1855
+ <td>
1856
+ <input type="text" disabled class="sbi_colorpick" />
1857
+ </td>
1858
+ </tr>
1859
+ <tr valign="top" class="sbi_pro">
1860
+ <th scope="row"><label><?php _e('Icon Size', 'instagram-feed'); ?></label></th>
1861
+ <td>
1862
+ <select disabled name="sb_instagram_meta_size" style="width: 180px;">
1863
+ <option value="inherit"><?php _e('Inherit from theme', 'instagram-feed'); ?></option>
1864
+ <option value="10" >10px</option>
1865
+ <option value="11" >11px</option>
1866
+ <option value="12" >12px</option>
1867
+ <option value="13" >13px</option>
1868
+ <option value="14" >14px</option>
1869
+ <option value="16" >16px</option>
1870
+ <option value="18" >18px</option>
1871
+ <option value="20" >20px</option>
1872
+ <option value="24" >24px</option>
1873
+ <option value="28" >28px</option>
1874
+ <option value="32" >32px</option>
1875
+ <option value="36" >36px</option>
1876
+ <option value="40" >40px</option>
1877
+ </select>
1878
+ </td>
1879
+ </tr>
1880
+ </tbody>
1881
+ </table>
1882
+ </div>
1883
+
1884
+
1885
+ <hr />
1886
+ <h3><?php _e('Lightbox Comments', 'instagram-feed'); ?></h3>
1887
+
1888
+ <p style="padding-bottom: 18px;">
1889
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=comments" target="_blank"><?php _e('Upgrade to Pro to enable Comments', 'instagram-feed'); ?></a><br />
1890
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1891
+ </p>
1892
+
1893
+ <div class="sbi-pro-options" style="margin-top: -15px;">
1894
+ <table class="form-table">
1895
+ <tbody>
1896
+
1897
+ <tr valign="top" class="sbi_pro">
1898
+ <th scope="row"><label><?php _e('Show Comments in Lightbox', 'instagram-feed'); ?></label></th>
1899
+ <td style="padding: 5px 10px 0 10px;">
1900
+ <input type="checkbox" disabled style="margin-right: 15px;" />
1901
+ <input class="button-secondary" style="margin-top: -5px;" disabled value="<?php echo esc_attr( 'Clear Comment Cache', 'instagram-feed' ); ?>" />
1902
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1903
+ <p class="sbi_tooltip"><?php _e("This will remove the cached comments saved in the database", 'instagram-feed'); ?></p>
1904
+ </td>
1905
+ </tr>
1906
+ <tr valign="top" class="sbi_pro">
1907
+ <th scope="row"><label><?php _e('Number of Comments', 'instagram-feed'); ?></label></th>
1908
+ <td>
1909
+ <input name="sb_instagram_num_comments" type="text" disabled size="4" />
1910
+ <span class="sbi_note"><?php _e('Max number of latest comments.', 'instagram-feed'); ?></span>
1911
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1912
+ <p class="sbi_tooltip"><?php _e("This is the maximum number of comments that will be shown in the lightbox. If there are more comments available than the number set, only the latest comments will be shown", 'instagram-feed'); ?></p>
1913
+ </td>
1914
+ </tr>
1915
+
1916
+ </tbody>
1917
+ </table>
1918
+ </div>
1919
+
1920
+
1921
+ <hr id="loadmore" />
1922
+ <h3><?php _e("'Load More' Button", 'instagram-feed'); ?></h3>
1923
+ <table class="form-table">
1924
+ <tbody>
1925
+ <tr valign="top">
1926
+ <th scope="row"><label><?php _e("Show the 'Load More' button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbutton
1927
+ Eg: showbutton=false</code></th>
1928
+ <td>
1929
+ <input type="checkbox" name="sb_instagram_show_btn" id="sb_instagram_show_btn" <?php if($sb_instagram_show_btn == true) echo 'checked="checked"' ?> />
1930
+ </td>
1931
+ </tr>
1932
+ <tr valign="top">
1933
+ <th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttoncolor
1934
+ Eg: buttoncolor=8224e3</code></th>
1935
+ <td>
1936
+ <input name="sb_instagram_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_btn_background ); ?>" class="sbi_colorpick" />
1937
+ </td>
1938
+ </tr>
1939
+ <tr valign="top">
1940
+ <th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontextcolor
1941
+ Eg: buttontextcolor=eeee22</code></th>
1942
+ <td>
1943
+ <input name="sb_instagram_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_btn_text_color ); ?>" class="sbi_colorpick" />
1944
+ </td>
1945
+ </tr>
1946
+ <tr valign="top">
1947
+ <th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontext
1948
+ Eg: buttontext="Show more.."</code></th>
1949
+ <td>
1950
+ <input name="sb_instagram_btn_text" type="text" value="<?php echo esc_attr( stripslashes( $sb_instagram_btn_text ) ); ?>" size="20" />
1951
+ </td>
1952
+ </tr>
1953
+ </tbody>
1954
+ </table>
1955
+
1956
+ <?php submit_button(); ?>
1957
+
1958
+ <hr id="follow" />
1959
+ <h3><?php _e("'Follow' Button", 'instagram-feed'); ?></h3>
1960
+ <table class="form-table">
1961
+ <tbody>
1962
+ <tr valign="top">
1963
+ <th scope="row"><label><?php _e("Show the Follow button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showfollow
1964
+ Eg: showfollow=true</code></th>
1965
+ <td>
1966
+ <input type="checkbox" name="sb_instagram_show_follow_btn" id="sb_instagram_show_follow_btn" <?php if($sb_instagram_show_follow_btn == true) echo 'checked="checked"' ?> />
1967
+ </td>
1968
+ </tr>
1969
+
1970
+ <tr valign="top">
1971
+ <th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followcolor
1972
+ Eg: followcolor=28a1bf</code></th>
1973
+ <td>
1974
+ <input name="sb_instagram_folow_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_folow_btn_background ); ?>" class="sbi_colorpick" />
1975
+ </td>
1976
+ </tr>
1977
+ <tr valign="top">
1978
+ <th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtextcolor
1979
+ Eg: followtextcolor=000</code></th>
1980
+ <td>
1981
+ <input name="sb_instagram_follow_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_follow_btn_text_color ); ?>" class="sbi_colorpick" />
1982
+ </td>
1983
+ </tr>
1984
+ <tr valign="top">
1985
+ <th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtext
1986
+ Eg: followtext="Follow me"</code></th>
1987
+ <td>
1988
+ <input name="sb_instagram_follow_btn_text" type="text" value="<?php echo esc_attr( stripslashes( $sb_instagram_follow_btn_text ) ); ?>" size="30" />
1989
+ </td>
1990
+ </tr>
1991
+ </tbody>
1992
+ </table>
1993
+
1994
+ <hr id="filtering" />
1995
+ <h3><?php _e('Post Filtering', 'instagram-feed'); ?></h3>
1996
+
1997
+ <p style="padding-bottom: 18px;">
1998
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=filtering" target="_blank"><?php _e('Upgrade to Pro to enable Post Filtering options', 'instagram-feed'); ?></a><br />
1999
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
2000
+ </p>
2001
+
2002
+ <div class="sbi-pro-options" style="margin-top: -15px;">
2003
+
2004
+ <table class="form-table">
2005
+ <tbody>
2006
+ <tr valign="top" class="sbi_pro">
2007
+ <th scope="row"><label><?php _e('Remove photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
2008
+ <td>
2009
+ <div class="sb_instagram_apply_labels">
2010
+ <p><?php _e('Apply to:', 'instagram-feed'); ?></p>
2011
+ <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php _e('All feeds', 'instagram-feed'); ?></label>
2012
+ <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php _e('One feed', 'instagram-feed'); ?></label>
2013
+ </div>
2014
+
2015
+ <input disabled name="sb_instagram_exclude_words" id="sb_instagram_exclude_words" type="text" style="width: 70%;" value="" />
2016
+ <br />
2017
+ <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate words/hashtags using commas', 'instagram-feed'); ?></span>
2018
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed'); ?></a>
2019
+ <p class="sbi_tooltip"><?php _e("You can use this setting to remove photos which contain certain words or hashtags in the caption. Separate multiple words or hashtags using commas.", 'instagram-feed'); ?></p>
2020
+ </td>
2021
+ </tr>
2022
+
2023
+ <tr valign="top" class="sbi_pro">
2024
+ <th scope="row"><label><?php _e('Show photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
2025
+ <td>
2026
+ <div class="sb_instagram_apply_labels">
2027
+ <p><?php _e('Apply to:', 'instagram-feed'); ?></p>
2028
+ <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php _e('All feeds', 'instagram-feed'); ?></label>
2029
+ <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php _e('One feed', 'instagram-feed'); ?></label>
2030
+ </div>
2031
+
2032
+ <input disabled name="sb_instagram_include_words" id="sb_instagram_include_words" type="text" style="width: 70%;" value="" />
2033
+ <br />
2034
+ <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate words/hashtags using commas', 'instagram-feed'); ?></span>
2035
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed'); ?></a>
2036
+ <p class="sbi_tooltip"><?php _e("You can use this setting to only show photos which contain certain words or hashtags in the caption. For example, adding <code>sheep, cow, dog</code> will show any photos which contain either the word sheep, cow, or dog. Separate multiple words or hashtags using commas.", 'instagram-feed'); ?></p>
2037
+ </td>
2038
+ </tr>
2039
+ </tbody>
2040
+ </table>
2041
+ </div>
2042
+
2043
+
2044
+ <hr id="moderation" />
2045
+ <h3><?php _e('Moderation', 'instagram-feed'); ?></h3>
2046
+
2047
+ <p style="padding-bottom: 18px;">
2048
+ <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=moderation" target="_blank"><?php _e('Upgrade to Pro to enable Moderation options', 'instagram-feed'); ?></a><br />
2049
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
2050
+ </p>
2051
+
2052
+ <div class="sbi-pro-options" style="margin-top: -15px;">
2053
+ <table class="form-table">
2054
+ <tbody>
2055
+ <tr valign="top" class="sbi_pro">
2056
+ <th scope="row"><label><?php _e('Moderation Type', 'instagram-feed'); ?></label></th>
2057
+ <td>
2058
+ <input class="sb_instagram_moderation_mode" checked="checked" disabled type="radio" value="visual" style="margin-top: 0;" /><label><?php _e('Visual', 'instagram-feed'); ?></label>
2059
+ <input class="sb_instagram_moderation_mode" disabled type="radio" value="manual" style="margin-top: 0; margin-left: 10px;"/><label><?php _e('Manual', 'instagram-feed'); ?></label>
2060
+
2061
+ <p class="sbi_tooltip" style="display: block;"><?php _e("<b>Visual Moderation Mode</b><br />This adds a button to each feed that will allow you to hide posts, block users, and create white lists from the front end using a visual interface. Visit <a href='https:/