Instagram Feed - Version 2.9.10

Version Description

  • Fix: Fixed a bug related to feed data being removed in the event a feed hadn't been updated in 21 days even when it was in use.
Download this release

Release Info

Developer Craig at Smash Balloon
Plugin Icon 128x128 Instagram Feed
Version 2.9.10
Comparing to
See all releases

Code changes from version 2.9.9 to 2.9.10

Files changed (56) hide show
  1. README.txt +862 -859
  2. css/admin-notifications.css +187 -187
  3. css/sb-blocks.css +2 -2
  4. css/sb-instagram-2-1.css +0 -744
  5. css/sb-instagram-2-1.min.css +0 -1
  6. css/sb-instagram-2-2.css +787 -787
  7. css/sb-instagram-2-2.min.css +0 -0
  8. css/sb-instagram-admin.css +2872 -2872
  9. css/sb-instagram.css +0 -819
  10. css/sb-instagram.min.css +0 -1
  11. css/sbi-styles.css +788 -788
  12. css/sbi-styles.min.css +0 -0
  13. gpl-2.0.txt +0 -0
  14. img/about/api-error.png +0 -0
  15. img/about/icon-full.svg +0 -0
  16. img/about/icon-none.svg +0 -0
  17. img/about/icon-partial.svg +0 -0
  18. img/about/plugin-fb.png +0 -0
  19. img/about/plugin-if.png +0 -0
  20. img/about/plugin-mi.png +0 -0
  21. img/about/plugin-om.png +0 -0
  22. img/about/plugin-rp.png +0 -0
  23. img/about/plugin-seo.png +0 -0
  24. img/about/plugin-smtp.png +0 -0
  25. img/about/plugin-tw.jpg +0 -0
  26. img/about/plugin-wpforms.png +0 -0
  27. img/about/plugin-yt.png +0 -0
  28. img/about/steps.png +0 -0
  29. img/about/team.jpg +0 -0
  30. img/balloon-120.png +0 -0
  31. img/carousel.png +0 -0
  32. img/grid.png +0 -0
  33. img/highlight.png +0 -0
  34. img/insta-logo.png +0 -0
  35. img/instagram-pro-promo.png +0 -0
  36. img/loader.png +0 -0
  37. img/masonry.png +0 -0
  38. img/placeholder.png +0 -0
  39. img/sbi-icon.png +0 -0
  40. img/sbi-oembed.png +0 -0
  41. img/small-logo.png +0 -0
  42. img/sw-screenshot.png +0 -0
  43. img/thumb-placeholder.png +0 -0
  44. inc/admin/PluginSilentUpgrader.php +565 -565
  45. inc/admin/PluginSilentUpgraderSkin.php +57 -57
  46. inc/admin/actions.php +1145 -1145
  47. inc/admin/addon-functions.php +182 -182
  48. inc/admin/blocks/class-sbi-blocks.php +147 -147
  49. inc/admin/class-install-skin.php +27 -27
  50. inc/admin/class-sbi-about.php +1300 -1300
  51. inc/admin/class-sbi-account-connector.php +257 -257
  52. inc/admin/class-sbi-new-user.php +416 -416
  53. inc/admin/class-sbi-notifications.php +582 -582
  54. inc/admin/class-sbi-sitehealth.php +80 -80
  55. inc/admin/class-sbi-tracking.php +345 -345
  56. inc/admin/main.php +0 -3833
README.txt CHANGED
@@ -1,859 +1,862 @@
1
- === Smash Balloon Social Photo Feed ===
2
- 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.9
7
- License: GPLv2 or later
8
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
-
10
- Formerly "Instagram Feed". Display clean, customizable, and responsive Instagram feeds from multiple accounts. Supports Instagram oEmbeds.
11
-
12
- == Description ==
13
-
14
- Display Instagram posts from your Instagram accounts, either in the same single feed or in multiple different ones.
15
-
16
- = Features =
17
- * **New:** Now automatically powers your **Instagram oEmbeds**
18
- * Super **simple to set up**
19
- * Display photos from **multiple Instagram accounts** in the same feed or in separate feeds
20
- * Completely **responsive** and mobile ready - layout looks great on any screen size and in any container width
21
- * **Completely customizable** - Customize the width, height, number of photos, number of columns, image size, background color, image spacing and more!
22
- * Display **multiple Instagram feeds** on the same page or on different pages throughout your site
23
- * **GDPR Compliance** - automatically integrates with many of the popular GDPR cookie consent plugins and includes a 1-click easy GDPR setting.
24
- * Use the built-in **shortcode options** to completely customize each of your Instagram feeds
25
- * Display thumbnail, medium or **full-size photos** from your Instagram feed
26
- * **Infinitely load more** of your Instagram photos with the 'Load More' button
27
- * Includes a **Follow on Instagram button** at the bottom of your feed
28
- * Display a **beautiful header** at the top of your feed
29
- * Display your Instagram photos chronologically or in random order
30
- * Add your own Custom CSS and JavaScript for even deeper customizations
31
- * Handy block for easily adding your feed to posts and pages using the block editor
32
-
33
- = Benefits =
34
- * **Increase Social Engagement** - Increase engagement between you and your Instagram followers. Increase your number of followers by displaying your Instagram content directly on your site.
35
- * **Save Time** - Don't have time to update your photos on your site? Save time and increase efficiency by only posting your photos to Instagram and automatically displaying them on your website
36
- * **Display Your Content Your Way** - Customize your Instagram feeds to look exactly the way you want, so that they blend seemlessly into your site or pop out at your visitors!
37
- * **Keep Your Site Looking Fresh** - Automatically push your new Instagram content straight to your site to keep it looking fresh and keeping your audience engaged.
38
- * **Super simple to set up** - Once installed, you can be displaying your Instagram photos within 30 seconds! No confusing steps or Instagram Developer account needed.
39
- * **Powers all Instagram oEmbeds on your site** - With WordPress removing support for Instagram oEmbeds, the plugin will now power all Instagram embeds on your site, old and new, to allow them to continue working.
40
-
41
- = Pro Version =
42
- In order to maintain the free version of the plugin on an ongoing basis, and to provide quick and effective support for free, we offer a Pro version of the plugin. The Pro version allows you to:
43
- * Display Hashtag feeds
44
- * View photos and videos in a popup lightbox directly on your site
45
- * View post comments for user feeds
46
- * Display the number of like and comments for each post
47
- * Create carousels from your posts
48
- * Use "Masonry" or "Highlight" layouts for your feeds
49
- * Display captions for photos and videos
50
- * Filter posts based on hashtag/word
51
- * Advanced moderation system for hiding/showing certain posts
52
- * Block posts by specific users
53
- * Create "shoppable" Instagram feeds, and more.
54
-
55
- [Find out more about the Pro version](https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=proversion&utm_medium=profindout "Instagram Feed Pro") or [try out the Pro demo](https://smashballoon.com/instagram-feed/demo/?utm_campaign=instagram-free-readme&utm_source=proversion&utm_medium=readmedemo "Instagram Feed Pro Demo").
56
-
57
- = Featured Reviews =
58
- "**Simple and concise** - Excellent plugin. Simple and non-bloated. I had a couple small issues with the plugin when I first started using it, but a quick comment on the support forums got a new version pushed out the next day with the fix. Awesome support!" - [Josh Jones](https://wordpress.org/support/topic/simple-and-concise-3 'Simple and concise Instagram plugin')
59
-
60
- "**Great plugin, greater support!** - I've definitely noticed an increase in followers on Instagram since I added this plugin to my sidebar. Thanks for the help in making some adjustments...looks and works great!" - [BNOTP](https://wordpress.org/support/topic/thanks-for-a-great-plugin-6 'Great plugin, greater Support!')
61
-
62
- = Feedback or Support =
63
- We're dedicated to providing the most customizable, robust and well supported Instagram feed plugin in the world, so if you have an issue or have any feedback on how to improve the plugin then please open a ticket in the [Support forum](http://wordpress.org/support/plugin/instagram-feed 'Instagram Feed Support Forum').
64
-
65
- For a pop-up photo **lightbox**, to display posts by **hashtag**, show photo **captions**, **video** support + more, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=feedbacj&utm_medium=support 'Instagram Feed Pro').
66
-
67
- == Installation ==
68
-
69
- 1. Install the Instagram Feed plugin either via the WordPress plugin directory, or by uploading the files to your web server (in the `/wp-content/plugins/` directory).
70
- 2. Activate the Instagram Feed plugin through the 'Plugins' menu in WordPress.
71
- 3. Navigate to the 'Instagram Feed' settings page to connect your Instagram account.
72
- 4. Use the shortcode `[instagram-feed]` in your page, post or widget to display your Instagram photos.
73
- 5. You can display multiple Instagram feeds by using shortcode options, for example: `[instagram-feed num=6 cols=3]`
74
-
75
- For simple step-by-step directions on how to set up the Instagram Feed plugin please refer to our [setup guide](http://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free-readme&utm_source=installation&utm_medium=setup 'Instagram Feed setup guide').
76
-
77
- = Display your Feed =
78
-
79
- **Single Instagram Feed**
80
-
81
- Copy and paste the following shortcode directly into the page, post or widget where you'd like the Instagram feed to show up: `[instagram-feed]`
82
-
83
- **Multiple Instagram Feeds**
84
-
85
- If you'd like to display multiple Instagram feeds then you can set different settings directly in the shortcode like so: `[instagram-feed num=9 cols=3]`
86
-
87
- If you'd like to display feed from more than one account, connect multiple accounts on the "Configure" tab and then add the user name in the shortcode: `[instagram-feed user="ANOTHER_USER_NAME"]`
88
-
89
- You can display as many different Instagram feeds as you like, on either the same page or on different pages, by just using the shortcode options below. For example:
90
- `[instagram-feed]`
91
- `[instagram-feed user="ANOTHER_USER_NAME"]`
92
- `[instagram-feed user="ANOTHER_USER_NAME, YET_ANOTHER_USER_NAME" num=4 cols=4 showfollow=false]`
93
-
94
- See the table below for a full list of available shortcode options:
95
-
96
- = Shortcode Options =
97
- * **General Options**
98
- * **user** - An Instagram User Name (must have account connected) - Example: `[instagram-feed user=AN_INSTAGRAM_USER_NAME]`
99
- * **width** - The width of your Instagram feed. Any number - Example: `[instagram-feed width=50]`
100
- * **widthunit** - The unit of the width of your Instagram feed. 'px' or '%' - Example: `[instagram-feed widthunit=%]`
101
- * **height** - The height of your Instagram feed. Any number - Example: `[instagram-feed height=250]`
102
- * **heightunit** - The unit of the height of your Instagram feed. 'px' or '%' - Example: `[instagram-feed heightunit=px]`
103
- * **background** - The background color of the Instagram feed. Any hex color code - Example: `[instagram-feed background=#ffff00]`
104
- * **class** - Add a CSS class to the Instagram feed container - Example: `[instagram-feed class=feedOne]`
105
- *
106
- * **Photo Options**
107
- * **sortby** - Sort the Instagram posts by Newest to Oldest (none) or Random (random) - Example: `[instagram-feed sortby=random]`
108
- * **num** - The number of Instagram posts to display initially. Maximum is 33 - Example: `[instagram-feed num=10]`
109
-
110
- * **cols** - The number of columns in your Instagram feed. 1 - 10 - Example: `[instagram-feed cols=5]`
111
- * **imageres** - The resolution/size of the Instagram photos. 'auto', full', 'medium' or 'thumb' - Example: `[instagram-feed imageres=full]`
112
- * **imagepadding** - The spacing around your Instagram photos - Example: `[instagram-feed imagepadding=10]`
113
- * **imagepaddingunit** - The unit of the padding in your Instagram feed. 'px' or '%' - Example: `[instagram-feed imagepaddingunit=px]`
114
- * **disablemobile** - Disable the mobile layout for your Instagram feed. 'true' or 'false' - Example: `[instagram-feed disablemobile=true]`
115
- *
116
- * **Header Options**
117
- * **showheader** - Whether to show the Instagram feed Header. 'true' or 'false' - Example: `[instagram-feed showheader=false]`
118
- * **showbio** - Whether to show the account's bio in the Instagram feed Header. 'true' or 'false' - Example: `[instagram-feed showbio=false]`
119
- * **custombio** - Custom Bio text for the Instagram feed Header - Example: `[instagram-feed custombio="My custom bio."]`
120
- * **customavatar** - URL of a custom Avatar for the header. Example: `[instagram-feed customavatar="https://my-site.com/avatar.jpg"]`
121
-
122
- * **headercolor** - The color of the Instagram feed Header text. Any hex color code - Example: `[instagram-feed headercolor=#333]`
123
- *
124
- * **'Load More' Button Options**
125
- * **showbutton** - Whether to show the 'Load More' button. 'true' or 'false' - Example: `[instagram-feed showbutton='false']`
126
- * **buttoncolor** - The background color of the button. Any hex color code - Example: `[instagram-feed buttoncolor=#000]`
127
- * **buttontextcolor** - The text color of the button. Any hex color code - Example: `[instagram-feed buttontextcolor=#fff]`
128
- * **buttontext** - The text used for the button - Example: `[instagram-feed buttontext="Load More Photos"]`
129
- *
130
- * **'Follow on Instagram' Button Options**
131
- * **showfollow** - Whether to show the 'Follow on Instagram' button. 'true' or 'false' - Example: `[instagram-feed showfollow=true]`
132
- * **followcolor** - The background color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followcolor=#ff0000]`
133
- * **followtextcolor** - The text color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followtextcolor=#fff]`
134
- * **followtext** - The text used for the 'Follow on Instagram' button - Example: `[instagram-feed followtext="Follow me"]`
135
-
136
- For more shortcode options, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=shortcode&utm_medium=shortcodepro 'Instagram Feed Pro').
137
-
138
- = Setting up the Free Instagram Feed WordPress Plugin =
139
-
140
- 1) Once you've installed the Instagram Feed plugin click on the Instagram Feed item in your WordPress menu
141
-
142
- 2) Click on the large blue Instagram button to log into your Instagram account and connect your Instagram account. If you're having trouble retrieving your Instagram information from Instagram then try using the Instagram button on [this page](https://smashballoon.com/instagram-feed/token/?utm_campaign=instagram-free-readme&utm_source=settingup&utm_medium=connectionproblem) instead.
143
-
144
- You can also display photos from other Instagram accounts by connecting additional Instagram accounts and adding the user name in the shortcode.
145
-
146
- 3) Navigate to the Instagram Feed customize page to customize your Instagram feed.
147
-
148
- 4) Once you've customized your Instagram feed, click on the Display Your Feed tab to grab the [instagram-feed] shortcode.
149
-
150
- 5) Copy the Instagram Feed shortcode and paste it into any page, post or widget where you want the Instagram feed to appear.
151
-
152
- 6) You can paste the Instagram Feed shortcode directly into your page editor.
153
-
154
- 7) You can use the default WordPress 'Text' widget to display your Instagram Feed in a sidebar or other widget area.
155
-
156
- == Frequently Asked Questions ==
157
-
158
- = Can I display multiple Instagram feeds on my site or on the same page? =
159
-
160
- Yep. You can display multiple Instagram feeds by using our built-in shortcode options, for example: `[instagram-feed user="smashballoon" cols=3]`. Be sure to connect the related Instagram account on the "Configure" tab.
161
-
162
- = Can I display photos from more than one Instagram account in one single feed? =
163
-
164
- Yep. You can add multiple user names from the connected accounts on the plugin's Settings page, or directly in the shortcode, separated by commas, like so: `[instagram-feed user="smashballoon, instagramfeed"]`.
165
-
166
- = Does the plugin work with Instagram oEmbeds? =
167
-
168
- In version 2.5, support was added to allow the plugin to power your Instagram oEmbeds as official support for these is no longer available in WordPress core. Just connect your account on the oEmbeds settings page inside the plugin and we'll do the rest. No developer app or account required.
169
-
170
- = How do I find my Instagram Access Token and Instagram User ID =
171
-
172
- We've made it super easy. Simply click on the big blue button on the Instagram Feed Settings page and log into your Instagram account. The plugin will then ask if you'd like to connect the account and start using it in a feed.
173
-
174
- = My Instagram feed isn't displaying. Why not!? =
175
-
176
- There are a few common reasons for this:
177
-
178
- * **Your Access Token may not be valid.** Try clicking on the blue Instagram login button on the plugin's Settings page again and copy and paste the Instagram token it gives you into the plugin's Access Token field.
179
- * **The plugin's JavaScript file isn't being included in your page.** This is most likely because your WordPress theme is missing the WordPress [wp_footer](http://codex.wordpress.org/Function_Reference/wp_footer) function which is required for plugins to be able to add their JavaScript files to your page. You can fix this by opening your theme's **footer.php** file and adding the following directly before the closing </body> tag: `<?php wp_footer(); ?>`
180
- * **Your website may contain a JavaScript error which is preventing JavaScript from running.** The plugin uses JavaScript to load the Instagram photos into your page and so needs JavaScript to be running in order to work. You would need to remove any existing JavaScript errors on your website for the plugin to be able to load in your feed.
181
-
182
- If you're still having an issue displaying your feed then please open a ticket in the [Support forum](http://wordpress.org/support/plugin/instagram-feed 'Instagram Feed Support Forum') with a link to the page where you're trying to display the Instagram feed and, if possible, a link to your Instagram account.
183
-
184
- = Are there any security issues with using an Access Token on my site? =
185
-
186
- Nope. The Access Token used in the plugin is a "read only" token, which means that it could never be used maliciously to manipulate your Instagram account.
187
-
188
- = Can I view the full-size photos or play Instagram videos directly on my website? =
189
-
190
- This is a feature of the [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=faqs&utm_medium=fullsize 'Instagram Feed Pro') of the plugin, which allows you to view the photos in a pop-up lightbox, support videos, display captions, display photos by hashtag + more!
191
-
192
- = How do I embed my Instagram Feed directly into a WordPress page template? =
193
-
194
- You can embed your Instagram feed directly into a template file by using the WordPress [do_shortcode](http://codex.wordpress.org/Function_Reference/do_shortcode) function: `<?php echo do_shortcode('[instagram-feed]'); ?>`.
195
-
196
- = My Feed Stopped Working – All I see is a Loading Symbol =
197
-
198
- If your Instagram photos aren't loading and all your see is a loading symbol then there are a few common reasons:
199
-
200
- 1) There's an issue with the Instagram Access Token that you are using
201
-
202
- You can obtain a new Instagram Access Token on the Instagram Feed Settings page by clicking the blue Instagram login button and then copy and pasting it into the plugin's 'Access Token' field.
203
-
204
- Occasionally the blue Instagram login button does not produce a working access token. You can try [this link](https://smashballoon.com/instagram-feed/token/?utm_campaign=instagram-free-readme&utm_source=faqs&utm_medium=faqconnectionissue) as well.
205
-
206
- 2) The plugin's JavaScript file isn't being included in your page
207
-
208
- This is most likely because your WordPress theme is missing the WordPress wp_footer function which is required for plugins to be able to add their JavaScript files to your page. You can fix this by opening your theme's footer.php file and adding the following directly before the closing </body> tag:
209
-
210
- <?php wp_footer(); ?>
211
-
212
- 3) There's a JavaScript error on your site which is preventing the plugin's JavaScript file from running
213
-
214
- You find find out whether this is the case by right clicking on your page, selecting 'Inspect Element', and then clicking on the 'Console' tab, or by selecting the 'JavaScript Console' option from your browser's Developer Tools.
215
-
216
- If a JavaScript error is occurring on your site then you'll see it listed in red along with the JavaScript file which is causing it.
217
-
218
- 4) The feed you are trying to display has no Instagram posts
219
-
220
- If you are trying to display an Instagram feed that has no posts made to it, a loading symbol may be all that shows for the Instagram feed or nothing at all. Once you add an Instagram post the Instagram feed should display normally
221
-
222
- 5) The shortcode you are using is incorrect
223
-
224
- You may have an error in the Instagram Feed shortcode you are using or are missing a necessary argument.
225
-
226
- = What are the available shortcode options that I can use to customize my Instagram feed? =
227
-
228
- The below options are available on the Instagram Feed Settings page but can also be used directly in the `[instagram-feed]` shortcode to customize individual Instagram feeds on a feed-by-feed basis.
229
-
230
- * **General Options**
231
- * **user** - An Instagram User Name (must have account connected) - Example: `[instagram-feed user=AN_INSTAGRAM_USER_NAME]`
232
- * **width** - The width of your Instagram feed. Any number - Example: `[instagram-feed width=50]`
233
- * **widthunit** - The unit of the width of your Instagram feed. 'px' or '%' - Example: `[instagram-feed widthunit=%]`
234
- * **height** - The height of your Instagram feed. Any number - Example: `[instagram-feed height=250]`
235
- * **heightunit** - The unit of the height of your Instagram feed. 'px' or '%' - Example: `[instagram-feed heightunit=px]`
236
- * **background** - The background color of the Instagram feed. Any hex color code - Example: `[instagram-feed background=#ffff00]`
237
- * **class** - Add a CSS class to the Instagram feed container - Example: `[instagram-feed class=feedOne]`
238
- *
239
- * **Photo Options**
240
- * **sortby** - Sort the Instagram posts by Newest to Oldest (none) or Random (random) - Example: `[instagram-feed sortby=random]`
241
- * **num** - The number of Instagram posts to display initially. Maximum is 33 - Example: `[instagram-feed num=10]`
242
-
243
- * **cols** - The number of columns in your Instagram feed. 1 - 10 - Example: `[instagram-feed cols=5]`
244
- * **imageres** - The resolution/size of the Instagram photos. 'auto', full', 'medium' or 'thumb' - Example: `[instagram-feed imageres=full]`
245
- * **imagepadding** - The spacing around your Instagram photos - Example: `[instagram-feed imagepadding=10]`
246
- * **imagepaddingunit** - The unit of the padding in your Instagram feed. 'px' or '%' - Example: `[instagram-feed imagepaddingunit=px]`
247
- * **disablemobile** - Disable the mobile layout for your Instagram feed. 'true' or 'false' - Example: `[instagram-feed disablemobile=true]`
248
- *
249
- * **Header Options**
250
- * **showheader** - Whether to show the Instagram feed Header. 'true' or 'false' - Example: `[instagram-feed showheader=false]`
251
- * **showbio** - Whether to show the account's bio in the Instagram feed Header. 'true' or 'false' - Example: `[instagram-feed showbio=false]`
252
- * **custombio** - Custom Bio text for the Instagram feed Header - Example: `[instagram-feed custombio="My custom bio."]`
253
- * **customavatar** - URL of a custom Avatar for the header. Example: `[instagram-feed customavatar="https://my-site.com/avatar.jpg"]`
254
-
255
- * **headercolor** - The color of the Instagram feed Header text. Any hex color code - Example: `[instagram-feed headercolor=#333]`
256
- *
257
- * **'Load More' Button Options**
258
- * **showbutton** - Whether to show the 'Load More' button. 'true' or 'false' - Example: `[instagram-feed showbutton='false']`
259
- * **buttoncolor** - The background color of the button. Any hex color code - Example: `[instagram-feed buttoncolor=#000]`
260
- * **buttontextcolor** - The text color of the button. Any hex color code - Example: `[instagram-feed buttontextcolor=#fff]`
261
- * **buttontext** - The text used for the button - Example: `[instagram-feed buttontext="Load More Photos"]`
262
- *
263
- * **'Follow on Instagram' Button Options**
264
- * **showfollow** - Whether to show the 'Follow on Instagram' button. 'true' or 'false' - Example: `[instagram-feed showfollow=true]`
265
- * **followcolor** - The background color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followcolor=#ff0000]`
266
- * **followtextcolor** - The text color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followtextcolor=#fff]`
267
- * **followtext** - The text used for the 'Follow on Instagram' button - Example: `[instagram-feed followtext="Follow me"]`
268
-
269
- For more shortcode options, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=whatare&utm_medium=proshortcode 'Instagram Feed Pro').
270
-
271
- For more FAQs related to the Instagram Feed plugin please visit the [FAQ section](https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free-readme&utm_source=whatare&utm_medium=faqs 'Instagram Feed plugin FAQs') on our website.
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
281
-
282
- == Other Notes ==
283
-
284
- Add beautifully clean, customizable, and responsive Instagram feeds to your website. Super simple to set up and tons of customization options to seamlessly match the look and feel of your site.
285
-
286
- = Why do I need this? =
287
-
288
- **Increase Social Engagement**
289
- Increase engagement between you and your Instagram followers. Increase your number of Instagram followers by displaying your Instagram content directly on your site.
290
-
291
- **Save Time**
292
- Don't have time to update your photos on your site? Save time and increase efficiency by only posting your photos to Instagram and automatically displaying them on your website.
293
-
294
- **Display Your Content Your Way**
295
- Customize your Instagram feeds to look exactly the way you want, so that they blend seemlessly into your site or pop out at your visitors!
296
-
297
- **Keep Your Site Looking Fresh**
298
- Automatically push your new Instagram content straight to your site to keep it looking fresh and keeping your audience engaged.
299
-
300
- **No Coding Required**
301
- Choose from tons of built-in Instagram Feed customization options to create a truly unique feed of your Instagram content.
302
-
303
- **Super simple to set up**
304
- Once installed, you can be displaying your Instagram photos within 30 seconds! No confusing steps or Instagram Developer account needed.
305
-
306
- **Mind-blowing Customer Support**
307
- We understand that sometimes you need help, have issues or just have questions. We love our users and strive to provide the best support experience in the business. We're experts in the Instagram API and can provide unparalleled service and expertise. If you need support then just let us know and we'll get back to you right away.
308
-
309
- = What can it do? =
310
-
311
- * Display Instagram photos from any Instagram account you own.
312
- * Completely responsive and mobile ready –your Instagram feed layout looks great on any screen size and in any container width
313
- * Display multiple Instagram feeds on the same page or on different pages throughout your site by using our powerful Instagram Feed shortcode options
314
- * Display posts from multiple Instagram User IDs
315
- * Use the built-in shortcode options to completely customize each of your Instagram feeds
316
- * Infinitely load more of your Instagram photos with the 'Load More' button
317
- * Plus more features added all the time!
318
-
319
- = Completely Customizable =
320
-
321
- * By default the Instagram feed will adopt the style of your website, but can be completely customized to look however you like!
322
- * Set the number of Instagram photos you want to display
323
- * Choose how many columns to display your Instagram photos in and the size of the Instagram photos
324
- * Choose to show or hide certain parts of the Instagram feed, such as the header, 'Load More', and 'Follow' buttons
325
- * Control the width, height and background color of your Instagram feed
326
- * Set the spacing/padding between the Instagram photos
327
- * Display Instagram photos in chronological or random order
328
- * Use your own custom text and colors for the 'Load More' and 'Follow' buttons
329
- * Enter your own custom CSS or JavaScript for even deeper customization
330
- * Use the shortcode options to style multiple Instagram feeds in completely different ways
331
- * Plus more customization options added all the time!
332
-
333
- == Changelog ==
334
- = 2.9.9 =
335
- * Fix: The plugin will no longer continue to attempt to connect to the Instagram API if there is an access token encryption error.
336
- * Fix: Added a content type to JSON responses to improve reliability for loading more posts and creating local images.
337
-
338
- = 2.9.8 =
339
- * Tweak: Added a warning if the access token could not be decrypted for use in API requests.
340
- * Tweak: Added a fallback method to reach the Instagram API if a cURL error 6 error is detected.
341
- * Fix: Fixed an issue with connecting an additional business account if the first account listed was not selected.
342
-
343
- = 2.9.7 =
344
- * Tweak: A prompt will now be displayed if the ability to save settings requires a page refresh.
345
- * Fix: Fixed several accessibility issues in the admin area.
346
- * Fix: Made a significant number of code quality improvements.
347
-
348
- = 2.9.6 =
349
- * Fix: Periods and underscores in usernames when used as part of the shortcode would cause the load more button not to work.
350
- * Tweak: The WooCommerce orders post type will no longer be scanned for oembeds.
351
- * Tweak: An alert bubble will be added to the Instagram Feed menu item when there are new notifications available.
352
-
353
- = 2.9.5 =
354
- * Fix: Fixed an issue when reconnecting a personal account.
355
- * Fix: Using showheader="true" in the shortcode would not work if the related setting was disabled on the settings page.
356
- * Fix: Added additional plugin hardening.
357
-
358
- = 2.9.4 =
359
- * Tweak: All Instagram data is now encrypted in your WordPress database.
360
- * Tweak: Access Tokens are no longer able to be viewed on the settings page.
361
- * Tweak: Added a maximum caching time of 24 hours.
362
- * Tweak: Added an expiration time to backup caches.
363
- * Tweak: Deauthorizing our app inside your Instagram or Facebook account will now delete all data for that feed on your site.
364
-
365
- = 2.9.3.1 =
366
- * Fix: Fixed a problem with the image resizing table check that would cause blank images or non-optimized images to show in the feed.
367
-
368
- = 2.9.3 =
369
- * Fix: Fixed duplicate MySQL queries issue when checking for the resized images table.
370
- * Fix: Fixed an issue with the integration with the GDPR Cookie Consent plugin by WebToffee.
371
- * Fix: Removed max-height rule for the sbi_item elements to improve performance.
372
- * Tweak: Improved the reliability of the Instagram account connection process.
373
-
374
- = 2.9.2 =
375
- * Tested with WordPress 5.8 update.
376
- * Fix: PHP error "Uncaught Error: array_merge() does not accept unknown named parameters" when visiting the "About" page using PHP 8+.
377
- * Fix: About page was not recognizing that YouTube Feeds Pro was installed and active when prompting the user to activate a YouTube Feed plugin.
378
- * Fix: Fixed an issue with GDPR Cookie Consent by Web Toffee integration.
379
-
380
- = 2.9.1 =
381
- * Fix: Fixed several issues with GDPR Cookie Consent by Web Toffee integration.
382
- * Tweak: Changed how connected accounts errors display to prevent temporary, non-actionable errors from triggering a notice.
383
-
384
- = 2.9 =
385
- * New: Added support for IGTV posts. When creating an IGTV post, keep the "Post a Preview" setting enabled and the IGTV post will appear in your feed. IGTV posts are only available for connected Instagram business profiles and aren't available if you're using a personal Instagram profile in the plugin.
386
- * Fix: Fixed a PHP error when the HTTP request to refresh an access token resulted in an error.
387
-
388
- = 2.8.2 =
389
- * Fix: Changed how access tokens are retrieved to prevent conflict with the "Rank Math SEO" plugin when connecting an account.
390
- * Fix: Updated jQuery methods for compatibility with WordPress 5.7.
391
-
392
- = 2.8.1 =
393
- * Fix: Fixed a PHP warning which would display in some situations: "array_diff(): Expected parameter 1 to be an array, string given".
394
- * Fix: Fixed PHP warning "Undefined index: accesstoken" which would display when no primary account was selected.
395
- * Fix: Fixed issue where account errors were not being removed after an account was deleted or reconnected.
396
-
397
- = 2.8 =
398
- * New: The locations of the Instagram feeds on your site will now be logged and listed on a single page for easier management. After this feature has been active for awhile, a "Feed Finder" link will appear next to the Feed Type setting on the plugin Settings page which allows you to see a list of all feeds on your site along with their locations.
399
- * New: Local resized images will now include a 150x150 resolution version for each post.
400
- * Tweak: Locally saved image quality set to 80% to increase feed performance without a noticeable visual difference.
401
- * Tweak: Improved how posts are sorted by date when there are more than one user accounts in a feed.
402
- * Fix: Old accounts from Instagram's deprecated, non-functioning API are ignored if still connected.
403
-
404
- = 2.7 =
405
- * Tweak: Several performance improvements have been made in this update such as improved caching and fewer database queries when displaying feeds.
406
- * Tweak: The limit of resized, local images created and stored were raised for the overall number and the rate at which they could be created.
407
- * Tweak: Improved how feed errors are handled and reported. API request delays will only apply to feeds encountering errors and will not affect other feeds.
408
- * Tweak: Added a hook for disabling image resizing dynamically with PHP.
409
- * Fix: PHP Warning "required parameter follows optional parameter" that would display when using PHP 8+.
410
- * Fix: The GDPR feature would sometimes report errors when the feature was working fine.
411
-
412
- = 2.6.2 =
413
- * Tweak: If the image resizing feature isn't able to work successfully due to an issue, then the GDPR setting will be disabled unless manually enabled to prevent blank images in the feed.
414
- * Fix: In some situations the GDPR setting was incorrectly reporting an error with image resizing.
415
-
416
- = 2.6.1 =
417
- * Fix: Fixed PHP error related to a missing file.
418
-
419
- = 2.6 =
420
- * New: Integrations with popular GDPR cookie consent solutions added: Cookie Notice by dFactory, GDPR Cookie Consent by WebToffee, Cookiebot by Cybot A/S, Complianz by Really Simple Plugins, and Borlabs Cookie by Borlabs. Visit the Instagram Feed settings page, Customize tab, GDPR section for more information.
421
- * Fix: API error notices would not be removed from the WordPress dashboard after successfully reconnecting an account when the problem was resolved.
422
- * Fix: Fixed PHP Error that would occur when connecting a personal account that would result in an HTTP error.
423
- * Fix: oEmbeds were not always working in much older versions of WordPress.
424
- * Fix: Play and carousel icons would appear very large for small images when the the mobile layout was disabled.
425
-
426
- = 2.5.4 =
427
- * Fix: Added more debugging info to the System Info for oEmbeds.
428
- * Fix: Added a workaround for a rare issue where oEmbed access tokens wouldn't save.
429
- * Fix: Carousel posts would not show images when using the "Disable JS Image Loading" setting and image resizing was disabled.
430
-
431
- = 2.5.3 =
432
- * Fix: Fixed an issue caused by an unannounced Instagram API change affecting thumbnails in certain video posts which don't have image data available in the API.
433
- * Fix: Added oEmbed account info to the plugin "System Info" to make debugging easier.
434
-
435
- = 2.5.2 =
436
- * Fix: Fixed an issue with an Instagram API change causing some images not to display if the image resizing feature was disabled.
437
-
438
- = 2.5.1 =
439
- * Tweak: Minor update to footer.php template.
440
- * Tweak: Added support for improved notices on the plugin settings page.
441
- * Fix: Added aria-hidden="true" attribute to loader icon for better accessibility.
442
-
443
- = 2.5 =
444
- * New: Added support for Instagram oEmbeds. When you share a link to a Instagram post, WordPress automatically converts it into an embedded Instagram post for you (an "oEmbed"). However, on October 24, 2020, WordPress is discontinuing support for Instagram oEmbeds and so any existing or new embeds will no longer work. Don't worry though, we have your back! This update adds support for Instagram oEmbeds and so, after updating, the Instagram Feed plugin will automatically keep your oEmbeds working. It will also power any new oEmbeds you post going forward.
445
- * New: Install our other free social media plugins right from the Instagram Feed settings menu. Use our Facebook, YouTube, and Twitter plugins to add even more social content to your website and help further engage your viewers and increase your followers.
446
- * Tweak: Changed the names of the CSS and JavaScript files to prevent certain ad blockers from hiding the feed. Original files with original names still included in this update.
447
- * Tweak: Background caching and favoring local images are now the default settings for new installs.
448
- * Fix: Fixed PHP warning too few arguments when using Spanish translation files.
449
-
450
- = 2.4.7 =
451
- * Important: Due to recent Instagram changes, private accounts will need to be manually refreshed every 60 days. If you have a private Instagram account, consider making it public to avoid needing to manually reconnect your account.
452
- * New: Added a notice for accounts that are private which lets you know how long until the account needs to be refreshed. You will also be alerted using our admin notice and email notification system if a private account will soon need to be refreshed.
453
-
454
- = 2.4.6 =
455
- * New: Added a PHP hook "sbi_clear_page_caches" which allows you to dynamically disable the Instagram Feed code that clears caches created by common page caching plugins.
456
- * New: Added a PHP hook "sbi_resize_url" which allows you to change the default URL of locally stored images. This can be helpful for sites using CDNs.
457
- * Tweak: Added a workaround for the wp_json_encode function used in older versions of WordPress.
458
- * Fix: Compatibility updates for the upcoming WordPress version 5.5 release.
459
-
460
- = 2.4.5 =
461
- * Fix: Accounts can be connected without the use of JavaScript.
462
- * Fix: Default URL for connecting an account changed to prevent "Invalid Scope" connection issue.
463
-
464
- = 2.4.4 =
465
- * Fix: Workaround added for PHP warning related to an undefined media_url index.
466
- * Fix: Connecting a business account on a mobile device when more than 2 pages where returned was not possible.
467
- * Fix: After connecting an account, the warning that there were no connected accounts would still be visible.
468
- * Fix: URL for retrieving image files from Instagram using a redirect method was changed to prevent an extra, unnecessary redirect.
469
-
470
- = 2.4.3 =
471
- * Fix: The opt-in notice to help improve the plugin was not dismissing as expected for some sites due to the admin JavaScript file being cached by the browser.
472
- * Fix: Disabled the “About Us” page plugin installation if using a version of WordPress earlier than 4.6.
473
-
474
- = 2.4.2 =
475
- * New: To help us improve the plugin we've added the ability to opt-in to usage tracking so that we can understand what features and settings are being used, and which features matter to you the most. This is disabled by default and will only be enabled if you explictly choose to opt in. If opted in, the plugin will send a report in the background once per week with your plugin settings and basic information about your website environment. No personal or sensitive data is collected (such as email addresses, Instagram account information, license keys, etc). To enable or disable usage tracking at a later date use the setting at: Instagram Feed > Customize > Advanced > Misc > Enable Usage Tracking. See [here](https://smashballoon.com/instagram-feed/usage-tracking/) for more information.
476
- * Tweak: Added additional checks to make sure the HTTP protocol matches when using resized image URLs from the uploads folder.
477
- * Tweak: More information is given when there is an account connection error when connecting an account on the "Configure" page.
478
- * Tweak: Connecting a business account will permanently remove any accounts from the same user that are from the legacy Instagram API that is expiring in June.
479
- * Fix: Added a workaround for sanitize_textarea_field for users using an older version of WordPress.
480
- * Fix: Fixed HTML error causing the manually connect an account feature to not work.
481
- * Fix: Access token and account ID are validated and formatted before trying to manually connect an account to prevent errors.
482
-
483
- = 2.4.1 =
484
- * Tweak: User feeds that do not have a user name or ID assigned to them will automatically use the first connected account for the feed.
485
- * Tweak: rel="nofollow" added to all external Instagram Feed links found in the source of the page.
486
- * Fix: API Error #2 was not clearing properly in error reports.
487
-
488
- = 2.4 =
489
- * New: Email alerts for critical issues. If there's an issue with an Instagram feed on your website which hasn't been resolved yet then you'll receive an email notification to let you know. This is sent once per week until the issue is resolved. These emails can be disabled by using the following setting: Instagram Feed > Customize > Advanced > Misc > Feed Issue Email Report.
490
- * New: Admin notifications for critical issues. If there is an error with the feed, admins will see notices in the dashboard and on the front-end of the site along with instructions on how to resolve the issue. Front-end admin notifications can be disabled by using the following setting: Instagram Feed > Customize > Advanced > Misc > Disable Admin Error Notice.
491
- * New: Added a WordPress 'Site Health' integration. If there is a critical error with your feeds, it will now be flagged in the site health page.
492
- * New: Added "About Us" page for those who would like to learn more about Smash Balloon and our other products. Go to Instagram Feed -> About Us in the dashboard.
493
- * New: Added support for an Instagram Feed widget. When on the widgets menu, look for the widget "Instagram Feed" to add your feed to a widget area.
494
-
495
- = 2.3.1 =
496
- * Fix: Added workaround for personal account connection error and header display issue due to an Instagram API bug. After updating, click "Save Changes" on the Instagram Feed settings page, "Configure" tab to clear your cache.
497
-
498
- = 2.3 =
499
- * New: Added an "Instagram Feed" Gutenberg block to use in the block editor, allowing you to easily add a feed to posts and pages.
500
-
501
- = 2.2.2 =
502
- * Tested with upcoming WordPress 5.4 update.
503
- * Tweak: Language files updated to account for all new strings.
504
-
505
- = 2.2.1 =
506
- * Important: March 2 deadline for migrating to the new Instagram API pushed back to March 31.
507
- * Fix: Some links to Instagram were missing a backslash at the end of the URL causing a 301 redirect.
508
- * Fix: Error saving updated account information caused by emoji in account bio or in account names and MySQL tables that didn't have a UTF8mb4 character set.
509
-
510
- = 2.2 =
511
- * Important: On March 31, Instagram will stop supporting its old API which will disrupt feeds created from personal connected accounts. If you are using a personal account, you will need to reconnect the account on the Instagram Feed Settings page. Please [see here](https://smashballoon.com/instagram-api-changes-march-2-2020/) for more information.
512
- * New: Support added for the new Instagram Basic Display API.
513
- * New: Added PHP hooks 'sbi_before_feed' and 'sbi_after_feed' for displaying HTML before and after the main Instagram feed HTML.
514
- * New: Added settings for adding a custom header avatar and custom header bio text. Go to the "Customize" tab "Header" area to set these or use customavatar="AVATAR URL" or custombio="BIO TEXT" in the shortcode.
515
- * Tweak: Warnings and messages displaying on the front end of sites now display at the top of the feed.
516
- * Tweak: Header template changed to accommodate missing data if connected as a personal account to the new API.
517
- * Tweak: Changes to feed.php, header.php, and item.php templates.
518
- * Tweak: Added CSS to prevent some themes from adding box shadows and bottom border when hovering over the header.
519
- * Tweak: Added code to clear page caching from Litespeed cache when clearing page caches with the plugin.
520
- * Tweak: Header and follow button will still be displayed when number of posts is set to 0.
521
- * Fix: Emoji in the first few characters of a caption would cause the main post image to switch to an emoji when loading more.
522
- * Fix: Pagination for "tagged" feeds not working for certain accounts.
523
-
524
- = 2.1.5 =
525
- * New: Added aria-label attributes to SVGs for improved accessibility.
526
- * Tweak: Changed screen reader and alt text to be more SEO friendly (change made to item.php template).
527
- * Tweak: Added PHP hooks to use custom alt and screen reader text.
528
- * Fix: Image resolution setting option "Medium" dimensions changed from 306x306 to 320x320.
529
- * Fix: Screen reader text would be visible if text was right aligned.
530
- * Fix: Incorrect image resolution would be used when setting the image resolution to something other than auto.
531
-
532
- = 2.1.4 =
533
- * Tweak: If sb_instagram_js_options is not defined, a default object is set.
534
- * Tweak: Added a text link in the settings page footer to our new free [YouTube plugin](https://wordpress.org/plugins/feeds-for-youtube/)
535
- * Fix: Local images not being used when available in certain circumstances.
536
-
537
- = 2.1.3 =
538
- * New: Added filter "sbi_settings_pages_capability" to change what permission is needed to access settings pages.
539
- * Tweak: Updated language files for version 2.0+.
540
- * Tweak: Better error messages for no posts being found and API request delays.
541
- * Tweak: If "Favor Local Images" setting is in use, a 640px resolution image will be created for images coming from a personal account.
542
- * Tweak: Better error recovery when image file not found when viewing the feed.
543
- * Tweak: Button and input field styling updated to look better with WordPress 5.3.
544
- * Fix: Accounts that were connected prior to version 1.12 would not show the follow button if the header was not also displayed. Visit the "Configure" tab to have the account automatically updated.
545
- * Fix: MySQL error when retrieving resized images. Thanks [the-louie](https://github.com/the-louie)!
546
- * Fix: When using the new Twenty Twenty theme, Instagram icon in "follow" button displaying as block and causing the button text to appear on a new line.
547
-
548
- = 2.1.2 =
549
- * New: Added setting "API request size" on the "Customize" tab to allow requesting of more posts than are in the feed. Setting this to a high number will prevent no posts being found if you often post IG TV posts and use a personal account.
550
- * Tweak: Removed width and height attributes from the image element in the feed to prevent notices about serving scaled images in optimization tools.
551
-
552
- = 2.1.1 =
553
- * New: Added ability to enqueue the CSS file through the shortcode. This loads the file in the footer of the site, and only on pages that include a feed. Enable on the "Customize" tab.
554
- * Tweak: Resized images can be used in the page source code when "Disable js image loading" setting is enabled.
555
- * Fix: HTML for header would still be visible in the source of the page when removing the header using showheader=false in the shortcode.
556
-
557
- = 2.1 =
558
- * New: Added the ability to overwrite default templates in your theme. View [this article](https://smashballoon.com/guide-to-creating-custom-templates/) for more information.
559
- * New: Added several PHP hooks for modifying feeds settings and functionality.
560
- * Fix: Using the "Load Initial Posts with AJAX" setting would cause images to not resize with the browser window.
561
- * Fix: Added back language files for translations.
562
- * Fix: Changing the image resolution setting would not change the image size.
563
- * Fix: Follow button would not show if there was no connected account.
564
- * Fix: Deleting any connected account will delete any connected accounts that have errors in the data that was saved for them.
565
-
566
- = 2.0.2 =
567
- * Fix: HTML for header would still be visible in the source of the page when removing the header using showheader=false in the shortcode
568
- * Fix: CSS added to prevent layout issues when adding the feed to a "text" widget for certain themes
569
-
570
- = 2.0.1 =
571
- * Tweak: Force cache of major caching plugins to clear when updating plugin to avoid issues with previous CSS/JavaScript files being cached
572
- * Tweak: Added version number to the end of JavaScript and CSS files to clear browser caches that are causing errors
573
- * Fix: Added back filter to allow using shortcode in a custom HTML widget
574
- * Fix: Added back settings to display bio information in header and change header size which were mistakenly removed in the last update
575
- * Fix: Fixed a PHP notice which might display under certain circumstances
576
-
577
- = 2.0 =
578
- * **MAJOR UDPATE**
579
- * New: We've rebuilt the plugin from the ground up with a focus on performance and reliability. Your feeds are now loaded from the server using PHP removing the reliance on AJAX.
580
- * New: Local copies of images are now automatically stored on your server and used in your feed. You can disable this feature in the "Advanced" section of the "Customize" tab. Use the "Favor Local Images" setting on the "Customize" tab, "Advanced" sub-tab to have the plugin use local images whenever available, thus removing reliance on the Instagram CDN.
581
- * New: You can now set the plugin to check for new Instagram posts in the background rather than when the page loads by using the new "Background caching" option which utilizes the WordPress "cron" feature. Enable this using the "Check for new posts" setting on the "Configure" tab.
582
- * New: If you have a business account for Instagram, you can now connect to the new Instagram API. You can continue to use your connected personal account and do not need to connect a business account.
583
-
584
- = 1.12.2 =
585
- * Fix: Fixed error from Instagram when connecting a personal account.
586
-
587
- = 1.12.1 =
588
- * Tweak: If an image in a post fails to load then the plugin attempts to load it from another image source
589
-
590
- = 1.12 =
591
- * Fix: Includes fixes for some security vulnerabilities. Thanks to Julio Potier of [SecuPress](https://secupress.me/) for reporting the issues.
592
- * Fix: Fixed an issue caused by a bug in the Instagram API which was preventing some Instagram accounts from being able to be connected. If you experienced an issue connecting an Instagram account then please try again after updating.
593
- * Fix: Quotes represented by "%20" in Instagram data were causing a JSON parsing error.
594
- * Tweak: Data for the feed is now cached outside of the admin-ajax.php calls.
595
-
596
- = 1.11.3 =
597
- * Fix: Escaped single quotes causing a JSON parse error under certain circumstances.
598
- * Fix: Translatable code errors in the admin area causing some text to not be translatable.
599
-
600
- = 1.11.2 =
601
- * Fix: Unable to connect new accounts due to changes with Instagram's API. Remote requests to connect accounts are now made server-side.
602
-
603
- = 1.11.1 =
604
- * Fix: Feed would not load from a cache created with an older version of the plugin
605
- * Fix: Fixed PHP warning trying to count string length of an array
606
-
607
- = 1.11 =
608
- * New: Added capability "manage_instagram_feed_options" to support customizations that will allow users/roles other than the administrator to access Instagram Feed settings pages.
609
- * Fix: rel="noopener" added to all links that contain target="blank"
610
- * Fix: HTTPS used in xlmns attribute for SVGs
611
- * Fix: Fixed issues with strings in the admin area being translatable
612
- * Fix: Fixed a potential security vulnerability. Thanks to [Martin Verreault](https://egyde.ca/) for reporting the issue.
613
-
614
- = 1.10.2 =
615
- * Confirmed compatibility with the upcoming WordPress 5.0 "Gutenberg" update
616
- * Fix: Fixed an issue caused by some themes which affected the formatting of the 'Load More' and 'Follow' buttons
617
- * Fix: Fixed an occasional formatting issue with error messages due to no line-height being set
618
- * Fix: Minor admin UI fixes
619
- * Tweak: Removed mention of some Pro features which will be deprecated due to upcoming Instagram API changes
620
-
621
- = 1.10.1 =
622
- * Tweak: Automatic image resolution detection setting now works better with wide images. Resizing the browser will now automatically raise the image resolution if needed.
623
- * Fix: Fixed an issue where the Load More button would disappear if all posts for a feed were cached.
624
-
625
- = 1.10 =
626
- * New: We've made improvements to the way photos are loaded into the feed, adding a smooth transition to display photos subtly rather than suddenly.
627
- * New: More header sizes; you can now choose from three sizes: small, medium, and large. Change this on the "Customize" tab.
628
- * Fix: Using a percent for the image padding was causing the height of images to be too tall
629
- * Fix: Removed a PHP notice when the Instagram API was blocked by the web host
630
-
631
- = 1.9.1 =
632
- * Fix: Captions missing as "alt" text for Instagram images.
633
- * Fix: System information was not formatting connected Instagram accounts and user ids correctly
634
- * Fix: "Unauthorized redirect URL" error occurring while trying to connect a new Instagram account due to recent changes from Instagram
635
- * Fix: Using a percent for the image padding was causing the height of Instagram images to be to tall
636
-
637
- = 1.9 =
638
- * New: Retrieving Access Tokens and connecting multiple Instagram accounts is now easier using our improved interface for managing account information. While on the Configure tab, click on the big blue button to connect an account, or use the "Manually Connect an Account" option to connect one using an existing Access Token. Once an account is connected, you can use the associated buttons to either add it to your primary Instagram User feed or to a different Instagram feed on your site using the `user` shortcode option, eg: `user=smashballoon`.
639
- * Tweak: Disabled auto load in the database for backup caches
640
- * Fix: Fixed an occasional issue with the Instagram login flow which would result in an "Unauthorized redirect URL" error
641
-
642
- = 1.8.3 =
643
- * Fix: SVG icons caused some display problems in IE 11
644
- * Fix: Removed support for using usernames in the Instagram User ID setting due to recent API changes. Will now default to the Instagram User ID attached to the Access Token.
645
- * Fix: Backup feed not always being used when Access Tokens expire
646
- * Fix: Instagram Access Tokens may have been incorrectly saved as invalid under certain circumstances
647
-
648
- = 1.8.2 =
649
- * Tweak: Setting "Cache Error API Recheck" enabled by default for new Instagram Feed installs
650
- * Fix: Page caches created with the WP Rocket plugin will be cleared when the Instagram Feed settings are updated or the cache is forced to clear
651
- * Fix: Fixed a rare issue where feeds were displaying "Looking for cache that doesn't exist" when page caching was not being used
652
-
653
- = 1.8.1 =
654
- * Fix: Fixed issue where Instagram feeds were displaying "Looking for cache that doesn't exist" when page caching was not being used
655
- * Fix: Font method setting not working when "Are you using an ajax theme?" setting is enabled
656
-
657
- = 1.8 =
658
- * Important: Due to [recent changes](https://smashballoon.com/instagram-api-changes-april-4-2018/?utm_campaign=instagram-free-readme&utm_source=changelog&utm_medium=apichanges) in the Instagram API it is no longer possible to display photos from other Instagram accounts which are not your own. You can only display the user feed of the account which is associated with your Access Token.
659
- * New: Added an Access Token shortcode option and support for multiple Instagram Access Tokens. If you own multiple Instagram accounts then you can now use multiple Access Tokens in order to display user feeds from each Instagram account, either in separate feeds, or in the same feed. Just use the `accesstoken` shortcode option. See [this FAQ](https://smashballoon.com/display-multiple-instagram-feeds/#multiple-user-feeds) for more information on displaying multiple User feeds.
660
-
661
- = 1.7 =
662
- * New: Added feed caching to limit the number of Instagram API requests. Use the setting on the "Configure" tab "Check for new posts every" to set how long feed data will be cached before refreshing.
663
- * New: Added backup caching for all feeds. If the Instagram feed is unable to display then a backup feed will be shown to visitors if one is available. The backup cache can be disabled or cleared by using the following setting: `Customize > Misc > Enable Backup Caching`.
664
- * New: Icons are now generated as SVGs for a sharper look and more semantic markup
665
- * New: Instagram carousel posts include an icon to indicate that they are carousel posts
666
- * Tweak: Using the "sort posts by random" feature will include the most recent 33 posts instead of just the posts shown in the Instagram feed
667
- * Fix: links back to instagram.com will use the "www" prefix
668
-
669
- = 1.6.2 =
670
- * Fix: Fixed a rare issue where the Load More button wouldn't be displayed after the last update if the Instagram account didn't have many posts
671
-
672
- = 1.6.1 =
673
- * Fix: Fixed Font Awesome 5.0 causing Instagram icon to appear as a question mark with a circle
674
- * Fix: Fixed inline padding style for sbi_images element causing validation error when set to "0" or blank space
675
- * Fix: Added a workaround for an Instagram API bug which caused some feeds to show fewer posts than expected
676
-
677
- = 1.6 =
678
- * New: Loading icon appears when waiting for new posts after clicking the "Load More..." button
679
- * New: Added translation files for Dutch (nl_NL)
680
- * Fix: Fixed a potential security vulnerability. Thanks to [Magnus Stubman](http://dumpco.re/) for reporting the issue.
681
-
682
- = 1.5.1 =
683
- * New: The plugin is now compatible with the [WPML plugin](https://wpml.org/) allowing you to use multiple translations for your feeds on your multi-language sites
684
- * New: Added translation files for Danish (da_DK), Finnish (fi_FL), Japanese (ja_JP), Norwegian (nn_NO), Portuguese (pt_PT), and Swedish (sv_SE) to translate the "Load More" and "Follow on Instagram" text
685
-
686
- = 1.5 =
687
- * New: Improved tool for retrieving Instagram Access Tokens
688
- * New: Added an option to show/hide Instagram bio text in feed header
689
- * New: Feeds that include IDs from "private" Instagram accounts will now ignore the private data and display a message to logged-in site admins which indicates that one of the Instagram accounts is private
690
- * New: Feeds without any Instagram posts yet will display a message informing logged-in admins to make a post on Instagram in order to view the feed
691
- * New: Added translation files for French (fr_FR), German (de_DE), English (en_EN), Spanish (es_ES), Italian (it_IT), and Russian (ru_RU) to translate "Load More..." and "Follow on Instagram"
692
- * Tweak: Optimized several images used in the Instagram feed including loader.png
693
- * Tweak: Font Awesome stylesheet handle has been renamed so it will only be loaded once if our Custom Facebook Feed plugin is also active
694
- * Fix: Updated the Font Awesome icon font to the latest version: 4.7.0
695
- * Fix: Padding removed from "Load More" button if no buttons are being used in the Instagram feed
696
- * Fix: All links in the feed are now https
697
- * Fix: Fixed JavaScript errors which were being caused if the Instagram Access Token had expired or the user ID was incorrect, private, or had no Instagram posts
698
-
699
- = 1.4.9 =
700
- * Compatible with WordPress 4.8
701
-
702
- = 1.4.8 =
703
- * Tweak: Updated plugin links for new WordPress.org repo
704
- * Fix: Minor bug fixes
705
-
706
- = 1.4.7 =
707
- * Fix: Fixed a security vulnerabiliy
708
- * Tested with upcoming WordPress 4.6 update
709
-
710
- = 1.4.6.2 =
711
- * Fix: Removed a comment from the plugin's JavaScript file which was causing an issue with some optimization plugins, such as Autoptimize.
712
-
713
- = 1.4.6.1 =
714
- * Fix: Fixed an issue with the Instagram image URLs which was resulting in inconsistent url references in some feeds
715
-
716
- = 1.4.6 =
717
- * **IMPORTANT: Due to the recent Instagram API changes, in order for the Instagram Feed plugin to continue working after June 1st you must obtain a new Access Token by using the Instagram button on the plugin's Settings page.** This is true even if you recently already obtained a new token. Apologies for any inconvenience.
718
-
719
- = 1.4.5 =
720
- * New: When you click on the name of a setting on the plugins Settings pages it now displays the shortcode option for that setting, making it easier to find the option that you need
721
- * New: Added a setting to disable the Font Awesome icon font if needed. This can be found under the Misc tab at the bottom of the Customize page.
722
- * Tweak: Updated the Instagram icon to match their new branding
723
- * Tweak: Added a help link next to the Instagram login button in case there's an issue using it
724
- * Fix: Updated the Font Awesome icon font to the latest version: 4.6.3
725
-
726
- = 1.4.4 =
727
- * Fix: Fixed an issue caused by a specific type of emoji which would cause the feed to break when used in a post
728
- * Tweak: Added links to our other **free** plugins to the bottom of the admin pages: [The Custom Facebook Feed](https://wordpress.org/plugins/custom-facebook-feed/) and [Custom Twitter Feeds](https://wordpress.org/plugins/custom-twitter-feeds/)
729
-
730
- = 1.4.3 =
731
- * Fix: Important notice added in the last update is now only visible to admins
732
-
733
- = 1.4.2 =
734
- * New: Compatible with Instagram's new API changes effective June 1st
735
- * New: Added video icons to Instagram posts in the feed which contain videos
736
- * New: Added a setting to allow you to use a fixed pixel width for the feed on desktop but switch to a 100% width responsive layout on mobile
737
- * Tweak: Added a width and height attribute to the images to help improve Google PageSpeed score
738
- * Tweak: A few minor UI tweaks on the settings pages
739
- * Fix: Minified CSS and JS files
740
-
741
- = 1.3.11 =
742
- * Fix: Fixed a bug which was causing the height of the Instagram photos to be shorter than they should have been in some themes
743
- * Fix: Fixed an issue where when an Instagram feed was initially hidden (in a tab, for example) then the Instagram photo resolution was defaulting to 'thumbnail'
744
-
745
- = 1.3.10 =
746
- * Fix: Fixed an issue which was setting the visibility of some Instagram photos to be hidden in certain browsers
747
- * Fix: The new square photo cropping is no longer being applied to Instagram feeds displaying images at less than 150px wide as the images from Instagram at this size are already square cropped
748
- * Fix: Fixed a JavaScript error in Internet Explorer 8 caused by the 'addEventListener' function not being supported
749
-
750
- = 1.3.9 =
751
- * Fix: Fixed an issue where Instagram photos wouldn't appear in the Instagram feed if it was initially being hidden inside of a tab or some other element
752
- * Fix: Fixed an issue where the new Instagram image cropping fuction was failing to run on some sites and causing the Instagram images to appear as blank
753
-
754
- = 1.3.8 =
755
- * Fix: If you have uploaded an Instagram photo in portrait or landscape then the plugin will now display the square cropped version of the photo in your Instagram feed
756
-
757
- = 1.3.7 =
758
- * Fix: Fixed an issue with double quotes in photo captions (used in the Instagram photo alt tags) which caused a formatting issue
759
-
760
- = 1.3.6 =
761
- * Fix: Fixed an issue introduced in version 1.3.4 which was causing theme settings to not be applied in some themes
762
-
763
- = 1.3.5 =
764
- * Fix: Reverted the 'prop' function introduced in the last update back to 'attr' as prop isn't supported in older versions of jQuery
765
- * Fix: Removed the image load function as it was causing Instagram images not to be displayed for some users
766
-
767
- = 1.3.4 =
768
- * Fix: Used the Instagram photo caption to add a more descriptive alt tag to the Instagram photos
769
- * Fix: Instagram photos are now only displayed once they're fully loaded
770
- * Fix: Added a stricter CSS implementation for some elements to prevent styles being overridden by themes
771
- * Fix: Added CSS opacity property to Instagram images to prevent issues with lazy loading in some themes
772
- * Fix: Removed a line of code which was disabling WordPress Debug/Error Reporting. If needed, this can be disabled again by using the setting at the bottom of the plugin's 'Customize' settings page.
773
- * Fix: Made some JavaScript improvements to the core Instagram Feed plugin code
774
-
775
- = 1.3.3 =
776
- * Fix: Fixed an issue with the 'Load more' button not always showing when displaying Instagram photos from multiple Instagram User IDs
777
- * Fix: Moved the initiating sbi_init function outside of the jQuery ready function so that it can be called externally if needed by Ajax powered themes/plugins
778
-
779
- = 1.3.2 =
780
- * New: Added an option to disable the Instagram Feed mobile layout
781
- * New: Added an setting which allows you to use the Instagram Feed plugin with an Ajax powered theme
782
- * New: Added a 'class' shortcode option which allows you to add a CSS to class to each individual Instagram feed: `[instagram-feed class=feedOne]`
783
- * New: Added a Support tab which contains System Info to help with troubleshooting
784
- * New: Added friendly error messages which display only to WordPress admins
785
- * New: Added validation to the Instagram User ID field to prevent usernames being entered instead of IDs
786
- * Tweak: Made the Instagram Access Token field slightly wider to prevent tokens being copy and pasted incorrectly
787
- * Fix: Fixed a JavaScript bug which caused the feed not to load photos correctly in IE8
788
-
789
- = 1.3.1 =
790
- * Fix: Fixed an issue with the Instagram icon not appearing in the 'Follow on Instagram' button or in the Instagram Feed header
791
- * Fix: Addressed a few CSS issues which were causing some minor formatting issues in the Instagram Feed on certain themes
792
-
793
- = 1.3 =
794
- * New: You can now display Instagram photos from multiple Instagram User IDs. Simply separate your Instagram IDs by commas.
795
- * New: Added an optional header to the Instagram feed which contains your Instagram profile picture, Instagram username and Instagram bio. You can activate this on the Instagram Feed Customize page.
796
- * New: The Instagram Feed plugin now includes an 'Auto-detect' option for the Instagram Image Resolution setting which will automatically set the correct Instagram image resolution based on the size of your Instagram feed.
797
- * New: Added an optional 'Follow on Instagram' button which can be displayed at the bottom of your Instagram feed. You can activate this on the Instagram Feed Customize page.
798
- * New: Added the ability to use your own custom text for the 'Load More' button
799
- * New: Added a loader icon to indicate that the Instagram photos are loading
800
- * New: Added a unique ID to each Instagram photo so that they can be targeted individually via CSS
801
- * Tweak: Added a subtle fade effect to the Instagram photos when hovering over them
802
- * Tweak: Improved the responsive layout behavior of the Instagram feed
803
- * Tweak: Improved the documentation within the Instagram Feed plugin settings pages
804
- * Tweak: Included a link to [step-by-step setup directions](http//:smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free-readme&utm_source=changelog&utm_medium=changelog 'Instagram feed setup directions') for the plugin
805
- * Fix: Fixed an issue with the feed not clearing other widgets correctly
806
-
807
- = 1.2.3 =
808
- * Fix: Replaced the 'on' function with the 'click' function to increase compatibility with themes using older versions of jQuery
809
-
810
- = 1.2.2 =
811
- * Tweak: Added an initialize function to the Instagram Feed plugin
812
- * Fix: Fixed an occasional issue with the 'Sort Photos By' option being undefined
813
-
814
- = 1.2.1 =
815
- * Fix: Fixed a minor issue with the Custom JavaScript being run before the Instagram photos are loaded
816
- * Fix: Removed stray PHP notices
817
- * Fix: Changed the double quotes to single quotes on the 'data-options' attribute
818
-
819
- = 1.2 =
820
- * New: Added Custom CSS and Custom JavaScript sections which allow you to add your own custom CSS and JavaScript to the Instagram Feed plugin
821
- * New: Added an option to display your Instagram photos in random order
822
- * New: A new tabbed layout has been implemented on the Instagram Feed plugin's settings pages
823
- * New: Added an option to preserve your Instagram Feed settings when uninstalling the plugin
824
- * New: Added a [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=changelog&utm_medium=changelog 'Instagram Feed Pro') of the Instagram Feed plugin which allows you to display Instagram photos by hashtag, display Instagram captions, view Instagram photos in a pop-up lightbox, show the number of Instagram likes & comments and more
825
- * Tweak: The 'Load More' button now automatically hides if there are no more Instagram photos to load
826
- * Tweak: Added a small gap to the top of the 'Load More' button
827
- * Tweak: Added a icon to the Instagram Feed menu item
828
-
829
- = 1.1.6 =
830
- * Fix: A maximum width is now only applied to the Instagram feed when the Instagram photos are displayed in one column
831
-
832
- = 1.1.5 =
833
- * Fix: Added a line of code which enables shortcodes to be used in widgets for themes which don't have it enabled
834
-
835
- = 1.1.4 =
836
- * Fix: Fixed an issue with the Instagram Access Token and Instagram User ID retrieval functionality in certain web browsers
837
-
838
- = 1.1.3 =
839
- * Fix: Fixed an issue with the maximum Instagram image width
840
- * Fix: Corrected a typo in the Instagram Feed Shortcode Options table
841
-
842
- = 1.1.1 =
843
- * Pre-tested for the upcoming WordPress 4.0 update
844
- * Fix: Fixed an uncommon issue related to the output of the Instagram content
845
-
846
- = 1.1 =
847
- * New: Added an option to set the number of Instagram photos to be initially displayed
848
- * New: Added an option to show or hide the 'Load More' button
849
- * New: Added 'Step 3' to the Instagram Feed Settings page explaining how to display your feed using the [instagram-feed] shortcode
850
- * New: Added a full list of all available Instagram Feed shortcode options to help you if customizing multiple Instagram feeds
851
-
852
- = 1.0.2 =
853
- * Fix: Fixed an issue with the Instagram login URL on the plugin's Instagram Feed Settings page
854
-
855
- = 1.0.1 =
856
- * Fix: Fixed an issue with the Instagram Feed 'Load More' button opening an empty browser window in Firefox
857
-
858
- = 1.0 =
859
- * Launched the Instagram Feed plugin!
 
 
 
1
+ === Smash Balloon Social Photo Feed ===
2
+ 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.9
6
+ Stable tag: 2.9.10
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Formerly "Instagram Feed". Display clean, customizable, and responsive Instagram feeds from multiple accounts. Supports Instagram oEmbeds.
11
+
12
+ == Description ==
13
+
14
+ Display Instagram posts from your Instagram accounts, either in the same single feed or in multiple different ones.
15
+
16
+ = Features =
17
+ * **New:** Now automatically powers your **Instagram oEmbeds**
18
+ * Super **simple to set up**
19
+ * Display photos from **multiple Instagram accounts** in the same feed or in separate feeds
20
+ * Completely **responsive** and mobile ready - layout looks great on any screen size and in any container width
21
+ * **Completely customizable** - Customize the width, height, number of photos, number of columns, image size, background color, image spacing and more!
22
+ * Display **multiple Instagram feeds** on the same page or on different pages throughout your site
23
+ * **GDPR Compliance** - automatically integrates with many of the popular GDPR cookie consent plugins and includes a 1-click easy GDPR setting.
24
+ * Use the built-in **shortcode options** to completely customize each of your Instagram feeds
25
+ * Display thumbnail, medium or **full-size photos** from your Instagram feed
26
+ * **Infinitely load more** of your Instagram photos with the 'Load More' button
27
+ * Includes a **Follow on Instagram button** at the bottom of your feed
28
+ * Display a **beautiful header** at the top of your feed
29
+ * Display your Instagram photos chronologically or in random order
30
+ * Add your own Custom CSS and JavaScript for even deeper customizations
31
+ * Handy block for easily adding your feed to posts and pages using the block editor
32
+
33
+ = Benefits =
34
+ * **Increase Social Engagement** - Increase engagement between you and your Instagram followers. Increase your number of followers by displaying your Instagram content directly on your site.
35
+ * **Save Time** - Don't have time to update your photos on your site? Save time and increase efficiency by only posting your photos to Instagram and automatically displaying them on your website
36
+ * **Display Your Content Your Way** - Customize your Instagram feeds to look exactly the way you want, so that they blend seemlessly into your site or pop out at your visitors!
37
+ * **Keep Your Site Looking Fresh** - Automatically push your new Instagram content straight to your site to keep it looking fresh and keeping your audience engaged.
38
+ * **Super simple to set up** - Once installed, you can be displaying your Instagram photos within 30 seconds! No confusing steps or Instagram Developer account needed.
39
+ * **Powers all Instagram oEmbeds on your site** - With WordPress removing support for Instagram oEmbeds, the plugin will now power all Instagram embeds on your site, old and new, to allow them to continue working.
40
+
41
+ = Pro Version =
42
+ In order to maintain the free version of the plugin on an ongoing basis, and to provide quick and effective support for free, we offer a Pro version of the plugin. The Pro version allows you to:
43
+ * Display Hashtag feeds
44
+ * View photos and videos in a popup lightbox directly on your site
45
+ * View post comments for user feeds
46
+ * Display the number of like and comments for each post
47
+ * Create carousels from your posts
48
+ * Use "Masonry" or "Highlight" layouts for your feeds
49
+ * Display captions for photos and videos
50
+ * Filter posts based on hashtag/word
51
+ * Advanced moderation system for hiding/showing certain posts
52
+ * Block posts by specific users
53
+ * Create "shoppable" Instagram feeds, and more.
54
+
55
+ [Find out more about the Pro version](https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=proversion&utm_medium=profindout "Instagram Feed Pro") or [try out the Pro demo](https://smashballoon.com/instagram-feed/demo/?utm_campaign=instagram-free-readme&utm_source=proversion&utm_medium=readmedemo "Instagram Feed Pro Demo").
56
+
57
+ = Featured Reviews =
58
+ "**Simple and concise** - Excellent plugin. Simple and non-bloated. I had a couple small issues with the plugin when I first started using it, but a quick comment on the support forums got a new version pushed out the next day with the fix. Awesome support!" - [Josh Jones](https://wordpress.org/support/topic/simple-and-concise-3 'Simple and concise Instagram plugin')
59
+
60
+ "**Great plugin, greater support!** - I've definitely noticed an increase in followers on Instagram since I added this plugin to my sidebar. Thanks for the help in making some adjustments...looks and works great!" - [BNOTP](https://wordpress.org/support/topic/thanks-for-a-great-plugin-6 'Great plugin, greater Support!')
61
+
62
+ = Feedback or Support =
63
+ We're dedicated to providing the most customizable, robust and well supported Instagram feed plugin in the world, so if you have an issue or have any feedback on how to improve the plugin then please open a ticket in the [Support forum](http://wordpress.org/support/plugin/instagram-feed 'Instagram Feed Support Forum').
64
+
65
+ For a pop-up photo **lightbox**, to display posts by **hashtag**, show photo **captions**, **video** support + more, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=feedbacj&utm_medium=support 'Instagram Feed Pro').
66
+
67
+ == Installation ==
68
+
69
+ 1. Install the Instagram Feed plugin either via the WordPress plugin directory, or by uploading the files to your web server (in the `/wp-content/plugins/` directory).
70
+ 2. Activate the Instagram Feed plugin through the 'Plugins' menu in WordPress.
71
+ 3. Navigate to the 'Instagram Feed' settings page to connect your Instagram account.
72
+ 4. Use the shortcode `[instagram-feed]` in your page, post or widget to display your Instagram photos.
73
+ 5. You can display multiple Instagram feeds by using shortcode options, for example: `[instagram-feed num=6 cols=3]`
74
+
75
+ For simple step-by-step directions on how to set up the Instagram Feed plugin please refer to our [setup guide](http://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free-readme&utm_source=installation&utm_medium=setup 'Instagram Feed setup guide').
76
+
77
+ = Display your Feed =
78
+
79
+ **Single Instagram Feed**
80
+
81
+ Copy and paste the following shortcode directly into the page, post or widget where you'd like the Instagram feed to show up: `[instagram-feed]`
82
+
83
+ **Multiple Instagram Feeds**
84
+
85
+ If you'd like to display multiple Instagram feeds then you can set different settings directly in the shortcode like so: `[instagram-feed num=9 cols=3]`
86
+
87
+ If you'd like to display feed from more than one account, connect multiple accounts on the "Configure" tab and then add the user name in the shortcode: `[instagram-feed user="ANOTHER_USER_NAME"]`
88
+
89
+ You can display as many different Instagram feeds as you like, on either the same page or on different pages, by just using the shortcode options below. For example:
90
+ `[instagram-feed]`
91
+ `[instagram-feed user="ANOTHER_USER_NAME"]`
92
+ `[instagram-feed user="ANOTHER_USER_NAME, YET_ANOTHER_USER_NAME" num=4 cols=4 showfollow=false]`
93
+
94
+ See the table below for a full list of available shortcode options:
95
+
96
+ = Shortcode Options =
97
+ * **General Options**
98
+ * **user** - An Instagram User Name (must have account connected) - Example: `[instagram-feed user=AN_INSTAGRAM_USER_NAME]`
99
+ * **width** - The width of your Instagram feed. Any number - Example: `[instagram-feed width=50]`
100
+ * **widthunit** - The unit of the width of your Instagram feed. 'px' or '%' - Example: `[instagram-feed widthunit=%]`
101
+ * **height** - The height of your Instagram feed. Any number - Example: `[instagram-feed height=250]`
102
+ * **heightunit** - The unit of the height of your Instagram feed. 'px' or '%' - Example: `[instagram-feed heightunit=px]`
103
+ * **background** - The background color of the Instagram feed. Any hex color code - Example: `[instagram-feed background=#ffff00]`
104
+ * **class** - Add a CSS class to the Instagram feed container - Example: `[instagram-feed class=feedOne]`
105
+ *
106
+ * **Photo Options**
107
+ * **sortby** - Sort the Instagram posts by Newest to Oldest (none) or Random (random) - Example: `[instagram-feed sortby=random]`
108
+ * **num** - The number of Instagram posts to display initially. Maximum is 33 - Example: `[instagram-feed num=10]`
109
+
110
+ * **cols** - The number of columns in your Instagram feed. 1 - 10 - Example: `[instagram-feed cols=5]`
111
+ * **imageres** - The resolution/size of the Instagram photos. 'auto', full', 'medium' or 'thumb' - Example: `[instagram-feed imageres=full]`
112
+ * **imagepadding** - The spacing around your Instagram photos - Example: `[instagram-feed imagepadding=10]`
113
+ * **imagepaddingunit** - The unit of the padding in your Instagram feed. 'px' or '%' - Example: `[instagram-feed imagepaddingunit=px]`
114
+ * **disablemobile** - Disable the mobile layout for your Instagram feed. 'true' or 'false' - Example: `[instagram-feed disablemobile=true]`
115
+ *
116
+ * **Header Options**
117
+ * **showheader** - Whether to show the Instagram feed Header. 'true' or 'false' - Example: `[instagram-feed showheader=false]`
118
+ * **showbio** - Whether to show the account's bio in the Instagram feed Header. 'true' or 'false' - Example: `[instagram-feed showbio=false]`
119
+ * **custombio** - Custom Bio text for the Instagram feed Header - Example: `[instagram-feed custombio="My custom bio."]`
120
+ * **customavatar** - URL of a custom Avatar for the header. Example: `[instagram-feed customavatar="https://my-site.com/avatar.jpg"]`
121
+
122
+ * **headercolor** - The color of the Instagram feed Header text. Any hex color code - Example: `[instagram-feed headercolor=#333]`
123
+ *
124
+ * **'Load More' Button Options**
125
+ * **showbutton** - Whether to show the 'Load More' button. 'true' or 'false' - Example: `[instagram-feed showbutton='false']`
126
+ * **buttoncolor** - The background color of the button. Any hex color code - Example: `[instagram-feed buttoncolor=#000]`
127
+ * **buttontextcolor** - The text color of the button. Any hex color code - Example: `[instagram-feed buttontextcolor=#fff]`
128
+ * **buttontext** - The text used for the button - Example: `[instagram-feed buttontext="Load More Photos"]`
129
+ *
130
+ * **'Follow on Instagram' Button Options**
131
+ * **showfollow** - Whether to show the 'Follow on Instagram' button. 'true' or 'false' - Example: `[instagram-feed showfollow=true]`
132
+ * **followcolor** - The background color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followcolor=#ff0000]`
133
+ * **followtextcolor** - The text color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followtextcolor=#fff]`
134
+ * **followtext** - The text used for the 'Follow on Instagram' button - Example: `[instagram-feed followtext="Follow me"]`
135
+
136
+ For more shortcode options, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=shortcode&utm_medium=shortcodepro 'Instagram Feed Pro').
137
+
138
+ = Setting up the Free Instagram Feed WordPress Plugin =
139
+
140
+ 1) Once you've installed the Instagram Feed plugin click on the Instagram Feed item in your WordPress menu
141
+
142
+ 2) Click on the large blue Instagram button to log into your Instagram account and connect your Instagram account. If you're having trouble retrieving your Instagram information from Instagram then try using the Instagram button on [this page](https://smashballoon.com/instagram-feed/token/?utm_campaign=instagram-free-readme&utm_source=settingup&utm_medium=connectionproblem) instead.
143
+
144
+ You can also display photos from other Instagram accounts by connecting additional Instagram accounts and adding the user name in the shortcode.
145
+
146
+ 3) Navigate to the Instagram Feed customize page to customize your Instagram feed.
147
+
148
+ 4) Once you've customized your Instagram feed, click on the Display Your Feed tab to grab the [instagram-feed] shortcode.
149
+
150
+ 5) Copy the Instagram Feed shortcode and paste it into any page, post or widget where you want the Instagram feed to appear.
151
+
152
+ 6) You can paste the Instagram Feed shortcode directly into your page editor.
153
+
154
+ 7) You can use the default WordPress 'Text' widget to display your Instagram Feed in a sidebar or other widget area.
155
+
156
+ == Frequently Asked Questions ==
157
+
158
+ = Can I display multiple Instagram feeds on my site or on the same page? =
159
+
160
+ Yep. You can display multiple Instagram feeds by using our built-in shortcode options, for example: `[instagram-feed user="smashballoon" cols=3]`. Be sure to connect the related Instagram account on the "Configure" tab.
161
+
162
+ = Can I display photos from more than one Instagram account in one single feed? =
163
+
164
+ Yep. You can add multiple user names from the connected accounts on the plugin's Settings page, or directly in the shortcode, separated by commas, like so: `[instagram-feed user="smashballoon, instagramfeed"]`.
165
+
166
+ = Does the plugin work with Instagram oEmbeds? =
167
+
168
+ In version 2.5, support was added to allow the plugin to power your Instagram oEmbeds as official support for these is no longer available in WordPress core. Just connect your account on the oEmbeds settings page inside the plugin and we'll do the rest. No developer app or account required.
169
+
170
+ = How do I find my Instagram Access Token and Instagram User ID =
171
+
172
+ We've made it super easy. Simply click on the big blue button on the Instagram Feed Settings page and log into your Instagram account. The plugin will then ask if you'd like to connect the account and start using it in a feed.
173
+
174
+ = My Instagram feed isn't displaying. Why not!? =
175
+
176
+ There are a few common reasons for this:
177
+
178
+ * **Your Access Token may not be valid.** Try clicking on the blue Instagram login button on the plugin's Settings page again and copy and paste the Instagram token it gives you into the plugin's Access Token field.
179
+ * **The plugin's JavaScript file isn't being included in your page.** This is most likely because your WordPress theme is missing the WordPress [wp_footer](http://codex.wordpress.org/Function_Reference/wp_footer) function which is required for plugins to be able to add their JavaScript files to your page. You can fix this by opening your theme's **footer.php** file and adding the following directly before the closing </body> tag: `<?php wp_footer(); ?>`
180
+ * **Your website may contain a JavaScript error which is preventing JavaScript from running.** The plugin uses JavaScript to load the Instagram photos into your page and so needs JavaScript to be running in order to work. You would need to remove any existing JavaScript errors on your website for the plugin to be able to load in your feed.
181
+
182
+ If you're still having an issue displaying your feed then please open a ticket in the [Support forum](http://wordpress.org/support/plugin/instagram-feed 'Instagram Feed Support Forum') with a link to the page where you're trying to display the Instagram feed and, if possible, a link to your Instagram account.
183
+
184
+ = Are there any security issues with using an Access Token on my site? =
185
+
186
+ Nope. The Access Token used in the plugin is a "read only" token, which means that it could never be used maliciously to manipulate your Instagram account.
187
+
188
+ = Can I view the full-size photos or play Instagram videos directly on my website? =
189
+
190
+ This is a feature of the [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=faqs&utm_medium=fullsize 'Instagram Feed Pro') of the plugin, which allows you to view the photos in a pop-up lightbox, support videos, display captions, display photos by hashtag + more!
191
+
192
+ = How do I embed my Instagram Feed directly into a WordPress page template? =
193
+
194
+ You can embed your Instagram feed directly into a template file by using the WordPress [do_shortcode](http://codex.wordpress.org/Function_Reference/do_shortcode) function: `<?php echo do_shortcode('[instagram-feed]'); ?>`.
195
+
196
+ = My Feed Stopped Working – All I see is a Loading Symbol =
197
+
198
+ If your Instagram photos aren't loading and all your see is a loading symbol then there are a few common reasons:
199
+
200
+ 1) There's an issue with the Instagram Access Token that you are using
201
+
202
+ You can obtain a new Instagram Access Token on the Instagram Feed Settings page by clicking the blue Instagram login button and then copy and pasting it into the plugin's 'Access Token' field.
203
+
204
+ Occasionally the blue Instagram login button does not produce a working access token. You can try [this link](https://smashballoon.com/instagram-feed/token/?utm_campaign=instagram-free-readme&utm_source=faqs&utm_medium=faqconnectionissue) as well.
205
+
206
+ 2) The plugin's JavaScript file isn't being included in your page
207
+
208
+ This is most likely because your WordPress theme is missing the WordPress wp_footer function which is required for plugins to be able to add their JavaScript files to your page. You can fix this by opening your theme's footer.php file and adding the following directly before the closing </body> tag:
209
+
210
+ <?php wp_footer(); ?>
211
+
212
+ 3) There's a JavaScript error on your site which is preventing the plugin's JavaScript file from running
213
+
214
+ You find find out whether this is the case by right clicking on your page, selecting 'Inspect Element', and then clicking on the 'Console' tab, or by selecting the 'JavaScript Console' option from your browser's Developer Tools.
215
+
216
+ If a JavaScript error is occurring on your site then you'll see it listed in red along with the JavaScript file which is causing it.
217
+
218
+ 4) The feed you are trying to display has no Instagram posts
219
+
220
+ If you are trying to display an Instagram feed that has no posts made to it, a loading symbol may be all that shows for the Instagram feed or nothing at all. Once you add an Instagram post the Instagram feed should display normally
221
+
222
+ 5) The shortcode you are using is incorrect
223
+
224
+ You may have an error in the Instagram Feed shortcode you are using or are missing a necessary argument.
225
+
226
+ = What are the available shortcode options that I can use to customize my Instagram feed? =
227
+
228
+ The below options are available on the Instagram Feed Settings page but can also be used directly in the `[instagram-feed]` shortcode to customize individual Instagram feeds on a feed-by-feed basis.
229
+
230
+ * **General Options**
231
+ * **user** - An Instagram User Name (must have account connected) - Example: `[instagram-feed user=AN_INSTAGRAM_USER_NAME]`
232
+ * **width** - The width of your Instagram feed. Any number - Example: `[instagram-feed width=50]`
233
+ * **widthunit** - The unit of the width of your Instagram feed. 'px' or '%' - Example: `[instagram-feed widthunit=%]`
234
+ * **height** - The height of your Instagram feed. Any number - Example: `[instagram-feed height=250]`
235
+ * **heightunit** - The unit of the height of your Instagram feed. 'px' or '%' - Example: `[instagram-feed heightunit=px]`
236
+ * **background** - The background color of the Instagram feed. Any hex color code - Example: `[instagram-feed background=#ffff00]`
237
+ * **class** - Add a CSS class to the Instagram feed container - Example: `[instagram-feed class=feedOne]`
238
+ *
239
+ * **Photo Options**
240
+ * **sortby** - Sort the Instagram posts by Newest to Oldest (none) or Random (random) - Example: `[instagram-feed sortby=random]`
241
+ * **num** - The number of Instagram posts to display initially. Maximum is 33 - Example: `[instagram-feed num=10]`
242
+
243
+ * **cols** - The number of columns in your Instagram feed. 1 - 10 - Example: `[instagram-feed cols=5]`
244
+ * **imageres** - The resolution/size of the Instagram photos. 'auto', full', 'medium' or 'thumb' - Example: `[instagram-feed imageres=full]`
245
+ * **imagepadding** - The spacing around your Instagram photos - Example: `[instagram-feed imagepadding=10]`
246
+ * **imagepaddingunit** - The unit of the padding in your Instagram feed. 'px' or '%' - Example: `[instagram-feed imagepaddingunit=px]`
247
+ * **disablemobile** - Disable the mobile layout for your Instagram feed. 'true' or 'false' - Example: `[instagram-feed disablemobile=true]`
248
+ *
249
+ * **Header Options**
250
+ * **showheader** - Whether to show the Instagram feed Header. 'true' or 'false' - Example: `[instagram-feed showheader=false]`
251
+ * **showbio** - Whether to show the account's bio in the Instagram feed Header. 'true' or 'false' - Example: `[instagram-feed showbio=false]`
252
+ * **custombio** - Custom Bio text for the Instagram feed Header - Example: `[instagram-feed custombio="My custom bio."]`
253
+ * **customavatar** - URL of a custom Avatar for the header. Example: `[instagram-feed customavatar="https://my-site.com/avatar.jpg"]`
254
+
255
+ * **headercolor** - The color of the Instagram feed Header text. Any hex color code - Example: `[instagram-feed headercolor=#333]`
256
+ *
257
+ * **'Load More' Button Options**
258
+ * **showbutton** - Whether to show the 'Load More' button. 'true' or 'false' - Example: `[instagram-feed showbutton='false']`
259
+ * **buttoncolor** - The background color of the button. Any hex color code - Example: `[instagram-feed buttoncolor=#000]`
260
+ * **buttontextcolor** - The text color of the button. Any hex color code - Example: `[instagram-feed buttontextcolor=#fff]`
261
+ * **buttontext** - The text used for the button - Example: `[instagram-feed buttontext="Load More Photos"]`
262
+ *
263
+ * **'Follow on Instagram' Button Options**
264
+ * **showfollow** - Whether to show the 'Follow on Instagram' button. 'true' or 'false' - Example: `[instagram-feed showfollow=true]`
265
+ * **followcolor** - The background color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followcolor=#ff0000]`
266
+ * **followtextcolor** - The text color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followtextcolor=#fff]`
267
+ * **followtext** - The text used for the 'Follow on Instagram' button - Example: `[instagram-feed followtext="Follow me"]`
268
+
269
+ For more shortcode options, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=whatare&utm_medium=proshortcode 'Instagram Feed Pro').
270
+
271
+ For more FAQs related to the Instagram Feed plugin please visit the [FAQ section](https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free-readme&utm_source=whatare&utm_medium=faqs 'Instagram Feed plugin FAQs') on our website.
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
281
+
282
+ == Other Notes ==
283
+
284
+ Add beautifully clean, customizable, and responsive Instagram feeds to your website. Super simple to set up and tons of customization options to seamlessly match the look and feel of your site.
285
+
286
+ = Why do I need this? =
287
+
288
+ **Increase Social Engagement**
289
+ Increase engagement between you and your Instagram followers. Increase your number of Instagram followers by displaying your Instagram content directly on your site.
290
+
291
+ **Save Time**
292
+ Don't have time to update your photos on your site? Save time and increase efficiency by only posting your photos to Instagram and automatically displaying them on your website.
293
+
294
+ **Display Your Content Your Way**
295
+ Customize your Instagram feeds to look exactly the way you want, so that they blend seemlessly into your site or pop out at your visitors!
296
+
297
+ **Keep Your Site Looking Fresh**
298
+ Automatically push your new Instagram content straight to your site to keep it looking fresh and keeping your audience engaged.
299
+
300
+ **No Coding Required**
301
+ Choose from tons of built-in Instagram Feed customization options to create a truly unique feed of your Instagram content.
302
+
303
+ **Super simple to set up**
304
+ Once installed, you can be displaying your Instagram photos within 30 seconds! No confusing steps or Instagram Developer account needed.
305
+
306
+ **Mind-blowing Customer Support**
307
+ We understand that sometimes you need help, have issues or just have questions. We love our users and strive to provide the best support experience in the business. We're experts in the Instagram API and can provide unparalleled service and expertise. If you need support then just let us know and we'll get back to you right away.
308
+
309
+ = What can it do? =
310
+
311
+ * Display Instagram photos from any Instagram account you own.
312
+ * Completely responsive and mobile ready –your Instagram feed layout looks great on any screen size and in any container width
313
+ * Display multiple Instagram feeds on the same page or on different pages throughout your site by using our powerful Instagram Feed shortcode options
314
+ * Display posts from multiple Instagram User IDs
315
+ * Use the built-in shortcode options to completely customize each of your Instagram feeds
316
+ * Infinitely load more of your Instagram photos with the 'Load More' button
317
+ * Plus more features added all the time!
318
+
319
+ = Completely Customizable =
320
+
321
+ * By default the Instagram feed will adopt the style of your website, but can be completely customized to look however you like!
322
+ * Set the number of Instagram photos you want to display
323
+ * Choose how many columns to display your Instagram photos in and the size of the Instagram photos
324
+ * Choose to show or hide certain parts of the Instagram feed, such as the header, 'Load More', and 'Follow' buttons
325
+ * Control the width, height and background color of your Instagram feed
326
+ * Set the spacing/padding between the Instagram photos
327
+ * Display Instagram photos in chronological or random order
328
+ * Use your own custom text and colors for the 'Load More' and 'Follow' buttons
329
+ * Enter your own custom CSS or JavaScript for even deeper customization
330
+ * Use the shortcode options to style multiple Instagram feeds in completely different ways
331
+ * Plus more customization options added all the time!
332
+
333
+ == Changelog ==
334
+ = 2.9.10 =
335
+ * Fix: Fixed a bug related to feed data being removed in the event a feed hadn't been updated in 21 days even when it was in use.
336
+
337
+ = 2.9.9 =
338
+ * Fix: Prevented the plugin from attempting to connect to the Instagram API if there was an access token encryption error.
339
+ * Fix: Added a content type to JSON responses to improve reliability for loading more posts and creating local images.
340
+
341
+ = 2.9.8 =
342
+ * Tweak: Added a warning if the access token could not be decrypted for use in API requests.
343
+ * Tweak: Added a fallback method to reach the Instagram API if a cURL error 6 error is detected.
344
+ * Fix: Fixed an issue with connecting an additional business account if the first account listed was not selected.
345
+
346
+ = 2.9.7 =
347
+ * Tweak: A prompt will now be displayed if the ability to save settings requires a page refresh.
348
+ * Fix: Fixed several accessibility issues in the admin area.
349
+ * Fix: Made a significant number of code quality improvements.
350
+
351
+ = 2.9.6 =
352
+ * Fix: Periods and underscores in usernames when used as part of the shortcode would cause the load more button not to work.
353
+ * Tweak: The WooCommerce orders post type will no longer be scanned for oembeds.
354
+ * Tweak: An alert bubble will be added to the Instagram Feed menu item when there are new notifications available.
355
+
356
+ = 2.9.5 =
357
+ * Fix: Fixed an issue when reconnecting a personal account.
358
+ * Fix: Using showheader="true" in the shortcode would not work if the related setting was disabled on the settings page.
359
+ * Fix: Added additional plugin hardening.
360
+
361
+ = 2.9.4 =
362
+ * Tweak: All Instagram data is now encrypted in your WordPress database.
363
+ * Tweak: Access Tokens are no longer able to be viewed on the settings page.
364
+ * Tweak: Added a maximum caching time of 24 hours.
365
+ * Tweak: Added an expiration time to backup caches.
366
+ * Tweak: Deauthorizing our app inside your Instagram or Facebook account will now delete all data for that feed on your site.
367
+
368
+ = 2.9.3.1 =
369
+ * Fix: Fixed a problem with the image resizing table check that would cause blank images or non-optimized images to show in the feed.
370
+
371
+ = 2.9.3 =
372
+ * Fix: Fixed duplicate MySQL queries issue when checking for the resized images table.
373
+ * Fix: Fixed an issue with the integration with the GDPR Cookie Consent plugin by WebToffee.
374
+ * Fix: Removed max-height rule for the sbi_item elements to improve performance.
375
+ * Tweak: Improved the reliability of the Instagram account connection process.
376
+
377
+ = 2.9.2 =
378
+ * Tested with WordPress 5.8 update.
379
+ * Fix: PHP error "Uncaught Error: array_merge() does not accept unknown named parameters" when visiting the "About" page using PHP 8+.
380
+ * Fix: About page was not recognizing that YouTube Feeds Pro was installed and active when prompting the user to activate a YouTube Feed plugin.
381
+ * Fix: Fixed an issue with GDPR Cookie Consent by Web Toffee integration.
382
+
383
+ = 2.9.1 =
384
+ * Fix: Fixed several issues with GDPR Cookie Consent by Web Toffee integration.
385
+ * Tweak: Changed how connected accounts errors display to prevent temporary, non-actionable errors from triggering a notice.
386
+
387
+ = 2.9 =
388
+ * New: Added support for IGTV posts. When creating an IGTV post, keep the "Post a Preview" setting enabled and the IGTV post will appear in your feed. IGTV posts are only available for connected Instagram business profiles and aren't available if you're using a personal Instagram profile in the plugin.
389
+ * Fix: Fixed a PHP error when the HTTP request to refresh an access token resulted in an error.
390
+
391
+ = 2.8.2 =
392
+ * Fix: Changed how access tokens are retrieved to prevent conflict with the "Rank Math SEO" plugin when connecting an account.
393
+ * Fix: Updated jQuery methods for compatibility with WordPress 5.7.
394
+
395
+ = 2.8.1 =
396
+ * Fix: Fixed a PHP warning which would display in some situations: "array_diff(): Expected parameter 1 to be an array, string given".
397
+ * Fix: Fixed PHP warning "Undefined index: accesstoken" which would display when no primary account was selected.
398
+ * Fix: Fixed issue where account errors were not being removed after an account was deleted or reconnected.
399
+
400
+ = 2.8 =
401
+ * New: The locations of the Instagram feeds on your site will now be logged and listed on a single page for easier management. After this feature has been active for awhile, a "Feed Finder" link will appear next to the Feed Type setting on the plugin Settings page which allows you to see a list of all feeds on your site along with their locations.
402
+ * New: Local resized images will now include a 150x150 resolution version for each post.
403
+ * Tweak: Locally saved image quality set to 80% to increase feed performance without a noticeable visual difference.
404
+ * Tweak: Improved how posts are sorted by date when there are more than one user accounts in a feed.
405
+ * Fix: Old accounts from Instagram's deprecated, non-functioning API are ignored if still connected.
406
+
407
+ = 2.7 =
408
+ * Tweak: Several performance improvements have been made in this update such as improved caching and fewer database queries when displaying feeds.
409
+ * Tweak: The limit of resized, local images created and stored were raised for the overall number and the rate at which they could be created.
410
+ * Tweak: Improved how feed errors are handled and reported. API request delays will only apply to feeds encountering errors and will not affect other feeds.
411
+ * Tweak: Added a hook for disabling image resizing dynamically with PHP.
412
+ * Fix: PHP Warning "required parameter follows optional parameter" that would display when using PHP 8+.
413
+ * Fix: The GDPR feature would sometimes report errors when the feature was working fine.
414
+
415
+ = 2.6.2 =
416
+ * Tweak: If the image resizing feature isn't able to work successfully due to an issue, then the GDPR setting will be disabled unless manually enabled to prevent blank images in the feed.
417
+ * Fix: In some situations the GDPR setting was incorrectly reporting an error with image resizing.
418
+
419
+ = 2.6.1 =
420
+ * Fix: Fixed PHP error related to a missing file.
421
+
422
+ = 2.6 =
423
+ * New: Integrations with popular GDPR cookie consent solutions added: Cookie Notice by dFactory, GDPR Cookie Consent by WebToffee, Cookiebot by Cybot A/S, Complianz by Really Simple Plugins, and Borlabs Cookie by Borlabs. Visit the Instagram Feed settings page, Customize tab, GDPR section for more information.
424
+ * Fix: API error notices would not be removed from the WordPress dashboard after successfully reconnecting an account when the problem was resolved.
425
+ * Fix: Fixed PHP Error that would occur when connecting a personal account that would result in an HTTP error.
426
+ * Fix: oEmbeds were not always working in much older versions of WordPress.
427
+ * Fix: Play and carousel icons would appear very large for small images when the the mobile layout was disabled.
428
+
429
+ = 2.5.4 =
430
+ * Fix: Added more debugging info to the System Info for oEmbeds.
431
+ * Fix: Added a workaround for a rare issue where oEmbed access tokens wouldn't save.
432
+ * Fix: Carousel posts would not show images when using the "Disable JS Image Loading" setting and image resizing was disabled.
433
+
434
+ = 2.5.3 =
435
+ * Fix: Fixed an issue caused by an unannounced Instagram API change affecting thumbnails in certain video posts which don't have image data available in the API.
436
+ * Fix: Added oEmbed account info to the plugin "System Info" to make debugging easier.
437
+
438
+ = 2.5.2 =
439
+ * Fix: Fixed an issue with an Instagram API change causing some images not to display if the image resizing feature was disabled.
440
+
441
+ = 2.5.1 =
442
+ * Tweak: Minor update to footer.php template.
443
+ * Tweak: Added support for improved notices on the plugin settings page.
444
+ * Fix: Added aria-hidden="true" attribute to loader icon for better accessibility.
445
+
446
+ = 2.5 =
447
+ * New: Added support for Instagram oEmbeds. When you share a link to a Instagram post, WordPress automatically converts it into an embedded Instagram post for you (an "oEmbed"). However, on October 24, 2020, WordPress is discontinuing support for Instagram oEmbeds and so any existing or new embeds will no longer work. Don't worry though, we have your back! This update adds support for Instagram oEmbeds and so, after updating, the Instagram Feed plugin will automatically keep your oEmbeds working. It will also power any new oEmbeds you post going forward.
448
+ * New: Install our other free social media plugins right from the Instagram Feed settings menu. Use our Facebook, YouTube, and Twitter plugins to add even more social content to your website and help further engage your viewers and increase your followers.
449
+ * Tweak: Changed the names of the CSS and JavaScript files to prevent certain ad blockers from hiding the feed. Original files with original names still included in this update.
450
+ * Tweak: Background caching and favoring local images are now the default settings for new installs.
451
+ * Fix: Fixed PHP warning too few arguments when using Spanish translation files.
452
+
453
+ = 2.4.7 =
454
+ * Important: Due to recent Instagram changes, private accounts will need to be manually refreshed every 60 days. If you have a private Instagram account, consider making it public to avoid needing to manually reconnect your account.
455
+ * New: Added a notice for accounts that are private which lets you know how long until the account needs to be refreshed. You will also be alerted using our admin notice and email notification system if a private account will soon need to be refreshed.
456
+
457
+ = 2.4.6 =
458
+ * New: Added a PHP hook "sbi_clear_page_caches" which allows you to dynamically disable the Instagram Feed code that clears caches created by common page caching plugins.
459
+ * New: Added a PHP hook "sbi_resize_url" which allows you to change the default URL of locally stored images. This can be helpful for sites using CDNs.
460
+ * Tweak: Added a workaround for the wp_json_encode function used in older versions of WordPress.
461
+ * Fix: Compatibility updates for the upcoming WordPress version 5.5 release.
462
+
463
+ = 2.4.5 =
464
+ * Fix: Accounts can be connected without the use of JavaScript.
465
+ * Fix: Default URL for connecting an account changed to prevent "Invalid Scope" connection issue.
466
+
467
+ = 2.4.4 =
468
+ * Fix: Workaround added for PHP warning related to an undefined media_url index.
469
+ * Fix: Connecting a business account on a mobile device when more than 2 pages where returned was not possible.
470
+ * Fix: After connecting an account, the warning that there were no connected accounts would still be visible.
471
+ * Fix: URL for retrieving image files from Instagram using a redirect method was changed to prevent an extra, unnecessary redirect.
472
+
473
+ = 2.4.3 =
474
+ * Fix: The opt-in notice to help improve the plugin was not dismissing as expected for some sites due to the admin JavaScript file being cached by the browser.
475
+ * Fix: Disabled the “About Us” page plugin installation if using a version of WordPress earlier than 4.6.
476
+
477
+ = 2.4.2 =
478
+ * New: To help us improve the plugin we've added the ability to opt-in to usage tracking so that we can understand what features and settings are being used, and which features matter to you the most. This is disabled by default and will only be enabled if you explictly choose to opt in. If opted in, the plugin will send a report in the background once per week with your plugin settings and basic information about your website environment. No personal or sensitive data is collected (such as email addresses, Instagram account information, license keys, etc). To enable or disable usage tracking at a later date use the setting at: Instagram Feed > Customize > Advanced > Misc > Enable Usage Tracking. See [here](https://smashballoon.com/instagram-feed/usage-tracking/) for more information.
479
+ * Tweak: Added additional checks to make sure the HTTP protocol matches when using resized image URLs from the uploads folder.
480
+ * Tweak: More information is given when there is an account connection error when connecting an account on the "Configure" page.
481
+ * Tweak: Connecting a business account will permanently remove any accounts from the same user that are from the legacy Instagram API that is expiring in June.
482
+ * Fix: Added a workaround for sanitize_textarea_field for users using an older version of WordPress.
483
+ * Fix: Fixed HTML error causing the manually connect an account feature to not work.
484
+ * Fix: Access token and account ID are validated and formatted before trying to manually connect an account to prevent errors.
485
+
486
+ = 2.4.1 =
487
+ * Tweak: User feeds that do not have a user name or ID assigned to them will automatically use the first connected account for the feed.
488
+ * Tweak: rel="nofollow" added to all external Instagram Feed links found in the source of the page.
489
+ * Fix: API Error #2 was not clearing properly in error reports.
490
+
491
+ = 2.4 =
492
+ * New: Email alerts for critical issues. If there's an issue with an Instagram feed on your website which hasn't been resolved yet then you'll receive an email notification to let you know. This is sent once per week until the issue is resolved. These emails can be disabled by using the following setting: Instagram Feed > Customize > Advanced > Misc > Feed Issue Email Report.
493
+ * New: Admin notifications for critical issues. If there is an error with the feed, admins will see notices in the dashboard and on the front-end of the site along with instructions on how to resolve the issue. Front-end admin notifications can be disabled by using the following setting: Instagram Feed > Customize > Advanced > Misc > Disable Admin Error Notice.
494
+ * New: Added a WordPress 'Site Health' integration. If there is a critical error with your feeds, it will now be flagged in the site health page.
495
+ * New: Added "About Us" page for those who would like to learn more about Smash Balloon and our other products. Go to Instagram Feed -> About Us in the dashboard.
496
+ * New: Added support for an Instagram Feed widget. When on the widgets menu, look for the widget "Instagram Feed" to add your feed to a widget area.
497
+
498
+ = 2.3.1 =
499
+ * Fix: Added workaround for personal account connection error and header display issue due to an Instagram API bug. After updating, click "Save Changes" on the Instagram Feed settings page, "Configure" tab to clear your cache.
500
+
501
+ = 2.3 =
502
+ * New: Added an "Instagram Feed" Gutenberg block to use in the block editor, allowing you to easily add a feed to posts and pages.
503
+
504
+ = 2.2.2 =
505
+ * Tested with upcoming WordPress 5.4 update.
506
+ * Tweak: Language files updated to account for all new strings.
507
+
508
+ = 2.2.1 =
509
+ * Important: March 2 deadline for migrating to the new Instagram API pushed back to March 31.
510
+ * Fix: Some links to Instagram were missing a backslash at the end of the URL causing a 301 redirect.
511
+ * Fix: Error saving updated account information caused by emoji in account bio or in account names and MySQL tables that didn't have a UTF8mb4 character set.
512
+
513
+ = 2.2 =
514
+ * Important: On March 31, Instagram will stop supporting its old API which will disrupt feeds created from personal connected accounts. If you are using a personal account, you will need to reconnect the account on the Instagram Feed Settings page. Please [see here](https://smashballoon.com/instagram-api-changes-march-2-2020/) for more information.
515
+ * New: Support added for the new Instagram Basic Display API.
516
+ * New: Added PHP hooks 'sbi_before_feed' and 'sbi_after_feed' for displaying HTML before and after the main Instagram feed HTML.
517
+ * New: Added settings for adding a custom header avatar and custom header bio text. Go to the "Customize" tab "Header" area to set these or use customavatar="AVATAR URL" or custombio="BIO TEXT" in the shortcode.
518
+ * Tweak: Warnings and messages displaying on the front end of sites now display at the top of the feed.
519
+ * Tweak: Header template changed to accommodate missing data if connected as a personal account to the new API.
520
+ * Tweak: Changes to feed.php, header.php, and item.php templates.
521
+ * Tweak: Added CSS to prevent some themes from adding box shadows and bottom border when hovering over the header.
522
+ * Tweak: Added code to clear page caching from Litespeed cache when clearing page caches with the plugin.
523
+ * Tweak: Header and follow button will still be displayed when number of posts is set to 0.
524
+ * Fix: Emoji in the first few characters of a caption would cause the main post image to switch to an emoji when loading more.
525
+ * Fix: Pagination for "tagged" feeds not working for certain accounts.
526
+
527
+ = 2.1.5 =
528
+ * New: Added aria-label attributes to SVGs for improved accessibility.
529
+ * Tweak: Changed screen reader and alt text to be more SEO friendly (change made to item.php template).
530
+ * Tweak: Added PHP hooks to use custom alt and screen reader text.
531
+ * Fix: Image resolution setting option "Medium" dimensions changed from 306x306 to 320x320.
532
+ * Fix: Screen reader text would be visible if text was right aligned.
533
+ * Fix: Incorrect image resolution would be used when setting the image resolution to something other than auto.
534
+
535
+ = 2.1.4 =
536
+ * Tweak: If sb_instagram_js_options is not defined, a default object is set.
537
+ * Tweak: Added a text link in the settings page footer to our new free [YouTube plugin](https://wordpress.org/plugins/feeds-for-youtube/)
538
+ * Fix: Local images not being used when available in certain circumstances.
539
+
540
+ = 2.1.3 =
541
+ * New: Added filter "sbi_settings_pages_capability" to change what permission is needed to access settings pages.
542
+ * Tweak: Updated language files for version 2.0+.
543
+ * Tweak: Better error messages for no posts being found and API request delays.
544
+ * Tweak: If "Favor Local Images" setting is in use, a 640px resolution image will be created for images coming from a personal account.
545
+ * Tweak: Better error recovery when image file not found when viewing the feed.
546
+ * Tweak: Button and input field styling updated to look better with WordPress 5.3.
547
+ * Fix: Accounts that were connected prior to version 1.12 would not show the follow button if the header was not also displayed. Visit the "Configure" tab to have the account automatically updated.
548
+ * Fix: MySQL error when retrieving resized images. Thanks [the-louie](https://github.com/the-louie)!
549
+ * Fix: When using the new Twenty Twenty theme, Instagram icon in "follow" button displaying as block and causing the button text to appear on a new line.
550
+
551
+ = 2.1.2 =
552
+ * New: Added setting "API request size" on the "Customize" tab to allow requesting of more posts than are in the feed. Setting this to a high number will prevent no posts being found if you often post IG TV posts and use a personal account.
553
+ * Tweak: Removed width and height attributes from the image element in the feed to prevent notices about serving scaled images in optimization tools.
554
+
555
+ = 2.1.1 =
556
+ * New: Added ability to enqueue the CSS file through the shortcode. This loads the file in the footer of the site, and only on pages that include a feed. Enable on the "Customize" tab.
557
+ * Tweak: Resized images can be used in the page source code when "Disable js image loading" setting is enabled.
558
+ * Fix: HTML for header would still be visible in the source of the page when removing the header using showheader=false in the shortcode.
559
+
560
+ = 2.1 =
561
+ * New: Added the ability to overwrite default templates in your theme. View [this article](https://smashballoon.com/guide-to-creating-custom-templates/) for more information.
562
+ * New: Added several PHP hooks for modifying feeds settings and functionality.
563
+ * Fix: Using the "Load Initial Posts with AJAX" setting would cause images to not resize with the browser window.
564
+ * Fix: Added back language files for translations.
565
+ * Fix: Changing the image resolution setting would not change the image size.
566
+ * Fix: Follow button would not show if there was no connected account.
567
+ * Fix: Deleting any connected account will delete any connected accounts that have errors in the data that was saved for them.
568
+
569
+ = 2.0.2 =
570
+ * Fix: HTML for header would still be visible in the source of the page when removing the header using showheader=false in the shortcode
571
+ * Fix: CSS added to prevent layout issues when adding the feed to a "text" widget for certain themes
572
+
573
+ = 2.0.1 =
574
+ * Tweak: Force cache of major caching plugins to clear when updating plugin to avoid issues with previous CSS/JavaScript files being cached
575
+ * Tweak: Added version number to the end of JavaScript and CSS files to clear browser caches that are causing errors
576
+ * Fix: Added back filter to allow using shortcode in a custom HTML widget
577
+ * Fix: Added back settings to display bio information in header and change header size which were mistakenly removed in the last update
578
+ * Fix: Fixed a PHP notice which might display under certain circumstances
579
+
580
+ = 2.0 =
581
+ * **MAJOR UDPATE**
582
+ * New: We've rebuilt the plugin from the ground up with a focus on performance and reliability. Your feeds are now loaded from the server using PHP removing the reliance on AJAX.
583
+ * New: Local copies of images are now automatically stored on your server and used in your feed. You can disable this feature in the "Advanced" section of the "Customize" tab. Use the "Favor Local Images" setting on the "Customize" tab, "Advanced" sub-tab to have the plugin use local images whenever available, thus removing reliance on the Instagram CDN.
584
+ * New: You can now set the plugin to check for new Instagram posts in the background rather than when the page loads by using the new "Background caching" option which utilizes the WordPress "cron" feature. Enable this using the "Check for new posts" setting on the "Configure" tab.
585
+ * New: If you have a business account for Instagram, you can now connect to the new Instagram API. You can continue to use your connected personal account and do not need to connect a business account.
586
+
587
+ = 1.12.2 =
588
+ * Fix: Fixed error from Instagram when connecting a personal account.
589
+
590
+ = 1.12.1 =
591
+ * Tweak: If an image in a post fails to load then the plugin attempts to load it from another image source
592
+
593
+ = 1.12 =
594
+ * Fix: Includes fixes for some security vulnerabilities. Thanks to Julio Potier of [SecuPress](https://secupress.me/) for reporting the issues.
595
+ * Fix: Fixed an issue caused by a bug in the Instagram API which was preventing some Instagram accounts from being able to be connected. If you experienced an issue connecting an Instagram account then please try again after updating.
596
+ * Fix: Quotes represented by "%20" in Instagram data were causing a JSON parsing error.
597
+ * Tweak: Data for the feed is now cached outside of the admin-ajax.php calls.
598
+
599
+ = 1.11.3 =
600
+ * Fix: Escaped single quotes causing a JSON parse error under certain circumstances.
601
+ * Fix: Translatable code errors in the admin area causing some text to not be translatable.
602
+
603
+ = 1.11.2 =
604
+ * Fix: Unable to connect new accounts due to changes with Instagram's API. Remote requests to connect accounts are now made server-side.
605
+
606
+ = 1.11.1 =
607
+ * Fix: Feed would not load from a cache created with an older version of the plugin
608
+ * Fix: Fixed PHP warning trying to count string length of an array
609
+
610
+ = 1.11 =
611
+ * New: Added capability "manage_instagram_feed_options" to support customizations that will allow users/roles other than the administrator to access Instagram Feed settings pages.
612
+ * Fix: rel="noopener" added to all links that contain target="blank"
613
+ * Fix: HTTPS used in xlmns attribute for SVGs
614
+ * Fix: Fixed issues with strings in the admin area being translatable
615
+ * Fix: Fixed a potential security vulnerability. Thanks to [Martin Verreault](https://egyde.ca/) for reporting the issue.
616
+
617
+ = 1.10.2 =
618
+ * Confirmed compatibility with the upcoming WordPress 5.0 "Gutenberg" update
619
+ * Fix: Fixed an issue caused by some themes which affected the formatting of the 'Load More' and 'Follow' buttons
620
+ * Fix: Fixed an occasional formatting issue with error messages due to no line-height being set
621
+ * Fix: Minor admin UI fixes
622
+ * Tweak: Removed mention of some Pro features which will be deprecated due to upcoming Instagram API changes
623
+
624
+ = 1.10.1 =
625
+ * Tweak: Automatic image resolution detection setting now works better with wide images. Resizing the browser will now automatically raise the image resolution if needed.
626
+ * Fix: Fixed an issue where the Load More button would disappear if all posts for a feed were cached.
627
+
628
+ = 1.10 =
629
+ * New: We've made improvements to the way photos are loaded into the feed, adding a smooth transition to display photos subtly rather than suddenly.
630
+ * New: More header sizes; you can now choose from three sizes: small, medium, and large. Change this on the "Customize" tab.
631
+ * Fix: Using a percent for the image padding was causing the height of images to be too tall
632
+ * Fix: Removed a PHP notice when the Instagram API was blocked by the web host
633
+
634
+ = 1.9.1 =
635
+ * Fix: Captions missing as "alt" text for Instagram images.
636
+ * Fix: System information was not formatting connected Instagram accounts and user ids correctly
637
+ * Fix: "Unauthorized redirect URL" error occurring while trying to connect a new Instagram account due to recent changes from Instagram
638
+ * Fix: Using a percent for the image padding was causing the height of Instagram images to be to tall
639
+
640
+ = 1.9 =
641
+ * New: Retrieving Access Tokens and connecting multiple Instagram accounts is now easier using our improved interface for managing account information. While on the Configure tab, click on the big blue button to connect an account, or use the "Manually Connect an Account" option to connect one using an existing Access Token. Once an account is connected, you can use the associated buttons to either add it to your primary Instagram User feed or to a different Instagram feed on your site using the `user` shortcode option, eg: `user=smashballoon`.
642
+ * Tweak: Disabled auto load in the database for backup caches
643
+ * Fix: Fixed an occasional issue with the Instagram login flow which would result in an "Unauthorized redirect URL" error
644
+
645
+ = 1.8.3 =
646
+ * Fix: SVG icons caused some display problems in IE 11
647
+ * Fix: Removed support for using usernames in the Instagram User ID setting due to recent API changes. Will now default to the Instagram User ID attached to the Access Token.
648
+ * Fix: Backup feed not always being used when Access Tokens expire
649
+ * Fix: Instagram Access Tokens may have been incorrectly saved as invalid under certain circumstances
650
+
651
+ = 1.8.2 =
652
+ * Tweak: Setting "Cache Error API Recheck" enabled by default for new Instagram Feed installs
653
+ * Fix: Page caches created with the WP Rocket plugin will be cleared when the Instagram Feed settings are updated or the cache is forced to clear
654
+ * Fix: Fixed a rare issue where feeds were displaying "Looking for cache that doesn't exist" when page caching was not being used
655
+
656
+ = 1.8.1 =
657
+ * Fix: Fixed issue where Instagram feeds were displaying "Looking for cache that doesn't exist" when page caching was not being used
658
+ * Fix: Font method setting not working when "Are you using an ajax theme?" setting is enabled
659
+
660
+ = 1.8 =
661
+ * Important: Due to [recent changes](https://smashballoon.com/instagram-api-changes-april-4-2018/?utm_campaign=instagram-free-readme&utm_source=changelog&utm_medium=apichanges) in the Instagram API it is no longer possible to display photos from other Instagram accounts which are not your own. You can only display the user feed of the account which is associated with your Access Token.
662
+ * New: Added an Access Token shortcode option and support for multiple Instagram Access Tokens. If you own multiple Instagram accounts then you can now use multiple Access Tokens in order to display user feeds from each Instagram account, either in separate feeds, or in the same feed. Just use the `accesstoken` shortcode option. See [this FAQ](https://smashballoon.com/display-multiple-instagram-feeds/#multiple-user-feeds) for more information on displaying multiple User feeds.
663
+
664
+ = 1.7 =
665
+ * New: Added feed caching to limit the number of Instagram API requests. Use the setting on the "Configure" tab "Check for new posts every" to set how long feed data will be cached before refreshing.
666
+ * New: Added backup caching for all feeds. If the Instagram feed is unable to display then a backup feed will be shown to visitors if one is available. The backup cache can be disabled or cleared by using the following setting: `Customize > Misc > Enable Backup Caching`.
667
+ * New: Icons are now generated as SVGs for a sharper look and more semantic markup
668
+ * New: Instagram carousel posts include an icon to indicate that they are carousel posts
669
+ * Tweak: Using the "sort posts by random" feature will include the most recent 33 posts instead of just the posts shown in the Instagram feed
670
+ * Fix: links back to instagram.com will use the "www" prefix
671
+
672
+ = 1.6.2 =
673
+ * Fix: Fixed a rare issue where the Load More button wouldn't be displayed after the last update if the Instagram account didn't have many posts
674
+
675
+ = 1.6.1 =
676
+ * Fix: Fixed Font Awesome 5.0 causing Instagram icon to appear as a question mark with a circle
677
+ * Fix: Fixed inline padding style for sbi_images element causing validation error when set to "0" or blank space
678
+ * Fix: Added a workaround for an Instagram API bug which caused some feeds to show fewer posts than expected
679
+
680
+ = 1.6 =
681
+ * New: Loading icon appears when waiting for new posts after clicking the "Load More..." button
682
+ * New: Added translation files for Dutch (nl_NL)
683
+ * Fix: Fixed a potential security vulnerability. Thanks to [Magnus Stubman](http://dumpco.re/) for reporting the issue.
684
+
685
+ = 1.5.1 =
686
+ * New: The plugin is now compatible with the [WPML plugin](https://wpml.org/) allowing you to use multiple translations for your feeds on your multi-language sites
687
+ * New: Added translation files for Danish (da_DK), Finnish (fi_FL), Japanese (ja_JP), Norwegian (nn_NO), Portuguese (pt_PT), and Swedish (sv_SE) to translate the "Load More" and "Follow on Instagram" text
688
+
689
+ = 1.5 =
690
+ * New: Improved tool for retrieving Instagram Access Tokens
691
+ * New: Added an option to show/hide Instagram bio text in feed header
692
+ * New: Feeds that include IDs from "private" Instagram accounts will now ignore the private data and display a message to logged-in site admins which indicates that one of the Instagram accounts is private
693
+ * New: Feeds without any Instagram posts yet will display a message informing logged-in admins to make a post on Instagram in order to view the feed
694
+ * New: Added translation files for French (fr_FR), German (de_DE), English (en_EN), Spanish (es_ES), Italian (it_IT), and Russian (ru_RU) to translate "Load More..." and "Follow on Instagram"
695
+ * Tweak: Optimized several images used in the Instagram feed including loader.png
696
+ * Tweak: Font Awesome stylesheet handle has been renamed so it will only be loaded once if our Custom Facebook Feed plugin is also active
697
+ * Fix: Updated the Font Awesome icon font to the latest version: 4.7.0
698
+ * Fix: Padding removed from "Load More" button if no buttons are being used in the Instagram feed
699
+ * Fix: All links in the feed are now https
700
+ * Fix: Fixed JavaScript errors which were being caused if the Instagram Access Token had expired or the user ID was incorrect, private, or had no Instagram posts
701
+
702
+ = 1.4.9 =
703
+ * Compatible with WordPress 4.8
704
+
705
+ = 1.4.8 =
706
+ * Tweak: Updated plugin links for new WordPress.org repo
707
+ * Fix: Minor bug fixes
708
+
709
+ = 1.4.7 =
710
+ * Fix: Fixed a security vulnerabiliy
711
+ * Tested with upcoming WordPress 4.6 update
712
+
713
+ = 1.4.6.2 =
714
+ * Fix: Removed a comment from the plugin's JavaScript file which was causing an issue with some optimization plugins, such as Autoptimize.
715
+
716
+ = 1.4.6.1 =
717
+ * Fix: Fixed an issue with the Instagram image URLs which was resulting in inconsistent url references in some feeds
718
+
719
+ = 1.4.6 =
720
+ * **IMPORTANT: Due to the recent Instagram API changes, in order for the Instagram Feed plugin to continue working after June 1st you must obtain a new Access Token by using the Instagram button on the plugin's Settings page.** This is true even if you recently already obtained a new token. Apologies for any inconvenience.
721
+
722
+ = 1.4.5 =
723
+ * New: When you click on the name of a setting on the plugin’s Settings pages it now displays the shortcode option for that setting, making it easier to find the option that you need
724
+ * New: Added a setting to disable the Font Awesome icon font if needed. This can be found under the Misc tab at the bottom of the Customize page.
725
+ * Tweak: Updated the Instagram icon to match their new branding
726
+ * Tweak: Added a help link next to the Instagram login button in case there's an issue using it
727
+ * Fix: Updated the Font Awesome icon font to the latest version: 4.6.3
728
+
729
+ = 1.4.4 =
730
+ * Fix: Fixed an issue caused by a specific type of emoji which would cause the feed to break when used in a post
731
+ * Tweak: Added links to our other **free** plugins to the bottom of the admin pages: [The Custom Facebook Feed](https://wordpress.org/plugins/custom-facebook-feed/) and [Custom Twitter Feeds](https://wordpress.org/plugins/custom-twitter-feeds/)
732
+
733
+ = 1.4.3 =
734
+ * Fix: Important notice added in the last update is now only visible to admins
735
+
736
+ = 1.4.2 =
737
+ * New: Compatible with Instagram's new API changes effective June 1st
738
+ * New: Added video icons to Instagram posts in the feed which contain videos
739
+ * New: Added a setting to allow you to use a fixed pixel width for the feed on desktop but switch to a 100% width responsive layout on mobile
740
+ * Tweak: Added a width and height attribute to the images to help improve Google PageSpeed score
741
+ * Tweak: A few minor UI tweaks on the settings pages
742
+ * Fix: Minified CSS and JS files
743
+
744
+ = 1.3.11 =
745
+ * Fix: Fixed a bug which was causing the height of the Instagram photos to be shorter than they should have been in some themes
746
+ * Fix: Fixed an issue where when an Instagram feed was initially hidden (in a tab, for example) then the Instagram photo resolution was defaulting to 'thumbnail'
747
+
748
+ = 1.3.10 =
749
+ * Fix: Fixed an issue which was setting the visibility of some Instagram photos to be hidden in certain browsers
750
+ * Fix: The new square photo cropping is no longer being applied to Instagram feeds displaying images at less than 150px wide as the images from Instagram at this size are already square cropped
751
+ * Fix: Fixed a JavaScript error in Internet Explorer 8 caused by the 'addEventListener' function not being supported
752
+
753
+ = 1.3.9 =
754
+ * Fix: Fixed an issue where Instagram photos wouldn't appear in the Instagram feed if it was initially being hidden inside of a tab or some other element
755
+ * Fix: Fixed an issue where the new Instagram image cropping fuction was failing to run on some sites and causing the Instagram images to appear as blank
756
+
757
+ = 1.3.8 =
758
+ * Fix: If you have uploaded an Instagram photo in portrait or landscape then the plugin will now display the square cropped version of the photo in your Instagram feed
759
+
760
+ = 1.3.7 =
761
+ * Fix: Fixed an issue with double quotes in photo captions (used in the Instagram photo alt tags) which caused a formatting issue
762
+
763
+ = 1.3.6 =
764
+ * Fix: Fixed an issue introduced in version 1.3.4 which was causing theme settings to not be applied in some themes
765
+
766
+ = 1.3.5 =
767
+ * Fix: Reverted the 'prop' function introduced in the last update back to 'attr' as prop isn't supported in older versions of jQuery
768
+ * Fix: Removed the image load function as it was causing Instagram images not to be displayed for some users
769
+
770
+ = 1.3.4 =
771
+ * Fix: Used the Instagram photo caption to add a more descriptive alt tag to the Instagram photos
772
+ * Fix: Instagram photos are now only displayed once they're fully loaded
773
+ * Fix: Added a stricter CSS implementation for some elements to prevent styles being overridden by themes
774
+ * Fix: Added CSS opacity property to Instagram images to prevent issues with lazy loading in some themes
775
+ * Fix: Removed a line of code which was disabling WordPress Debug/Error Reporting. If needed, this can be disabled again by using the setting at the bottom of the plugin's 'Customize' settings page.
776
+ * Fix: Made some JavaScript improvements to the core Instagram Feed plugin code
777
+
778
+ = 1.3.3 =
779
+ * Fix: Fixed an issue with the 'Load more' button not always showing when displaying Instagram photos from multiple Instagram User IDs
780
+ * Fix: Moved the initiating sbi_init function outside of the jQuery ready function so that it can be called externally if needed by Ajax powered themes/plugins
781
+
782
+ = 1.3.2 =
783
+ * New: Added an option to disable the Instagram Feed mobile layout
784
+ * New: Added an setting which allows you to use the Instagram Feed plugin with an Ajax powered theme
785
+ * New: Added a 'class' shortcode option which allows you to add a CSS to class to each individual Instagram feed: `[instagram-feed class=feedOne]`
786
+ * New: Added a Support tab which contains System Info to help with troubleshooting
787
+ * New: Added friendly error messages which display only to WordPress admins
788
+ * New: Added validation to the Instagram User ID field to prevent usernames being entered instead of IDs
789
+ * Tweak: Made the Instagram Access Token field slightly wider to prevent tokens being copy and pasted incorrectly
790
+ * Fix: Fixed a JavaScript bug which caused the feed not to load photos correctly in IE8
791
+
792
+ = 1.3.1 =
793
+ * Fix: Fixed an issue with the Instagram icon not appearing in the 'Follow on Instagram' button or in the Instagram Feed header
794
+ * Fix: Addressed a few CSS issues which were causing some minor formatting issues in the Instagram Feed on certain themes
795
+
796
+ = 1.3 =
797
+ * New: You can now display Instagram photos from multiple Instagram User IDs. Simply separate your Instagram IDs by commas.
798
+ * New: Added an optional header to the Instagram feed which contains your Instagram profile picture, Instagram username and Instagram bio. You can activate this on the Instagram Feed Customize page.
799
+ * New: The Instagram Feed plugin now includes an 'Auto-detect' option for the Instagram Image Resolution setting which will automatically set the correct Instagram image resolution based on the size of your Instagram feed.
800
+ * New: Added an optional 'Follow on Instagram' button which can be displayed at the bottom of your Instagram feed. You can activate this on the Instagram Feed Customize page.
801
+ * New: Added the ability to use your own custom text for the 'Load More' button
802
+ * New: Added a loader icon to indicate that the Instagram photos are loading
803
+ * New: Added a unique ID to each Instagram photo so that they can be targeted individually via CSS
804
+ * Tweak: Added a subtle fade effect to the Instagram photos when hovering over them
805
+ * Tweak: Improved the responsive layout behavior of the Instagram feed
806
+ * Tweak: Improved the documentation within the Instagram Feed plugin settings pages
807
+ * Tweak: Included a link to [step-by-step setup directions](http//:smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free-readme&utm_source=changelog&utm_medium=changelog 'Instagram feed setup directions') for the plugin
808
+ * Fix: Fixed an issue with the feed not clearing other widgets correctly
809
+
810
+ = 1.2.3 =
811
+ * Fix: Replaced the 'on' function with the 'click' function to increase compatibility with themes using older versions of jQuery
812
+
813
+ = 1.2.2 =
814
+ * Tweak: Added an initialize function to the Instagram Feed plugin
815
+ * Fix: Fixed an occasional issue with the 'Sort Photos By' option being undefined
816
+
817
+ = 1.2.1 =
818
+ * Fix: Fixed a minor issue with the Custom JavaScript being run before the Instagram photos are loaded
819
+ * Fix: Removed stray PHP notices
820
+ * Fix: Changed the double quotes to single quotes on the 'data-options' attribute
821
+
822
+ = 1.2 =
823
+ * New: Added Custom CSS and Custom JavaScript sections which allow you to add your own custom CSS and JavaScript to the Instagram Feed plugin
824
+ * New: Added an option to display your Instagram photos in random order
825
+ * New: A new tabbed layout has been implemented on the Instagram Feed plugin's settings pages
826
+ * New: Added an option to preserve your Instagram Feed settings when uninstalling the plugin
827
+ * New: Added a [Pro version](http://smashballoon.com/instagram-feed/?utm_campaign=instagram-free-readme&utm_source=changelog&utm_medium=changelog 'Instagram Feed Pro') of the Instagram Feed plugin which allows you to display Instagram photos by hashtag, display Instagram captions, view Instagram photos in a pop-up lightbox, show the number of Instagram likes & comments and more
828
+ * Tweak: The 'Load More' button now automatically hides if there are no more Instagram photos to load
829
+ * Tweak: Added a small gap to the top of the 'Load More' button
830
+ * Tweak: Added a icon to the Instagram Feed menu item
831
+
832
+ = 1.1.6 =
833
+ * Fix: A maximum width is now only applied to the Instagram feed when the Instagram photos are displayed in one column
834
+
835
+ = 1.1.5 =
836
+ * Fix: Added a line of code which enables shortcodes to be used in widgets for themes which don't have it enabled
837
+
838
+ = 1.1.4 =
839
+ * Fix: Fixed an issue with the Instagram Access Token and Instagram User ID retrieval functionality in certain web browsers
840
+
841
+ = 1.1.3 =
842
+ * Fix: Fixed an issue with the maximum Instagram image width
843
+ * Fix: Corrected a typo in the Instagram Feed Shortcode Options table
844
+
845
+ = 1.1.1 =
846
+ * Pre-tested for the upcoming WordPress 4.0 update
847
+ * Fix: Fixed an uncommon issue related to the output of the Instagram content
848
+
849
+ = 1.1 =
850
+ * New: Added an option to set the number of Instagram photos to be initially displayed
851
+ * New: Added an option to show or hide the 'Load More' button
852
+ * New: Added 'Step 3' to the Instagram Feed Settings page explaining how to display your feed using the [instagram-feed] shortcode
853
+ * New: Added a full list of all available Instagram Feed shortcode options to help you if customizing multiple Instagram feeds
854
+
855
+ = 1.0.2 =
856
+ * Fix: Fixed an issue with the Instagram login URL on the plugin's Instagram Feed Settings page
857
+
858
+ = 1.0.1 =
859
+ * Fix: Fixed an issue with the Instagram Feed 'Load More' button opening an empty browser window in Firefox
860
+
861
+ = 1.0 =
862
+ * Launched the Instagram Feed plugin!
css/admin-notifications.css CHANGED
@@ -1,187 +1,187 @@
1
- #sbi-notifications {
2
- position: relative;
3
- background: #FFFFFF 0 0 no-repeat padding-box;
4
- box-shadow: 0 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
- .sbi-notice-alert {
172
- display: inline-block;
173
- position: absolute;
174
- vertical-align: top;
175
- box-sizing: border-box;
176
- margin: 1px 0 0 4px;
177
- padding: 0 5px;
178
- min-width: 18px;
179
- height: 18px;
180
- border-radius: 9px;
181
- background-color: #d63638;
182
- color: #fff;
183
- font-size: 11px;
184
- line-height: 1.6;
185
- text-align: center;
186
- z-index: 26;
187
- }
1
+ #sbi-notifications {
2
+ position: relative;
3
+ background: #FFFFFF 0 0 no-repeat padding-box;
4
+ box-shadow: 0 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
+ .sbi-notice-alert {
172
+ display: inline-block;
173
+ position: absolute;
174
+ vertical-align: top;
175
+ box-sizing: border-box;
176
+ margin: 1px 0 0 4px;
177
+ padding: 0 5px;
178
+ min-width: 18px;
179
+ height: 18px;
180
+ border-radius: 9px;
181
+ background-color: #d63638;
182
+ color: #fff;
183
+ font-size: 11px;
184
+ line-height: 1.6;
185
+ text-align: center;
186
+ z-index: 26;
187
+ }
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 DELETED
@@ -1,744 +0,0 @@
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 DELETED
@@ -1 +0,0 @@
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,788 +1,788 @@
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: inline-block;
51
- float: left;
52
- vertical-align: top;
53
- zoom: 1;
54
-
55
- padding: inherit !important;
56
- margin: 0 !important;
57
- text-decoration: none;
58
- opacity: 1;
59
- overflow: hidden;
60
-
61
- -webkit-box-sizing: border-box;
62
- -moz-box-sizing: border-box;
63
- box-sizing: border-box;
64
-
65
- -webkit-transition: all 0.5s ease;
66
- -moz-transition: all 0.5s ease;
67
- -o-transition: all 0.5s ease;
68
- transition: all 0.5s ease;
69
- }
70
- /* Transition items in */
71
- #sb_instagram #sbi_images .sbi_item.sbi_transition{
72
- opacity: 0;
73
- }
74
-
75
- /* Cols */
76
- #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
77
- #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
78
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
79
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
80
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
81
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
82
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
83
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
84
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
85
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
86
-
87
- /* Disable mobile layout */
88
- #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
89
- #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
90
- #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
91
- #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
92
- #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
93
- #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
94
- #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
95
- #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
96
- #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
97
- #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
98
-
99
- /* Photos */
100
- #sb_instagram .sbi_photo_wrap{
101
- position: relative;
102
- }
103
- #sb_instagram .sbi_photo{
104
- display: block;
105
- text-decoration: none;
106
- }
107
- #sb_instagram .sbi_photo img{
108
- width: 100%;
109
- height: auto;
110
- }
111
- #sb_instagram .sbi_no_js img{
112
- display: none;
113
- }
114
- #sb_instagram a,
115
- #sb_instagram a:hover,
116
- #sb_instagram a:focus,
117
- #sb_instagram a:active{
118
- outline: none;
119
- }
120
- #sb_instagram img{
121
- display: block;
122
- padding: 0 !important;
123
- margin: 0 !important;
124
- max-width: 100% !important;
125
- opacity: 1 !important;
126
- }
127
- #sb_instagram .sbi_link{
128
- display: none;
129
- position: absolute;
130
- bottom: 0;
131
- right: 0;
132
-
133
- width: 100%;
134
- padding: 10px 0;
135
- background: rgba(0,0,0,0.5);
136
- text-align: center;
137
- color: #fff;
138
- font-size: 12px;
139
- line-height: 1.1;
140
- }
141
- #sb_instagram .sbi_link a{
142
- padding: 0 6px;
143
- text-decoration: none;
144
- color: #fff;
145
- font-size: 12px;
146
- line-height: 1.1;
147
-
148
- display: inline-block;
149
- vertical-align: top;
150
- zoom: 1;
151
- }
152
- #sb_instagram .sbi_link .sbi_lightbox_link{
153
- padding-bottom: 5px;
154
- }
155
- #sb_instagram .sbi_link a:hover,
156
- #sb_instagram .sbi_link a:focus{
157
- text-decoration: underline;
158
- }
159
- #sb_instagram .sbi_photo_wrap:hover .sbi_link,
160
- #sb_instagram .sbi_photo_wrap:focus .sbi_link{
161
- display: block;
162
- }
163
-
164
- /* Videos */
165
- #sb_instagram svg:not(:root).svg-inline--fa {
166
- height: 1em;
167
- display: inline-block;
168
- }
169
-
170
- #sb_instagram .sbi_type_video .sbi_playbtn,
171
- #sb_instagram .sbi_type_carousel .sbi_playbtn,
172
- .sbi_type_carousel .fa-clone,
173
- #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
174
- #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
175
- display: block !important;
176
- position: absolute;
177
- z-index: 1;
178
-
179
- color: #fff;
180
- color: rgba(255,255,255,0.9);
181
- font-style: normal !important;
182
- text-shadow: 0 0 8px rgba(0,0,0,0.8);
183
- }
184
- #sb_instagram .sbi_type_video .sbi_playbtn,
185
- #sb_instagram .sbi_type_carousel .sbi_playbtn {
186
- z-index: 2;
187
- top: 50%;
188
- left: 50%;
189
- margin-top: -24px;
190
- margin-left: -19px;
191
- padding: 0;
192
- font-size: 48px;
193
- }
194
- #sb_instagram .sbi_type_carousel .fa-clone{
195
- right: 12px;
196
- top: 12px;
197
- font-size: 24px;
198
- text-shadow: 0 0 8px rgba(0,0,0,0.3);
199
- }
200
- .sbi_type_carousel svg.fa-clone,
201
- #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
202
- #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
203
- -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
204
- filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
205
- }
206
-
207
- /* Loader */
208
- #sb_instagram .sbi_loader{
209
- width: 20px;
210
- height: 20px;
211
-
212
- position: relative;
213
- top: 50%;
214
- left: 50%;
215
- margin: -10px 0 0 -10px;
216
- background-color: #000;
217
- background-color: rgba(0,0,0,0.5);
218
-
219
- border-radius: 100%;
220
- -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
221
- animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
222
- }
223
- #sb_instagram br {
224
- display: none;
225
- }
226
- #sbi_load p {
227
- display: inline;
228
- padding: 0;
229
- margin: 0;
230
- }
231
- /* Loader in button */
232
- #sb_instagram #sbi_load .sbi_loader{
233
- position: absolute;
234
- margin-top: -11px;
235
- background-color: #fff;
236
- opacity: 1;
237
- }
238
- @-webkit-keyframes sbi-sk-scaleout {
239
- 0% { -webkit-transform: scale(0) }
240
- 100% {
241
- -webkit-transform: scale(1.0);
242
- opacity: 0;
243
- }
244
- }
245
- @keyframes sbi-sk-scaleout {
246
- 0% {
247
- -webkit-transform: scale(0);
248
- -ms-transform: scale(0);
249
- transform: scale(0);
250
- } 100% {
251
- -webkit-transform: scale(1.0);
252
- -ms-transform: scale(1.0);
253
- transform: scale(1.0);
254
- opacity: 0;
255
- }
256
- }
257
-
258
- #sb_instagram .fa-spin,
259
- #sbi_lightbox .fa-spin{
260
- -webkit-animation: fa-spin 2s infinite linear;
261
- animation: fa-spin 2s infinite linear
262
- }
263
-
264
- #sb_instagram .fa-pulse,
265
- #sbi_lightbox .fa-pulse{
266
- -webkit-animation: fa-spin 1s infinite steps(8);
267
- animation: fa-spin 1s infinite steps(8)
268
- }
269
-
270
- @-webkit-keyframes fa-spin {
271
- 0% {
272
- -webkit-transform: rotate(0deg);
273
- transform: rotate(0deg)
274
- }
275
- 100% {
276
- -webkit-transform: rotate(359deg);
277
- transform: rotate(359deg)
278
- }
279
- }
280
-
281
- @keyframes fa-spin {
282
- 0% {
283
- -webkit-transform: rotate(0deg);
284
- transform: rotate(0deg)
285
- }
286
- 100% {
287
- -webkit-transform: rotate(359deg);
288
- transform: rotate(359deg)
289
- }
290
- }
291
- /* Screen reader */
292
- .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; }
293
-
294
- /* HEADER */
295
- #sb_instagram .sb_instagram_header{
296
- float: left;
297
- clear: both;
298
- margin: 0 0 15px 0;
299
- padding: 0;
300
- line-height: 1.2;
301
- width: 100%;
302
- }
303
- #sb_instagram .sb_instagram_header a{
304
- float: left;
305
- display: block;
306
- /*width: 100%;*/
307
- min-width: 100%\9;
308
- text-decoration: none;
309
- transition: color 0.5s ease;
310
- }
311
- .sbi_no_avatar .sbi_header_img{
312
- background: #333;
313
- color: #fff;
314
- width: 50px;
315
- height: 50px;
316
- position: relative;
317
- }
318
- .sbi_no_avatar .sbi_header_hashtag_icon {
319
- display: block;
320
- color: #fff;
321
- opacity: .9;
322
- -webkit-transition: background .6s linear,color .6s linear;
323
- -moz-transition: background .6s linear,color .6s linear;
324
- -o-transition: background .6s linear,color .6s linear;
325
- transition: background .6s linear,color .6s linear
326
- }
327
-
328
- .sbi_no_avatar:hover .sbi_header_hashtag_icon {
329
- display: block;
330
- opacity: 1;
331
- -webkit-transition: background .2s linear,color .2s linear;
332
- -moz-transition: background .2s linear,color .2s linear;
333
- -o-transition: background .2s linear,color .2s linear;
334
- transition: background .2s linear,color .2s linear
335
- }
336
- /** Medium Header */
337
- /* Only use medium & large headers on devices above 480px */
338
- @media all and (min-width: 480px){
339
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
340
- width: 80px;
341
- height: 80px;
342
- border-radius: 40px;
343
- }
344
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
345
- width: 80px;
346
- height: 80px;
347
- border-radius: 40px;
348
- }
349
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
350
- font-size: 20px;
351
- margin-left: 95px !important;
352
- line-height: 1.4;
353
- margin-right: -85px !important;
354
- }
355
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
356
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
357
- font-size: 14px;
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
- margin-left: 95px !important;
362
- line-height: 1.4
363
- }
364
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
365
- margin-top: 4px !important;
366
- }
367
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
368
- padding-top: 20px !important;
369
- }
370
- /** Large Header */
371
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
372
- width: 120px;
373
- height: 120px;
374
- border-radius: 60px;
375
- }
376
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
377
- width: 120px;
378
- height: 120px;
379
- border-radius: 60px;
380
- }
381
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
382
- font-size: 28px;
383
- line-height: 1.5;
384
- margin-left: 140px !important;
385
- margin-right: -120px !important;
386
- }
387
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
388
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
389
- font-size: 16px;
390
- }
391
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
392
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
393
- margin-left: 140px !important;
394
- line-height: 1.5;
395
- }
396
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
397
- margin-top: 12px !important;
398
- }
399
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
400
- padding-top: 32px !important;
401
- }
402
- }
403
-
404
- /* Header profile pic */
405
- #sb_instagram .sb_instagram_header .sbi_header_img{
406
- float: left;
407
- position: relative;
408
- width: 50px;
409
- margin: 0 0 0 -100% !important;
410
- overflow: hidden;
411
-
412
- -moz-border-radius: 40px;
413
- -webkit-border-radius: 40px;
414
- border-radius: 40px;
415
- }
416
- #sb_instagram .sb_instagram_header .sbi_header_img img{
417
- float: left;
418
- margin: 0 !important;
419
- padding: 0 !important;
420
- border: none !important;
421
-
422
- -moz-border-radius: 40px;
423
- -webkit-border-radius: 40px;
424
- border-radius: 40px;
425
- }
426
- /* Profile pic hover */
427
- /* Profile pic hover */
428
-
429
- #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
430
- #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
431
- position: absolute;
432
- top: 50%;
433
- left: 50%;
434
- margin-top: -12px;
435
- margin-left: -12px;
436
- width: 24px;
437
- height: 24px;
438
- font-size: 24px;
439
- }
440
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
441
- .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
442
- margin-top: -18px;
443
- margin-left: -18px;
444
- width: 36px;
445
- height: 36px;
446
- font-size: 36px
447
- }
448
-
449
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
450
- .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
451
- margin-top: -24px;
452
- margin-left: -24px;
453
- width: 48px;
454
- height: 48px;
455
- font-size: 48px
456
- }
457
- #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
458
- overflow: hidden;
459
- background: url('../img/small-logo.png') no-repeat 0 0;
460
- }
461
-
462
- #sb_instagram .sb_instagram_header .sbi_fade_in{
463
- opacity: 1;
464
- transition: opacity 0.2s ease-in-out;
465
- }
466
- #sb_instagram .sb_instagram_header .sbi_header_img_hover{
467
- position: absolute;
468
- width: 100%;
469
- top: 0;
470
- bottom: 0;
471
- left: 0;
472
- text-align: center;
473
- color: #fff;
474
- background: rgba(0,0,0,0.75);
475
- z-index: 2;
476
-
477
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
478
- filter: alpha(opacity=0);
479
- -moz-opacity: 0;
480
- opacity: 0;
481
- border-radius: 40px;
482
- transition: opacity 0.2s;
483
- }
484
- /* Fade the Instagram icon in when hovering on the header */
485
- #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
486
- #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
487
- opacity: 1;
488
- }
489
- /* Header text */
490
- #sb_instagram .sb_instagram_header .sbi_header_text{
491
- float: left;
492
- width: 100%;
493
- padding-top: 5px;
494
- }
495
- #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
496
- #sb_instagram .sb_instagram_header .sbi_header_text h3{
497
- float: left;
498
- clear: both;
499
- width: auto;
500
- margin: 0 0 0 60px !important;
501
- padding: 0 !important;
502
- }
503
- #sb_instagram .sb_instagram_header h3{
504
- font-size: 16px;
505
- line-height: 1.3;
506
- }
507
- #sb_instagram .sb_instagram_header p{
508
- font-size: 13px;
509
- line-height: 1.3;
510
- margin: 0;
511
- padding: 0;
512
- }
513
- #sb_instagram p:empty { display: none; }
514
- #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
515
- margin-right: 3px !important;
516
- }
517
-
518
- /* No bio */
519
- #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
520
- padding-top: 9px !important;
521
- }
522
- #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
523
- clear: both;
524
- }
525
-
526
-
527
- /* Buttons */
528
- #sb_instagram #sbi_load{
529
- float: left;
530
- clear: both;
531
- width: 100%;
532
- text-align: center;
533
- opacity: 1;
534
- transition: all 0.5s ease-in;
535
- }
536
- #sb_instagram #sbi_load .fa-spinner{
537
- display: none;
538
- position: absolute;
539
- top: 50%;
540
- left: 50%;
541
- margin: -8px 0 0 -7px;
542
- font-size: 15px;
543
- }
544
- #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
545
- opacity: 1;
546
- transition: all 0.1s ease-in;
547
- }
548
- #sb_instagram .sbi_hidden{
549
- opacity: 0 !important;
550
- }
551
- #sb_instagram #sbi_load .sbi_load_btn{
552
- display: inline-block;
553
- vertical-align: top;
554
- zoom: 1;
555
-
556
- padding: 7px 14px;
557
- margin: 5px auto 0 auto;
558
- background: #333;
559
- border: none;
560
- color: #fff;
561
- text-decoration: none;
562
- font-size: 13px;
563
- line-height: 1.5;
564
- border-radius: 4px;
565
- box-sizing: border-box;
566
- }
567
-
568
- #sb_instagram .sbi_follow_btn a{
569
- display: inline-block;
570
- vertical-align: top;
571
- zoom: 1;
572
- padding: 7px 14px;
573
- margin: 5px auto 0 auto;
574
- border: none;
575
- text-decoration: none;
576
- font-size: 13px;
577
- line-height: 1.5;
578
- border-radius: 4px;
579
- box-sizing: border-box;
580
- background: #408bd1;
581
- color: #fff;
582
- transition: all 0.1s ease-in;
583
- }
584
- #sb_instagram #sbi_load .sbi_load_btn {
585
- position: relative;
586
- }
587
- /* Follow button */
588
- #sb_instagram .sbi_follow_btn{
589
- display: inline-block;
590
- vertical-align: top;
591
- zoom: 1;
592
- text-align: center;
593
- }
594
- #sb_instagram .sbi_follow_btn.sbi_top{
595
- display: block;
596
- margin-bottom: 5px;
597
- }
598
-
599
- #sb_instagram #sbi_load .sbi_load_btn{
600
- transition: all 0.1s ease-in;
601
- }
602
- /* Hover state for default colors */
603
- #sb_instagram #sbi_load .sbi_load_btn:hover{
604
- outline: none;
605
- box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
606
- }
607
- #sb_instagram .sbi_follow_btn a:hover,
608
- #sb_instagram .sbi_follow_btn a:focus{
609
- outline: none;
610
- box-shadow: inset 0 0 10px 20px #359dff;
611
- }
612
- /* If a custom color is applied then just use opacity for the hover effect */
613
- #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
614
- #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
615
- #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
616
- box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
617
- }
618
- /* Active state */
619
- #sb_instagram .sbi_follow_btn a:active,
620
- #sb_instagram #sbi_load .sbi_load_btn:active{
621
- box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
622
- }
623
-
624
- #sb_instagram .sbi_follow_btn .fa,
625
- #sb_instagram .sbi_follow_btn svg{
626
- margin-bottom: -1px;
627
- margin-right: 7px;
628
- font-size: 15px;
629
- }
630
- #sb_instagram .sbi_follow_btn svg{
631
- vertical-align: -.125em;
632
- }
633
- #sb_instagram #sbi_load .sbi_follow_btn{
634
- margin-left: 5px;
635
- }
636
-
637
- /* Error messages */
638
- #sb_instagram .sb_instagram_error{
639
- width: 100%;
640
- text-align: center;
641
- line-height: 1.4;
642
- }
643
-
644
- /* Mod only error msgs */
645
- #sbi_mod_error{
646
- display: none;
647
- border: 1px solid #ddd;
648
- background: #eee;
649
- color: #333;
650
- margin: 10px 0 0;
651
- padding: 10px 15px;
652
- font-size: 13px;
653
- text-align: center;
654
- clear: both;
655
-
656
- -moz-border-radius: 4px;
657
- -webkit-border-radius: 4px;
658
- border-radius: 4px;
659
- }
660
- #sbi_mod_error br {
661
- display: initial !important;
662
- }
663
- #sbi_mod_error p{
664
- padding: 5px 0 !important;
665
- margin: 0 !important;
666
- line-height: 1.3 !important;
667
- }
668
- #sbi_mod_error ol,
669
- #sbi_mod_error ul{
670
- padding: 5px 0 5px 20px !important;
671
- margin: 0 !important;
672
- }
673
- #sbi_mod_error li{
674
- padding: 1px 0 !important;
675
- margin: 0 !important;
676
- }
677
- #sbi_mod_error span{
678
- font-size: 12px;
679
- }
680
-
681
- /* Medium */
682
- #sb_instagram.sbi_medium .sbi_playbtn,
683
- #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
684
- margin-top: -12px;
685
- margin-left: -9px;
686
- font-size: 23px;
687
- }
688
- #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
689
- right: 8px;
690
- top: 8px;
691
- font-size: 18px;
692
- }
693
- /* Small */
694
- #sb_instagram.sbi_small .sbi_playbtn,
695
- #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
696
- margin-top: -9px;
697
- margin-left: -7px;
698
- font-size: 18px;
699
- }
700
- #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
701
- right: 5px;
702
- top: 5px;
703
- font-size: 12px;
704
- }
705
-
706
- /* Media queries */
707
- @media all and (max-width: 640px){
708
- /* Make 3-6 cols into 2 col */
709
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
710
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
711
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
712
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
713
- width: 50%;
714
- }
715
- /* Make 7-10 cols into 4 col */
716
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
717
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
718
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
719
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
720
- width: 25%;
721
- }
722
- /* On mobile make the min-width 100% */
723
- #sb_instagram.sbi_width_resp{
724
- width: 100% !important;
725
- }
726
- }
727
- @media all and (max-width: 480px){
728
- /* Make all cols into 1 col */
729
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
730
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
731
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
732
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
733
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
734
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
735
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
736
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
737
- width: 100%;
738
- }
739
- }
740
-
741
- /* NO JS */
742
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
743
- box-sizing: border-box;
744
- position: relative;
745
- overflow: hidden;
746
- }
747
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
748
- content: "";
749
- display: block;
750
- padding-top: 100%;
751
- z-index: -300;
752
- }
753
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
754
- position: absolute;
755
- top: 0;
756
- left: 0;
757
- bottom: 0;
758
- right: 0;
759
- }
760
- #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
761
- opacity: 1;
762
- }
763
- #sb_instagram.sbi_no_js .sbi_photo img,
764
- #sb_instagram.sbi_no_js .sbi_load_btn{
765
- display: none;
766
- }
767
- #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
768
- padding-bottom: 0 !important;
769
- }
770
- #sb_instagram #sbi_mod_error .sb_frontend_btn {
771
- display: inline-block;
772
- padding: 6px 10px;
773
- background: #ddd;
774
- background: rgba(0,0,0,.1);
775
- text-decoration: none;
776
- border-radius: 5px;
777
- margin-top: 10px;
778
- color: #444
779
- }
780
-
781
- #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
782
- background: #ccc;
783
- background: rgba(0,0,0,.15)
784
- }
785
-
786
- #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
787
- margin-right: 2px
788
  }
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: inline-block;
51
+ float: left;
52
+ vertical-align: top;
53
+ zoom: 1;
54
+
55
+ padding: inherit !important;
56
+ margin: 0 !important;
57
+ text-decoration: none;
58
+ opacity: 1;
59
+ overflow: hidden;
60
+
61
+ -webkit-box-sizing: border-box;
62
+ -moz-box-sizing: border-box;
63
+ box-sizing: border-box;
64
+
65
+ -webkit-transition: all 0.5s ease;
66
+ -moz-transition: all 0.5s ease;
67
+ -o-transition: all 0.5s ease;
68
+ transition: all 0.5s ease;
69
+ }
70
+ /* Transition items in */
71
+ #sb_instagram #sbi_images .sbi_item.sbi_transition{
72
+ opacity: 0;
73
+ }
74
+
75
+ /* Cols */
76
+ #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
77
+ #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
78
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
79
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
80
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
81
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
82
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
83
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
84
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
85
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
86
+
87
+ /* Disable mobile layout */
88
+ #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
89
+ #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
90
+ #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
91
+ #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
92
+ #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
93
+ #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
94
+ #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
95
+ #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
96
+ #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
97
+ #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
98
+
99
+ /* Photos */
100
+ #sb_instagram .sbi_photo_wrap{
101
+ position: relative;
102
+ }
103
+ #sb_instagram .sbi_photo{
104
+ display: block;
105
+ text-decoration: none;
106
+ }
107
+ #sb_instagram .sbi_photo img{
108
+ width: 100%;
109
+ height: auto;
110
+ }
111
+ #sb_instagram .sbi_no_js img{
112
+ display: none;
113
+ }
114
+ #sb_instagram a,
115
+ #sb_instagram a:hover,
116
+ #sb_instagram a:focus,
117
+ #sb_instagram a:active{
118
+ outline: none;
119
+ }
120
+ #sb_instagram img{
121
+ display: block;
122
+ padding: 0 !important;
123
+ margin: 0 !important;
124
+ max-width: 100% !important;
125
+ opacity: 1 !important;
126
+ }
127
+ #sb_instagram .sbi_link{
128
+ display: none;
129
+ position: absolute;
130
+ bottom: 0;
131
+ right: 0;
132
+
133
+ width: 100%;
134
+ padding: 10px 0;
135
+ background: rgba(0,0,0,0.5);
136
+ text-align: center;
137
+ color: #fff;
138
+ font-size: 12px;
139
+ line-height: 1.1;
140
+ }
141
+ #sb_instagram .sbi_link a{
142
+ padding: 0 6px;
143
+ text-decoration: none;
144
+ color: #fff;
145
+ font-size: 12px;
146
+ line-height: 1.1;
147
+
148
+ display: inline-block;
149
+ vertical-align: top;
150
+ zoom: 1;
151
+ }
152
+ #sb_instagram .sbi_link .sbi_lightbox_link{
153
+ padding-bottom: 5px;
154
+ }
155
+ #sb_instagram .sbi_link a:hover,
156
+ #sb_instagram .sbi_link a:focus{
157
+ text-decoration: underline;
158
+ }
159
+ #sb_instagram .sbi_photo_wrap:hover .sbi_link,
160
+ #sb_instagram .sbi_photo_wrap:focus .sbi_link{
161
+ display: block;
162
+ }
163
+
164
+ /* Videos */
165
+ #sb_instagram svg:not(:root).svg-inline--fa {
166
+ height: 1em;
167
+ display: inline-block;
168
+ }
169
+
170
+ #sb_instagram .sbi_type_video .sbi_playbtn,
171
+ #sb_instagram .sbi_type_carousel .sbi_playbtn,
172
+ .sbi_type_carousel .fa-clone,
173
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
174
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
175
+ display: block !important;
176
+ position: absolute;
177
+ z-index: 1;
178
+
179
+ color: #fff;
180
+ color: rgba(255,255,255,0.9);
181
+ font-style: normal !important;
182
+ text-shadow: 0 0 8px rgba(0,0,0,0.8);
183
+ }
184
+ #sb_instagram .sbi_type_video .sbi_playbtn,
185
+ #sb_instagram .sbi_type_carousel .sbi_playbtn {
186
+ z-index: 2;
187
+ top: 50%;
188
+ left: 50%;
189
+ margin-top: -24px;
190
+ margin-left: -19px;
191
+ padding: 0;
192
+ font-size: 48px;
193
+ }
194
+ #sb_instagram .sbi_type_carousel .fa-clone{
195
+ right: 12px;
196
+ top: 12px;
197
+ font-size: 24px;
198
+ text-shadow: 0 0 8px rgba(0,0,0,0.3);
199
+ }
200
+ .sbi_type_carousel svg.fa-clone,
201
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
202
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
203
+ -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
204
+ filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
205
+ }
206
+
207
+ /* Loader */
208
+ #sb_instagram .sbi_loader{
209
+ width: 20px;
210
+ height: 20px;
211
+
212
+ position: relative;
213
+ top: 50%;
214
+ left: 50%;
215
+ margin: -10px 0 0 -10px;
216
+ background-color: #000;
217
+ background-color: rgba(0,0,0,0.5);
218
+
219
+ border-radius: 100%;
220
+ -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
221
+ animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
222
+ }
223
+ #sb_instagram br {
224
+ display: none;
225
+ }
226
+ #sbi_load p {
227
+ display: inline;
228
+ padding: 0;
229
+ margin: 0;
230
+ }
231
+ /* Loader in button */
232
+ #sb_instagram #sbi_load .sbi_loader{
233
+ position: absolute;
234
+ margin-top: -11px;
235
+ background-color: #fff;
236
+ opacity: 1;
237
+ }
238
+ @-webkit-keyframes sbi-sk-scaleout {
239
+ 0% { -webkit-transform: scale(0) }
240
+ 100% {
241
+ -webkit-transform: scale(1.0);
242
+ opacity: 0;
243
+ }
244
+ }
245
+ @keyframes sbi-sk-scaleout {
246
+ 0% {
247
+ -webkit-transform: scale(0);
248
+ -ms-transform: scale(0);
249
+ transform: scale(0);
250
+ } 100% {
251
+ -webkit-transform: scale(1.0);
252
+ -ms-transform: scale(1.0);
253
+ transform: scale(1.0);
254
+ opacity: 0;
255
+ }
256
+ }
257
+
258
+ #sb_instagram .fa-spin,
259
+ #sbi_lightbox .fa-spin{
260
+ -webkit-animation: fa-spin 2s infinite linear;
261
+ animation: fa-spin 2s infinite linear
262
+ }
263
+
264
+ #sb_instagram .fa-pulse,
265
+ #sbi_lightbox .fa-pulse{
266
+ -webkit-animation: fa-spin 1s infinite steps(8);
267
+ animation: fa-spin 1s infinite steps(8)
268
+ }
269
+
270
+ @-webkit-keyframes fa-spin {
271
+ 0% {
272
+ -webkit-transform: rotate(0deg);
273
+ transform: rotate(0deg)
274
+ }
275
+ 100% {
276
+ -webkit-transform: rotate(359deg);
277
+ transform: rotate(359deg)
278
+ }
279
+ }
280
+
281
+ @keyframes fa-spin {
282
+ 0% {
283
+ -webkit-transform: rotate(0deg);
284
+ transform: rotate(0deg)
285
+ }
286
+ 100% {
287
+ -webkit-transform: rotate(359deg);
288
+ transform: rotate(359deg)
289
+ }
290
+ }
291
+ /* Screen reader */
292
+ .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; }
293
+
294
+ /* HEADER */
295
+ #sb_instagram .sb_instagram_header{
296
+ float: left;
297
+ clear: both;
298
+ margin: 0 0 15px 0;
299
+ padding: 0;
300
+ line-height: 1.2;
301
+ width: 100%;
302
+ }
303
+ #sb_instagram .sb_instagram_header a{
304
+ float: left;
305
+ display: block;
306
+ /*width: 100%;*/
307
+ min-width: 100%\9;
308
+ text-decoration: none;
309
+ transition: color 0.5s ease;
310
+ }
311
+ .sbi_no_avatar .sbi_header_img{
312
+ background: #333;
313
+ color: #fff;
314
+ width: 50px;
315
+ height: 50px;
316
+ position: relative;
317
+ }
318
+ .sbi_no_avatar .sbi_header_hashtag_icon {
319
+ display: block;
320
+ color: #fff;
321
+ opacity: .9;
322
+ -webkit-transition: background .6s linear,color .6s linear;
323
+ -moz-transition: background .6s linear,color .6s linear;
324
+ -o-transition: background .6s linear,color .6s linear;
325
+ transition: background .6s linear,color .6s linear
326
+ }
327
+
328
+ .sbi_no_avatar:hover .sbi_header_hashtag_icon {
329
+ display: block;
330
+ opacity: 1;
331
+ -webkit-transition: background .2s linear,color .2s linear;
332
+ -moz-transition: background .2s linear,color .2s linear;
333
+ -o-transition: background .2s linear,color .2s linear;
334
+ transition: background .2s linear,color .2s linear
335
+ }
336
+ /** Medium Header */
337
+ /* Only use medium & large headers on devices above 480px */
338
+ @media all and (min-width: 480px){
339
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
340
+ width: 80px;
341
+ height: 80px;
342
+ border-radius: 40px;
343
+ }
344
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
345
+ width: 80px;
346
+ height: 80px;
347
+ border-radius: 40px;
348
+ }
349
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
350
+ font-size: 20px;
351
+ margin-left: 95px !important;
352
+ line-height: 1.4;
353
+ margin-right: -85px !important;
354
+ }
355
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
356
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
357
+ font-size: 14px;
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
+ margin-left: 95px !important;
362
+ line-height: 1.4
363
+ }
364
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
365
+ margin-top: 4px !important;
366
+ }
367
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
368
+ padding-top: 20px !important;
369
+ }
370
+ /** Large Header */
371
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
372
+ width: 120px;
373
+ height: 120px;
374
+ border-radius: 60px;
375
+ }
376
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
377
+ width: 120px;
378
+ height: 120px;
379
+ border-radius: 60px;
380
+ }
381
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
382
+ font-size: 28px;
383
+ line-height: 1.5;
384
+ margin-left: 140px !important;
385
+ margin-right: -120px !important;
386
+ }
387
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
388
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
389
+ font-size: 16px;
390
+ }
391
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
392
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
393
+ margin-left: 140px !important;
394
+ line-height: 1.5;
395
+ }
396
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
397
+ margin-top: 12px !important;
398
+ }
399
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
400
+ padding-top: 32px !important;
401
+ }
402
+ }
403
+
404
+ /* Header profile pic */
405
+ #sb_instagram .sb_instagram_header .sbi_header_img{
406
+ float: left;
407
+ position: relative;
408
+ width: 50px;
409
+ margin: 0 0 0 -100% !important;
410
+ overflow: hidden;
411
+
412
+ -moz-border-radius: 40px;
413
+ -webkit-border-radius: 40px;
414
+ border-radius: 40px;
415
+ }
416
+ #sb_instagram .sb_instagram_header .sbi_header_img img{
417
+ float: left;
418
+ margin: 0 !important;
419
+ padding: 0 !important;
420
+ border: none !important;
421
+
422
+ -moz-border-radius: 40px;
423
+ -webkit-border-radius: 40px;
424
+ border-radius: 40px;
425
+ }
426
+ /* Profile pic hover */
427
+ /* Profile pic hover */
428
+
429
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
430
+ #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
431
+ position: absolute;
432
+ top: 50%;
433
+ left: 50%;
434
+ margin-top: -12px;
435
+ margin-left: -12px;
436
+ width: 24px;
437
+ height: 24px;
438
+ font-size: 24px;
439
+ }
440
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
441
+ .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
442
+ margin-top: -18px;
443
+ margin-left: -18px;
444
+ width: 36px;
445
+ height: 36px;
446
+ font-size: 36px
447
+ }
448
+
449
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
450
+ .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
451
+ margin-top: -24px;
452
+ margin-left: -24px;
453
+ width: 48px;
454
+ height: 48px;
455
+ font-size: 48px
456
+ }
457
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
458
+ overflow: hidden;
459
+ background: url('../img/small-logo.png') no-repeat 0 0;
460
+ }
461
+
462
+ #sb_instagram .sb_instagram_header .sbi_fade_in{
463
+ opacity: 1;
464
+ transition: opacity 0.2s ease-in-out;
465
+ }
466
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
467
+ position: absolute;
468
+ width: 100%;
469
+ top: 0;
470
+ bottom: 0;
471
+ left: 0;
472
+ text-align: center;
473
+ color: #fff;
474
+ background: rgba(0,0,0,0.75);
475
+ z-index: 2;
476
+
477
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
478
+ filter: alpha(opacity=0);
479
+ -moz-opacity: 0;
480
+ opacity: 0;
481
+ border-radius: 40px;
482
+ transition: opacity 0.2s;
483
+ }
484
+ /* Fade the Instagram icon in when hovering on the header */
485
+ #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
486
+ #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
487
+ opacity: 1;
488
+ }
489
+ /* Header text */
490
+ #sb_instagram .sb_instagram_header .sbi_header_text{
491
+ float: left;
492
+ width: 100%;
493
+ padding-top: 5px;
494
+ }
495
+ #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
496
+ #sb_instagram .sb_instagram_header .sbi_header_text h3{
497
+ float: left;
498
+ clear: both;
499
+ width: auto;
500
+ margin: 0 0 0 60px !important;
501
+ padding: 0 !important;
502
+ }
503
+ #sb_instagram .sb_instagram_header h3{
504
+ font-size: 16px;
505
+ line-height: 1.3;
506
+ }
507
+ #sb_instagram .sb_instagram_header p{
508
+ font-size: 13px;
509
+ line-height: 1.3;
510
+ margin: 0;
511
+ padding: 0;
512
+ }
513
+ #sb_instagram p:empty { display: none; }
514
+ #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
515
+ margin-right: 3px !important;
516
+ }
517
+
518
+ /* No bio */
519
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
520
+ padding-top: 9px !important;
521
+ }
522
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
523
+ clear: both;
524
+ }
525
+
526
+
527
+ /* Buttons */
528
+ #sb_instagram #sbi_load{
529
+ float: left;
530
+ clear: both;
531
+ width: 100%;
532
+ text-align: center;
533
+ opacity: 1;
534
+ transition: all 0.5s ease-in;
535
+ }
536
+ #sb_instagram #sbi_load .fa-spinner{
537
+ display: none;
538
+ position: absolute;
539
+ top: 50%;
540
+ left: 50%;
541
+ margin: -8px 0 0 -7px;
542
+ font-size: 15px;
543
+ }
544
+ #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
545
+ opacity: 1;
546
+ transition: all 0.1s ease-in;
547
+ }
548
+ #sb_instagram .sbi_hidden{
549
+ opacity: 0 !important;
550
+ }
551
+ #sb_instagram #sbi_load .sbi_load_btn{
552
+ display: inline-block;
553
+ vertical-align: top;
554
+ zoom: 1;
555
+
556
+ padding: 7px 14px;
557
+ margin: 5px auto 0 auto;
558
+ background: #333;
559
+ border: none;
560
+ color: #fff;
561
+ text-decoration: none;
562
+ font-size: 13px;
563
+ line-height: 1.5;
564
+ border-radius: 4px;
565
+ box-sizing: border-box;
566
+ }
567
+
568
+ #sb_instagram .sbi_follow_btn a{
569
+ display: inline-block;
570
+ vertical-align: top;
571
+ zoom: 1;
572
+ padding: 7px 14px;
573
+ margin: 5px auto 0 auto;
574
+ border: none;
575
+ text-decoration: none;
576
+ font-size: 13px;
577
+ line-height: 1.5;
578
+ border-radius: 4px;
579
+ box-sizing: border-box;
580
+ background: #408bd1;
581
+ color: #fff;
582
+ transition: all 0.1s ease-in;
583
+ }
584
+ #sb_instagram #sbi_load .sbi_load_btn {
585
+ position: relative;
586
+ }
587
+ /* Follow button */
588
+ #sb_instagram .sbi_follow_btn{
589
+ display: inline-block;
590
+ vertical-align: top;
591
+ zoom: 1;
592
+ text-align: center;
593
+ }
594
+ #sb_instagram .sbi_follow_btn.sbi_top{
595
+ display: block;
596
+ margin-bottom: 5px;
597
+ }
598
+
599
+ #sb_instagram #sbi_load .sbi_load_btn{
600
+ transition: all 0.1s ease-in;
601
+ }
602
+ /* Hover state for default colors */
603
+ #sb_instagram #sbi_load .sbi_load_btn:hover{
604
+ outline: none;
605
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
606
+ }
607
+ #sb_instagram .sbi_follow_btn a:hover,
608
+ #sb_instagram .sbi_follow_btn a:focus{
609
+ outline: none;
610
+ box-shadow: inset 0 0 10px 20px #359dff;
611
+ }
612
+ /* If a custom color is applied then just use opacity for the hover effect */
613
+ #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
614
+ #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
615
+ #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
616
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
617
+ }
618
+ /* Active state */
619
+ #sb_instagram .sbi_follow_btn a:active,
620
+ #sb_instagram #sbi_load .sbi_load_btn:active{
621
+ box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
622
+ }
623
+
624
+ #sb_instagram .sbi_follow_btn .fa,
625
+ #sb_instagram .sbi_follow_btn svg{
626
+ margin-bottom: -1px;
627
+ margin-right: 7px;
628
+ font-size: 15px;
629
+ }
630
+ #sb_instagram .sbi_follow_btn svg{
631
+ vertical-align: -.125em;
632
+ }
633
+ #sb_instagram #sbi_load .sbi_follow_btn{
634
+ margin-left: 5px;
635
+ }
636
+
637
+ /* Error messages */
638
+ #sb_instagram .sb_instagram_error{
639
+ width: 100%;
640
+ text-align: center;
641
+ line-height: 1.4;
642
+ }
643
+
644
+ /* Mod only error msgs */
645
+ #sbi_mod_error{
646
+ display: none;
647
+ border: 1px solid #ddd;
648
+ background: #eee;
649
+ color: #333;
650
+ margin: 10px 0 0;
651
+ padding: 10px 15px;
652
+ font-size: 13px;
653
+ text-align: center;
654
+ clear: both;
655
+
656
+ -moz-border-radius: 4px;
657
+ -webkit-border-radius: 4px;
658
+ border-radius: 4px;
659
+ }
660
+ #sbi_mod_error br {
661
+ display: initial !important;
662
+ }
663
+ #sbi_mod_error p{
664
+ padding: 5px 0 !important;
665
+ margin: 0 !important;
666
+ line-height: 1.3 !important;
667
+ }
668
+ #sbi_mod_error ol,
669
+ #sbi_mod_error ul{
670
+ padding: 5px 0 5px 20px !important;
671
+ margin: 0 !important;
672
+ }
673
+ #sbi_mod_error li{
674
+ padding: 1px 0 !important;
675
+ margin: 0 !important;
676
+ }
677
+ #sbi_mod_error span{
678
+ font-size: 12px;
679
+ }
680
+
681
+ /* Medium */
682
+ #sb_instagram.sbi_medium .sbi_playbtn,
683
+ #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
684
+ margin-top: -12px;
685
+ margin-left: -9px;
686
+ font-size: 23px;
687
+ }
688
+ #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
689
+ right: 8px;
690
+ top: 8px;
691
+ font-size: 18px;
692
+ }
693
+ /* Small */
694
+ #sb_instagram.sbi_small .sbi_playbtn,
695
+ #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
696
+ margin-top: -9px;
697
+ margin-left: -7px;
698
+ font-size: 18px;
699
+ }
700
+ #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
701
+ right: 5px;
702
+ top: 5px;
703
+ font-size: 12px;
704
+ }
705
+
706
+ /* Media queries */
707
+ @media all and (max-width: 640px){
708
+ /* Make 3-6 cols into 2 col */
709
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
710
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
711
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
712
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
713
+ width: 50%;
714
+ }
715
+ /* Make 7-10 cols into 4 col */
716
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
717
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
718
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
719
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
720
+ width: 25%;
721
+ }
722
+ /* On mobile make the min-width 100% */
723
+ #sb_instagram.sbi_width_resp{
724
+ width: 100% !important;
725
+ }
726
+ }
727
+ @media all and (max-width: 480px){
728
+ /* Make all cols into 1 col */
729
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
730
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
731
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
732
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
733
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
734
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
735
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
736
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
737
+ width: 100%;
738
+ }
739
+ }
740
+
741
+ /* NO JS */
742
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
743
+ box-sizing: border-box;
744
+ position: relative;
745
+ overflow: hidden;
746
+ }
747
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
748
+ content: "";
749
+ display: block;
750
+ padding-top: 100%;
751
+ z-index: -300;
752
+ }
753
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
754
+ position: absolute;
755
+ top: 0;
756
+ left: 0;
757
+ bottom: 0;
758
+ right: 0;
759
+ }
760
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
761
+ opacity: 1;
762
+ }
763
+ #sb_instagram.sbi_no_js .sbi_photo img,
764
+ #sb_instagram.sbi_no_js .sbi_load_btn{
765
+ display: none;
766
+ }
767
+ #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
768
+ padding-bottom: 0 !important;
769
+ }
770
+ #sb_instagram #sbi_mod_error .sb_frontend_btn {
771
+ display: inline-block;
772
+ padding: 6px 10px;
773
+ background: #ddd;
774
+ background: rgba(0,0,0,.1);
775
+ text-decoration: none;
776
+ border-radius: 5px;
777
+ margin-top: 10px;
778
+ color: #444
779
+ }
780
+
781
+ #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
782
+ background: #ccc;
783
+ background: rgba(0,0,0,.15)
784
+ }
785
+
786
+ #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
787
+ margin-right: 2px
788
  }
css/sb-instagram-2-2.min.css CHANGED
File without changes
css/sb-instagram-admin.css CHANGED
@@ -1,2872 +1,2872 @@
1
- #sbi_admin{
2
- overflow: hidden;
3
- }
4
- #sbi_admin #header{
5
- padding: 0 0 10px 0;
6
- }
7
- #sbi_admin h3{
8
- padding: 15px 0 0 0;
9
- }
10
- #sbi_admin .sbi_tooltip,
11
- #sbi_admin .sbi_extra_info{
12
- width: 80%;
13
- display: none;
14
-
15
- padding: 10px 15px;
16
- margin: 10px 0;
17
- font-size: 13px;
18
- background: #f9f9f9;
19
- background: rgba(255,255,255,0.8);
20
-
21
- -moz-border-radius: 8px;
22
- -webkit-border-radius: 8px;
23
- border-radius: 8px;
24
- }
25
- #sbi_admin .sbi_more_info p{
26
- font-size: 13px;
27
- }
28
- #sbi_admin .sbi_tooltip ul{
29
- margin-top: 0;
30
- margin-bottom: 0;
31
- }
32
- #sbi_admin .sbi_tooltip li{
33
- padding: 4px 0;
34
- }
35
- #sbi_admin .sbi_tooltip_link,
36
- #sbi_admin .sbi_external_link{
37
- font-size: 13px;
38
- margin-left: 10px;
39
- }
40
- #sbi_admin hr{
41
- border: none;
42
- margin: 15px 0;
43
- border-bottom: 1px solid #ccc;
44
- }
45
-
46
- /* Instagram btn */
47
- #sbi_admin .sbi_admin_btn,
48
- #sbi_admin .sbi-oembed-connect-btn{
49
- display: block;
50
- float: left;
51
- clear: both;
52
- padding: 0 21px;
53
- height: 47px;
54
- line-height: 47px;
55
- font-size: 14px;
56
-
57
- background: #386793;
58
-
59
- color: #e9eef3;
60
- text-decoration: none;
61
-
62
- -moz-border-radius: 5px;
63
- -webkit-border-radius: 5px;
64
- border-radius: 5px;
65
-
66
- -moz-transition: all 0.5s ease-in-out;
67
- -webkit-transition: all 0.5s ease-in-out;
68
- -o-transition: all 0.5s ease-in-out;
69
- transition: all 0.5s ease-in-out;
70
- }
71
- #sbi_admin .sbi_admin_btn{
72
- padding: 0 21px 0 160px;
73
- background: #386793 url('../img/small-logo.png') no-repeat 16px 11px;
74
- }
75
- #sbi_admin .sbi-oembed-connect-btn i {
76
- margin-right: 5px;
77
- font-size: 18px;
78
- position: relative;
79
- top: 1px;
80
- }
81
- #sbi_admin .sbi_admin_btn:hover,
82
- #sbi_admin .sbi-oembed-connect-btn:hover{
83
- background-color: #3880c4;
84
- color: #fff;
85
-
86
- -moz-transition: all 0.1s ease-in-out;
87
- -webkit-transition: all 0.1s ease-in-out;
88
- -o-transition: all 0.1s ease-in-out;
89
- transition: all 0.1s ease-in-out;
90
- }
91
- .sb_get_token .submit {
92
- display: inline-block;
93
- margin: 0 0 0 10px;
94
- padding: 0;
95
- }
96
- #sbi_admin .sbi-success {
97
- position: relative;
98
- top: -1px;
99
-
100
- background: #68a30b;
101
- color: #fff;
102
- font-size: 13px;
103
- text-transform: capitalize;
104
- padding: 4px 8px 5px 8px;
105
- margin-left: 5px;
106
- border-radius: 3px;
107
- }
108
- #sbi_admin .sbi-customize-tab-opt .sbi-success {
109
- top: 5px;
110
- }
111
- #sbi_admin .sbi_note,
112
- #sbi_admin .sbi_aside{
113
- font-size: 12px;
114
- font-style: italic;
115
- }
116
- #sbi_admin .sbi_note,
117
- #sbi_admin .sbi-space-left{
118
- margin-left: 10px;
119
- }
120
- #sbi_admin table.sbi_shortcode_table{
121
- border-collapse: collapse;
122
- }
123
- #sbi_admin table.sbi_shortcode_table th,
124
- #sbi_admin table.sbi_shortcode_table td{
125
- border: 1px solid #999;
126
- padding: 0.5rem;
127
- text-align: left;
128
- }
129
- #sbi_admin table.sbi_shortcode_table th{
130
- background: rgba(0,0,0,0.1);
131
- }
132
- #sbi_admin table.sbi_shortcode_table td{
133
- background: rgba(255,255,255,0.5);
134
- }
135
- #sbi_admin .sbi_table_header{
136
- background: #ddd;
137
- font-weight: bold;
138
- }
139
-
140
- #sbi_admin .sbi_radio_label{
141
- width: 95px;
142
- padding-top: 5px;
143
-
144
- display: inline-block;
145
- vertical-align: top;
146
- zoom: 1;
147
- }
148
-
149
- /* Config info */
150
- #sbi_config{
151
- float: left;
152
- width: 100%;
153
- clear: both;
154
- margin: 10px 0 10px 0;
155
- }
156
- #sbi_config_info{
157
- float: left;
158
- clear: both;
159
- padding: 5px 15px;
160
- margin: 10px 0 0 0;
161
-
162
- border: 1px solid #ddd;
163
-
164
- -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
165
- box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
166
-
167
- border-radius: 2px;
168
- box-sizing: border-box;
169
- position: fixed;
170
- z-index: 999;
171
- width: 100%;
172
- top: 0;
173
- right: 0;
174
- bottom: 0;
175
- left: 0;
176
-
177
- background: rgba(0,0,0,0.3);
178
- }
179
- /* Caching settings */
180
- #sbi_admin #sbi-caching-time-settings{
181
- display: inline-block;
182
- }
183
- #sbi_admin .sbi-caching-cron-options .submit{
184
- display: inline-block;
185
- margin: 0;
186
- padding: 0;
187
- }
188
- #sbi_admin .sbi-caching-sched-notice{
189
- font-size: 11px;
190
- display: block;
191
- width: 100%;
192
- }
193
- #sbi_admin .sbi-caching-sched-notice span{
194
- color: green;
195
- background: #e5eae1;
196
- padding: 5px 10px;
197
- border-radius: 5px;
198
- border: 1px solid #ccd3c6;
199
- display: inline-block;
200
- }
201
-
202
- /* License */
203
- #sbi_admin .sbi_license_status{
204
- display: inline-block;
205
- vertical-align: top;
206
- zoom: 1;
207
-
208
- padding: 5px;
209
- }
210
-
211
- /* Add Facebook dashicon to CFF admin menu */
212
- #toplevel_page_sb-instagram-feed .toplevel_page_sb-instagram-feed .wp-menu-image:before{
213
- content: "\f306";
214
- }
215
-
216
- /* Pro only notices */
217
- #sbi_admin .sbi_row{
218
- display: block;
219
- width: 100%;
220
- clear: left;
221
- }
222
- #sbi_admin .sbi_cron_cache_opts .sbi_row{
223
- padding: 3px 0;
224
- }
225
- #sbi_admin .sbi_cron_cache_opts .sbi_row label {
226
- display: inline-block;
227
- margin: 5px 2px 0 0;
228
- }
229
- #sbi_admin .sbi_pro,
230
- #sbi_admin .sbi_pro label,
231
- #sbi_admin .sbi_pro input,
232
- #sbi_admin .sbi_pro select{
233
- color: #999 !important;
234
- }
235
- #sbi_admin .sbi_shortcode_table tr.sbi_pro{
236
- background: #eacccc;
237
- }
238
- #sbi_admin .sbi_table_key{
239
- display: block;
240
- float: left;
241
- width: 11px;
242
- height: 11px;
243
- border: 1px solid #999;
244
- background: #eacccc;
245
- margin: 3px 6px 0 0;
246
- }
247
- #sbi_admin .sbi_plugins_promo,
248
- #sbi_admin .sbi_share_plugin{
249
- width: 100%;
250
- float: left;
251
- clear: both;
252
- }
253
- #sbi_admin .sbi_plugins_promo a{
254
- color: #e34f0e;
255
- }
256
- #sbi_admin .sbi_share_plugin{
257
- border-top: 1px solid #ccc;
258
- margin: 20px 0 0 0;
259
- }
260
-
261
- /* Quick links */
262
- #sbi_admin .sb_instagram_contents_links{
263
- float: left;
264
- clear: both;
265
- width: 100%;
266
- padding-bottom: 12px;
267
- border-bottom: 1px solid #ccc;
268
- margin-bottom: 15px;
269
- }
270
- #sbi_admin .sb_instagram_contents_links a,
271
- #sbi_admin .sb_instagram_contents_links span{
272
- display: block;
273
- float: left;
274
- padding: 2px 5px;
275
- }
276
- #sbi_admin .sb_instagram_contents_links span{
277
- padding-left: 0;
278
- }
279
-
280
- #sbi_admin #sb_instagram_width_options{
281
- margin-top: 5px;
282
- display: none;
283
- }
284
- #sbi_admin #sb_instagram_width_options label {
285
- font-size: 13px;
286
- position: relative;
287
- top: -2px;
288
- }
289
-
290
- /* Shortcode labels */
291
- #sbi_admin label{
292
- position: relative;
293
- }
294
- #sbi_admin th{
295
- position: relative;
296
- }
297
- #sbi_admin .sbi_shortcode{
298
- display: none;
299
- position: absolute;
300
- z-index: 10;
301
- font-size: 11px;
302
- float: left;
303
- width: auto;
304
- white-space: pre-line;
305
- line-height: 1.4;
306
- }
307
- #sbi_admin .sbi_shortcode_symbol{
308
- position: absolute;
309
- right: -24px;
310
- bottom: 0;
311
- padding: 2px 4px 3px 3px;
312
- width: auto;
313
- font-size: 11px;
314
- margin-left: 5px;
315
- }
316
-
317
- /* Quick start */
318
- #sbi_admin .sbi_quickstart{
319
- display: block;
320
- float: left;
321
- clear: both;
322
- margin: 15px 0 0 0;
323
- padding: 15px 20px;
324
- min-width: 808px;
325
-
326
- border: 1px solid #ccc;
327
- background: #eee;
328
- background: rgba(255,255,255,0.5);
329
-
330
- -moz-border-radius: 5px;
331
- -webkit-border-radius: 5px;
332
- border-radius: 5px;
333
- }
334
- #sbi_admin .sbi_quickstart h3,
335
- #sbi_admin .sbi_quickstart p{
336
- margin: 0;
337
- padding: 5px 0;
338
- }
339
-
340
- /* Error notice */
341
- #sbi_admin .sbi_alert,
342
- #sbi_admin .sbi_alert .sbi_tooltip {
343
- background: #F7E6E6;
344
- border-color: #BA7B7B;
345
- color: #592626;
346
- }
347
- #sbi_admin .sbi_notice{
348
- margin-top: 5px;
349
- background: #f9ecda;
350
- padding: 5px 10px;
351
- border: 1px solid #e89a2e;
352
- color: #cf6100;
353
-
354
- -moz-border-radius: 3px;
355
- -webkit-border-radius: 3px;
356
- border-radius: 3px;
357
- }
358
- #sbi_admin .sbi_nojs_notice a{
359
- color: #d85600;
360
- }
361
- #sbi_admin .sbi_nojs_notice a:hover,
362
- #sbi_admin .sbi_nojs_notice a:focus{
363
- color: #a34100;
364
- }
365
- #sbi_admin .sbi_nojs_notice p{
366
- margin: 0;
367
- padding: 5px 0;
368
- font-size: 13px;
369
- }
370
- #sbi_admin .sbi_user_id_error,
371
- #sbi_admin .sbi_other_user_error{
372
- display: none;
373
-
374
- margin: 10px 0;
375
- background: #F7E6E6;
376
- padding: 5px 10px;
377
- border: 1px solid #BA7B7B;
378
- color: #592626;
379
-
380
- -moz-border-radius: 3px;
381
- -webkit-border-radius: 3px;
382
- border-radius: 3px;
383
- }
384
- .sbi_alert {
385
- background: #F7E6E6;
386
- border-color: #BA7B7B;
387
- color: #592626;
388
- }
389
-
390
- /* Update notice */
391
- .sb_instagram_notice{
392
- position: relative;
393
- clear: both;
394
- width: 96%;
395
- margin: 20px 0;
396
- background: #F7E6E6;
397
- padding: 15px 1.5%;
398
- border: 1px solid #BA7B7B;
399
- color: #592626;
400
-
401
- -moz-border-radius: 3px;
402
- -webkit-border-radius: 3px;
403
- border-radius: 3px;
404
- }
405
- #sbi_admin .sbi-goto {
406
- border: 1px solid #e89a2e;
407
- background-color: rgba(232, 154, 46, .2);
408
- }
409
- #sbi_admin .sbi-goto th {
410
- padding-left: 4px;
411
- }
412
- .sb_instagram_notice .sb_instagram_notice_title{
413
- font-size: 18px;
414
- padding-bottom: 5px;
415
- }
416
- .sb_instagram_notice p{
417
- padding: 0;
418
- margin: 0;
419
- font-size: 14px;
420
- }
421
- .sb_instagram_dismiss{
422
- position: absolute;
423
- top: 10px;
424
- right: 10px;
425
- color: #dd3d36;
426
- text-decoration: none;
427
- }
428
-
429
- /* Review notice */
430
- .sbi_notice{
431
- position: relative;
432
- overflow: hidden;
433
- clear: both;
434
- max-width: 865px;
435
- margin-top: 10px;
436
- padding: 10px 10px 7px 10px;
437
-
438
- background: #E6F0E8;
439
- border: 1px solid #6AB074;
440
- color: #214F28;
441
- }
442
- .sbi_notice .sbi_thumb{
443
- position: relative;
444
- display: inline-block;
445
- width: 74px;
446
- margin: 0 0 0 -100% !important;
447
-
448
- -moz-border-radius: 4px;
449
- -webkit-border-radius: 4px;
450
- border-radius: 4px;
451
- }
452
- .sbi_notice .sbi_thumb .img-overlay {
453
- position: absolute;
454
- bottom: 4px;
455
- padding: 6px 7px 6px 5px;
456
- font-size: 13px;
457
- font-weight: bold;
458
- background: #fff;
459
- background: rgba(255,255,255,0.85);
460
- line-height: 1;
461
- color: #333;
462
- box-shadow: 1px -1px 3px 0 rgba(0,0,0,0.15);
463
- }
464
- .sbi_notice .sbi_thumb img {
465
- max-width: 100%;
466
- }
467
- .sbi_notice .sbi-notice-text{
468
- float: left;
469
- clear: none;
470
- width: 100%;
471
- padding: 0;
472
- }
473
- .sbi_notice .sbi-links{
474
- margin-top: 4px !important;
475
- }
476
- .sbi_notice p{
477
- float: left;
478
- clear: both;
479
- width: auto;
480
- margin: 0 0 0 90px !important;
481
- padding: 2px 40px 2px 0;
482
- line-height: 1.4;
483
- }
484
- .sbi_notice a{
485
- display: inline-block;
486
- padding: 0 8px;
487
- color: #178529;
488
- }
489
- .sbi_notice a:hover,
490
- .sbi_notice a:focus{
491
- color: #0c7abf;
492
- }
493
- .sbi_notice .links{
494
- margin: 0 0 0 90px !important;
495
- padding: 4px 0 0 0;
496
- margin-top: 1px !important;
497
- }
498
- .sbi_review_notice .links{
499
- margin-left: 82px !important;
500
- margin-top: 0 !important;
501
- }
502
- .sbi_notice .sbi_notice_close,
503
- .sbi_notice .sbi_bfcm_sale_notice_close,
504
- .sbi_notice .sbi_new_user_sale_notice_close {
505
- position: absolute;
506
- top: 0;
507
- right: 0;
508
- padding: 10px;
509
- line-height: 1;
510
- }
511
- .sbi_notice .sbi_notice_close:hover,
512
- .sbi_notice .sbi_notice_close:focus{
513
- color: #a34100;
514
- }
515
- .sbi_notice strong span {
516
- font-weight: 900;
517
- }
518
- /* Notice CTA btn */
519
- .sbi_notice .sbi_offer_btn,
520
- .sbi_notice .sbi_main_cta{
521
- padding: 4px 12px 6px 12px;
522
- background: green;
523
- color: #fff;
524
- border-radius: 4px;
525
- display: inline-block;
526
- text-decoration: none;
527
- margin-left: 0;
528
- margin-right: 4px;
529
- }
530
- .sbi_notice .sbi_offer_btn:hover,
531
- .sbi_notice .sbi_offer_btn:focus,
532
- .sbi_notice .sbi_main_cta:hover,
533
- .sbi_notice .sbi_main_cta:focus{
534
- background: #049404;
535
- color: #fff;
536
- }
537
- .sbi_notice .sbi_other_notice{
538
- padding-top: 10px;
539
- font-style: italic;
540
- font-size: 12px;
541
- }
542
- .sbi_notice .sbi_other_notice a{
543
- padding: 0;
544
- }
545
- .sbi_notice .links > .sbi_main_cta:first-child {
546
- margin-left: 8px;
547
- }
548
-
549
- /* Support page */
550
- #sbi_admin .sbi_support{
551
- overflow: hidden;
552
- margin-bottom: 20px;
553
- width: 70%;
554
- }
555
- #sbi_admin .sbi_support p{
556
- width: 100%;
557
- float: left;
558
- clear: both;
559
- margin: 0 0 20px 0;
560
- }
561
- #sbi_admin .sbi-support-title{
562
- font-weight: bold;
563
- font-size: 16px;
564
- display: block;
565
- padding-bottom: 5px;
566
- }
567
- #sbi_admin .sbi-support-faqs{
568
- float: left;
569
- clear: both;
570
- width: 100%;
571
- padding-left: 5%;
572
- margin: -10px 0 10px 0;
573
- }
574
- #sbi_admin .sbi-support-faqs ul{
575
- float: left;
576
- width: 250px;
577
- margin-right: 0;
578
- }
579
- #sbi_admin .sbi-support-faqs ul li{
580
- font-size: 13px;
581
- margin-bottom: 4px;
582
- }
583
- #sbi_admin .sbi-support-faqs .fa-chevron-right{
584
- font-size: 8px;
585
- margin-left: 4px;
586
- }
587
- #sbi_admin #sbi-support-video{
588
- margin-top: 10px;
589
- border: 1px solid #ddd;
590
- display: none;
591
- }
592
- #sbi_admin .sb_get_token .button-primary:active {
593
- height: 28px;
594
- margin-top: -4px;
595
- }
596
-
597
- /* Pro header options - greyed out */
598
- #sbi_admin #sb_instagram_header_style_boxed_options{
599
- display: block;
600
- float: left;
601
- clear: both;
602
- overflow: hidden;
603
- width: auto;
604
- padding: 10px 10px 0 10px;
605
- background: rgba(255,255,255,0.5);
606
- font-size: 12px;
607
- line-height: 22px;
608
- }
609
- #sbi_admin #sb_instagram_header_style_boxed_options label{
610
- height: 25px;
611
- display: inline-block;
612
- line-height: 25px;
613
- position: relative;
614
- top: -10px;
615
- margin-right: 10px;
616
- }
617
- /* Moderation settings */
618
- #sbi_admin .sb_instagram_box,
619
- #sbi_admin .sbi_mod_manual_settings{
620
- float: left;
621
- clear: both;
622
- width: 96%;
623
-
624
- padding: 10px 2%;
625
- margin: 10px 0;
626
- font-size: 13px;
627
- background: #f9f9f9;
628
- background: rgba(255,255,255,0.8);
629
-
630
- -moz-border-radius: 8px;
631
- -webkit-border-radius: 8px;
632
- border-radius: 8px;
633
- }
634
- #sbi_admin .sbi_mod_manual_settings .sbi_row{
635
- padding: 15px 0 15px 0;
636
- }
637
- #sbi_admin .sbi_mod_manual_settings label{
638
- display: block;
639
- font-weight: bold;
640
- font-size: 14px;
641
- padding-bottom: 10px;
642
- }
643
- #sbi_admin .sbi_mod_manual_settings .sbi_tooltip{
644
- width: 98%;
645
- padding: 10px 1%;
646
- background: #eee;
647
- background: rgba(0,0,0,0.05);
648
- }
649
- #sbi_admin .sb_instagram_apply_labels p{
650
- display: inline-block;
651
- margin: 0 2px 5px 0;
652
- }
653
- #sbi_admin .sb_instagram_apply_labels input{
654
- margin: 0 4px 0 8px;
655
- }
656
- #sbi_admin .sbi_white_list_names_wrapper{
657
- display: inline-block;
658
- margin-right: 10px;
659
- }
660
-
661
- /* Show Pro Options button */
662
- #sbi_admin .sbi-show-pro{
663
- margin-top: 10px;
664
- text-align: center;
665
- }
666
- #sbi_admin .sbi-pro-options{
667
- display: none;
668
- }
669
- #sbi_admin .sbi-upgrade-link{
670
- margin: 25px 0 5px 0;
671
- }
672
-
673
- #sbi_admin .sbi-pro-notice,
674
- #sbi_admin .sbi-pro-notice img{
675
- display: block;
676
- float: left;
677
- clear: both;
678
- margin: 20px 0 0 0;
679
- overflow: hidden;
680
-
681
- -moz-border-radius: 4px;
682
- -webkit-border-radius: 4px;
683
- border-radius: 4px;
684
-
685
- -moz-transition: all 0.5s ease-in-out;
686
- -webkit-transition: all 0.5s ease-in-out;
687
- -o-transition: all 0.5s ease-in-out;
688
- transition: all 0.5s ease-in-out;
689
- }
690
- #sbi_admin .sbi-pro-notice img{
691
- margin: 0;
692
- }
693
- #sbi_admin .sbi-pro-notice:hover{
694
- opacity: 0.95;
695
-
696
- -moz-transition: all 0.1s ease-in-out;
697
- -webkit-transition: all 0.1s ease-in-out;
698
- -o-transition: all 0.1s ease-in-out;
699
- transition: all 0.1s ease-in-out;
700
- }
701
- /* Connected Accounts */
702
- #sbi_admin .sbi_connected_account {
703
- position: relative;
704
- box-sizing: border-box;
705
- padding: 10px 86px 10px 10px;
706
- border-radius: 5px;
707
- background: #fff;
708
- margin-bottom: 5px;
709
- overflow: hidden;
710
- clear: both;
711
- border: 1px solid #ddd;
712
- }
713
- #sbi_admin .sbi_ca_username {
714
- line-height: 1.4;
715
- margin-left: 15px;
716
- float: left;
717
- font-size: 18px;
718
- }
719
- #sbi_admin .sbi_connected_account .sbi_ca_avatar{
720
- margin-right: 15px;
721
- }
722
- #sbi_admin .sbi_connected_account .sbi_ca_username {
723
- margin-left: 0;
724
- margin-right: 15px;
725
- }
726
- #sbi_admin .sbi_connected_account .sbi_ca_username strong{
727
- float: left;
728
- }
729
- #sbi_admin .sbi_connected_account .sbi_ca_username span{
730
- font-size: 10px;
731
- font-weight: normal;
732
- text-transform: uppercase;
733
- padding: 0;
734
- margin: 0;
735
- display: block;
736
- }
737
-
738
- #sbi_admin .sbi_ca_actions {
739
- display: inline-block;
740
- }
741
- #sbi_admin .sbi_ca_actions .fa{
742
- margin-right: 5px;
743
- }
744
- #sbi_admin .sbi_ca_actions a.button-primary,
745
- #sbi_admin .sbi_ca_actions a.button-secondary,
746
- #sbi_admin .sbi_ca_accesstoken a.sbi_ca_token_shortcode {
747
- font-size: 12px;
748
- padding: 4px 6px;
749
- height: auto;
750
- line-height: 1.4;
751
- margin: 7px 5px 0 0;
752
- min-height: 1px;
753
- }
754
- #sbi_admin .sbi_ca_at_is_valid {
755
- margin-top: 10px;
756
- display: none;
757
- }
758
-
759
- #sbi_admin .sbi_is_private .sbi_tooltip_link{
760
- top: 1px !important;
761
- margin: 0 -5px 0 5px;
762
- }
763
-
764
- .sbi_is_private,
765
- .sbi_warning {
766
- position: relative;
767
- display: inline-block;
768
- font-size: 12px;
769
- padding: 4px 4px 4px 8px;
770
- vertical-align: top;
771
- margin: 6px 5px 0 0;
772
- border-radius: 4px;
773
-
774
- background: #fdf4e5;
775
- border: 1px solid #e6bc88;
776
- color: #94570c;
777
- }
778
- #sbi_admin .sbi_warning,
779
- .sbi-oembed-button .sb_instagram_notice{
780
- clear: both;
781
- padding: 20px 30px;
782
- border-radius: 3px;
783
- }
784
- .sbi-oembed-button .sb_instagram_notice p {
785
- font-size: 13px;
786
- line-height: 1.5;
787
- margin: 1em 0;
788
- }
789
- .sbi_is_private > span {
790
- display: inline-block;
791
- padding-top: 3px;
792
- }
793
- #sbi_admin .sbi_is_private a.button.button-secondary {
794
- margin: 0 0 0 5px;
795
- padding: 2px 6px;
796
- }
797
-
798
- @-webkit-keyframes sbi_flash {
799
- 0% {
800
- background-color: #cae2a5;
801
- opacity:1;
802
- border: 1px solid #b2ce88;
803
- }
804
- 100% {
805
- background-color: #fff;
806
- }
807
- }
808
- #sbi_admin .sbi_account_updated{
809
- border: 1px solid #ddd;
810
- background: #fff;
811
-
812
- -webkit-animation-name: sbi_flash;
813
- -webkit-animation-duration: 700ms;
814
- -webkit-animation-iteration-count: 1;
815
- -webkit-animation-timing-function: linear;
816
- -moz-animation-name: sbi_flash;
817
- -moz-animation-duration: 700ms;
818
- -moz-animation-iteration-count: 1;
819
- -moz-animation-timing-function: linear;
820
- }
821
-
822
- #sbi_admin .sbi_account_active{
823
- border: 1px solid #b2ce88;
824
- background: #ecf2e3;
825
- }
826
-
827
- #sbi_admin .sbi_ca_alert {
828
- display: none;
829
- }
830
- #sbi_admin .sbi_account_invalid .sbi_ca_alert {
831
- display: block;
832
- }
833
- #sbi_admin .sbi_ca_avatar{
834
- float: left;
835
- width: 40px;
836
- height: 40px;
837
- border-radius: 5px;
838
- }
839
- #sbi_admin .sbi_ca_accesstoken{
840
- display: none;
841
- width: 100%;
842
- float: left;
843
- clear: both;
844
- margin-top: 10px;
845
- }
846
- #sbi_admin .sbi_ca_token_label{
847
- display: inline-block;
848
- position: relative;
849
- background: #f9f9f9;
850
- color: #555;
851
- padding: 3px 5px;
852
- font-size: 12px;
853
- border: 1px solid #d6d6d6;
854
- height: 16px;
855
- line-height: 15px;
856
- border-radius: 4px 0 0 4px;
857
- min-width: 80px;
858
- margin-bottom: 2px;
859
- }
860
- #sbi_admin .sbi_permissions_desc,
861
- #sbi_admin .sbi_ca_token,
862
- #sbi_admin .sbi_ca_user_id {
863
- padding: 3px 10px;
864
- }
865
- #sbi_admin .sbi_permissions_desc{
866
- font-size: 13px;
867
- }
868
-
869
- #sbi_admin .sbi_ca_token,
870
- #sbi_admin .sbi_ca_user_id{
871
- position: relative;
872
- padding: 3px 10px;
873
- border: 1px solid #d6d6d6;
874
- border-left: none;
875
- font-size: 12px;
876
- border-radius: 0 4px 4px 0;
877
- background: rgba(255,255,255,0.8);
878
- min-width: 400px;
879
- width: 75%;
880
- display: inline-block;
881
- margin-left: 0;
882
- min-height: 1px;
883
- line-height: 1.4;
884
- }
885
- #sbi_admin .sbi_ca_accesstoken a.sbi_ca_token_shortcode{
886
- margin: 0 8px 8px;
887
- padding: 6px;
888
- height: auto;
889
- line-height: 1;
890
- }
891
-
892
- #sbi_admin .sbi_delete_account{
893
- position: absolute;
894
- right: 10px;
895
- top: 10px;
896
-
897
- padding: 5px 10px;
898
- background: rgba(0,0,0,0.05);
899
- color: #666;
900
- border-radius: 50px;
901
- text-decoration: none;
902
- font-size: 12px;
903
- }
904
- #sbi_admin .sbi_delete_account:hover,
905
- #sbi_admin .sbi_delete_account:focus{
906
- background: #333;
907
- color: #ddd;
908
- }
909
- #sbi_admin .sbi_delete_account .sbi_remove_text{
910
- margin-left: 5px;
911
- }
912
-
913
- .sbi_connected_accounts_wrap{
914
- vertical-align: top;
915
- }
916
- #sbi_admin .sbi_no_accounts{
917
- display: inline-block;
918
- padding: 4px 15px;
919
- border-radius: 8px;
920
- background: rgba(255,255,255,0.8);
921
- margin-bottom: 3px;
922
- }
923
- #sbi_admin #sbi_manual_submit:active{
924
- vertical-align: unset;
925
- }
926
- #sbi_admin .sbi_manually_connect_wrap{
927
- padding-top: 5px;
928
- }
929
- #sbi_admin .sbi_user_feed_account_wrap:first-child,
930
- #sbi_admin .sbi_tagged_feed_account_wrap:first-child{
931
- padding-top: 5px;
932
- }
933
- #sbi_admin .sbi_user_feed_account_wrap:last-child,
934
- #sbi_admin .sbi_tagged_feed_account_wrap:last-child{
935
- padding-bottom: 6px;
936
- }
937
- #sbi_admin .sbi_user_feed_account_wrap,
938
- #sbi_admin .sbi_tagged_feed_account_wrap{
939
- padding-bottom: 5px;
940
- padding-left: 2px;
941
- }
942
- #sbi_admin .sbi_user_feed_account_wrap span,
943
- #sbi_admin .sbi_tagged_feed_account_wrap span{
944
- font-size: 13px;
945
- }
946
- #sbi_admin .sbi_manual_account_id_toggle label{
947
- display: block;
948
- margin: 10px 0 0 0;
949
- font-size: 13px;
950
- }
951
- #sbi_admin .sbi_business_profile_tag{
952
- display: none;
953
- padding: 8px 10px;
954
- background: rgba(0,0,0,0.05);
955
- border-radius: 0 5px 5px 0;
956
- margin: 0 0 0 -2px;
957
- font-size: 13px;
958
- height: 15px;
959
- line-height: 15px;
960
- box-shadow: inset 0 0 1px rgba(0,0,0,.5);
961
- }
962
- #sbi_admin .sbi_ca_info{
963
- overflow: hidden;
964
- }
965
- #sbi_admin .sbi_ca_show_token{
966
- display: inline-block;
967
- padding: 10px 5px 0px 5px;
968
- margin: 0;
969
- font-size: 12px;
970
- vertical-align: top;
971
- }
972
- #sbi_admin .sbi_ca_shortcode{
973
- display: none;
974
- padding: 0;
975
- width: 100%;
976
- float: left;
977
- clear: both;
978
- margin: 10px 0 0 0;
979
- }
980
- #sbi_admin .sbi_ca_shortcode p{
981
- padding-bottom: 10px;
982
- font-size: 13px;
983
- }
984
- #sbi_admin .sbi_ca_shortcode code{
985
- margin-top: 5px;
986
- display: inline-block;
987
- }
988
- #sbi_admin .sbi_user_feed_ids_wrap .sbi_ca_avatar{
989
- width: 20px;
990
- height: 20px;
991
- position: relative;
992
- top: 5px;
993
- margin-right: 8px;
994
- border-radius: 4px;
995
- }
996
-
997
-
998
- @media all and (max-width: 1200px){
999
- #sbi_admin .sbi_delete_account .sbi_remove_text{
1000
- display: none;
1001
- }
1002
- #sbi_admin .sbi_ca_token,
1003
- #sbi_admin .sbi_ca_user_id{
1004
- border-left: 1px solid #d6d6d6;
1005
- border-radius: 4px;
1006
- }
1007
- }
1008
- @media all and (max-width: 800px){
1009
- #sbi_admin .sbi_col.sbi_one {
1010
- width: 25%;
1011
- margin-right: 5%;
1012
- }
1013
- #sbi_admin .sbi_col.sbi_two{
1014
- width: 70%;
1015
- }
1016
- }
1017
-
1018
- #sbi_admin .sbi_col {
1019
- float: left;
1020
- position: relative;
1021
- }
1022
- #sbi_admin .sbi_col.sbi_one{
1023
- width: 118px;
1024
- }
1025
- #sbi_admin #sb_instagram_coordinates_options .sbi_col.sbi_one{
1026
- width: 70px;
1027
- }
1028
- #sbi_admin .sbi_col.sbi_two{
1029
- /*width: 600px;*/
1030
- width: 75%;
1031
- }
1032
- #sbi_admin .sbi_row input[type=radio]{
1033
- margin: 5px 2px 0 0;
1034
- }
1035
-
1036
- @media all and (max-width: 800px){
1037
- #sbi_admin .sbi_col.sbi_one {
1038
- width: 25%;
1039
- margin-right: 5%;
1040
- }
1041
- #sbi_admin .sbi_col.sbi_two{
1042
- width: 70%;
1043
- }
1044
- }
1045
-
1046
-
1047
- #sbi_config_info .sbi_config_modal{
1048
- position: absolute;
1049
- top: 160px;
1050
- left: 50%;
1051
- width: 450px;
1052
- max-width: 70%;
1053
-
1054
- margin: 0 0 0 -230px;
1055
- padding: 20px;
1056
- background: #fff;
1057
-
1058
- -webkit-box-shadow: 0 1px 20px rgba(0,0,0,0.2);
1059
- box-shadow: 0 1px 20px rgba(0,0,0,0.2);
1060
-
1061
- -moz-border-radius: 3px;
1062
- -webkit-border-radius: 3px;
1063
- border-radius: 3px;
1064
- }
1065
- @media all and (max-width: 480px){
1066
- #sbi_config_info .sbi_config_modal{
1067
- top: 40px;
1068
- max-width: 100%;
1069
- margin: 0 0 0 -50%;
1070
- box-sizing: border-box;
1071
- }
1072
- }
1073
- #sbi_config_info.sb_get_token .sbi_config_modal {
1074
- text-align: center;
1075
- }
1076
- .sbi_config_modal .sbi_submit{
1077
- clear: both;
1078
- width: 100%;
1079
- margin: 15px 0 5px 0;
1080
- text-align: center;
1081
- }
1082
- .sbi_config_modal .button{
1083
- margin: 0 5px;
1084
- }
1085
- #sbi_admin #sbi_connect_account:active{
1086
- margin-top: 0;
1087
- }
1088
- .sbi_config_modal .sbi_ca_username {
1089
- float: none;
1090
- margin: 10px 0 0 10px;
1091
- font-size: 18px;
1092
- line-height: 1.2;
1093
-
1094
- display: inline-block;
1095
- position: relative;
1096
- top: -13px;
1097
- }
1098
- .sbi_config_modal .sbi_ca_avatar{
1099
- float: none;
1100
- width: 40px;
1101
- height: 40px;
1102
- border-radius: 5px;
1103
- }
1104
- .sbi_config_modal .sbi_modal_close{
1105
- position: absolute;
1106
- top: 0;
1107
- right: 0;
1108
- padding: 10px;
1109
- font-size: 14px;
1110
- color: #ccc;
1111
- margin: 0;
1112
- }
1113
- .sbi_config_modal .sbi_modal_close:focus,
1114
- .sbi_config_modal .sbi_modal_close:hover{
1115
- color: #333;
1116
- }
1117
-
1118
- /* New modal info */
1119
- .sbi_config_modal p{
1120
- font-size: 14px;
1121
- line-height: 1.6;
1122
- }
1123
- .sbi_config_modal .sbi_login_button_row{
1124
- display: block;
1125
- padding: 3px 0;
1126
- width: 90%;
1127
- margin: 0 auto;
1128
- }
1129
- #sbi_admin .sbi_login_button_row label{
1130
- top: -2px;
1131
- left: 3px;
1132
- }
1133
- #sbi_admin .sbi_login_button_row label b{
1134
- font-size: 14px;
1135
- }
1136
- #sbi_admin .sbi_login_button_row .sbi_tooltip{
1137
- width: 90%;
1138
- padding: 10px 5%;
1139
- background: #eee;
1140
- }
1141
- #sbi_admin .sbi_config_modal .sbi_admin_btn{
1142
- display: inline-block;
1143
- float: none;
1144
- margin: 20px 0 5px 0;
1145
- padding: 0 21px;
1146
- background-image: none;
1147
- }
1148
- .sbi-oembeds #sbi_config_info .sbi_config_modal{
1149
- padding: 40px 40px 25px 40px;
1150
- }
1151
-
1152
- .sbi_layout_cell {
1153
- display: inline-block;
1154
- float: left;
1155
- width: 100px;
1156
- padding: 15px 15px 10px 15px;
1157
- margin-right: 10px;
1158
- background: #f6f6f6;
1159
- border: 1px solid #ddd;
1160
- -moz-border-radius: 5px;
1161
- -webkit-border-radius: 5px;
1162
- border-radius: 5px;
1163
- vertical-align: top;
1164
- }
1165
- .sbi_layout_cell:nth-child(4) {
1166
- margin-right: 0;
1167
- }
1168
- @media all and (max-width: 1200px){
1169
- .sbi_layout_cell{
1170
- width: 21%;
1171
- padding: 1%;
1172
- margin-right: 1%;
1173
- }
1174
- }
1175
- @media all and (max-width: 480px){
1176
- .sbi_layout_cell{
1177
- width: 98%;
1178
- padding: 1%;
1179
- margin: 5px 0;
1180
- }
1181
- }
1182
- .sbi_label {
1183
- font-size: 16px;
1184
- font-weight: bold;
1185
- padding-left: 2px;
1186
- }
1187
- .sbi_layout_cell:hover,
1188
- .sbi_layout_cell:focus{
1189
- background: #fcfcfc;
1190
- cursor: pointer;
1191
- }
1192
- .sbi_layout_cell.sbi_layout_selected{
1193
- /*background: #f7faf1;*/
1194
- /*border: 1px solid #7ad03a;*/
1195
- }
1196
- .sbi_layout_cell h3{
1197
- font-size: 15px;
1198
- margin-top: 0;
1199
- }
1200
- .sbi_layout_cell img{
1201
- width: 100%;
1202
- border: 1px solid #ddd;
1203
- margin-top: 5px;
1204
- }
1205
-
1206
- #sbi_admin .sb_instagram_mobile_layout_setting,
1207
- #sbi_admin .sb_instagram_layout_settings{
1208
- float: left;
1209
- clear: both;
1210
- width: 96%;
1211
-
1212
- padding: 20px 2%;
1213
- margin: 10px 0;
1214
- font-size: 13px;
1215
- background: #f9f9f9;
1216
- background: rgba(255,255,255,0.8);
1217
-
1218
- -moz-border-radius: 8px;
1219
- -webkit-border-radius: 8px;
1220
- border-radius: 8px;
1221
- }
1222
- .sb_instagram_layout_setting {
1223
- clear:left;
1224
- margin-bottom: 10px;
1225
- }
1226
- #sbi_admin .sb_instagram_mobile_layout_setting {
1227
- width: auto;
1228
- }
1229
-
1230
- .form-table .sb_layout_type {
1231
- display: inline-block;
1232
- margin-left: 20px;
1233
- }
1234
- .form-table .sb_layout_type:first-child {
1235
- margin-left: 0;
1236
- }
1237
-
1238
- .sb_instagram_layout_setting,
1239
- .sb_instagram_box_setting{
1240
- margin-bottom: 20px;
1241
- }
1242
- .sb_instagram_layout_setting:last-child,
1243
- .sb_instagram_box_setting:last-child {
1244
- margin-bottom: 0;
1245
- }
1246
- .sb_instagram_layout_setting label,
1247
- .sb_instagram_box_setting label {
1248
- display: inline-block;
1249
- font-weight: bold;
1250
- font-size: 14px;
1251
- padding-bottom: 5px;
1252
- padding-right: 5px;
1253
- }
1254
- .sb_instagram_box_setting textarea {
1255
- width: 100%;
1256
- }
1257
- #sbi_admin .sb_layout_options_wrap .sbi_shortcode,
1258
- #sbi_admin .sb_instagram_box_setting .sbi_shortcode{
1259
- position: relative;
1260
- float: none;
1261
- top: -4px
1262
- }
1263
-
1264
- /* Layout settings */
1265
- #sbi_admin .sb_layout_options_wrap{
1266
- position: relative;
1267
- clear: both;
1268
- overflow: hidden;
1269
- }
1270
- #sbi_admin .sb_layout_options_wrap .sb_instagram_layout_settings{
1271
- display: none;
1272
- }
1273
- #sbi_admin .sb_layout_options_wrap .sbi_shortcode_symbol{
1274
- bottom: 4px;
1275
- right: -20px;
1276
- }
1277
- #sbi_admin .sb_layout_options_wrap .sbi_shortcode{
1278
- position: relative;
1279
- float: none;
1280
- top: -4px
1281
- }
1282
- #sbi_admin .sbi_close_options{
1283
- position: absolute;
1284
- top: 10px;
1285
- right: 2px;
1286
- padding: 15px 14px;
1287
- color: #999;
1288
- }
1289
- #sbi_admin .sbi_close_options:hover,
1290
- #sbi_admin .sbi_close_options:focus{
1291
- color: #666;
1292
- }
1293
- #sbi_admin .sbi_pro input[type=radio]:checked:before{
1294
- background-color: #ccc;
1295
- }
1296
- #sbi_admin .sbi_layout_cell{
1297
- position: relative;
1298
- }
1299
- #sbi_admin .sbi_layout_cell img{
1300
- opacity: 0.5;
1301
- }
1302
- #sbi_admin .sbi_lock{
1303
- padding: 8px 10px 8px 13px;
1304
- position: absolute;
1305
- top: 50px;
1306
- left: 50%;
1307
- margin-left: -34px;
1308
- background: rgba(255,255,255,0.8);
1309
- border-radius: 5px;
1310
- box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
1311
- z-index: 99;
1312
- font-size: 14px;
1313
- color: #666;
1314
- font-weight: 700;
1315
- text-decoration: none;
1316
- border: 1px solid #ccc;
1317
- }
1318
- #sbi_admin .sbi_feed_type .sbi_lock{
1319
- height: 18px;
1320
- padding: 4px 10px 4px 13px;
1321
- top: 32px;
1322
- left: 98px;
1323
- color: #999;
1324
- }
1325
- #sbi_admin .sbi_lock:hover,
1326
- #sbi_admin .sbi_feed_type .sbi_lock:hover{
1327
- background: #fff;
1328
- border: 1px solid #ccc;
1329
- color: #333;
1330
- box-shadow: 0 0 8px 0 rgba(0,0,0,0.15);
1331
- }
1332
-
1333
- #sbi_admin .sbi_lock i{
1334
- margin-right: 6px;
1335
- }
1336
- #sbi_admin .sbi_layouts{
1337
- position: relative;
1338
- float: left;
1339
- }
1340
- #sbi_admin .sbi_feed_type td{
1341
- position: relative;
1342
- }
1343
- #sbi_admin .sbi_pro_tooltip{
1344
- text-align: center;
1345
- z-index:99;
1346
- display: none;
1347
- position: absolute;
1348
- bottom: 12px;
1349
- left: -8px;
1350
-
1351
- background: #333;
1352
- color: #eee;
1353
- padding: 8px 10px 10px 10px;
1354
- border-radius: 3px;
1355
- line-height: 1.3;
1356
- font-size: 12px;
1357
- width: 190px;
1358
- }
1359
- #sbi_admin .sbi_pro_tooltip .fa-caret-down {
1360
- position: absolute;
1361
- bottom: -12px;
1362
- font-size: 20px;
1363
- left: 49%;
1364
- color: #333;
1365
- }
1366
- #sbi_admin .sbi_layouts .sbi_pro_tooltip{
1367
- left: 50%;
1368
- top: -10px;
1369
- bottom: auto;
1370
- margin-left: -101px;
1371
- }
1372
-
1373
- /* Graph API pages */
1374
- /* Instagram Business Managed page */
1375
- #sbi_admin .sbi-managed-pages{
1376
- margin: 0;
1377
- width: 96%;
1378
- clear: both;
1379
- float: left;
1380
- padding: 10px 2%;
1381
- }
1382
- #sbi_admin .sbi-scrollable-accounts {
1383
- max-height: 360px;
1384
- overflow-y: auto;
1385
- overflow-x: hidden;
1386
- }
1387
- #sbi_admin .sbi-managed-page-intro{
1388
- padding: 0 0 20px 0;
1389
- margin: 0;
1390
- }
1391
- #sbi_admin .sbi-managed-page-select-all{
1392
- padding: 0 0 5px 0;
1393
- margin: 0 0 0 1px;
1394
- }
1395
- #sbi_admin .sbi-managed-page-select-all label{
1396
- font-size: 12px;
1397
- top: -2px;
1398
- left: 3px;
1399
- }
1400
- #sbi_admin .sbi-managed-page{
1401
- width: 102%;
1402
- border: 1px solid transparent;
1403
- padding: 5px 1%;
1404
- margin: 0 -1%;
1405
- background: #fff;
1406
- box-sizing: border-box;
1407
- position: relative;
1408
- }
1409
- #sbi_admin .sbi-managed-page:hover{
1410
- background: #eee;
1411
- }
1412
- #sbi_admin .sbi-managed-page .sbi-page-avatar{
1413
- float: left;
1414
- width: 40px;
1415
- height: 40px;
1416
- margin-right: 10px;
1417
- border-radius: 3px;
1418
- }
1419
- #sbi_admin .sbi-managed-page label{
1420
- padding: 0;
1421
- margin: 0;
1422
- height: 40px;
1423
- line-height: 1.3;
1424
- display: block;
1425
- }
1426
- .sbi-add-checkbox {
1427
- display: inline-block;
1428
- float: left;
1429
- }
1430
- .sbi-managed-page-details {
1431
- margin-left: 30px;
1432
- }
1433
- .sbi-add-checkbox input {
1434
- position: absolute;
1435
- top: 50%;
1436
- left: 1%;
1437
- margin-top: -10px;
1438
- }
1439
-
1440
- .sbi_notice .sbi_offer_btn {
1441
- padding: 4px 12px 6px 12px;
1442
- background: green;
1443
- color: #fff;
1444
- border-radius: 4px;
1445
- display: inline-block;
1446
- text-decoration: none;
1447
- margin-left: 0;
1448
- margin-right: 8px;
1449
- }
1450
- .sbi_notice .sbi_offer_btn:hover, .sbi_notice .sbi_offer_btn:focus {
1451
- background: #049404;
1452
- color: #fff;
1453
- }
1454
-
1455
- /* Admin footer share icons */
1456
- #sbi_admin #sbi_admin_share_links{
1457
- opacity: 0;
1458
- display: inline-block;
1459
- padding: 5px;
1460
- border: 1px solid #ccc;
1461
- background: rgba(255,255,255,0.5);
1462
- border-radius: 3px;
1463
- transition: opacity 0.5s;
1464
- }
1465
- #sbi_admin #sbi_admin_share_links.sbi_show{
1466
- transition: opacity 0.5s;
1467
- opacity: 1;
1468
- }
1469
- #sbi_admin #twitter-widget-0 {
1470
- width: 65px !important;
1471
- }
1472
-
1473
- /* Placeholder styles */
1474
- #sbi_admin .sbi_ca_new_or_updated .sbi_ca_info:before {
1475
- content: 'Successfully connected';
1476
- padding: 5px 10px;
1477
- margin: 0px 0 12px 0;
1478
- background: #d3dec1;
1479
- display: inline-block;
1480
- border-radius: 5px;
1481
- font-size: 13px;
1482
- color: #2e4506;
1483
- border: 1px solid #a9b594;
1484
- }
1485
-
1486
- #sbi_admin .sbi_deprecated {
1487
- padding: 2px 2px 2px 10px;
1488
- margin: 0px 0 12px 0;
1489
- background: #f3dcda;
1490
- display: inline-block;
1491
- border-radius: 5px;
1492
- font-size: 13px;
1493
- color: #ad4040;
1494
- border: 1px solid #e9c5c2;
1495
- }
1496
-
1497
- #sbi_admin .sbi_deprecated .fa{
1498
- margin-right: 5px;
1499
- font-size: 14px;
1500
- }
1501
- #sbi_admin .sbi_reconnect {
1502
- font-size: 12px;
1503
- background: #d65b5c;
1504
- color: #fff;
1505
- padding: 0px 8px;
1506
- min-height: 23px;
1507
- border: none;
1508
- margin-left: 5px;
1509
- height: 23px;
1510
- line-height: 19px;
1511
- text-shadow: none;
1512
- box-shadow: none;
1513
- }
1514
- #sbi_admin .sbi_reconnect:hover{
1515
- background: #c44b4c;
1516
- }
1517
-
1518
- .sbi-welcome .sbi-notice {
1519
- clear: both;
1520
- width: 96%;
1521
- margin: 10px 0 20px 0;
1522
- background: #F7E6E6;
1523
- padding: 0 1.5%;
1524
- border: 1px solid #BA7B7B;
1525
- color: #592626;
1526
-
1527
- -moz-border-radius: 3px;
1528
- -webkit-border-radius: 3px;
1529
- border-radius: 3px;
1530
- }
1531
-
1532
- /* Basic Display Update */
1533
- #sbi_admin .sbi_tooltip_link.sbi_tooltip_under {
1534
- margin-left: 0;
1535
- }
1536
- .sbi_tooltip_under_text {
1537
- padding: 10px 15px !important;
1538
- }
1539
- #sbi_admin .sbi_ca_show_token .fa {
1540
- margin-right: 0;
1541
- }
1542
-
1543
- /* Lite Notice */
1544
- @media screen and (max-width: 600px) {
1545
- #sbi-notice-bar {
1546
- display:none !important
1547
- }
1548
- }
1549
-
1550
- #sbi-notice-bar {
1551
- background-color: #DDDDDD;
1552
- color: #777777;
1553
- text-align: center;
1554
- position: relative;
1555
- padding: 7px;
1556
- margin-bottom: 0;
1557
- opacity: 1;
1558
- transition: all .3s ease-in-out;
1559
- max-height: 100px;
1560
- overflow: hidden
1561
- }
1562
-
1563
- #sbi-notice-bar.out {
1564
- opacity: .5;
1565
- max-height: 0
1566
- }
1567
-
1568
- #sbi-notice-bar a {
1569
- color: #e34f0e;
1570
- }
1571
-
1572
- #sbi-notice-bar a:hover {
1573
- color: #b85a1b
1574
- }
1575
-
1576
- #sbi-notice-bar .dismiss {
1577
- position: absolute;
1578
- top: 0;
1579
- right: 0;
1580
- border: none;
1581
- padding: 5px;
1582
- margin-top: 1px;
1583
- background: 0 0;
1584
- color: #72777c;
1585
- cursor: pointer
1586
- }
1587
-
1588
- #sbi-notice-bar .dismiss:before {
1589
- background: 0 0;
1590
- color: #72777c;
1591
- content: "\f335";
1592
- display: block;
1593
- font: normal 20px/20px dashicons;
1594
- speak: none;
1595
- height: 20px;
1596
- text-align: center;
1597
- width: 20px;
1598
- -webkit-font-smoothing: antialiased
1599
- }
1600
-
1601
- /* About */
1602
- #sbi-admin-about *,#sbi-admin-about *::before,#sbi-admin-about *::after {
1603
- -webkit-box-sizing: border-box;
1604
- -moz-box-sizing: border-box;
1605
- box-sizing: border-box
1606
- }
1607
-
1608
- #sbi-admin-about .sbi-admin-about-section {
1609
- position: relative;
1610
- margin: 0 20px 20px;
1611
- padding: 30px;
1612
- background: #fff;
1613
- border: 1px solid #DDDDDD;
1614
- line-height: 2;
1615
- }
1616
-
1617
- #sbi-admin-about .sbi-admin-about-section h1,#sbi-admin-about .sbi-admin-about-section h2,#sbi-admin-about .sbi-admin-about-section h3,#sbi-admin-about .sbi-admin-about-section h4,#sbi-admin-about .sbi-admin-about-section h5 {
1618
- margin-top: 0;
1619
- padding-top: 0;
1620
- line-height: 1.6
1621
- }
1622
-
1623
- #sbi-admin-about .sbi-admin-about-section h2 {
1624
- font-size: 24px
1625
- }
1626
-
1627
- #sbi-admin-about .sbi-admin-about-section h3 {
1628
- font-size: 18px;
1629
- margin-bottom: 30px;
1630
- color: #23282C
1631
- }
1632
-
1633
- #sbi-admin-about .sbi-admin-about-section ul,#sbi-admin-about .sbi-admin-about-section p {
1634
- font-size: 16px
1635
- }
1636
-
1637
- #sbi-admin-about .sbi-admin-about-section p {
1638
- margin-bottom: 20px
1639
- }
1640
-
1641
- #sbi-admin-about .sbi-admin-about-section p.bigger {
1642
- font-size: 18px
1643
- }
1644
-
1645
- #sbi-admin-about .sbi-admin-about-section p.smaller {
1646
- font-size: 14px
1647
- }
1648
-
1649
- #sbi-admin-about .sbi-admin-about-section p:last-child {
1650
- margin-bottom: 0
1651
- }
1652
-
1653
- #sbi-admin-about .sbi-admin-about-section hr {
1654
- margin: 30px 0
1655
- }
1656
-
1657
- #sbi-admin-about .sbi-admin-about-section figure {
1658
- margin: 0
1659
- }
1660
-
1661
- #sbi-admin-about .sbi-admin-about-section figure img {
1662
- width: 100%
1663
- }
1664
-
1665
- #sbi-admin-about .sbi-admin-about-section figure figcaption {
1666
- font-size: 13px;
1667
- color: #888888;
1668
- margin-top: -10px;
1669
- text-align: center;
1670
- line-height: initial
1671
- }
1672
-
1673
- #sbi-admin-about .sbi-admin-about-section .sbi-admin-column-40 {
1674
- padding-left: 15px
1675
- }
1676
-
1677
- @media (max-width: 767px) {
1678
- #sbi-admin-about .sbi-admin-about-section .sbi-admin-column-40 {
1679
- width:100%;
1680
- padding-left: 0;
1681
- padding-top: 20px
1682
- }
1683
- }
1684
-
1685
- #sbi-admin-about .sbi-admin-about-section .sbi-admin-column-60 {
1686
- padding-right: 15px
1687
- }
1688
- #sbi-admin-about .sbi-admin-about-section .sbi-admin-about-text{
1689
- padding-right: 400px;
1690
- }
1691
- #sbi-admin-about .sbi-admin-about-section .sbi-admin-about-image{
1692
- position: absolute;
1693
- width: 340px;
1694
- top: 20px;
1695
- right: 20px;
1696
- }
1697
-
1698
- @media (max-width: 767px) {
1699
- #sbi-admin-about .sbi-admin-about-section .sbi-admin-column-60,
1700
- #sbi-admin-about .sbi-admin-about-section .sbi-admin-about-text,
1701
- #sbi-admin-about .sbi-admin-about-section .sbi-admin-about-image {
1702
- position: relative;
1703
- width:100%;
1704
- padding-right: 0
1705
- }
1706
- }
1707
-
1708
- #sbi-admin-about .sbi-admin-about-section ul.list-plain {
1709
- margin-top: 0;
1710
- margin-bottom: 0
1711
- }
1712
-
1713
- #sbi-admin-about .sbi-admin-about-section ul.list-plain li {
1714
- margin-bottom: 0
1715
- }
1716
-
1717
- #sbi-admin-about .sbi-admin-about-section ul.list-features li .fa {
1718
- color: #2a9b39;
1719
- margin: 0 8px 0 0
1720
- }
1721
-
1722
- #sbi-admin-about .sbi-admin-about-section .fa-star {
1723
- color: gold
1724
- }
1725
-
1726
- #sbi-admin-about .sbi-admin-about-section .no-margin {
1727
- margin: 0 !important
1728
- }
1729
-
1730
- #sbi-admin-about .sbi-admin-about-section .no-padding {
1731
- padding: 0 !important
1732
- }
1733
-
1734
- #sbi-admin-about .sbi-admin-about-section .centered {
1735
- text-align: center !important
1736
- }
1737
-
1738
- #sbi-admin-about .sbi-admin-about-section-first-form {
1739
- display: flex
1740
- }
1741
-
1742
- @media (max-width: 767px) {
1743
- #sbi-admin-about .sbi-admin-about-section-first-form {
1744
- display:block !important
1745
- }
1746
- }
1747
-
1748
- #sbi-admin-about .sbi-admin-about-section-first-form .sbi-admin-about-section-first-form-text {
1749
- flex: 1;
1750
- padding-right: 30px
1751
- }
1752
-
1753
- @media (max-width: 767px) {
1754
- #sbi-admin-about .sbi-admin-about-section-first-form .sbi-admin-about-section-first-form-text {
1755
- flex:none
1756
- }
1757
- }
1758
-
1759
- #sbi-admin-about .sbi-admin-about-section-first-form .sbi-admin-about-section-first-form-video iframe {
1760
- border: 1px solid #DDDDDD
1761
- }
1762
-
1763
- @media (max-width: 767px) {
1764
- #sbi-admin-about .sbi-admin-about-section-first-form .sbi-admin-about-section-first-form-video {
1765
- padding-top:20px
1766
- }
1767
- }
1768
-
1769
- #sbi-admin-about .sbi-admin-about-section-hero {
1770
- padding: 0
1771
- }
1772
-
1773
- #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-main,#sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-extra {
1774
- padding: 30px
1775
- }
1776
-
1777
- @media (max-width: 767px) {
1778
- #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-extra .sbi-admin-column-50 {
1779
- float:none;
1780
- width: 100%
1781
- }
1782
- }
1783
-
1784
- #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-main {
1785
- background-color: #FAFAFA;
1786
- border-bottom: 1px solid #DDDDDD
1787
- }
1788
-
1789
- #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-main.no-border {
1790
- border-bottom: 0
1791
- }
1792
-
1793
- #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-main p {
1794
- color: #666
1795
- }
1796
-
1797
- #sbi-admin-about .sbi-admin-about-section-hero h3.call-to-action {
1798
- margin-bottom: -10px
1799
- }
1800
-
1801
- #sbi-admin-about .sbi-admin-about-section-hero span.price-20-off {
1802
- color: #6AB255
1803
- }
1804
-
1805
- #sbi-admin-about .sbi-admin-about-section-squashed {
1806
- margin-bottom: 0
1807
- }
1808
-
1809
- #sbi-admin-about .sbi-admin-about-section-squashed:not(:last-of-type) {
1810
- border-bottom: 0
1811
- }
1812
-
1813
- #sbi-admin-about .sbi-admin-about-section-post h2 {
1814
- margin-bottom: -10px
1815
- }
1816
-
1817
- #sbi-admin-about .sbi-admin-about-section-post h3 {
1818
- margin-bottom: 15px
1819
- }
1820
-
1821
- #sbi-admin-about .sbi-admin-about-section-post p:last-of-type {
1822
- margin-bottom: 30px
1823
- }
1824
-
1825
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-20 {
1826
- padding-right: 20px;
1827
- width: auto
1828
- }
1829
-
1830
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-20 img {
1831
- width: 270px
1832
- }
1833
-
1834
- @media (max-width: 767px) {
1835
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-20 {
1836
- width:20%
1837
- }
1838
-
1839
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-20 img {
1840
- width: auto;
1841
- max-width: 100%
1842
- }
1843
- }
1844
-
1845
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-80 {
1846
- padding-left: 20px;
1847
- width: calc(100% - 20px - 270px)
1848
- }
1849
-
1850
- @media (max-width: 767px) {
1851
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-80 {
1852
- width:80%
1853
- }
1854
- }
1855
-
1856
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-about-section-post-link {
1857
- padding: 10px 15px;
1858
- background-color: #DF7739;
1859
- color: #fff;
1860
- border-radius: 3px;
1861
- text-decoration: none;
1862
- margin-top: 15px;
1863
- font-size: 14px
1864
- }
1865
-
1866
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-about-section-post-link:hover {
1867
- background-color: #B85A1B
1868
- }
1869
-
1870
- #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-about-section-post-link .fa {
1871
- color: #EDBA9E;
1872
- vertical-align: middle;
1873
- margin-left: 8px
1874
- }
1875
-
1876
- #sbi-admin-about .sbi-admin-about-section-table table {
1877
- border-collapse: collapse
1878
- }
1879
-
1880
- #sbi-admin-about .sbi-admin-about-section-table table tr td {
1881
- border-bottom: 1px solid #DDDDDD;
1882
- border-right: 1px solid #DDDDDD;
1883
- padding: 30px;
1884
- vertical-align: top
1885
- }
1886
-
1887
- #sbi-admin-about .sbi-admin-about-section-table table tr td:last-of-type {
1888
- border-right: 0
1889
- }
1890
-
1891
- #sbi-admin-about .sbi-admin-about-section-table table tr:last-child td {
1892
- border-bottom: none
1893
- }
1894
-
1895
- #sbi-admin-about .sbi-admin-about-section-table table p {
1896
- background-repeat: no-repeat;
1897
- background-size: 15px auto;
1898
- background-position: 0 6px;
1899
- margin: 0
1900
- }
1901
-
1902
- #sbi-admin-about .sbi-admin-about-section-table table p.features-full {
1903
- padding-left: 30px;
1904
- background-image: url(../img/about/icon-full.svg)
1905
- }
1906
-
1907
- #sbi-admin-about .sbi-admin-about-section-table table p.features-none {
1908
- padding-left: 30px;
1909
- background-image: url(../img/about/icon-none.svg)
1910
- }
1911
-
1912
- #sbi-admin-about .sbi-admin-about-section-table table p.features-partial {
1913
- padding-left: 30px;
1914
- background-position: -3px 0;
1915
- background-size: 23px auto;
1916
- background-image: url(../img/about/icon-partial.svg)
1917
- }
1918
-
1919
- #sbi-admin-about .sbi-admin-about-section-table .sbi-admin-about-section-hero-main {
1920
- padding: 0
1921
- }
1922
-
1923
- #sbi-admin-about .sbi-admin-about-section-table .sbi-admin-about-section-hero-main h3 {
1924
- padding: 30px 30px 30px 60px
1925
- }
1926
-
1927
- #sbi-admin-about .sbi-admin-about-section-table .sbi-admin-about-section-hero-main .sbi-admin-column-33:first-child h3 {
1928
- padding: 30px
1929
- }
1930
-
1931
- #sbi-admin-about #sbi-admin-addons {
1932
- padding: 0 30px
1933
- }
1934
-
1935
- #sbi-admin-about #sbi-admin-addons .addon-container {
1936
- padding: 0 10px
1937
- }
1938
-
1939
- #sbi-admin-about #sbi-admin-addons .addon-item .details {
1940
- padding: 20px
1941
- }
1942
-
1943
- #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button {
1944
- display: inline-block;
1945
- text-decoration: none;
1946
- font-size: 13px;
1947
- line-height: 26px;
1948
- height: 28px;
1949
- margin: 0;
1950
- padding: 0 10px 1px;
1951
- cursor: pointer;
1952
- -webkit-appearance: none;
1953
- border-radius: 3px;
1954
- border: 1px solid #cccccc;
1955
- background: #f7f7f7;
1956
- box-shadow: 0 1px 0 #cccccc;
1957
- font-weight: normal
1958
- }
1959
-
1960
- #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button:hover,#sbi-admin-about #sbi-admin-addons .addon-item .action-button .button:focus {
1961
- background: #fafafa;
1962
- border-color: #999;
1963
- color: #23282d
1964
- }
1965
-
1966
- #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary {
1967
- background: #0085ba;
1968
- border-color: #0073aa #006799 #006799;
1969
- box-shadow: 0 1px 0 #006799;
1970
- color: #fff;
1971
- text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799
1972
- }
1973
-
1974
- #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary:hover,#sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary:focus {
1975
- background: #008ec2;
1976
- border-color: #006799;
1977
- color: #fff
1978
- }
1979
-
1980
-
1981
- #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-secondary {
1982
- color: #555;
1983
- border-color: #cccccc;
1984
- background: #f7f7f7;
1985
- box-shadow: 0 1px 0 #cccccc
1986
- }
1987
-
1988
- #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-secondary:hover,#sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-secondary:focus {
1989
- background: #fafafa;
1990
- border-color: #999;
1991
- color: #23282d
1992
- }
1993
-
1994
- #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.disabled {
1995
- cursor: default
1996
- }
1997
-
1998
- /* AW columns */
1999
- .sbi-admin-columns>div[class*="-column-"] {
2000
- float: left
2001
- }
2002
-
2003
- .sbi-admin-columns .sbi-admin-column-20 {
2004
- width: 20%
2005
- }
2006
-
2007
- .sbi-admin-columns .sbi-admin-column-33 {
2008
- width: 33.33333%
2009
- }
2010
-
2011
- .sbi-admin-columns .sbi-admin-column-40 {
2012
- width: 40%
2013
- }
2014
-
2015
- .sbi-admin-columns .sbi-admin-column-50 {
2016
- width: 50%
2017
- }
2018
-
2019
- .sbi-admin-columns .sbi-admin-column-60 {
2020
- width: 60%
2021
- }
2022
-
2023
- .sbi-admin-columns .sbi-admin-column-80 {
2024
- width: 80%
2025
- }
2026
-
2027
- .sbi-admin-columns .sbi-admin-column-last {
2028
- float: right !important
2029
- }
2030
-
2031
- .sbi-admin-columns:after {
2032
- content: "";
2033
- display: table;
2034
- clear: both
2035
- }
2036
-
2037
- /* AW Addons */
2038
- #sbi-admin-addons h3 {
2039
- padding: 10px 10px 0 10px;
2040
- clear: left;
2041
- }
2042
- #sbi-admin-addons *,#sbi-admin-addons *::before,#sbi-admin-addons *::after {
2043
- -webkit-box-sizing: border-box;
2044
- -moz-box-sizing: border-box;
2045
- box-sizing: border-box
2046
- }
2047
-
2048
- #sbi-admin-addons .addons-container {
2049
- margin-left: -20px;
2050
- margin-right: -20px
2051
- }
2052
-
2053
- #sbi-admin-addons .unlock-msg {
2054
- padding: 0 20px;
2055
- margin-top: -20px;
2056
- clear: both
2057
- }
2058
-
2059
- #sbi-admin-addons #sbi-admin-addons-search {
2060
- background-color: #fff;
2061
- border: 1px solid #ddd;
2062
- border-radius: 3px;
2063
- box-shadow: none;
2064
- color: #333;
2065
- vertical-align: middle;
2066
- padding: 7px 12px;
2067
- margin: -3px 10px 0 0;
2068
- width: 200px;
2069
- min-height: 35px;
2070
- float: right
2071
- }
2072
-
2073
- #sbi-admin-addons #sbi-admin-addons-search:focus {
2074
- border-color: #bbb
2075
- }
2076
-
2077
- #sbi-admin-addons .addon-container {
2078
- padding: 0 20px;
2079
- float: left;
2080
- width: 33.333333%;
2081
- margin-bottom: 20px
2082
- }
2083
-
2084
- @media (max-width: 1249px) {
2085
- #sbi-admin-addons .addon-container {
2086
- width:50%
2087
- }
2088
- }
2089
-
2090
- @media (max-width: 767px) {
2091
- #sbi-admin-addons .addon-container {
2092
- width:100%;
2093
- margin-bottom: 20px
2094
- }
2095
- }
2096
-
2097
- #sbi-admin-addons h4 {
2098
- font-size: 17px;
2099
- font-weight: 700
2100
- }
2101
-
2102
- #sbi-admin-addons .addon-item {
2103
- background-color: #fff;
2104
- border: 1px solid #ddd;
2105
- border-radius: 3px;
2106
- margin: 0
2107
- }
2108
-
2109
- @media (max-width: 767px) {
2110
- #sbi-admin-addons .addon-item {
2111
- margin:0 0
2112
- }
2113
- }
2114
-
2115
- #sbi-admin-addons .addon-item img {
2116
- border: 1px solid #eee;
2117
- float: left;
2118
- max-width: 75px
2119
- }
2120
-
2121
- #sbi-admin-addons .addon-item h5 {
2122
- margin: 0 0 10px 100px;
2123
- font-size: 16px
2124
- }
2125
-
2126
- #sbi-admin-addons .addon-item p {
2127
- margin: 0 0 0 100px
2128
- }
2129
-
2130
- #sbi-admin-addons .addon-item .details {
2131
- padding: 30px 20px
2132
- }
2133
-
2134
- #sbi-admin-addons .addon-item .actions {
2135
- background-color: #f7f7f7;
2136
- border-top: 1px solid #ddd;
2137
- padding: 20px;
2138
- position: relative
2139
- }
2140
-
2141
- #sbi-admin-addons .addon-item .actions .msg {
2142
- background-color: #f7f7f7;
2143
- position: absolute;
2144
- text-align: center;
2145
- font-weight: 600;
2146
- top: 0;
2147
- left: 0;
2148
- height: 100%;
2149
- width: 100%;
2150
- z-index: 99;
2151
- padding: 20px;
2152
- display: -webkit-box;
2153
- display: -moz-box;
2154
- display: -ms-flexbox;
2155
- display: -webkit-flex;
2156
- display: flex;
2157
- -webkit-align-items: center;
2158
- -ms-align-items: center;
2159
- align-items: center;
2160
- justify-content: center
2161
- }
2162
-
2163
- #sbi-admin-addons .addon-item .actions .msg.success {
2164
- color: #2a9b39
2165
- }
2166
-
2167
- #sbi-admin-addons .addon-item .actions .msg.error {
2168
- color: red
2169
- }
2170
-
2171
- #sbi-admin-addons .addon-item .status {
2172
- float: left;
2173
- padding-top: 8px
2174
- }
2175
-
2176
- #sbi-admin-addons .addon-item .status .status-inactive {
2177
- color: red
2178
- }
2179
-
2180
- #sbi-admin-addons .addon-item .status .status-download {
2181
- color: #666
2182
- }
2183
-
2184
- #sbi-admin-addons .addon-item .status .status-active {
2185
- color: #2a9b39
2186
- }
2187
-
2188
- #sbi-admin-addons .addon-item .upgrade-button {
2189
- text-align: center
2190
- }
2191
-
2192
- #sbi-admin-addons .addon-item .upgrade-button a {
2193
- font-weight: 600;
2194
- width: 140px;
2195
- text-align: center;
2196
- padding: 8px 5px
2197
- }
2198
-
2199
- #sbi-admin-addons .addon-item .action-button {
2200
- float: right
2201
- }
2202
-
2203
- #sbi-admin-addons .addon-item .action-button button {
2204
- background: none;
2205
- border: 1px solid #ddd;
2206
- border-radius: 3px;
2207
- box-shadow: none;
2208
- cursor: pointer;
2209
- font-weight: 600;
2210
- width: 140px;
2211
- text-align: center;
2212
- padding: 8px 5px
2213
- }
2214
-
2215
- #sbi-admin-addons .addon-item .action-button button:hover,#sbi-admin-addons .addon-item .action-button button.loading {
2216
- background-color: #e9e9e9
2217
- }
2218
-
2219
- #sbi-admin-addons .addon-item .action-button button .fa {
2220
- margin-right: 8px
2221
- }
2222
-
2223
- #sbi-admin-addons .addon-item .action-button button .fa.fa-spinner {
2224
- margin-right: 0
2225
- }
2226
-
2227
- #sbi-admin-addons .addon-item .action-button button.status-active .fa {
2228
- color: #2a9b39
2229
- }
2230
-
2231
- #sbi-admin-addons .addon-item .action-button button.status-inactive .fa {
2232
- color: red
2233
- }
2234
-
2235
- #sbi-admin-addons .addon-item .action-button button.status-download .fa {
2236
- color: #999
2237
- }
2238
-
2239
- #sbi-admin-addons .addon-item .action-button button.disabled {
2240
- cursor: default
2241
- }
2242
-
2243
- #sbi-admin-addons .addon-item .action-button button.loading .fa {
2244
- color: #666
2245
- }
2246
-
2247
- /* Tabs */
2248
- .sbi-admin-tabs {
2249
- background-color: #fff;
2250
- margin: 0 0 20px 0;
2251
- padding: 0 20px;
2252
- list-style: none;
2253
- overflow: auto;
2254
- font-size: 14px
2255
- }
2256
-
2257
- .sbi-admin-tabs li {
2258
- margin: 0 30px 0 0;
2259
- padding: 0;
2260
- float: left
2261
- }
2262
-
2263
- .sbi-admin-tabs li:last-of-type {
2264
- margin: 0
2265
- }
2266
-
2267
- .sbi-admin-tabs li a {
2268
- color: #666;
2269
- display: block;
2270
- padding: 20px 0 18px 0;
2271
- text-decoration: none;
2272
- border-bottom: 2px solid #fff;
2273
- box-shadow: none
2274
- }
2275
-
2276
- .sbi-admin-tabs li a:hover {
2277
- border-color: #999
2278
- }
2279
-
2280
- .sbi-admin-tabs li a.active {
2281
- border-color: #e27730
2282
- }
2283
-
2284
- .sbi-admin-tabs li a:focus {
2285
- box-shadow: none
2286
- }
2287
-
2288
- /* oEmbeds */
2289
- #sbi_admin.sbi-oembeds #header{
2290
- border-bottom: 1px solid #ccc;
2291
- padding-bottom: 15px;
2292
- margin-bottom: 25px;
2293
- }
2294
- #sbi_admin.sbi-oembeds .sbi_admin_btn{
2295
- margin-top: 10px;
2296
- }
2297
- #sbi_admin.sbi-oembeds .sbi-success{
2298
- display: inline-block;
2299
- clear: both;
2300
- padding: 20px 30px;
2301
- border-radius: 3px;
2302
- }
2303
- #sbi_admin.sbi-oembeds .sbi-success a{
2304
- margin-left: 5px;
2305
- color: #e34f0e;
2306
- }
2307
- #sbi_admin .sbi-oembed-promo{
2308
- margin: 30px 0 0 0;
2309
- padding: 30px;
2310
- border: 1px solid #ccc;
2311
- border-radius: 3px;
2312
- background: rgba(255,255,255,0.5);
2313
- }
2314
- #sbi_admin .sbi-oembed-promo h2{
2315
- padding: 0 0 20px 0;
2316
- margin: 0;
2317
- font-size: 18px;
2318
- line-height: 1.5;
2319
- }
2320
- #sbi_admin .sbi-oembed-promo .sbi-reasons div{
2321
- display: inline-block;
2322
- margin-right: 15px;
2323
- }
2324
- #sbi_admin .sbi-oembed-promo .sbi-reasons span{
2325
- font-size: 15px;
2326
- }
2327
- #sbi_admin .sbi-oembed-promo svg{
2328
- position: relative;
2329
- top: 3px;
2330
- margin: 0 8px 0 0;
2331
- width: 16px;
2332
- height: 16px;
2333
- }
2334
- #sbi_admin .sbi-oembed-promo .button{
2335
- margin-top: 12px;
2336
- font-size: 16px;
2337
- padding: 5px 20px;
2338
- height: auto;
2339
- }
2340
- #sbi_admin .sbi-oembed-promo p span{
2341
- display: inline-block;
2342
- padding-right: 10px;
2343
- }
2344
- #sbi_admin .sbi-oembed-promo .fa-check{
2345
- width: 14px;
2346
- height: 14px;
2347
- margin-right: 5px;
2348
- top: 2px;
2349
- }
2350
- #sbi_admin .sbi-oembed-promo .fa-check path{
2351
- fill: #3fa03f;
2352
- }
2353
- #sbi_admin.sbi-oembeds .sbi-error{
2354
- display: inline-block;
2355
- clear: both;
2356
- padding: 20px 30px;
2357
- border-radius: 3px;
2358
- background: #F7E6E6;
2359
- border: 1px solid #BA7B7B;
2360
- color: #592626;
2361
- }
2362
- #sbi_admin.sbi-oembeds .sbi-success-message{
2363
- display: inline-block;
2364
- clear: both;
2365
- padding: 20px 30px;
2366
- border-radius: 3px;
2367
- background: #dceada;
2368
- border: 1px solid #6ca365;
2369
- color: #3e5f1c;
2370
- }
2371
- #sbi_admin.sbi-oembeds .sbi-oembed-connect-btn {
2372
- margin-top: 10px;
2373
- }
2374
- #sbi_admin .sbi-oembed-desc{
2375
- overflow: hidden;
2376
- max-width: 900px;
2377
- clear: both;
2378
- margin-top: 30px;
2379
- float: left;
2380
- }
2381
- #sbi_admin .sbi-oembed-desc p{
2382
- padding: 0 0 10px 0;
2383
- margin: 0;
2384
- }
2385
- #sbi_admin .sbi-oembed-desc .sbi-col{
2386
- width: 45%;
2387
- margin-right: 5%;
2388
- float: left;
2389
- }
2390
- #sbi_admin .sbi-oembed-desc img{
2391
- width: 50%;
2392
- max-width: 446px;
2393
- float: left;
2394
- border-bottom: 1px solid #ddd;
2395
- }
2396
- #sbi_admin .sbi-oembed-button{
2397
- margin-top: 20px;
2398
- }
2399
-
2400
-
2401
- /* GDPR Settings */
2402
- .gdpr_tooltip p{
2403
- padding: 0 0 10px 0;
2404
- }
2405
- .gdpr_tooltip span{
2406
- display: inline-block;
2407
- margin: 0;
2408
- font-weight: bold;
2409
- font-size: 14px;
2410
- }
2411
- .gdpr_tooltip .sbi-list{
2412
- padding: 0 0 10px 0;
2413
- }
2414
- .gdpr_tooltip li{
2415
- padding: 0;
2416
- }
2417
- .sbi_gdpr_plugin_active .sbi_active{
2418
- display: inline-block;
2419
- padding: 10px 20px 15px 20px;
2420
- border-radius: 5px;
2421
- background: #edf4f0;
2422
- border: 1px solid #2c8649;
2423
- color: #2c8649;
2424
- margin: 8px 0 0 0;
2425
- }
2426
- .sbi_gdpr_plugin_active svg{
2427
- width: 16px;
2428
- height: 16px;
2429
- position: relative;
2430
- top: 3px;
2431
- margin-right: 2px;
2432
- }
2433
- .sbi_gdpr_plugin_active path{
2434
- fill: green;
2435
- }
2436
- .sbi_gdpr_list,
2437
- .sbi_gdpr_yes,
2438
- .sbi_gdpr_no{
2439
- display: none;
2440
- }
2441
- #sbi_admin .sbi_gdpr_error {
2442
- padding: 10px 20px 15px 20px;
2443
- border-radius: 5px;
2444
- background: #F7E6E6;
2445
- border: 1px solid #BA7B7B;
2446
- color: #592626;
2447
- }
2448
- #sbi_admin .sbi-list {
2449
- list-style: inside disc;
2450
- }
2451
- /* Clear */
2452
- .sbi-clear:before {
2453
- content: " ";
2454
- display: table
2455
- }
2456
- .sbi-clear:after {
2457
- clear: both;
2458
- content: " ";
2459
- display: table
2460
- }
2461
-
2462
- /* Social Wall landing page */
2463
- #sbi_admin.sw-landing-page{
2464
- padding: 20px 0;
2465
- }
2466
- #sbi_admin .sbi-sw-icons{
2467
- width: 100%;
2468
- text-align: center;
2469
- }
2470
- #sbi_admin .sbi-sw-icons span{
2471
- display: inline-block;
2472
- width: 32px;
2473
- margin: 0 7px;
2474
- position: relative;
2475
- top: -2px;
2476
- }
2477
- #sbi_admin .sbi-sw-icons .sbi-sb-plus{
2478
- width: 12px;
2479
- height: 12px;
2480
- position: relative;
2481
- top: -12px;
2482
- opacity: 0.9;
2483
- }
2484
- #sbi_admin.sw-landing-page h1,
2485
- #sbi_admin.sw-landing-page h2{
2486
- width: 100%;
2487
- text-align: center;
2488
- }
2489
- #sbi_admin.sw-landing-page h1{
2490
- font-size: 44px;
2491
- margin: 20px 0 0 0;
2492
- line-height: 1.3;
2493
- }
2494
- #sbi_admin.sw-landing-page h2{
2495
- font-size: 30px;
2496
- font-weight: 100;
2497
- line-height: 1.2;
2498
- margin: 5px 0 20px 0;
2499
- }
2500
- #sbi_admin .sbi-sw-info{
2501
- width: 95%;
2502
- max-width: 1400px;
2503
- margin: 0 auto;
2504
- padding: 50px 10px;
2505
- clear: both;
2506
- overflow: hidden;
2507
- box-sizing: border-box;
2508
- }
2509
- #sbi_admin .sbi-sw-features{
2510
- float: left;
2511
- width: 40%;
2512
- margin-right: 5%;
2513
- padding: 20px 0 0 0;
2514
- }
2515
- #sbi_admin .sbi-sw-screenshot{
2516
- position: relative;
2517
- width: 55%;
2518
- float: left;
2519
- box-sizing: border-box;
2520
- border: 5px solid #fff;
2521
- box-shadow: 0 0 20px 0 rgba(0,0,0,0.05);
2522
- }
2523
- #sbi_admin .sbi-sw-features p{
2524
- margin: 35px 0;
2525
- padding: 0;
2526
- font-size: 15px;
2527
- }
2528
- #sbi_admin .sbi-sw-features p:first-child{
2529
- margin-top: 0;
2530
- }
2531
- #sbi_admin .sbi-sw-features span{
2532
- display: block;
2533
- font-size: 20px;
2534
- font-weight: bold;
2535
- }
2536
- #sbi_admin.sw-landing-page .cta {
2537
- margin: 20px 0 0 5px;
2538
- padding: 8px 40px 10px 40px;
2539
- font-size: 20px;
2540
- }
2541
- #sbi_admin .sbi-sw-screenshot img{
2542
- width: 100%;
2543
- display: block;
2544
- }
2545
- #sbi_admin .sbi-sw-screenshot .cta{
2546
- position: absolute;
2547
- top: 50%;
2548
- left: 50%;
2549
- margin-top: -32px;
2550
- margin-left: -80px;
2551
- padding: 15px 30px 17px 30px;
2552
- color: #333;
2553
- text-decoration: none;
2554
- background: rgba(255,255,255,0.95);
2555
- border-radius: 3px;
2556
- /*border: 2px solid rgba(0,0,0,0.1);*/
2557
- box-shadow: 0 0 20px 0 rgba(0,0,0,0.1);
2558
- }
2559
- #sbi_admin .sbi-sw-screenshot:hover .cta,
2560
- #sbi_admin .sbi-sw-screenshot:focus .cta{
2561
- background: #e34717;
2562
- color: #fff;
2563
- box-shadow: 0;
2564
- }
2565
- #sbi_admin .sbi-sw-footer-cta{
2566
- width: 100%;
2567
- text-align: center;
2568
- }
2569
- #sbi_admin .sbi-sw-footer-cta a{
2570
- font-size: 22px;
2571
- display: inline-block;
2572
- text-decoration: none;
2573
- line-height: 25px;
2574
- font-weight: normal;
2575
- padding: 10px 0 30px 0;
2576
- }
2577
- #sbi_admin .sbi-sw-footer-cta span{
2578
- width: 30px;
2579
- height: 30px;
2580
- display: inline-block;
2581
- margin: 0 10px 0 0;
2582
- position: relative;
2583
- top: 4px;
2584
- }
2585
- #sbi_admin .sbi-sw-footer-cta span .emoji{
2586
- width: 30px !important;
2587
- height: 30px !important;
2588
- }
2589
-
2590
- @media all and (max-width: 1500px){
2591
- #sbi_admin .sbi-sw-screenshot{
2592
- width: 55%;
2593
- float: left;
2594
- height: 500px;
2595
- background: url('../img/sw-screenshot.png') no-repeat center center;
2596
- background-size: cover;
2597
- }
2598
- #sbi_admin .sbi-sw-screenshot img{
2599
- display: none;
2600
- }
2601
- }
2602
- @media all and (max-width: 900px){
2603
- #sbi_admin .sbi-sw-info{
2604
- padding: 20px 0;
2605
- }
2606
- #sbi_admin .sbi-sw-features{
2607
- width: 100%;
2608
- padding: 10px 0;
2609
- margin: 0;
2610
- }
2611
- #sbi_admin .sbi-sw-screenshot{
2612
- width: 100%;
2613
- padding: 0;
2614
- height: auto;
2615
- background: none;
2616
- }
2617
- #sbi_admin .sbi-sw-screenshot img{
2618
- display: block;
2619
- }
2620
- #sbi_admin .sbi-sw-features .cta {
2621
- width: 100%;
2622
- box-sizing: border-box;
2623
- text-align: center;
2624
- margin: 20px 0;
2625
- }
2626
- }
2627
-
2628
- /* Alert bubble */
2629
- #sbi_admin .nav-tab{
2630
- position: relative;
2631
- }
2632
- #sbi_admin .sbi-alert-bubble{
2633
- position: absolute;
2634
- top: -9px;
2635
- right: -10px;
2636
-
2637
- display: inline-block;
2638
- vertical-align: top;
2639
- box-sizing: border-box;
2640
- margin: 0;
2641
- padding: 0 7px;
2642
- height: 18px;
2643
-
2644
- border-radius: 9px;
2645
- background-color: #ca4a1f;
2646
- color: #fff;
2647
- font-size: 11px;
2648
- line-height: 1.6;
2649
- text-align: center;
2650
- z-index: 26;
2651
- }
2652
-
2653
- /* Menu Pro link */
2654
- #adminmenu .wp-submenu .sbi_get_pro_highlight{
2655
- background-color: #1da867;
2656
- color: #fff;
2657
- }
2658
- #adminmenu .wp-submenu .sbi_get_pro_highlight:hover,
2659
- #adminmenu .wp-submenu .sbi_get_pro_highlight:active{
2660
- background-color: #2b9865;
2661
- color: #fff;
2662
- }
2663
-
2664
- /* Install another plugin modal */
2665
- .sb_cross_install_modal {
2666
- position: fixed;
2667
- z-index: 999;
2668
- width: 100%;
2669
- top: 0;
2670
- right: 0;
2671
- bottom: 0;
2672
- left: 0;
2673
- background: rgba(0, 0, 0, 0.3);
2674
- }
2675
- .sb_cross_install_inner {
2676
- position: absolute;
2677
- top: 140px;
2678
- left: 50%;
2679
- width: 480px;
2680
- margin: 0 0 0 -245px;
2681
- padding: 35px;
2682
- background: #fff;
2683
- text-align: left;
2684
-
2685
- -webkit-box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2);
2686
- box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2);
2687
-
2688
- -moz-border-radius: 3px;
2689
- -webkit-border-radius: 3px;
2690
- border-radius: 3px;
2691
- }
2692
- .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons .addon-container,
2693
- .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons .addons-container{
2694
- width: 100%;
2695
- margin: 0;
2696
- padding: 0;
2697
- min-height: 198px;
2698
- }
2699
- .sb_cross_install_modal #sbi-admin-addons .addon-item .action-button button{
2700
- background: #007cba;
2701
- border: 0;
2702
- }
2703
- .sb_cross_install_modal #sbi-admin-addons .addon-item .action-button button:hover{
2704
- background: #0071a1;
2705
- }
2706
- .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons{
2707
- padding: 0;
2708
- }
2709
- .sb_cross_install_modal .sbi-loader{
2710
- position: absolute;
2711
- left: 50%;
2712
- top: 50%;
2713
- margin: -10px 0 0 -10px;
2714
- }
2715
- /* More social feeds page */
2716
- #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary .fa-spinner {
2717
- color: #333;
2718
- }
2719
- #sbi_admin .sbi_more_plugins h2{
2720
- margin-top: 15px;
2721
- }
2722
- #sbi_admin .sbi_more_plugins #sbi-admin-addons .addons-container{
2723
- overflow: hidden;
2724
- margin: 0;
2725
- }
2726
- #sbi_admin .sbi_more_plugins#sbi-admin-about #sbi-admin-addons{
2727
- padding: 20px 0;
2728
- }
2729
- #sbi_admin .sbi-more-plugins-intro span{
2730
- color: #e34f0e;
2731
- }
2732
- #sbi_admin .sbi-cols-4{
2733
- max-width: 1100px;
2734
- padding-top: 20px;
2735
- }
2736
- #sbi_admin .sbi-cols-4 .addon-container{
2737
- width: 50%;
2738
- }
2739
- @media all and (max-width: 780px){
2740
- #sbi_admin .sbi-cols-4 .addon-container{
2741
- width: 100%;
2742
- }
2743
- }
2744
-
2745
- /* Locator Summary */
2746
- .sbi-feed-locator-summary-wrap {
2747
- max-width: 1100px;
2748
- margin-bottom: 40px;
2749
- }
2750
- .sbi-full-wrap {
2751
- display: none;
2752
- }
2753
- .sbi-locator-more {
2754
- display: inline-block;
2755
- margin: 0 0 0 1px;
2756
- padding: 0 5px;
2757
- border: 1px solid rgba(0,0,0,0.1);
2758
- border-radius: 3px;
2759
- line-height: 1.6;
2760
- }
2761
-
2762
- .sbi_shortcode_visible .sbi_locations_link {
2763
- display: none;
2764
- }
2765
- .sbi_locations_link a {
2766
- font-weight: normal;
2767
- text-decoration: none;
2768
- }
2769
- .sbi_locations_link svg {
2770
- width: 11px;
2771
- position: relative;
2772
- top: 1px;
2773
- }
2774
-
2775
- /*
2776
- Add Source Loading
2777
- */
2778
- #sbi_config_info .sbi_config_modal.sbi-popup-inside {
2779
- max-width: calc(100% - 200px);
2780
- background: #fff;
2781
- color: #141B38;
2782
- position: relative;
2783
- 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%);
2784
- border-radius: 2px;
2785
- overflow-y: auto;
2786
- max-height: 80vh;
2787
- padding: 0;
2788
- width: 575px;
2789
- height: 320px;
2790
- display: flex;
2791
- justify-content: center;
2792
- align-items: center;
2793
- }
2794
-
2795
- .sbi-source-redirect-ld{
2796
- text-align: center;
2797
- }
2798
- .sbi-source-redirect-ld div{
2799
- display: inline-block;
2800
- width: 32px;
2801
- height: 32px;
2802
- border-radius: 50px;
2803
- margin: 0 10px;
2804
- position: relative;
2805
- background-color: #0096CC;
2806
- color: #0096CC;
2807
- -webkit-animation: sb-source-redirect 1s infinite linear alternate;
2808
- animation: sb-source-redirect 1s infinite linear alternate;
2809
- -webkit-animation-delay: .5s;
2810
- animation-delay: .5s;
2811
- }
2812
-
2813
- .sbi-source-redirect-ld div:before,
2814
- .sbi-source-redirect-ld div:after{
2815
- content: '';
2816
- display: inline-block;
2817
- position: absolute;
2818
- top: 0;
2819
- }
2820
-
2821
- .sbi-source-redirect-ld div:before{
2822
- left: -45px;
2823
- width: 32px;
2824
- height: 32px;
2825
- border-radius: 50px;
2826
- background-color: #0096CC;
2827
- color: #0096CC;
2828
- -webkit-animation: sb-source-redirect 1s infinite alternate;
2829
- animation: sb-source-redirect 1s infinite alternate;
2830
- -webkit-animation-delay: 0s;
2831
- animation-delay: 0s;
2832
- }
2833
-
2834
- .sbi-source-redirect-ld div:after{
2835
- left: 45px;
2836
- width: 32px;
2837
- height: 32px;
2838
- border-radius: 50px;
2839
- background-color: #0096CC;
2840
- color: #0096CC;
2841
- -webkit-animation: sb-source-redirect 1s infinite alternate;
2842
- animation: sb-source-redirect 1s infinite alternate;
2843
- -webkit-animation-delay: 1s;
2844
- animation-delay: 1s;
2845
- }
2846
-
2847
-
2848
-
2849
- @-webkit-keyframes sb-source-redirect {
2850
- 0% {background-color: #0096CC;}
2851
- 50%,100% {background-color: #B5E5FF;}
2852
- }
2853
- @keyframes sb-source-redirect {
2854
- 0% {background-color: #0096CC;}
2855
- 50%,100% {background-color: #B5E5FF;}
2856
- }
2857
-
2858
-
2859
- .sbi-source-redirect-info{
2860
- text-align: center;
2861
- margin-top: 50px;
2862
- }
2863
-
2864
- .sbi-source-redirect-info strong{
2865
- font-size: 18px;
2866
- }
2867
- .sbi-source-redirect-info p{
2868
- color: #8C8F9A;
2869
- padding: 0 24%;
2870
- font-size: 16px;
2871
- margin-bottom: 0px;
2872
- }
1
+ #sbi_admin{
2
+ overflow: hidden;
3
+ }
4
+ #sbi_admin #header{
5
+ padding: 0 0 10px 0;
6
+ }
7
+ #sbi_admin h3{
8
+ padding: 15px 0 0 0;
9
+ }
10
+ #sbi_admin .sbi_tooltip,
11
+ #sbi_admin .sbi_extra_info{
12
+ width: 80%;
13
+ display: none;
14
+
15
+ padding: 10px 15px;
16
+ margin: 10px 0;
17
+ font-size: 13px;
18
+ background: #f9f9f9;
19
+ background: rgba(255,255,255,0.8);
20
+
21
+ -moz-border-radius: 8px;
22
+ -webkit-border-radius: 8px;
23
+ border-radius: 8px;
24
+ }
25
+ #sbi_admin .sbi_more_info p{
26
+ font-size: 13px;
27
+ }
28
+ #sbi_admin .sbi_tooltip ul{
29
+ margin-top: 0;
30
+ margin-bottom: 0;
31
+ }
32
+ #sbi_admin .sbi_tooltip li{
33
+ padding: 4px 0;
34
+ }
35
+ #sbi_admin .sbi_tooltip_link,
36
+ #sbi_admin .sbi_external_link{
37
+ font-size: 13px;
38
+ margin-left: 10px;
39
+ }
40
+ #sbi_admin hr{
41
+ border: none;
42
+ margin: 15px 0;
43
+ border-bottom: 1px solid #ccc;
44
+ }
45
+
46
+ /* Instagram btn */
47
+ #sbi_admin .sbi_admin_btn,
48
+ #sbi_admin .sbi-oembed-connect-btn{
49
+ display: block;
50
+ float: left;
51
+ clear: both;
52
+ padding: 0 21px;
53
+ height: 47px;
54
+ line-height: 47px;
55
+ font-size: 14px;
56
+
57
+ background: #386793;
58
+
59
+ color: #e9eef3;
60
+ text-decoration: none;
61
+
62
+ -moz-border-radius: 5px;
63
+ -webkit-border-radius: 5px;
64
+ border-radius: 5px;
65
+
66
+ -moz-transition: all 0.5s ease-in-out;
67
+ -webkit-transition: all 0.5s ease-in-out;
68
+ -o-transition: all 0.5s ease-in-out;
69
+ transition: all 0.5s ease-in-out;
70
+ }
71
+ #sbi_admin .sbi_admin_btn{
72
+ padding: 0 21px 0 160px;
73
+ background: #386793 url('../img/small-logo.png') no-repeat 16px 11px;
74
+ }
75
+ #sbi_admin .sbi-oembed-connect-btn i {
76
+ margin-right: 5px;
77
+ font-size: 18px;
78
+ position: relative;
79
+ top: 1px;
80
+ }
81
+ #sbi_admin .sbi_admin_btn:hover,
82
+ #sbi_admin .sbi-oembed-connect-btn:hover{
83
+ background-color: #3880c4;
84
+ color: #fff;
85
+
86
+ -moz-transition: all 0.1s ease-in-out;
87
+ -webkit-transition: all 0.1s ease-in-out;
88
+ -o-transition: all 0.1s ease-in-out;
89
+ transition: all 0.1s ease-in-out;
90
+ }
91
+ .sb_get_token .submit {
92
+ display: inline-block;
93
+ margin: 0 0 0 10px;
94
+ padding: 0;
95
+ }
96
+ #sbi_admin .sbi-success {
97
+ position: relative;
98
+ top: -1px;
99
+
100
+ background: #68a30b;
101
+ color: #fff;
102
+ font-size: 13px;
103
+ text-transform: capitalize;
104
+ padding: 4px 8px 5px 8px;
105
+ margin-left: 5px;
106
+ border-radius: 3px;
107
+ }
108
+ #sbi_admin .sbi-customize-tab-opt .sbi-success {
109
+ top: 5px;
110
+ }
111
+ #sbi_admin .sbi_note,
112
+ #sbi_admin .sbi_aside{
113
+ font-size: 12px;
114
+ font-style: italic;
115
+ }
116
+ #sbi_admin .sbi_note,
117
+ #sbi_admin .sbi-space-left{
118
+ margin-left: 10px;
119
+ }
120
+ #sbi_admin table.sbi_shortcode_table{
121
+ border-collapse: collapse;
122
+ }
123
+ #sbi_admin table.sbi_shortcode_table th,
124
+ #sbi_admin table.sbi_shortcode_table td{
125
+ border: 1px solid #999;
126
+ padding: 0.5rem;
127
+ text-align: left;
128
+ }
129
+ #sbi_admin table.sbi_shortcode_table th{
130
+ background: rgba(0,0,0,0.1);
131
+ }
132
+ #sbi_admin table.sbi_shortcode_table td{
133
+ background: rgba(255,255,255,0.5);
134
+ }
135
+ #sbi_admin .sbi_table_header{
136
+ background: #ddd;
137
+ font-weight: bold;
138
+ }
139
+
140
+ #sbi_admin .sbi_radio_label{
141
+ width: 95px;
142
+ padding-top: 5px;
143
+
144
+ display: inline-block;
145
+ vertical-align: top;
146
+ zoom: 1;
147
+ }
148
+
149
+ /* Config info */
150
+ #sbi_config{
151
+ float: left;
152
+ width: 100%;
153
+ clear: both;
154
+ margin: 10px 0 10px 0;
155
+ }
156
+ #sbi_config_info{
157
+ float: left;
158
+ clear: both;
159
+ padding: 5px 15px;
160
+ margin: 10px 0 0 0;
161
+
162
+ border: 1px solid #ddd;
163
+
164
+ -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
165
+ box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
166
+
167
+ border-radius: 2px;
168
+ box-sizing: border-box;
169
+ position: fixed;
170
+ z-index: 999;
171
+ width: 100%;
172
+ top: 0;
173
+ right: 0;
174
+ bottom: 0;
175
+ left: 0;
176
+
177
+ background: rgba(0,0,0,0.3);
178
+ }
179
+ /* Caching settings */
180
+ #sbi_admin #sbi-caching-time-settings{
181
+ display: inline-block;
182
+ }
183
+ #sbi_admin .sbi-caching-cron-options .submit{
184
+ display: inline-block;
185
+ margin: 0;
186
+ padding: 0;
187
+ }
188
+ #sbi_admin .sbi-caching-sched-notice{
189
+ font-size: 11px;
190
+ display: block;
191
+ width: 100%;
192
+ }
193
+ #sbi_admin .sbi-caching-sched-notice span{
194
+ color: green;
195
+ background: #e5eae1;
196
+ padding: 5px 10px;
197
+ border-radius: 5px;
198
+ border: 1px solid #ccd3c6;
199
+ display: inline-block;
200
+ }
201
+
202
+ /* License */
203
+ #sbi_admin .sbi_license_status{
204
+ display: inline-block;
205
+ vertical-align: top;
206
+ zoom: 1;
207
+
208
+ padding: 5px;
209
+ }
210
+
211
+ /* Add Facebook dashicon to CFF admin menu */
212
+ #toplevel_page_sb-instagram-feed .toplevel_page_sb-instagram-feed .wp-menu-image:before{
213
+ content: "\f306";
214
+ }
215
+
216
+ /* Pro only notices */
217
+ #sbi_admin .sbi_row{
218
+ display: block;
219
+ width: 100%;
220
+ clear: left;
221
+ }
222
+ #sbi_admin .sbi_cron_cache_opts .sbi_row{
223
+ padding: 3px 0;
224
+ }
225
+ #sbi_admin .sbi_cron_cache_opts .sbi_row label {
226
+ display: inline-block;
227
+ margin: 5px 2px 0 0;
228
+ }
229
+ #sbi_admin .sbi_pro,
230
+ #sbi_admin .sbi_pro label,
231
+ #sbi_admin .sbi_pro input,
232
+ #sbi_admin .sbi_pro select{
233
+ color: #999 !important;
234
+ }
235
+ #sbi_admin .sbi_shortcode_table tr.sbi_pro{
236
+ background: #eacccc;
237
+ }
238
+ #sbi_admin .sbi_table_key{
239
+ display: block;
240
+ float: left;
241
+ width: 11px;
242
+ height: 11px;
243
+ border: 1px solid #999;
244
+ background: #eacccc;
245
+ margin: 3px 6px 0 0;
246
+ }
247
+ #sbi_admin .sbi_plugins_promo,
248
+ #sbi_admin .sbi_share_plugin{
249
+ width: 100%;
250
+ float: left;
251
+ clear: both;
252
+ }
253
+ #sbi_admin .sbi_plugins_promo a{
254
+ color: #e34f0e;
255
+ }
256
+ #sbi_admin .sbi_share_plugin{
257
+ border-top: 1px solid #ccc;
258
+ margin: 20px 0 0 0;
259
+ }
260
+
261
+ /* Quick links */
262
+ #sbi_admin .sb_instagram_contents_links{
263
+ float: left;
264
+ clear: both;
265
+ width: 100%;
266
+ padding-bottom: 12px;
267
+ border-bottom: 1px solid #ccc;
268
+ margin-bottom: 15px;
269
+ }
270
+ #sbi_admin .sb_instagram_contents_links a,
271
+ #sbi_admin .sb_instagram_contents_links span{
272
+ display: block;
273
+ float: left;
274
+ padding: 2px 5px;
275
+ }
276
+ #sbi_admin .sb_instagram_contents_links span{
277
+ padding-left: 0;
278
+ }
279
+
280
+ #sbi_admin #sb_instagram_width_options{
281
+ margin-top: 5px;
282
+ display: none;
283
+ }
284
+ #sbi_admin #sb_instagram_width_options label {
285
+ font-size: 13px;
286
+ position: relative;
287
+ top: -2px;
288
+ }
289
+
290
+ /* Shortcode labels */
291
+ #sbi_admin label{
292
+ position: relative;
293
+ }
294
+ #sbi_admin th{
295
+ position: relative;
296
+ }
297
+ #sbi_admin .sbi_shortcode{
298
+ display: none;
299
+ position: absolute;
300
+ z-index: 10;
301
+ font-size: 11px;
302
+ float: left;
303
+ width: auto;
304
+ white-space: pre-line;
305
+ line-height: 1.4;
306
+ }
307
+ #sbi_admin .sbi_shortcode_symbol{
308
+ position: absolute;
309
+ right: -24px;
310
+ bottom: 0;
311
+ padding: 2px 4px 3px 3px;
312
+ width: auto;
313
+ font-size: 11px;
314
+ margin-left: 5px;
315
+ }
316
+
317
+ /* Quick start */
318
+ #sbi_admin .sbi_quickstart{
319
+ display: block;
320
+ float: left;
321
+ clear: both;
322
+ margin: 15px 0 0 0;
323
+ padding: 15px 20px;
324
+ min-width: 808px;
325
+
326
+ border: 1px solid #ccc;
327
+ background: #eee;
328
+ background: rgba(255,255,255,0.5);
329
+
330
+ -moz-border-radius: 5px;
331
+ -webkit-border-radius: 5px;
332
+ border-radius: 5px;
333
+ }
334
+ #sbi_admin .sbi_quickstart h3,
335
+ #sbi_admin .sbi_quickstart p{
336
+ margin: 0;
337
+ padding: 5px 0;
338
+ }
339
+
340
+ /* Error notice */
341
+ #sbi_admin .sbi_alert,
342
+ #sbi_admin .sbi_alert .sbi_tooltip {
343
+ background: #F7E6E6;
344
+ border-color: #BA7B7B;
345
+ color: #592626;
346
+ }
347
+ #sbi_admin .sbi_notice{
348
+ margin-top: 5px;
349
+ background: #f9ecda;
350
+ padding: 5px 10px;
351
+ border: 1px solid #e89a2e;
352
+ color: #cf6100;
353
+
354
+ -moz-border-radius: 3px;
355
+ -webkit-border-radius: 3px;
356
+ border-radius: 3px;
357
+ }
358
+ #sbi_admin .sbi_nojs_notice a{
359
+ color: #d85600;
360
+ }
361
+ #sbi_admin .sbi_nojs_notice a:hover,
362
+ #sbi_admin .sbi_nojs_notice a:focus{
363
+ color: #a34100;
364
+ }
365
+ #sbi_admin .sbi_nojs_notice p{
366
+ margin: 0;
367
+ padding: 5px 0;
368
+ font-size: 13px;
369
+ }
370
+ #sbi_admin .sbi_user_id_error,
371
+ #sbi_admin .sbi_other_user_error{
372
+ display: none;
373
+
374
+ margin: 10px 0;
375
+ background: #F7E6E6;
376
+ padding: 5px 10px;
377
+ border: 1px solid #BA7B7B;
378
+ color: #592626;
379
+
380
+ -moz-border-radius: 3px;
381
+ -webkit-border-radius: 3px;
382
+ border-radius: 3px;
383
+ }
384
+ .sbi_alert {
385
+ background: #F7E6E6;
386
+ border-color: #BA7B7B;
387
+ color: #592626;
388
+ }
389
+
390
+ /* Update notice */
391
+ .sb_instagram_notice{
392
+ position: relative;
393
+ clear: both;
394
+ width: 96%;
395
+ margin: 20px 0;
396
+ background: #F7E6E6;
397
+ padding: 15px 1.5%;
398
+ border: 1px solid #BA7B7B;
399
+ color: #592626;
400
+
401
+ -moz-border-radius: 3px;
402
+ -webkit-border-radius: 3px;
403
+ border-radius: 3px;
404
+ }
405
+ #sbi_admin .sbi-goto {
406
+ border: 1px solid #e89a2e;
407
+ background-color: rgba(232, 154, 46, .2);
408
+ }
409
+ #sbi_admin .sbi-goto th {
410
+ padding-left: 4px;
411
+ }
412
+ .sb_instagram_notice .sb_instagram_notice_title{
413
+ font-size: 18px;
414
+ padding-bottom: 5px;
415
+ }
416
+ .sb_instagram_notice p{
417
+ padding: 0;
418
+ margin: 0;
419
+ font-size: 14px;
420
+ }
421
+ .sb_instagram_dismiss{
422
+ position: absolute;
423
+ top: 10px;
424
+ right: 10px;
425
+ color: #dd3d36;
426
+ text-decoration: none;
427
+ }
428
+
429
+ /* Review notice */
430
+ .sbi_notice{
431
+ position: relative;
432
+ overflow: hidden;
433
+ clear: both;
434
+ max-width: 865px;
435
+ margin-top: 10px;
436
+ padding: 10px 10px 7px 10px;
437
+
438
+ background: #E6F0E8;
439
+ border: 1px solid #6AB074;
440
+ color: #214F28;
441
+ }
442
+ .sbi_notice .sbi_thumb{
443
+ position: relative;
444
+ display: inline-block;
445
+ width: 74px;
446
+ margin: 0 0 0 -100% !important;
447
+
448
+ -moz-border-radius: 4px;
449
+ -webkit-border-radius: 4px;
450
+ border-radius: 4px;
451
+ }
452
+ .sbi_notice .sbi_thumb .img-overlay {
453
+ position: absolute;
454
+ bottom: 4px;
455
+ padding: 6px 7px 6px 5px;
456
+ font-size: 13px;
457
+ font-weight: bold;
458
+ background: #fff;
459
+ background: rgba(255,255,255,0.85);
460
+ line-height: 1;
461
+ color: #333;
462
+ box-shadow: 1px -1px 3px 0 rgba(0,0,0,0.15);
463
+ }
464
+ .sbi_notice .sbi_thumb img {
465
+ max-width: 100%;
466
+ }
467
+ .sbi_notice .sbi-notice-text{
468
+ float: left;
469
+ clear: none;
470
+ width: 100%;
471
+ padding: 0;
472
+ }
473
+ .sbi_notice .sbi-links{
474
+ margin-top: 4px !important;
475
+ }
476
+ .sbi_notice p{
477
+ float: left;
478
+ clear: both;
479
+ width: auto;
480
+ margin: 0 0 0 90px !important;
481
+ padding: 2px 40px 2px 0;
482
+ line-height: 1.4;
483
+ }
484
+ .sbi_notice a{
485
+ display: inline-block;
486
+ padding: 0 8px;
487
+ color: #178529;
488
+ }
489
+ .sbi_notice a:hover,
490
+ .sbi_notice a:focus{
491
+ color: #0c7abf;
492
+ }
493
+ .sbi_notice .links{
494
+ margin: 0 0 0 90px !important;
495
+ padding: 4px 0 0 0;
496
+ margin-top: 1px !important;
497
+ }
498
+ .sbi_review_notice .links{
499
+ margin-left: 82px !important;
500
+ margin-top: 0 !important;
501
+ }
502
+ .sbi_notice .sbi_notice_close,
503
+ .sbi_notice .sbi_bfcm_sale_notice_close,
504
+ .sbi_notice .sbi_new_user_sale_notice_close {
505
+ position: absolute;
506
+ top: 0;
507
+ right: 0;
508
+ padding: 10px;
509
+ line-height: 1;
510
+ }
511
+ .sbi_notice .sbi_notice_close:hover,
512
+ .sbi_notice .sbi_notice_close:focus{
513
+ color: #a34100;
514
+ }
515
+ .sbi_notice strong span {
516
+ font-weight: 900;
517
+ }
518
+ /* Notice CTA btn */
519
+ .sbi_notice .sbi_offer_btn,
520
+ .sbi_notice .sbi_main_cta{
521
+ padding: 4px 12px 6px 12px;
522
+ background: green;
523
+ color: #fff;
524
+ border-radius: 4px;
525
+ display: inline-block;
526
+ text-decoration: none;
527
+ margin-left: 0;
528
+ margin-right: 4px;
529
+ }
530
+ .sbi_notice .sbi_offer_btn:hover,
531
+ .sbi_notice .sbi_offer_btn:focus,
532
+ .sbi_notice .sbi_main_cta:hover,
533
+ .sbi_notice .sbi_main_cta:focus{
534
+ background: #049404;
535
+ color: #fff;
536
+ }
537
+ .sbi_notice .sbi_other_notice{
538
+ padding-top: 10px;
539
+ font-style: italic;
540
+ font-size: 12px;
541
+ }
542
+ .sbi_notice .sbi_other_notice a{
543
+ padding: 0;
544
+ }
545
+ .sbi_notice .links > .sbi_main_cta:first-child {
546
+ margin-left: 8px;
547
+ }
548
+
549
+ /* Support page */
550
+ #sbi_admin .sbi_support{
551
+ overflow: hidden;
552
+ margin-bottom: 20px;
553
+ width: 70%;
554
+ }
555
+ #sbi_admin .sbi_support p{
556
+ width: 100%;
557
+ float: left;
558
+ clear: both;
559
+ margin: 0 0 20px 0;
560
+ }
561
+ #sbi_admin .sbi-support-title{
562
+ font-weight: bold;
563
+ font-size: 16px;
564
+ display: block;
565
+ padding-bottom: 5px;
566
+ }
567
+ #sbi_admin .sbi-support-faqs{
568
+ float: left;
569
+ clear: both;
570
+ width: 100%;
571
+ padding-left: 5%;
572
+ margin: -10px 0 10px 0;
573
+ }
574
+ #sbi_admin .sbi-support-faqs ul{
575
+ float: left;
576
+ width: 250px;
577
+ margin-right: 0;
578
+ }
579
+ #sbi_admin .sbi-support-faqs ul li{
580
+ font-size: 13px;
581
+ margin-bottom: 4px;
582
+ }
583
+ #sbi_admin .sbi-support-faqs .fa-chevron-right{
584
+ font-size: 8px;
585
+ margin-left: 4px;
586
+ }
587
+ #sbi_admin #sbi-support-video{
588
+ margin-top: 10px;
589
+ border: 1px solid #ddd;
590
+ display: none;
591
+ }
592
+ #sbi_admin .sb_get_token .button-primary:active {
593
+ height: 28px;
594
+ margin-top: -4px;
595
+ }
596
+
597
+ /* Pro header options - greyed out */
598
+ #sbi_admin #sb_instagram_header_style_boxed_options{
599
+ display: block;
600
+ float: left;
601
+ clear: both;
602
+ overflow: hidden;
603
+ width: auto;
604
+ padding: 10px 10px 0 10px;
605
+ background: rgba(255,255,255,0.5);
606
+ font-size: 12px;
607
+ line-height: 22px;
608
+ }
609
+ #sbi_admin #sb_instagram_header_style_boxed_options label{
610
+ height: 25px;
611
+ display: inline-block;
612
+ line-height: 25px;
613
+ position: relative;
614
+ top: -10px;
615
+ margin-right: 10px;
616
+ }
617
+ /* Moderation settings */
618
+ #sbi_admin .sb_instagram_box,
619
+ #sbi_admin .sbi_mod_manual_settings{
620
+ float: left;
621
+ clear: both;
622
+ width: 96%;
623
+
624
+ padding: 10px 2%;
625
+ margin: 10px 0;
626
+ font-size: 13px;
627
+ background: #f9f9f9;
628
+ background: rgba(255,255,255,0.8);
629
+
630
+ -moz-border-radius: 8px;
631
+ -webkit-border-radius: 8px;
632
+ border-radius: 8px;
633
+ }
634
+ #sbi_admin .sbi_mod_manual_settings .sbi_row{
635
+ padding: 15px 0 15px 0;
636
+ }
637
+ #sbi_admin .sbi_mod_manual_settings label{
638
+ display: block;
639
+ font-weight: bold;
640
+ font-size: 14px;
641
+ padding-bottom: 10px;
642
+ }
643
+ #sbi_admin .sbi_mod_manual_settings .sbi_tooltip{
644
+ width: 98%;
645
+ padding: 10px 1%;
646
+ background: #eee;
647
+ background: rgba(0,0,0,0.05);
648
+ }
649
+ #sbi_admin .sb_instagram_apply_labels p{
650
+ display: inline-block;
651
+ margin: 0 2px 5px 0;
652
+ }
653
+ #sbi_admin .sb_instagram_apply_labels input{
654
+ margin: 0 4px 0 8px;
655
+ }
656
+ #sbi_admin .sbi_white_list_names_wrapper{
657
+ display: inline-block;
658
+ margin-right: 10px;
659
+ }
660
+
661
+ /* Show Pro Options button */
662
+ #sbi_admin .sbi-show-pro{
663
+ margin-top: 10px;
664
+ text-align: center;
665
+ }
666
+ #sbi_admin .sbi-pro-options{
667
+ display: none;
668
+ }
669
+ #sbi_admin .sbi-upgrade-link{
670
+ margin: 25px 0 5px 0;
671
+ }
672
+
673
+ #sbi_admin .sbi-pro-notice,
674
+ #sbi_admin .sbi-pro-notice img{
675
+ display: block;
676
+ float: left;
677
+ clear: both;
678
+ margin: 20px 0 0 0;
679
+ overflow: hidden;
680
+
681
+ -moz-border-radius: 4px;
682
+ -webkit-border-radius: 4px;
683
+ border-radius: 4px;
684
+
685
+ -moz-transition: all 0.5s ease-in-out;
686
+ -webkit-transition: all 0.5s ease-in-out;
687
+ -o-transition: all 0.5s ease-in-out;
688
+ transition: all 0.5s ease-in-out;
689
+ }
690
+ #sbi_admin .sbi-pro-notice img{
691
+ margin: 0;
692
+ }
693
+ #sbi_admin .sbi-pro-notice:hover{
694
+ opacity: 0.95;
695
+
696
+ -moz-transition: all 0.1s ease-in-out;
697
+ -webkit-transition: all 0.1s ease-in-out;
698
+ -o-transition: all 0.1s ease-in-out;
699
+ transition: all 0.1s ease-in-out;
700
+ }
701
+ /* Connected Accounts */
702
+ #sbi_admin .sbi_connected_account {
703
+ position: relative;
704
+ box-sizing: border-box;
705
+ padding: 10px 86px 10px 10px;
706
+ border-radius: 5px;
707
+ background: #fff;
708
+ margin-bottom: 5px;
709
+ overflow: hidden;
710
+ clear: both;
711
+ border: 1px solid #ddd;
712
+ }
713
+ #sbi_admin .sbi_ca_username {
714
+ line-height: 1.4;
715
+ margin-left: 15px;
716
+ float: left;
717
+ font-size: 18px;
718
+ }
719
+ #sbi_admin .sbi_connected_account .sbi_ca_avatar{
720
+ margin-right: 15px;
721
+ }
722
+ #sbi_admin .sbi_connected_account .sbi_ca_username {
723
+ margin-left: 0;
724
+ margin-right: 15px;
725
+ }
726
+ #sbi_admin .sbi_connected_account .sbi_ca_username strong{
727
+ float: left;
728
+ }
729
+ #sbi_admin .sbi_connected_account .sbi_ca_username span{
730
+ font-size: 10px;
731
+ font-weight: normal;
732
+ text-transform: uppercase;
733
+ padding: 0;
734
+ margin: 0;
735
+ display: block;
736
+ }
737
+
738
+ #sbi_admin .sbi_ca_actions {
739
+ display: inline-block;
740
+ }
741
+ #sbi_admin .sbi_ca_actions .fa{
742
+ margin-right: 5px;
743
+ }
744
+ #sbi_admin .sbi_ca_actions a.button-primary,
745
+ #sbi_admin .sbi_ca_actions a.button-secondary,
746
+ #sbi_admin .sbi_ca_accesstoken a.sbi_ca_token_shortcode {
747
+ font-size: 12px;
748
+ padding: 4px 6px;
749
+ height: auto;
750
+ line-height: 1.4;
751
+ margin: 7px 5px 0 0;
752
+ min-height: 1px;
753
+ }
754
+ #sbi_admin .sbi_ca_at_is_valid {
755
+ margin-top: 10px;
756
+ display: none;
757
+ }
758
+
759
+ #sbi_admin .sbi_is_private .sbi_tooltip_link{
760
+ top: 1px !important;
761
+ margin: 0 -5px 0 5px;
762
+ }
763
+
764
+ .sbi_is_private,
765
+ .sbi_warning {
766
+ position: relative;
767
+ display: inline-block;
768
+ font-size: 12px;
769
+ padding: 4px 4px 4px 8px;
770
+ vertical-align: top;
771
+ margin: 6px 5px 0 0;
772
+ border-radius: 4px;
773
+
774
+ background: #fdf4e5;
775
+ border: 1px solid #e6bc88;
776
+ color: #94570c;
777
+ }
778
+ #sbi_admin .sbi_warning,
779
+ .sbi-oembed-button .sb_instagram_notice{
780
+ clear: both;
781
+ padding: 20px 30px;
782
+ border-radius: 3px;
783
+ }
784
+ .sbi-oembed-button .sb_instagram_notice p {
785
+ font-size: 13px;
786
+ line-height: 1.5;
787
+ margin: 1em 0;
788
+ }
789
+ .sbi_is_private > span {
790
+ display: inline-block;
791
+ padding-top: 3px;
792
+ }
793
+ #sbi_admin .sbi_is_private a.button.button-secondary {
794
+ margin: 0 0 0 5px;
795
+ padding: 2px 6px;
796
+ }
797
+
798
+ @-webkit-keyframes sbi_flash {
799
+ 0% {
800
+ background-color: #cae2a5;
801
+ opacity:1;
802
+ border: 1px solid #b2ce88;
803
+ }
804
+ 100% {
805
+ background-color: #fff;
806
+ }
807
+ }
808
+ #sbi_admin .sbi_account_updated{
809
+ border: 1px solid #ddd;
810
+ background: #fff;
811
+
812
+ -webkit-animation-name: sbi_flash;
813
+ -webkit-animation-duration: 700ms;
814
+ -webkit-animation-iteration-count: 1;
815
+ -webkit-animation-timing-function: linear;
816
+ -moz-animation-name: sbi_flash;
817
+ -moz-animation-duration: 700ms;
818
+ -moz-animation-iteration-count: 1;
819
+ -moz-animation-timing-function: linear;
820
+ }
821
+
822
+ #sbi_admin .sbi_account_active{
823
+ border: 1px solid #b2ce88;
824
+ background: #ecf2e3;
825
+ }
826
+
827
+ #sbi_admin .sbi_ca_alert {
828
+ display: none;
829
+ }
830
+ #sbi_admin .sbi_account_invalid .sbi_ca_alert {
831
+ display: block;
832
+ }
833
+ #sbi_admin .sbi_ca_avatar{
834
+ float: left;
835
+ width: 40px;
836
+ height: 40px;
837
+ border-radius: 5px;
838
+ }
839
+ #sbi_admin .sbi_ca_accesstoken{
840
+ display: none;
841
+ width: 100%;
842
+ float: left;
843
+ clear: both;
844
+ margin-top: 10px;
845
+ }
846
+ #sbi_admin .sbi_ca_token_label{
847
+ display: inline-block;
848
+ position: relative;
849
+ background: #f9f9f9;
850
+ color: #555;
851
+ padding: 3px 5px;
852
+ font-size: 12px;
853
+ border: 1px solid #d6d6d6;
854
+ height: 16px;
855
+ line-height: 15px;
856
+ border-radius: 4px 0 0 4px;
857
+ min-width: 80px;
858
+ margin-bottom: 2px;
859
+ }
860
+ #sbi_admin .sbi_permissions_desc,
861
+ #sbi_admin .sbi_ca_token,
862
+ #sbi_admin .sbi_ca_user_id {
863
+ padding: 3px 10px;
864
+ }
865
+ #sbi_admin .sbi_permissions_desc{
866
+ font-size: 13px;
867
+ }
868
+
869
+ #sbi_admin .sbi_ca_token,
870
+ #sbi_admin .sbi_ca_user_id{
871
+ position: relative;
872
+ padding: 3px 10px;
873
+ border: 1px solid #d6d6d6;
874
+ border-left: none;
875
+ font-size: 12px;
876
+ border-radius: 0 4px 4px 0;
877
+ background: rgba(255,255,255,0.8);
878
+ min-width: 400px;
879
+ width: 75%;
880
+ display: inline-block;
881
+ margin-left: 0;
882
+ min-height: 1px;
883
+ line-height: 1.4;
884
+ }
885
+ #sbi_admin .sbi_ca_accesstoken a.sbi_ca_token_shortcode{
886
+ margin: 0 8px 8px;
887
+ padding: 6px;
888
+ height: auto;
889
+ line-height: 1;
890
+ }
891
+
892
+ #sbi_admin .sbi_delete_account{
893
+ position: absolute;
894
+ right: 10px;
895
+ top: 10px;
896
+
897
+ padding: 5px 10px;
898
+ background: rgba(0,0,0,0.05);
899
+ color: #666;
900
+ border-radius: 50px;
901
+ text-decoration: none;
902
+ font-size: 12px;
903
+ }
904
+ #sbi_admin .sbi_delete_account:hover,
905
+ #sbi_admin .sbi_delete_account:focus{
906
+ background: #333;
907
+ color: #ddd;
908
+ }
909
+ #sbi_admin .sbi_delete_account .sbi_remove_text{
910
+ margin-left: 5px;
911
+ }
912
+
913
+ .sbi_connected_accounts_wrap{
914
+ vertical-align: top;
915
+ }
916
+ #sbi_admin .sbi_no_accounts{
917
+ display: inline-block;
918
+ padding: 4px 15px;
919
+ border-radius: 8px;
920
+ background: rgba(255,255,255,0.8);
921
+ margin-bottom: 3px;
922
+ }
923
+ #sbi_admin #sbi_manual_submit:active{
924
+ vertical-align: unset;
925
+ }
926
+ #sbi_admin .sbi_manually_connect_wrap{
927
+ padding-top: 5px;
928
+ }
929
+ #sbi_admin .sbi_user_feed_account_wrap:first-child,
930
+ #sbi_admin .sbi_tagged_feed_account_wrap:first-child{
931
+ padding-top: 5px;
932
+ }
933
+ #sbi_admin .sbi_user_feed_account_wrap:last-child,
934
+ #sbi_admin .sbi_tagged_feed_account_wrap:last-child{
935
+ padding-bottom: 6px;
936
+ }
937
+ #sbi_admin .sbi_user_feed_account_wrap,
938
+ #sbi_admin .sbi_tagged_feed_account_wrap{
939
+ padding-bottom: 5px;
940
+ padding-left: 2px;
941
+ }
942
+ #sbi_admin .sbi_user_feed_account_wrap span,
943
+ #sbi_admin .sbi_tagged_feed_account_wrap span{
944
+ font-size: 13px;
945
+ }
946
+ #sbi_admin .sbi_manual_account_id_toggle label{
947
+ display: block;
948
+ margin: 10px 0 0 0;
949
+ font-size: 13px;
950
+ }
951
+ #sbi_admin .sbi_business_profile_tag{
952
+ display: none;
953
+ padding: 8px 10px;
954
+ background: rgba(0,0,0,0.05);
955
+ border-radius: 0 5px 5px 0;
956
+ margin: 0 0 0 -2px;
957
+ font-size: 13px;
958
+ height: 15px;
959
+ line-height: 15px;
960
+ box-shadow: inset 0 0 1px rgba(0,0,0,.5);
961
+ }
962
+ #sbi_admin .sbi_ca_info{
963
+ overflow: hidden;
964
+ }
965
+ #sbi_admin .sbi_ca_show_token{
966
+ display: inline-block;
967
+ padding: 10px 5px 0px 5px;
968
+ margin: 0;
969
+ font-size: 12px;
970
+ vertical-align: top;
971
+ }
972
+ #sbi_admin .sbi_ca_shortcode{
973
+ display: none;
974
+ padding: 0;
975
+ width: 100%;
976
+ float: left;
977
+ clear: both;
978
+ margin: 10px 0 0 0;
979
+ }
980
+ #sbi_admin .sbi_ca_shortcode p{
981
+ padding-bottom: 10px;
982
+ font-size: 13px;
983
+ }
984
+ #sbi_admin .sbi_ca_shortcode code{
985
+ margin-top: 5px;
986
+ display: inline-block;
987
+ }
988
+ #sbi_admin .sbi_user_feed_ids_wrap .sbi_ca_avatar{
989
+ width: 20px;
990
+ height: 20px;
991
+ position: relative;
992
+ top: 5px;
993
+ margin-right: 8px;
994
+ border-radius: 4px;
995
+ }
996
+
997
+
998
+ @media all and (max-width: 1200px){
999
+ #sbi_admin .sbi_delete_account .sbi_remove_text{
1000
+ display: none;
1001
+ }
1002
+ #sbi_admin .sbi_ca_token,
1003
+ #sbi_admin .sbi_ca_user_id{
1004
+ border-left: 1px solid #d6d6d6;
1005
+ border-radius: 4px;
1006
+ }
1007
+ }
1008
+ @media all and (max-width: 800px){
1009
+ #sbi_admin .sbi_col.sbi_one {
1010
+ width: 25%;
1011
+ margin-right: 5%;
1012
+ }
1013
+ #sbi_admin .sbi_col.sbi_two{
1014
+ width: 70%;
1015
+ }
1016
+ }
1017
+
1018
+ #sbi_admin .sbi_col {
1019
+ float: left;
1020
+ position: relative;
1021
+ }
1022
+ #sbi_admin .sbi_col.sbi_one{
1023
+ width: 118px;
1024
+ }
1025
+ #sbi_admin #sb_instagram_coordinates_options .sbi_col.sbi_one{
1026
+ width: 70px;
1027
+ }
1028
+ #sbi_admin .sbi_col.sbi_two{
1029
+ /*width: 600px;*/
1030
+ width: 75%;
1031
+ }
1032
+ #sbi_admin .sbi_row input[type=radio]{
1033
+ margin: 5px 2px 0 0;
1034
+ }
1035
+
1036
+ @media all and (max-width: 800px){
1037
+ #sbi_admin .sbi_col.sbi_one {
1038
+ width: 25%;
1039
+ margin-right: 5%;
1040
+ }
1041
+ #sbi_admin .sbi_col.sbi_two{
1042
+ width: 70%;
1043
+ }
1044
+ }
1045
+
1046
+
1047
+ #sbi_config_info .sbi_config_modal{
1048
+ position: absolute;
1049
+ top: 160px;
1050
+ left: 50%;
1051
+ width: 450px;
1052
+ max-width: 70%;
1053
+
1054
+ margin: 0 0 0 -230px;
1055
+ padding: 20px;
1056
+ background: #fff;
1057
+
1058
+ -webkit-box-shadow: 0 1px 20px rgba(0,0,0,0.2);
1059
+ box-shadow: 0 1px 20px rgba(0,0,0,0.2);
1060
+
1061
+ -moz-border-radius: 3px;
1062
+ -webkit-border-radius: 3px;
1063
+ border-radius: 3px;
1064
+ }
1065
+ @media all and (max-width: 480px){
1066
+ #sbi_config_info .sbi_config_modal{
1067
+ top: 40px;
1068
+ max-width: 100%;
1069
+ margin: 0 0 0 -50%;
1070
+ box-sizing: border-box;
1071
+ }
1072
+ }
1073
+ #sbi_config_info.sb_get_token .sbi_config_modal {
1074
+ text-align: center;
1075
+ }
1076
+ .sbi_config_modal .sbi_submit{
1077
+ clear: both;
1078
+ width: 100%;
1079
+ margin: 15px 0 5px 0;
1080
+ text-align: center;
1081
+ }
1082
+ .sbi_config_modal .button{
1083
+ margin: 0 5px;
1084
+ }
1085
+ #sbi_admin #sbi_connect_account:active{
1086
+ margin-top: 0;
1087
+ }
1088
+ .sbi_config_modal .sbi_ca_username {
1089
+ float: none;
1090
+ margin: 10px 0 0 10px;
1091
+ font-size: 18px;
1092
+ line-height: 1.2;
1093
+
1094
+ display: inline-block;
1095
+ position: relative;
1096
+ top: -13px;
1097
+ }
1098
+ .sbi_config_modal .sbi_ca_avatar{
1099
+ float: none;
1100
+ width: 40px;
1101
+ height: 40px;
1102
+ border-radius: 5px;
1103
+ }
1104
+ .sbi_config_modal .sbi_modal_close{
1105
+ position: absolute;
1106
+ top: 0;
1107
+ right: 0;
1108
+ padding: 10px;
1109
+ font-size: 14px;
1110
+ color: #ccc;
1111
+ margin: 0;
1112
+ }
1113
+ .sbi_config_modal .sbi_modal_close:focus,
1114
+ .sbi_config_modal .sbi_modal_close:hover{
1115
+ color: #333;
1116
+ }
1117
+
1118
+ /* New modal info */
1119
+ .sbi_config_modal p{
1120
+ font-size: 14px;
1121
+ line-height: 1.6;
1122
+ }
1123
+ .sbi_config_modal .sbi_login_button_row{
1124
+ display: block;
1125
+ padding: 3px 0;
1126
+ width: 90%;
1127
+ margin: 0 auto;
1128
+ }
1129
+ #sbi_admin .sbi_login_button_row label{
1130
+ top: -2px;
1131
+ left: 3px;
1132
+ }
1133
+ #sbi_admin .sbi_login_button_row label b{
1134
+ font-size: 14px;
1135
+ }
1136
+ #sbi_admin .sbi_login_button_row .sbi_tooltip{
1137
+ width: 90%;
1138
+ padding: 10px 5%;
1139
+ background: #eee;
1140
+ }
1141
+ #sbi_admin .sbi_config_modal .sbi_admin_btn{
1142
+ display: inline-block;
1143
+ float: none;
1144
+ margin: 20px 0 5px 0;
1145
+ padding: 0 21px;
1146
+ background-image: none;
1147
+ }
1148
+ .sbi-oembeds #sbi_config_info .sbi_config_modal{
1149
+ padding: 40px 40px 25px 40px;
1150
+ }
1151
+
1152
+ .sbi_layout_cell {
1153
+ display: inline-block;
1154
+ float: left;
1155
+ width: 100px;
1156
+ padding: 15px 15px 10px 15px;
1157
+ margin-right: 10px;
1158
+ background: #f6f6f6;
1159
+ border: 1px solid #ddd;
1160
+ -moz-border-radius: 5px;
1161
+ -webkit-border-radius: 5px;
1162
+ border-radius: 5px;
1163
+ vertical-align: top;
1164
+ }
1165
+ .sbi_layout_cell:nth-child(4) {
1166
+ margin-right: 0;
1167
+ }
1168
+ @media all and (max-width: 1200px){
1169
+ .sbi_layout_cell{
1170
+ width: 21%;
1171
+ padding: 1%;
1172
+ margin-right: 1%;
1173
+ }
1174
+ }
1175
+ @media all and (max-width: 480px){
1176
+ .sbi_layout_cell{
1177
+ width: 98%;
1178
+ padding: 1%;
1179
+ margin: 5px 0;
1180
+ }
1181
+ }
1182
+ .sbi_label {
1183
+ font-size: 16px;
1184
+ font-weight: bold;
1185
+ padding-left: 2px;
1186
+ }
1187
+ .sbi_layout_cell:hover,
1188
+ .sbi_layout_cell:focus{
1189
+ background: #fcfcfc;
1190
+ cursor: pointer;
1191
+ }
1192
+ .sbi_layout_cell.sbi_layout_selected{
1193
+ /*background: #f7faf1;*/
1194
+ /*border: 1px solid #7ad03a;*/
1195
+ }
1196
+ .sbi_layout_cell h3{
1197
+ font-size: 15px;
1198
+ margin-top: 0;
1199
+ }
1200
+ .sbi_layout_cell img{
1201
+ width: 100%;
1202
+ border: 1px solid #ddd;
1203
+ margin-top: 5px;
1204
+ }
1205
+
1206
+ #sbi_admin .sb_instagram_mobile_layout_setting,
1207
+ #sbi_admin .sb_instagram_layout_settings{
1208
+ float: left;
1209
+ clear: both;
1210
+ width: 96%;
1211
+
1212
+ padding: 20px 2%;
1213
+ margin: 10px 0;
1214
+ font-size: 13px;
1215
+ background: #f9f9f9;
1216
+ background: rgba(255,255,255,0.8);
1217
+
1218
+ -moz-border-radius: 8px;
1219
+ -webkit-border-radius: 8px;
1220
+ border-radius: 8px;
1221
+ }
1222
+ .sb_instagram_layout_setting {
1223
+ clear:left;
1224
+ margin-bottom: 10px;
1225
+ }
1226
+ #sbi_admin .sb_instagram_mobile_layout_setting {
1227
+ width: auto;
1228
+ }
1229
+
1230
+ .form-table .sb_layout_type {
1231
+ display: inline-block;
1232
+ margin-left: 20px;
1233
+ }
1234
+ .form-table .sb_layout_type:first-child {
1235
+ margin-left: 0;
1236
+ }
1237
+
1238
+ .sb_instagram_layout_setting,
1239
+ .sb_instagram_box_setting{
1240
+ margin-bottom: 20px;
1241
+ }
1242
+ .sb_instagram_layout_setting:last-child,
1243
+ .sb_instagram_box_setting:last-child {
1244
+ margin-bottom: 0;
1245
+ }
1246
+ .sb_instagram_layout_setting label,
1247
+ .sb_instagram_box_setting label {
1248
+ display: inline-block;
1249
+ font-weight: bold;
1250
+ font-size: 14px;
1251
+ padding-bottom: 5px;
1252
+ padding-right: 5px;
1253
+ }
1254
+ .sb_instagram_box_setting textarea {
1255
+ width: 100%;
1256
+ }
1257
+ #sbi_admin .sb_layout_options_wrap .sbi_shortcode,
1258
+ #sbi_admin .sb_instagram_box_setting .sbi_shortcode{
1259
+ position: relative;
1260
+ float: none;
1261
+ top: -4px
1262
+ }
1263
+
1264
+ /* Layout settings */
1265
+ #sbi_admin .sb_layout_options_wrap{
1266
+ position: relative;
1267
+ clear: both;
1268
+ overflow: hidden;
1269
+ }
1270
+ #sbi_admin .sb_layout_options_wrap .sb_instagram_layout_settings{
1271
+ display: none;
1272
+ }
1273
+ #sbi_admin .sb_layout_options_wrap .sbi_shortcode_symbol{
1274
+ bottom: 4px;
1275
+ right: -20px;
1276
+ }
1277
+ #sbi_admin .sb_layout_options_wrap .sbi_shortcode{
1278
+ position: relative;
1279
+ float: none;
1280
+ top: -4px
1281
+ }
1282
+ #sbi_admin .sbi_close_options{
1283
+ position: absolute;
1284
+ top: 10px;
1285
+ right: 2px;
1286
+ padding: 15px 14px;
1287
+ color: #999;
1288
+ }
1289
+ #sbi_admin .sbi_close_options:hover,
1290
+ #sbi_admin .sbi_close_options:focus{
1291
+ color: #666;
1292
+ }
1293
+ #sbi_admin .sbi_pro input[type=radio]:checked:before{
1294
+ background-color: #ccc;
1295
+ }
1296
+ #sbi_admin .sbi_layout_cell{
1297
+ position: relative;
1298
+ }
1299
+ #sbi_admin .sbi_layout_cell img{
1300
+ opacity: 0.5;
1301
+ }
1302
+ #sbi_admin .sbi_lock{
1303
+ padding: 8px 10px 8px 13px;
1304
+ position: absolute;
1305
+ top: 50px;
1306
+ left: 50%;
1307
+ margin-left: -34px;
1308
+ background: rgba(255,255,255,0.8);
1309
+ border-radius: 5px;
1310
+ box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
1311
+ z-index: 99;
1312
+ font-size: 14px;
1313
+ color: #666;
1314
+ font-weight: 700;
1315
+ text-decoration: none;
1316
+ border: 1px solid #ccc;
1317
+ }
1318
+ #sbi_admin .sbi_feed_type .sbi_lock{
1319
+ height: 18px;
1320
+ padding: 4px 10px 4px 13px;
1321
+ top: 32px;
1322
+ left: 98px;
1323
+ color: #999;
1324
+ }
1325
+ #sbi_admin .sbi_lock:hover,
1326
+ #sbi_admin .sbi_feed_type .sbi_lock:hover{
1327
+ background: #fff;
1328
+ border: 1px solid #ccc;
1329
+ color: #333;
1330
+ box-shadow: 0 0 8px 0 rgba(0,0,0,0.15);
1331
+ }
1332
+
1333
+ #sbi_admin .sbi_lock i{
1334
+ margin-right: 6px;
1335
+ }
1336
+ #sbi_admin .sbi_layouts{
1337
+ position: relative;
1338
+ float: left;
1339
+ }
1340
+ #sbi_admin .sbi_feed_type td{
1341
+ position: relative;
1342
+ }
1343
+ #sbi_admin .sbi_pro_tooltip{
1344
+ text-align: center;
1345
+ z-index:99;
1346
+ display: none;
1347
+ position: absolute;
1348
+ bottom: 12px;
1349
+ left: -8px;
1350
+
1351
+ background: #333;
1352
+ color: #eee;
1353
+ padding: 8px 10px 10px 10px;
1354
+ border-radius: 3px;
1355
+ line-height: 1.3;
1356
+ font-size: 12px;
1357
+ width: 190px;
1358
+ }
1359
+ #sbi_admin .sbi_pro_tooltip .fa-caret-down {
1360
+ position: absolute;
1361
+ bottom: -12px;
1362
+ font-size: 20px;
1363
+ left: 49%;
1364
+ color: #333;
1365
+ }
1366
+ #sbi_admin .sbi_layouts .sbi_pro_tooltip{
1367
+ left: 50%;
1368
+ top: -10px;
1369
+ bottom: auto;
1370
+ margin-left: -101px;
1371
+ }
1372
+
1373
+ /* Graph API pages */
1374
+ /* Instagram Business Managed page */
1375
+ #sbi_admin .sbi-managed-pages{
1376
+ margin: 0;
1377
+ width: 96%;
1378
+ clear: both;
1379
+ float: left;
1380
+ padding: 10px 2%;
1381
+ }
1382
+ #sbi_admin .sbi-scrollable-accounts {
1383
+ max-height: 360px;
1384
+ overflow-y: auto;
1385
+ overflow-x: hidden;
1386
+ }
1387
+ #sbi_admin .sbi-managed-page-intro{
1388
+ padding: 0 0 20px 0;
1389
+ margin: 0;
1390
+ }
1391
+ #sbi_admin .sbi-managed-page-select-all{
1392
+ padding: 0 0 5px 0;
1393
+ margin: 0 0 0 1px;
1394
+ }
1395
+ #sbi_admin .sbi-managed-page-select-all label{
1396
+ font-size: 12px;
1397
+ top: -2px;
1398
+ left: 3px;
1399
+ }
1400
+ #sbi_admin .sbi-managed-page{
1401
+ width: 102%;
1402
+ border: 1px solid transparent;
1403
+ padding: 5px 1%;
1404
+ margin: 0 -1%;
1405
+ background: #fff;
1406
+ box-sizing: border-box;
1407
+ position: relative;
1408
+ }
1409
+ #sbi_admin .sbi-managed-page:hover{
1410
+ background: #eee;
1411
+ }
1412
+ #sbi_admin .sbi-managed-page .sbi-page-avatar{
1413
+ float: left;
1414
+ width: 40px;
1415
+ height: 40px;
1416
+ margin-right: 10px;
1417
+ border-radius: 3px;
1418
+ }
1419
+ #sbi_admin .sbi-managed-page label{
1420
+ padding: 0;
1421
+ margin: 0;
1422
+ height: 40px;
1423
+ line-height: 1.3;
1424
+ display: block;
1425
+ }
1426
+ .sbi-add-checkbox {
1427
+ display: inline-block;
1428
+ float: left;
1429
+ }
1430
+ .sbi-managed-page-details {
1431
+ margin-left: 30px;
1432
+ }
1433
+ .sbi-add-checkbox input {
1434
+ position: absolute;
1435
+ top: 50%;
1436
+ left: 1%;
1437
+ margin-top: -10px;
1438
+ }
1439
+
1440
+ .sbi_notice .sbi_offer_btn {
1441
+ padding: 4px 12px 6px 12px;
1442
+ background: green;
1443
+ color: #fff;
1444
+ border-radius: 4px;
1445
+ display: inline-block;
1446
+ text-decoration: none;
1447
+ margin-left: 0;
1448
+ margin-right: 8px;
1449
+ }
1450
+ .sbi_notice .sbi_offer_btn:hover, .sbi_notice .sbi_offer_btn:focus {
1451
+ background: #049404;
1452
+ color: #fff;
1453
+ }
1454
+
1455
+ /* Admin footer share icons */
1456
+ #sbi_admin #sbi_admin_share_links{
1457
+ opacity: 0;
1458
+ display: inline-block;
1459
+ padding: 5px;
1460
+ border: 1px solid #ccc;
1461
+ background: rgba(255,255,255,0.5);
1462
+ border-radius: 3px;
1463
+ transition: opacity 0.5s;
1464
+ }
1465
+ #sbi_admin #sbi_admin_share_links.sbi_show{
1466
+ transition: opacity 0.5s;
1467
+ opacity: 1;
1468
+ }
1469
+ #sbi_admin #twitter-widget-0 {
1470
+ width: 65px !important;
1471
+ }
1472
+
1473
+ /* Placeholder styles */
1474
+ #sbi_admin .sbi_ca_new_or_updated .sbi_ca_info:before {
1475
+ content: 'Successfully connected';
1476
+ padding: 5px 10px;
1477
+ margin: 0px 0 12px 0;
1478
+ background: #d3dec1;
1479
+ display: inline-block;
1480
+ border-radius: 5px;
1481
+ font-size: 13px;
1482
+ color: #2e4506;
1483
+ border: 1px solid #a9b594;
1484
+ }
1485
+
1486
+ #sbi_admin .sbi_deprecated {
1487
+ padding: 2px 2px 2px 10px;
1488
+ margin: 0px 0 12px 0;
1489
+ background: #f3dcda;
1490
+ display: inline-block;
1491
+ border-radius: 5px;
1492
+ font-size: 13px;
1493
+ color: #ad4040;
1494
+ border: 1px solid #e9c5c2;
1495
+ }
1496
+
1497
+ #sbi_admin .sbi_deprecated .fa{
1498
+ margin-right: 5px;
1499
+ font-size: 14px;
1500
+ }
1501
+ #sbi_admin .sbi_reconnect {
1502
+ font-size: 12px;
1503
+ background: #d65b5c;
1504
+ color: #fff;
1505
+ padding: 0px 8px;
1506
+ min-height: 23px;
1507
+ border: none;
1508
+ margin-left: 5px;
1509
+ height: 23px;
1510
+ line-height: 19px;
1511
+ text-shadow: none;
1512
+ box-shadow: none;
1513
+ }
1514
+ #sbi_admin .sbi_reconnect:hover{
1515
+ background: #c44b4c;
1516
+ }
1517
+
1518
+ .sbi-welcome .sbi-notice {
1519
+ clear: both;
1520
+ width: 96%;
1521
+ margin: 10px 0 20px 0;
1522
+ background: #F7E6E6;
1523
+ padding: 0 1.5%;
1524
+ border: 1px solid #BA7B7B;
1525
+ color: #592626;
1526
+
1527
+ -moz-border-radius: 3px;
1528
+ -webkit-border-radius: 3px;
1529
+ border-radius: 3px;
1530
+ }
1531
+
1532
+ /* Basic Display Update */
1533
+ #sbi_admin .sbi_tooltip_link.sbi_tooltip_under {
1534
+ margin-left: 0;
1535
+ }
1536
+ .sbi_tooltip_under_text {
1537
+ padding: 10px 15px !important;
1538
+ }
1539
+ #sbi_admin .sbi_ca_show_token .fa {
1540
+ margin-right: 0;
1541
+ }
1542
+
1543
+ /* Lite Notice */
1544
+ @media screen and (max-width: 600px) {
1545
+ #sbi-notice-bar {
1546
+ display:none !important
1547
+ }
1548
+ }
1549
+
1550
+ #sbi-notice-bar {
1551
+ background-color: #DDDDDD;
1552
+ color: #777777;
1553
+ text-align: center;
1554
+ position: relative;
1555
+ padding: 7px;
1556
+ margin-bottom: 0;
1557
+ opacity: 1;
1558
+ transition: all .3s ease-in-out;
1559
+ max-height: 100px;
1560
+ overflow: hidden
1561
+ }
1562
+
1563
+ #sbi-notice-bar.out {
1564
+ opacity: .5;
1565
+ max-height: 0
1566
+ }
1567
+
1568
+ #sbi-notice-bar a {
1569
+ color: #e34f0e;
1570
+ }
1571
+
1572
+ #sbi-notice-bar a:hover {
1573
+ color: #b85a1b
1574
+ }
1575
+
1576
+ #sbi-notice-bar .dismiss {
1577
+ position: absolute;
1578
+ top: 0;
1579
+ right: 0;
1580
+ border: none;
1581
+ padding: 5px;
1582
+ margin-top: 1px;
1583
+ background: 0 0;
1584
+ color: #72777c;
1585
+ cursor: pointer
1586
+ }
1587
+
1588
+ #sbi-notice-bar .dismiss:before {
1589
+ background: 0 0;
1590
+ color: #72777c;
1591
+ content: "\f335";
1592
+ display: block;
1593
+ font: normal 20px/20px dashicons;
1594
+ speak: none;
1595
+ height: 20px;
1596
+ text-align: center;
1597
+ width: 20px;
1598
+ -webkit-font-smoothing: antialiased
1599
+ }
1600
+
1601
+ /* About */
1602
+ #sbi-admin-about *,#sbi-admin-about *::before,#sbi-admin-about *::after {
1603
+ -webkit-box-sizing: border-box;
1604
+ -moz-box-sizing: border-box;
1605
+ box-sizing: border-box
1606
+ }
1607
+
1608
+ #sbi-admin-about .sbi-admin-about-section {
1609
+ position: relative;
1610
+ margin: 0 20px 20px;
1611
+ padding: 30px;
1612
+ background: #fff;
1613
+ border: 1px solid #DDDDDD;
1614
+ line-height: 2;
1615
+ }
1616
+
1617
+ #sbi-admin-about .sbi-admin-about-section h1,#sbi-admin-about .sbi-admin-about-section h2,#sbi-admin-about .sbi-admin-about-section h3,#sbi-admin-about .sbi-admin-about-section h4,#sbi-admin-about .sbi-admin-about-section h5 {
1618
+ margin-top: 0;
1619
+ padding-top: 0;
1620
+ line-height: 1.6
1621
+ }
1622
+
1623
+ #sbi-admin-about .sbi-admin-about-section h2 {
1624
+ font-size: 24px
1625
+ }
1626
+
1627
+ #sbi-admin-about .sbi-admin-about-section h3 {
1628
+ font-size: 18px;
1629
+ margin-bottom: 30px;
1630
+ color: #23282C
1631
+ }
1632
+
1633
+ #sbi-admin-about .sbi-admin-about-section ul,#sbi-admin-about .sbi-admin-about-section p {
1634
+ font-size: 16px
1635
+ }
1636
+
1637
+ #sbi-admin-about .sbi-admin-about-section p {
1638
+ margin-bottom: 20px
1639
+ }
1640
+
1641
+ #sbi-admin-about .sbi-admin-about-section p.bigger {
1642
+ font-size: 18px
1643
+ }
1644
+
1645
+ #sbi-admin-about .sbi-admin-about-section p.smaller {
1646
+ font-size: 14px
1647
+ }
1648
+
1649
+ #sbi-admin-about .sbi-admin-about-section p:last-child {
1650
+ margin-bottom: 0
1651
+ }
1652
+
1653
+ #sbi-admin-about .sbi-admin-about-section hr {
1654
+ margin: 30px 0
1655
+ }
1656
+
1657
+ #sbi-admin-about .sbi-admin-about-section figure {
1658
+ margin: 0
1659
+ }
1660
+
1661
+ #sbi-admin-about .sbi-admin-about-section figure img {
1662
+ width: 100%
1663
+ }
1664
+
1665
+ #sbi-admin-about .sbi-admin-about-section figure figcaption {
1666
+ font-size: 13px;
1667
+ color: #888888;
1668
+ margin-top: -10px;
1669
+ text-align: center;
1670
+ line-height: initial
1671
+ }
1672
+
1673
+ #sbi-admin-about .sbi-admin-about-section .sbi-admin-column-40 {
1674
+ padding-left: 15px
1675
+ }
1676
+
1677
+ @media (max-width: 767px) {
1678
+ #sbi-admin-about .sbi-admin-about-section .sbi-admin-column-40 {
1679
+ width:100%;
1680
+ padding-left: 0;
1681
+ padding-top: 20px
1682
+ }
1683
+ }
1684
+
1685
+ #sbi-admin-about .sbi-admin-about-section .sbi-admin-column-60 {
1686
+ padding-right: 15px
1687
+ }
1688
+ #sbi-admin-about .sbi-admin-about-section .sbi-admin-about-text{
1689
+ padding-right: 400px;
1690
+ }
1691
+ #sbi-admin-about .sbi-admin-about-section .sbi-admin-about-image{
1692
+ position: absolute;
1693
+ width: 340px;
1694
+ top: 20px;
1695
+ right: 20px;
1696
+ }
1697
+
1698
+ @media (max-width: 767px) {
1699
+ #sbi-admin-about .sbi-admin-about-section .sbi-admin-column-60,
1700
+ #sbi-admin-about .sbi-admin-about-section .sbi-admin-about-text,
1701
+ #sbi-admin-about .sbi-admin-about-section .sbi-admin-about-image {
1702
+ position: relative;
1703
+ width:100%;
1704
+ padding-right: 0
1705
+ }
1706
+ }
1707
+
1708
+ #sbi-admin-about .sbi-admin-about-section ul.list-plain {
1709
+ margin-top: 0;
1710
+ margin-bottom: 0
1711
+ }
1712
+
1713
+ #sbi-admin-about .sbi-admin-about-section ul.list-plain li {
1714
+ margin-bottom: 0
1715
+ }
1716
+
1717
+ #sbi-admin-about .sbi-admin-about-section ul.list-features li .fa {
1718
+ color: #2a9b39;
1719
+ margin: 0 8px 0 0
1720
+ }
1721
+
1722
+ #sbi-admin-about .sbi-admin-about-section .fa-star {
1723
+ color: gold
1724
+ }
1725
+
1726
+ #sbi-admin-about .sbi-admin-about-section .no-margin {
1727
+ margin: 0 !important
1728
+ }
1729
+
1730
+ #sbi-admin-about .sbi-admin-about-section .no-padding {
1731
+ padding: 0 !important
1732
+ }
1733
+
1734
+ #sbi-admin-about .sbi-admin-about-section .centered {
1735
+ text-align: center !important
1736
+ }
1737
+
1738
+ #sbi-admin-about .sbi-admin-about-section-first-form {
1739
+ display: flex
1740
+ }
1741
+
1742
+ @media (max-width: 767px) {
1743
+ #sbi-admin-about .sbi-admin-about-section-first-form {
1744
+ display:block !important
1745
+ }
1746
+ }
1747
+
1748
+ #sbi-admin-about .sbi-admin-about-section-first-form .sbi-admin-about-section-first-form-text {
1749
+ flex: 1;
1750
+ padding-right: 30px
1751
+ }
1752
+
1753
+ @media (max-width: 767px) {
1754
+ #sbi-admin-about .sbi-admin-about-section-first-form .sbi-admin-about-section-first-form-text {
1755
+ flex:none
1756
+ }
1757
+ }
1758
+
1759
+ #sbi-admin-about .sbi-admin-about-section-first-form .sbi-admin-about-section-first-form-video iframe {
1760
+ border: 1px solid #DDDDDD
1761
+ }
1762
+
1763
+ @media (max-width: 767px) {
1764
+ #sbi-admin-about .sbi-admin-about-section-first-form .sbi-admin-about-section-first-form-video {
1765
+ padding-top:20px
1766
+ }
1767
+ }
1768
+
1769
+ #sbi-admin-about .sbi-admin-about-section-hero {
1770
+ padding: 0
1771
+ }
1772
+
1773
+ #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-main,#sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-extra {
1774
+ padding: 30px
1775
+ }
1776
+
1777
+ @media (max-width: 767px) {
1778
+ #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-extra .sbi-admin-column-50 {
1779
+ float:none;
1780
+ width: 100%
1781
+ }
1782
+ }
1783
+
1784
+ #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-main {
1785
+ background-color: #FAFAFA;
1786
+ border-bottom: 1px solid #DDDDDD
1787
+ }
1788
+
1789
+ #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-main.no-border {
1790
+ border-bottom: 0
1791
+ }
1792
+
1793
+ #sbi-admin-about .sbi-admin-about-section-hero .sbi-admin-about-section-hero-main p {
1794
+ color: #666
1795
+ }
1796
+
1797
+ #sbi-admin-about .sbi-admin-about-section-hero h3.call-to-action {
1798
+ margin-bottom: -10px
1799
+ }
1800
+
1801
+ #sbi-admin-about .sbi-admin-about-section-hero span.price-20-off {
1802
+ color: #6AB255
1803
+ }
1804
+
1805
+ #sbi-admin-about .sbi-admin-about-section-squashed {
1806
+ margin-bottom: 0
1807
+ }
1808
+
1809
+ #sbi-admin-about .sbi-admin-about-section-squashed:not(:last-of-type) {
1810
+ border-bottom: 0
1811
+ }
1812
+
1813
+ #sbi-admin-about .sbi-admin-about-section-post h2 {
1814
+ margin-bottom: -10px
1815
+ }
1816
+
1817
+ #sbi-admin-about .sbi-admin-about-section-post h3 {
1818
+ margin-bottom: 15px
1819
+ }
1820
+
1821
+ #sbi-admin-about .sbi-admin-about-section-post p:last-of-type {
1822
+ margin-bottom: 30px
1823
+ }
1824
+
1825
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-20 {
1826
+ padding-right: 20px;
1827
+ width: auto
1828
+ }
1829
+
1830
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-20 img {
1831
+ width: 270px
1832
+ }
1833
+
1834
+ @media (max-width: 767px) {
1835
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-20 {
1836
+ width:20%
1837
+ }
1838
+
1839
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-20 img {
1840
+ width: auto;
1841
+ max-width: 100%
1842
+ }
1843
+ }
1844
+
1845
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-80 {
1846
+ padding-left: 20px;
1847
+ width: calc(100% - 20px - 270px)
1848
+ }
1849
+
1850
+ @media (max-width: 767px) {
1851
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-column-80 {
1852
+ width:80%
1853
+ }
1854
+ }
1855
+
1856
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-about-section-post-link {
1857
+ padding: 10px 15px;
1858
+ background-color: #DF7739;
1859
+ color: #fff;
1860
+ border-radius: 3px;
1861
+ text-decoration: none;
1862
+ margin-top: 15px;
1863
+ font-size: 14px
1864
+ }
1865
+
1866
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-about-section-post-link:hover {
1867
+ background-color: #B85A1B
1868
+ }
1869
+
1870
+ #sbi-admin-about .sbi-admin-about-section-post .sbi-admin-about-section-post-link .fa {
1871
+ color: #EDBA9E;
1872
+ vertical-align: middle;
1873
+ margin-left: 8px
1874
+ }
1875
+
1876
+ #sbi-admin-about .sbi-admin-about-section-table table {
1877
+ border-collapse: collapse
1878
+ }
1879
+
1880
+ #sbi-admin-about .sbi-admin-about-section-table table tr td {
1881
+ border-bottom: 1px solid #DDDDDD;
1882
+ border-right: 1px solid #DDDDDD;
1883
+ padding: 30px;
1884
+ vertical-align: top
1885
+ }
1886
+
1887
+ #sbi-admin-about .sbi-admin-about-section-table table tr td:last-of-type {
1888
+ border-right: 0
1889
+ }
1890
+
1891
+ #sbi-admin-about .sbi-admin-about-section-table table tr:last-child td {
1892
+ border-bottom: none
1893
+ }
1894
+
1895
+ #sbi-admin-about .sbi-admin-about-section-table table p {
1896
+ background-repeat: no-repeat;
1897
+ background-size: 15px auto;
1898
+ background-position: 0 6px;
1899
+ margin: 0
1900
+ }
1901
+
1902
+ #sbi-admin-about .sbi-admin-about-section-table table p.features-full {
1903
+ padding-left: 30px;
1904
+ background-image: url(../img/about/icon-full.svg)
1905
+ }
1906
+
1907
+ #sbi-admin-about .sbi-admin-about-section-table table p.features-none {
1908
+ padding-left: 30px;
1909
+ background-image: url(../img/about/icon-none.svg)
1910
+ }
1911
+
1912
+ #sbi-admin-about .sbi-admin-about-section-table table p.features-partial {
1913
+ padding-left: 30px;
1914
+ background-position: -3px 0;
1915
+ background-size: 23px auto;
1916
+ background-image: url(../img/about/icon-partial.svg)
1917
+ }
1918
+
1919
+ #sbi-admin-about .sbi-admin-about-section-table .sbi-admin-about-section-hero-main {
1920
+ padding: 0
1921
+ }
1922
+
1923
+ #sbi-admin-about .sbi-admin-about-section-table .sbi-admin-about-section-hero-main h3 {
1924
+ padding: 30px 30px 30px 60px
1925
+ }
1926
+
1927
+ #sbi-admin-about .sbi-admin-about-section-table .sbi-admin-about-section-hero-main .sbi-admin-column-33:first-child h3 {
1928
+ padding: 30px
1929
+ }
1930
+
1931
+ #sbi-admin-about #sbi-admin-addons {
1932
+ padding: 0 30px
1933
+ }
1934
+
1935
+ #sbi-admin-about #sbi-admin-addons .addon-container {
1936
+ padding: 0 10px
1937
+ }
1938
+
1939
+ #sbi-admin-about #sbi-admin-addons .addon-item .details {
1940
+ padding: 20px
1941
+ }
1942
+
1943
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button {
1944
+ display: inline-block;
1945
+ text-decoration: none;
1946
+ font-size: 13px;
1947
+ line-height: 26px;
1948
+ height: 28px;
1949
+ margin: 0;
1950
+ padding: 0 10px 1px;
1951
+ cursor: pointer;
1952
+ -webkit-appearance: none;
1953
+ border-radius: 3px;
1954
+ border: 1px solid #cccccc;
1955
+ background: #f7f7f7;
1956
+ box-shadow: 0 1px 0 #cccccc;
1957
+ font-weight: normal
1958
+ }
1959
+
1960
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button:hover,#sbi-admin-about #sbi-admin-addons .addon-item .action-button .button:focus {
1961
+ background: #fafafa;
1962
+ border-color: #999;
1963
+ color: #23282d
1964
+ }
1965
+
1966
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary {
1967
+ background: #0085ba;
1968
+ border-color: #0073aa #006799 #006799;
1969
+ box-shadow: 0 1px 0 #006799;
1970
+ color: #fff;
1971
+ text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799
1972
+ }
1973
+
1974
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary:hover,#sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary:focus {
1975
+ background: #008ec2;
1976
+ border-color: #006799;
1977
+ color: #fff
1978
+ }
1979
+
1980
+
1981
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-secondary {
1982
+ color: #555;
1983
+ border-color: #cccccc;
1984
+ background: #f7f7f7;
1985
+ box-shadow: 0 1px 0 #cccccc
1986
+ }
1987
+
1988
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-secondary:hover,#sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-secondary:focus {
1989
+ background: #fafafa;
1990
+ border-color: #999;
1991
+ color: #23282d
1992
+ }
1993
+
1994
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.disabled {
1995
+ cursor: default
1996
+ }
1997
+
1998
+ /* AW columns */
1999
+ .sbi-admin-columns>div[class*="-column-"] {
2000
+ float: left
2001
+ }
2002
+
2003
+ .sbi-admin-columns .sbi-admin-column-20 {
2004
+ width: 20%
2005
+ }
2006
+
2007
+ .sbi-admin-columns .sbi-admin-column-33 {
2008
+ width: 33.33333%
2009
+ }
2010
+
2011
+ .sbi-admin-columns .sbi-admin-column-40 {
2012
+ width: 40%
2013
+ }
2014
+
2015
+ .sbi-admin-columns .sbi-admin-column-50 {
2016
+ width: 50%
2017
+ }
2018
+
2019
+ .sbi-admin-columns .sbi-admin-column-60 {
2020
+ width: 60%
2021
+ }
2022
+
2023
+ .sbi-admin-columns .sbi-admin-column-80 {
2024
+ width: 80%
2025
+ }
2026
+
2027
+ .sbi-admin-columns .sbi-admin-column-last {
2028
+ float: right !important
2029
+ }
2030
+
2031
+ .sbi-admin-columns:after {
2032
+ content: "";
2033
+ display: table;
2034
+ clear: both
2035
+ }
2036
+
2037
+ /* AW Addons */
2038
+ #sbi-admin-addons h3 {
2039
+ padding: 10px 10px 0 10px;
2040
+ clear: left;
2041
+ }
2042
+ #sbi-admin-addons *,#sbi-admin-addons *::before,#sbi-admin-addons *::after {
2043
+ -webkit-box-sizing: border-box;
2044
+ -moz-box-sizing: border-box;
2045
+ box-sizing: border-box
2046
+ }
2047
+
2048
+ #sbi-admin-addons .addons-container {
2049
+ margin-left: -20px;
2050
+ margin-right: -20px
2051
+ }
2052
+
2053
+ #sbi-admin-addons .unlock-msg {
2054
+ padding: 0 20px;
2055
+ margin-top: -20px;
2056
+ clear: both
2057
+ }
2058
+
2059
+ #sbi-admin-addons #sbi-admin-addons-search {
2060
+ background-color: #fff;
2061
+ border: 1px solid #ddd;
2062
+ border-radius: 3px;
2063
+ box-shadow: none;
2064
+ color: #333;
2065
+ vertical-align: middle;
2066
+ padding: 7px 12px;
2067
+ margin: -3px 10px 0 0;
2068
+ width: 200px;
2069
+ min-height: 35px;
2070
+ float: right
2071
+ }
2072
+
2073
+ #sbi-admin-addons #sbi-admin-addons-search:focus {
2074
+ border-color: #bbb
2075
+ }
2076
+
2077
+ #sbi-admin-addons .addon-container {
2078
+ padding: 0 20px;
2079
+ float: left;
2080
+ width: 33.333333%;
2081
+ margin-bottom: 20px
2082
+ }
2083
+
2084
+ @media (max-width: 1249px) {
2085
+ #sbi-admin-addons .addon-container {
2086
+ width:50%
2087
+ }
2088
+ }
2089
+
2090
+ @media (max-width: 767px) {
2091
+ #sbi-admin-addons .addon-container {
2092
+ width:100%;
2093
+ margin-bottom: 20px
2094
+ }
2095
+ }
2096
+
2097
+ #sbi-admin-addons h4 {
2098
+ font-size: 17px;
2099
+ font-weight: 700
2100
+ }
2101
+
2102
+ #sbi-admin-addons .addon-item {
2103
+ background-color: #fff;
2104
+ border: 1px solid #ddd;
2105
+ border-radius: 3px;
2106
+ margin: 0
2107
+ }
2108
+
2109
+ @media (max-width: 767px) {
2110
+ #sbi-admin-addons .addon-item {
2111
+ margin:0 0
2112
+ }
2113
+ }
2114
+
2115
+ #sbi-admin-addons .addon-item img {
2116
+ border: 1px solid #eee;
2117
+ float: left;
2118
+ max-width: 75px
2119
+ }
2120
+
2121
+ #sbi-admin-addons .addon-item h5 {
2122
+ margin: 0 0 10px 100px;
2123
+ font-size: 16px
2124
+ }
2125
+
2126
+ #sbi-admin-addons .addon-item p {
2127
+ margin: 0 0 0 100px
2128
+ }
2129
+
2130
+ #sbi-admin-addons .addon-item .details {
2131
+ padding: 30px 20px
2132
+ }
2133
+
2134
+ #sbi-admin-addons .addon-item .actions {
2135
+ background-color: #f7f7f7;
2136
+ border-top: 1px solid #ddd;
2137
+ padding: 20px;
2138
+ position: relative
2139
+ }
2140
+
2141
+ #sbi-admin-addons .addon-item .actions .msg {
2142
+ background-color: #f7f7f7;
2143
+ position: absolute;
2144
+ text-align: center;
2145
+ font-weight: 600;
2146
+ top: 0;
2147
+ left: 0;
2148
+ height: 100%;
2149
+ width: 100%;
2150
+ z-index: 99;
2151
+ padding: 20px;
2152
+ display: -webkit-box;
2153
+ display: -moz-box;
2154
+ display: -ms-flexbox;
2155
+ display: -webkit-flex;
2156
+ display: flex;
2157
+ -webkit-align-items: center;
2158
+ -ms-align-items: center;
2159
+ align-items: center;
2160
+ justify-content: center
2161
+ }
2162
+
2163
+ #sbi-admin-addons .addon-item .actions .msg.success {
2164
+ color: #2a9b39
2165
+ }
2166
+
2167
+ #sbi-admin-addons .addon-item .actions .msg.error {
2168
+ color: red
2169
+ }
2170
+
2171
+ #sbi-admin-addons .addon-item .status {
2172
+ float: left;
2173
+ padding-top: 8px
2174
+ }
2175
+
2176
+ #sbi-admin-addons .addon-item .status .status-inactive {
2177
+ color: red
2178
+ }
2179
+
2180
+ #sbi-admin-addons .addon-item .status .status-download {
2181
+ color: #666
2182
+ }
2183
+
2184
+ #sbi-admin-addons .addon-item .status .status-active {
2185
+ color: #2a9b39
2186
+ }
2187
+
2188
+ #sbi-admin-addons .addon-item .upgrade-button {
2189
+ text-align: center
2190
+ }
2191
+
2192
+ #sbi-admin-addons .addon-item .upgrade-button a {
2193
+ font-weight: 600;
2194
+ width: 140px;
2195
+ text-align: center;
2196
+ padding: 8px 5px
2197
+ }
2198
+
2199
+ #sbi-admin-addons .addon-item .action-button {
2200
+ float: right
2201
+ }
2202
+
2203
+ #sbi-admin-addons .addon-item .action-button button {
2204
+ background: none;
2205
+ border: 1px solid #ddd;
2206
+ border-radius: 3px;
2207
+ box-shadow: none;
2208
+ cursor: pointer;
2209
+ font-weight: 600;
2210
+ width: 140px;
2211
+ text-align: center;
2212
+ padding: 8px 5px
2213
+ }
2214
+
2215
+ #sbi-admin-addons .addon-item .action-button button:hover,#sbi-admin-addons .addon-item .action-button button.loading {
2216
+ background-color: #e9e9e9
2217
+ }
2218
+
2219
+ #sbi-admin-addons .addon-item .action-button button .fa {
2220
+ margin-right: 8px
2221
+ }
2222
+
2223
+ #sbi-admin-addons .addon-item .action-button button .fa.fa-spinner {
2224
+ margin-right: 0
2225
+ }
2226
+
2227
+ #sbi-admin-addons .addon-item .action-button button.status-active .fa {
2228
+ color: #2a9b39
2229
+ }
2230
+
2231
+ #sbi-admin-addons .addon-item .action-button button.status-inactive .fa {
2232
+ color: red
2233
+ }
2234
+
2235
+ #sbi-admin-addons .addon-item .action-button button.status-download .fa {
2236
+ color: #999
2237
+ }
2238
+
2239
+ #sbi-admin-addons .addon-item .action-button button.disabled {
2240
+ cursor: default
2241
+ }
2242
+
2243
+ #sbi-admin-addons .addon-item .action-button button.loading .fa {
2244
+ color: #666
2245
+ }
2246
+
2247
+ /* Tabs */
2248
+ .sbi-admin-tabs {
2249
+ background-color: #fff;
2250
+ margin: 0 0 20px 0;
2251
+ padding: 0 20px;
2252
+ list-style: none;
2253
+ overflow: auto;
2254
+ font-size: 14px
2255
+ }
2256
+
2257
+ .sbi-admin-tabs li {
2258
+ margin: 0 30px 0 0;
2259
+ padding: 0;
2260
+ float: left
2261
+ }
2262
+
2263
+ .sbi-admin-tabs li:last-of-type {
2264
+ margin: 0
2265
+ }
2266
+
2267
+ .sbi-admin-tabs li a {
2268
+ color: #666;
2269
+ display: block;
2270
+ padding: 20px 0 18px 0;
2271
+ text-decoration: none;
2272
+ border-bottom: 2px solid #fff;
2273
+ box-shadow: none
2274
+ }
2275
+
2276
+ .sbi-admin-tabs li a:hover {
2277
+ border-color: #999
2278
+ }
2279
+
2280
+ .sbi-admin-tabs li a.active {
2281
+ border-color: #e27730
2282
+ }
2283
+
2284
+ .sbi-admin-tabs li a:focus {
2285
+ box-shadow: none
2286
+ }
2287
+
2288
+ /* oEmbeds */
2289
+ #sbi_admin.sbi-oembeds #header{
2290
+ border-bottom: 1px solid #ccc;
2291
+ padding-bottom: 15px;
2292
+ margin-bottom: 25px;
2293
+ }
2294
+ #sbi_admin.sbi-oembeds .sbi_admin_btn{
2295
+ margin-top: 10px;
2296
+ }
2297
+ #sbi_admin.sbi-oembeds .sbi-success{
2298
+ display: inline-block;
2299
+ clear: both;
2300
+ padding: 20px 30px;
2301
+ border-radius: 3px;
2302
+ }
2303
+ #sbi_admin.sbi-oembeds .sbi-success a{
2304
+ margin-left: 5px;
2305
+ color: #e34f0e;
2306
+ }
2307
+ #sbi_admin .sbi-oembed-promo{
2308
+ margin: 30px 0 0 0;
2309
+ padding: 30px;
2310
+ border: 1px solid #ccc;
2311
+ border-radius: 3px;
2312
+ background: rgba(255,255,255,0.5);
2313
+ }
2314
+ #sbi_admin .sbi-oembed-promo h2{
2315
+ padding: 0 0 20px 0;
2316
+ margin: 0;
2317
+ font-size: 18px;
2318
+ line-height: 1.5;
2319
+ }
2320
+ #sbi_admin .sbi-oembed-promo .sbi-reasons div{
2321
+ display: inline-block;
2322
+ margin-right: 15px;
2323
+ }
2324
+ #sbi_admin .sbi-oembed-promo .sbi-reasons span{
2325
+ font-size: 15px;
2326
+ }
2327
+ #sbi_admin .sbi-oembed-promo svg{
2328
+ position: relative;
2329
+ top: 3px;
2330
+ margin: 0 8px 0 0;
2331
+ width: 16px;
2332
+ height: 16px;
2333
+ }
2334
+ #sbi_admin .sbi-oembed-promo .button{
2335
+ margin-top: 12px;
2336
+ font-size: 16px;
2337
+ padding: 5px 20px;
2338
+ height: auto;
2339
+ }
2340
+ #sbi_admin .sbi-oembed-promo p span{
2341
+ display: inline-block;
2342
+ padding-right: 10px;
2343
+ }
2344
+ #sbi_admin .sbi-oembed-promo .fa-check{
2345
+ width: 14px;
2346
+ height: 14px;
2347
+ margin-right: 5px;
2348
+ top: 2px;
2349
+ }
2350
+ #sbi_admin .sbi-oembed-promo .fa-check path{
2351
+ fill: #3fa03f;
2352
+ }
2353
+ #sbi_admin.sbi-oembeds .sbi-error{
2354
+ display: inline-block;
2355
+ clear: both;
2356
+ padding: 20px 30px;
2357
+ border-radius: 3px;
2358
+ background: #F7E6E6;
2359
+ border: 1px solid #BA7B7B;
2360
+ color: #592626;
2361
+ }
2362
+ #sbi_admin.sbi-oembeds .sbi-success-message{
2363
+ display: inline-block;
2364
+ clear: both;
2365
+ padding: 20px 30px;
2366
+ border-radius: 3px;
2367
+ background: #dceada;
2368
+ border: 1px solid #6ca365;
2369
+ color: #3e5f1c;
2370
+ }
2371
+ #sbi_admin.sbi-oembeds .sbi-oembed-connect-btn {
2372
+ margin-top: 10px;
2373
+ }
2374
+ #sbi_admin .sbi-oembed-desc{
2375
+ overflow: hidden;
2376
+ max-width: 900px;
2377
+ clear: both;
2378
+ margin-top: 30px;
2379
+ float: left;
2380
+ }
2381
+ #sbi_admin .sbi-oembed-desc p{
2382
+ padding: 0 0 10px 0;
2383
+ margin: 0;
2384
+ }
2385
+ #sbi_admin .sbi-oembed-desc .sbi-col{
2386
+ width: 45%;
2387
+ margin-right: 5%;
2388
+ float: left;
2389
+ }
2390
+ #sbi_admin .sbi-oembed-desc img{
2391
+ width: 50%;
2392
+ max-width: 446px;
2393
+ float: left;
2394
+ border-bottom: 1px solid #ddd;
2395
+ }
2396
+ #sbi_admin .sbi-oembed-button{
2397
+ margin-top: 20px;
2398
+ }
2399
+
2400
+
2401
+ /* GDPR Settings */
2402
+ .gdpr_tooltip p{
2403
+ padding: 0 0 10px 0;
2404
+ }
2405
+ .gdpr_tooltip span{
2406
+ display: inline-block;
2407
+ margin: 0;
2408
+ font-weight: bold;
2409
+ font-size: 14px;
2410
+ }
2411
+ .gdpr_tooltip .sbi-list{
2412
+ padding: 0 0 10px 0;
2413
+ }
2414
+ .gdpr_tooltip li{
2415
+ padding: 0;
2416
+ }
2417
+ .sbi_gdpr_plugin_active .sbi_active{
2418
+ display: inline-block;
2419
+ padding: 10px 20px 15px 20px;
2420
+ border-radius: 5px;
2421
+ background: #edf4f0;
2422
+ border: 1px solid #2c8649;
2423
+ color: #2c8649;
2424
+ margin: 8px 0 0 0;
2425
+ }
2426
+ .sbi_gdpr_plugin_active svg{
2427
+ width: 16px;
2428
+ height: 16px;
2429
+ position: relative;
2430
+ top: 3px;
2431
+ margin-right: 2px;
2432
+ }
2433
+ .sbi_gdpr_plugin_active path{
2434
+ fill: green;
2435
+ }
2436
+ .sbi_gdpr_list,
2437
+ .sbi_gdpr_yes,
2438
+ .sbi_gdpr_no{
2439
+ display: none;
2440
+ }
2441
+ #sbi_admin .sbi_gdpr_error {
2442
+ padding: 10px 20px 15px 20px;
2443
+ border-radius: 5px;
2444
+ background: #F7E6E6;
2445
+ border: 1px solid #BA7B7B;
2446
+ color: #592626;
2447
+ }
2448
+ #sbi_admin .sbi-list {
2449
+ list-style: inside disc;
2450
+ }
2451
+ /* Clear */
2452
+ .sbi-clear:before {
2453
+ content: " ";
2454
+ display: table
2455
+ }
2456
+ .sbi-clear:after {
2457
+ clear: both;
2458
+ content: " ";
2459
+ display: table
2460
+ }
2461
+
2462
+ /* Social Wall landing page */
2463
+ #sbi_admin.sw-landing-page{
2464
+ padding: 20px 0;
2465
+ }
2466
+ #sbi_admin .sbi-sw-icons{
2467
+ width: 100%;
2468
+ text-align: center;
2469
+ }
2470
+ #sbi_admin .sbi-sw-icons span{
2471
+ display: inline-block;
2472
+ width: 32px;
2473
+ margin: 0 7px;
2474
+ position: relative;
2475
+ top: -2px;
2476
+ }
2477
+ #sbi_admin .sbi-sw-icons .sbi-sb-plus{
2478
+ width: 12px;
2479
+ height: 12px;
2480
+ position: relative;
2481
+ top: -12px;
2482
+ opacity: 0.9;
2483
+ }
2484
+ #sbi_admin.sw-landing-page h1,
2485
+ #sbi_admin.sw-landing-page h2{
2486
+ width: 100%;
2487
+ text-align: center;
2488
+ }
2489
+ #sbi_admin.sw-landing-page h1{
2490
+ font-size: 44px;
2491
+ margin: 20px 0 0 0;
2492
+ line-height: 1.3;
2493
+ }
2494
+ #sbi_admin.sw-landing-page h2{
2495
+ font-size: 30px;
2496
+ font-weight: 100;
2497
+ line-height: 1.2;
2498
+ margin: 5px 0 20px 0;
2499
+ }
2500
+ #sbi_admin .sbi-sw-info{
2501
+ width: 95%;
2502
+ max-width: 1400px;
2503
+ margin: 0 auto;
2504
+ padding: 50px 10px;
2505
+ clear: both;
2506
+ overflow: hidden;
2507
+ box-sizing: border-box;
2508
+ }
2509
+ #sbi_admin .sbi-sw-features{
2510
+ float: left;
2511
+ width: 40%;
2512
+ margin-right: 5%;
2513
+ padding: 20px 0 0 0;
2514
+ }
2515
+ #sbi_admin .sbi-sw-screenshot{
2516
+ position: relative;
2517
+ width: 55%;
2518
+ float: left;
2519
+ box-sizing: border-box;
2520
+ border: 5px solid #fff;
2521
+ box-shadow: 0 0 20px 0 rgba(0,0,0,0.05);
2522
+ }
2523
+ #sbi_admin .sbi-sw-features p{
2524
+ margin: 35px 0;
2525
+ padding: 0;
2526
+ font-size: 15px;
2527
+ }
2528
+ #sbi_admin .sbi-sw-features p:first-child{
2529
+ margin-top: 0;
2530
+ }
2531
+ #sbi_admin .sbi-sw-features span{
2532
+ display: block;
2533
+ font-size: 20px;
2534
+ font-weight: bold;
2535
+ }
2536
+ #sbi_admin.sw-landing-page .cta {
2537
+ margin: 20px 0 0 5px;
2538
+ padding: 8px 40px 10px 40px;
2539
+ font-size: 20px;
2540
+ }
2541
+ #sbi_admin .sbi-sw-screenshot img{
2542
+ width: 100%;
2543
+ display: block;
2544
+ }
2545
+ #sbi_admin .sbi-sw-screenshot .cta{
2546
+ position: absolute;
2547
+ top: 50%;
2548
+ left: 50%;
2549
+ margin-top: -32px;
2550
+ margin-left: -80px;
2551
+ padding: 15px 30px 17px 30px;
2552
+ color: #333;
2553
+ text-decoration: none;
2554
+ background: rgba(255,255,255,0.95);
2555
+ border-radius: 3px;
2556
+ /*border: 2px solid rgba(0,0,0,0.1);*/
2557
+ box-shadow: 0 0 20px 0 rgba(0,0,0,0.1);
2558
+ }
2559
+ #sbi_admin .sbi-sw-screenshot:hover .cta,
2560
+ #sbi_admin .sbi-sw-screenshot:focus .cta{
2561
+ background: #e34717;
2562
+ color: #fff;
2563
+ box-shadow: 0;
2564
+ }
2565
+ #sbi_admin .sbi-sw-footer-cta{
2566
+ width: 100%;
2567
+ text-align: center;
2568
+ }
2569
+ #sbi_admin .sbi-sw-footer-cta a{
2570
+ font-size: 22px;
2571
+ display: inline-block;
2572
+ text-decoration: none;
2573
+ line-height: 25px;
2574
+ font-weight: normal;
2575
+ padding: 10px 0 30px 0;
2576
+ }
2577
+ #sbi_admin .sbi-sw-footer-cta span{
2578
+ width: 30px;
2579
+ height: 30px;
2580
+ display: inline-block;
2581
+ margin: 0 10px 0 0;
2582
+ position: relative;
2583
+ top: 4px;
2584
+ }
2585
+ #sbi_admin .sbi-sw-footer-cta span .emoji{
2586
+ width: 30px !important;
2587
+ height: 30px !important;
2588
+ }
2589
+
2590
+ @media all and (max-width: 1500px){
2591
+ #sbi_admin .sbi-sw-screenshot{
2592
+ width: 55%;
2593
+ float: left;
2594
+ height: 500px;
2595
+ background: url('../img/sw-screenshot.png') no-repeat center center;
2596
+ background-size: cover;
2597
+ }
2598
+ #sbi_admin .sbi-sw-screenshot img{
2599
+ display: none;
2600
+ }
2601
+ }
2602
+ @media all and (max-width: 900px){
2603
+ #sbi_admin .sbi-sw-info{
2604
+ padding: 20px 0;
2605
+ }
2606
+ #sbi_admin .sbi-sw-features{
2607
+ width: 100%;
2608
+ padding: 10px 0;
2609
+ margin: 0;
2610
+ }
2611
+ #sbi_admin .sbi-sw-screenshot{
2612
+ width: 100%;
2613
+ padding: 0;
2614
+ height: auto;
2615
+ background: none;
2616
+ }
2617
+ #sbi_admin .sbi-sw-screenshot img{
2618
+ display: block;
2619
+ }
2620
+ #sbi_admin .sbi-sw-features .cta {
2621
+ width: 100%;
2622
+ box-sizing: border-box;
2623
+ text-align: center;
2624
+ margin: 20px 0;
2625
+ }
2626
+ }
2627
+
2628
+ /* Alert bubble */
2629
+ #sbi_admin .nav-tab{
2630
+ position: relative;
2631
+ }
2632
+ #sbi_admin .sbi-alert-bubble{
2633
+ position: absolute;
2634
+ top: -9px;
2635
+ right: -10px;
2636
+
2637
+ display: inline-block;
2638
+ vertical-align: top;
2639
+ box-sizing: border-box;
2640
+ margin: 0;
2641
+ padding: 0 7px;
2642
+ height: 18px;
2643
+
2644
+ border-radius: 9px;
2645
+ background-color: #ca4a1f;
2646
+ color: #fff;
2647
+ font-size: 11px;
2648
+ line-height: 1.6;
2649
+ text-align: center;
2650
+ z-index: 26;
2651
+ }
2652
+
2653
+ /* Menu Pro link */
2654
+ #adminmenu .wp-submenu .sbi_get_pro_highlight{
2655
+ background-color: #1da867;
2656
+ color: #fff;
2657
+ }
2658
+ #adminmenu .wp-submenu .sbi_get_pro_highlight:hover,
2659
+ #adminmenu .wp-submenu .sbi_get_pro_highlight:active{
2660
+ background-color: #2b9865;
2661
+ color: #fff;
2662
+ }
2663
+
2664
+ /* Install another plugin modal */
2665
+ .sb_cross_install_modal {
2666
+ position: fixed;
2667
+ z-index: 999;
2668
+ width: 100%;
2669
+ top: 0;
2670
+ right: 0;
2671
+ bottom: 0;
2672
+ left: 0;
2673
+ background: rgba(0, 0, 0, 0.3);
2674
+ }
2675
+ .sb_cross_install_inner {
2676
+ position: absolute;
2677
+ top: 140px;
2678
+ left: 50%;
2679
+ width: 480px;
2680
+ margin: 0 0 0 -245px;
2681
+ padding: 35px;
2682
+ background: #fff;
2683
+ text-align: left;
2684
+
2685
+ -webkit-box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2);
2686
+ box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2);
2687
+
2688
+ -moz-border-radius: 3px;
2689
+ -webkit-border-radius: 3px;
2690
+ border-radius: 3px;
2691
+ }
2692
+ .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons .addon-container,
2693
+ .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons .addons-container{
2694
+ width: 100%;
2695
+ margin: 0;
2696
+ padding: 0;
2697
+ min-height: 198px;
2698
+ }
2699
+ .sb_cross_install_modal #sbi-admin-addons .addon-item .action-button button{
2700
+ background: #007cba;
2701
+ border: 0;
2702
+ }
2703
+ .sb_cross_install_modal #sbi-admin-addons .addon-item .action-button button:hover{
2704
+ background: #0071a1;
2705
+ }
2706
+ .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons{
2707
+ padding: 0;
2708
+ }
2709
+ .sb_cross_install_modal .sbi-loader{
2710
+ position: absolute;
2711
+ left: 50%;
2712
+ top: 50%;
2713
+ margin: -10px 0 0 -10px;
2714
+ }
2715
+ /* More social feeds page */
2716
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary .fa-spinner {
2717
+ color: #333;
2718
+ }
2719
+ #sbi_admin .sbi_more_plugins h2{
2720
+ margin-top: 15px;
2721
+ }
2722
+ #sbi_admin .sbi_more_plugins #sbi-admin-addons .addons-container{
2723
+ overflow: hidden;
2724
+ margin: 0;
2725
+ }
2726
+ #sbi_admin .sbi_more_plugins#sbi-admin-about #sbi-admin-addons{
2727
+ padding: 20px 0;
2728
+ }
2729
+ #sbi_admin .sbi-more-plugins-intro span{
2730
+ color: #e34f0e;
2731
+ }
2732
+ #sbi_admin .sbi-cols-4{
2733
+ max-width: 1100px;
2734
+ padding-top: 20px;
2735
+ }
2736
+ #sbi_admin .sbi-cols-4 .addon-container{
2737
+ width: 50%;
2738
+ }
2739
+ @media all and (max-width: 780px){
2740
+ #sbi_admin .sbi-cols-4 .addon-container{
2741
+ width: 100%;
2742
+ }
2743
+ }
2744
+
2745
+ /* Locator Summary */
2746
+ .sbi-feed-locator-summary-wrap {
2747
+ max-width: 1100px;
2748
+ margin-bottom: 40px;
2749
+ }
2750
+ .sbi-full-wrap {
2751
+ display: none;
2752
+ }
2753
+ .sbi-locator-more {
2754
+ display: inline-block;
2755
+ margin: 0 0 0 1px;
2756
+ padding: 0 5px;
2757
+ border: 1px solid rgba(0,0,0,0.1);
2758
+ border-radius: 3px;
2759
+ line-height: 1.6;
2760
+ }
2761
+
2762
+ .sbi_shortcode_visible .sbi_locations_link {
2763
+ display: none;
2764
+ }
2765
+ .sbi_locations_link a {
2766
+ font-weight: normal;
2767
+ text-decoration: none;
2768
+ }
2769
+ .sbi_locations_link svg {
2770
+ width: 11px;
2771
+ position: relative;
2772
+ top: 1px;
2773
+ }
2774
+
2775
+ /*
2776
+ Add Source Loading
2777
+ */
2778
+ #sbi_config_info .sbi_config_modal.sbi-popup-inside {
2779
+ max-width: calc(100% - 200px);
2780
+ background: #fff;
2781
+ color: #141B38;
2782
+ position: relative;
2783
+ 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%);
2784
+ border-radius: 2px;
2785
+ overflow-y: auto;
2786
+ max-height: 80vh;
2787
+ padding: 0;
2788
+ width: 575px;
2789
+ height: 320px;
2790
+ display: flex;
2791
+ justify-content: center;
2792
+ align-items: center;
2793
+ }
2794
+
2795
+ .sbi-source-redirect-ld{
2796
+ text-align: center;
2797
+ }
2798
+ .sbi-source-redirect-ld div{
2799
+ display: inline-block;
2800
+ width: 32px;
2801
+ height: 32px;
2802
+ border-radius: 50px;
2803
+ margin: 0 10px;
2804
+ position: relative;
2805
+ background-color: #0096CC;
2806
+ color: #0096CC;
2807
+ -webkit-animation: sb-source-redirect 1s infinite linear alternate;
2808
+ animation: sb-source-redirect 1s infinite linear alternate;
2809
+ -webkit-animation-delay: .5s;
2810
+ animation-delay: .5s;
2811
+ }
2812
+
2813
+ .sbi-source-redirect-ld div:before,
2814
+ .sbi-source-redirect-ld div:after{
2815
+ content: '';
2816
+ display: inline-block;
2817
+ position: absolute;
2818
+ top: 0;
2819
+ }
2820
+
2821
+ .sbi-source-redirect-ld div:before{
2822
+ left: -45px;
2823
+ width: 32px;
2824
+ height: 32px;
2825
+ border-radius: 50px;
2826
+ background-color: #0096CC;
2827
+ color: #0096CC;
2828
+ -webkit-animation: sb-source-redirect 1s infinite alternate;
2829
+ animation: sb-source-redirect 1s infinite alternate;
2830
+ -webkit-animation-delay: 0s;
2831
+ animation-delay: 0s;
2832
+ }
2833
+
2834
+ .sbi-source-redirect-ld div:after{
2835
+ left: 45px;
2836
+ width: 32px;
2837
+ height: 32px;
2838
+ border-radius: 50px;
2839
+ background-color: #0096CC;
2840
+ color: #0096CC;
2841
+ -webkit-animation: sb-source-redirect 1s infinite alternate;
2842
+ animation: sb-source-redirect 1s infinite alternate;
2843
+ -webkit-animation-delay: 1s;
2844
+ animation-delay: 1s;
2845
+ }
2846
+
2847
+
2848
+
2849
+ @-webkit-keyframes sb-source-redirect {
2850
+ 0% {background-color: #0096CC;}
2851
+ 50%,100% {background-color: #B5E5FF;}
2852
+ }
2853
+ @keyframes sb-source-redirect {
2854
+ 0% {background-color: #0096CC;}
2855
+ 50%,100% {background-color: #B5E5FF;}
2856
+ }
2857
+
2858
+
2859
+ .sbi-source-redirect-info{
2860
+ text-align: center;
2861
+ margin-top: 50px;
2862
+ }
2863
+
2864
+ .sbi-source-redirect-info strong{
2865
+ font-size: 18px;
2866
+ }
2867
+ .sbi-source-redirect-info p{
2868
+ color: #8C8F9A;
2869
+ padding: 0 24%;
2870
+ font-size: 16px;
2871
+ margin-bottom: 0px;
2872
+ }
css/sb-instagram.css DELETED
@@ -1,819 +0,0 @@
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 DELETED
@@ -1 +0,0 @@
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,789 +1,789 @@
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: inline-block;
51
- float: left;
52
- vertical-align: top;
53
- zoom: 1;
54
-
55
- padding: inherit !important;
56
- margin: 0 !important;
57
- text-decoration: none;
58
- opacity: 1;
59
- overflow: hidden;
60
-
61
- -webkit-box-sizing: border-box;
62
- -moz-box-sizing: border-box;
63
- box-sizing: border-box;
64
-
65
- -webkit-transition: all 0.5s ease;
66
- -moz-transition: all 0.5s ease;
67
- -o-transition: all 0.5s ease;
68
- transition: all 0.5s ease;
69
- }
70
- /* Transition items in */
71
- #sb_instagram #sbi_images .sbi_item.sbi_transition{
72
- opacity: 0;
73
- }
74
-
75
- /* Cols */
76
- #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
77
- #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
78
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
79
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
80
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
81
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
82
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
83
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
84
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
85
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
86
-
87
- /* Disable mobile layout */
88
- #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
89
- #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
90
- #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
91
- #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
92
- #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
93
- #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
94
- #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
95
- #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
96
- #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
97
- #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
98
-
99
- /* Photos */
100
- #sb_instagram .sbi_photo_wrap{
101
- position: relative;
102
- }
103
- #sb_instagram .sbi_photo{
104
- display: block;
105
- text-decoration: none;
106
- }
107
- #sb_instagram .sbi_photo img{
108
- width: 100%;
109
- height: auto;
110
- }
111
- #sb_instagram .sbi_no_js img{
112
- display: none;
113
- }
114
- #sb_instagram a,
115
- #sb_instagram a:hover,
116
- #sb_instagram a:focus,
117
- #sb_instagram a:active{
118
- outline: none;
119
- }
120
- #sb_instagram img{
121
- display: block;
122
- padding: 0 !important;
123
- margin: 0 !important;
124
- max-width: 100% !important;
125
- opacity: 1 !important;
126
- }
127
- #sb_instagram .sbi_link{
128
- display: none;
129
- position: absolute;
130
- bottom: 0;
131
- right: 0;
132
-
133
- width: 100%;
134
- padding: 10px 0;
135
- background: rgba(0,0,0,0.5);
136
- text-align: center;
137
- color: #fff;
138
- font-size: 12px;
139
- line-height: 1.1;
140
- }
141
- #sb_instagram .sbi_link a{
142
- padding: 0 6px;
143
- text-decoration: none;
144
- color: #fff;
145
- font-size: 12px;
146
- line-height: 1.1;
147
-
148
- display: inline-block;
149
- vertical-align: top;
150
- zoom: 1;
151
- }
152
- #sb_instagram .sbi_link .sbi_lightbox_link{
153
- padding-bottom: 5px;
154
- }
155
- #sb_instagram .sbi_link a:hover,
156
- #sb_instagram .sbi_link a:focus{
157
- text-decoration: underline;
158
- }
159
- #sb_instagram .sbi_photo_wrap:hover .sbi_link,
160
- #sb_instagram .sbi_photo_wrap:focus .sbi_link{
161
- display: block;
162
- }
163
-
164
- /* Videos */
165
- #sb_instagram svg:not(:root).svg-inline--fa {
166
- height: 1em;
167
- display: inline-block;
168
- }
169
-
170
- #sb_instagram .sbi_type_video .sbi_playbtn,
171
- #sb_instagram .sbi_type_carousel .sbi_playbtn,
172
- .sbi_type_carousel .fa-clone,
173
- #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
174
- #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
175
- display: block !important;
176
- position: absolute;
177
- z-index: 1;
178
-
179
- color: #fff;
180
- color: rgba(255,255,255,0.9);
181
- font-style: normal !important;
182
- text-shadow: 0 0 8px rgba(0,0,0,0.8);
183
- }
184
- #sb_instagram .sbi_type_video .sbi_playbtn,
185
- #sb_instagram .sbi_type_carousel .sbi_playbtn {
186
- z-index: 2;
187
- top: 50%;
188
- left: 50%;
189
- margin-top: -24px;
190
- margin-left: -19px;
191
- padding: 0;
192
- font-size: 48px;
193
- }
194
- #sb_instagram .sbi_type_carousel .fa-clone{
195
- right: 12px;
196
- top: 12px;
197
- font-size: 24px;
198
- text-shadow: 0 0 8px rgba(0,0,0,0.3);
199
- }
200
- .sbi_type_carousel svg.fa-clone,
201
- #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
202
- #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
203
- -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
204
- filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
205
- }
206
-
207
- /* Loader */
208
- #sb_instagram .sbi_loader{
209
- width: 20px;
210
- height: 20px;
211
-
212
- position: relative;
213
- top: 50%;
214
- left: 50%;
215
- margin: -10px 0 0 -10px;
216
- background-color: #000;
217
- background-color: rgba(0,0,0,0.5);
218
-
219
- border-radius: 100%;
220
- -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
221
- animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
222
- }
223
- #sb_instagram br {
224
- display: none;
225
- }
226
- #sbi_load p {
227
- display: inline;
228
- padding: 0;
229
- margin: 0;
230
- }
231
- /* Loader in button */
232
- #sb_instagram #sbi_load .sbi_loader{
233
- position: absolute;
234
- margin-top: -11px;
235
- background-color: #fff;
236
- opacity: 1;
237
- }
238
- @-webkit-keyframes sbi-sk-scaleout {
239
- 0% { -webkit-transform: scale(0) }
240
- 100% {
241
- -webkit-transform: scale(1.0);
242
- opacity: 0;
243
- }
244
- }
245
- @keyframes sbi-sk-scaleout {
246
- 0% {
247
- -webkit-transform: scale(0);
248
- -ms-transform: scale(0);
249
- transform: scale(0);
250
- } 100% {
251
- -webkit-transform: scale(1.0);
252
- -ms-transform: scale(1.0);
253
- transform: scale(1.0);
254
- opacity: 0;
255
- }
256
- }
257
-
258
- #sb_instagram .fa-spin,
259
- #sbi_lightbox .fa-spin{
260
- -webkit-animation: fa-spin 2s infinite linear;
261
- animation: fa-spin 2s infinite linear
262
- }
263
-
264
- #sb_instagram .fa-pulse,
265
- #sbi_lightbox .fa-pulse{
266
- -webkit-animation: fa-spin 1s infinite steps(8);
267
- animation: fa-spin 1s infinite steps(8)
268
- }
269
-
270
- @-webkit-keyframes fa-spin {
271
- 0% {
272
- -webkit-transform: rotate(0deg);
273
- transform: rotate(0deg)
274
- }
275
- 100% {
276
- -webkit-transform: rotate(359deg);
277
- transform: rotate(359deg)
278
- }
279
- }
280
-
281
- @keyframes fa-spin {
282
- 0% {
283
- -webkit-transform: rotate(0deg);
284
- transform: rotate(0deg)
285
- }
286
- 100% {
287
- -webkit-transform: rotate(359deg);
288
- transform: rotate(359deg)
289
- }
290
- }
291
- /* Screen reader */
292
- .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; }
293
-
294
- /* HEADER */
295
- #sb_instagram .sb_instagram_header{
296
- float: left;
297
- clear: both;
298
- margin: 0 0 15px 0;
299
- padding: 0;
300
- line-height: 1.2;
301
- width: 100%;
302
- }
303
- #sb_instagram .sb_instagram_header a{
304
- float: left;
305
- display: block;
306
- /*width: 100%;*/
307
- min-width: 100%\9;
308
- text-decoration: none;
309
- transition: color 0.5s ease;
310
- }
311
- .sbi_no_avatar .sbi_header_img{
312
- background: #333;
313
- color: #fff;
314
- width: 50px;
315
- height: 50px;
316
- position: relative;
317
- }
318
- .sbi_no_avatar .sbi_header_hashtag_icon {
319
- display: block;
320
- color: #fff;
321
- opacity: .9;
322
- -webkit-transition: background .6s linear,color .6s linear;
323
- -moz-transition: background .6s linear,color .6s linear;
324
- -o-transition: background .6s linear,color .6s linear;
325
- transition: background .6s linear,color .6s linear
326
- }
327
-
328
- .sbi_no_avatar:hover .sbi_header_hashtag_icon {
329
- display: block;
330
- opacity: 1;
331
- -webkit-transition: background .2s linear,color .2s linear;
332
- -moz-transition: background .2s linear,color .2s linear;
333
- -o-transition: background .2s linear,color .2s linear;
334
- transition: background .2s linear,color .2s linear
335
- }
336
- /** Medium Header */
337
- /* Only use medium & large headers on devices above 480px */
338
- @media all and (min-width: 480px){
339
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
340
- width: 80px;
341
- height: 80px;
342
- border-radius: 40px;
343
- }
344
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
345
- width: 80px;
346
- height: 80px;
347
- border-radius: 40px;
348
- }
349
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
350
- font-size: 20px;
351
- line-height: 1.4;
352
- margin-left: 95px !important;
353
- margin-right: -85px !important;
354
- }
355
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
356
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
357
- font-size: 14px;
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
- margin-left: 95px !important;
362
- line-height: 1.4
363
- }
364
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
365
- margin-top: 4px !important;
366
- }
367
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
368
- padding-top: 20px !important;
369
- }
370
- /** Large Header */
371
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
372
- width: 120px;
373
- height: 120px;
374
- border-radius: 60px;
375
- }
376
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
377
- width: 120px;
378
- height: 120px;
379
- border-radius: 60px;
380
- }
381
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
382
- font-size: 28px;
383
- line-height: 1.5;
384
- margin-left: 140px !important;
385
- margin-right: -120px !important;
386
- }
387
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
388
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
389
- font-size: 16px;
390
- }
391
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
392
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
393
- margin-left: 140px !important;
394
- line-height: 1.5;
395
- }
396
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
397
- margin-top: 12px !important;
398
- }
399
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
400
- padding-top: 32px !important;
401
- }
402
- }
403
-
404
- /* Header profile pic */
405
- #sb_instagram .sb_instagram_header .sbi_header_img{
406
- float: left;
407
- position: relative;
408
- width: 50px;
409
- margin: 0 0 0 -100% !important;
410
- overflow: hidden;
411
-
412
- -moz-border-radius: 40px;
413
- -webkit-border-radius: 40px;
414
- border-radius: 40px;
415
- }
416
- #sb_instagram .sb_instagram_header .sbi_header_img img{
417
- float: left;
418
- margin: 0 !important;
419
- padding: 0 !important;
420
- border: none !important;
421
-
422
- -moz-border-radius: 40px;
423
- -webkit-border-radius: 40px;
424
- border-radius: 40px;
425
- }
426
- /* Profile pic hover */
427
- /* Profile pic hover */
428
- #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
429
- #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
430
- position: absolute;
431
- top: 50%;
432
- left: 50%;
433
- margin-top: -12px;
434
- margin-left: -12px;
435
- width: 24px;
436
- height: 24px;
437
- font-size: 24px;
438
- }
439
- #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
440
- .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
441
- margin-top: -18px;
442
- margin-left: -18px;
443
- width: 36px;
444
- height: 36px;
445
- font-size: 36px
446
- }
447
-
448
- #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
449
- .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
450
- margin-top: -24px;
451
- margin-left: -24px;
452
- width: 48px;
453
- height: 48px;
454
- font-size: 48px
455
- }
456
- #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
457
- overflow: hidden;
458
- background: url('../img/small-logo.png') no-repeat 0 0;
459
- }
460
- #sb_instagram .sb_instagram_header .sbi_fade_in{
461
- opacity: 1;
462
- transition: opacity 0.2s ease-in-out;
463
- }
464
- #sb_instagram .sb_instagram_header .sbi_header_img_hover{
465
- position: absolute;
466
- width: 100%;
467
- top: 0;
468
- bottom: 0;
469
- left: 0;
470
- text-align: center;
471
- color: #fff;
472
- background: rgba(0,0,0,0.75);
473
- z-index: 2;
474
-
475
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
476
- filter: alpha(opacity=0);
477
- -moz-opacity: 0;
478
- opacity: 0;
479
- border-radius: 40px;
480
- transition: opacity 0.2s;
481
- }
482
- /* Fade the Instagram icon in when hovering on the header */
483
- #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
484
- #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
485
- opacity: 1;
486
- }
487
- /* Header text */
488
- #sb_instagram .sb_instagram_header .sbi_header_text{
489
- float: left;
490
- width: 100%;
491
- padding-top: 5px;
492
- }
493
- #sb_instagram .sb_instagram_header a{
494
- text-decoration: none;
495
- }
496
- #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
497
- #sb_instagram .sb_instagram_header .sbi_header_text h3{
498
- float: left;
499
- clear: both;
500
- width: auto;
501
- margin: 0 0 0 60px !important;
502
- padding: 0 !important;
503
- }
504
- #sb_instagram .sb_instagram_header h3{
505
- font-size: 16px;
506
- line-height: 1.3;
507
- }
508
- #sb_instagram .sb_instagram_header p{
509
- font-size: 13px;
510
- line-height: 1.3;
511
- margin: 0;
512
- padding: 0;
513
- }
514
- #sb_instagram p:empty { display: none; }
515
- #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
516
- margin-right: 3px !important;
517
- }
518
-
519
- /* No bio */
520
- #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
521
- padding-top: 9px !important;
522
- }
523
- #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
524
- clear: both;
525
- }
526
-
527
-
528
- /* Buttons */
529
- #sb_instagram #sbi_load{
530
- float: left;
531
- clear: both;
532
- width: 100%;
533
- text-align: center;
534
- opacity: 1;
535
- transition: all 0.5s ease-in;
536
- }
537
- #sb_instagram #sbi_load .fa-spinner{
538
- display: none;
539
- position: absolute;
540
- top: 50%;
541
- left: 50%;
542
- margin: -8px 0 0 -7px;
543
- font-size: 15px;
544
- }
545
- #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
546
- opacity: 1;
547
- transition: all 0.1s ease-in;
548
- }
549
- #sb_instagram .sbi_hidden{
550
- opacity: 0 !important;
551
- }
552
- #sb_instagram #sbi_load .sbi_load_btn{
553
- display: inline-block;
554
- vertical-align: top;
555
- zoom: 1;
556
-
557
- padding: 7px 14px;
558
- margin: 5px auto 0 auto;
559
- background: #333;
560
- border: none;
561
- color: #fff;
562
- text-decoration: none;
563
- font-size: 13px;
564
- line-height: 1.5;
565
- border-radius: 4px;
566
- box-sizing: border-box;
567
- }
568
-
569
- #sb_instagram .sbi_follow_btn a{
570
- display: inline-block;
571
- vertical-align: top;
572
- zoom: 1;
573
- padding: 7px 14px;
574
- margin: 5px auto 0 auto;
575
- border: none;
576
- text-decoration: none;
577
- font-size: 13px;
578
- line-height: 1.5;
579
- border-radius: 4px;
580
- box-sizing: border-box;
581
- background: #408bd1;
582
- color: #fff;
583
- transition: all 0.1s ease-in;
584
- }
585
- #sb_instagram #sbi_load .sbi_load_btn {
586
- position: relative;
587
- }
588
- /* Follow button */
589
- #sb_instagram .sbi_follow_btn{
590
- display: inline-block;
591
- vertical-align: top;
592
- zoom: 1;
593
- text-align: center;
594
- }
595
- #sb_instagram .sbi_follow_btn.sbi_top{
596
- display: block;
597
- margin-bottom: 5px;
598
- }
599
-
600
- #sb_instagram #sbi_load .sbi_load_btn{
601
- transition: all 0.1s ease-in;
602
- }
603
- /* Hover state for default colors */
604
- #sb_instagram #sbi_load .sbi_load_btn:hover{
605
- outline: none;
606
- box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
607
- }
608
- #sb_instagram .sbi_follow_btn a:hover,
609
- #sb_instagram .sbi_follow_btn a:focus{
610
- outline: none;
611
- box-shadow: inset 0 0 10px 20px #359dff;
612
- }
613
- /* If a custom color is applied then just use opacity for the hover effect */
614
- #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
615
- #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
616
- #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
617
- box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
618
- }
619
- /* Active state */
620
- #sb_instagram .sbi_follow_btn a:active,
621
- #sb_instagram #sbi_load .sbi_load_btn:active{
622
- box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
623
- }
624
-
625
- #sb_instagram .sbi_follow_btn .fa,
626
- #sb_instagram .sbi_follow_btn svg{
627
- margin-bottom: -1px;
628
- margin-right: 7px;
629
- font-size: 15px;
630
- }
631
- #sb_instagram .sbi_follow_btn svg{
632
- vertical-align: -.125em;
633
- }
634
- #sb_instagram #sbi_load .sbi_follow_btn{
635
- margin-left: 5px;
636
- }
637
-
638
- /* Error messages */
639
- #sb_instagram .sb_instagram_error{
640
- width: 100%;
641
- text-align: center;
642
- line-height: 1.4;
643
- }
644
-
645
- /* Mod only error msgs */
646
- #sbi_mod_error{
647
- display: none;
648
- border: 1px solid #ddd;
649
- background: #eee;
650
- color: #333;
651
- margin: 10px 0 0;
652
- padding: 10px 15px;
653
- font-size: 13px;
654
- text-align: center;
655
- clear: both;
656
-
657
- -moz-border-radius: 4px;
658
- -webkit-border-radius: 4px;
659
- border-radius: 4px;
660
- }
661
- #sbi_mod_error br {
662
- display: initial !important;
663
- }
664
- #sbi_mod_error p{
665
- padding: 5px 0 !important;
666
- margin: 0 !important;
667
- line-height: 1.3 !important;
668
- }
669
- #sbi_mod_error ol,
670
- #sbi_mod_error ul{
671
- padding: 5px 0 5px 20px !important;
672
- margin: 0 !important;
673
- }
674
- #sbi_mod_error li{
675
- padding: 1px 0 !important;
676
- margin: 0 !important;
677
- }
678
- #sbi_mod_error span{
679
- font-size: 12px;
680
- }
681
-
682
- /* Medium */
683
- #sb_instagram.sbi_medium .sbi_playbtn,
684
- #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
685
- margin-top: -12px;
686
- margin-left: -9px;
687
- font-size: 23px;
688
- }
689
- #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
690
- right: 8px;
691
- top: 8px;
692
- font-size: 18px;
693
- }
694
- /* Small */
695
- #sb_instagram.sbi_small .sbi_playbtn,
696
- #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
697
- margin-top: -9px;
698
- margin-left: -7px;
699
- font-size: 18px;
700
- }
701
- #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
702
- right: 5px;
703
- top: 5px;
704
- font-size: 12px;
705
- }
706
-
707
- /* Media queries */
708
- @media all and (max-width: 640px){
709
- /* Make 3-6 cols into 2 col */
710
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
711
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
712
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
713
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
714
- width: 50%;
715
- }
716
- /* Make 7-10 cols into 4 col */
717
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
718
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
719
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
720
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
721
- width: 25%;
722
- }
723
- /* On mobile make the min-width 100% */
724
- #sb_instagram.sbi_width_resp{
725
- width: 100% !important;
726
- }
727
- }
728
- @media all and (max-width: 480px){
729
- /* Make all cols into 1 col */
730
- #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
731
- #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
732
- #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
733
- #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
734
- #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
735
- #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
736
- #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
737
- #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
738
- width: 100%;
739
- }
740
- }
741
-
742
- /* NO JS */
743
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
744
- box-sizing: border-box;
745
- position: relative;
746
- overflow: hidden;
747
- }
748
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
749
- content: "";
750
- display: block;
751
- padding-top: 100%;
752
- z-index: -300;
753
- }
754
- #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
755
- position: absolute;
756
- top: 0;
757
- left: 0;
758
- bottom: 0;
759
- right: 0;
760
- }
761
- #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
762
- opacity: 1;
763
- }
764
- #sb_instagram.sbi_no_js .sbi_photo img,
765
- #sb_instagram.sbi_no_js .sbi_load_btn{
766
- display: none;
767
- }
768
- #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
769
- padding-bottom: 0 !important;
770
- }
771
- #sb_instagram #sbi_mod_error .sb_frontend_btn {
772
- display: inline-block;
773
- padding: 6px 10px;
774
- background: #ddd;
775
- background: rgba(0,0,0,.1);
776
- text-decoration: none;
777
- border-radius: 5px;
778
- margin-top: 10px;
779
- color: #444
780
- }
781
-
782
- #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
783
- background: #ccc;
784
- background: rgba(0,0,0,.15)
785
- }
786
-
787
- #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
788
- margin-right: 2px
789
  }
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: inline-block;
51
+ float: left;
52
+ vertical-align: top;
53
+ zoom: 1;
54
+
55
+ padding: inherit !important;
56
+ margin: 0 !important;
57
+ text-decoration: none;
58
+ opacity: 1;
59
+ overflow: hidden;
60
+
61
+ -webkit-box-sizing: border-box;
62
+ -moz-box-sizing: border-box;
63
+ box-sizing: border-box;
64
+
65
+ -webkit-transition: all 0.5s ease;
66
+ -moz-transition: all 0.5s ease;
67
+ -o-transition: all 0.5s ease;
68
+ transition: all 0.5s ease;
69
+ }
70
+ /* Transition items in */
71
+ #sb_instagram #sbi_images .sbi_item.sbi_transition{
72
+ opacity: 0;
73
+ }
74
+
75
+ /* Cols */
76
+ #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
77
+ #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
78
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
79
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
80
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
81
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
82
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
83
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
84
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
85
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
86
+
87
+ /* Disable mobile layout */
88
+ #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
89
+ #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
90
+ #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
91
+ #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
92
+ #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
93
+ #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
94
+ #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
95
+ #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
96
+ #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
97
+ #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
98
+
99
+ /* Photos */
100
+ #sb_instagram .sbi_photo_wrap{
101
+ position: relative;
102
+ }
103
+ #sb_instagram .sbi_photo{
104
+ display: block;
105
+ text-decoration: none;
106
+ }
107
+ #sb_instagram .sbi_photo img{
108
+ width: 100%;
109
+ height: auto;
110
+ }
111
+ #sb_instagram .sbi_no_js img{
112
+ display: none;
113
+ }
114
+ #sb_instagram a,
115
+ #sb_instagram a:hover,
116
+ #sb_instagram a:focus,
117
+ #sb_instagram a:active{
118
+ outline: none;
119
+ }
120
+ #sb_instagram img{
121
+ display: block;
122
+ padding: 0 !important;
123
+ margin: 0 !important;
124
+ max-width: 100% !important;
125
+ opacity: 1 !important;
126
+ }
127
+ #sb_instagram .sbi_link{
128
+ display: none;
129
+ position: absolute;
130
+ bottom: 0;
131
+ right: 0;
132
+
133
+ width: 100%;
134
+ padding: 10px 0;
135
+ background: rgba(0,0,0,0.5);
136
+ text-align: center;
137
+ color: #fff;
138
+ font-size: 12px;
139
+ line-height: 1.1;
140
+ }
141
+ #sb_instagram .sbi_link a{
142
+ padding: 0 6px;
143
+ text-decoration: none;
144
+ color: #fff;
145
+ font-size: 12px;
146
+ line-height: 1.1;
147
+
148
+ display: inline-block;
149
+ vertical-align: top;
150
+ zoom: 1;
151
+ }
152
+ #sb_instagram .sbi_link .sbi_lightbox_link{
153
+ padding-bottom: 5px;
154
+ }
155
+ #sb_instagram .sbi_link a:hover,
156
+ #sb_instagram .sbi_link a:focus{
157
+ text-decoration: underline;
158
+ }
159
+ #sb_instagram .sbi_photo_wrap:hover .sbi_link,
160
+ #sb_instagram .sbi_photo_wrap:focus .sbi_link{
161
+ display: block;
162
+ }
163
+
164
+ /* Videos */
165
+ #sb_instagram svg:not(:root).svg-inline--fa {
166
+ height: 1em;
167
+ display: inline-block;
168
+ }
169
+
170
+ #sb_instagram .sbi_type_video .sbi_playbtn,
171
+ #sb_instagram .sbi_type_carousel .sbi_playbtn,
172
+ .sbi_type_carousel .fa-clone,
173
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
174
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
175
+ display: block !important;
176
+ position: absolute;
177
+ z-index: 1;
178
+
179
+ color: #fff;
180
+ color: rgba(255,255,255,0.9);
181
+ font-style: normal !important;
182
+ text-shadow: 0 0 8px rgba(0,0,0,0.8);
183
+ }
184
+ #sb_instagram .sbi_type_video .sbi_playbtn,
185
+ #sb_instagram .sbi_type_carousel .sbi_playbtn {
186
+ z-index: 2;
187
+ top: 50%;
188
+ left: 50%;
189
+ margin-top: -24px;
190
+ margin-left: -19px;
191
+ padding: 0;
192
+ font-size: 48px;
193
+ }
194
+ #sb_instagram .sbi_type_carousel .fa-clone{
195
+ right: 12px;
196
+ top: 12px;
197
+ font-size: 24px;
198
+ text-shadow: 0 0 8px rgba(0,0,0,0.3);
199
+ }
200
+ .sbi_type_carousel svg.fa-clone,
201
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
202
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
203
+ -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
204
+ filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
205
+ }
206
+
207
+ /* Loader */
208
+ #sb_instagram .sbi_loader{
209
+ width: 20px;
210
+ height: 20px;
211
+
212
+ position: relative;
213
+ top: 50%;
214
+ left: 50%;
215
+ margin: -10px 0 0 -10px;
216
+ background-color: #000;
217
+ background-color: rgba(0,0,0,0.5);
218
+
219
+ border-radius: 100%;
220
+ -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
221
+ animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
222
+ }
223
+ #sb_instagram br {
224
+ display: none;
225
+ }
226
+ #sbi_load p {
227
+ display: inline;
228
+ padding: 0;
229
+ margin: 0;
230
+ }
231
+ /* Loader in button */
232
+ #sb_instagram #sbi_load .sbi_loader{
233
+ position: absolute;
234
+ margin-top: -11px;
235
+ background-color: #fff;
236
+ opacity: 1;
237
+ }
238
+ @-webkit-keyframes sbi-sk-scaleout {
239
+ 0% { -webkit-transform: scale(0) }
240
+ 100% {
241
+ -webkit-transform: scale(1.0);
242
+ opacity: 0;
243
+ }
244
+ }
245
+ @keyframes sbi-sk-scaleout {
246
+ 0% {
247
+ -webkit-transform: scale(0);
248
+ -ms-transform: scale(0);
249
+ transform: scale(0);
250
+ } 100% {
251
+ -webkit-transform: scale(1.0);
252
+ -ms-transform: scale(1.0);
253
+ transform: scale(1.0);
254
+ opacity: 0;
255
+ }
256
+ }
257
+
258
+ #sb_instagram .fa-spin,
259
+ #sbi_lightbox .fa-spin{
260
+ -webkit-animation: fa-spin 2s infinite linear;
261
+ animation: fa-spin 2s infinite linear
262
+ }
263
+
264
+ #sb_instagram .fa-pulse,
265
+ #sbi_lightbox .fa-pulse{
266
+ -webkit-animation: fa-spin 1s infinite steps(8);
267
+ animation: fa-spin 1s infinite steps(8)
268
+ }
269
+
270
+ @-webkit-keyframes fa-spin {
271
+ 0% {
272
+ -webkit-transform: rotate(0deg);
273
+ transform: rotate(0deg)
274
+ }
275
+ 100% {
276
+ -webkit-transform: rotate(359deg);
277
+ transform: rotate(359deg)
278
+ }
279
+ }
280
+
281
+ @keyframes fa-spin {
282
+ 0% {
283
+ -webkit-transform: rotate(0deg);
284
+ transform: rotate(0deg)
285
+ }
286
+ 100% {
287
+ -webkit-transform: rotate(359deg);
288
+ transform: rotate(359deg)
289
+ }
290
+ }
291
+ /* Screen reader */
292
+ .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; }
293
+
294
+ /* HEADER */
295
+ #sb_instagram .sb_instagram_header{
296
+ float: left;
297
+ clear: both;
298
+ margin: 0 0 15px 0;
299
+ padding: 0;
300
+ line-height: 1.2;
301
+ width: 100%;
302
+ }
303
+ #sb_instagram .sb_instagram_header a{
304
+ float: left;
305
+ display: block;
306
+ /*width: 100%;*/
307
+ min-width: 100%\9;
308
+ text-decoration: none;
309
+ transition: color 0.5s ease;
310
+ }
311
+ .sbi_no_avatar .sbi_header_img{
312
+ background: #333;
313
+ color: #fff;
314
+ width: 50px;
315
+ height: 50px;
316
+ position: relative;
317
+ }
318
+ .sbi_no_avatar .sbi_header_hashtag_icon {
319
+ display: block;
320
+ color: #fff;
321
+ opacity: .9;
322
+ -webkit-transition: background .6s linear,color .6s linear;
323
+ -moz-transition: background .6s linear,color .6s linear;
324
+ -o-transition: background .6s linear,color .6s linear;
325
+ transition: background .6s linear,color .6s linear
326
+ }
327
+
328
+ .sbi_no_avatar:hover .sbi_header_hashtag_icon {
329
+ display: block;
330
+ opacity: 1;
331
+ -webkit-transition: background .2s linear,color .2s linear;
332
+ -moz-transition: background .2s linear,color .2s linear;
333
+ -o-transition: background .2s linear,color .2s linear;
334
+ transition: background .2s linear,color .2s linear
335
+ }
336
+ /** Medium Header */
337
+ /* Only use medium & large headers on devices above 480px */
338
+ @media all and (min-width: 480px){
339
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
340
+ width: 80px;
341
+ height: 80px;
342
+ border-radius: 40px;
343
+ }
344
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
345
+ width: 80px;
346
+ height: 80px;
347
+ border-radius: 40px;
348
+ }
349
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
350
+ font-size: 20px;
351
+ line-height: 1.4;
352
+ margin-left: 95px !important;
353
+ margin-right: -85px !important;
354
+ }
355
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
356
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
357
+ font-size: 14px;
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
+ margin-left: 95px !important;
362
+ line-height: 1.4
363
+ }
364
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
365
+ margin-top: 4px !important;
366
+ }
367
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
368
+ padding-top: 20px !important;
369
+ }
370
+ /** Large Header */
371
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
372
+ width: 120px;
373
+ height: 120px;
374
+ border-radius: 60px;
375
+ }
376
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
377
+ width: 120px;
378
+ height: 120px;
379
+ border-radius: 60px;
380
+ }
381
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
382
+ font-size: 28px;
383
+ line-height: 1.5;
384
+ margin-left: 140px !important;
385
+ margin-right: -120px !important;
386
+ }
387
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
388
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
389
+ font-size: 16px;
390
+ }
391
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
392
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
393
+ margin-left: 140px !important;
394
+ line-height: 1.5;
395
+ }
396
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
397
+ margin-top: 12px !important;
398
+ }
399
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
400
+ padding-top: 32px !important;
401
+ }
402
+ }
403
+
404
+ /* Header profile pic */
405
+ #sb_instagram .sb_instagram_header .sbi_header_img{
406
+ float: left;
407
+ position: relative;
408
+ width: 50px;
409
+ margin: 0 0 0 -100% !important;
410
+ overflow: hidden;
411
+
412
+ -moz-border-radius: 40px;
413
+ -webkit-border-radius: 40px;
414
+ border-radius: 40px;
415
+ }
416
+ #sb_instagram .sb_instagram_header .sbi_header_img img{
417
+ float: left;
418
+ margin: 0 !important;
419
+ padding: 0 !important;
420
+ border: none !important;
421
+
422
+ -moz-border-radius: 40px;
423
+ -webkit-border-radius: 40px;
424
+ border-radius: 40px;
425
+ }
426
+ /* Profile pic hover */
427
+ /* Profile pic hover */
428
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
429
+ #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
430
+ position: absolute;
431
+ top: 50%;
432
+ left: 50%;
433
+ margin-top: -12px;
434
+ margin-left: -12px;
435
+ width: 24px;
436
+ height: 24px;
437
+ font-size: 24px;
438
+ }
439
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
440
+ .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
441
+ margin-top: -18px;
442
+ margin-left: -18px;
443
+ width: 36px;
444
+ height: 36px;
445
+ font-size: 36px
446
+ }
447
+
448
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
449
+ .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
450
+ margin-top: -24px;
451
+ margin-left: -24px;
452
+ width: 48px;
453
+ height: 48px;
454
+ font-size: 48px
455
+ }
456
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
457
+ overflow: hidden;
458
+ background: url('../img/small-logo.png') no-repeat 0 0;
459
+ }
460
+ #sb_instagram .sb_instagram_header .sbi_fade_in{
461
+ opacity: 1;
462
+ transition: opacity 0.2s ease-in-out;
463
+ }
464
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
465
+ position: absolute;
466
+ width: 100%;
467
+ top: 0;
468
+ bottom: 0;
469
+ left: 0;
470
+ text-align: center;
471
+ color: #fff;
472
+ background: rgba(0,0,0,0.75);
473
+ z-index: 2;
474
+
475
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
476
+ filter: alpha(opacity=0);
477
+ -moz-opacity: 0;
478
+ opacity: 0;
479
+ border-radius: 40px;
480
+ transition: opacity 0.2s;
481
+ }
482
+ /* Fade the Instagram icon in when hovering on the header */
483
+ #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
484
+ #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
485
+ opacity: 1;
486
+ }
487
+ /* Header text */
488
+ #sb_instagram .sb_instagram_header .sbi_header_text{
489
+ float: left;
490
+ width: 100%;
491
+ padding-top: 5px;
492
+ }
493
+ #sb_instagram .sb_instagram_header a{
494
+ text-decoration: none;
495
+ }
496
+ #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
497
+ #sb_instagram .sb_instagram_header .sbi_header_text h3{
498
+ float: left;
499
+ clear: both;
500
+ width: auto;
501
+ margin: 0 0 0 60px !important;
502
+ padding: 0 !important;
503
+ }
504
+ #sb_instagram .sb_instagram_header h3{
505
+ font-size: 16px;
506
+ line-height: 1.3;
507
+ }
508
+ #sb_instagram .sb_instagram_header p{
509
+ font-size: 13px;
510
+ line-height: 1.3;
511
+ margin: 0;
512
+ padding: 0;
513
+ }
514
+ #sb_instagram p:empty { display: none; }
515
+ #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
516
+ margin-right: 3px !important;
517
+ }
518
+
519
+ /* No bio */
520
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
521
+ padding-top: 9px !important;
522
+ }
523
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
524
+ clear: both;
525
+ }
526
+
527
+
528
+ /* Buttons */
529
+ #sb_instagram #sbi_load{
530
+ float: left;
531
+ clear: both;
532
+ width: 100%;
533
+ text-align: center;
534
+ opacity: 1;
535
+ transition: all 0.5s ease-in;
536
+ }
537
+ #sb_instagram #sbi_load .fa-spinner{
538
+ display: none;
539
+ position: absolute;
540
+ top: 50%;
541
+ left: 50%;
542
+ margin: -8px 0 0 -7px;
543
+ font-size: 15px;
544
+ }
545
+ #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
546
+ opacity: 1;
547
+ transition: all 0.1s ease-in;
548
+ }
549
+ #sb_instagram .sbi_hidden{
550
+ opacity: 0 !important;
551
+ }
552
+ #sb_instagram #sbi_load .sbi_load_btn{
553
+ display: inline-block;
554
+ vertical-align: top;
555
+ zoom: 1;
556
+
557
+ padding: 7px 14px;
558
+ margin: 5px auto 0 auto;
559
+ background: #333;
560
+ border: none;
561
+ color: #fff;
562
+ text-decoration: none;
563
+ font-size: 13px;
564
+ line-height: 1.5;
565
+ border-radius: 4px;
566
+ box-sizing: border-box;
567
+ }
568
+
569
+ #sb_instagram .sbi_follow_btn a{
570
+ display: inline-block;
571
+ vertical-align: top;
572
+ zoom: 1;
573
+ padding: 7px 14px;
574
+ margin: 5px auto 0 auto;
575
+ border: none;
576
+ text-decoration: none;
577
+ font-size: 13px;
578
+ line-height: 1.5;
579
+ border-radius: 4px;
580
+ box-sizing: border-box;
581
+ background: #408bd1;
582
+ color: #fff;
583
+ transition: all 0.1s ease-in;
584
+ }
585
+ #sb_instagram #sbi_load .sbi_load_btn {
586
+ position: relative;
587
+ }
588
+ /* Follow button */
589
+ #sb_instagram .sbi_follow_btn{
590
+ display: inline-block;
591
+ vertical-align: top;
592
+ zoom: 1;
593
+ text-align: center;
594
+ }
595
+ #sb_instagram .sbi_follow_btn.sbi_top{
596
+ display: block;
597
+ margin-bottom: 5px;
598
+ }
599
+
600
+ #sb_instagram #sbi_load .sbi_load_btn{
601
+ transition: all 0.1s ease-in;
602
+ }
603
+ /* Hover state for default colors */
604
+ #sb_instagram #sbi_load .sbi_load_btn:hover{
605
+ outline: none;
606
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
607
+ }
608
+ #sb_instagram .sbi_follow_btn a:hover,
609
+ #sb_instagram .sbi_follow_btn a:focus{
610
+ outline: none;
611
+ box-shadow: inset 0 0 10px 20px #359dff;
612
+ }
613
+ /* If a custom color is applied then just use opacity for the hover effect */
614
+ #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
615
+ #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
616
+ #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
617
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
618
+ }
619
+ /* Active state */
620
+ #sb_instagram .sbi_follow_btn a:active,
621
+ #sb_instagram #sbi_load .sbi_load_btn:active{
622
+ box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
623
+ }
624
+
625
+ #sb_instagram .sbi_follow_btn .fa,
626
+ #sb_instagram .sbi_follow_btn svg{
627
+ margin-bottom: -1px;
628
+ margin-right: 7px;
629
+ font-size: 15px;
630
+ }
631
+ #sb_instagram .sbi_follow_btn svg{
632
+ vertical-align: -.125em;
633
+ }
634
+ #sb_instagram #sbi_load .sbi_follow_btn{
635
+ margin-left: 5px;
636
+ }
637
+
638
+ /* Error messages */
639
+ #sb_instagram .sb_instagram_error{
640
+ width: 100%;
641
+ text-align: center;
642
+ line-height: 1.4;
643
+ }
644
+
645
+ /* Mod only error msgs */
646
+ #sbi_mod_error{
647
+ display: none;
648
+ border: 1px solid #ddd;
649
+ background: #eee;
650
+ color: #333;
651
+ margin: 10px 0 0;
652
+ padding: 10px 15px;
653
+ font-size: 13px;
654
+ text-align: center;
655
+ clear: both;
656
+
657
+ -moz-border-radius: 4px;
658
+ -webkit-border-radius: 4px;
659
+ border-radius: 4px;
660
+ }
661
+ #sbi_mod_error br {
662
+ display: initial !important;
663
+ }
664
+ #sbi_mod_error p{
665
+ padding: 5px 0 !important;
666
+ margin: 0 !important;
667
+ line-height: 1.3 !important;
668
+ }
669
+ #sbi_mod_error ol,
670
+ #sbi_mod_error ul{
671
+ padding: 5px 0 5px 20px !important;
672
+ margin: 0 !important;
673
+ }
674
+ #sbi_mod_error li{
675
+ padding: 1px 0 !important;
676
+ margin: 0 !important;
677
+ }
678
+ #sbi_mod_error span{
679
+ font-size: 12px;
680
+ }
681
+
682
+ /* Medium */
683
+ #sb_instagram.sbi_medium .sbi_playbtn,
684
+ #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
685
+ margin-top: -12px;
686
+ margin-left: -9px;
687
+ font-size: 23px;
688
+ }
689
+ #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
690
+ right: 8px;
691
+ top: 8px;
692
+ font-size: 18px;
693
+ }
694
+ /* Small */
695
+ #sb_instagram.sbi_small .sbi_playbtn,
696
+ #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
697
+ margin-top: -9px;
698
+ margin-left: -7px;
699
+ font-size: 18px;
700
+ }
701
+ #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
702
+ right: 5px;
703
+ top: 5px;
704
+ font-size: 12px;
705
+ }
706
+
707
+ /* Media queries */
708
+ @media all and (max-width: 640px){
709
+ /* Make 3-6 cols into 2 col */
710
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
711
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
712
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
713
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
714
+ width: 50%;
715
+ }
716
+ /* Make 7-10 cols into 4 col */
717
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
718
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
719
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
720
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
721
+ width: 25%;
722
+ }
723
+ /* On mobile make the min-width 100% */
724
+ #sb_instagram.sbi_width_resp{
725
+ width: 100% !important;
726
+ }
727
+ }
728
+ @media all and (max-width: 480px){
729
+ /* Make all cols into 1 col */
730
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
731
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
732
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
733
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
734
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
735
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
736
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
737
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
738
+ width: 100%;
739
+ }
740
+ }
741
+
742
+ /* NO JS */
743
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
744
+ box-sizing: border-box;
745
+ position: relative;
746
+ overflow: hidden;
747
+ }
748
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
749
+ content: "";
750
+ display: block;
751
+ padding-top: 100%;
752
+ z-index: -300;
753
+ }
754
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
755
+ position: absolute;
756
+ top: 0;
757
+ left: 0;
758
+ bottom: 0;
759
+ right: 0;
760
+ }
761
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
762
+ opacity: 1;
763
+ }
764
+ #sb_instagram.sbi_no_js .sbi_photo img,
765
+ #sb_instagram.sbi_no_js .sbi_load_btn{
766
+ display: none;
767
+ }
768
+ #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
769
+ padding-bottom: 0 !important;
770
+ }
771
+ #sb_instagram #sbi_mod_error .sb_frontend_btn {
772
+ display: inline-block;
773
+ padding: 6px 10px;
774
+ background: #ddd;
775
+ background: rgba(0,0,0,.1);
776
+ text-decoration: none;
777
+ border-radius: 5px;
778
+ margin-top: 10px;
779
+ color: #444
780
+ }
781
+
782
+ #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
783
+ background: #ccc;
784
+ background: rgba(0,0,0,.15)
785
+ }
786
+
787
+ #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
788
+ margin-right: 2px
789
  }
css/sbi-styles.min.css CHANGED
File without changes
gpl-2.0.txt CHANGED
File without changes
img/about/api-error.png CHANGED
File without changes
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-fb.png CHANGED
File without changes
img/about/plugin-if.png 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-seo.png CHANGED
File without changes
img/about/plugin-smtp.png CHANGED
File without changes
img/about/plugin-tw.jpg CHANGED
File without changes
img/about/plugin-wpforms.png CHANGED
File without changes
img/about/plugin-yt.png CHANGED
File without changes
img/about/steps.png CHANGED
File without changes
img/about/team.jpg CHANGED
File without changes
img/balloon-120.png CHANGED
File without changes
img/carousel.png CHANGED
File without changes
img/grid.png CHANGED
File without changes
img/highlight.png CHANGED
File without changes
img/insta-logo.png CHANGED
File without changes
img/instagram-pro-promo.png CHANGED
File without changes
img/loader.png CHANGED
File without changes
img/masonry.png CHANGED
File without changes
img/placeholder.png CHANGED
File without changes
img/sbi-icon.png CHANGED
File without changes
img/sbi-oembed.png CHANGED
File without changes
img/small-logo.png CHANGED
File without changes
img/sw-screenshot.png CHANGED
File without changes
img/thumb-placeholder.png CHANGED
File without changes
inc/admin/PluginSilentUpgrader.php CHANGED
@@ -1,565 +1,565 @@
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
- }
196
-
197
- $this->skin->after();
198
-
199
- if ( ! $options['is_multi'] ) {
200
-
201
- /**
202
- * Fires when the upgrader process is complete.
203
- *
204
- * See also {@see 'upgrader_package_options'}.
205
- *
206
- * @since 3.6.0
207
- * @since 3.7.0 Added to WP_Upgrader::run().
208
- * @since 4.6.0 `$translations` was added as a possible argument to `$hook_extra`.
209
- *
210
- * @param WP_Upgrader $this WP_Upgrader instance. In other contexts, $this, might be a
211
- * Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
212
- * @param array $hook_extra {
213
- * Array of bulk item update data.
214
- *
215
- * @type string $action Type of action. Default 'update'.
216
- * @type string $type Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'.
217
- * @type bool $bulk Whether the update process is a bulk update. Default true.
218
- * @type array $plugins Array of the basename paths of the plugins' main files.
219
- * @type array $themes The theme slugs.
220
- * @type array $translations {
221
- * Array of translations update data.
222
- *
223
- * @type string $language The locale the translation is for.
224
- * @type string $type Type of translation. Accepts 'plugin', 'theme', or 'core'.
225
- * @type string $slug Text domain the translation is for. The slug of a theme/plugin or
226
- * 'default' for core translations.
227
- * @type string $version The version of a theme, plugin, or core.
228
- * }
229
- * }
230
- */
231
- do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
232
-
233
- $this->skin->footer();
234
- }
235
-
236
- return $result;
237
- }
238
-
239
- /**
240
- * Toggle maintenance mode for the site.
241
- *
242
- * Create/delete the maintenance file to enable/disable maintenance mode.
243
- *
244
- * @since 2.8.0
245
- *
246
- * @global WP_Filesystem_Base $wp_filesystem Subclass
247
- *
248
- * @param bool $enable True to enable maintenance mode, false to disable.
249
- */
250
- public function maintenance_mode( $enable = false ) {
251
- global $wp_filesystem;
252
- $file = $wp_filesystem->abspath() . '.maintenance';
253
- if ( $enable ) {
254
- // Create maintenance file to signal that we are upgrading
255
- $maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
256
- $wp_filesystem->delete( $file );
257
- $wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE );
258
- } elseif ( $wp_filesystem->exists( $file ) ) {
259
- $wp_filesystem->delete( $file );
260
- }
261
- }
262
-
263
- /**
264
- * Download a package.
265
- *
266
- * @since 2.8.0
267
- *
268
- * @param string $package The URI of the package. If this is the full path to an
269
- * existing local file, it will be returned untouched.
270
- * @param bool $check_signatures Whether to validate file signatures. Default false.
271
- * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object.
272
- */
273
- public function download_package( $package, $check_signatures = false, $hook_extra = array() ) {
274
-
275
- /**
276
- * Filters whether to return the package.
277
- *
278
- * @since 3.7.0
279
- *
280
- * @param bool $reply Whether to bail without returning the package.
281
- * Default false.
282
- * @param string $package The package file name.
283
- * @param WP_Upgrader $this The WP_Upgrader instance.
284
- */
285
- $reply = apply_filters( 'upgrader_pre_download', false, $package, $this );
286
- if ( false !== $reply ) {
287
- return $reply;
288
- }
289
-
290
- if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { //Local file or remote?
291
- return $package; //must be a local file..
292
- }
293
-
294
- if ( empty( $package ) ) {
295
- return new WP_Error( 'no_package', $this->strings['no_package'] );
296
- }
297
-
298
- $download_file = download_url( $package, 300, $check_signatures );
299
-
300
- if ( is_wp_error( $download_file ) && ! $download_file->get_error_data( 'softfail-filename' ) ) {
301
- return new WP_Error( 'download_failed', $this->strings['download_failed'], $download_file->get_error_message() );
302
- }
303
-
304
- return $download_file;
305
- }
306
-
307
- /**
308
- * Unpack a compressed package file.
309
- *
310
- * @since 2.8.0
311
- *
312
- * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
313
- *
314
- * @param string $package Full path to the package file.
315
- * @param bool $delete_package Optional. Whether to delete the package file after attempting
316
- * to unpack it. Default true.
317
- * @return string|WP_Error The path to the unpacked contents, or a WP_Error on failure.
318
- */
319
- public function unpack_package( $package, $delete_package = true ) {
320
- global $wp_filesystem;
321
-
322
- $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/';
323
-
324
- //Clean up contents of upgrade directory beforehand.
325
- $upgrade_files = $wp_filesystem->dirlist( $upgrade_folder );
326
- if ( ! empty( $upgrade_files ) ) {
327
- foreach ( $upgrade_files as $file ) {
328
- $wp_filesystem->delete( $upgrade_folder . $file['name'], true );
329
- }
330
- }
331
-
332
- // We need a working directory - Strip off any .tmp or .zip suffixes
333
- $working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
334
-
335
- // Clean up working directory
336
- if ( $wp_filesystem->is_dir( $working_dir ) ) {
337
- $wp_filesystem->delete( $working_dir, true );
338
- }
339
-
340
- // Unzip package to working directory
341
- $result = unzip_file( $package, $working_dir );
342
-
343
- // Once extracted, delete the package if required.
344
- if ( $delete_package ) {
345
- unlink( $package );
346
- }
347
-
348
- if ( is_wp_error( $result ) ) {
349
- $wp_filesystem->delete( $working_dir, true );
350
- if ( 'incompatible_archive' === $result->get_error_code() ) {
351
- return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $result->get_error_data() );
352
- }
353
- return $result;
354
- }
355
-
356
- return $working_dir;
357
- }
358
-
359
- /**
360
- * Install a package.
361
- *
362
- * Copies the contents of a package form a source directory, and installs them in
363
- * a destination directory. Optionally removes the source. It can also optionally
364
- * clear out the destination folder if it already exists.
365
- *
366
- * @since 2.8.0
367
- *
368
- * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
369
- * @global array $wp_theme_directories
370
- *
371
- * @param array|string $args {
372
- * Optional. Array or string of arguments for installing a package. Default empty array.
373
- *
374
- * @type string $source Required path to the package source. Default empty.
375
- * @type string $destination Required path to a folder to install the package in.
376
- * Default empty.
377
- * @type bool $clear_destination Whether to delete any files already in the destination
378
- * folder. Default false.
379
- * @type bool $clear_working Whether to delete the files form the working directory
380
- * after copying to the destination. Default false.
381
- * @type bool $abort_if_destination_exists Whether to abort the installation if
382
- * the destination folder already exists. Default true.
383
- * @type array $hook_extra Extra arguments to pass to the filter hooks called by
384
- * WP_Upgrader::install_package(). Default empty array.
385
- * }
386
- *
387
- * @return array|WP_Error The result (also stored in `WP_Upgrader::$result`), or a WP_Error on failure.
388
- */
389
- public function install_package( $args = array() ) {
390
- global $wp_filesystem, $wp_theme_directories;
391
-
392
- $defaults = array(
393
- 'source' => '', // Please always pass this
394
- 'destination' => '', // and this
395
- 'clear_destination' => false,
396
- 'clear_working' => false,
397
- 'abort_if_destination_exists' => true,
398
- 'hook_extra' => array(),
399
- );
400
-
401
- $args = wp_parse_args( $args, $defaults );
402
-
403
- // These were previously extract()'d.
404
- $source = $args['source'];
405
- $destination = $args['destination'];
406
- $clear_destination = $args['clear_destination'];
407
-
408
- set_time_limit( 300 );
409
-
410
- if ( empty( $source ) || empty( $destination ) ) {
411
- return new WP_Error( 'bad_request', $this->strings['bad_request'] );
412
- }
413
-
414
- /**
415
- * Filters the install response before the installation has started.
416
- *
417
- * Returning a truthy value, or one that could be evaluated as a WP_Error
418
- * will effectively short-circuit the installation, returning that value
419
- * instead.
420
- *
421
- * @since 2.8.0
422
- *
423
- * @param bool|WP_Error $response Response.
424
- * @param array $hook_extra Extra arguments passed to hooked filters.
425
- */
426
- $res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
427
-
428
- if ( is_wp_error( $res ) ) {
429
- return $res;
430
- }
431
-
432
- //Retain the Original source and destinations
433
- $remote_source = $args['source'];
434
- $local_destination = $destination;
435
-
436
- $source_files = array_keys( $wp_filesystem->dirlist( $remote_source ) );
437
- $remote_destination = $wp_filesystem->find_folder( $local_destination );
438
-
439
- //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.
440
- if ( 1 === count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) { //Only one folder? Then we want its contents.
441
- $source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] );
442
- } elseif ( empty( $source_files ) ) {
443
- return new WP_Error( 'incompatible_archive_empty', $this->strings['incompatible_archive'], $this->strings['no_files'] ); // There are no files?
444
- } 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.
445
- $source = trailingslashit( $args['source'] );
446
- }
447
-
448
- /**
449
- * Filters the source file location for the upgrade package.
450
- *
451
- * @since 2.8.0
452
- * @since 4.4.0 The $hook_extra parameter became available.
453
- *
454
- * @param string $source File source location.
455
- * @param string $remote_source Remote file source location.
456
- * @param WP_Upgrader $this WP_Upgrader instance.
457
- * @param array $hook_extra Extra arguments passed to hooked filters.
458
- */
459
- $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
460
-
461
- if ( is_wp_error( $source ) ) {
462
- return $source;
463
- }
464
-
465
- // Has the source location changed? If so, we need a new source_files list.
466
- if ( $source !== $remote_source ) {
467
- $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
468
- }
469
-
470
- /*
471
- * Protection against deleting files in any important base directories.
472
- * Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the
473
- * destination directory (WP_PLUGIN_DIR / wp-content/themes) intending
474
- * to copy the directory into the directory, whilst they pass the source
475
- * as the actual files to copy.
476
- */
477
- $protected_directories = array( ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes' );
478
-
479
- if ( is_array( $wp_theme_directories ) ) {
480
- $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
481
- }
482
-
483
- if ( in_array( $destination, $protected_directories, true ) ) {
484
- $remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) );
485
- $destination = trailingslashit( $destination ) . trailingslashit( basename( $source ) );
486
- }
487
-
488
- if ( $clear_destination ) {
489
- // We're going to clear the destination if there's something there.
490
- //$this->skin->feedback( 'remove_old' );
491
-
492
- $removed = $this->clear_destination( $remote_destination );
493
-
494
- /**
495
- * Filters whether the upgrader cleared the destination.
496
- *
497
- * @since 2.8.0
498
- *
499
- * @param mixed $removed Whether the destination was cleared. true on success, WP_Error on failure
500
- * @param string $local_destination The local package destination.
501
- * @param string $remote_destination The remote package destination.
502
- * @param array $hook_extra Extra arguments passed to hooked filters.
503
- */
504
- $removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] );
505
-
506
- if ( is_wp_error( $removed ) ) {
507
- return $removed;
508
- }
509
- } elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists( $remote_destination ) ) {
510
- //If we're not clearing the destination folder and something exists there already, Bail.
511
- //But first check to see if there are actually any files in the folder.
512
- $_files = $wp_filesystem->dirlist( $remote_destination );
513
- if ( ! empty( $_files ) ) {
514
- $wp_filesystem->delete( $remote_source, true ); //Clear out the source files.
515
- return new WP_Error( 'folder_exists', $this->strings['folder_exists'], $remote_destination );
516
- }
517
- }
518
-
519
- //Create destination if needed
520
- if ( ! $wp_filesystem->exists( $remote_destination ) ) {
521
- if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) {
522
- return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination );
523
- }
524
- }
525
- // Copy new version of item into place.
526
- $result = copy_dir( $source, $remote_destination );
527
- if ( is_wp_error( $result ) ) {
528
- if ( $args['clear_working'] ) {
529
- $wp_filesystem->delete( $remote_source, true );
530
- }
531
- return $result;
532
- }
533
-
534
- //Clear the Working folder?
535
- if ( $args['clear_working'] ) {
536
- $wp_filesystem->delete( $remote_source, true );
537
- }
538
-
539
- $destination_name = basename( str_replace( $local_destination, '', $destination ) );
540
- if ( '.' === $destination_name ) {
541
- $destination_name = '';
542
- }
543
-
544
- $this->result = compact( 'source', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination' );
545
-
546
- /**
547
- * Filters the installation response after the installation has finished.
548
- *
549
- * @since 2.8.0
550
- *
551
- * @param bool $response Installation response.
552
- * @param array $hook_extra Extra arguments passed to hooked filters.
553
- * @param array $result Installation result data.
554
- */
555
- $res = apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result );
556
-
557
- if ( is_wp_error( $res ) ) {
558
- $this->result = $res;
559
- return $res;
560
- }
561
-
562
- //Bombard the calling function will all the info which we've just used.
563
- return $this->result;
564
- }
565
- }
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
+ }
196
+
197
+ $this->skin->after();
198
+
199
+ if ( ! $options['is_multi'] ) {
200
+
201
+ /**
202
+ * Fires when the upgrader process is complete.
203
+ *
204
+ * See also {@see 'upgrader_package_options'}.
205
+ *
206
+ * @since 3.6.0
207
+ * @since 3.7.0 Added to WP_Upgrader::run().
208
+ * @since 4.6.0 `$translations` was added as a possible argument to `$hook_extra`.
209
+ *
210
+ * @param WP_Upgrader $this WP_Upgrader instance. In other contexts, $this, might be a
211
+ * Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
212
+ * @param array $hook_extra {
213
+ * Array of bulk item update data.
214
+ *
215
+ * @type string $action Type of action. Default 'update'.
216
+ * @type string $type Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'.
217
+ * @type bool $bulk Whether the update process is a bulk update. Default true.
218
+ * @type array $plugins Array of the basename paths of the plugins' main files.
219
+ * @type array $themes The theme slugs.
220
+ * @type array $translations {
221
+ * Array of translations update data.
222
+ *
223
+ * @type string $language The locale the translation is for.
224
+ * @type string $type Type of translation. Accepts 'plugin', 'theme', or 'core'.
225
+ * @type string $slug Text domain the translation is for. The slug of a theme/plugin or
226
+ * 'default' for core translations.
227
+ * @type string $version The version of a theme, plugin, or core.
228
+ * }
229
+ * }
230
+ */
231
+ do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
232
+
233
+ $this->skin->footer();
234
+ }
235
+
236
+ return $result;
237
+ }
238
+
239
+ /**
240
+ * Toggle maintenance mode for the site.
241
+ *
242
+ * Create/delete the maintenance file to enable/disable maintenance mode.
243
+ *
244
+ * @since 2.8.0
245
+ *
246
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
247
+ *
248
+ * @param bool $enable True to enable maintenance mode, false to disable.
249
+ */
250
+ public function maintenance_mode( $enable = false ) {
251
+ global $wp_filesystem;
252
+ $file = $wp_filesystem->abspath() . '.maintenance';
253
+ if ( $enable ) {
254
+ // Create maintenance file to signal that we are upgrading
255
+ $maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
256
+ $wp_filesystem->delete( $file );
257
+ $wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE );
258
+ } elseif ( $wp_filesystem->exists( $file ) ) {
259
+ $wp_filesystem->delete( $file );
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Download a package.
265
+ *
266
+ * @since 2.8.0
267
+ *
268
+ * @param string $package The URI of the package. If this is the full path to an
269
+ * existing local file, it will be returned untouched.
270
+ * @param bool $check_signatures Whether to validate file signatures. Default false.
271
+ * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object.
272
+ */
273
+ public function download_package( $package, $check_signatures = false, $hook_extra = array() ) {
274
+
275
+ /**
276
+ * Filters whether to return the package.
277
+ *
278
+ * @since 3.7.0
279
+ *
280
+ * @param bool $reply Whether to bail without returning the package.
281
+ * Default false.
282
+ * @param string $package The package file name.
283
+ * @param WP_Upgrader $this The WP_Upgrader instance.
284
+ */
285
+ $reply = apply_filters( 'upgrader_pre_download', false, $package, $this );
286
+ if ( false !== $reply ) {
287
+ return $reply;
288
+ }
289
+
290
+ if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { //Local file or remote?
291
+ return $package; //must be a local file..
292
+ }
293
+
294
+ if ( empty( $package ) ) {
295
+ return new WP_Error( 'no_package', $this->strings['no_package'] );
296
+ }
297
+
298
+ $download_file = download_url( $package, 300, $check_signatures );
299
+
300
+ if ( is_wp_error( $download_file ) && ! $download_file->get_error_data( 'softfail-filename' ) ) {
301
+ return new WP_Error( 'download_failed', $this->strings['download_failed'], $download_file->get_error_message() );
302
+ }
303
+
304
+ return $download_file;
305
+ }
306
+
307
+ /**
308
+ * Unpack a compressed package file.
309
+ *
310
+ * @since 2.8.0
311
+ *
312
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
313
+ *
314
+ * @param string $package Full path to the package file.
315
+ * @param bool $delete_package Optional. Whether to delete the package file after attempting
316
+ * to unpack it. Default true.
317
+ * @return string|WP_Error The path to the unpacked contents, or a WP_Error on failure.
318
+ */
319
+ public function unpack_package( $package, $delete_package = true ) {
320
+ global $wp_filesystem;
321
+
322
+ $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/';
323
+
324
+ //Clean up contents of upgrade directory beforehand.
325
+ $upgrade_files = $wp_filesystem->dirlist( $upgrade_folder );
326
+ if ( ! empty( $upgrade_files ) ) {
327
+ foreach ( $upgrade_files as $file ) {
328
+ $wp_filesystem->delete( $upgrade_folder . $file['name'], true );
329
+ }
330
+ }
331
+
332
+ // We need a working directory - Strip off any .tmp or .zip suffixes
333
+ $working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
334
+
335
+ // Clean up working directory
336
+ if ( $wp_filesystem->is_dir( $working_dir ) ) {
337
+ $wp_filesystem->delete( $working_dir, true );
338
+ }
339
+
340
+ // Unzip package to working directory
341
+ $result = unzip_file( $package, $working_dir );
342
+
343
+ // Once extracted, delete the package if required.
344
+ if ( $delete_package ) {
345
+ unlink( $package );
346
+ }
347
+
348
+ if ( is_wp_error( $result ) ) {
349
+ $wp_filesystem->delete( $working_dir, true );
350
+ if ( 'incompatible_archive' === $result->get_error_code() ) {
351
+ return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $result->get_error_data() );
352
+ }
353
+ return $result;
354
+ }
355
+
356
+ return $working_dir;
357
+ }
358
+
359
+ /**
360
+ * Install a package.
361
+ *
362
+ * Copies the contents of a package form a source directory, and installs them in
363
+ * a destination directory. Optionally removes the source. It can also optionally
364
+ * clear out the destination folder if it already exists.
365
+ *
366
+ * @since 2.8.0
367
+ *
368
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
369
+ * @global array $wp_theme_directories
370
+ *
371
+ * @param array|string $args {
372
+ * Optional. Array or string of arguments for installing a package. Default empty array.
373
+ *
374
+ * @type string $source Required path to the package source. Default empty.
375
+ * @type string $destination Required path to a folder to install the package in.
376
+ * Default empty.
377
+ * @type bool $clear_destination Whether to delete any files already in the destination
378
+ * folder. Default false.
379
+ * @type bool $clear_working Whether to delete the files form the working directory
380
+ * after copying to the destination. Default false.
381
+ * @type bool $abort_if_destination_exists Whether to abort the installation if
382
+ * the destination folder already exists. Default true.
383
+ * @type array $hook_extra Extra arguments to pass to the filter hooks called by
384
+ * WP_Upgrader::install_package(). Default empty array.
385
+ * }
386
+ *
387
+ * @return array|WP_Error The result (also stored in `WP_Upgrader::$result`), or a WP_Error on failure.
388
+ */
389
+ public function install_package( $args = array() ) {
390
+ global $wp_filesystem, $wp_theme_directories;
391
+
392
+ $defaults = array(
393
+ 'source' => '', // Please always pass this
394
+ 'destination' => '', // and this
395
+ 'clear_destination' => false,
396
+ 'clear_working' => false,
397
+ 'abort_if_destination_exists' => true,
398
+ 'hook_extra' => array(),
399
+ );
400
+
401
+ $args = wp_parse_args( $args, $defaults );
402
+
403
+ // These were previously extract()'d.
404
+ $source = $args['source'];
405
+ $destination = $args['destination'];
406
+ $clear_destination = $args['clear_destination'];
407
+
408
+ set_time_limit( 300 );
409
+
410
+ if ( empty( $source ) || empty( $destination ) ) {
411
+ return new WP_Error( 'bad_request', $this->strings['bad_request'] );
412
+ }
413
+
414
+ /**
415
+ * Filters the install response before the installation has started.
416
+ *
417
+ * Returning a truthy value, or one that could be evaluated as a WP_Error
418
+ * will effectively short-circuit the installation, returning that value
419
+ * instead.
420
+ *
421
+ * @since 2.8.0
422
+ *
423
+ * @param bool|WP_Error $response Response.
424
+ * @param array $hook_extra Extra arguments passed to hooked filters.
425
+ */
426
+ $res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
427
+
428
+ if ( is_wp_error( $res ) ) {
429
+ return $res;
430
+ }
431
+
432
+ //Retain the Original source and destinations
433
+ $remote_source = $args['source'];
434
+ $local_destination = $destination;
435
+
436
+ $source_files = array_keys( $wp_filesystem->dirlist( $remote_source ) );
437
+ $remote_destination = $wp_filesystem->find_folder( $local_destination );
438
+
439
+ //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.
440
+ if ( 1 === count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) { //Only one folder? Then we want its contents.
441
+ $source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] );
442
+ } elseif ( empty( $source_files ) ) {
443
+ return new WP_Error( 'incompatible_archive_empty', $this->strings['incompatible_archive'], $this->strings['no_files'] ); // There are no files?
444
+ } 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.
445
+ $source = trailingslashit( $args['source'] );
446
+ }
447
+
448
+ /**
449
+ * Filters the source file location for the upgrade package.
450
+ *
451
+ * @since 2.8.0
452
+ * @since 4.4.0 The $hook_extra parameter became available.
453
+ *
454
+ * @param string $source File source location.
455
+ * @param string $remote_source Remote file source location.
456
+ * @param WP_Upgrader $this WP_Upgrader instance.
457
+ * @param array $hook_extra Extra arguments passed to hooked filters.
458
+ */
459
+ $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
460
+
461
+ if ( is_wp_error( $source ) ) {
462
+ return $source;
463
+ }
464
+
465
+ // Has the source location changed? If so, we need a new source_files list.
466
+ if ( $source !== $remote_source ) {
467
+ $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
468
+ }
469
+
470
+ /*
471
+ * Protection against deleting files in any important base directories.
472
+ * Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the
473
+ * destination directory (WP_PLUGIN_DIR / wp-content/themes) intending
474
+ * to copy the directory into the directory, whilst they pass the source
475
+ * as the actual files to copy.
476
+ */
477
+ $protected_directories = array( ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes' );
478
+
479
+ if ( is_array( $wp_theme_directories ) ) {
480
+ $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
481
+ }
482
+
483
+ if ( in_array( $destination, $protected_directories, true ) ) {
484
+ $remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) );
485
+ $destination = trailingslashit( $destination ) . trailingslashit( basename( $source ) );
486
+ }
487
+
488
+ if ( $clear_destination ) {
489
+ // We're going to clear the destination if there's something there.
490
+ //$this->skin->feedback( 'remove_old' );
491
+
492
+ $removed = $this->clear_destination( $remote_destination );
493
+
494
+ /**
495
+ * Filters whether the upgrader cleared the destination.
496
+ *
497
+ * @since 2.8.0
498
+ *
499
+ * @param mixed $removed Whether the destination was cleared. true on success, WP_Error on failure
500
+ * @param string $local_destination The local package destination.
501
+ * @param string $remote_destination The remote package destination.
502
+ * @param array $hook_extra Extra arguments passed to hooked filters.
503
+ */
504
+ $removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] );
505
+
506
+ if ( is_wp_error( $removed ) ) {
507
+ return $removed;
508
+ }
509
+ } elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists( $remote_destination ) ) {
510
+ //If we're not clearing the destination folder and something exists there already, Bail.
511
+ //But first check to see if there are actually any files in the folder.
512
+ $_files = $wp_filesystem->dirlist( $remote_destination );
513
+ if ( ! empty( $_files ) ) {
514
+ $wp_filesystem->delete( $remote_source, true ); //Clear out the source files.
515
+ return new WP_Error( 'folder_exists', $this->strings['folder_exists'], $remote_destination );
516
+ }
517
+ }
518
+
519
+ //Create destination if needed
520
+ if ( ! $wp_filesystem->exists( $remote_destination ) ) {
521
+ if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) {
522
+ return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination );
523
+ }
524
+ }
525
+ // Copy new version of item into place.
526
+ $result = copy_dir( $source, $remote_destination );
527
+ if ( is_wp_error( $result ) ) {
528
+ if ( $args['clear_working'] ) {
529
+ $wp_filesystem->delete( $remote_source, true );
530
+ }
531
+ return $result;
532
+ }
533
+
534
+ //Clear the Working folder?
535
+ if ( $args['clear_working'] ) {
536
+ $wp_filesystem->delete( $remote_source, true );
537
+ }
538
+
539
+ $destination_name = basename( str_replace( $local_destination, '', $destination ) );
540
+ if ( '.' === $destination_name ) {
541
+ $destination_name = '';
542
+ }
543
+
544
+ $this->result = compact( 'source', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination' );
545
+
546
+ /**
547
+ * Filters the installation response after the installation has finished.
548
+ *
549
+ * @since 2.8.0
550
+ *
551
+ * @param bool $response Installation response.
552
+ * @param array $hook_extra Extra arguments passed to hooked filters.
553
+ * @param array $result Installation result data.
554
+ */
555
+ $res = apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result );
556
+
557
+ if ( is_wp_error( $res ) ) {
558
+ $this->result = $res;
559
+ return $res;
560
+ }
561
+
562
+ //Bombard the calling function will all the info which we've just used.
563
+ return $this->result;
564
+ }
565
+ }
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,1145 +1,1145 @@
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' ) ) {
14
- die( '-1' );
15
- }
16
-
17
- function sb_instagram_admin_style() {
18
- wp_register_style( 'sb_instagram_admin_css', SBI_PLUGIN_URL . 'css/sb-instagram-admin.css', array(), SBIVER );
19
- wp_enqueue_style( 'sb_instagram_font_awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );
20
- wp_enqueue_style( 'sb_instagram_admin_css' );
21
- wp_enqueue_style( 'wp-color-picker' );
22
- }
23
- add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_style' );
24
-
25
- function sb_instagram_admin_scripts() {
26
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
27
- return;
28
- }
29
- wp_enqueue_script( 'sb_instagram_admin_js', SBI_PLUGIN_URL . 'js/sb-instagram-admin-2-2.js', array(), SBIVER, true );
30
- wp_localize_script(
31
- 'sb_instagram_admin_js',
32
- 'sbiA',
33
- array(
34
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
35
- 'sbi_nonce' => wp_create_nonce( 'sbi_nonce' ),
36
- )
37
- );
38
- $strings = array(
39
- 'addon_activate' => esc_html__( 'Activate', 'instagram-feed' ),
40
- 'addon_activated' => esc_html__( 'Activated', 'instagram-feed' ),
41
- 'addon_active' => esc_html__( 'Active', 'instagram-feed' ),
42
- 'addon_deactivate' => esc_html__( 'Deactivate', 'instagram-feed' ),
43
- 'addon_inactive' => esc_html__( 'Inactive', 'instagram-feed' ),
44
- 'addon_install' => esc_html__( 'Install Addon', 'instagram-feed' ),
45
- 'addon_error' => esc_html__( 'Could not install addon. Please download from wpforms.com and install manually.', 'instagram-feed' ),
46
- 'plugin_error' => esc_html__( 'Could not install a plugin. Please download from WordPress.org and install manually.', 'instagram-feed' ),
47
- 'addon_search' => esc_html__( 'Searching Addons', 'instagram-feed' ),
48
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
49
- 'cancel' => esc_html__( 'Cancel', 'instagram-feed' ),
50
- 'close' => esc_html__( 'Close', 'instagram-feed' ),
51
- 'nonce' => wp_create_nonce( 'sbi-admin' ),
52
- 'almost_done' => esc_html__( 'Almost Done', 'instagram-feed' ),
53
- 'oops' => esc_html__( 'Oops!', 'instagram-feed' ),
54
- 'ok' => esc_html__( 'OK', 'instagram-feed' ),
55
- 'plugin_install_activate_btn' => esc_html__( 'Install and Activate', 'instagram-feed' ),
56
- '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' ),
57
- 'plugin_activate_btn' => esc_html__( 'Activate', 'instagram-feed' ),
58
- );
59
- $strings = apply_filters( 'sbi_admin_strings', $strings );
60
-
61
- wp_localize_script(
62
- 'sb_instagram_admin_js',
63
- 'sbi_admin',
64
- $strings
65
- );
66
-
67
- wp_enqueue_script( 'jquery' );
68
- wp_enqueue_script( 'jquery-ui-core' );
69
- wp_enqueue_script( 'jquery-ui-draggable' );
70
- wp_enqueue_script( 'wp-color-picker' );
71
- }
72
- add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_scripts' );
73
-
74
- // Add a Settings link to the plugin on the Plugins page
75
- $sbi_plugin_file = 'instagram-feed/instagram-feed.php';
76
- add_filter( "plugin_action_links_$sbi_plugin_file", 'sbi_add_settings_link', 10, 2 );
77
-
78
- //modify the link by unshifting the array
79
- function sbi_add_settings_link( $links ) {
80
- $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>';
81
-
82
- $sbi_settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=sb-instagram-feed' ) ) . '">' . esc_html__( 'Settings', 'instagram-feed' ) . '</a>';
83
- array_unshift( $links, $pro_link, $sbi_settings_link );
84
-
85
- return $links;
86
- }
87
-
88
- /**
89
- * Called via ajax to automatically save access token and access token secret
90
- * retrieved with the big blue button
91
- */
92
- function sbi_auto_save_tokens() {
93
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
94
-
95
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
96
- wp_send_json_error();
97
- }
98
-
99
- $options = sbi_get_database_settings();
100
- $new_access_token = isset( $_POST['access_token'] ) ? sanitize_text_field( wp_unslash( $_POST['access_token'] ) ) : false;
101
- $split_token = $new_access_token ? explode( '.', $new_access_token ) : array();
102
- $new_user_id = isset( $split_token[0] ) ? $split_token[0] : '';
103
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
104
- $test_connection_data = sbi_account_data_for_token( $new_access_token );
105
-
106
- $connected_accounts[ $new_user_id ] = array(
107
- 'access_token' => sbi_get_parts( $new_access_token ),
108
- 'user_id' => $test_connection_data['id'],
109
- 'username' => $test_connection_data['username'],
110
- 'is_valid' => $test_connection_data['is_valid'],
111
- 'last_checked' => $test_connection_data['last_checked'],
112
- 'profile_picture' => $test_connection_data['profile_picture'],
113
- );
114
-
115
- if ( ! $options['sb_instagram_disable_resize'] ) {
116
- if ( sbi_create_local_avatar( $test_connection_data['username'], $test_connection_data['profile_picture'] ) ) {
117
- $connected_accounts[ $new_user_id ]['local_avatar'] = true;
118
- }
119
- } else {
120
- $connected_accounts[ $new_user_id ]['local_avatar'] = false;
121
- }
122
-
123
- $options['connected_accounts'] = $connected_accounts;
124
-
125
- update_option( 'sb_instagram_settings', $options );
126
-
127
- wp_send_json_success( $connected_accounts[ $new_user_id ] );
128
- }
129
- add_action( 'wp_ajax_sbi_auto_save_tokens', 'sbi_auto_save_tokens' );
130
-
131
- function sbi_delete_local_avatar( $username ) {
132
- $upload = wp_upload_dir();
133
-
134
- $image_files = glob( trailingslashit( $upload['basedir'] ) . trailingslashit( SBI_UPLOADS_NAME ) . $username . '.jpg' ); // get all matching images
135
- foreach ( $image_files as $file ) { // iterate files
136
- if ( is_file( $file ) ) {
137
- unlink( $file );
138
- }
139
- }
140
- }
141
-
142
- function sbi_connect_business_accounts() {
143
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
144
-
145
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
146
- wp_send_json_error();
147
- }
148
-
149
- $raw_accounts = ! empty( $_POST['accounts'] ) ? json_decode( wp_unslash( $_POST['accounts'] ), true ) : array();
150
- $raw_accounts = array_values( $raw_accounts );
151
- $access_token = ! empty( $raw_accounts[0] ) ? sbi_sanitize_alphanumeric_and_equals( $raw_accounts[0]['access_token'] ) : '';
152
- if ( empty( $access_token ) ) {
153
- wp_send_json_success( 'No access token' );
154
- }
155
-
156
- $ids_to_connect = array();
157
- foreach ( $raw_accounts as $raw_account ) {
158
- $ids_to_connect[] = sbi_sanitize_instagram_ids( $raw_account['id'] );
159
- }
160
-
161
- $api_accounts = sbi_get_business_pages_list( $access_token );
162
- if ( empty( $api_accounts ) || is_wp_error( $api_accounts ) ) {
163
- wp_send_json_success( 'Could not connect' );
164
- }
165
-
166
- $return = array();
167
- foreach ( $api_accounts->data as $page => $page_data ) {
168
- if ( isset( $page_data->instagram_business_account ) && in_array( $page_data->instagram_business_account->id, $ids_to_connect, true ) ) {
169
-
170
- $instagram_business_id = sbi_sanitize_instagram_ids( $page_data->instagram_business_account->id );
171
- $page_access_token = isset( $page_data->access_token ) ? sbi_sanitize_alphanumeric_and_equals( $page_data->access_token ) : '';
172
-
173
- //Make another request to get page info
174
- $instagram_account_url = 'https://graph.facebook.com/' . $instagram_business_id . '?fields=name,username,profile_picture_url&access_token=' . $access_token;
175
-
176
- $args = array(
177
- 'timeout' => 20,
178
- );
179
- if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
180
- $args['sslverify'] = false;
181
- }
182
- $result = wp_remote_get( $instagram_account_url, $args );
183
- $instagram_account_info = '{}';
184
- if ( ! is_wp_error( $result ) ) {
185
- $instagram_account_info = $result['body'];
186
- $instagram_account_data = json_decode( $instagram_account_info, true );
187
-
188
- $instagram_biz_img = ! empty( $instagram_account_data['profile_picture_url'] ) ? $instagram_account_data['profile_picture_url'] : false;
189
- $account = array(
190
- 'id' => $instagram_account_data['id'],
191
- 'name' => $instagram_account_data['name'],
192
- 'username' => $instagram_account_data['username'],
193
- 'profile_picture_url' => $instagram_biz_img,
194
- 'access_token' => $access_token,
195
- 'page_access_token' => $page_access_token,
196
- 'type' => 'business',
197
- );
198
-
199
- $connector = new SBI_Account_Connector();
200
-
201
- $connector->add_account_data( $account );
202
- if ( $connector->update_stored_account() ) {
203
- $connector->after_update();
204
-
205
- $return[ $connector->get_id() ] = $connector->get_account_data();
206
- }
207
- }
208
- }
209
- }
210
-
211
- wp_send_json_success( $return );
212
- }
213
- add_action( 'wp_ajax_sbi_connect_business_accounts', 'sbi_connect_business_accounts' );
214
-
215
- function sbi_auto_save_id() {
216
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
217
-
218
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
219
- wp_send_json_error();
220
- }
221
-
222
- $options = get_option( 'sb_instagram_settings', array() );
223
-
224
- $options['sb_instagram_user_id'] = array( sanitize_text_field( wp_unslash( $_POST['id'] ) ) );
225
-
226
- update_option( 'sb_instagram_settings', $options );
227
-
228
- wp_send_json_success();
229
- }
230
- add_action( 'wp_ajax_sbi_auto_save_id', 'sbi_auto_save_id' );
231
-
232
- function sbi_formatted_error( $response ) {
233
- if ( isset( $response['error'] ) ) {
234
- $error = '<p>' . esc_html( sprintf( __( 'API error %s:', 'instagram-feed' ), $response['error']['code'] ) ) . ' ' . esc_html( $response['error']['message'] ) . '</p>';
235
- $error .= '<p class="sbi-error-directions"><a href="https://smashballoon.com/instagram-feed/docs/errors/" target="_blank" rel="noopener">' . esc_html__( 'Directions on how to resolve this issue', 'instagram-feed' ) . '</a></p>';
236
-
237
- return $error;
238
- } else {
239
- $message = '<p>' . esc_html( sprintf( __( 'Error connecting to %s.', 'instagram-feed' ), $response['url'] ) ) . '</p>';
240
- if ( isset( $response['response'] ) && isset( $response['response']->errors ) ) {
241
- foreach ( $response['response']->errors as $key => $item ) {
242
- '<p>' . $message .= ' ' . esc_html( $key ) . ' - ' . esc_html( $item[0] ) . '</p>';
243
- }
244
- }
245
- $message .= '<p class="sbi-error-directions"><a href="https://smashballoon.com/instagram-feed/docs/errors/" target="_blank" rel="noopener">' . esc_html__( 'Directions on how to resolve this issue', 'instagram-feed' ) . '</a></p>';
246
-
247
- return $message;
248
- }
249
- }
250
-
251
- function sbi_test_token() {
252
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
253
-
254
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
255
- wp_send_json_error();
256
- }
257
-
258
- $access_token = isset( $_POST['access_token'] ) ? trim( sanitize_text_field( wp_unslash( $_POST['access_token'] ) ) ) : false;
259
- $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( wp_unslash( $_POST['account_id'] ) ) : false;
260
- $return_json = sbi_connect_new_account( $access_token, $account_id );
261
-
262
- if ( strpos( $return_json, '{' ) === 0 ) {
263
- $return_arr = json_decode( $return_json );
264
- } else {
265
- $return_arr = array( 'error_message' => $return_json );
266
- }
267
-
268
- wp_send_json_success( $return_arr );
269
- }
270
- add_action( 'wp_ajax_sbi_test_token', 'sbi_test_token' );
271
-
272
- function sbi_delete_account() {
273
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
274
-
275
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
276
- wp_send_json_error();
277
- }
278
- $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( wp_unslash( $_POST['account_id'] ) ) : false;
279
- sbi_do_account_delete( $account_id );
280
-
281
- wp_send_json_success();
282
- }
283
- add_action( 'wp_ajax_sbi_delete_account', 'sbi_delete_account' );
284
-
285
- function sbi_account_data_for_token( $access_token ) {
286
- $return = array(
287
- 'id' => false,
288
- 'username' => false,
289
- 'is_valid' => false,
290
- 'last_checked' => time(),
291
- );
292
- $url = 'https://api.instagram.com/v1/users/self/?access_token=' . sbi_maybe_clean( $access_token );
293
- $args = array(
294
- 'timeout' => 20,
295
- );
296
- if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
297
- $args['sslverify'] = false;
298
- }
299
- $result = wp_remote_get( $url, $args );
300
-
301
- if ( ! is_wp_error( $result ) ) {
302
- $data = json_decode( $result['body'] );
303
- } else {
304
- $data = array();
305
- }
306
-
307
- if ( isset( $data->data->id ) ) {
308
- $return['id'] = $data->data->id;
309
- $return['username'] = $data->data->username;
310
- $return['is_valid'] = true;
311
- $return['profile_picture'] = $data->data->profile_picture;
312
-
313
- } elseif ( isset( $data->error_type ) && $data->error_type === 'OAuthRateLimitException' ) {
314
- $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.';
315
- } else {
316
- $return = false;
317
- }
318
-
319
- $sbi_options = get_option( 'sb_instagram_settings', array() );
320
- $sbi_options['sb_instagram_at'] = '';
321
- update_option( 'sb_instagram_settings', $sbi_options );
322
-
323
- return $return;
324
- }
325
-
326
- function sbi_do_account_delete( $account_id ) {
327
- $options = get_option( 'sb_instagram_settings', array() );
328
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
329
- global $sb_instagram_posts_manager;
330
- $sb_instagram_posts_manager->reset_api_errors();
331
-
332
- $username = $connected_accounts[ $account_id ]['username'];
333
- $sb_instagram_posts_manager->add_action_log( 'Deleting account ' . $username );
334
-
335
- $num_times_used = 0;
336
-
337
- $new_con_accounts = array();
338
- foreach ( $connected_accounts as $connected_account ) {
339
-
340
- if ( $connected_account['username'] === $username ) {
341
- $num_times_used++;
342
- }
343
-
344
- if ( $connected_account['username'] !== '' && $account_id !== $connected_account['user_id'] && ! empty( $connected_account['user_id'] ) ) {
345
- $new_con_accounts[ $connected_account['user_id'] ] = $connected_account;
346
- }
347
- }
348
-
349
- if ( $num_times_used < 2 ) {
350
- sbi_delete_local_avatar( $username );
351
- }
352
-
353
- $options['connected_accounts'] = $new_con_accounts;
354
-
355
- update_option( 'sb_instagram_settings', $options );
356
- }
357
-
358
- function sbi_delete_platform_data_listener() {
359
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
360
-
361
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
362
- wp_send_json_error();
363
- }
364
- sbi_delete_all_platform_data();
365
-
366
- wp_send_json_success();
367
- }
368
- add_action( 'wp_ajax_sbi_delete_platform_data', 'sbi_delete_platform_data_listener' );
369
-
370
- function sbi_connect_new_account( $access_token, $account_id ) {
371
- $split_id = explode( ' ', trim( $account_id ) );
372
- $account_id = preg_replace( '/[^A-Za-z0-9 ]/', '', $split_id[0] );
373
- if ( ! empty( $account_id ) ) {
374
- $split_token = explode( ' ', trim( $access_token ) );
375
- $access_token = preg_replace( '/[^A-Za-z0-9 ]/', '', $split_token[0] );
376
- }
377
-
378
- $account = array(
379
- 'access_token' => $access_token,
380
- 'user_id' => $account_id,
381
- 'type' => 'business',
382
- );
383
-
384
- if ( sbi_code_check( $access_token ) ) {
385
- $account['type'] = 'basic';
386
- }
387
-
388
- $connector = new SBI_Account_Connector();
389
-
390
- $response = $connector->fetch( $account );
391
-
392
- if ( isset( $response['access_token'] ) ) {
393
- $connector->add_account_data( $response );
394
- $connector->update_stored_account();
395
- $connector->after_update();
396
- return sbi_json_encode( $connector->get_account_data() );
397
- } else {
398
- return $response['error'];
399
- }
400
- }
401
-
402
- function sbi_no_js_connected_account_management() {
403
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
404
- return;
405
- }
406
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
407
- $nonce = isset( $_POST['sb_instagram_settings_nonce'] ) ? $_POST['sb_instagram_settings_nonce'] : false;
408
- if ( ! wp_verify_nonce( $nonce, 'sb_instagram_saving_settings' ) ) {
409
- return;
410
- }
411
- if ( isset( $_POST['sb_manual_at'] ) ) {
412
- $access_token = isset( $_POST['sb_manual_at'] ) ? sbi_sanitize_alphanumeric_and_equals( $_POST['sb_manual_at'] ) : false;
413
- $account_id = isset( $_POST['sb_manual_account_id'] ) ? sbi_sanitize_instagram_ids( $_POST['sb_manual_account_id'] ) : false;
414
- if ( ! $access_token || ! $account_id ) {
415
- return;
416
- }
417
- sbi_connect_new_account( $access_token, $account_id );
418
- } elseif ( isset( $_GET['disconnect'] ) && isset( $_GET['page'] ) && 'sb-instagram-feed' === $_GET['page'] ) {
419
- $account_id = sbi_sanitize_instagram_ids( $_GET['disconnect'] );
420
- sbi_do_account_delete( $account_id );
421
- }
422
-
423
- }
424
- add_action( 'admin_init', 'sbi_no_js_connected_account_management' );
425
-
426
- add_action( 'admin_notices', 'sbi_admin_ssl_notice' );
427
- function sbi_admin_ssl_notice() {
428
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
429
- return;
430
- }
431
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
432
- if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' ), true ) ) {
433
- global $current_user;
434
- $user_id = $current_user->ID;
435
- $was_dismissed = get_user_meta( $user_id, 'sbi_ignore_openssl', true );
436
-
437
- if ( ! $was_dismissed && ! sbi_doing_openssl() ) : ?>
438
- <div class="notice notice-warning is-dismissible sbi-admin-notice">
439
- <p><?php echo wp_kses_post( sprintf( __( 'Instagram Feed recommends Open SSL for encrypting Instagram platform data in your database. Contact your host or follow %1$sthese%2$s directions.', 'instagram-feed' ), '<a href="https://www.php.net/manual/en/openssl.installation.php" target="_blank">', '</a>' ) ); ?> <a href="<?php echo esc_url( admin_url( 'admin.php?page=sb-instagram-feed&openssldismiss=1' ) ); ?>"><?php esc_html_e( 'Dismiss', 'instagram-feed' ); ?></a></p>
440
- </div>
441
- <?php
442
- endif;
443
- }
444
-
445
- }
446
-
447
- add_action( 'admin_init', 'sbi_check_notice_dismiss' );
448
- function sbi_check_notice_dismiss() {
449
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
450
- return;
451
- }
452
- global $current_user;
453
- $user_id = $current_user->ID;
454
-
455
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
456
- if ( isset( $_GET['openssldismiss'] ) ) {
457
- add_user_meta( $user_id, 'sbi_ignore_openssl', 'true', true );
458
- }
459
- }
460
-
461
- /**
462
- * @return array
463
- * @deprecated
464
- */
465
- function sbi_get_connected_accounts_data() {
466
- $sbi_options = get_option( 'sb_instagram_settings', array() );
467
-
468
- return ! empty( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
469
- }
470
-
471
- function sbi_connect_basic_account( $new_account_details ) {
472
- $options = sbi_get_database_settings();
473
- $connected_accounts = ! empty( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
474
-
475
- $accounts_to_save = array();
476
- $old_account_user_id = '';
477
- $ids_to_save = array();
478
- $user_ids = is_array( $options['sb_instagram_user_id'] ) ? $options['sb_instagram_user_id'] : explode( ',', str_replace( ' ', '', $options['sb_instagram_user_id'] ) );
479
-
480
- $profile_picture = '';
481
-
482
- // do not connect as a basic display account if already connected as a business account
483
- if ( isset( $connected_accounts[ $new_account_details['user_id'] ]['type'] ) && 'business' === $connected_accounts[ $new_account_details['user_id'] ]['type'] ) {
484
- return $options;
485
- }
486
-
487
- foreach ( $connected_accounts as $account ) {
488
- $account_type = ! empty( $account['type'] ) ? $account['type'] : 'personal';
489
- if ( ( $account['username'] !== $new_account_details['username'] ) || 'business' === $account_type ) {
490
- $accounts_to_save[ $account['user_id'] ] = $account;
491
- } else {
492
- $old_account_user_id = $account['user_id'];
493
- $profile_picture = ! empty( $account['profile_picture'] ) ? $account['profile_picture'] : '';
494
- }
495
- }
496
-
497
- foreach ( $user_ids as $id ) {
498
- if ( $id === $old_account_user_id ) {
499
- $ids_to_save[] = $new_account_details['user_id'];
500
- } else {
501
- $ids_to_save[] = $id;
502
- }
503
- }
504
-
505
- $accounts_to_save[ $new_account_details['user_id'] ] = array(
506
- 'access_token' => sbi_fixer( $new_account_details['access_token'] ),
507
- 'user_id' => $new_account_details['user_id'],
508
- 'username' => $new_account_details['username'],
509
- 'is_valid' => true,
510
- 'last_checked' => time(),
511
- 'expires_timestamp' => $new_account_details['expires_timestamp'],
512
- 'profile_picture' => $profile_picture,
513
- 'account_type' => strtolower( $new_account_details['account_type'] ),
514
- 'type' => 'basic',
515
- );
516
-
517
- if ( ! empty( $old_account_user_id ) && $old_account_user_id !== $new_account_details['user_id'] ) {
518
- $accounts_to_save[ $new_account_details['user_id'] ]['old_user_id'] = $old_account_user_id;
519
-
520
- // get last saved header data
521
- $fuzzy_matches = sbi_fuzzy_matching_header_data( $old_account_user_id );
522
- if ( ! empty( $fuzzy_matches[0] ) ) {
523
- $header_data = sbi_find_matching_data_from_results( $fuzzy_matches, $old_account_user_id );
524
- $bio = SB_Instagram_Parse::get_bio( $header_data );
525
- $accounts_to_save[ $new_account_details['user_id'] ]['bio'] = sbi_sanitize_emoji( $bio );
526
- }
527
- }
528
-
529
- if ( ! empty( $profile_picture ) && ! $options['sb_instagram_disable_resize'] ) {
530
- if ( sbi_create_local_avatar( $new_account_details['username'], $profile_picture ) ) {
531
- $accounts_to_save[ $new_account_details['user_id'] ]['local_avatar'] = true;
532
- }
533
- } else {
534
- $accounts_to_save[ $new_account_details['user_id'] ]['local_avatar'] = false;
535
- }
536
-
537
- delete_transient( SBI_USE_BACKUP_PREFIX . 'sbi_' . $new_account_details['user_id'] );
538
- $refresher = new SB_Instagram_Token_Refresher( $accounts_to_save[ $new_account_details['user_id'] ] );
539
- $refresher->attempt_token_refresh();
540
-
541
- if ( (int) $refresher->get_last_error_code() === 10 ) {
542
- $accounts_to_save[ $new_account_details['user_id'] ]['private'] = true;
543
- }
544
-
545
- $accounts_to_save[ $new_account_details['user_id'] ] = SB_Instagram_Connected_Account::encrypt_connected_account_tokens( $accounts_to_save[ $new_account_details['user_id'] ] );
546
-
547
- $options['connected_accounts'] = $accounts_to_save;
548
- $options['sb_instagram_user_id'] = $ids_to_save;
549
-
550
- update_option( 'sb_instagram_settings', $options );
551
-
552
- return $options;
553
- }
554
-
555
- function sbi_fuzzy_matching_header_data( $user_id ) {
556
- if ( empty( $user_id ) || strlen( $user_id ) < 4 ) {
557
- return array();
558
- }
559
- global $wpdb;
560
-
561
- $values = $wpdb->get_results(
562
- $wpdb->prepare(
563
- "
564
- SELECT option_value
565
- FROM $wpdb->options
566
- WHERE option_name LIKE (%s)
567
- LIMIT 10",
568
- '%!sbi\_header\_' . $user_id . '%'
569
- ),
570
- ARRAY_A
571
- );
572
-
573
- return $values;
574
- }
575
-
576
- function sbi_find_matching_data_from_results( $results, $user_id ) {
577
-
578
- $match = array();
579
- $i = 0;
580
-
581
- while ( empty( $match ) && isset( $results[ $i ] ) ) {
582
- if ( ! empty( $results[ $i ] ) ) {
583
- $header_data = json_decode( $results[ $i ]['option_value'], true );
584
- if ( isset( $header_data['id'] ) && (string) $header_data['id'] === (string) $user_id ) {
585
- $match = $header_data;
586
- }
587
- }
588
- $i++;
589
- }
590
-
591
- return $match;
592
- }
593
-
594
- function sbi_matches_existing_personal( $new_account_details ) {
595
- $options = sbi_get_database_settings();
596
- $connected_accounts = ! empty( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
597
-
598
- $matches_one_account = false;
599
- foreach ( $connected_accounts as $account ) {
600
- $account_type = ! empty( $account['type'] ) ? $account['type'] : 'personal';
601
- if ( ( 'personal' === $account_type || 'basic' === $account_type ) && $account['username'] === $new_account_details['username'] ) {
602
- $matches_one_account = true;
603
- }
604
- }
605
-
606
- return $matches_one_account;
607
- }
608
-
609
- function sbi_business_account_request( $url, $account, $remove_access_token = true ) {
610
- $args = array(
611
- 'timeout' => 20,
612
- );
613
- if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
614
- $args['sslverify'] = false;
615
- }
616
- $result = wp_remote_get( $url, $args );
617
-
618
- if ( ! is_wp_error( $result ) ) {
619
- $response_no_at = $remove_access_token ? str_replace( sbi_maybe_clean( $account['access_token'] ), '{accesstoken}', $result['body'] ) : $result['body'];
620
- return $response_no_at;
621
- } else {
622
- return sbi_json_encode( $result );
623
- }
624
- }
625
-
626
- function sbi_after_connection() {
627
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
628
-
629
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
630
- wp_send_json_error();
631
- }
632
-
633
- if ( isset( $_POST['access_token'] ) ) {
634
- $access_token = sbi_sanitize_alphanumeric_and_equals( wp_unslash( $_POST['access_token'] ) );
635
- $account_info = sbi_account_data_for_token( $access_token );
636
-
637
- wp_send_json_success( $account_info );
638
- }
639
-
640
- wp_send_json_error();
641
- }
642
- add_action( 'wp_ajax_sbi_after_connection', 'sbi_after_connection' );
643
-
644
- function sbi_get_business_pages_list( $access_token ) {
645
- $url = 'https://graph.facebook.com/me/accounts?fields=instagram_business_account,access_token&limit=500&access_token=' . $access_token;
646
- $args = array(
647
- 'timeout' => 20,
648
- );
649
- if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
650
- $args['sslverify'] = false;
651
- }
652
- $result = wp_remote_get( $url, $args );
653
- if ( ! is_wp_error( $result ) ) {
654
- $pages_data = $result['body'];
655
- $return = json_decode( $pages_data );
656
-
657
- } else {
658
- $return = $result;
659
- }
660
-
661
- return $return;
662
- }
663
-
664
- function sbi_get_business_account_connection_modal( $sb_instagram_user_id ) {
665
- if ( ! isset( $_GET['sbi_con'] ) || ! wp_verify_nonce( $_GET['sbi_con'], 'sbi-connect' ) ) {
666
- return;
667
- }
668
-
669
- $access_token = ! empty( $_GET['sbi_access_token'] ) ? sbi_sanitize_alphanumeric_and_equals( sbi_maybe_clean( urldecode( ( $_GET['sbi_access_token'] ) ) ) ) : '';
670
- $api_response = sbi_get_business_pages_list( $access_token );
671
- $pages_data = array();
672
- if ( ! is_wp_error( $api_response ) ) {
673
- $pages_data = $api_response;
674
- } else {
675
- $page_error = $api_response;
676
- }
677
-
678
- $pages_data_arr = $pages_data;
679
- $num_accounts = 0;
680
- if ( isset( $pages_data_arr ) ) {
681
- $num_accounts = is_array( $pages_data_arr->data ) ? count( $pages_data_arr->data ) : 0;
682
- }
683
- ?>
684
- <div id="sbi_config_info" class="sb_list_businesses sbi_num_businesses_<?php echo esc_attr( $num_accounts ); ?>">
685
- <div class="sbi_config_modal">
686
- <div class="sbi-managed-pages">
687
- <?php
688
- if ( isset( $page_error ) && isset( $page_error->errors ) ) {
689
- foreach ( $page_error->errors as $key => $item ) {
690
- echo '<div class="sbi_user_id_error" style="display:block;"><strong>Connection Error: </strong>' . esc_html( $key ) . ': ' . esc_html( $item[0] ) . '</div>';
691
- }
692
- }
693
- ?>
694
- <?php if ( empty( $pages_data_arr->data ) ) : ?>
695
- <div id="sbi-bus-account-error">
696
- <p style="margin-top: 5px;"><strong style="font-size: 16px">Couldn't find Business Profile</strong><br />
697
- 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" rel="noopener noreferrer">Facebook account</a> in this browser which is associated with your Instagram Business Profile.</p>
698
- <p><strong style="font-size: 16px">Why do I need a Business Profile?</strong><br />
699
- 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>
700
- </div>
701
-
702
- <?php elseif ( empty( $num_accounts ) ) : ?>
703
- <div id="sbi-bus-account-error">
704
- <p style="margin-top: 5px;"><strong style="font-size: 16px">Couldn't find Business Profile</strong><br />
705
- 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" rel="noopener noreferrer">Facebook account</a> in this browser which is associated with your Instagram Business Profile.</p>
706
- <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>
707
- </div>
708
- <?php else : ?>
709
- <p class="sbi-managed-page-intro"><strong style="font-size: 16px;">Instagram Business profiles for this account</strong><br /><em style="color: #666;">Note: In order to display a Hashtag feed you first need to select a Business profile below.</em></p>
710
- <?php if ( $num_accounts > 1 ) : ?>
711
- <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>
712
- <?php endif; ?>
713
- <div class="sbi-scrollable-accounts">
714
-
715
- <?php foreach ( $pages_data_arr->data as $page => $page_data ) : ?>
716
-
717
- <?php
718
- if ( isset( $page_data->instagram_business_account ) ) :
719
-
720
- $instagram_business_id = sbi_sanitize_instagram_ids( $page_data->instagram_business_account->id );
721
-
722
- $page_access_token = isset( $page_data->access_token ) ? sbi_sanitize_alphanumeric_and_equals( $page_data->access_token ) : '';
723
-
724
- //Make another request to get page info
725
- $instagram_account_url = 'https://graph.facebook.com/' . $instagram_business_id . '?fields=name,username,profile_picture_url&access_token=' . $access_token;
726
-
727
- $args = array(
728
- 'timeout' => 20,
729
- );
730
- if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
731
- $args['sslverify'] = false;
732
- }
733
- $result = wp_remote_get( $instagram_account_url, $args );
734
- $instagram_account_info = '{}';
735
- if ( ! is_wp_error( $result ) ) {
736
- $instagram_account_info = $result['body'];
737
- } else {
738
- $page_error = $result;
739
- }
740
-
741
- $instagram_account_data = json_decode( $instagram_account_info );
742
-
743
- $instagram_biz_img = ! empty( $instagram_account_data->profile_picture_url ) ? $instagram_account_data->profile_picture_url : false;
744
- $selected_class = $instagram_business_id === $sb_instagram_user_id ? ' sbi-page-selected' : '';
745
-
746
- ?>
747
- <?php
748
- if ( isset( $page_error ) && isset( $page_error->errors ) ) :
749
- foreach ( $page_error->errors as $key => $item ) {
750
- echo '<div class="sbi_user_id_error" style="display:block;"><strong>Connection Error: </strong>' . esc_html( $key ) . ': ' . esc_html( $item[0] ) . '</div>';
751
- }
752
- else :
753
- ?>
754
- <div class="sbi-managed-page<?php echo esc_attr( $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 ); ?>">
755
- <div class="sbi-add-checkbox">
756
- <input id="sbi-<?php echo esc_attr( $instagram_business_id ); ?>" type="checkbox" name="sbi_managed_pages[]" value="<?php echo esc_attr( $instagram_account_info ); ?>">
757
- </div>
758
- <div class="sbi-managed-page-details">
759
- <label for="sbi-<?php echo esc_attr( $instagram_business_id ); ?>"><img class="sbi-page-avatar" height="50" width="50" src="<?php echo esc_url( $instagram_biz_img ); ?>" alt="<?php echo esc_attr( $instagram_business_id ); ?>"><strong style="font-size: 16px;"><?php echo esc_html( $instagram_account_data->name ); ?></strong>
760
- <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>
761
- </div>
762
- </div>
763
- <?php endif; ?>
764
-
765
- <?php endif; ?>
766
-
767
- <?php endforeach; ?>
768
-
769
- </div> <!-- end scrollable -->
770
- <p style="font-size: 11px; line-height: 1.5; margin-bottom: 0;"><em style="color: #666;">*<?php echo wp_kses_post( sprintf( __( 'Changing the password, updating privacy settings, or removing page admins for the related Facebook page may require %1$smanually reauthorizing our app%2$s to reconnect an account.', 'instagram-feed' ), '<a href="https://smashballoon.com/reauthorizing-our-instagram-facebook-app/" target="_blank" rel="noopener noreferrer">', '</a>' ) ); ?></em></p>
771
-
772
- <button id="sbi-connect-business-accounts" class="button button-primary" disabled="disabled" style="margin-top: 20px;"><?php esc_html_e( 'Connect Accounts', 'instagram-feed' ); ?></button>
773
-
774
- <?php endif; ?>
775
-
776
- <a href="JavaScript:void(0);" class="sbi_modal_close"><i class="fa fa-times"></i></a>
777
- </div>
778
- </div>
779
- </div>
780
- <?php
781
- }
782
-
783
- function sbi_get_personal_connection_modal( $connected_accounts, $action_url = 'admin.php?page=sb-instagram-feed' ) {
784
- if ( ! isset( $_GET['sbi_con'] ) || ! wp_verify_nonce( $_GET['sbi_con'], 'sbi-connect' ) ) {
785
- return;
786
- }
787
- $access_token = ! empty( $_GET['sbi_access_token'] ) ? sbi_sanitize_alphanumeric_and_equals( sbi_maybe_clean( urldecode( ( $_GET['sbi_access_token'] ) ) ) ) : '';
788
- $account_type = ! empty( $_GET['sbi_account_type'] ) ? sbi_sanitize_alphanumeric_and_equals( wp_unslash( $_GET['sbi_account_type'] ) ) : '';
789
- $user_id = ! empty( $_GET['sbi_id'] ) ? sbi_sanitize_alphanumeric_and_equals( wp_unslash( $_GET['sbi_id'] ) ) : '';
790
- $user_name = ! empty( $_GET['sbi_username'] ) ? sbi_sanitize_username( wp_unslash( $_GET['sbi_username'] ) ) : '';
791
- $expires_in = ! empty( $_GET['sbi_expires_in'] ) ? (int) $_GET['sbi_expires_in'] : '';
792
- $expires_timestamp = time() + $expires_in;
793
-
794
- $new_account_details = array(
795
- 'access_token' => $access_token,
796
- 'account_type' => $account_type,
797
- 'user_id' => $user_id,
798
- 'username' => $user_name,
799
- 'expires_timestamp' => $expires_timestamp,
800
- 'profile_picture' => '',
801
- 'type' => 'basic',
802
- );
803
-
804
- $matches_existing_personal = sbi_matches_existing_personal( $new_account_details );
805
- $button_text = $matches_existing_personal ? __( 'Update This Account', 'instagram-feed' ) : __( 'Connect This Account', 'instagram-feed' );
806
-
807
- $account_json = sbi_json_encode( $new_account_details );
808
-
809
- $already_connected_as_business_account = ! empty( $connected_accounts[ $user_id ] ) && 'business' === $connected_accounts[ $user_id ]['type'];
810
- ?>
811
-
812
- <div id="sbi_config_info" class="sb_get_token">
813
- <div class="sbi_config_modal">
814
- <div class="sbi_ca_username"><strong><?php echo esc_html( $user_name ); ?></strong></div>
815
- <form action="<?php echo esc_url( admin_url( $action_url ) ); ?>" method="post">
816
- <p class="sbi_submit">
817
- <?php
818
- if ( $already_connected_as_business_account ) :
819
- esc_html_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' );
820
- ?>
821
- <?php else : ?>
822
- <input type="submit" name="sbi_submit" id="sbi_connect_account" class="button button-primary" value="<?php echo esc_html( $button_text ); ?>">
823
- <?php endif; ?>
824
- <input type="hidden" name="sbi_account_json" value="<?php echo esc_attr( $account_json ); ?>">
825
- <input type="hidden" name="sbi_connect_username" value="<?php echo esc_attr( $user_name ); ?>">
826
- <a href="JavaScript:void(0);" class="button button-secondary" id="sbi_switch_accounts"><?php esc_html_e( 'Switch Accounts', 'instagram-feed' ); ?></a>
827
- </p>
828
- </form>
829
- <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
830
- </div>
831
- </div>
832
- <?php
833
- }
834
-
835
- function sbi_account_type_display( $type, $private = false ) {
836
- if ( 'basic' === $type ) {
837
- $type = 'personal';
838
- if ( $private ) {
839
- $type .= ' (private)';
840
- }
841
- }
842
- return $type;
843
- }
844
-
845
- function sbi_clear_backups() {
846
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
847
-
848
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
849
- wp_send_json_error();
850
- }
851
-
852
- //Delete all transients
853
- global $wpdb;
854
-
855
- $wpdb->query(
856
- "
857
- DELETE
858
- FROM $wpdb->options
859
- WHERE `option_name` LIKE ('%!sbi\_%')
860
- "
861
- );
862
- $wpdb->query(
863
- "
864
- DELETE
865
- FROM $wpdb->options
866
- WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
867
- "
868
- );
869
- $wpdb->query(
870
- "
871
- DELETE
872
- FROM $wpdb->options
873
- WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
874
- "
875
- );
876
-
877
- wp_send_json_success();
878
- }
879
- add_action( 'wp_ajax_sbi_clear_backups', 'sbi_clear_backups' );
880
-
881
- function sbi_reset_resized() {
882
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
883
-
884
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
885
- wp_send_json_error();
886
- }
887
-
888
- global $sb_instagram_posts_manager;
889
- $sb_instagram_posts_manager->delete_all_sbi_instagram_posts();
890
- delete_option( 'sbi_top_api_calls' );
891
-
892
- $sb_instagram_posts_manager->add_action_log( 'Reset resizing tables.' );
893
-
894
- wp_send_json_success( '1' );
895
- }
896
- add_action( 'wp_ajax_sbi_reset_resized', 'sbi_reset_resized' );
897
-
898
- function sbi_reset_log() {
899
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
900
-
901
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
902
- wp_send_json_error();
903
- }
904
-
905
- global $sb_instagram_posts_manager;
906
-
907
- $sb_instagram_posts_manager->remove_all_errors();
908
-
909
- wp_send_json_success( '1' );
910
- }
911
- add_action( 'wp_ajax_sbi_reset_log', 'sbi_reset_log' );
912
-
913
- function sbi_reset_api_errors() {
914
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
915
-
916
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
917
- wp_send_json_error();
918
- }
919
-
920
- global $sb_instagram_posts_manager;
921
- $sb_instagram_posts_manager->add_action_log( 'View feed and retry button clicked.' );
922
-
923
- $sb_instagram_posts_manager->reset_api_errors();
924
-
925
- wp_send_json_success( '1' );
926
- }
927
- add_action( 'wp_ajax_sbi_reset_api_errors', 'sbi_reset_api_errors' );
928
-
929
- function sbi_lite_dismiss() {
930
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
931
-
932
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
933
- wp_send_json_error();
934
- }
935
-
936
- set_transient( 'instagram_feed_dismiss_lite', 'dismiss', 1 * WEEK_IN_SECONDS );
937
-
938
- wp_send_json_success( '1' );
939
- }
940
- add_action( 'wp_ajax_sbi_lite_dismiss', 'sbi_lite_dismiss' );
941
-
942
- add_action( 'admin_notices', 'sbi_admin_error_notices' );
943
- function sbi_admin_error_notices() {
944
- if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
945
- return;
946
- }
947
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
948
- if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' ), true ) ) {
949
-
950
- global $sb_instagram_posts_manager;
951
-
952
- $errors = $sb_instagram_posts_manager->get_errors();
953
- if ( ! empty( $errors ) && ( ! empty( $errors['database_create'] ) || ! empty( $errors['upload_dir'] ) ) ) :
954
- ?>
955
- <div class="notice notice-warning is-dismissible sbi-admin-notice">
956
- <?php
957
- if ( ! empty( $errors['database_create'] ) ) {
958
- echo '<p>' . wp_kses_post( $errors['database_create'] ) . '</p>';
959
- }
960
- if ( ! empty( $errors['upload_dir'] ) ) {
961
- echo '<p>' . wp_kses_post( $errors['upload_dir'] ) . '</p>';
962
- }
963
- ?>
964
- <p><?php echo wp_kses_post( sprintf( __( 'Visit our %s page for help', 'instagram-feed' ), '<a href="https://smashballoon.com/instagram-feed/support/faq/" target="_blank">FAQ</a>' ) ); ?></p>
965
-
966
- </div>
967
-
968
- <?php
969
- endif;
970
- $errors = $sb_instagram_posts_manager->get_critical_errors();
971
- if ( $sb_instagram_posts_manager->are_critical_errors() && ! empty( $errors ) ) :
972
- ?>
973
- <div class="notice notice-warning is-dismissible sbi-admin-notice">
974
- <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>
975
-
976
- <?php echo wp_kses_post( $errors ); ?>
977
-
978
- <?php
979
- $error_page = $sb_instagram_posts_manager->get_error_page();
980
- if ( $error_page ) {
981
- echo '<a href="' . esc_url( get_the_permalink( $error_page ) ) . '" class="sbi-clear-errors-visit-page sbi-space-left button button-secondary">' . esc_html__( 'View Feed and Retry', 'instagram-feed' ) . '</a>';
982
- }
983
- if ( $sb_instagram_posts_manager->was_app_permission_related_error() ) :
984
- $accounts_revoked = $sb_instagram_posts_manager->get_app_permission_related_error_ids();
985
- if ( count( $accounts_revoked ) > 1 ) {
986
- $accounts_revoked = implode( ', ', $accounts_revoked );
987
- } else {
988
- $accounts_revoked = $accounts_revoked[0];
989
- }
990
- ?>
991
- <p class="sbi_notice"><?php echo esc_html( sprintf( __( 'Instagram Feed related data for the account(s) %s was removed due to permission for the Smash Balloon App on Facebook or Instagram being revoked.', 'instagram-feed' ), $accounts_revoked ) ); ?></p>
992
- <?php endif; ?>
993
- </div>
994
- <?php
995
- endif;
996
- }
997
-
998
- }
999
-
1000
- function sbi_admin_hide_unrelated_notices() {
1001
-
1002
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
1003
- if ( ! isset( $_GET['page'] ) || ( strpos( $_GET['page'], 'sb-instagram-feed' ) === false && strpos( $_GET['page'], 'sbi-' ) === false ) ) {
1004
- return;
1005
- }
1006
-
1007
- // Extra banned classes and callbacks from third-party plugins.
1008
- $blacklist = array(
1009
- 'classes' => array(),
1010
- 'callbacks' => array(
1011
- 'sbidb_admin_notice', // 'Database for sbi' plugin.
1012
- ),
1013
- );
1014
-
1015
- global $wp_filter;
1016
-
1017
- foreach ( array( 'user_admin_notices', 'admin_notices', 'all_admin_notices' ) as $notices_type ) {
1018
- if ( empty( $wp_filter[ $notices_type ]->callbacks ) || ! is_array( $wp_filter[ $notices_type ]->callbacks ) ) {
1019
- continue;
1020
- }
1021
- foreach ( $wp_filter[ $notices_type ]->callbacks as $priority => $hooks ) {
1022
- foreach ( $hooks as $name => $arr ) {
1023
- if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
1024
- unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
1025
- continue;
1026
- }
1027
- $class = ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) ? strtolower( get_class( $arr['function'][0] ) ) : '';
1028
- if (
1029
- ! empty( $class ) &&
1030
- strpos( $class, 'sbi' ) !== false &&
1031
- ! in_array( $class, $blacklist['classes'], true )
1032
- ) {
1033
- continue;
1034
- }
1035
- if (
1036
- ! empty( $name ) && (
1037
- strpos( $name, 'sbi' ) === false ||
1038
- in_array( $class, $blacklist['classes'], true ) ||
1039
- in_array( $name, $blacklist['callbacks'], true )
1040
- )
1041
- ) {
1042
- unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
1043
- }
1044
- }
1045
- }
1046
- }
1047
- }
1048
- add_action( 'admin_print_scripts', 'sbi_admin_hide_unrelated_notices' );
1049
-
1050
- /* Usage */
1051
- add_action( 'admin_notices', 'sbi_usage_opt_in' );
1052
- function sbi_usage_opt_in() {
1053
- $cap = current_user_can( 'manage_instagram_feed_options' ) ? 'manage_instagram_feed_options' : 'manage_options';
1054
-
1055
- $cap = apply_filters( 'sbi_settings_pages_capability', $cap );
1056
- if ( ! current_user_can( $cap ) ) {
1057
- return;
1058
- }
1059
-
1060
- if ( isset( $_GET['trackingdismiss'] ) ) {
1061
- if ( ! isset( $_GET['sbi_nonce'] ) || ! wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-trackingdismiss' ) ) {
1062
- return;
1063
- }
1064
- $usage_tracking = get_option(
1065
- 'sbi_usage_tracking',
1066
- array(
1067
- 'last_send' => 0,
1068
- 'enabled' => false,
1069
- )
1070
- );
1071
-
1072
- $usage_tracking['enabled'] = false;
1073
-
1074
- update_option( 'sbi_usage_tracking', $usage_tracking, false );
1075
-
1076
- return;
1077
- }
1078
-
1079
- $usage_tracking = sbi_get_option( 'sbi_usage_tracking', false );
1080
- if ( $usage_tracking ) {
1081
- return;
1082
- }
1083
- $dismiss_href = wp_nonce_url( admin_url( 'admin.php?page=sb-instagram-feed&trackingdismiss=1' ), 'sbi-trackingdismiss', 'sbi_nonce' );
1084
- ?>
1085
- <div class="notice notice-warning is-dismissible sbi-admin-notice">
1086
-
1087
- <p>
1088
- <strong><?php esc_html_e( 'Help us improve the Instagram Feed plugin', 'instagram-feed' ); ?></strong><br>
1089
- <?php esc_html_e( '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' ); ?>
1090
- <a target="_blank" rel="noopener noreferrer" href="https://smashballoon.com/instagram-feed/usage-tracking/"><?php esc_html_e( 'More information', 'instagram-feed' ); ?></a>
1091
- </p>
1092
- <p>
1093
- <a href="<?php echo esc_url( $dismiss_href ); ?>" class="button button-primary sb-opt-in"><?php esc_html_e( 'Yes, I\'d like to help', 'instagram-feed' ); ?></a>
1094
- <a href="<?php echo esc_url( $dismiss_href ); ?>" class="sb-no-usage-opt-out sbi-space-left button button-secondary"><?php esc_html_e( 'No, thanks', 'instagram-feed' ); ?></a>
1095
- </p>
1096
-
1097
- </div>
1098
-
1099
- <?php
1100
- }
1101
-
1102
- function sbi_usage_opt_in_or_out() {
1103
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
1104
-
1105
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
1106
- wp_send_json_error();
1107
- }
1108
-
1109
- $usage_tracking = sbi_get_option(
1110
- 'sbi_usage_tracking',
1111
- array(
1112
- 'last_send' => 0,
1113
- 'enabled' => false,
1114
- )
1115
- );
1116
-
1117
- $usage_tracking['enabled'] = ! empty( $_POST['opted_in'] ) && 'true' === $_POST['opted_in'];
1118
-
1119
- sbi_update_option( 'sbi_usage_tracking', $usage_tracking, false );
1120
-
1121
- wp_send_json_success( '1' );
1122
- }
1123
- add_action( 'wp_ajax_sbi_usage_opt_in_or_out', 'sbi_usage_opt_in_or_out' );
1124
-
1125
- function sbi_oembed_disable() {
1126
- check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
1127
-
1128
- if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
1129
- wp_send_json_error();
1130
- }
1131
-
1132
- $oembed_settings = get_option( 'sbi_oembed_token', array() );
1133
- $oembed_settings['access_token'] = '';
1134
- $oembed_settings['disabled'] = true;
1135
- echo '<strong>';
1136
- if ( update_option( 'sbi_oembed_token', $oembed_settings ) ) {
1137
- esc_html_e( 'Instagram oEmbeds will no longer be handled by Instagram Feed.', 'instagram-feed' );
1138
- } else {
1139
- esc_html_e( 'An error occurred when trying to delete your oEmbed token.', 'instagram-feed' );
1140
- }
1141
- echo '</strong>';
1142
-
1143
- die();
1144
- }
1145
- 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' ) ) {
14
+ die( '-1' );
15
+ }
16
+
17
+ function sb_instagram_admin_style() {
18
+ wp_register_style( 'sb_instagram_admin_css', SBI_PLUGIN_URL . 'css/sb-instagram-admin.css', array(), SBIVER );
19
+ wp_enqueue_style( 'sb_instagram_font_awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );
20
+ wp_enqueue_style( 'sb_instagram_admin_css' );
21
+ wp_enqueue_style( 'wp-color-picker' );
22
+ }
23
+ add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_style' );
24
+
25
+ function sb_instagram_admin_scripts() {
26
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
27
+ return;
28
+ }
29
+ wp_enqueue_script( 'sb_instagram_admin_js', SBI_PLUGIN_URL . 'js/sb-instagram-admin-2-2.js', array(), SBIVER, true );
30
+ wp_localize_script(
31
+ 'sb_instagram_admin_js',
32
+ 'sbiA',
33
+ array(
34
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
35
+ 'sbi_nonce' => wp_create_nonce( 'sbi_nonce' ),
36
+ )
37
+ );
38
+ $strings = array(
39
+ 'addon_activate' => esc_html__( 'Activate', 'instagram-feed' ),
40
+ 'addon_activated' => esc_html__( 'Activated', 'instagram-feed' ),
41
+ 'addon_active' => esc_html__( 'Active', 'instagram-feed' ),
42
+ 'addon_deactivate' => esc_html__( 'Deactivate', 'instagram-feed' ),
43
+ 'addon_inactive' => esc_html__( 'Inactive', 'instagram-feed' ),
44
+ 'addon_install' => esc_html__( 'Install Addon', 'instagram-feed' ),
45
+ 'addon_error' => esc_html__( 'Could not install addon. Please download from wpforms.com and install manually.', 'instagram-feed' ),
46
+ 'plugin_error' => esc_html__( 'Could not install a plugin. Please download from WordPress.org and install manually.', 'instagram-feed' ),
47
+ 'addon_search' => esc_html__( 'Searching Addons', 'instagram-feed' ),
48
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
49
+ 'cancel' => esc_html__( 'Cancel', 'instagram-feed' ),
50
+ 'close' => esc_html__( 'Close', 'instagram-feed' ),
51
+ 'nonce' => wp_create_nonce( 'sbi-admin' ),
52
+ 'almost_done' => esc_html__( 'Almost Done', 'instagram-feed' ),
53
+ 'oops' => esc_html__( 'Oops!', 'instagram-feed' ),
54
+ 'ok' => esc_html__( 'OK', 'instagram-feed' ),
55
+ 'plugin_install_activate_btn' => esc_html__( 'Install and Activate', 'instagram-feed' ),
56
+ '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' ),
57
+ 'plugin_activate_btn' => esc_html__( 'Activate', 'instagram-feed' ),
58
+ );
59
+ $strings = apply_filters( 'sbi_admin_strings', $strings );
60
+
61
+ wp_localize_script(
62
+ 'sb_instagram_admin_js',
63
+ 'sbi_admin',
64
+ $strings
65
+ );
66
+
67
+ wp_enqueue_script( 'jquery' );
68
+ wp_enqueue_script( 'jquery-ui-core' );
69
+ wp_enqueue_script( 'jquery-ui-draggable' );
70
+ wp_enqueue_script( 'wp-color-picker' );
71
+ }
72
+ add_action( 'admin_enqueue_scripts', 'sb_instagram_admin_scripts' );
73
+
74
+ // Add a Settings link to the plugin on the Plugins page
75
+ $sbi_plugin_file = 'instagram-feed/instagram-feed.php';
76
+ add_filter( "plugin_action_links_$sbi_plugin_file", 'sbi_add_settings_link', 10, 2 );
77
+
78
+ //modify the link by unshifting the array
79
+ function sbi_add_settings_link( $links ) {
80
+ $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>';
81
+
82
+ $sbi_settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=sb-instagram-feed' ) ) . '">' . esc_html__( 'Settings', 'instagram-feed' ) . '</a>';
83
+ array_unshift( $links, $pro_link, $sbi_settings_link );
84
+
85
+ return $links;
86
+ }
87
+
88
+ /**
89
+ * Called via ajax to automatically save access token and access token secret
90
+ * retrieved with the big blue button
91
+ */
92
+ function sbi_auto_save_tokens() {
93
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
94
+
95
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
96
+ wp_send_json_error();
97
+ }
98
+
99
+ $options = sbi_get_database_settings();
100
+ $new_access_token = isset( $_POST['access_token'] ) ? sanitize_text_field( wp_unslash( $_POST['access_token'] ) ) : false;
101
+ $split_token = $new_access_token ? explode( '.', $new_access_token ) : array();
102
+ $new_user_id = isset( $split_token[0] ) ? $split_token[0] : '';
103
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
104
+ $test_connection_data = sbi_account_data_for_token( $new_access_token );
105
+
106
+ $connected_accounts[ $new_user_id ] = array(
107
+ 'access_token' => sbi_get_parts( $new_access_token ),
108
+ 'user_id' => $test_connection_data['id'],
109
+ 'username' => $test_connection_data['username'],
110
+ 'is_valid' => $test_connection_data['is_valid'],
111
+ 'last_checked' => $test_connection_data['last_checked'],
112
+ 'profile_picture' => $test_connection_data['profile_picture'],
113
+ );
114
+
115
+ if ( ! $options['sb_instagram_disable_resize'] ) {
116
+ if ( sbi_create_local_avatar( $test_connection_data['username'], $test_connection_data['profile_picture'] ) ) {
117
+ $connected_accounts[ $new_user_id ]['local_avatar'] = true;
118
+ }
119
+ } else {
120
+ $connected_accounts[ $new_user_id ]['local_avatar'] = false;
121
+ }
122
+
123
+ $options['connected_accounts'] = $connected_accounts;
124
+
125
+ update_option( 'sb_instagram_settings', $options );
126
+
127
+ wp_send_json_success( $connected_accounts[ $new_user_id ] );
128
+ }
129
+ add_action( 'wp_ajax_sbi_auto_save_tokens', 'sbi_auto_save_tokens' );
130
+
131
+ function sbi_delete_local_avatar( $username ) {
132
+ $upload = wp_upload_dir();
133
+
134
+ $image_files = glob( trailingslashit( $upload['basedir'] ) . trailingslashit( SBI_UPLOADS_NAME ) . $username . '.jpg' ); // get all matching images
135
+ foreach ( $image_files as $file ) { // iterate files
136
+ if ( is_file( $file ) ) {
137
+ unlink( $file );
138
+ }
139
+ }
140
+ }
141
+
142
+ function sbi_connect_business_accounts() {
143
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
144
+
145
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
146
+ wp_send_json_error();
147
+ }
148
+
149
+ $raw_accounts = ! empty( $_POST['accounts'] ) ? json_decode( wp_unslash( $_POST['accounts'] ), true ) : array();
150
+ $raw_accounts = array_values( $raw_accounts );
151
+ $access_token = ! empty( $raw_accounts[0] ) ? sbi_sanitize_alphanumeric_and_equals( $raw_accounts[0]['access_token'] ) : '';
152
+ if ( empty( $access_token ) ) {
153
+ wp_send_json_success( 'No access token' );
154
+ }
155
+
156
+ $ids_to_connect = array();
157
+ foreach ( $raw_accounts as $raw_account ) {
158
+ $ids_to_connect[] = sbi_sanitize_instagram_ids( $raw_account['id'] );
159
+ }
160
+
161
+ $api_accounts = sbi_get_business_pages_list( $access_token );
162
+ if ( empty( $api_accounts ) || is_wp_error( $api_accounts ) ) {
163
+ wp_send_json_success( 'Could not connect' );
164
+ }
165
+
166
+ $return = array();
167
+ foreach ( $api_accounts->data as $page => $page_data ) {
168
+ if ( isset( $page_data->instagram_business_account ) && in_array( $page_data->instagram_business_account->id, $ids_to_connect, true ) ) {
169
+
170
+ $instagram_business_id = sbi_sanitize_instagram_ids( $page_data->instagram_business_account->id );
171
+ $page_access_token = isset( $page_data->access_token ) ? sbi_sanitize_alphanumeric_and_equals( $page_data->access_token ) : '';
172
+
173
+ //Make another request to get page info
174
+ $instagram_account_url = 'https://graph.facebook.com/' . $instagram_business_id . '?fields=name,username,profile_picture_url&access_token=' . $access_token;
175
+
176
+ $args = array(
177
+ 'timeout' => 20,
178
+ );
179
+ if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
180
+ $args['sslverify'] = false;
181
+ }
182
+ $result = wp_remote_get( $instagram_account_url, $args );
183
+ $instagram_account_info = '{}';
184
+ if ( ! is_wp_error( $result ) ) {
185
+ $instagram_account_info = $result['body'];
186
+ $instagram_account_data = json_decode( $instagram_account_info, true );
187
+
188
+ $instagram_biz_img = ! empty( $instagram_account_data['profile_picture_url'] ) ? $instagram_account_data['profile_picture_url'] : false;
189
+ $account = array(
190
+ 'id' => $instagram_account_data['id'],
191
+ 'name' => $instagram_account_data['name'],
192
+ 'username' => $instagram_account_data['username'],
193
+ 'profile_picture_url' => $instagram_biz_img,
194
+ 'access_token' => $access_token,
195
+ 'page_access_token' => $page_access_token,
196
+ 'type' => 'business',
197
+ );
198
+
199
+ $connector = new SBI_Account_Connector();
200
+
201
+ $connector->add_account_data( $account );
202
+ if ( $connector->update_stored_account() ) {
203
+ $connector->after_update();
204
+
205
+ $return[ $connector->get_id() ] = $connector->get_account_data();
206
+ }
207
+ }
208
+ }
209
+ }
210
+
211
+ wp_send_json_success( $return );
212
+ }
213
+ add_action( 'wp_ajax_sbi_connect_business_accounts', 'sbi_connect_business_accounts' );
214
+
215
+ function sbi_auto_save_id() {
216
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
217
+
218
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
219
+ wp_send_json_error();
220
+ }
221
+
222
+ $options = get_option( 'sb_instagram_settings', array() );
223
+
224
+ $options['sb_instagram_user_id'] = array( sanitize_text_field( wp_unslash( $_POST['id'] ) ) );
225
+
226
+ update_option( 'sb_instagram_settings', $options );
227
+
228
+ wp_send_json_success();
229
+ }
230
+ add_action( 'wp_ajax_sbi_auto_save_id', 'sbi_auto_save_id' );
231
+
232
+ function sbi_formatted_error( $response ) {
233
+ if ( isset( $response['error'] ) ) {
234
+ $error = '<p>' . esc_html( sprintf( __( 'API error %s:', 'instagram-feed' ), $response['error']['code'] ) ) . ' ' . esc_html( $response['error']['message'] ) . '</p>';
235
+ $error .= '<p class="sbi-error-directions"><a href="https://smashballoon.com/instagram-feed/docs/errors/" target="_blank" rel="noopener">' . esc_html__( 'Directions on how to resolve this issue', 'instagram-feed' ) . '</a></p>';
236
+
237
+ return $error;
238
+ } else {
239
+ $message = '<p>' . esc_html( sprintf( __( 'Error connecting to %s.', 'instagram-feed' ), $response['url'] ) ) . '</p>';
240
+ if ( isset( $response['response'] ) && isset( $response['response']->errors ) ) {
241
+ foreach ( $response['response']->errors as $key => $item ) {
242
+ '<p>' . $message .= ' ' . esc_html( $key ) . ' - ' . esc_html( $item[0] ) . '</p>';
243
+ }
244
+ }
245
+ $message .= '<p class="sbi-error-directions"><a href="https://smashballoon.com/instagram-feed/docs/errors/" target="_blank" rel="noopener">' . esc_html__( 'Directions on how to resolve this issue', 'instagram-feed' ) . '</a></p>';
246
+
247
+ return $message;
248
+ }
249
+ }
250
+
251
+ function sbi_test_token() {
252
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
253
+
254
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
255
+ wp_send_json_error();
256
+ }
257
+
258
+ $access_token = isset( $_POST['access_token'] ) ? trim( sanitize_text_field( wp_unslash( $_POST['access_token'] ) ) ) : false;
259
+ $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( wp_unslash( $_POST['account_id'] ) ) : false;
260
+ $return_json = sbi_connect_new_account( $access_token, $account_id );
261
+
262
+ if ( strpos( $return_json, '{' ) === 0 ) {
263
+ $return_arr = json_decode( $return_json );
264
+ } else {
265
+ $return_arr = array( 'error_message' => $return_json );
266
+ }
267
+
268
+ wp_send_json_success( $return_arr );
269
+ }
270
+ add_action( 'wp_ajax_sbi_test_token', 'sbi_test_token' );
271
+
272
+ function sbi_delete_account() {
273
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
274
+
275
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
276
+ wp_send_json_error();
277
+ }
278
+ $account_id = isset( $_POST['account_id'] ) ? sanitize_text_field( wp_unslash( $_POST['account_id'] ) ) : false;
279
+ sbi_do_account_delete( $account_id );
280
+
281
+ wp_send_json_success();
282
+ }
283
+ add_action( 'wp_ajax_sbi_delete_account', 'sbi_delete_account' );
284
+
285
+ function sbi_account_data_for_token( $access_token ) {
286
+ $return = array(
287
+ 'id' => false,
288
+ 'username' => false,
289
+ 'is_valid' => false,
290
+ 'last_checked' => time(),
291
+ );
292
+ $url = 'https://api.instagram.com/v1/users/self/?access_token=' . sbi_maybe_clean( $access_token );
293
+ $args = array(
294
+ 'timeout' => 20,
295
+ );
296
+ if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
297
+ $args['sslverify'] = false;
298
+ }
299
+ $result = wp_remote_get( $url, $args );
300
+
301
+ if ( ! is_wp_error( $result ) ) {
302
+ $data = json_decode( $result['body'] );
303
+ } else {
304
+ $data = array();
305
+ }
306
+
307
+ if ( isset( $data->data->id ) ) {
308
+ $return['id'] = $data->data->id;
309
+ $return['username'] = $data->data->username;
310
+ $return['is_valid'] = true;
311
+ $return['profile_picture'] = $data->data->profile_picture;
312
+
313
+ } elseif ( isset( $data->error_type ) && $data->error_type === 'OAuthRateLimitException' ) {
314
+ $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.';
315
+ } else {
316
+ $return = false;
317
+ }
318
+
319
+ $sbi_options = get_option( 'sb_instagram_settings', array() );
320
+ $sbi_options['sb_instagram_at'] = '';
321
+ update_option( 'sb_instagram_settings', $sbi_options );
322
+
323
+ return $return;
324
+ }
325
+
326
+ function sbi_do_account_delete( $account_id ) {
327
+ $options = get_option( 'sb_instagram_settings', array() );
328
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
329
+ global $sb_instagram_posts_manager;
330
+ $sb_instagram_posts_manager->reset_api_errors();
331
+
332
+ $username = $connected_accounts[ $account_id ]['username'];
333
+ $sb_instagram_posts_manager->add_action_log( 'Deleting account ' . $username );
334
+
335
+ $num_times_used = 0;
336
+
337
+ $new_con_accounts = array();
338
+ foreach ( $connected_accounts as $connected_account ) {
339
+
340
+ if ( $connected_account['username'] === $username ) {
341
+ $num_times_used++;
342
+ }
343
+
344
+ if ( $connected_account['username'] !== '' && $account_id !== $connected_account['user_id'] && ! empty( $connected_account['user_id'] ) ) {
345
+ $new_con_accounts[ $connected_account['user_id'] ] = $connected_account;
346
+ }
347
+ }
348
+
349
+ if ( $num_times_used < 2 ) {
350
+ sbi_delete_local_avatar( $username );
351
+ }
352
+
353
+ $options['connected_accounts'] = $new_con_accounts;
354
+
355
+ update_option( 'sb_instagram_settings', $options );
356
+ }
357
+
358
+ function sbi_delete_platform_data_listener() {
359
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
360
+
361
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
362
+ wp_send_json_error();
363
+ }
364
+ sbi_delete_all_platform_data();
365
+
366
+ wp_send_json_success();
367
+ }
368
+ add_action( 'wp_ajax_sbi_delete_platform_data', 'sbi_delete_platform_data_listener' );
369
+
370
+ function sbi_connect_new_account( $access_token, $account_id ) {
371
+ $split_id = explode( ' ', trim( $account_id ) );
372
+ $account_id = preg_replace( '/[^A-Za-z0-9 ]/', '', $split_id[0] );
373
+ if ( ! empty( $account_id ) ) {
374
+ $split_token = explode( ' ', trim( $access_token ) );
375
+ $access_token = preg_replace( '/[^A-Za-z0-9 ]/', '', $split_token[0] );
376
+ }
377
+
378
+ $account = array(
379
+ 'access_token' => $access_token,
380
+ 'user_id' => $account_id,
381
+ 'type' => 'business',
382
+ );
383
+
384
+ if ( sbi_code_check( $access_token ) ) {
385
+ $account['type'] = 'basic';
386
+ }
387
+
388
+ $connector = new SBI_Account_Connector();
389
+
390
+ $response = $connector->fetch( $account );
391
+
392
+ if ( isset( $response['access_token'] ) ) {
393
+ $connector->add_account_data( $response );
394
+ $connector->update_stored_account();
395
+ $connector->after_update();
396
+ return sbi_json_encode( $connector->get_account_data() );
397
+ } else {
398
+ return $response['error'];
399
+ }
400
+ }
401
+
402
+ function sbi_no_js_connected_account_management() {
403
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
404
+ return;
405
+ }
406
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
407
+ $nonce = isset( $_POST['sb_instagram_settings_nonce'] ) ? $_POST['sb_instagram_settings_nonce'] : false;
408
+ if ( ! wp_verify_nonce( $nonce, 'sb_instagram_saving_settings' ) ) {
409
+ return;
410
+ }
411
+ if ( isset( $_POST['sb_manual_at'] ) ) {
412
+ $access_token = isset( $_POST['sb_manual_at'] ) ? sbi_sanitize_alphanumeric_and_equals( $_POST['sb_manual_at'] ) : false;
413
+ $account_id = isset( $_POST['sb_manual_account_id'] ) ? sbi_sanitize_instagram_ids( $_POST['sb_manual_account_id'] ) : false;
414
+ if ( ! $access_token || ! $account_id ) {
415
+ return;
416
+ }
417
+ sbi_connect_new_account( $access_token, $account_id );
418
+ } elseif ( isset( $_GET['disconnect'] ) && isset( $_GET['page'] ) && 'sb-instagram-feed' === $_GET['page'] ) {
419
+ $account_id = sbi_sanitize_instagram_ids( $_GET['disconnect'] );
420
+ sbi_do_account_delete( $account_id );
421
+ }
422
+
423
+ }
424
+ add_action( 'admin_init', 'sbi_no_js_connected_account_management' );
425
+
426
+ add_action( 'admin_notices', 'sbi_admin_ssl_notice' );
427
+ function sbi_admin_ssl_notice() {
428
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
429
+ return;
430
+ }
431
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
432
+ if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' ), true ) ) {
433
+ global $current_user;
434
+ $user_id = $current_user->ID;
435
+ $was_dismissed = get_user_meta( $user_id, 'sbi_ignore_openssl', true );
436
+
437
+ if ( ! $was_dismissed && ! sbi_doing_openssl() ) : ?>
438
+ <div class="notice notice-warning is-dismissible sbi-admin-notice">
439
+ <p><?php echo wp_kses_post( sprintf( __( 'Instagram Feed recommends Open SSL for encrypting Instagram platform data in your database. Contact your host or follow %1$sthese%2$s directions.', 'instagram-feed' ), '<a href="https://www.php.net/manual/en/openssl.installation.php" target="_blank">', '</a>' ) ); ?> <a href="<?php echo esc_url( admin_url( 'admin.php?page=sb-instagram-feed&openssldismiss=1' ) ); ?>"><?php esc_html_e( 'Dismiss', 'instagram-feed' ); ?></a></p>
440
+ </div>
441
+ <?php
442
+ endif;
443
+ }
444
+
445
+ }
446
+
447
+ add_action( 'admin_init', 'sbi_check_notice_dismiss' );
448
+ function sbi_check_notice_dismiss() {
449
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
450
+ return;
451
+ }
452
+ global $current_user;
453
+ $user_id = $current_user->ID;
454
+
455
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
456
+ if ( isset( $_GET['openssldismiss'] ) ) {
457
+ add_user_meta( $user_id, 'sbi_ignore_openssl', 'true', true );
458
+ }
459
+ }
460
+
461
+ /**
462
+ * @return array
463
+ * @deprecated
464
+ */
465
+ function sbi_get_connected_accounts_data() {
466
+ $sbi_options = get_option( 'sb_instagram_settings', array() );
467
+
468
+ return ! empty( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
469
+ }
470
+
471
+ function sbi_connect_basic_account( $new_account_details ) {
472
+ $options = sbi_get_database_settings();
473
+ $connected_accounts = ! empty( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
474
+
475
+ $accounts_to_save = array();
476
+ $old_account_user_id = '';
477
+ $ids_to_save = array();
478
+ $user_ids = is_array( $options['sb_instagram_user_id'] ) ? $options['sb_instagram_user_id'] : explode( ',', str_replace( ' ', '', $options['sb_instagram_user_id'] ) );
479
+
480
+ $profile_picture = '';
481
+
482
+ // do not connect as a basic display account if already connected as a business account
483
+ if ( isset( $connected_accounts[ $new_account_details['user_id'] ]['type'] ) && 'business' === $connected_accounts[ $new_account_details['user_id'] ]['type'] ) {
484
+ return $options;
485
+ }
486
+
487
+ foreach ( $connected_accounts as $account ) {
488
+ $account_type = ! empty( $account['type'] ) ? $account['type'] : 'personal';
489
+ if ( ( $account['username'] !== $new_account_details['username'] ) || 'business' === $account_type ) {
490
+ $accounts_to_save[ $account['user_id'] ] = $account;
491
+ } else {
492
+ $old_account_user_id = $account['user_id'];
493
+ $profile_picture = ! empty( $account['profile_picture'] ) ? $account['profile_picture'] : '';
494
+ }
495
+ }
496
+
497
+ foreach ( $user_ids as $id ) {
498
+ if ( $id === $old_account_user_id ) {
499
+ $ids_to_save[] = $new_account_details['user_id'];
500
+ } else {
501
+ $ids_to_save[] = $id;
502
+ }
503
+ }
504
+
505
+ $accounts_to_save[ $new_account_details['user_id'] ] = array(
506
+ 'access_token' => sbi_fixer( $new_account_details['access_token'] ),
507
+ 'user_id' => $new_account_details['user_id'],
508
+ 'username' => $new_account_details['username'],
509
+ 'is_valid' => true,
510
+ 'last_checked' => time(),
511
+ 'expires_timestamp' => $new_account_details['expires_timestamp'],
512
+ 'profile_picture' => $profile_picture,
513
+ 'account_type' => strtolower( $new_account_details['account_type'] ),
514
+ 'type' => 'basic',
515
+ );
516
+
517
+ if ( ! empty( $old_account_user_id ) && $old_account_user_id !== $new_account_details['user_id'] ) {
518
+ $accounts_to_save[ $new_account_details['user_id'] ]['old_user_id'] = $old_account_user_id;
519
+
520
+ // get last saved header data
521
+ $fuzzy_matches = sbi_fuzzy_matching_header_data( $old_account_user_id );
522
+ if ( ! empty( $fuzzy_matches[0] ) ) {
523
+ $header_data = sbi_find_matching_data_from_results( $fuzzy_matches, $old_account_user_id );
524
+ $bio = SB_Instagram_Parse::get_bio( $header_data );
525
+ $accounts_to_save[ $new_account_details['user_id'] ]['bio'] = sbi_sanitize_emoji( $bio );
526
+ }
527
+ }
528
+
529
+ if ( ! empty( $profile_picture ) && ! $options['sb_instagram_disable_resize'] ) {
530
+ if ( sbi_create_local_avatar( $new_account_details['username'], $profile_picture ) ) {
531
+ $accounts_to_save[ $new_account_details['user_id'] ]['local_avatar'] = true;
532
+ }
533
+ } else {
534
+ $accounts_to_save[ $new_account_details['user_id'] ]['local_avatar'] = false;
535
+ }
536
+
537
+ delete_transient( SBI_USE_BACKUP_PREFIX . 'sbi_' . $new_account_details['user_id'] );
538
+ $refresher = new SB_Instagram_Token_Refresher( $accounts_to_save[ $new_account_details['user_id'] ] );
539
+ $refresher->attempt_token_refresh();
540
+
541
+ if ( (int) $refresher->get_last_error_code() === 10 ) {
542
+ $accounts_to_save[ $new_account_details['user_id'] ]['private'] = true;
543
+ }
544
+
545
+ $accounts_to_save[ $new_account_details['user_id'] ] = SB_Instagram_Connected_Account::encrypt_connected_account_tokens( $accounts_to_save[ $new_account_details['user_id'] ] );
546
+
547
+ $options['connected_accounts'] = $accounts_to_save;
548
+ $options['sb_instagram_user_id'] = $ids_to_save;
549
+
550
+ update_option( 'sb_instagram_settings', $options );
551
+
552
+ return $options;
553
+ }
554
+
555
+ function sbi_fuzzy_matching_header_data( $user_id ) {
556
+ if ( empty( $user_id ) || strlen( $user_id ) < 4 ) {
557
+ return array();
558
+ }
559
+ global $wpdb;
560
+
561
+ $values = $wpdb->get_results(
562
+ $wpdb->prepare(
563
+ "
564
+ SELECT option_value
565
+ FROM $wpdb->options
566
+ WHERE option_name LIKE (%s)
567
+ LIMIT 10",
568
+ '%!sbi\_header\_' . $user_id . '%'
569
+ ),
570
+ ARRAY_A
571
+ );
572
+
573
+ return $values;
574
+ }
575
+
576
+ function sbi_find_matching_data_from_results( $results, $user_id ) {
577
+
578
+ $match = array();
579
+ $i = 0;
580
+
581
+ while ( empty( $match ) && isset( $results[ $i ] ) ) {
582
+ if ( ! empty( $results[ $i ] ) ) {
583
+ $header_data = json_decode( $results[ $i ]['option_value'], true );
584
+ if ( isset( $header_data['id'] ) && (string) $header_data['id'] === (string) $user_id ) {
585
+ $match = $header_data;
586
+ }
587
+ }
588
+ $i++;
589
+ }
590
+
591
+ return $match;
592
+ }
593
+
594
+ function sbi_matches_existing_personal( $new_account_details ) {
595
+ $options = sbi_get_database_settings();
596
+ $connected_accounts = ! empty( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
597
+
598
+ $matches_one_account = false;
599
+ foreach ( $connected_accounts as $account ) {
600
+ $account_type = ! empty( $account['type'] ) ? $account['type'] : 'personal';
601
+ if ( ( 'personal' === $account_type || 'basic' === $account_type ) && $account['username'] === $new_account_details['username'] ) {
602
+ $matches_one_account = true;
603
+ }
604
+ }
605
+
606
+ return $matches_one_account;
607
+ }
608
+
609
+ function sbi_business_account_request( $url, $account, $remove_access_token = true ) {
610
+ $args = array(
611
+ 'timeout' => 20,
612
+ );
613
+ if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
614
+ $args['sslverify'] = false;
615
+ }
616
+ $result = wp_remote_get( $url, $args );
617
+
618
+ if ( ! is_wp_error( $result ) ) {
619
+ $response_no_at = $remove_access_token ? str_replace( sbi_maybe_clean( $account['access_token'] ), '{accesstoken}', $result['body'] ) : $result['body'];
620
+ return $response_no_at;
621
+ } else {
622
+ return sbi_json_encode( $result );
623
+ }
624
+ }
625
+
626
+ function sbi_after_connection() {
627
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
628
+
629
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
630
+ wp_send_json_error();
631
+ }
632
+
633
+ if ( isset( $_POST['access_token'] ) ) {
634
+ $access_token = sbi_sanitize_alphanumeric_and_equals( wp_unslash( $_POST['access_token'] ) );
635
+ $account_info = sbi_account_data_for_token( $access_token );
636
+
637
+ wp_send_json_success( $account_info );
638
+ }
639
+
640
+ wp_send_json_error();
641
+ }
642
+ add_action( 'wp_ajax_sbi_after_connection', 'sbi_after_connection' );
643
+
644
+ function sbi_get_business_pages_list( $access_token ) {
645
+ $url = 'https://graph.facebook.com/me/accounts?fields=instagram_business_account,access_token&limit=500&access_token=' . $access_token;
646
+ $args = array(
647
+ 'timeout' => 20,
648
+ );
649
+ if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
650
+ $args['sslverify'] = false;
651
+ }
652
+ $result = wp_remote_get( $url, $args );
653
+ if ( ! is_wp_error( $result ) ) {
654
+ $pages_data = $result['body'];
655
+ $return = json_decode( $pages_data );
656
+
657
+ } else {
658
+ $return = $result;
659
+ }
660
+
661
+ return $return;
662
+ }
663
+
664
+ function sbi_get_business_account_connection_modal( $sb_instagram_user_id ) {
665
+ if ( ! isset( $_GET['sbi_con'] ) || ! wp_verify_nonce( $_GET['sbi_con'], 'sbi-connect' ) ) {
666
+ return;
667
+ }
668
+
669
+ $access_token = ! empty( $_GET['sbi_access_token'] ) ? sbi_sanitize_alphanumeric_and_equals( sbi_maybe_clean( urldecode( ( $_GET['sbi_access_token'] ) ) ) ) : '';
670
+ $api_response = sbi_get_business_pages_list( $access_token );
671
+ $pages_data = array();
672
+ if ( ! is_wp_error( $api_response ) ) {
673
+ $pages_data = $api_response;
674
+ } else {
675
+ $page_error = $api_response;
676
+ }
677
+
678
+ $pages_data_arr = $pages_data;
679
+ $num_accounts = 0;
680
+ if ( isset( $pages_data_arr ) ) {
681
+ $num_accounts = is_array( $pages_data_arr->data ) ? count( $pages_data_arr->data ) : 0;
682
+ }
683
+ ?>
684
+ <div id="sbi_config_info" class="sb_list_businesses sbi_num_businesses_<?php echo esc_attr( $num_accounts ); ?>">
685
+ <div class="sbi_config_modal">
686
+ <div class="sbi-managed-pages">
687
+ <?php
688
+ if ( isset( $page_error ) && isset( $page_error->errors ) ) {
689
+ foreach ( $page_error->errors as $key => $item ) {
690
+ echo '<div class="sbi_user_id_error" style="display:block;"><strong>Connection Error: </strong>' . esc_html( $key ) . ': ' . esc_html( $item[0] ) . '</div>';
691
+ }
692
+ }
693
+ ?>
694
+ <?php if ( empty( $pages_data_arr->data ) ) : ?>
695
+ <div id="sbi-bus-account-error">
696
+ <p style="margin-top: 5px;"><strong style="font-size: 16px">Couldn't find Business Profile</strong><br />
697
+ 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" rel="noopener noreferrer">Facebook account</a> in this browser which is associated with your Instagram Business Profile.</p>
698
+ <p><strong style="font-size: 16px">Why do I need a Business Profile?</strong><br />
699
+ 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>
700
+ </div>
701
+
702
+ <?php elseif ( empty( $num_accounts ) ) : ?>
703
+ <div id="sbi-bus-account-error">
704
+ <p style="margin-top: 5px;"><strong style="font-size: 16px">Couldn't find Business Profile</strong><br />
705
+ 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" rel="noopener noreferrer">Facebook account</a> in this browser which is associated with your Instagram Business Profile.</p>
706
+ <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>
707
+ </div>
708
+ <?php else : ?>
709
+ <p class="sbi-managed-page-intro"><strong style="font-size: 16px;">Instagram Business profiles for this account</strong><br /><em style="color: #666;">Note: In order to display a Hashtag feed you first need to select a Business profile below.</em></p>
710
+ <?php if ( $num_accounts > 1 ) : ?>
711
+ <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>
712
+ <?php endif; ?>
713
+ <div class="sbi-scrollable-accounts">
714
+
715
+ <?php foreach ( $pages_data_arr->data as $page => $page_data ) : ?>
716
+
717
+ <?php
718
+ if ( isset( $page_data->instagram_business_account ) ) :
719
+
720
+ $instagram_business_id = sbi_sanitize_instagram_ids( $page_data->instagram_business_account->id );
721
+
722
+ $page_access_token = isset( $page_data->access_token ) ? sbi_sanitize_alphanumeric_and_equals( $page_data->access_token ) : '';
723
+
724
+ //Make another request to get page info
725
+ $instagram_account_url = 'https://graph.facebook.com/' . $instagram_business_id . '?fields=name,username,profile_picture_url&access_token=' . $access_token;
726
+
727
+ $args = array(
728
+ 'timeout' => 20,
729
+ );
730
+ if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
731
+ $args['sslverify'] = false;
732
+ }
733
+ $result = wp_remote_get( $instagram_account_url, $args );
734
+ $instagram_account_info = '{}';
735
+ if ( ! is_wp_error( $result ) ) {
736
+ $instagram_account_info = $result['body'];
737
+ } else {
738
+ $page_error = $result;
739
+ }
740
+
741
+ $instagram_account_data = json_decode( $instagram_account_info );
742
+
743
+ $instagram_biz_img = ! empty( $instagram_account_data->profile_picture_url ) ? $instagram_account_data->profile_picture_url : false;
744
+ $selected_class = $instagram_business_id === $sb_instagram_user_id ? ' sbi-page-selected' : '';
745
+
746
+ ?>
747
+ <?php
748
+ if ( isset( $page_error ) && isset( $page_error->errors ) ) :
749
+ foreach ( $page_error->errors as $key => $item ) {
750
+ echo '<div class="sbi_user_id_error" style="display:block;"><strong>Connection Error: </strong>' . esc_html( $key ) . ': ' . esc_html( $item[0] ) . '</div>';
751
+ }
752
+ else :
753
+ ?>
754
+ <div class="sbi-managed-page<?php echo esc_attr( $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 ); ?>">
755
+ <div class="sbi-add-checkbox">
756
+ <input id="sbi-<?php echo esc_attr( $instagram_business_id ); ?>" type="checkbox" name="sbi_managed_pages[]" value="<?php echo esc_attr( $instagram_account_info ); ?>">
757
+ </div>
758
+ <div class="sbi-managed-page-details">
759
+ <label for="sbi-<?php echo esc_attr( $instagram_business_id ); ?>"><img class="sbi-page-avatar" height="50" width="50" src="<?php echo esc_url( $instagram_biz_img ); ?>" alt="<?php echo esc_attr( $instagram_business_id ); ?>"><strong style="font-size: 16px;"><?php echo esc_html( $instagram_account_data->name ); ?></strong>
760
+ <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>
761
+ </div>
762
+ </div>
763
+ <?php endif; ?>
764
+
765
+ <?php endif; ?>
766
+
767
+ <?php endforeach; ?>
768
+
769
+ </div> <!-- end scrollable -->
770
+ <p style="font-size: 11px; line-height: 1.5; margin-bottom: 0;"><em style="color: #666;">*<?php echo wp_kses_post( sprintf( __( 'Changing the password, updating privacy settings, or removing page admins for the related Facebook page may require %1$smanually reauthorizing our app%2$s to reconnect an account.', 'instagram-feed' ), '<a href="https://smashballoon.com/reauthorizing-our-instagram-facebook-app/" target="_blank" rel="noopener noreferrer">', '</a>' ) ); ?></em></p>
771
+
772
+ <button id="sbi-connect-business-accounts" class="button button-primary" disabled="disabled" style="margin-top: 20px;"><?php esc_html_e( 'Connect Accounts', 'instagram-feed' ); ?></button>
773
+
774
+ <?php endif; ?>
775
+
776
+ <a href="JavaScript:void(0);" class="sbi_modal_close"><i class="fa fa-times"></i></a>
777
+ </div>
778
+ </div>
779
+ </div>
780
+ <?php
781
+ }
782
+
783
+ function sbi_get_personal_connection_modal( $connected_accounts, $action_url = 'admin.php?page=sb-instagram-feed' ) {
784
+ if ( ! isset( $_GET['sbi_con'] ) || ! wp_verify_nonce( $_GET['sbi_con'], 'sbi-connect' ) ) {
785
+ return;
786
+ }
787
+ $access_token = ! empty( $_GET['sbi_access_token'] ) ? sbi_sanitize_alphanumeric_and_equals( sbi_maybe_clean( urldecode( ( $_GET['sbi_access_token'] ) ) ) ) : '';
788
+ $account_type = ! empty( $_GET['sbi_account_type'] ) ? sbi_sanitize_alphanumeric_and_equals( wp_unslash( $_GET['sbi_account_type'] ) ) : '';
789
+ $user_id = ! empty( $_GET['sbi_id'] ) ? sbi_sanitize_alphanumeric_and_equals( wp_unslash( $_GET['sbi_id'] ) ) : '';
790
+ $user_name = ! empty( $_GET['sbi_username'] ) ? sbi_sanitize_username( wp_unslash( $_GET['sbi_username'] ) ) : '';
791
+ $expires_in = ! empty( $_GET['sbi_expires_in'] ) ? (int) $_GET['sbi_expires_in'] : '';
792
+ $expires_timestamp = time() + $expires_in;
793
+
794
+ $new_account_details = array(
795
+ 'access_token' => $access_token,
796
+ 'account_type' => $account_type,
797
+ 'user_id' => $user_id,
798
+ 'username' => $user_name,
799
+ 'expires_timestamp' => $expires_timestamp,
800
+ 'profile_picture' => '',
801
+ 'type' => 'basic',
802
+ );
803
+
804
+ $matches_existing_personal = sbi_matches_existing_personal( $new_account_details );
805
+ $button_text = $matches_existing_personal ? __( 'Update This Account', 'instagram-feed' ) : __( 'Connect This Account', 'instagram-feed' );
806
+
807
+ $account_json = sbi_json_encode( $new_account_details );
808
+
809
+ $already_connected_as_business_account = ! empty( $connected_accounts[ $user_id ] ) && 'business' === $connected_accounts[ $user_id ]['type'];
810
+ ?>
811
+
812
+ <div id="sbi_config_info" class="sb_get_token">
813
+ <div class="sbi_config_modal">
814
+ <div class="sbi_ca_username"><strong><?php echo esc_html( $user_name ); ?></strong></div>
815
+ <form action="<?php echo esc_url( admin_url( $action_url ) ); ?>" method="post">
816
+ <p class="sbi_submit">
817
+ <?php
818
+ if ( $already_connected_as_business_account ) :
819
+ esc_html_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' );
820
+ ?>
821
+ <?php else : ?>
822
+ <input type="submit" name="sbi_submit" id="sbi_connect_account" class="button button-primary" value="<?php echo esc_html( $button_text ); ?>">
823
+ <?php endif; ?>
824
+ <input type="hidden" name="sbi_account_json" value="<?php echo esc_attr( $account_json ); ?>">
825
+ <input type="hidden" name="sbi_connect_username" value="<?php echo esc_attr( $user_name ); ?>">
826
+ <a href="JavaScript:void(0);" class="button button-secondary" id="sbi_switch_accounts"><?php esc_html_e( 'Switch Accounts', 'instagram-feed' ); ?></a>
827
+ </p>
828
+ </form>
829
+ <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
830
+ </div>
831
+ </div>
832
+ <?php
833
+ }
834
+
835
+ function sbi_account_type_display( $type, $private = false ) {
836
+ if ( 'basic' === $type ) {
837
+ $type = 'personal';
838
+ if ( $private ) {
839
+ $type .= ' (private)';
840
+ }
841
+ }
842
+ return $type;
843
+ }
844
+
845
+ function sbi_clear_backups() {
846
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
847
+
848
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
849
+ wp_send_json_error();
850
+ }
851
+
852
+ //Delete all transients
853
+ global $wpdb;
854
+
855
+ $wpdb->query(
856
+ "
857
+ DELETE
858
+ FROM $wpdb->options
859
+ WHERE `option_name` LIKE ('%!sbi\_%')
860
+ "
861
+ );
862
+ $wpdb->query(
863
+ "
864
+ DELETE
865
+ FROM $wpdb->options
866
+ WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
867
+ "
868
+ );
869
+ $wpdb->query(
870
+ "
871
+ DELETE
872
+ FROM $wpdb->options
873
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
874
+ "
875
+ );
876
+
877
+ wp_send_json_success();
878
+ }
879
+ add_action( 'wp_ajax_sbi_clear_backups', 'sbi_clear_backups' );
880
+
881
+ function sbi_reset_resized() {
882
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
883
+
884
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
885
+ wp_send_json_error();
886
+ }
887
+
888
+ global $sb_instagram_posts_manager;
889
+ $sb_instagram_posts_manager->delete_all_sbi_instagram_posts();
890
+ delete_option( 'sbi_top_api_calls' );
891
+
892
+ $sb_instagram_posts_manager->add_action_log( 'Reset resizing tables.' );
893
+
894
+ wp_send_json_success( '1' );
895
+ }
896
+ add_action( 'wp_ajax_sbi_reset_resized', 'sbi_reset_resized' );
897
+
898
+ function sbi_reset_log() {
899
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
900
+
901
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
902
+ wp_send_json_error();
903
+ }
904
+
905
+ global $sb_instagram_posts_manager;
906
+
907
+ $sb_instagram_posts_manager->remove_all_errors();
908
+
909
+ wp_send_json_success( '1' );
910
+ }
911
+ add_action( 'wp_ajax_sbi_reset_log', 'sbi_reset_log' );
912
+
913
+ function sbi_reset_api_errors() {
914
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
915
+
916
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
917
+ wp_send_json_error();
918
+ }
919
+
920
+ global $sb_instagram_posts_manager;
921
+ $sb_instagram_posts_manager->add_action_log( 'View feed and retry button clicked.' );
922
+
923
+ $sb_instagram_posts_manager->reset_api_errors();
924
+
925
+ wp_send_json_success( '1' );
926
+ }
927
+ add_action( 'wp_ajax_sbi_reset_api_errors', 'sbi_reset_api_errors' );
928
+
929
+ function sbi_lite_dismiss() {
930
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
931
+
932
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
933
+ wp_send_json_error();
934
+ }
935
+
936
+ set_transient( 'instagram_feed_dismiss_lite', 'dismiss', 1 * WEEK_IN_SECONDS );
937
+
938
+ wp_send_json_success( '1' );
939
+ }
940
+ add_action( 'wp_ajax_sbi_lite_dismiss', 'sbi_lite_dismiss' );
941
+
942
+ add_action( 'admin_notices', 'sbi_admin_error_notices' );
943
+ function sbi_admin_error_notices() {
944
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
945
+ return;
946
+ }
947
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
948
+ if ( isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'sb-instagram-feed' ), true ) ) {
949
+
950
+ global $sb_instagram_posts_manager;
951
+
952
+ $errors = $sb_instagram_posts_manager->get_errors();
953
+ if ( ! empty( $errors ) && ( ! empty( $errors['database_create'] ) || ! empty( $errors['upload_dir'] ) ) ) :
954
+ ?>
955
+ <div class="notice notice-warning is-dismissible sbi-admin-notice">
956
+ <?php
957
+ if ( ! empty( $errors['database_create'] ) ) {
958
+ echo '<p>' . wp_kses_post( $errors['database_create'] ) . '</p>';
959
+ }
960
+ if ( ! empty( $errors['upload_dir'] ) ) {
961
+ echo '<p>' . wp_kses_post( $errors['upload_dir'] ) . '</p>';
962
+ }
963
+ ?>
964
+ <p><?php echo wp_kses_post( sprintf( __( 'Visit our %s page for help', 'instagram-feed' ), '<a href="https://smashballoon.com/instagram-feed/support/faq/" target="_blank">FAQ</a>' ) ); ?></p>
965
+
966
+ </div>
967
+
968
+ <?php
969
+ endif;
970
+ $errors = $sb_instagram_posts_manager->get_critical_errors();
971
+ if ( $sb_instagram_posts_manager->are_critical_errors() && ! empty( $errors ) ) :
972
+ ?>
973
+ <div class="notice notice-warning is-dismissible sbi-admin-notice">
974
+ <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>
975
+
976
+ <?php echo wp_kses_post( $errors ); ?>
977
+
978
+ <?php
979
+ $error_page = $sb_instagram_posts_manager->get_error_page();
980
+ if ( $error_page ) {
981
+ echo '<a href="' . esc_url( get_the_permalink( $error_page ) ) . '" class="sbi-clear-errors-visit-page sbi-space-left button button-secondary">' . esc_html__( 'View Feed and Retry', 'instagram-feed' ) . '</a>';
982
+ }
983
+ if ( $sb_instagram_posts_manager->was_app_permission_related_error() ) :
984
+ $accounts_revoked = $sb_instagram_posts_manager->get_app_permission_related_error_ids();
985
+ if ( count( $accounts_revoked ) > 1 ) {
986
+ $accounts_revoked = implode( ', ', $accounts_revoked );
987
+ } else {
988
+ $accounts_revoked = $accounts_revoked[0];
989
+ }
990
+ ?>
991
+ <p class="sbi_notice"><?php echo esc_html( sprintf( __( 'Instagram Feed related data for the account(s) %s was removed due to permission for the Smash Balloon App on Facebook or Instagram being revoked.', 'instagram-feed' ), $accounts_revoked ) ); ?></p>
992
+ <?php endif; ?>
993
+ </div>
994
+ <?php
995
+ endif;
996
+ }
997
+
998
+ }
999
+
1000
+ function sbi_admin_hide_unrelated_notices() {
1001
+
1002
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
1003
+ if ( ! isset( $_GET['page'] ) || ( strpos( $_GET['page'], 'sb-instagram-feed' ) === false && strpos( $_GET['page'], 'sbi-' ) === false ) ) {
1004
+ return;
1005
+ }
1006
+
1007
+ // Extra banned classes and callbacks from third-party plugins.
1008
+ $blacklist = array(
1009
+ 'classes' => array(),
1010
+ 'callbacks' => array(
1011
+ 'sbidb_admin_notice', // 'Database for sbi' plugin.
1012
+ ),
1013
+ );
1014
+
1015
+ global $wp_filter;
1016
+
1017
+ foreach ( array( 'user_admin_notices', 'admin_notices', 'all_admin_notices' ) as $notices_type ) {
1018
+ if ( empty( $wp_filter[ $notices_type ]->callbacks ) || ! is_array( $wp_filter[ $notices_type ]->callbacks ) ) {
1019
+ continue;
1020
+ }
1021
+ foreach ( $wp_filter[ $notices_type ]->callbacks as $priority => $hooks ) {
1022
+ foreach ( $hooks as $name => $arr ) {
1023
+ if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
1024
+ unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
1025
+ continue;
1026
+ }
1027
+ $class = ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) ? strtolower( get_class( $arr['function'][0] ) ) : '';
1028
+ if (
1029
+ ! empty( $class ) &&
1030
+ strpos( $class, 'sbi' ) !== false &&
1031
+ ! in_array( $class, $blacklist['classes'], true )
1032
+ ) {
1033
+ continue;
1034
+ }
1035
+ if (
1036
+ ! empty( $name ) && (
1037
+ strpos( $name, 'sbi' ) === false ||
1038
+ in_array( $class, $blacklist['classes'], true ) ||
1039
+ in_array( $name, $blacklist['callbacks'], true )
1040
+ )
1041
+ ) {
1042
+ unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
1043
+ }
1044
+ }
1045
+ }
1046
+ }
1047
+ }
1048
+ add_action( 'admin_print_scripts', 'sbi_admin_hide_unrelated_notices' );
1049
+
1050
+ /* Usage */
1051
+ add_action( 'admin_notices', 'sbi_usage_opt_in' );
1052
+ function sbi_usage_opt_in() {
1053
+ $cap = current_user_can( 'manage_instagram_feed_options' ) ? 'manage_instagram_feed_options' : 'manage_options';
1054
+
1055
+ $cap = apply_filters( 'sbi_settings_pages_capability', $cap );
1056
+ if ( ! current_user_can( $cap ) ) {
1057
+ return;
1058
+ }
1059
+
1060
+ if ( isset( $_GET['trackingdismiss'] ) ) {
1061
+ if ( ! isset( $_GET['sbi_nonce'] ) || ! wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-trackingdismiss' ) ) {
1062
+ return;
1063
+ }
1064
+ $usage_tracking = get_option(
1065
+ 'sbi_usage_tracking',
1066
+ array(
1067
+ 'last_send' => 0,
1068
+ 'enabled' => false,
1069
+ )
1070
+ );
1071
+
1072
+ $usage_tracking['enabled'] = false;
1073
+
1074
+ update_option( 'sbi_usage_tracking', $usage_tracking, false );
1075
+
1076
+ return;
1077
+ }
1078
+
1079
+ $usage_tracking = sbi_get_option( 'sbi_usage_tracking', false );
1080
+ if ( $usage_tracking ) {
1081
+ return;
1082
+ }
1083
+ $dismiss_href = wp_nonce_url( admin_url( 'admin.php?page=sb-instagram-feed&trackingdismiss=1' ), 'sbi-trackingdismiss', 'sbi_nonce' );
1084
+ ?>
1085
+ <div class="notice notice-warning is-dismissible sbi-admin-notice">
1086
+
1087
+ <p>
1088
+ <strong><?php esc_html_e( 'Help us improve the Instagram Feed plugin', 'instagram-feed' ); ?></strong><br>
1089
+ <?php esc_html_e( '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' ); ?>
1090
+ <a target="_blank" rel="noopener noreferrer" href="https://smashballoon.com/instagram-feed/usage-tracking/"><?php esc_html_e( 'More information', 'instagram-feed' ); ?></a>
1091
+ </p>
1092
+ <p>
1093
+ <a href="<?php echo esc_url( $dismiss_href ); ?>" class="button button-primary sb-opt-in"><?php esc_html_e( 'Yes, I\'d like to help', 'instagram-feed' ); ?></a>
1094
+ <a href="<?php echo esc_url( $dismiss_href ); ?>" class="sb-no-usage-opt-out sbi-space-left button button-secondary"><?php esc_html_e( 'No, thanks', 'instagram-feed' ); ?></a>
1095
+ </p>
1096
+
1097
+ </div>
1098
+
1099
+ <?php
1100
+ }
1101
+
1102
+ function sbi_usage_opt_in_or_out() {
1103
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
1104
+
1105
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
1106
+ wp_send_json_error();
1107
+ }
1108
+
1109
+ $usage_tracking = sbi_get_option(
1110
+ 'sbi_usage_tracking',
1111
+ array(
1112
+ 'last_send' => 0,
1113
+ 'enabled' => false,
1114
+ )
1115
+ );
1116
+
1117
+ $usage_tracking['enabled'] = ! empty( $_POST['opted_in'] ) && 'true' === $_POST['opted_in'];
1118
+
1119
+ sbi_update_option( 'sbi_usage_tracking', $usage_tracking, false );
1120
+
1121
+ wp_send_json_success( '1' );
1122
+ }
1123
+ add_action( 'wp_ajax_sbi_usage_opt_in_or_out', 'sbi_usage_opt_in_or_out' );
1124
+
1125
+ function sbi_oembed_disable() {
1126
+ check_ajax_referer( 'sbi_nonce', 'sbi_nonce' );
1127
+
1128
+ if ( ! sbi_current_user_can( 'manage_instagram_feed_options' ) ) {
1129
+ wp_send_json_error();
1130
+ }
1131
+
1132
+ $oembed_settings = get_option( 'sbi_oembed_token', array() );
1133
+ $oembed_settings['access_token'] = '';
1134
+ $oembed_settings['disabled'] = true;
1135
+ echo '<strong>';
1136
+ if ( update_option( 'sbi_oembed_token', $oembed_settings ) ) {
1137
+ esc_html_e( 'Instagram oEmbeds will no longer be handled by Instagram Feed.', 'instagram-feed' );
1138
+ } else {
1139
+ esc_html_e( 'An error occurred when trying to delete your oEmbed token.', 'instagram-feed' );
1140
+ }
1141
+ echo '</strong>';
1142
+
1143
+ die();
1144
+ }
1145
+ add_action( 'wp_ajax_sbi_oembed_disable', 'sbi_oembed_disable' );
inc/admin/addon-functions.php CHANGED
@@ -1,182 +1,182 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ){
3
- exit;
4
- } // Exit if accessed directly
5
-
6
- /**
7
- * Deactivate addon.
8
- *
9
- * @since 1.0.0
10
- */
11
- function sbi_deactivate_addon() {
12
-
13
- // Run a security check.
14
- check_ajax_referer( 'sbi-admin', 'nonce' );
15
-
16
- // Check for permissions.
17
- if ( ! current_user_can( 'deactivate_plugins' ) ) {
18
- wp_send_json_error();
19
- }
20
-
21
- $type = 'addon';
22
- if ( ! empty( $_POST['type'] ) ) {
23
- $type = sanitize_key( wp_unslash( $_POST['type'] ) );
24
- }
25
-
26
- if ( isset( $_POST['plugin'] ) ) {
27
- deactivate_plugins( preg_replace( '/[^a-z-_\/]/', '', wp_unslash( str_replace( '.php', '', $_POST['plugin'] ) ) ) . '.php' );
28
-
29
- if ( 'plugin' === $type ) {
30
- wp_send_json_success( esc_html__( 'Plugin deactivated.', 'instagram-feed' ) );
31
- } else {
32
- wp_send_json_success( esc_html__( 'Addon deactivated.', 'instagram-feed' ) );
33
- }
34
- }
35
-
36
- wp_send_json_error( esc_html__( 'Could not deactivate the addon. Please deactivate from the Plugins page.', 'instagram-feed' ) );
37
- }
38
- add_action( 'wp_ajax_sbi_deactivate_addon', 'sbi_deactivate_addon' );
39
-
40
- /**
41
- * Activate addon.
42
- *
43
- * @since 1.0.0
44
- */
45
- function sbi_activate_addon() {
46
-
47
- // Run a security check.
48
- check_ajax_referer( 'sbi-admin', 'nonce' );
49
-
50
- // Check for permissions.
51
- if ( ! current_user_can( 'activate_plugins' ) ) {
52
- wp_send_json_error( esc_html__( 'Cant deactivate.', 'instagram-feed' ) );
53
- }
54
-
55
- if ( isset( $_POST['plugin'] ) ) {
56
-
57
- $type = 'addon';
58
- if ( ! empty( $_POST['type'] ) ) {
59
- $type = sanitize_key( wp_unslash( $_POST['type'] ) );
60
- }
61
-
62
- $activate = activate_plugins( preg_replace( '/[^a-z-_\/]/', '', wp_unslash( str_replace( '.php', '', $_POST['plugin'] ) ) ) . '.php' );
63
-
64
- if ( ! is_wp_error( $activate ) ) {
65
- if ( 'plugin' === $type ) {
66
- wp_send_json_success( esc_html__( 'Plugin activated.', 'instagram-feed' ) );
67
- } else {
68
- wp_send_json_success( esc_html__( 'Addon activated.', 'instagram-feed' ) );
69
- }
70
- }
71
- }
72
-
73
- wp_send_json_error( esc_html__( 'Could not activate addon. Please activate from the Plugins page.', 'instagram-feed' ) );
74
- }
75
- add_action( 'wp_ajax_sbi_activate_addon', 'sbi_activate_addon' );
76
-
77
- /**
78
- * Install addon.
79
- *
80
- * @since 1.0.0
81
- */
82
- function sbi_install_addon() {
83
-
84
- // Run a security check.
85
- check_ajax_referer( 'sbi-admin', 'nonce' );
86
-
87
- // Check for permissions.
88
- if ( ! current_user_can( 'install_plugins' ) ) {
89
- wp_send_json_error();
90
- }
91
-
92
- $error = esc_html__( 'Could not install addon. Please download from wpforms.com and install manually.', 'instagram-feed' );
93
-
94
- if ( empty( $_POST['plugin'] ) ) {
95
- wp_send_json_error( $error );
96
- }
97
-
98
- // Only install plugins from the .org repo
99
- if ( strpos( $_POST['plugin'], 'https://downloads.wordpress.org/plugin/' ) !== 0 ) {
100
- wp_send_json_error( $error );
101
- }
102
-
103
- // Set the current screen to avoid undefined notices.
104
- set_current_screen( 'sb-instagram-feed-about' );
105
-
106
- // Prepare variables.
107
- $url = esc_url_raw(
108
- add_query_arg(
109
- array(
110
- 'page' => 'sb-instagram-feed-about',
111
- ),
112
- admin_url( 'admin.php' )
113
- )
114
- );
115
-
116
- $creds = request_filesystem_credentials( $url, '', false, false, null );
117
-
118
- // Check for file system permissions.
119
- if ( false === $creds ) {
120
- wp_send_json_error( $error );
121
- }
122
-
123
- if ( ! WP_Filesystem( $creds ) ) {
124
- wp_send_json_error( $error );
125
- }
126
-
127
- /*
128
- * We do not need any extra credentials if we have gotten this far, so let's install the plugin.
129
- */
130
-
131
- require_once SBI_PLUGIN_DIR . 'inc/admin/class-install-skin.php';
132
-
133
- // Do not allow WordPress to search/download translations, as this will break JS output.
134
- remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
135
-
136
- // Create the plugin upgrader with our custom skin.
137
- $installer = new Sbi\Helpers\PluginSilentUpgrader( new Sbi_Install_Skin() );
138
-
139
- // Error check.
140
- if ( ! method_exists( $installer, 'install' ) || empty( $_POST['plugin'] ) ) {
141
- wp_send_json_error( $error );
142
- }
143
-
144
- $installer->install( esc_url_raw( wp_unslash( $_POST['plugin'] ) ) );
145
-
146
- // Flush the cache and return the newly installed plugin basename.
147
- wp_cache_flush();
148
-
149
- $plugin_basename = $installer->plugin_info();
150
-
151
- if ( $plugin_basename ) {
152
-
153
- $type = 'addon';
154
- if ( ! empty( $_POST['type'] ) ) {
155
- $type = sanitize_key( wp_unslash( $_POST['type'] ) );
156
- }
157
-
158
- // Activate the plugin silently.
159
- $activated = activate_plugin( $plugin_basename );
160
-
161
- if ( ! is_wp_error( $activated ) ) {
162
- wp_send_json_success(
163
- array(
164
- 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed & activated.', 'instagram-feed' ) : esc_html__( 'Addon installed & activated.', 'instagram-feed' ),
165
- 'is_activated' => true,
166
- 'basename' => $plugin_basename,
167
- )
168
- );
169
- } else {
170
- wp_send_json_success(
171
- array(
172
- 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed.', 'instagram-feed' ) : esc_html__( 'Addon installed.', 'instagram-feed' ),
173
- 'is_activated' => false,
174
- 'basename' => $plugin_basename,
175
- )
176
- );
177
- }
178
- }
179
-
180
- wp_send_json_error( $error );
181
- }
182
- add_action( 'wp_ajax_sbi_install_addon', 'sbi_install_addon' );
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ){
3
+ exit;
4
+ } // Exit if accessed directly
5
+
6
+ /**
7
+ * Deactivate addon.
8
+ *
9
+ * @since 1.0.0
10
+ */
11
+ function sbi_deactivate_addon() {
12
+
13
+ // Run a security check.
14
+ check_ajax_referer( 'sbi-admin', 'nonce' );
15
+
16
+ // Check for permissions.
17
+ if ( ! current_user_can( 'deactivate_plugins' ) ) {
18
+ wp_send_json_error();
19
+ }
20
+
21
+ $type = 'addon';
22
+ if ( ! empty( $_POST['type'] ) ) {
23
+ $type = sanitize_key( wp_unslash( $_POST['type'] ) );
24
+ }
25
+
26
+ if ( isset( $_POST['plugin'] ) ) {
27
+ deactivate_plugins( preg_replace( '/[^a-z-_\/]/', '', wp_unslash( str_replace( '.php', '', $_POST['plugin'] ) ) ) . '.php' );
28
+
29
+ if ( 'plugin' === $type ) {
30
+ wp_send_json_success( esc_html__( 'Plugin deactivated.', 'instagram-feed' ) );
31
+ } else {
32
+ wp_send_json_success( esc_html__( 'Addon deactivated.', 'instagram-feed' ) );
33
+ }
34
+ }
35
+
36
+ wp_send_json_error( esc_html__( 'Could not deactivate the addon. Please deactivate from the Plugins page.', 'instagram-feed' ) );
37
+ }
38
+ add_action( 'wp_ajax_sbi_deactivate_addon', 'sbi_deactivate_addon' );
39
+
40
+ /**
41
+ * Activate addon.
42
+ *
43
+ * @since 1.0.0
44
+ */
45
+ function sbi_activate_addon() {
46
+
47
+ // Run a security check.
48
+ check_ajax_referer( 'sbi-admin', 'nonce' );
49
+
50
+ // Check for permissions.
51
+ if ( ! current_user_can( 'activate_plugins' ) ) {
52
+ wp_send_json_error( esc_html__( 'Cant deactivate.', 'instagram-feed' ) );
53
+ }
54
+
55
+ if ( isset( $_POST['plugin'] ) ) {
56
+
57
+ $type = 'addon';
58
+ if ( ! empty( $_POST['type'] ) ) {
59
+ $type = sanitize_key( wp_unslash( $_POST['type'] ) );
60
+ }
61
+
62
+ $activate = activate_plugins( preg_replace( '/[^a-z-_\/]/', '', wp_unslash( str_replace( '.php', '', $_POST['plugin'] ) ) ) . '.php' );
63
+
64
+ if ( ! is_wp_error( $activate ) ) {
65
+ if ( 'plugin' === $type ) {
66
+ wp_send_json_success( esc_html__( 'Plugin activated.', 'instagram-feed' ) );
67
+ } else {
68
+ wp_send_json_success( esc_html__( 'Addon activated.', 'instagram-feed' ) );
69
+ }
70
+ }
71
+ }
72
+
73
+ wp_send_json_error( esc_html__( 'Could not activate addon. Please activate from the Plugins page.', 'instagram-feed' ) );
74
+ }
75
+ add_action( 'wp_ajax_sbi_activate_addon', 'sbi_activate_addon' );
76
+
77
+ /**
78
+ * Install addon.
79
+ *
80
+ * @since 1.0.0
81
+ */
82
+ function sbi_install_addon() {
83
+
84
+ // Run a security check.
85
+ check_ajax_referer( 'sbi-admin', 'nonce' );
86
+
87
+ // Check for permissions.
88
+ if ( ! current_user_can( 'install_plugins' ) ) {
89
+ wp_send_json_error();
90
+ }
91
+
92
+ $error = esc_html__( 'Could not install addon. Please download from wpforms.com and install manually.', 'instagram-feed' );
93
+
94
+ if ( empty( $_POST['plugin'] ) ) {
95
+ wp_send_json_error( $error );
96
+ }
97
+
98
+ // Only install plugins from the .org repo
99
+ if ( strpos( $_POST['plugin'], 'https://downloads.wordpress.org/plugin/' ) !== 0 ) {
100
+ wp_send_json_error( $error );
101
+ }
102
+
103
+ // Set the current screen to avoid undefined notices.
104
+ set_current_screen( 'sb-instagram-feed-about' );
105
+
106
+ // Prepare variables.
107
+ $url = esc_url_raw(
108
+ add_query_arg(
109
+ array(
110
+ 'page' => 'sb-instagram-feed-about',
111
+ ),
112
+ admin_url( 'admin.php' )
113
+ )
114
+ );
115
+
116
+ $creds = request_filesystem_credentials( $url, '', false, false, null );
117
+
118
+ // Check for file system permissions.
119
+ if ( false === $creds ) {
120
+ wp_send_json_error( $error );
121
+ }
122
+
123
+ if ( ! WP_Filesystem( $creds ) ) {
124
+ wp_send_json_error( $error );
125
+ }
126
+
127
+ /*
128
+ * We do not need any extra credentials if we have gotten this far, so let's install the plugin.
129
+ */
130
+
131
+ require_once SBI_PLUGIN_DIR . 'inc/admin/class-install-skin.php';
132
+
133
+ // Do not allow WordPress to search/download translations, as this will break JS output.
134
+ remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
135
+
136
+ // Create the plugin upgrader with our custom skin.
137
+ $installer = new Sbi\Helpers\PluginSilentUpgrader( new Sbi_Install_Skin() );
138
+
139
+ // Error check.
140
+ if ( ! method_exists( $installer, 'install' ) || empty( $_POST['plugin'] ) ) {
141
+ wp_send_json_error( $error );
142
+ }
143
+
144
+ $installer->install( esc_url_raw( wp_unslash( $_POST['plugin'] ) ) );
145
+
146
+ // Flush the cache and return the newly installed plugin basename.
147
+ wp_cache_flush();
148
+
149
+ $plugin_basename = $installer->plugin_info();
150
+
151
+ if ( $plugin_basename ) {
152
+
153
+ $type = 'addon';
154
+ if ( ! empty( $_POST['type'] ) ) {
155
+ $type = sanitize_key( wp_unslash( $_POST['type'] ) );
156
+ }
157
+
158
+ // Activate the plugin silently.
159
+ $activated = activate_plugin( $plugin_basename );
160
+
161
+ if ( ! is_wp_error( $activated ) ) {
162
+ wp_send_json_success(
163
+ array(
164
+ 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed & activated.', 'instagram-feed' ) : esc_html__( 'Addon installed & activated.', 'instagram-feed' ),
165
+ 'is_activated' => true,
166
+ 'basename' => $plugin_basename,
167
+ )
168
+ );
169
+ } else {
170
+ wp_send_json_success(
171
+ array(
172
+ 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed.', 'instagram-feed' ) : esc_html__( 'Addon installed.', 'instagram-feed' ),
173
+ 'is_activated' => false,
174
+ 'basename' => $plugin_basename,
175
+ )
176
+ );
177
+ }
178
+ }
179
+
180
+ wp_send_json_error( $error );
181
+ }
182
+ add_action( 'wp_ajax_sbi_install_addon', 'sbi_install_addon' );
inc/admin/blocks/class-sbi-blocks.php CHANGED
@@ -1,147 +1,147 @@
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
- return defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore
145
- }
146
-
147
- }
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
+ return defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore
145
+ }
146
+
147
+ }
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,1300 +1,1300 @@
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__( 'Instagram Stories', 'instagram-feed' ),
79
- 'payments' => esc_html__( 'Feed Moderation', 'instagram-feed' ),
80
- 'surveys' => esc_html__( 'Header Display', 'instagram-feed' ),
81
- 'advanced' => esc_html__( 'Post Linking', 'instagram-feed' ),
82
- 'support' => esc_html__( 'Customer Support', 'instagram-feed' ),
83
- );
84
-
85
- // Maybe load tools page.
86
- add_action( 'admin_init', array( $this, 'init' ) );
87
- }
88
-
89
- /**
90
- * Determining if the user is viewing the our page, if so, party on.
91
- *
92
- * @since 2.4/5.5
93
- */
94
- public function init() {
95
-
96
- // Check what page we are on.
97
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
98
- $page = ! empty( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_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 ( 'pro' === $license || ! in_array( $license, self::$licenses_top, true ) ) {
121
- $vs_tab_name = sprintf( /* translators: %1$s - current license type, %2$s - suggested license type. */
122
- esc_html__( '%1$s vs %2$s', 'instagram-feed' ),
123
- ucfirst( $license ),
124
- $this->get_next_license( $license )
125
- );
126
-
127
- $this->views[ $vs_tab_name ] = array( 'versus' );
128
- }
129
-
130
- // Determine the current active settings tab.
131
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
132
- $this->view = ! empty( $_GET['view'] ) ? esc_html( wp_unslash( $_GET['view'] ) ) : self::DEFAULT_TAB;
133
-
134
- // If the user tries to load an invalid view - fallback to About Us.
135
- if (
136
- ! in_array( $this->view, call_user_func_array( 'array_merge', array_values( $this->views ) ), true ) &&
137
- ! has_action( 'sbi_admin_about_display_tab_' . sanitize_key( $this->view ) )
138
- ) {
139
- $this->view = self::DEFAULT_TAB;
140
- }
141
-
142
- add_action( 'sbi_admin_page', array( $this, 'output' ) );
143
-
144
- // Hook for addons.
145
- do_action( 'sbi_admin_about_init' );
146
- }
147
-
148
- /**
149
- * Enqueue assets for the the page.
150
- *
151
- * @since 2.4/5.5
152
- */
153
- public function enqueues() {
154
-
155
- wp_enqueue_script(
156
- 'jquery-matchheight',
157
- SBI_PLUGIN_URL . 'js/jquery.matchHeight-min.js',
158
- array( 'jquery' ),
159
- '0.7.0',
160
- false
161
- );
162
- }
163
-
164
- /**
165
- * Output the basic page structure.
166
- *
167
- * @since 2.4/5.5
168
- */
169
- public function output() {
170
-
171
- $show_nav = false;
172
- foreach ( $this->views as $view ) {
173
- if ( in_array( $this->view, (array) $view, true ) ) {
174
- $show_nav = true;
175
- break;
176
- }
177
- }
178
- ?>
179
-
180
- <div id="sbi-admin-about" class="wrap sbi-admin-wrap">
181
-
182
- <?php
183
- if ( $show_nav ) {
184
- $license = $this->get_license_type();
185
- $next_license = $this->get_next_license( $license );
186
- echo '<ul class="sbi-admin-tabs">';
187
- foreach ( $this->views as $label => $view ) {
188
- $class = in_array( $this->view, $view, true ) ? 'active' : '';
189
- echo '<li>';
190
- printf(
191
- '<a href="%s" class="%s">%s</a>',
192
- esc_url( admin_url( 'admin.php?page=' . self::SLUG . '&view=' . sanitize_key( $view[0] ) ) ),
193
- esc_attr( $class ),
194
- esc_html( $label )
195
- );
196
- echo '</li>';
197
- }
198
- echo '</ul>';
199
- }
200
- ?>
201
-
202
- <h1 class="sbi-h1-placeholder"></h1>
203
-
204
- <?php
205
- switch ( $this->view ) {
206
- case 'about':
207
- $this->output_about();
208
- break;
209
- case 'getting-started':
210
- $this->output_getting_started();
211
- break;
212
- case 'versus':
213
- $this->output_versus();
214
- break;
215
- default:
216
- do_action( 'sbi_admin_about_display_tab_' . sanitize_key( $this->view ) );
217
- break;
218
- }
219
- ?>
220
-
221
- </div>
222
-
223
- <?php
224
- }
225
-
226
- /**
227
- * Display the About tab content.
228
- *
229
- * @since 2.4/5.5
230
- */
231
- protected function output_about() {
232
-
233
- $this->output_about_info();
234
- $this->output_about_addons();
235
- }
236
-
237
- /**
238
- * Display the General Info section of About tab.
239
- *
240
- * @since 1.5.8
241
- */
242
- protected function output_about_info() {
243
-
244
- ?>
245
-
246
- <div class="sbi-admin-about-section sbi-admin-columns">
247
-
248
- <div class="sbi-admin-about-text" style="min-height: 340px;">
249
- <h3>
250
- <?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' ); ?>
251
- </h3>
252
-
253
- <p>
254
- <?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' ); ?>
255
- </p>
256
- <p>
257
- <?php esc_html_e( 'We’re a small, but dedicated, team based in Minnesota in the USA.', 'instagram-feed' ); ?>
258
- </p>
259
- <!-- <p>
260
- <?php
261
- printf(
262
- wp_kses(
263
- /* translators: %1$s - WPBeginner URL, %2$s - OptinMonster URL, %3$s - MonsterInsights URL, %4$s - RafflePress URL. */
264
- __( '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' ),
265
- array(
266
- 'a' => array(
267
- 'href' => array(),
268
- 'rel' => array(),
269
- 'target' => array(),
270
- ),
271
- )
272
- ),
273
- 'https://www.wpbeginner.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
274
- 'https://optinmonster.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
275
- 'https://www.monsterinsights.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
276
- 'https://rafflepress.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi'
277
- );
278
- ?>
279
- </p>
280
- <p>
281
- <?php esc_html_e( 'Yup, we know a thing or two about building awesome products that customers love.', 'instagram-feed' ); ?>
282
- </p> -->
283
- </div>
284
-
285
- <div class="sbi-admin-about-image sbi-admin-column-last">
286
- <figure>
287
- <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/team.jpg' ); ?>" alt="<?php esc_attr_e( 'The Sbi Team photo', 'instagram-feed' ); ?>">
288
- <figcaption>
289
- <?php esc_html_e( 'The Smash Balloon Team', 'instagram-feed' ); ?><br>
290
- </figcaption>
291
- </figure>
292
- </div>
293
-
294
- </div>
295
- <?php
296
- }
297
-
298
- /**
299
- * Display the Addons section of About tab.
300
- *
301
- * @since 1.5.8
302
- */
303
- protected function output_about_addons() {
304
-
305
- if ( ! current_user_can( 'manage_instagram_feed_options' ) || version_compare( PHP_VERSION, '5.3.0' ) <= 0
306
- || version_compare( PHP_VERSION, '5.3.0' ) <= 0
307
- || version_compare( get_bloginfo( 'version' ), '4.6', '<' ) ) {
308
- return;
309
- }
310
-
311
- $all_plugins = get_plugins();
312
- $am_plugins = $this->get_am_plugins();
313
-
314
- ?>
315
- <div id="sbi-admin-addons">
316
- <div class="addons-container">
317
- <h3><?php esc_html_e( 'Our Other Plugins', 'instagram-feed' ); ?></h3>
318
- <?php
319
- foreach ( $am_plugins as $plugin => $details ) :
320
-
321
- $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
322
-
323
- if ( $plugin === 'wpforms-lite/wpforms.php' ) {
324
- echo '<h3>' . esc_html__( 'Plugins We Recommend', 'instagram-feed' ) . '</h3>';
325
- }
326
-
327
- ?>
328
- <div class="addon-container">
329
- <div class="addon-item">
330
- <div class="details sbi-clear">
331
- <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>" alt="<?php esc_attr_e( 'Plugin thumbnail', 'instagram-feed' ); ?>">
332
- <h5 class="addon-name">
333
- <?php echo esc_html( $plugin_data['details']['name'] ); ?>
334
- </h5>
335
- <p class="addon-desc">
336
- <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
337
- </p>
338
- </div>
339
- <div class="actions sbi-clear">
340
- <div class="status">
341
- <strong>
342
- <?php
343
- printf(
344
- /* translators: %s - addon status label. */
345
- esc_html__( 'Status: %s', 'instagram-feed' ),
346
- '<span class="status-label ' . esc_attr( $plugin_data['status_class'] ) . '">' . wp_kses_post( $plugin_data['status_text'] ) . '</span>'
347
- );
348
- ?>
349
- </strong>
350
- </div>
351
- <div class="action-button">
352
- <button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
353
- <?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
354
- </button>
355
- </div>
356
- </div>
357
- </div>
358
- </div>
359
- <?php endforeach; ?>
360
- </div>
361
- </div>
362
- <?php
363
- }
364
-
365
- /**
366
- * Get AM plugin data to display in the Addons section of About tab.
367
- *
368
- * @since 1.5.8
369
- *
370
- * @param string $plugin Plugin slug.
371
- * @param array $details Plugin details.
372
- * @param array $all_plugins List of all plugins.
373
- *
374
- * @return array
375
- */
376
- protected function get_plugin_data( $plugin, $details, $all_plugins ) {
377
-
378
- $have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
379
- $show_pro = false;
380
-
381
- $plugin_data = array();
382
-
383
- if ( $have_pro ) {
384
- if ( array_key_exists( $plugin, $all_plugins ) ) {
385
- if ( is_plugin_active( $plugin ) ) {
386
- $show_pro = true;
387
- }
388
- }
389
- if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
390
- $show_pro = true;
391
- }
392
- if ( $show_pro ) {
393
- $plugin = $details['pro']['plug'];
394
- $details = $details['pro'];
395
- }
396
- }
397
-
398
- if ( array_key_exists( $plugin, $all_plugins ) ) {
399
- if ( is_plugin_active( $plugin ) ) {
400
- // Status text/status.
401
- $plugin_data['status_class'] = 'status-active';
402
- $plugin_data['status_text'] = esc_html__( 'Active', 'instagram-feed' );
403
- // Button text/status.
404
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
405
- $plugin_data['action_text'] = esc_html__( 'Activated', 'instagram-feed' );
406
- $plugin_data['plugin_src'] = esc_attr( $plugin );
407
- } else {
408
- // Status text/status.
409
- $plugin_data['status_class'] = 'status-inactive';
410
- $plugin_data['status_text'] = esc_html__( 'Inactive', 'instagram-feed' );
411
- // Button text/status.
412
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
413
- $plugin_data['action_text'] = esc_html__( 'Activate', 'instagram-feed' );
414
- $plugin_data['plugin_src'] = esc_attr( $plugin );
415
- }
416
- } else {
417
- // Doesn't exist, install.
418
- // Status text/status.
419
- $plugin_data['status_class'] = 'status-download';
420
- if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
421
- $plugin_data['status_class'] = 'status-go-to-url';
422
- }
423
- $plugin_data['status_text'] = esc_html__( 'Not Installed', 'instagram-feed' );
424
- // Button text/status.
425
- $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
426
- $plugin_data['action_text'] = esc_html__( 'Install Plugin', 'instagram-feed' );
427
- $plugin_data['plugin_src'] = esc_url( $details['url'] );
428
- }
429
-
430
- $plugin_data['details'] = $details;
431
-
432
- return $plugin_data;
433
- }
434
-
435
- /**
436
- * Display the Getting Started tab content.
437
- *
438
- * @since 2.4/5.5
439
- */
440
- protected function output_getting_started() {
441
-
442
- $license = $this->get_license_type();
443
- ?>
444
-
445
- <div class="sbi-admin-about-section sbi-admin-about-section-first-form" style="display:flex;">
446
-
447
- <div class="sbi-admin-about-section-first-form-text">
448
-
449
- <h2>
450
- <?php esc_html_e( 'Creating Your First Feed', 'instagram-feed' ); ?>
451
- </h2>
452
-
453
- <p>
454
- <?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' ); ?>
455
- </p>
456
-
457
- <p>
458
- <?php esc_html_e( 'Navigate to Instagram Feed in the admin sidebar to go the Configure page.', 'instagram-feed' ); ?>
459
- </p>
460
-
461
- <p>
462
- <?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' ); ?>
463
- </p>
464
-
465
- <p>
466
- <?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' ); ?>
467
- </p>
468
-
469
- <ul class="list-plain">
470
- <li>
471
- <a href="https://smashballoon.com/display-multiple-instagram-feeds/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=multiplefeeds" target="_blank" rel="noopener noreferrer">
472
- <?php esc_html_e( 'How to Display Multiple Feeds', 'instagram-feed' ); ?>
473
- </a>
474
- </li>
475
- <li>
476
- <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">
477
- <?php esc_html_e( 'Connect a Different Account', 'instagram-feed' ); ?>
478
- </a>
479
- </li>
480
- <li>
481
- <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">
482
- <?php esc_html_e( 'Personal Vs Business Accounts', 'instagram-feed' ); ?>
483
- </a>
484
- </li>
485
- </ul>
486
-
487
- </div>
488
-
489
- <div class="sbi-admin-about-section-first-form-video">
490
- <iframe src="https://www.youtube-nocookie.com/embed/q6ZXVU4g970?rel=0" width="540" height="304" allow="autoplay; encrypted-media" title="<?php esc_attr_e( 'Watch a video', 'instagram-feed' ); ?>" allowfullscreen></iframe>
491
- </div>
492
-
493
- </div>
494
-
495
- <?php if ( ! in_array( $license, self::$licenses_top, true ) ) { ?>
496
- <div class="sbi-admin-about-section sbi-admin-about-section-hero">
497
-
498
- <div class="sbi-admin-about-section-hero-main">
499
- <h2>
500
- <?php esc_html_e( 'Get Instagram Feed Pro and Unlock all the Powerful Features', 'instagram-feed' ); ?>
501
- </h2>
502
-
503
- <p class="bigger">
504
- <?php
505
- echo wp_kses(
506
- __( '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' ),
507
- array(
508
- 'br' => array(),
509
- 'strong' => array(),
510
- )
511
- );
512
- ?>
513
- </p>
514
-
515
- <p>
516
- <?php
517
- printf(
518
- wp_kses(
519
- /* translators: %s - stars. */
520
- __( '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' ),
521
- array(
522
- 'strong' => array(),
523
- )
524
- ),
525
- '<i class="fa fa-star" aria-hidden="true"></i>' .
526
- '<i class="fa fa-star" aria-hidden="true"></i>' .
527
- '<i class="fa fa-star" aria-hidden="true"></i>' .
528
- '<i class="fa fa-star" aria-hidden="true"></i>' .
529
- '<i class="fa fa-star" aria-hidden="true"></i>'
530
- );
531
- ?>
532
- </p>
533
- </div>
534
-
535
- <div class="sbi-admin-about-section-hero-extra">
536
- <div class="sbi-admin-columns">
537
- <div class="sbi-admin-column-50">
538
- <ul class="list-features list-plain">
539
- <li>
540
- <i class="fa fa-check" aria-hidden="true"></i>
541
- <?php esc_html_e( 'Recent hashtag, top Hashtag, and tagged feeds.', 'instagram-feed' ); ?>
542
- </li>
543
- <li>
544
- <i class="fa fa-check" aria-hidden="true"></i>
545
- <?php esc_html_e( 'More layouts - masonry, highlight, and carousel.', 'instagram-feed' ); ?>
546
- </li>
547
- <li>
548
- <i class="fa fa-check" aria-hidden="true"></i>
549
- <?php esc_html_e( 'Captions, comments, dates, likes, and comment counts.', 'instagram-feed' ); ?>
550
- </li>
551
- <li>
552
- <i class="fa fa-check" aria-hidden="true"></i>
553
- <?php esc_html_e( 'Pop-up lightbox to view images and watch videos.', 'instagram-feed' ); ?>
554
- </li>
555
- <li>
556
- <i class="fa fa-check" aria-hidden="true"></i>
557
- <?php esc_html_e( 'Filter feeds by word or hashtag.', 'instagram-feed' ); ?>
558
- </li>
559
- </ul>
560
- </div>
561
- <div class="sbi-admin-column-50 sbi-admin-column-last">
562
- <ul class="list-features list-plain">
563
- <li>
564
- <i class="fa fa-check" aria-hidden="true"></i>
565
- <?php esc_html_e( 'Display Instagram stories.', 'instagram-feed' ); ?>
566
- </li>
567
- <li>
568
- <i class="fa fa-check" aria-hidden="true"></i>
569
- <?php esc_html_e( 'Powerful visual moderation system.', 'instagram-feed' ); ?>
570
- </li>
571
- <li>
572
- <i class="fa fa-check" aria-hidden="true"></i>
573
- <?php esc_html_e( 'More customization for feed headers.', 'instagram-feed' ); ?>
574
- </li>
575
- <li>
576
- <i class="fa fa-check" aria-hidden="true"></i>
577
- <?php esc_html_e( 'Even more customization options for your feed.', 'instagram-feed' ); ?>
578
- </li>
579
- <li>
580
- <i class="fa fa-check" aria-hidden="true"></i>
581
- <?php esc_html_e( '"Shoppable" feeds.', 'instagram-feed' ); ?>
582
- </li>
583
- </ul>
584
- </div>
585
- </div>
586
-
587
- <hr />
588
-
589
- <h3 class="call-to-action">
590
- <?php
591
- $type = 'lite' === $license ? 'free' : 'pro';
592
- ?>
593
- <a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-<?php echo esc_attr( $type ); ?>&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">
594
- <?php esc_html_e( 'Get Instagram Feed Pro Today and Unlock all the Powerful Features', 'instagram-feed' ); ?>
595
- </a>
596
- </h3>
597
-
598
- <?php if ( 'lite' === $license ) { ?>
599
- <p>
600
- <?php
601
- echo wp_kses(
602
- __( 'Bonus: Instagram Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'instagram-feed' ),
603
- array(
604
- 'span' => array(
605
- 'class' => array(),
606
- ),
607
- )
608
- );
609
- ?>
610
- </p>
611
- <?php } ?>
612
- </div>
613
-
614
- </div>
615
- <?php } ?>
616
-
617
-
618
- <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
619
- <div class="sbi-admin-column-20">
620
- <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/steps.png' ); ?>" alt="">
621
- </div>
622
- <div class="sbi-admin-column-80">
623
- <h2>
624
- <?php esc_html_e( 'Detailed Step-By-Step Guide', 'instagram-feed' ); ?>
625
- </h2>
626
-
627
- <p>
628
- <?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' ); ?>
629
- </p>
630
-
631
- <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">
632
- <?php esc_html_e( 'Read Documentation', 'instagram-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
633
- </a>
634
- </div>
635
- </div>
636
-
637
- <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
638
- <div class="sbi-admin-column-20">
639
- <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/api-error.png' ); ?>" alt="">
640
- </div>
641
- <div class="sbi-admin-column-80">
642
- <h2>
643
- <?php esc_html_e( 'Troubleshoot Connection and API Errors', 'instagram-feed' ); ?>
644
- </h2>
645
-
646
- <p>
647
- <?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' ); ?>
648
- </p>
649
-
650
- <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">
651
- <?php esc_html_e( 'Read Documentation', 'instagram-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
652
- </a>
653
- </div>
654
- </div>
655
-
656
- <?php
657
- }
658
-
659
- /**
660
- * Get the next license type. Helper for Versus tab content.
661
- *
662
- * @since 1.5.5
663
- *
664
- * @param string $current Current license type slug.
665
- *
666
- * @return string Next license type slug.
667
- */
668
- protected function get_next_license( $current ) {
669
-
670
- $current = ucfirst( $current );
671
- $license_pairs = array(
672
- 'Lite' => 'Pro',
673
- 'Basic' => 'Pro',
674
- 'Plus' => 'Pro',
675
- 'Pro' => 'Elite',
676
- );
677
-
678
- return ! empty( $license_pairs[ $current ] ) ? $license_pairs[ $current ] : 'Elite';
679
- }
680
-
681
- /**
682
- * Display the Versus tab content.
683
- *
684
- * @since 2.4/5.5
685
- */
686
- protected function output_versus() {
687
- $license = 'lite';
688
- $next_license = 'pro';
689
- ?>
690
-
691
- <div class="sbi-admin-about-section sbi-admin-about-section-squashed">
692
- <h1 class="centered">
693
- <strong><?php echo esc_html( ucfirst( $license ) ); ?></strong> vs <strong><?php echo esc_html( ucfirst( $next_license ) ); ?></strong>
694
- </h1>
695
-
696
- <p class="centered" id="sbi_tabledesc">
697
- <?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' ); ?>
698
- </p>
699
- </div>
700
-
701
- <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-hero sbi-admin-about-section-table">
702
-
703
- <div class="sbi-admin-about-section-hero-main sbi-admin-columns">
704
- <div class="sbi-admin-column-33">
705
- <h3 class="no-margin">
706
- <?php esc_html_e( 'Feature', 'instagram-feed' ); ?>
707
- </h3>
708
- </div>
709
- <div class="sbi-admin-column-33">
710
- <h3 class="no-margin">
711
- <?php echo esc_html( ucfirst( $license ) ); ?>
712
- </h3>
713
- </div>
714
- <div class="sbi-admin-column-33">
715
- <h3 class="no-margin">
716
- <?php echo esc_html( ucfirst( $next_license ) ); ?>
717
- </h3>
718
- </div>
719
- </div>
720
- <div class="sbi-admin-about-section-hero-extra no-padding sbi-admin-columns">
721
-
722
- <table aria-describedby="sbi_tabledesc">
723
- <?php
724
- foreach ( self::$licenses_features as $slug => $name ) {
725
- $current = $this->get_license_data( $slug, $license );
726
- $next = $this->get_license_data( $slug, strtolower( $next_license ) );
727
-
728
- if ( empty( $current ) || empty( $next ) ) {
729
- continue;
730
- }
731
- ?>
732
- <tr class="sbi-admin-columns">
733
- <th scope="row" class="sbi-admin-column-33">
734
- <p><?php echo esc_html( $name ); ?></p>
735
- </th>
736
- <td class="sbi-admin-column-33">
737
- <?php if ( is_array( $current ) ) : ?>
738
- <p class="features-<?php echo esc_attr( $current['status'] ); ?>">
739
- <?php echo wp_kses_post( implode( '<br>', $current['text'] ) ); ?>
740
- </p>
741
- <?php endif; ?>
742
- </td>
743
- <td class="sbi-admin-column-33">
744
- <?php if ( is_array( $current ) ) : ?>
745
- <p class="features-full">
746
- <?php echo wp_kses_post( implode( '<br>', $next['text'] ) ); ?>
747
- </p>
748
- <?php endif; ?>
749
- </td>
750
- </tr>
751
- <?php
752
- }
753
- ?>
754
- </table>
755
-
756
- </div>
757
-
758
- </div>
759
-
760
- <div class="sbi-admin-about-section sbi-admin-about-section-hero">
761
- <div class="sbi-admin-about-section-hero-main no-border">
762
- <h3 class="call-to-action centered">
763
- <?php
764
- $type = 'lite' === $license ? 'free' : 'pro';
765
- ?>
766
- <a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-<?php echo esc_attr( $type ); ?>&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">
767
- <?php
768
- printf( /* translators: %s - next license level. */
769
- esc_html__( 'Get Instagram Feed Pro Today and Unlock all the Powerful Features', 'instagram-feed' ),
770
- esc_html( $next_license )
771
- );
772
- ?>
773
- </a>
774
- </h3>
775
-
776
- <?php if ( 'lite' === $license ) { ?>
777
- <p class="centered">
778
- <?php
779
- echo wp_kses(
780
- __( 'Bonus: Instagram Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'instagram-feed' ),
781
- array(
782
- 'span' => array(
783
- 'class' => array(),
784
- ),
785
- )
786
- );
787
- ?>
788
- </p>
789
- <?php } ?>
790
- </div>
791
- </div>
792
-
793
- <?php
794
- }
795
-
796
- /**
797
- * List of AM plugins that we propose to install.
798
- *
799
- * @since 2.4/5.5
800
- *
801
- * @return array
802
- */
803
- protected function get_am_plugins() {
804
-
805
- $images_url = SBI_PLUGIN_URL . 'img/about/';
806
-
807
- return array(
808
- 'custom-facebook-feed/custom-facebook-feed.php' => array(
809
- 'icon' => $images_url . 'plugin-fb.png',
810
- 'name' => esc_html__( 'Custom Facebook Feed', 'instagram-feed' ),
811
- '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' ),
812
- 'url' => 'https://downloads.wordpress.org/plugin/custom-facebook-feed.zip',
813
- 'pro' => array(
814
- 'plug' => 'custom-facebook-feed-pro/custom-facebook-feed.php',
815
- 'icon' => $images_url . 'plugin-fb.png',
816
- 'name' => esc_html__( 'Custom Facebook Feed Pro', 'instagram-feed' ),
817
- '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' ),
818
- 'url' => 'https://smashballoon.com/custom-facebook-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=cffinstaller',
819
- 'act' => 'go-to-url',
820
- ),
821
- ),
822
-
823
- 'custom-twitter-feeds/custom-twitter-feed.php' => array(
824
- 'icon' => $images_url . 'plugin-tw.jpg',
825
- 'name' => esc_html__( 'Custom Twitter Feeds', 'instagram-feed' ),
826
- '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' ),
827
- 'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
828
- 'pro' => array(
829
- 'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
830
- 'icon' => $images_url . 'plugin-tw.jpg',
831
- 'name' => esc_html__( 'Custom Twitter Feeds Pro', 'instagram-feed' ),
832
- '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' ),
833
- 'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_campaign=instagram-free&utm_source=cross&utm_medium=ctfinstaller',
834
- 'act' => 'go-to-url',
835
- ),
836
- ),
837
-
838
- 'feeds-for-youtube/youtube-feed.php' => array(
839
- 'icon' => $images_url . 'plugin-yt.png',
840
- 'name' => esc_html__( 'Feeds for YouTube', 'instagram-feed' ),
841
- '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' ),
842
- 'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
843
- 'pro' => array(
844
- 'plug' => 'youtube-feed-pro/youtube-feed.php',
845
- 'icon' => $images_url . 'plugin-yt.png',
846
- 'name' => esc_html__( 'Feeds for YouTube Pro', 'instagram-feed' ),
847
- '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' ),
848
- 'url' => 'https://smashballoon.com/youtube-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=sbyinstaller',
849
- 'act' => 'go-to-url',
850
- ),
851
- ),
852
-
853
- 'wpforms-lite/wpforms.php' => array(
854
- 'icon' => $images_url . 'plugin-wpforms.png',
855
- 'name' => esc_html__( 'WPForms', 'instagram-feed' ),
856
- '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' ),
857
- 'url' => 'https://downloads.wordpress.org/plugin/wpforms-lite.zip',
858
- 'pro' => array(
859
- 'plug' => 'wpforms/wpforms.php',
860
- 'icon' => $images_url . 'plugin-wpforms.png',
861
- 'name' => esc_html__( 'WPForms', 'instagram-feed' ),
862
- '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' ),
863
- 'url' => 'https://wpforms.com/lite-upgrade/?utm_source=WordPress&utm_campaign=liteplugin&utm_medium=sbi-about-page',
864
- 'act' => 'go-to-url',
865
- ),
866
- ),
867
-
868
- 'google-analytics-for-wordpress/googleanalytics.php' => array(
869
- 'icon' => $images_url . 'plugin-mi.png',
870
- 'name' => esc_html__( 'MonsterInsights', 'instagram-feed' ),
871
- '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' ),
872
- 'url' => 'https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.zip',
873
- 'pro' => array(
874
- 'plug' => 'google-analytics-premium/googleanalytics-premium.php',
875
- 'icon' => $images_url . 'plugin-mi.png',
876
- 'name' => esc_html__( 'MonsterInsights Pro', 'instagram-feed' ),
877
- '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' ),
878
- 'url' => 'https://www.monsterinsights.com/?utm_source=proplugin&utm_medium=about-page&utm_campaign=pluginurl&utm_content=7%2E0%2E0',
879
- 'act' => 'go-to-url',
880
- ),
881
- ),
882
-
883
- 'optinmonster/optin-monster-wp-api.php' => array(
884
- 'icon' => $images_url . 'plugin-om.png',
885
- 'name' => esc_html__( 'OptinMonster', 'instagram-feed' ),
886
- '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' ),
887
- 'url' => 'https://downloads.wordpress.org/plugin/optinmonster.zip',
888
- ),
889
-
890
- 'wp-mail-smtp/wp_mail_smtp.php' => array(
891
- 'icon' => $images_url . 'plugin-smtp.png',
892
- 'name' => esc_html__( 'WP Mail SMTP', 'instagram-feed' ),
893
- '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' ),
894
- 'url' => 'https://downloads.wordpress.org/plugin/wp-mail-smtp.zip',
895
- 'pro' => array(
896
- 'plug' => 'wp-mail-smtp-pro/wp_mail_smtp.php',
897
- 'icon' => $images_url . 'plugin-smtp.png',
898
- 'name' => esc_html__( 'WP Mail SMTP Pro', 'instagram-feed' ),
899
- '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' ),
900
- 'url' => 'https://wpmailsmtp.com/pricing/',
901
- 'act' => 'go-to-url',
902
- ),
903
- ),
904
-
905
- 'rafflepress/rafflepress.php' => array(
906
- 'icon' => $images_url . 'plugin-rp.png',
907
- 'name' => esc_html__( 'RafflePress', 'instagram-feed' ),
908
- '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' ),
909
- 'url' => 'https://downloads.wordpress.org/plugin/rafflepress.zip',
910
- 'pro' => array(
911
- 'plug' => 'rafflepress-pro/rafflepress-pro.php',
912
- 'icon' => $images_url . 'plugin-rp.png',
913
- 'name' => esc_html__( 'RafflePress Pro', 'instagram-feed' ),
914
- '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' ),
915
- 'url' => 'https://rafflepress.com/pricing/',
916
- 'act' => 'go-to-url',
917
- ),
918
- ),
919
-
920
- 'all-in-one-seo-pack/all_in_one_seo_pack.php' => array(
921
- 'icon' => $images_url . 'plugin-seo.png',
922
- 'name' => esc_html__( 'All In One SEO Pack', 'instagram-feed' ),
923
- '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' ),
924
- 'url' => 'https://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip',
925
- ),
926
- );
927
- }
928
-
929
- /**
930
- * Get the array of data that compared the license data.
931
- *
932
- * @since 2.4/5.5
933
- *
934
- * @param string $feature Feature name.
935
- * @param string $license License type to get data for.
936
- *
937
- * @return array|false
938
- */
939
- protected function get_license_data( $feature, $license ) {
940
-
941
- $data = array(
942
- 'entries' => array(
943
- 'lite' => array(
944
- 'status' => 'partial',
945
- 'text' => array(
946
- '<strong>' . esc_html__( 'User feeds only', 'instagram-feed' ) . '</strong>',
947
- ),
948
- ),
949
- 'basic' => array(
950
- 'status' => 'full',
951
- 'text' => array(
952
- '<strong>' . esc_html__( 'User, Hashtag, and Tagged Feeds', 'instagram-feed' ) . '</strong>',
953
- ),
954
- ),
955
- 'plus' => array(
956
- 'status' => 'full',
957
- 'text' => array(
958
- '<strong>' . esc_html__( 'Complete Entry Management inside WordPress', 'instagram-feed' ) . '</strong>',
959
- ),
960
- ),
961
- 'pro' => array(
962
- 'status' => 'full',
963
- 'text' => array(
964
- '<strong>' . esc_html__( 'User, hashtag, and tagged feeds', 'instagram-feed' ) . '</strong>',
965
- ),
966
- ),
967
- ),
968
- 'fields' => array(
969
- 'lite' => array(
970
- 'status' => 'partial',
971
- 'text' => array(
972
- '<strong>' . esc_html__( 'Grid layout only', 'instagram-feed' ) . '</strong>',
973
- ),
974
- ),
975
- 'basic' => array(
976
- 'status' => 'full',
977
- 'text' => array(
978
- '<strong>' . esc_html__( 'Access to all Standard and Fancy Fields', 'instagram-feed' ) . '</strong>',
979
- esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'instagram-feed' ),
980
- ),
981
- ),
982
- 'plus' => array(
983
- 'status' => 'full',
984
- 'text' => array(
985
- '<strong>' . esc_html__( 'Access to all Standard and Fancy Fields', 'instagram-feed' ) . '</strong>',
986
- esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'instagram-feed' ),
987
- ),
988
- ),
989
- 'pro' => array(
990
- 'status' => 'full',
991
- 'text' => array(
992
- '<strong>' . esc_html__( 'Grid, highlight, masonry, and carousel layouts', 'instagram-feed' ) . '</strong>',
993
- ),
994
- ),
995
- ),
996
- 'conditionals' => array(
997
- 'lite' => array(
998
- 'status' => 'partial',
999
- 'text' => array(
1000
- '<strong>' . esc_html__( 'Image, carousel, and video thumbnails', 'instagram-feed' ) . '</strong>',
1001
- ),
1002
- ),
1003
- 'basic' => array(
1004
- 'status' => 'full',
1005
- 'text' => array(
1006
- '<strong>' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'instagram-feed' ) . '</strong>',
1007
- ),
1008
- ),
1009
- 'plus' => array(
1010
- 'status' => 'full',
1011
- 'text' => array(
1012
- '<strong>' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'instagram-feed' ) . '</strong>',
1013
- ),
1014
- ),
1015
- 'pro' => array(
1016
- 'status' => 'full',
1017
- 'text' => array(
1018
- '<strong>' . esc_html__( 'Display images, swipe through carousel posts, and play videos in a pop-up lightbox', 'instagram-feed' ) . '</strong>',
1019
- ),
1020
- ),
1021
- ),
1022
- 'templates' => array(
1023
- 'lite' => array(
1024
- 'status' => 'partial',
1025
- 'text' => array(
1026
- '<strong>' . esc_html__( 'Images and link only', 'instagram-feed' ) . '</strong>',
1027
- ),
1028
- ),
1029
- 'basic' => array(
1030
- 'status' => 'partial',
1031
- 'text' => array(
1032
- '<strong>' . esc_html__( 'Basic Form Templates', 'instagram-feed' ) . '</strong>',
1033
- ),
1034
- ),
1035
- 'plus' => array(
1036
- 'status' => 'partial',
1037
- 'text' => array(
1038
- '<strong>' . esc_html__( 'Basic Form Templates', 'instagram-feed' ) . '</strong>',
1039
- ),
1040
- ),
1041
- 'pro' => array(
1042
- 'status' => 'full',
1043
- 'text' => array(
1044
- '<strong>' . esc_html__( 'Thumbnails, dates, caption, comments, like counts, and comment counts.', 'instagram-feed' ) . '</strong>',
1045
- ),
1046
- ),
1047
- ),
1048
- 'marketing' => array(
1049
- 'lite' => array(
1050
- 'status' => 'none',
1051
- 'text' => array(
1052
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1053
- ),
1054
- ),
1055
- 'basic' => array(
1056
- 'status' => 'partial',
1057
- 'text' => array(
1058
- '<strong>' . esc_html__( 'Limited Marketing Integration', 'instagram-feed' ) . '</strong>',
1059
- esc_html__( 'Constant Contact only', 'instagram-feed' ),
1060
- ),
1061
- ),
1062
- 'plus' => array(
1063
- 'status' => 'partial',
1064
- 'text' => array(
1065
- '<strong>' . esc_html__( '6 Email Marketing Integrations', 'instagram-feed' ) . '</strong>',
1066
- esc_html__( 'Constant Contact, Mailchimp, AWeber, GetResponse, Campaign Monitor, and Drip', 'instagram-feed' ),
1067
- ),
1068
- ),
1069
- 'pro' => array(
1070
- 'status' => 'full',
1071
- 'text' => array(
1072
- '<strong>' . esc_html__( 'Display your latest Instagram story in a pop-up lightbox', 'instagram-feed' ) . '</strong>',
1073
- ),
1074
- ),
1075
- ),
1076
- 'payments' => array(
1077
- 'lite' => array(
1078
- 'status' => 'none',
1079
- 'text' => array(
1080
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1081
- ),
1082
- ),
1083
- 'basic' => array(
1084
- 'status' => 'none',
1085
- 'text' => array(
1086
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1087
- ),
1088
- ),
1089
- 'plus' => array(
1090
- 'status' => 'none',
1091
- 'text' => array(
1092
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1093
- ),
1094
- ),
1095
- 'pro' => array(
1096
- 'status' => 'full',
1097
- 'text' => array(
1098
- '<strong>' . esc_html__( 'Visual moderation system for removing posts or creating a "white list" of selected posts', 'instagram-feed' ) . '</strong>',
1099
- ),
1100
- ),
1101
- ),
1102
- 'surveys' => array(
1103
- 'lite' => array(
1104
- 'status' => 'partial',
1105
- 'text' => array(
1106
- '<strong>' . esc_html__( 'Standard or centered header', 'instagram-feed' ) . '</strong>',
1107
- ),
1108
- ),
1109
- 'basic' => array(
1110
- 'status' => 'none',
1111
- 'text' => array(
1112
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1113
- ),
1114
- ),
1115
- 'plus' => array(
1116
- 'status' => 'none',
1117
- 'text' => array(
1118
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1119
- ),
1120
- ),
1121
- 'pro' => array(
1122
- 'status' => 'full',
1123
- 'text' => array(
1124
- '<strong>' . esc_html__( 'Standard, centered, or boxed header that includes follower and post counts', 'instagram-feed' ) . '</strong>',
1125
- ),
1126
- ),
1127
- ),
1128
- 'advanced' => array(
1129
- 'lite' => array(
1130
- 'status' => 'partial',
1131
- 'text' => array(
1132
- '<strong>' . esc_html__( 'Posts link to the same post on Instagram', 'instagram-feed' ) . '</strong>',
1133
- ),
1134
- ),
1135
- 'basic' => array(
1136
- 'status' => 'partial',
1137
- 'text' => array(
1138
- '<strong>' . esc_html__( 'Limited Advanced Features', 'instagram-feed' ) . '</strong>',
1139
- esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'instagram-feed' ),
1140
- ),
1141
- ),
1142
- 'plus' => array(
1143
- 'status' => 'partial',
1144
- 'text' => array(
1145
- '<strong>' . esc_html__( 'Limited Advanced Features', 'instagram-feed' ) . '</strong>',
1146
- esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'instagram-feed' ),
1147
- ),
1148
- ),
1149
- 'pro' => array(
1150
- 'status' => 'full',
1151
- 'text' => array(
1152
- '<strong>' . esc_html__( 'Allow your posts to link to a URL in the caption or view in a lightbox', 'instagram-feed' ) . '</strong>',
1153
- ),
1154
- ),
1155
- ),
1156
- 'addons' => array(
1157
- 'lite' => array(
1158
- 'status' => 'none',
1159
- 'text' => array(
1160
- '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1161
- ),
1162
- ),
1163
- 'basic' => array(
1164
- 'status' => 'partial',
1165
- 'text' => array(
1166
- '<strong>' . esc_html__( 'Custom Captcha Addon included', 'instagram-feed' ) . '</strong>',
1167
- ),
1168
- ),
1169
- 'plus' => array(
1170
- 'status' => 'partial',
1171
- 'text' => array(
1172
- '<strong>' . esc_html__( 'Email Marketing Addons included', 'instagram-feed' ) . '</strong>',
1173
- ),
1174
- ),
1175
- 'pro' => array(
1176
- 'status' => 'full',
1177
- 'text' => array(
1178
- '<strong>' . esc_html__( 'Filter by word or hashtag', 'instagram-feed' ) . '</strong>',
1179
- ),
1180
- ),
1181
- ),
1182
- 'support' => array(
1183
- 'lite' => array(
1184
- 'status' => 'partial',
1185
- 'text' => array(
1186
- '<strong>' . esc_html__( 'Limited support', 'instagram-feed' ) . '</strong>',
1187
- ),
1188
- ),
1189
- 'basic' => array(
1190
- 'status' => 'partial',
1191
- 'text' => array(
1192
- '<strong>' . esc_html__( 'Standard Support', 'instagram-feed' ) . '</strong>',
1193
- ),
1194
- ),
1195
- 'plus' => array(
1196
- 'status' => 'partial',
1197
- 'text' => array(
1198
- '<strong>' . esc_html__( 'Standard Support', 'instagram-feed' ) . '</strong>',
1199
- ),
1200
- ),
1201
- 'pro' => array(
1202
- 'status' => 'full',
1203
- 'text' => array(
1204
- '<strong>' . esc_html__( 'Priority support', 'instagram-feed' ) . '</strong>',
1205
- ),
1206
- ),
1207
- 'elite' => array(
1208
- 'status' => 'full',
1209
- 'text' => array(
1210
- '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1211
- ),
1212
- ),
1213
- 'ultimate' => array(
1214
- 'status' => 'full',
1215
- 'text' => array(
1216
- '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1217
- ),
1218
- ),
1219
- 'agency' => array(
1220
- 'status' => 'full',
1221
- 'text' => array(
1222
- '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1223
- ),
1224
- ),
1225
- ),
1226
- 'sites' => array(
1227
- 'basic' => array(
1228
- 'status' => 'partial',
1229
- 'text' => array(
1230
- '<strong>' . esc_html__( '1 Site', 'instagram-feed' ) . '</strong>',
1231
- ),
1232
- ),
1233
- 'plus' => array(
1234
- 'status' => 'partial',
1235
- 'text' => array(
1236
- '<strong>' . esc_html__( '3 Sites', 'instagram-feed' ) . '</strong>',
1237
- ),
1238
- ),
1239
- 'pro' => array(
1240
- 'status' => 'full',
1241
- 'text' => array(
1242
- '<strong>' . esc_html__( '5 Sites', 'instagram-feed' ) . '</strong>',
1243
- ),
1244
- ),
1245
- 'elite' => array(
1246
- 'status' => 'full',
1247
- 'text' => array(
1248
- '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1249
- ),
1250
- ),
1251
- 'ultimate' => array(
1252
- 'status' => 'full',
1253
- 'text' => array(
1254
- '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1255
- ),
1256
- ),
1257
- 'agency' => array(
1258
- 'status' => 'full',
1259
- 'text' => array(
1260
- '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1261
- ),
1262
- ),
1263
- ),
1264
- );
1265
-
1266
- // Wrong feature?
1267
- if ( ! isset( $data[ $feature ] ) ) {
1268
- return false;
1269
- }
1270
-
1271
- // Is a top level license?
1272
- $is_licenses_top = in_array( $license, self::$licenses_top, true );
1273
-
1274
- // Wrong license type?
1275
- if ( ! isset( $data[ $feature ][ $license ] ) && ! $is_licenses_top ) {
1276
- return false;
1277
- }
1278
-
1279
- // Some licenses have partial data.
1280
- if ( isset( $data[ $feature ][ $license ] ) ) {
1281
- return $data[ $feature ][ $license ];
1282
- }
1283
-
1284
- // Top level plans has no feature difference with `pro` plan in most cases.
1285
- return $is_licenses_top ? $data[ $feature ]['pro'] : $data[ $feature ][ $license ];
1286
- }
1287
-
1288
- /**
1289
- * Get the current installation license type (always lowercase).
1290
- *
1291
- * @since 2.4/5.5
1292
- *
1293
- * @return string
1294
- */
1295
- protected function get_license_type() {
1296
- return 'lite';
1297
- }
1298
- }
1299
-
1300
- 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__( 'Instagram Stories', 'instagram-feed' ),
79
+ 'payments' => esc_html__( 'Feed Moderation', 'instagram-feed' ),
80
+ 'surveys' => esc_html__( 'Header Display', 'instagram-feed' ),
81
+ 'advanced' => esc_html__( 'Post Linking', 'instagram-feed' ),
82
+ 'support' => esc_html__( 'Customer Support', 'instagram-feed' ),
83
+ );
84
+
85
+ // Maybe load tools page.
86
+ add_action( 'admin_init', array( $this, 'init' ) );
87
+ }
88
+
89
+ /**
90
+ * Determining if the user is viewing the our page, if so, party on.
91
+ *
92
+ * @since 2.4/5.5
93
+ */
94
+ public function init() {
95
+
96
+ // Check what page we are on.
97
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
98
+ $page = ! empty( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_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 ( 'pro' === $license || ! in_array( $license, self::$licenses_top, true ) ) {
121
+ $vs_tab_name = sprintf( /* translators: %1$s - current license type, %2$s - suggested license type. */
122
+ esc_html__( '%1$s vs %2$s', 'instagram-feed' ),
123
+ ucfirst( $license ),
124
+ $this->get_next_license( $license )
125
+ );
126
+
127
+ $this->views[ $vs_tab_name ] = array( 'versus' );
128
+ }
129
+
130
+ // Determine the current active settings tab.
131
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
132
+ $this->view = ! empty( $_GET['view'] ) ? esc_html( wp_unslash( $_GET['view'] ) ) : self::DEFAULT_TAB;
133
+
134
+ // If the user tries to load an invalid view - fallback to About Us.
135
+ if (
136
+ ! in_array( $this->view, call_user_func_array( 'array_merge', array_values( $this->views ) ), true ) &&
137
+ ! has_action( 'sbi_admin_about_display_tab_' . sanitize_key( $this->view ) )
138
+ ) {
139
+ $this->view = self::DEFAULT_TAB;
140
+ }
141
+
142
+ add_action( 'sbi_admin_page', array( $this, 'output' ) );
143
+
144
+ // Hook for addons.
145
+ do_action( 'sbi_admin_about_init' );
146
+ }
147
+
148
+ /**
149
+ * Enqueue assets for the the page.
150
+ *
151
+ * @since 2.4/5.5
152
+ */
153
+ public function enqueues() {
154
+
155
+ wp_enqueue_script(
156
+ 'jquery-matchheight',
157
+ SBI_PLUGIN_URL . 'js/jquery.matchHeight-min.js',
158
+ array( 'jquery' ),
159
+ '0.7.0',
160
+ false
161
+ );
162
+ }
163
+
164
+ /**
165
+ * Output the basic page structure.
166
+ *
167
+ * @since 2.4/5.5
168
+ */
169
+ public function output() {
170
+
171
+ $show_nav = false;
172
+ foreach ( $this->views as $view ) {
173
+ if ( in_array( $this->view, (array) $view, true ) ) {
174
+ $show_nav = true;
175
+ break;
176
+ }
177
+ }
178
+ ?>
179
+
180
+ <div id="sbi-admin-about" class="wrap sbi-admin-wrap">
181
+
182
+ <?php
183
+ if ( $show_nav ) {
184
+ $license = $this->get_license_type();
185
+ $next_license = $this->get_next_license( $license );
186
+ echo '<ul class="sbi-admin-tabs">';
187
+ foreach ( $this->views as $label => $view ) {
188
+ $class = in_array( $this->view, $view, true ) ? 'active' : '';
189
+ echo '<li>';
190
+ printf(
191
+ '<a href="%s" class="%s">%s</a>',
192
+ esc_url( admin_url( 'admin.php?page=' . self::SLUG . '&view=' . sanitize_key( $view[0] ) ) ),
193
+ esc_attr( $class ),
194
+ esc_html( $label )
195
+ );
196
+ echo '</li>';
197
+ }
198
+ echo '</ul>';
199
+ }
200
+ ?>
201
+
202
+ <h1 class="sbi-h1-placeholder"></h1>
203
+
204
+ <?php
205
+ switch ( $this->view ) {
206
+ case 'about':
207
+ $this->output_about();
208
+ break;
209
+ case 'getting-started':
210
+ $this->output_getting_started();
211
+ break;
212
+ case 'versus':
213
+ $this->output_versus();
214
+ break;
215
+ default:
216
+ do_action( 'sbi_admin_about_display_tab_' . sanitize_key( $this->view ) );
217
+ break;
218
+ }
219
+ ?>
220
+
221
+ </div>
222
+
223
+ <?php
224
+ }
225
+
226
+ /**
227
+ * Display the About tab content.
228
+ *
229
+ * @since 2.4/5.5
230
+ */
231
+ protected function output_about() {
232
+
233
+ $this->output_about_info();
234
+ $this->output_about_addons();
235
+ }
236
+
237
+ /**
238
+ * Display the General Info section of About tab.
239
+ *
240
+ * @since 1.5.8
241
+ */
242
+ protected function output_about_info() {
243
+
244
+ ?>
245
+
246
+ <div class="sbi-admin-about-section sbi-admin-columns">
247
+
248
+ <div class="sbi-admin-about-text" style="min-height: 340px;">
249
+ <h3>
250
+ <?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' ); ?>
251
+ </h3>
252
+
253
+ <p>
254
+ <?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' ); ?>
255
+ </p>
256
+ <p>
257
+ <?php esc_html_e( 'We’re a small, but dedicated, team based in Minnesota in the USA.', 'instagram-feed' ); ?>
258
+ </p>
259
+ <!-- <p>
260
+ <?php
261
+ printf(
262
+ wp_kses(
263
+ /* translators: %1$s - WPBeginner URL, %2$s - OptinMonster URL, %3$s - MonsterInsights URL, %4$s - RafflePress URL. */
264
+ __( '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' ),
265
+ array(
266
+ 'a' => array(
267
+ 'href' => array(),
268
+ 'rel' => array(),
269
+ 'target' => array(),
270
+ ),
271
+ )
272
+ ),
273
+ 'https://www.wpbeginner.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
274
+ 'https://optinmonster.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
275
+ 'https://www.monsterinsights.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi',
276
+ 'https://rafflepress.com/?utm_source=sbiplugin&utm_medium=pluginaboutpage&utm_campaign=aboutsbi'
277
+ );
278
+ ?>
279
+ </p>
280
+ <p>
281
+ <?php esc_html_e( 'Yup, we know a thing or two about building awesome products that customers love.', 'instagram-feed' ); ?>
282
+ </p> -->
283
+ </div>
284
+
285
+ <div class="sbi-admin-about-image sbi-admin-column-last">
286
+ <figure>
287
+ <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/team.jpg' ); ?>" alt="<?php esc_attr_e( 'The Sbi Team photo', 'instagram-feed' ); ?>">
288
+ <figcaption>
289
+ <?php esc_html_e( 'The Smash Balloon Team', 'instagram-feed' ); ?><br>
290
+ </figcaption>
291
+ </figure>
292
+ </div>
293
+
294
+ </div>
295
+ <?php
296
+ }
297
+
298
+ /**
299
+ * Display the Addons section of About tab.
300
+ *
301
+ * @since 1.5.8
302
+ */
303
+ protected function output_about_addons() {
304
+
305
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) || version_compare( PHP_VERSION, '5.3.0' ) <= 0
306
+ || version_compare( PHP_VERSION, '5.3.0' ) <= 0
307
+ || version_compare( get_bloginfo( 'version' ), '4.6', '<' ) ) {
308
+ return;
309
+ }
310
+
311
+ $all_plugins = get_plugins();
312
+ $am_plugins = $this->get_am_plugins();
313
+
314
+ ?>
315
+ <div id="sbi-admin-addons">
316
+ <div class="addons-container">
317
+ <h3><?php esc_html_e( 'Our Other Plugins', 'instagram-feed' ); ?></h3>
318
+ <?php
319
+ foreach ( $am_plugins as $plugin => $details ) :
320
+
321
+ $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
322
+
323
+ if ( $plugin === 'wpforms-lite/wpforms.php' ) {
324
+ echo '<h3>' . esc_html__( 'Plugins We Recommend', 'instagram-feed' ) . '</h3>';
325
+ }
326
+
327
+ ?>
328
+ <div class="addon-container">
329
+ <div class="addon-item">
330
+ <div class="details sbi-clear">
331
+ <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>" alt="<?php esc_attr_e( 'Plugin thumbnail', 'instagram-feed' ); ?>">
332
+ <h5 class="addon-name">
333
+ <?php echo esc_html( $plugin_data['details']['name'] ); ?>
334
+ </h5>
335
+ <p class="addon-desc">
336
+ <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
337
+ </p>
338
+ </div>
339
+ <div class="actions sbi-clear">
340
+ <div class="status">
341
+ <strong>
342
+ <?php
343
+ printf(
344
+ /* translators: %s - addon status label. */
345
+ esc_html__( 'Status: %s', 'instagram-feed' ),
346
+ '<span class="status-label ' . esc_attr( $plugin_data['status_class'] ) . '">' . wp_kses_post( $plugin_data['status_text'] ) . '</span>'
347
+ );
348
+ ?>
349
+ </strong>
350
+ </div>
351
+ <div class="action-button">
352
+ <button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
353
+ <?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
354
+ </button>
355
+ </div>
356
+ </div>
357
+ </div>
358
+ </div>
359
+ <?php endforeach; ?>
360
+ </div>
361
+ </div>
362
+ <?php
363
+ }
364
+
365
+ /**
366
+ * Get AM plugin data to display in the Addons section of About tab.
367
+ *
368
+ * @since 1.5.8
369
+ *
370
+ * @param string $plugin Plugin slug.
371
+ * @param array $details Plugin details.
372
+ * @param array $all_plugins List of all plugins.
373
+ *
374
+ * @return array
375
+ */
376
+ protected function get_plugin_data( $plugin, $details, $all_plugins ) {
377
+
378
+ $have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
379
+ $show_pro = false;
380
+
381
+ $plugin_data = array();
382
+
383
+ if ( $have_pro ) {
384
+ if ( array_key_exists( $plugin, $all_plugins ) ) {
385
+ if ( is_plugin_active( $plugin ) ) {
386
+ $show_pro = true;
387
+ }
388
+ }
389
+ if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
390
+ $show_pro = true;
391
+ }
392
+ if ( $show_pro ) {
393
+ $plugin = $details['pro']['plug'];
394
+ $details = $details['pro'];
395
+ }
396
+ }
397
+
398
+ if ( array_key_exists( $plugin, $all_plugins ) ) {
399
+ if ( is_plugin_active( $plugin ) ) {
400
+ // Status text/status.
401
+ $plugin_data['status_class'] = 'status-active';
402
+ $plugin_data['status_text'] = esc_html__( 'Active', 'instagram-feed' );
403
+ // Button text/status.
404
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
405
+ $plugin_data['action_text'] = esc_html__( 'Activated', 'instagram-feed' );
406
+ $plugin_data['plugin_src'] = esc_attr( $plugin );
407
+ } else {
408
+ // Status text/status.
409
+ $plugin_data['status_class'] = 'status-inactive';
410
+ $plugin_data['status_text'] = esc_html__( 'Inactive', 'instagram-feed' );
411
+ // Button text/status.
412
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
413
+ $plugin_data['action_text'] = esc_html__( 'Activate', 'instagram-feed' );
414
+ $plugin_data['plugin_src'] = esc_attr( $plugin );
415
+ }
416
+ } else {
417
+ // Doesn't exist, install.
418
+ // Status text/status.
419
+ $plugin_data['status_class'] = 'status-download';
420
+ if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
421
+ $plugin_data['status_class'] = 'status-go-to-url';
422
+ }
423
+ $plugin_data['status_text'] = esc_html__( 'Not Installed', 'instagram-feed' );
424
+ // Button text/status.
425
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
426
+ $plugin_data['action_text'] = esc_html__( 'Install Plugin', 'instagram-feed' );
427
+ $plugin_data['plugin_src'] = esc_url( $details['url'] );
428
+ }
429
+
430
+ $plugin_data['details'] = $details;
431
+
432
+ return $plugin_data;
433
+ }
434
+
435
+ /**
436
+ * Display the Getting Started tab content.
437
+ *
438
+ * @since 2.4/5.5
439
+ */
440
+ protected function output_getting_started() {
441
+
442
+ $license = $this->get_license_type();
443
+ ?>
444
+
445
+ <div class="sbi-admin-about-section sbi-admin-about-section-first-form" style="display:flex;">
446
+
447
+ <div class="sbi-admin-about-section-first-form-text">
448
+
449
+ <h2>
450
+ <?php esc_html_e( 'Creating Your First Feed', 'instagram-feed' ); ?>
451
+ </h2>
452
+
453
+ <p>
454
+ <?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' ); ?>
455
+ </p>
456
+
457
+ <p>
458
+ <?php esc_html_e( 'Navigate to Instagram Feed in the admin sidebar to go the Configure page.', 'instagram-feed' ); ?>
459
+ </p>
460
+
461
+ <p>
462
+ <?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' ); ?>
463
+ </p>
464
+
465
+ <p>
466
+ <?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' ); ?>
467
+ </p>
468
+
469
+ <ul class="list-plain">
470
+ <li>
471
+ <a href="https://smashballoon.com/display-multiple-instagram-feeds/?utm_campaign=instagram-free&utm_source=gettingstarted&utm_medium=multiplefeeds" target="_blank" rel="noopener noreferrer">
472
+ <?php esc_html_e( 'How to Display Multiple Feeds', 'instagram-feed' ); ?>
473
+ </a>
474
+ </li>
475
+ <li>
476
+ <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">
477
+ <?php esc_html_e( 'Connect a Different Account', 'instagram-feed' ); ?>
478
+ </a>
479
+ </li>
480
+ <li>
481
+ <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">
482
+ <?php esc_html_e( 'Personal Vs Business Accounts', 'instagram-feed' ); ?>
483
+ </a>
484
+ </li>
485
+ </ul>
486
+
487
+ </div>
488
+
489
+ <div class="sbi-admin-about-section-first-form-video">
490
+ <iframe src="https://www.youtube-nocookie.com/embed/q6ZXVU4g970?rel=0" width="540" height="304" allow="autoplay; encrypted-media" title="<?php esc_attr_e( 'Watch a video', 'instagram-feed' ); ?>" allowfullscreen></iframe>
491
+ </div>
492
+
493
+ </div>
494
+
495
+ <?php if ( ! in_array( $license, self::$licenses_top, true ) ) { ?>
496
+ <div class="sbi-admin-about-section sbi-admin-about-section-hero">
497
+
498
+ <div class="sbi-admin-about-section-hero-main">
499
+ <h2>
500
+ <?php esc_html_e( 'Get Instagram Feed Pro and Unlock all the Powerful Features', 'instagram-feed' ); ?>
501
+ </h2>
502
+
503
+ <p class="bigger">
504
+ <?php
505
+ echo wp_kses(
506
+ __( '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' ),
507
+ array(
508
+ 'br' => array(),
509
+ 'strong' => array(),
510
+ )
511
+ );
512
+ ?>
513
+ </p>
514
+
515
+ <p>
516
+ <?php
517
+ printf(
518
+ wp_kses(
519
+ /* translators: %s - stars. */
520
+ __( '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' ),
521
+ array(
522
+ 'strong' => array(),
523
+ )
524
+ ),
525
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
526
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
527
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
528
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
529
+ '<i class="fa fa-star" aria-hidden="true"></i>'
530
+ );
531
+ ?>
532
+ </p>
533
+ </div>
534
+
535
+ <div class="sbi-admin-about-section-hero-extra">
536
+ <div class="sbi-admin-columns">
537
+ <div class="sbi-admin-column-50">
538
+ <ul class="list-features list-plain">
539
+ <li>
540
+ <i class="fa fa-check" aria-hidden="true"></i>
541
+ <?php esc_html_e( 'Recent hashtag, top Hashtag, and tagged feeds.', 'instagram-feed' ); ?>
542
+ </li>
543
+ <li>
544
+ <i class="fa fa-check" aria-hidden="true"></i>
545
+ <?php esc_html_e( 'More layouts - masonry, highlight, and carousel.', 'instagram-feed' ); ?>
546
+ </li>
547
+ <li>
548
+ <i class="fa fa-check" aria-hidden="true"></i>
549
+ <?php esc_html_e( 'Captions, comments, dates, likes, and comment counts.', 'instagram-feed' ); ?>
550
+ </li>
551
+ <li>
552
+ <i class="fa fa-check" aria-hidden="true"></i>
553
+ <?php esc_html_e( 'Pop-up lightbox to view images and watch videos.', 'instagram-feed' ); ?>
554
+ </li>
555
+ <li>
556
+ <i class="fa fa-check" aria-hidden="true"></i>
557
+ <?php esc_html_e( 'Filter feeds by word or hashtag.', 'instagram-feed' ); ?>
558
+ </li>
559
+ </ul>
560
+ </div>
561
+ <div class="sbi-admin-column-50 sbi-admin-column-last">
562
+ <ul class="list-features list-plain">
563
+ <li>
564
+ <i class="fa fa-check" aria-hidden="true"></i>
565
+ <?php esc_html_e( 'Display Instagram stories.', 'instagram-feed' ); ?>
566
+ </li>
567
+ <li>
568
+ <i class="fa fa-check" aria-hidden="true"></i>
569
+ <?php esc_html_e( 'Powerful visual moderation system.', 'instagram-feed' ); ?>
570
+ </li>
571
+ <li>
572
+ <i class="fa fa-check" aria-hidden="true"></i>
573
+ <?php esc_html_e( 'More customization for feed headers.', 'instagram-feed' ); ?>
574
+ </li>
575
+ <li>
576
+ <i class="fa fa-check" aria-hidden="true"></i>
577
+ <?php esc_html_e( 'Even more customization options for your feed.', 'instagram-feed' ); ?>
578
+ </li>
579
+ <li>
580
+ <i class="fa fa-check" aria-hidden="true"></i>
581
+ <?php esc_html_e( '"Shoppable" feeds.', 'instagram-feed' ); ?>
582
+ </li>
583
+ </ul>
584
+ </div>
585
+ </div>
586
+
587
+ <hr />
588
+
589
+ <h3 class="call-to-action">
590
+ <?php
591
+ $type = 'lite' === $license ? 'free' : 'pro';
592
+ ?>
593
+ <a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-<?php echo esc_attr( $type ); ?>&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">
594
+ <?php esc_html_e( 'Get Instagram Feed Pro Today and Unlock all the Powerful Features', 'instagram-feed' ); ?>
595
+ </a>
596
+ </h3>
597
+
598
+ <?php if ( 'lite' === $license ) { ?>
599
+ <p>
600
+ <?php
601
+ echo wp_kses(
602
+ __( 'Bonus: Instagram Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'instagram-feed' ),
603
+ array(
604
+ 'span' => array(
605
+ 'class' => array(),
606
+ ),
607
+ )
608
+ );
609
+ ?>
610
+ </p>
611
+ <?php } ?>
612
+ </div>
613
+
614
+ </div>
615
+ <?php } ?>
616
+
617
+
618
+ <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
619
+ <div class="sbi-admin-column-20">
620
+ <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/steps.png' ); ?>" alt="">
621
+ </div>
622
+ <div class="sbi-admin-column-80">
623
+ <h2>
624
+ <?php esc_html_e( 'Detailed Step-By-Step Guide', 'instagram-feed' ); ?>
625
+ </h2>
626
+
627
+ <p>
628
+ <?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' ); ?>
629
+ </p>
630
+
631
+ <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">
632
+ <?php esc_html_e( 'Read Documentation', 'instagram-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
633
+ </a>
634
+ </div>
635
+ </div>
636
+
637
+ <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-post sbi-admin-columns">
638
+ <div class="sbi-admin-column-20">
639
+ <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/about/api-error.png' ); ?>" alt="">
640
+ </div>
641
+ <div class="sbi-admin-column-80">
642
+ <h2>
643
+ <?php esc_html_e( 'Troubleshoot Connection and API Errors', 'instagram-feed' ); ?>
644
+ </h2>
645
+
646
+ <p>
647
+ <?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' ); ?>
648
+ </p>
649
+
650
+ <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">
651
+ <?php esc_html_e( 'Read Documentation', 'instagram-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
652
+ </a>
653
+ </div>
654
+ </div>
655
+
656
+ <?php
657
+ }
658
+
659
+ /**
660
+ * Get the next license type. Helper for Versus tab content.
661
+ *
662
+ * @since 1.5.5
663
+ *
664
+ * @param string $current Current license type slug.
665
+ *
666
+ * @return string Next license type slug.
667
+ */
668
+ protected function get_next_license( $current ) {
669
+
670
+ $current = ucfirst( $current );
671
+ $license_pairs = array(
672
+ 'Lite' => 'Pro',
673
+ 'Basic' => 'Pro',
674
+ 'Plus' => 'Pro',
675
+ 'Pro' => 'Elite',
676
+ );
677
+
678
+ return ! empty( $license_pairs[ $current ] ) ? $license_pairs[ $current ] : 'Elite';
679
+ }
680
+
681
+ /**
682
+ * Display the Versus tab content.
683
+ *
684
+ * @since 2.4/5.5
685
+ */
686
+ protected function output_versus() {
687
+ $license = 'lite';
688
+ $next_license = 'pro';
689
+ ?>
690
+
691
+ <div class="sbi-admin-about-section sbi-admin-about-section-squashed">
692
+ <h1 class="centered">
693
+ <strong><?php echo esc_html( ucfirst( $license ) ); ?></strong> vs <strong><?php echo esc_html( ucfirst( $next_license ) ); ?></strong>
694
+ </h1>
695
+
696
+ <p class="centered" id="sbi_tabledesc">
697
+ <?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' ); ?>
698
+ </p>
699
+ </div>
700
+
701
+ <div class="sbi-admin-about-section sbi-admin-about-section-squashed sbi-admin-about-section-hero sbi-admin-about-section-table">
702
+
703
+ <div class="sbi-admin-about-section-hero-main sbi-admin-columns">
704
+ <div class="sbi-admin-column-33">
705
+ <h3 class="no-margin">
706
+ <?php esc_html_e( 'Feature', 'instagram-feed' ); ?>
707
+ </h3>
708
+ </div>
709
+ <div class="sbi-admin-column-33">
710
+ <h3 class="no-margin">
711
+ <?php echo esc_html( ucfirst( $license ) ); ?>
712
+ </h3>
713
+ </div>
714
+ <div class="sbi-admin-column-33">
715
+ <h3 class="no-margin">
716
+ <?php echo esc_html( ucfirst( $next_license ) ); ?>
717
+ </h3>
718
+ </div>
719
+ </div>
720
+ <div class="sbi-admin-about-section-hero-extra no-padding sbi-admin-columns">
721
+
722
+ <table aria-describedby="sbi_tabledesc">
723
+ <?php
724
+ foreach ( self::$licenses_features as $slug => $name ) {
725
+ $current = $this->get_license_data( $slug, $license );
726
+ $next = $this->get_license_data( $slug, strtolower( $next_license ) );
727
+
728
+ if ( empty( $current ) || empty( $next ) ) {
729
+ continue;
730
+ }
731
+ ?>
732
+ <tr class="sbi-admin-columns">
733
+ <th scope="row" class="sbi-admin-column-33">
734
+ <p><?php echo esc_html( $name ); ?></p>
735
+ </th>
736
+ <td class="sbi-admin-column-33">
737
+ <?php if ( is_array( $current ) ) : ?>
738
+ <p class="features-<?php echo esc_attr( $current['status'] ); ?>">
739
+ <?php echo wp_kses_post( implode( '<br>', $current['text'] ) ); ?>
740
+ </p>
741
+ <?php endif; ?>
742
+ </td>
743
+ <td class="sbi-admin-column-33">
744
+ <?php if ( is_array( $current ) ) : ?>
745
+ <p class="features-full">
746
+ <?php echo wp_kses_post( implode( '<br>', $next['text'] ) ); ?>
747
+ </p>
748
+ <?php endif; ?>
749
+ </td>
750
+ </tr>
751
+ <?php
752
+ }
753
+ ?>
754
+ </table>
755
+
756
+ </div>
757
+
758
+ </div>
759
+
760
+ <div class="sbi-admin-about-section sbi-admin-about-section-hero">
761
+ <div class="sbi-admin-about-section-hero-main no-border">
762
+ <h3 class="call-to-action centered">
763
+ <?php
764
+ $type = 'lite' === $license ? 'free' : 'pro';
765
+ ?>
766
+ <a href="https://smashballoon.com/instagram-feed/pricing?utm_campaign=instagram-<?php echo esc_attr( $type ); ?>&utm_source=gettingstarted&utm_medium=profeaturescompare" target="_blank" rel="noopener noreferrer">
767
+ <?php
768
+ printf( /* translators: %s - next license level. */
769
+ esc_html__( 'Get Instagram Feed Pro Today and Unlock all the Powerful Features', 'instagram-feed' ),
770
+ esc_html( $next_license )
771
+ );
772
+ ?>
773
+ </a>
774
+ </h3>
775
+
776
+ <?php if ( 'lite' === $license ) { ?>
777
+ <p class="centered">
778
+ <?php
779
+ echo wp_kses(
780
+ __( 'Bonus: Instagram Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'instagram-feed' ),
781
+ array(
782
+ 'span' => array(
783
+ 'class' => array(),
784
+ ),
785
+ )
786
+ );
787
+ ?>
788
+ </p>
789
+ <?php } ?>
790
+ </div>
791
+ </div>
792
+
793
+ <?php
794
+ }
795
+
796
+ /**
797
+ * List of AM plugins that we propose to install.
798
+ *
799
+ * @since 2.4/5.5
800
+ *
801
+ * @return array
802
+ */
803
+ protected function get_am_plugins() {
804
+
805
+ $images_url = SBI_PLUGIN_URL . 'img/about/';
806
+
807
+ return array(
808
+ 'custom-facebook-feed/custom-facebook-feed.php' => array(
809
+ 'icon' => $images_url . 'plugin-fb.png',
810
+ 'name' => esc_html__( 'Custom Facebook Feed', 'instagram-feed' ),
811
+ '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' ),
812
+ 'url' => 'https://downloads.wordpress.org/plugin/custom-facebook-feed.zip',
813
+ 'pro' => array(
814
+ 'plug' => 'custom-facebook-feed-pro/custom-facebook-feed.php',
815
+ 'icon' => $images_url . 'plugin-fb.png',
816
+ 'name' => esc_html__( 'Custom Facebook Feed Pro', 'instagram-feed' ),
817
+ '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' ),
818
+ 'url' => 'https://smashballoon.com/custom-facebook-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=cffinstaller',
819
+ 'act' => 'go-to-url',
820
+ ),
821
+ ),
822
+
823
+ 'custom-twitter-feeds/custom-twitter-feed.php' => array(
824
+ 'icon' => $images_url . 'plugin-tw.jpg',
825
+ 'name' => esc_html__( 'Custom Twitter Feeds', 'instagram-feed' ),
826
+ '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' ),
827
+ 'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
828
+ 'pro' => array(
829
+ 'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
830
+ 'icon' => $images_url . 'plugin-tw.jpg',
831
+ 'name' => esc_html__( 'Custom Twitter Feeds Pro', 'instagram-feed' ),
832
+ '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' ),
833
+ 'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_campaign=instagram-free&utm_source=cross&utm_medium=ctfinstaller',
834
+ 'act' => 'go-to-url',
835
+ ),
836
+ ),
837
+
838
+ 'feeds-for-youtube/youtube-feed.php' => array(
839
+ 'icon' => $images_url . 'plugin-yt.png',
840
+ 'name' => esc_html__( 'Feeds for YouTube', 'instagram-feed' ),
841
+ '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' ),
842
+ 'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
843
+ 'pro' => array(
844
+ 'plug' => 'youtube-feed-pro/youtube-feed.php',
845
+ 'icon' => $images_url . 'plugin-yt.png',
846
+ 'name' => esc_html__( 'Feeds for YouTube Pro', 'instagram-feed' ),
847
+ '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' ),
848
+ 'url' => 'https://smashballoon.com/youtube-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=sbyinstaller',
849
+ 'act' => 'go-to-url',
850
+ ),
851
+ ),
852
+
853
+ 'wpforms-lite/wpforms.php' => array(
854
+ 'icon' => $images_url . 'plugin-wpforms.png',
855
+ 'name' => esc_html__( 'WPForms', 'instagram-feed' ),
856
+ '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' ),
857
+ 'url' => 'https://downloads.wordpress.org/plugin/wpforms-lite.zip',
858
+ 'pro' => array(
859
+ 'plug' => 'wpforms/wpforms.php',
860
+ 'icon' => $images_url . 'plugin-wpforms.png',
861
+ 'name' => esc_html__( 'WPForms', 'instagram-feed' ),
862
+ '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' ),
863
+ 'url' => 'https://wpforms.com/lite-upgrade/?utm_source=WordPress&utm_campaign=liteplugin&utm_medium=sbi-about-page',
864
+ 'act' => 'go-to-url',
865
+ ),
866
+ ),
867
+
868
+ 'google-analytics-for-wordpress/googleanalytics.php' => array(
869
+ 'icon' => $images_url . 'plugin-mi.png',
870
+ 'name' => esc_html__( 'MonsterInsights', 'instagram-feed' ),
871
+ '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' ),
872
+ 'url' => 'https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.zip',
873
+ 'pro' => array(
874
+ 'plug' => 'google-analytics-premium/googleanalytics-premium.php',
875
+ 'icon' => $images_url . 'plugin-mi.png',
876
+ 'name' => esc_html__( 'MonsterInsights Pro', 'instagram-feed' ),
877
+ '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' ),
878
+ 'url' => 'https://www.monsterinsights.com/?utm_source=proplugin&utm_medium=about-page&utm_campaign=pluginurl&utm_content=7%2E0%2E0',
879
+ 'act' => 'go-to-url',
880
+ ),
881
+ ),
882
+
883
+ 'optinmonster/optin-monster-wp-api.php' => array(
884
+ 'icon' => $images_url . 'plugin-om.png',
885
+ 'name' => esc_html__( 'OptinMonster', 'instagram-feed' ),
886
+ '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' ),
887
+ 'url' => 'https://downloads.wordpress.org/plugin/optinmonster.zip',
888
+ ),
889
+
890
+ 'wp-mail-smtp/wp_mail_smtp.php' => array(
891
+ 'icon' => $images_url . 'plugin-smtp.png',
892
+ 'name' => esc_html__( 'WP Mail SMTP', 'instagram-feed' ),
893
+ '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' ),
894
+ 'url' => 'https://downloads.wordpress.org/plugin/wp-mail-smtp.zip',
895
+ 'pro' => array(
896
+ 'plug' => 'wp-mail-smtp-pro/wp_mail_smtp.php',
897
+ 'icon' => $images_url . 'plugin-smtp.png',
898
+ 'name' => esc_html__( 'WP Mail SMTP Pro', 'instagram-feed' ),
899
+ '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' ),
900
+ 'url' => 'https://wpmailsmtp.com/pricing/',
901
+ 'act' => 'go-to-url',
902
+ ),
903
+ ),
904
+
905
+ 'rafflepress/rafflepress.php' => array(
906
+ 'icon' => $images_url . 'plugin-rp.png',
907
+ 'name' => esc_html__( 'RafflePress', 'instagram-feed' ),
908
+ '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' ),
909
+ 'url' => 'https://downloads.wordpress.org/plugin/rafflepress.zip',
910
+ 'pro' => array(
911
+ 'plug' => 'rafflepress-pro/rafflepress-pro.php',
912
+ 'icon' => $images_url . 'plugin-rp.png',
913
+ 'name' => esc_html__( 'RafflePress Pro', 'instagram-feed' ),
914
+ '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' ),
915
+ 'url' => 'https://rafflepress.com/pricing/',
916
+ 'act' => 'go-to-url',
917
+ ),
918
+ ),
919
+
920
+ 'all-in-one-seo-pack/all_in_one_seo_pack.php' => array(
921
+ 'icon' => $images_url . 'plugin-seo.png',
922
+ 'name' => esc_html__( 'All In One SEO Pack', 'instagram-feed' ),
923
+ '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' ),
924
+ 'url' => 'https://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip',
925
+ ),
926
+ );
927
+ }
928
+
929
+ /**
930
+ * Get the array of data that compared the license data.
931
+ *
932
+ * @since 2.4/5.5
933
+ *
934
+ * @param string $feature Feature name.
935
+ * @param string $license License type to get data for.
936
+ *
937
+ * @return array|false
938
+ */
939
+ protected function get_license_data( $feature, $license ) {
940
+
941
+ $data = array(
942
+ 'entries' => array(
943
+ 'lite' => array(
944
+ 'status' => 'partial',
945
+ 'text' => array(
946
+ '<strong>' . esc_html__( 'User feeds only', 'instagram-feed' ) . '</strong>',
947
+ ),
948
+ ),
949
+ 'basic' => array(
950
+ 'status' => 'full',
951
+ 'text' => array(
952
+ '<strong>' . esc_html__( 'User, Hashtag, and Tagged Feeds', 'instagram-feed' ) . '</strong>',
953
+ ),
954
+ ),
955
+ 'plus' => array(
956
+ 'status' => 'full',
957
+ 'text' => array(
958
+ '<strong>' . esc_html__( 'Complete Entry Management inside WordPress', 'instagram-feed' ) . '</strong>',
959
+ ),
960
+ ),
961
+ 'pro' => array(
962
+ 'status' => 'full',
963
+ 'text' => array(
964
+ '<strong>' . esc_html__( 'User, hashtag, and tagged feeds', 'instagram-feed' ) . '</strong>',
965
+ ),
966
+ ),
967
+ ),
968
+ 'fields' => array(
969
+ 'lite' => array(
970
+ 'status' => 'partial',
971
+ 'text' => array(
972
+ '<strong>' . esc_html__( 'Grid layout only', 'instagram-feed' ) . '</strong>',
973
+ ),
974
+ ),
975
+ 'basic' => array(
976
+ 'status' => 'full',
977
+ 'text' => array(
978
+ '<strong>' . esc_html__( 'Access to all Standard and Fancy Fields', 'instagram-feed' ) . '</strong>',
979
+ esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'instagram-feed' ),
980
+ ),
981
+ ),
982
+ 'plus' => array(
983
+ 'status' => 'full',
984
+ 'text' => array(
985
+ '<strong>' . esc_html__( 'Access to all Standard and Fancy Fields', 'instagram-feed' ) . '</strong>',
986
+ esc_html__( 'Address, Phone, Website URL, Date/Time, Password, File Upload, HTML, Pagebreaks, Section Dividers, Ratings, and Hidden Field', 'instagram-feed' ),
987
+ ),
988
+ ),
989
+ 'pro' => array(
990
+ 'status' => 'full',
991
+ 'text' => array(
992
+ '<strong>' . esc_html__( 'Grid, highlight, masonry, and carousel layouts', 'instagram-feed' ) . '</strong>',
993
+ ),
994
+ ),
995
+ ),
996
+ 'conditionals' => array(
997
+ 'lite' => array(
998
+ 'status' => 'partial',
999
+ 'text' => array(
1000
+ '<strong>' . esc_html__( 'Image, carousel, and video thumbnails', 'instagram-feed' ) . '</strong>',
1001
+ ),
1002
+ ),
1003
+ 'basic' => array(
1004
+ 'status' => 'full',
1005
+ 'text' => array(
1006
+ '<strong>' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'instagram-feed' ) . '</strong>',
1007
+ ),
1008
+ ),
1009
+ 'plus' => array(
1010
+ 'status' => 'full',
1011
+ 'text' => array(
1012
+ '<strong>' . esc_html__( 'Powerful Form Logic for Building Smart Forms', 'instagram-feed' ) . '</strong>',
1013
+ ),
1014
+ ),
1015
+ 'pro' => array(
1016
+ 'status' => 'full',
1017
+ 'text' => array(
1018
+ '<strong>' . esc_html__( 'Display images, swipe through carousel posts, and play videos in a pop-up lightbox', 'instagram-feed' ) . '</strong>',
1019
+ ),
1020
+ ),
1021
+ ),
1022
+ 'templates' => array(
1023
+ 'lite' => array(
1024
+ 'status' => 'partial',
1025
+ 'text' => array(
1026
+ '<strong>' . esc_html__( 'Images and link only', 'instagram-feed' ) . '</strong>',
1027
+ ),
1028
+ ),
1029
+ 'basic' => array(
1030
+ 'status' => 'partial',
1031
+ 'text' => array(
1032
+ '<strong>' . esc_html__( 'Basic Form Templates', 'instagram-feed' ) . '</strong>',
1033
+ ),
1034
+ ),
1035
+ 'plus' => array(
1036
+ 'status' => 'partial',
1037
+ 'text' => array(
1038
+ '<strong>' . esc_html__( 'Basic Form Templates', 'instagram-feed' ) . '</strong>',
1039
+ ),
1040
+ ),
1041
+ 'pro' => array(
1042
+ 'status' => 'full',
1043
+ 'text' => array(
1044
+ '<strong>' . esc_html__( 'Thumbnails, dates, caption, comments, like counts, and comment counts.', 'instagram-feed' ) . '</strong>',
1045
+ ),
1046
+ ),
1047
+ ),
1048
+ 'marketing' => array(
1049
+ 'lite' => array(
1050
+ 'status' => 'none',
1051
+ 'text' => array(
1052
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1053
+ ),
1054
+ ),
1055
+ 'basic' => array(
1056
+ 'status' => 'partial',
1057
+ 'text' => array(
1058
+ '<strong>' . esc_html__( 'Limited Marketing Integration', 'instagram-feed' ) . '</strong>',
1059
+ esc_html__( 'Constant Contact only', 'instagram-feed' ),
1060
+ ),
1061
+ ),
1062
+ 'plus' => array(
1063
+ 'status' => 'partial',
1064
+ 'text' => array(
1065
+ '<strong>' . esc_html__( '6 Email Marketing Integrations', 'instagram-feed' ) . '</strong>',
1066
+ esc_html__( 'Constant Contact, Mailchimp, AWeber, GetResponse, Campaign Monitor, and Drip', 'instagram-feed' ),
1067
+ ),
1068
+ ),
1069
+ 'pro' => array(
1070
+ 'status' => 'full',
1071
+ 'text' => array(
1072
+ '<strong>' . esc_html__( 'Display your latest Instagram story in a pop-up lightbox', 'instagram-feed' ) . '</strong>',
1073
+ ),
1074
+ ),
1075
+ ),
1076
+ 'payments' => array(
1077
+ 'lite' => array(
1078
+ 'status' => 'none',
1079
+ 'text' => array(
1080
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1081
+ ),
1082
+ ),
1083
+ 'basic' => array(
1084
+ 'status' => 'none',
1085
+ 'text' => array(
1086
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1087
+ ),
1088
+ ),
1089
+ 'plus' => array(
1090
+ 'status' => 'none',
1091
+ 'text' => array(
1092
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1093
+ ),
1094
+ ),
1095
+ 'pro' => array(
1096
+ 'status' => 'full',
1097
+ 'text' => array(
1098
+ '<strong>' . esc_html__( 'Visual moderation system for removing posts or creating a "white list" of selected posts', 'instagram-feed' ) . '</strong>',
1099
+ ),
1100
+ ),
1101
+ ),
1102
+ 'surveys' => array(
1103
+ 'lite' => array(
1104
+ 'status' => 'partial',
1105
+ 'text' => array(
1106
+ '<strong>' . esc_html__( 'Standard or centered header', 'instagram-feed' ) . '</strong>',
1107
+ ),
1108
+ ),
1109
+ 'basic' => array(
1110
+ 'status' => 'none',
1111
+ 'text' => array(
1112
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1113
+ ),
1114
+ ),
1115
+ 'plus' => array(
1116
+ 'status' => 'none',
1117
+ 'text' => array(
1118
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1119
+ ),
1120
+ ),
1121
+ 'pro' => array(
1122
+ 'status' => 'full',
1123
+ 'text' => array(
1124
+ '<strong>' . esc_html__( 'Standard, centered, or boxed header that includes follower and post counts', 'instagram-feed' ) . '</strong>',
1125
+ ),
1126
+ ),
1127
+ ),
1128
+ 'advanced' => array(
1129
+ 'lite' => array(
1130
+ 'status' => 'partial',
1131
+ 'text' => array(
1132
+ '<strong>' . esc_html__( 'Posts link to the same post on Instagram', 'instagram-feed' ) . '</strong>',
1133
+ ),
1134
+ ),
1135
+ 'basic' => array(
1136
+ 'status' => 'partial',
1137
+ 'text' => array(
1138
+ '<strong>' . esc_html__( 'Limited Advanced Features', 'instagram-feed' ) . '</strong>',
1139
+ esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'instagram-feed' ),
1140
+ ),
1141
+ ),
1142
+ 'plus' => array(
1143
+ 'status' => 'partial',
1144
+ 'text' => array(
1145
+ '<strong>' . esc_html__( 'Limited Advanced Features', 'instagram-feed' ) . '</strong>',
1146
+ esc_html__( 'Multi-page Forms, File Upload Forms, Multiple Form Notifications, Conditional Form Confirmation', 'instagram-feed' ),
1147
+ ),
1148
+ ),
1149
+ 'pro' => array(
1150
+ 'status' => 'full',
1151
+ 'text' => array(
1152
+ '<strong>' . esc_html__( 'Allow your posts to link to a URL in the caption or view in a lightbox', 'instagram-feed' ) . '</strong>',
1153
+ ),
1154
+ ),
1155
+ ),
1156
+ 'addons' => array(
1157
+ 'lite' => array(
1158
+ 'status' => 'none',
1159
+ 'text' => array(
1160
+ '<strong>' . esc_html__( 'Not available', 'instagram-feed' ) . '</strong>',
1161
+ ),
1162
+ ),
1163
+ 'basic' => array(
1164
+ 'status' => 'partial',
1165
+ 'text' => array(
1166
+ '<strong>' . esc_html__( 'Custom Captcha Addon included', 'instagram-feed' ) . '</strong>',
1167
+ ),
1168
+ ),
1169
+ 'plus' => array(
1170
+ 'status' => 'partial',
1171
+ 'text' => array(
1172
+ '<strong>' . esc_html__( 'Email Marketing Addons included', 'instagram-feed' ) . '</strong>',
1173
+ ),
1174
+ ),
1175
+ 'pro' => array(
1176
+ 'status' => 'full',
1177
+ 'text' => array(
1178
+ '<strong>' . esc_html__( 'Filter by word or hashtag', 'instagram-feed' ) . '</strong>',
1179
+ ),
1180
+ ),
1181
+ ),
1182
+ 'support' => array(
1183
+ 'lite' => array(
1184
+ 'status' => 'partial',
1185
+ 'text' => array(
1186
+ '<strong>' . esc_html__( 'Limited support', 'instagram-feed' ) . '</strong>',
1187
+ ),
1188
+ ),
1189
+ 'basic' => array(
1190
+ 'status' => 'partial',
1191
+ 'text' => array(
1192
+ '<strong>' . esc_html__( 'Standard Support', 'instagram-feed' ) . '</strong>',
1193
+ ),
1194
+ ),
1195
+ 'plus' => array(
1196
+ 'status' => 'partial',
1197
+ 'text' => array(
1198
+ '<strong>' . esc_html__( 'Standard Support', 'instagram-feed' ) . '</strong>',
1199
+ ),
1200
+ ),
1201
+ 'pro' => array(
1202
+ 'status' => 'full',
1203
+ 'text' => array(
1204
+ '<strong>' . esc_html__( 'Priority support', 'instagram-feed' ) . '</strong>',
1205
+ ),
1206
+ ),
1207
+ 'elite' => array(
1208
+ 'status' => 'full',
1209
+ 'text' => array(
1210
+ '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1211
+ ),
1212
+ ),
1213
+ 'ultimate' => array(
1214
+ 'status' => 'full',
1215
+ 'text' => array(
1216
+ '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1217
+ ),
1218
+ ),
1219
+ 'agency' => array(
1220
+ 'status' => 'full',
1221
+ 'text' => array(
1222
+ '<strong>' . esc_html__( 'Premium Support', 'instagram-feed' ) . '</strong>',
1223
+ ),
1224
+ ),
1225
+ ),
1226
+ 'sites' => array(
1227
+ 'basic' => array(
1228
+ 'status' => 'partial',
1229
+ 'text' => array(
1230
+ '<strong>' . esc_html__( '1 Site', 'instagram-feed' ) . '</strong>',
1231
+ ),
1232
+ ),
1233
+ 'plus' => array(
1234
+ 'status' => 'partial',
1235
+ 'text' => array(
1236
+ '<strong>' . esc_html__( '3 Sites', 'instagram-feed' ) . '</strong>',
1237
+ ),
1238
+ ),
1239
+ 'pro' => array(
1240
+ 'status' => 'full',
1241
+ 'text' => array(
1242
+ '<strong>' . esc_html__( '5 Sites', 'instagram-feed' ) . '</strong>',
1243
+ ),
1244
+ ),
1245
+ 'elite' => array(
1246
+ 'status' => 'full',
1247
+ 'text' => array(
1248
+ '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1249
+ ),
1250
+ ),
1251
+ 'ultimate' => array(
1252
+ 'status' => 'full',
1253
+ 'text' => array(
1254
+ '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1255
+ ),
1256
+ ),
1257
+ 'agency' => array(
1258
+ 'status' => 'full',
1259
+ 'text' => array(
1260
+ '<strong>' . esc_html__( 'Unlimited Sites', 'instagram-feed' ) . '</strong>',
1261
+ ),
1262
+ ),
1263
+ ),
1264
+ );
1265
+
1266
+ // Wrong feature?
1267
+ if ( ! isset( $data[ $feature ] ) ) {
1268
+ return false;
1269
+ }
1270
+
1271
+ // Is a top level license?
1272
+ $is_licenses_top = in_array( $license, self::$licenses_top, true );
1273
+
1274
+ // Wrong license type?
1275
+ if ( ! isset( $data[ $feature ][ $license ] ) && ! $is_licenses_top ) {
1276
+ return false;
1277
+ }
1278
+
1279
+ // Some licenses have partial data.
1280
+ if ( isset( $data[ $feature ][ $license ] ) ) {
1281
+ return $data[ $feature ][ $license ];
1282
+ }
1283
+
1284
+ // Top level plans has no feature difference with `pro` plan in most cases.
1285
+ return $is_licenses_top ? $data[ $feature ]['pro'] : $data[ $feature ][ $license ];
1286
+ }
1287
+
1288
+ /**
1289
+ * Get the current installation license type (always lowercase).
1290
+ *
1291
+ * @since 2.4/5.5
1292
+ *
1293
+ * @return string
1294
+ */
1295
+ protected function get_license_type() {
1296
+ return 'lite';
1297
+ }
1298
+ }
1299
+
1300
+ new SB_Instagram_About();
inc/admin/class-sbi-account-connector.php CHANGED
@@ -1,257 +1,257 @@
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 ( ! isset( $_GET['sbi_con'] ) || ! wp_verify_nonce( $_GET['sbi_con'], 'sbi-connect' ) ) {
44
- if ( isset( $_GET['sbi_con'] ) && ! wp_verify_nonce( $_GET['sbi_con'], 'sbi-connect' ) ) :
45
- ?>
46
- <div class="sbi_deprecated">
47
- <span><?php esc_html_e( 'Oops! The link to connect your account expired. Please try connecting your account again.', 'instagram-feed' ); ?></span>
48
- </div>
49
- <?php
50
- endif;
51
- return;
52
- }
53
- if ( ! empty( $_POST ) ) {
54
- return;
55
- }
56
- $connected_accounts = self::stored_connected_accounts();
57
- if ( isset( $_GET['sbi_access_token'] ) && isset( $_GET['sbi_graph_api'] ) ) {
58
- sbi_get_business_account_connection_modal( $sb_instagram_user_id );
59
- } elseif ( isset( $_GET['sbi_access_token'] ) && isset( $_GET['sbi_account_type'] ) ) {
60
- sbi_get_personal_connection_modal( $connected_accounts );
61
- }
62
- }
63
-
64
- /**
65
- * @return int
66
- *
67
- * @since 5.10
68
- */
69
- public function get_id() {
70
- return $this->id;
71
- }
72
-
73
- /**
74
- * @return array
75
- *
76
- * @since 5.10
77
- */
78
- public function get_account_data() {
79
- return $this->account_data;
80
- }
81
-
82
- /**
83
- * Get API data for the connected account using the account access
84
- * token and ID
85
- *
86
- * @param $data array
87
- *
88
- * @return array
89
- *
90
- * @since 5.10
91
- */
92
- public function fetch( $data ) {
93
- if ( ! isset( $data['user_id'] ) ) {
94
- return array( 'error' => __( 'Invalid account ID', 'instagram-feed' ) );
95
- }
96
- if ( ! isset( $data['access_token'] ) ) {
97
- return array( 'error' => __( 'Invalid access token', 'instagram-feed' ) );
98
- }
99
-
100
- $connection = new SB_Instagram_API_Connect( $data, 'header', array() );
101
- $connection->wp_http_connect();
102
-
103
- if ( ! $connection->is_wp_error() && ! $connection->is_instagram_error() ) {
104
- $new_data = $connection->get_data();
105
-
106
- if ( $data['type'] === 'basic' ) {
107
- $basic_account_access_token_connect = new SB_Instagram_API_Connect( $data, 'access_token', array() );
108
- $basic_account_access_token_connect->wp_http_connect();
109
- $token_data = $basic_account_access_token_connect->get_data();
110
-
111
- if ( ! $basic_account_access_token_connect->is_wp_error() && ! $basic_account_access_token_connect->is_instagram_error() ) {
112
- $expires_in = $token_data['expires_in'];
113
- $expires_timestamp = time() + $expires_in;
114
- } else {
115
- $expires_timestamp = time() + 60 * DAY_IN_SECONDS;
116
- }
117
-
118
- $new_connected_account = array(
119
- 'access_token' => $data['access_token'],
120
- 'account_type' => 'personal',
121
- 'user_id' => $new_data['id'],
122
- 'username' => $new_data['username'],
123
- 'expires_timestamp' => $expires_timestamp,
124
- 'type' => 'basic',
125
- 'profile_picture' => '',
126
- );
127
-
128
- } else {
129
- $new_connected_account = array(
130
- 'access_token' => $data['access_token'],
131
- 'id' => $new_data['id'],
132
- 'username' => $new_data['username'],
133
- 'type' => 'business',
134
- 'is_valid' => true,
135
- 'last_checked' => time(),
136
- 'profile_picture' => $new_data['profile_picture_url'],
137
- );
138
- }
139
-
140
- return $new_connected_account;
141
-
142
- } else {
143
-
144
- if ( $connection->is_wp_error() ) {
145
- $error = $connection->get_wp_error();
146
- } else {
147
- $error = $connection->get_data();
148
- }
149
- return array( 'error' => sbi_formatted_error( $error ) );
150
- }
151
-
152
- }
153
-
154
- /**
155
- * Add data to current set of information about the account
156
- * being connected
157
- *
158
- * @param $data array
159
- *
160
- * @return bool
161
- *
162
- * @since 5.10
163
- */
164
- public function add_account_data( $data ) {
165
- $data['id'] = isset( $data['id'] ) ? $data['id'] : $data['user_id'];
166
- if ( ! isset( $data['id'] ) ) {
167
- return false;
168
- }
169
- if ( ! isset( $data['access_token'] ) ) {
170
- return false;
171
- }
172
-
173
- $access_token = ! empty( $data['access_token'] ) ? $data['access_token'] : '';
174
- $page_access_token = ! empty( $data['page_access_token'] ) ? $data['page_access_token'] : '';
175
- $username = ! empty( $data['username'] ) ? $data['username'] : '';
176
- $name = ! empty( $data['name'] ) ? $data['name'] : '';
177
- $profile_picture = ! empty( $data['profile_picture_url'] ) ? $data['profile_picture_url'] : '';
178
- if ( empty( $profile_picture ) ) {
179
- $profile_picture = ! empty( $data['profile_picture'] ) ? $data['profile_picture'] : '';
180
- }
181
- $user_id = ! empty( $data['id'] ) ? $data['id'] : '';
182
- $type = ! empty( $data['type'] ) ? $data['type'] : 'basic';
183
- $account_type = ! empty( $data['account_type'] ) ? $data['account_type'] : 'business';
184
- $this->id = $user_id;
185
- $this->account_data = array(
186
- 'access_token' => $access_token,
187
- 'user_id' => $user_id,
188
- 'username' => $username,
189
- 'is_valid' => true,
190
- 'last_checked' => time(),
191
- 'type' => $type,
192
- 'account_type' => $account_type,
193
- 'profile_picture' => '',
194
- );
195
-
196
- if ( $type === 'business' ) {
197
- $this->account_data['use_tagged'] = '1';
198
- $this->account_data['name'] = sbi_sanitize_emoji( $name );
199
- $this->account_data['profile_picture'] = $profile_picture;
200
- $this->account_data['local_avatar'] = SB_Instagram_Connected_Account::create_local_avatar( $username, $profile_picture );
201
- $this->account_data['page_access_token'] = $page_access_token;
202
- }
203
-
204
- if ( isset( $data['expires_timestamp'] ) ) {
205
- $this->account_data['expires_timestamp'] = $data['expires_timestamp'];
206
- }
207
-
208
- $this->account_data = SB_Instagram_Connected_Account::encrypt_connected_account_tokens( $this->account_data );
209
-
210
- return true;
211
- }
212
-
213
- /**
214
- * Save data for new or existing connected account
215
- *
216
- * @return bool
217
- *
218
- * @since 5.10
219
- */
220
- public function update_stored_account() {
221
- $options = sbi_get_database_settings();
222
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
223
- $options['connected_accounts'] = $connected_accounts;
224
-
225
- if ( ! empty( $this->account_data ) ) {
226
- $options['connected_accounts'][ $this->id ] = $this->account_data;
227
- update_option( 'sb_instagram_settings', $options );
228
-
229
- return true;
230
- }
231
- return false;
232
- }
233
-
234
- /**
235
- * Actions after updating or connecting an account
236
- *
237
- * @since 5.10
238
- */
239
- public function after_update() {
240
- global $sb_instagram_posts_manager;
241
- $sb_instagram_posts_manager->remove_connected_account_error( $this->account_data );
242
- $sb_instagram_posts_manager->add_action_log( 'Connection or updating account ' . $this->account_data['username'] );
243
-
244
- do_action( 'sbi_account_connector_after_update', $this->account_data );
245
- }
246
-
247
- /**
248
- * @return array
249
- *
250
- * @since 5.10
251
- */
252
- public static function stored_connected_accounts() {
253
- $options = sbi_get_database_settings();
254
- $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
255
- return $connected_accounts;
256
- }
257
- }
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 ( ! isset( $_GET['sbi_con'] ) || ! wp_verify_nonce( $_GET['sbi_con'], 'sbi-connect' ) ) {
44
+ if ( isset( $_GET['sbi_con'] ) && ! wp_verify_nonce( $_GET['sbi_con'], 'sbi-connect' ) ) :
45
+ ?>
46
+ <div class="sbi_deprecated">
47
+ <span><?php esc_html_e( 'Oops! The link to connect your account expired. Please try connecting your account again.', 'instagram-feed' ); ?></span>
48
+ </div>
49
+ <?php
50
+ endif;
51
+ return;
52
+ }
53
+ if ( ! empty( $_POST ) ) {
54
+ return;
55
+ }
56
+ $connected_accounts = self::stored_connected_accounts();
57
+ if ( isset( $_GET['sbi_access_token'] ) && isset( $_GET['sbi_graph_api'] ) ) {
58
+ sbi_get_business_account_connection_modal( $sb_instagram_user_id );
59
+ } elseif ( isset( $_GET['sbi_access_token'] ) && isset( $_GET['sbi_account_type'] ) ) {
60
+ sbi_get_personal_connection_modal( $connected_accounts );
61
+ }
62
+ }
63
+
64
+ /**
65
+ * @return int
66
+ *
67
+ * @since 5.10
68
+ */
69
+ public function get_id() {
70
+ return $this->id;
71
+ }
72
+
73
+ /**
74
+ * @return array
75
+ *
76
+ * @since 5.10
77
+ */
78
+ public function get_account_data() {
79
+ return $this->account_data;
80
+ }
81
+
82
+ /**
83
+ * Get API data for the connected account using the account access
84
+ * token and ID
85
+ *
86
+ * @param $data array
87
+ *
88
+ * @return array
89
+ *
90
+ * @since 5.10
91
+ */
92
+ public function fetch( $data ) {
93
+ if ( ! isset( $data['user_id'] ) ) {
94
+ return array( 'error' => __( 'Invalid account ID', 'instagram-feed' ) );
95
+ }
96
+ if ( ! isset( $data['access_token'] ) ) {
97
+ return array( 'error' => __( 'Invalid access token', 'instagram-feed' ) );
98
+ }
99
+
100
+ $connection = new SB_Instagram_API_Connect( $data, 'header', array() );
101
+ $connection->wp_http_connect();
102
+
103
+ if ( ! $connection->is_wp_error() && ! $connection->is_instagram_error() ) {
104
+ $new_data = $connection->get_data();
105
+
106
+ if ( $data['type'] === 'basic' ) {
107
+ $basic_account_access_token_connect = new SB_Instagram_API_Connect( $data, 'access_token', array() );
108
+ $basic_account_access_token_connect->wp_http_connect();
109
+ $token_data = $basic_account_access_token_connect->get_data();
110
+
111
+ if ( ! $basic_account_access_token_connect->is_wp_error() && ! $basic_account_access_token_connect->is_instagram_error() ) {
112
+ $expires_in = $token_data['expires_in'];
113
+ $expires_timestamp = time() + $expires_in;
114
+ } else {
115
+ $expires_timestamp = time() + 60 * DAY_IN_SECONDS;
116
+ }
117
+
118
+ $new_connected_account = array(
119
+ 'access_token' => $data['access_token'],
120
+ 'account_type' => 'personal',
121
+ 'user_id' => $new_data['id'],
122
+ 'username' => $new_data['username'],
123
+ 'expires_timestamp' => $expires_timestamp,
124
+ 'type' => 'basic',
125
+ 'profile_picture' => '',
126
+ );
127
+
128
+ } else {
129
+ $new_connected_account = array(
130
+ 'access_token' => $data['access_token'],
131
+ 'id' => $new_data['id'],
132
+ 'username' => $new_data['username'],
133
+ 'type' => 'business',
134
+ 'is_valid' => true,
135
+ 'last_checked' => time(),
136
+ 'profile_picture' => $new_data['profile_picture_url'],
137
+ );
138
+ }
139
+
140
+ return $new_connected_account;
141
+
142
+ } else {
143
+
144
+ if ( $connection->is_wp_error() ) {
145
+ $error = $connection->get_wp_error();
146
+ } else {
147
+ $error = $connection->get_data();
148
+ }
149
+ return array( 'error' => sbi_formatted_error( $error ) );
150
+ }
151
+
152
+ }
153
+
154
+ /**
155
+ * Add data to current set of information about the account
156
+ * being connected
157
+ *
158
+ * @param $data array
159
+ *
160
+ * @return bool
161
+ *
162
+ * @since 5.10
163
+ */
164
+ public function add_account_data( $data ) {
165
+ $data['id'] = isset( $data['id'] ) ? $data['id'] : $data['user_id'];
166
+ if ( ! isset( $data['id'] ) ) {
167
+ return false;
168
+ }
169
+ if ( ! isset( $data['access_token'] ) ) {
170
+ return false;
171
+ }
172
+
173
+ $access_token = ! empty( $data['access_token'] ) ? $data['access_token'] : '';
174
+ $page_access_token = ! empty( $data['page_access_token'] ) ? $data['page_access_token'] : '';
175
+ $username = ! empty( $data['username'] ) ? $data['username'] : '';
176
+ $name = ! empty( $data['name'] ) ? $data['name'] : '';
177
+ $profile_picture = ! empty( $data['profile_picture_url'] ) ? $data['profile_picture_url'] : '';
178
+ if ( empty( $profile_picture ) ) {
179
+ $profile_picture = ! empty( $data['profile_picture'] ) ? $data['profile_picture'] : '';
180
+ }
181
+ $user_id = ! empty( $data['id'] ) ? $data['id'] : '';
182
+ $type = ! empty( $data['type'] ) ? $data['type'] : 'basic';
183
+ $account_type = ! empty( $data['account_type'] ) ? $data['account_type'] : 'business';
184
+ $this->id = $user_id;
185
+ $this->account_data = array(
186
+ 'access_token' => $access_token,
187
+ 'user_id' => $user_id,
188
+ 'username' => $username,
189
+ 'is_valid' => true,
190
+ 'last_checked' => time(),
191
+ 'type' => $type,
192
+ 'account_type' => $account_type,
193
+ 'profile_picture' => '',
194
+ );
195
+
196
+ if ( $type === 'business' ) {
197
+ $this->account_data['use_tagged'] = '1';
198
+ $this->account_data['name'] = sbi_sanitize_emoji( $name );
199
+ $this->account_data['profile_picture'] = $profile_picture;
200
+ $this->account_data['local_avatar'] = SB_Instagram_Connected_Account::create_local_avatar( $username, $profile_picture );
201
+ $this->account_data['page_access_token'] = $page_access_token;
202
+ }
203
+
204
+ if ( isset( $data['expires_timestamp'] ) ) {
205
+ $this->account_data['expires_timestamp'] = $data['expires_timestamp'];
206
+ }
207
+
208
+ $this->account_data = SB_Instagram_Connected_Account::encrypt_connected_account_tokens( $this->account_data );
209
+
210
+ return true;
211
+ }
212
+
213
+ /**
214
+ * Save data for new or existing connected account
215
+ *
216
+ * @return bool
217
+ *
218
+ * @since 5.10
219
+ */
220
+ public function update_stored_account() {
221
+ $options = sbi_get_database_settings();
222
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
223
+ $options['connected_accounts'] = $connected_accounts;
224
+
225
+ if ( ! empty( $this->account_data ) ) {
226
+ $options['connected_accounts'][ $this->id ] = $this->account_data;
227
+ update_option( 'sb_instagram_settings', $options );
228
+
229
+ return true;
230
+ }
231
+ return false;
232
+ }
233
+
234
+ /**
235
+ * Actions after updating or connecting an account
236
+ *
237
+ * @since 5.10
238
+ */
239
+ public function after_update() {
240
+ global $sb_instagram_posts_manager;
241
+ $sb_instagram_posts_manager->remove_connected_account_error( $this->account_data );
242
+ $sb_instagram_posts_manager->add_action_log( 'Connection or updating account ' . $this->account_data['username'] );
243
+
244
+ do_action( 'sbi_account_connector_after_update', $this->account_data );
245
+ }
246
+
247
+ /**
248
+ * @return array
249
+ *
250
+ * @since 5.10
251
+ */
252
+ public static function stored_connected_accounts() {
253
+ $options = sbi_get_database_settings();
254
+ $connected_accounts = isset( $options['connected_accounts'] ) ? $options['connected_accounts'] : array();
255
+ return $connected_accounts;
256
+ }
257
+ }
inc/admin/class-sbi-new-user.php CHANGED
@@ -1,416 +1,416 @@
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 = 'https://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
- /**
41
- * @return string
42
- */
43
- public function option_name() {
44
- return self::OPTION_NAME;
45
- }
46
-
47
- /**
48
- * @return string
49
- */
50
- public function source_url() {
51
- return self::SOURCE_URL;
52
- }
53
-
54
- /**
55
- * Verify notification data before it is saved.
56
- *
57
- * @param array $notifications Array of notifications items to verify.
58
- *
59
- * @return array
60
- *
61
- * @since 2.6
62
- */
63
- public function verify( $notifications ) {
64
- $data = array();
65
-
66
- if ( ! is_array( $notifications ) || empty( $notifications ) ) {
67
- return $data;
68
- }
69
-
70
- $option = $this->get_option();
71
-
72
- foreach ( $notifications as $key => $notification ) {
73
-
74
- // The message should never be empty, if they are, ignore.
75
- if ( empty( $notification['content'] ) ) {
76
- continue;
77
- }
78
-
79
- // Ignore if notification has already been dismissed.
80
- if ( ! empty( $option['dismissed'] ) && in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
81
- continue;
82
- }
83
-
84
- $data[ $key ] = $notification;
85
- }
86
-
87
- return $data;
88
- }
89
-
90
- /**
91
- * Verify saved notification data for active notifications.
92
- *
93
- * @since 2.6
94
- *
95
- * @param array $notifications Array of notifications items to verify.
96
- *
97
- * @return array
98
- */
99
- public function verify_active( $notifications ) {
100
- if ( ! is_array( $notifications ) || empty( $notifications ) ) {
101
- return array();
102
- }
103
-
104
- $sbi_statuses_option = get_option( 'sbi_statuses', array() );
105
- $current_time = sbi_get_current_time();
106
-
107
- // rating notice logic
108
- $sbi_rating_notice_option = get_option( 'sbi_rating_notice', false );
109
- $sbi_rating_notice_waiting = get_transient( 'instagram_feed_rating_notice_waiting' );
110
- $should_show_rating_notice = ( $sbi_rating_notice_waiting !== 'waiting' && $sbi_rating_notice_option !== 'dismissed' );
111
-
112
- // new user discount logic
113
- $in_new_user_month_range = true;
114
- $should_show_new_user_discount = false;
115
- $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;
116
-
117
- if ( isset( $sbi_statuses_option['first_install'] ) && $sbi_statuses_option['first_install'] === 'from_update' ) {
118
- global $current_user;
119
- $user_id = $current_user->ID;
120
- $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice' );
121
- $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
122
- if ( $ignore_new_user_sale_notice_meta !== 'always' ) {
123
- $should_show_new_user_discount = true;
124
- }
125
- } elseif ( $in_new_user_month_range && $has_been_one_month_since_rating_dismissal && $sbi_rating_notice_waiting !== 'waiting' ) {
126
- global $current_user;
127
- $user_id = $current_user->ID;
128
- $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice' );
129
- $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
130
-
131
- if (
132
- 'always' !== $ignore_new_user_sale_notice_meta &&
133
- isset( $sbi_statuses_option['first_install'] ) &&
134
- $current_time > (int) $sbi_statuses_option['first_install'] + ( (int) $notifications['discount']['wait'] * DAY_IN_SECONDS ) ) {
135
- $should_show_new_user_discount = true;
136
- }
137
- }
138
-
139
- if ( isset( $notifications['review'] ) && $should_show_rating_notice ) {
140
- return array( $notifications['review'] );
141
- } elseif ( isset( $notifications['discount'] ) && $should_show_new_user_discount ) {
142
- return array( $notifications['discount'] );
143
- }
144
-
145
- return array();
146
- }
147
-
148
- /**
149
- * Get notification data.
150
- *
151
- * @since 2.6
152
- *
153
- * @return array
154
- */
155
- public function get() {
156
- if ( ! $this->has_access() ) {
157
- return array();
158
- }
159
-
160
- $option = $this->get_option();
161
-
162
- // Only update if does not exist.
163
- if ( empty( $option['update'] ) ) {
164
- $this->update();
165
- }
166
-
167
- $events = ! empty( $option['events'] ) ? $this->verify_active( $option['events'] ) : array();
168
- $feed = ! empty( $option['feed'] ) ? $this->verify_active( $option['feed'] ) : array();
169
-
170
- return array_merge( $events, $feed );
171
- }
172
-
173
- /**
174
- * Add a manual notification event.
175
- *
176
- * @since 2.6
177
- *
178
- * @param array $notification Notification data.
179
- */
180
- public function add( $notification ) {
181
- if ( empty( $notification['id'] ) ) {
182
- return;
183
- }
184
-
185
- $option = $this->get_option();
186
-
187
- if ( in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
188
- return;
189
- }
190
-
191
- foreach ( $option['events'] as $item ) {
192
- if ( $item['id'] === $notification['id'] ) {
193
- return;
194
- }
195
- }
196
-
197
- $notification = $this->verify( array( $notification ) );
198
-
199
- update_option(
200
- $this->option_name(),
201
- array(
202
- 'update' => $option['update'],
203
- 'feed' => $option['feed'],
204
- 'events' => array_merge( $notification, $option['events'] ),
205
- 'dismissed' => $option['dismissed'],
206
- )
207
- );
208
- }
209
-
210
- /**
211
- * Update notification data from feed.
212
- *
213
- * @since 2.6
214
- */
215
- public function update() {
216
- $feed = $this->fetch_feed();
217
- $option = $this->get_option();
218
-
219
- update_option(
220
- $this->option_name(),
221
- array(
222
- 'update' => time(),
223
- 'feed' => $feed,
224
- 'events' => $option['events'],
225
- 'dismissed' => $option['dismissed'],
226
- )
227
- );
228
- }
229
-
230
- /**
231
- * Do not enqueue anything extra.
232
- *
233
- * @since 2.6
234
- */
235
- public function enqueues() {
236
-
237
- }
238
-
239
- /**
240
- * Output notifications on Form Overview admin area.
241
- *
242
- * @since 2.6
243
- */
244
- public function output() {
245
- $notifications = $this->get();
246
-
247
- if ( empty( $notifications ) ) {
248
- return;
249
- }
250
-
251
- // new user notices included in regular settings page notifications so this
252
- // checks to see if user is one of those pages
253
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
254
- if ( ! empty( $_GET['page'] ) && strpos( $_GET['page'], 'sb-instagram-feed' ) !== false ) {
255
- return;
256
- }
257
-
258
- $content_allowed_tags = array(
259
- 'em' => array(),
260
- 'strong' => array(),
261
- 'span' => array(
262
- 'style' => array(),
263
- ),
264
- 'a' => array(
265
- 'href' => array(),
266
- 'target' => array(),
267
- 'rel' => array(),
268
- ),
269
- );
270
- $image_overlay = '';
271
-
272
- foreach ( $notifications as $notification ) {
273
- $type = sanitize_text_field( $notification['id'] );
274
- $close_href = wp_nonce_url( add_query_arg( array( 'sbi_dismiss' => $type ) ), 'sbi-' . $type, 'sbi_nonce' );
275
- $img_src = SBI_PLUGIN_URL . 'img/' . sanitize_text_field( $notification['image'] );
276
- $content = '';
277
- if ( ! empty( $notification['content'] ) ) {
278
- $content = wp_kses( $this->replace_merge_fields( $notification['content'], $notification ), $content_allowed_tags );
279
- }
280
- $buttons = array();
281
- if ( ! empty( $notification['btns'] ) && is_array( $notification['btns'] ) ) {
282
- foreach ( $notification['btns'] as $btn_type => $btn ) {
283
- if ( ! is_array( $btn['url'] ) ) {
284
- $buttons[ $btn_type ]['url'] = $this->replace_merge_fields( $btn['url'], $notification );
285
- } elseif ( is_array( $btn['url'] ) ) {
286
- $buttons[ $btn_type ]['url'] = wp_nonce_url( add_query_arg( $btn['url'] ), 'sbi-' . $type, 'sbi_nonce' );
287
- $close_href = $buttons[ $btn_type ]['url'];
288
- }
289
-
290
- $buttons[ $btn_type ]['attr'] = '';
291
- if ( ! empty( $btn['attr'] ) ) {
292
- $buttons[ $btn_type ]['attr'] = ' target="_blank" rel="noopener noreferrer"';
293
- }
294
-
295
- $buttons[ $btn_type ]['class'] = '';
296
- if ( ! empty( $btn['class'] ) ) {
297
- $buttons[ $btn_type ]['class'] = ' ' . $btn['class'];
298
- }
299
-
300
- $buttons[ $btn_type ]['text'] = '';
301
- if ( ! empty( $btn['text'] ) ) {
302
- $buttons[ $btn_type ]['text'] = wp_kses( $btn['text'], $content_allowed_tags );
303
- }
304
- }
305
- }
306
- if ( isset( $notification['image_overlay'] ) ) {
307
- $image_overlay = '<div class="img-overlay">' . esc_html( $notification['image_overlay'] ) . '</div>';
308
- }
309
- }
310
- ?>
311
-
312
- <div class="sbi_notice sbi_<?php echo esc_attr( $type ); ?>_notice">
313
- <div class="sbi_thumb">
314
- <img src="<?php echo esc_url( $img_src ); ?>" alt="notice">
315
- <?php echo $image_overlay; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
316
- </div>
317
- <div class="sbi-notice-text">
318
- <p style="padding-top: 4px;"><?php echo wp_kses( $content, $content_allowed_tags ); ?></p>
319
- <p class="links">
320
- <?php foreach ( $buttons as $button ) : ?>
321
- <a class="<?php echo esc_attr( $button['class'] ); ?>" href="<?php echo esc_attr( $button['url'] ); ?>"
322
- <?php
323
- if ( ! empty( $button['attr'] ) ) {
324
- echo ' target="_blank" rel="noopener noreferrer"'; }
325
- ?>
326
- ><?php echo wp_kses( $button['text'], $content_allowed_tags ); ?></a>
327
- <?php endforeach; ?>
328
- </p>
329
- </div>
330
- <a class="sbi_notice_close" href="<?php echo esc_attr( $close_href ); ?>"><i class="fa fa-close"></i></a>
331
- </div>
332
- <?php
333
- }
334
-
335
- /**
336
- * Hide messages permanently or some can be dismissed temporarily
337
- *
338
- * @since 2.6
339
- */
340
- public function dismiss() {
341
- global $current_user;
342
- $user_id = $current_user->ID;
343
- $sbi_statuses_option = get_option( 'sbi_statuses', array() );
344
-
345
- if ( isset( $_GET['sbi_ignore_rating_notice_nag'] ) ) {
346
- $rating_ignore = false;
347
- if ( isset( $_GET['sbi_nonce'] ) && wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-review' ) ) {
348
- $rating_ignore = isset( $_GET['sbi_ignore_rating_notice_nag'] ) ? sanitize_text_field( $_GET['sbi_ignore_rating_notice_nag'] ) : false;
349
- }
350
- if ( 1 === (int) $rating_ignore ) {
351
- update_option( 'sbi_rating_notice', 'dismissed', false );
352
- $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
353
- update_option( 'sbi_statuses', $sbi_statuses_option, false );
354
-
355
- } elseif ( 'later' === $rating_ignore ) {
356
- set_transient( 'instagram_feed_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS );
357
- update_option( 'sbi_rating_notice', 'pending', false );
358
- }
359
- }
360
-
361
- if ( isset( $_GET['sbi_ignore_new_user_sale_notice'] ) ) {
362
- $new_user_ignore = false;
363
- if ( isset( $_GET['sbi_nonce'] ) && wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-discount' ) ) {
364
- $new_user_ignore = isset( $_GET['sbi_ignore_new_user_sale_notice'] ) ? sanitize_text_field( $_GET['sbi_ignore_new_user_sale_notice'] ) : false;
365
- }
366
- if ( 'always' === $new_user_ignore ) {
367
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
368
-
369
- $current_month_number = (int) date( 'n', sbi_get_current_time() );
370
- $not_early_in_the_year = ( $current_month_number > 5 );
371
-
372
- if ( $not_early_in_the_year ) {
373
- update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
374
- }
375
- }
376
- }
377
-
378
- if ( isset( $_GET['sbi_ignore_bfcm_sale_notice'] ) ) {
379
- $bfcm_ignore = false;
380
- if ( isset( $_GET['sbi_nonce'] ) && wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-bfcm' ) ) {
381
- $bfcm_ignore = isset( $_GET['sbi_ignore_bfcm_sale_notice'] ) ? sanitize_text_field( $_GET['sbi_ignore_bfcm_sale_notice'] ) : false;
382
- }
383
- if ( 'always' === $bfcm_ignore ) {
384
- update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', 'always' );
385
- } elseif ( date( 'Y', sbi_get_current_time() ) === $bfcm_ignore ) {
386
- update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
387
- }
388
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
389
- }
390
-
391
- if ( isset( $_GET['sbi_dismiss'] ) ) {
392
- $notice_dismiss = false;
393
- if ( isset( $_GET['sbi_nonce'] ) && wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-notice-dismiss' ) ) {
394
- $notice_dismiss = sanitize_text_field( $_GET['sbi_dismiss'] );
395
- }
396
- if ( 'review' === $notice_dismiss ) {
397
- update_option( 'sbi_rating_notice', 'dismissed', false );
398
- $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
399
- update_option( 'sbi_statuses', $sbi_statuses_option, false );
400
-
401
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
402
- } elseif ( 'discount' === $notice_dismiss ) {
403
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
404
-
405
- $current_month_number = (int) date( 'n', sbi_get_current_time() );
406
- $not_early_in_the_year = ( $current_month_number > 5 );
407
-
408
- if ( $not_early_in_the_year ) {
409
- update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
410
- }
411
-
412
- update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
413
- }
414
- }
415
- }
416
- }
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 = 'https://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
+ /**
41
+ * @return string
42
+ */
43
+ public function option_name() {
44
+ return self::OPTION_NAME;
45
+ }
46
+
47
+ /**
48
+ * @return string
49
+ */
50
+ public function source_url() {
51
+ return self::SOURCE_URL;
52
+ }
53
+
54
+ /**
55
+ * Verify notification data before it is saved.
56
+ *
57
+ * @param array $notifications Array of notifications items to verify.
58
+ *
59
+ * @return array
60
+ *
61
+ * @since 2.6
62
+ */
63
+ public function verify( $notifications ) {
64
+ $data = array();
65
+
66
+ if ( ! is_array( $notifications ) || empty( $notifications ) ) {
67
+ return $data;
68
+ }
69
+
70
+ $option = $this->get_option();
71
+
72
+ foreach ( $notifications as $key => $notification ) {
73
+
74
+ // The message should never be empty, if they are, ignore.
75
+ if ( empty( $notification['content'] ) ) {
76
+ continue;
77
+ }
78
+
79
+ // Ignore if notification has already been dismissed.
80
+ if ( ! empty( $option['dismissed'] ) && in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
81
+ continue;
82
+ }
83
+
84
+ $data[ $key ] = $notification;
85
+ }
86
+
87
+ return $data;
88
+ }
89
+
90
+ /**
91
+ * Verify saved notification data for active notifications.
92
+ *
93
+ * @since 2.6
94
+ *
95
+ * @param array $notifications Array of notifications items to verify.
96
+ *
97
+ * @return array
98
+ */
99
+ public function verify_active( $notifications ) {
100
+ if ( ! is_array( $notifications ) || empty( $notifications ) ) {
101
+ return array();
102
+ }
103
+
104
+ $sbi_statuses_option = get_option( 'sbi_statuses', array() );
105
+ $current_time = sbi_get_current_time();
106
+
107
+ // rating notice logic
108
+ $sbi_rating_notice_option = get_option( 'sbi_rating_notice', false );
109
+ $sbi_rating_notice_waiting = get_transient( 'instagram_feed_rating_notice_waiting' );
110
+ $should_show_rating_notice = ( $sbi_rating_notice_waiting !== 'waiting' && $sbi_rating_notice_option !== 'dismissed' );
111
+
112
+ // new user discount logic
113
+ $in_new_user_month_range = true;
114
+ $should_show_new_user_discount = false;
115
+ $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;
116
+
117
+ if ( isset( $sbi_statuses_option['first_install'] ) && $sbi_statuses_option['first_install'] === 'from_update' ) {
118
+ global $current_user;
119
+ $user_id = $current_user->ID;
120
+ $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice' );
121
+ $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
122
+ if ( $ignore_new_user_sale_notice_meta !== 'always' ) {
123
+ $should_show_new_user_discount = true;
124
+ }
125
+ } elseif ( $in_new_user_month_range && $has_been_one_month_since_rating_dismissal && $sbi_rating_notice_waiting !== 'waiting' ) {
126
+ global $current_user;
127
+ $user_id = $current_user->ID;
128
+ $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice' );
129
+ $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
130
+
131
+ if (
132
+ 'always' !== $ignore_new_user_sale_notice_meta &&
133
+ isset( $sbi_statuses_option['first_install'] ) &&
134
+ $current_time > (int) $sbi_statuses_option['first_install'] + ( (int) $notifications['discount']['wait'] * DAY_IN_SECONDS ) ) {
135
+ $should_show_new_user_discount = true;
136
+ }
137
+ }
138
+
139
+ if ( isset( $notifications['review'] ) && $should_show_rating_notice ) {
140
+ return array( $notifications['review'] );
141
+ } elseif ( isset( $notifications['discount'] ) && $should_show_new_user_discount ) {
142
+ return array( $notifications['discount'] );
143
+ }
144
+
145
+ return array();
146
+ }
147
+
148
+ /**
149
+ * Get notification data.
150
+ *
151
+ * @since 2.6
152
+ *
153
+ * @return array
154
+ */
155
+ public function get() {
156
+ if ( ! $this->has_access() ) {
157
+ return array();
158
+ }
159
+
160
+ $option = $this->get_option();
161
+
162
+ // Only update if does not exist.
163
+ if ( empty( $option['update'] ) ) {
164
+ $this->update();
165
+ }
166
+
167
+ $events = ! empty( $option['events'] ) ? $this->verify_active( $option['events'] ) : array();
168
+ $feed = ! empty( $option['feed'] ) ? $this->verify_active( $option['feed'] ) : array();
169
+
170
+ return array_merge( $events, $feed );
171
+ }
172
+
173
+ /**
174
+ * Add a manual notification event.
175
+ *
176
+ * @since 2.6
177
+ *
178
+ * @param array $notification Notification data.
179
+ */
180
+ public function add( $notification ) {
181
+ if ( empty( $notification['id'] ) ) {
182
+ return;
183
+ }
184
+
185
+ $option = $this->get_option();
186
+
187
+ if ( in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
188
+ return;
189
+ }
190
+
191
+ foreach ( $option['events'] as $item ) {
192
+ if ( $item['id'] === $notification['id'] ) {
193
+ return;
194
+ }
195
+ }
196
+
197
+ $notification = $this->verify( array( $notification ) );
198
+
199
+ update_option(
200
+ $this->option_name(),
201
+ array(
202
+ 'update' => $option['update'],
203
+ 'feed' => $option['feed'],
204
+ 'events' => array_merge( $notification, $option['events'] ),
205
+ 'dismissed' => $option['dismissed'],
206
+ )
207
+ );
208
+ }
209
+
210
+ /**
211
+ * Update notification data from feed.
212
+ *
213
+ * @since 2.6
214
+ */
215
+ public function update() {
216
+ $feed = $this->fetch_feed();
217
+ $option = $this->get_option();
218
+
219
+ update_option(
220
+ $this->option_name(),
221
+ array(
222
+ 'update' => time(),
223
+ 'feed' => $feed,
224
+ 'events' => $option['events'],
225
+ 'dismissed' => $option['dismissed'],
226
+ )
227
+ );
228
+ }
229
+
230
+ /**
231
+ * Do not enqueue anything extra.
232
+ *
233
+ * @since 2.6
234
+ */
235
+ public function enqueues() {
236
+
237
+ }
238
+
239
+ /**
240
+ * Output notifications on Form Overview admin area.
241
+ *
242
+ * @since 2.6
243
+ */
244
+ public function output() {
245
+ $notifications = $this->get();
246
+
247
+ if ( empty( $notifications ) ) {
248
+ return;
249
+ }
250
+
251
+ // new user notices included in regular settings page notifications so this
252
+ // checks to see if user is one of those pages
253
+ // phpcs:ignore WordPress.Security.NonceVerification.Recommended
254
+ if ( ! empty( $_GET['page'] ) && strpos( $_GET['page'], 'sb-instagram-feed' ) !== false ) {
255
+ return;
256
+ }
257
+
258
+ $content_allowed_tags = array(
259
+ 'em' => array(),
260
+ 'strong' => array(),
261
+ 'span' => array(
262
+ 'style' => array(),
263
+ ),
264
+ 'a' => array(
265
+ 'href' => array(),
266
+ 'target' => array(),
267
+ 'rel' => array(),
268
+ ),
269
+ );
270
+ $image_overlay = '';
271
+
272
+ foreach ( $notifications as $notification ) {
273
+ $type = sanitize_text_field( $notification['id'] );
274
+ $close_href = wp_nonce_url( add_query_arg( array( 'sbi_dismiss' => $type ) ), 'sbi-' . $type, 'sbi_nonce' );
275
+ $img_src = SBI_PLUGIN_URL . 'img/' . sanitize_text_field( $notification['image'] );
276
+ $content = '';
277
+ if ( ! empty( $notification['content'] ) ) {
278
+ $content = wp_kses( $this->replace_merge_fields( $notification['content'], $notification ), $content_allowed_tags );
279
+ }
280
+ $buttons = array();
281
+ if ( ! empty( $notification['btns'] ) && is_array( $notification['btns'] ) ) {
282
+ foreach ( $notification['btns'] as $btn_type => $btn ) {
283
+ if ( ! is_array( $btn['url'] ) ) {
284
+ $buttons[ $btn_type ]['url'] = $this->replace_merge_fields( $btn['url'], $notification );
285
+ } elseif ( is_array( $btn['url'] ) ) {
286
+ $buttons[ $btn_type ]['url'] = wp_nonce_url( add_query_arg( $btn['url'] ), 'sbi-' . $type, 'sbi_nonce' );
287
+ $close_href = $buttons[ $btn_type ]['url'];
288
+ }
289
+
290
+ $buttons[ $btn_type ]['attr'] = '';
291
+ if ( ! empty( $btn['attr'] ) ) {
292
+ $buttons[ $btn_type ]['attr'] = ' target="_blank" rel="noopener noreferrer"';
293
+ }
294
+
295
+ $buttons[ $btn_type ]['class'] = '';
296
+ if ( ! empty( $btn['class'] ) ) {
297
+ $buttons[ $btn_type ]['class'] = ' ' . $btn['class'];
298
+ }
299
+
300
+ $buttons[ $btn_type ]['text'] = '';
301
+ if ( ! empty( $btn['text'] ) ) {
302
+ $buttons[ $btn_type ]['text'] = wp_kses( $btn['text'], $content_allowed_tags );
303
+ }
304
+ }
305
+ }
306
+ if ( isset( $notification['image_overlay'] ) ) {
307
+ $image_overlay = '<div class="img-overlay">' . esc_html( $notification['image_overlay'] ) . '</div>';
308
+ }
309
+ }
310
+ ?>
311
+
312
+ <div class="sbi_notice sbi_<?php echo esc_attr( $type ); ?>_notice">
313
+ <div class="sbi_thumb">
314
+ <img src="<?php echo esc_url( $img_src ); ?>" alt="notice">
315
+ <?php echo $image_overlay; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
316
+ </div>
317
+ <div class="sbi-notice-text">
318
+ <p style="padding-top: 4px;"><?php echo wp_kses( $content, $content_allowed_tags ); ?></p>
319
+ <p class="links">
320
+ <?php foreach ( $buttons as $button ) : ?>
321
+ <a class="<?php echo esc_attr( $button['class'] ); ?>" href="<?php echo esc_attr( $button['url'] ); ?>"
322
+ <?php
323
+ if ( ! empty( $button['attr'] ) ) {
324
+ echo ' target="_blank" rel="noopener noreferrer"'; }
325
+ ?>
326
+ ><?php echo wp_kses( $button['text'], $content_allowed_tags ); ?></a>
327
+ <?php endforeach; ?>
328
+ </p>
329
+ </div>
330
+ <a class="sbi_notice_close" href="<?php echo esc_attr( $close_href ); ?>"><i class="fa fa-close"></i></a>
331
+ </div>
332
+ <?php
333
+ }
334
+
335
+ /**
336
+ * Hide messages permanently or some can be dismissed temporarily
337
+ *
338
+ * @since 2.6
339
+ */
340
+ public function dismiss() {
341
+ global $current_user;
342
+ $user_id = $current_user->ID;
343
+ $sbi_statuses_option = get_option( 'sbi_statuses', array() );
344
+
345
+ if ( isset( $_GET['sbi_ignore_rating_notice_nag'] ) ) {
346
+ $rating_ignore = false;
347
+ if ( isset( $_GET['sbi_nonce'] ) && wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-review' ) ) {
348
+ $rating_ignore = isset( $_GET['sbi_ignore_rating_notice_nag'] ) ? sanitize_text_field( $_GET['sbi_ignore_rating_notice_nag'] ) : false;
349
+ }
350
+ if ( 1 === (int) $rating_ignore ) {
351
+ update_option( 'sbi_rating_notice', 'dismissed', false );
352
+ $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
353
+ update_option( 'sbi_statuses', $sbi_statuses_option, false );
354
+
355
+ } elseif ( 'later' === $rating_ignore ) {
356
+ set_transient( 'instagram_feed_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS );
357
+ update_option( 'sbi_rating_notice', 'pending', false );
358
+ }
359
+ }
360
+
361
+ if ( isset( $_GET['sbi_ignore_new_user_sale_notice'] ) ) {
362
+ $new_user_ignore = false;
363
+ if ( isset( $_GET['sbi_nonce'] ) && wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-discount' ) ) {
364
+ $new_user_ignore = isset( $_GET['sbi_ignore_new_user_sale_notice'] ) ? sanitize_text_field( $_GET['sbi_ignore_new_user_sale_notice'] ) : false;
365
+ }
366
+ if ( 'always' === $new_user_ignore ) {
367
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
368
+
369
+ $current_month_number = (int) date( 'n', sbi_get_current_time() );
370
+ $not_early_in_the_year = ( $current_month_number > 5 );
371
+
372
+ if ( $not_early_in_the_year ) {
373
+ update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
374
+ }
375
+ }
376
+ }
377
+
378
+ if ( isset( $_GET['sbi_ignore_bfcm_sale_notice'] ) ) {
379
+ $bfcm_ignore = false;
380
+ if ( isset( $_GET['sbi_nonce'] ) && wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-bfcm' ) ) {
381
+ $bfcm_ignore = isset( $_GET['sbi_ignore_bfcm_sale_notice'] ) ? sanitize_text_field( $_GET['sbi_ignore_bfcm_sale_notice'] ) : false;
382
+ }
383
+ if ( 'always' === $bfcm_ignore ) {
384
+ update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', 'always' );
385
+ } elseif ( date( 'Y', sbi_get_current_time() ) === $bfcm_ignore ) {
386
+ update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
387
+ }
388
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
389
+ }
390
+
391
+ if ( isset( $_GET['sbi_dismiss'] ) ) {
392
+ $notice_dismiss = false;
393
+ if ( isset( $_GET['sbi_nonce'] ) && wp_verify_nonce( $_GET['sbi_nonce'], 'sbi-notice-dismiss' ) ) {
394
+ $notice_dismiss = sanitize_text_field( $_GET['sbi_dismiss'] );
395
+ }
396
+ if ( 'review' === $notice_dismiss ) {
397
+ update_option( 'sbi_rating_notice', 'dismissed', false );
398
+ $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
399
+ update_option( 'sbi_statuses', $sbi_statuses_option, false );
400
+
401
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
402
+ } elseif ( 'discount' === $notice_dismiss ) {
403
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
404
+
405
+ $current_month_number = (int) date( 'n', sbi_get_current_time() );
406
+ $not_early_in_the_year = ( $current_month_number > 5 );
407
+
408
+ if ( $not_early_in_the_year ) {
409
+ update_user_meta( $user_id, 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
410
+ }
411
+
412
+ update_user_meta( $user_id, 'sbi_ignore_new_user_sale_notice', 'always' );
413
+ }
414
+ }
415
+ }
416
+ }
inc/admin/class-sbi-notifications.php CHANGED
@@ -1,582 +1,582 @@
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 = 'https://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
- $args = array(
142
- 'timeout' => 20,
143
- );
144
- if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
145
- $args['sslverify'] = false;
146
- }
147
- $res = wp_remote_get( $this->source_url(), $args );
148
-
149
- if ( is_wp_error( $res ) ) {
150
- return array();
151
- }
152
-
153
- $body = wp_remote_retrieve_body( $res );
154
-
155
- if ( empty( $body ) ) {
156
- return array();
157
- }
158
-
159
- return $this->verify( json_decode( $body, true ) );
160
- }
161
-
162
- /**
163
- * Verify notification data before it is saved.
164
- *
165
- * @since 2.6/5.9
166
- *
167
- * @param array $notifications Array of notifications items to verify.
168
- *
169
- * @return array
170
- */
171
- public function verify( $notifications ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
172
- $data = array();
173
-
174
- if ( ! is_array( $notifications ) || empty( $notifications ) ) {
175
- return $data;
176
- }
177
-
178
- $option = $this->get_option();
179
-
180
- foreach ( $notifications as $notification ) {
181
- // Ignore if max wp version detected
182
- if ( ! empty( $notification['maxwpver'] ) && version_compare( get_bloginfo( 'version' ), $notification['maxwpver'], '>=' ) ) {
183
- continue;
184
- }
185
-
186
- // The message and license should never be empty, if they are, ignore.
187
- if ( empty( $notification['content'] ) || empty( $notification['type'] ) ) {
188
- continue;
189
- }
190
-
191
- // Ignore if license type does not match.
192
- $license = sbi_is_pro_version() ? 'pro' : 'free';
193
-
194
- if ( ! in_array( $license, $notification['type'], true ) ) {
195
- continue;
196
- }
197
-
198
- // Ignore if expired.
199
- if ( ! empty( $notification['end'] ) && sbi_get_current_time() > strtotime( $notification['end'] ) ) {
200
- continue;
201
- }
202
-
203
- // Ignore if notification has already been dismissed.
204
- if ( ! empty( $option['dismissed'] ) && in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
205
- continue;
206
- }
207
-
208
- // TODO: Ignore if notification existed before installing SBI.
209
- // Prevents bombarding the user with notifications after activation.
210
- $activated = false;
211
- if ( ! empty( $activated ) && ! empty( $notification['start'] ) && $activated > strtotime( $notification['start'] ) ) {
212
- continue;
213
- }
214
-
215
- $data[] = $notification;
216
- }
217
-
218
- return $data;
219
- }
220
-
221
- /**
222
- * Verify saved notification data for active notifications.
223
- *
224
- * @since 2.6/5.9
225
- *
226
- * @param array $notifications Array of notifications items to verify.
227
- *
228
- * @return array
229
- */
230
- public function verify_active( $notifications ) {
231
- if ( ! is_array( $notifications ) || empty( $notifications ) ) {
232
- return array();
233
- }
234
-
235
- // Remove notfications that are not active.
236
- foreach ( $notifications as $key => $notification ) {
237
- // Ignore if max wp version detected
238
- if ( ! empty( $notification['maxwpver'] ) && version_compare( get_bloginfo( 'version' ), $notification['maxwpver'], '>=' ) ) {
239
- unset( $notifications[ $key ] );
240
- }
241
-
242
- if ( ( ! empty( $notification['start'] ) && sbi_get_current_time() < strtotime( $notification['start'] ) ) || ( ! empty( $notification['end'] ) && sbi_get_current_time() > strtotime( $notification['end'] ) ) ) {
243
- unset( $notifications[ $key ] );
244
- }
245
- }
246
-
247
- return $notifications;
248
- }
249
-
250
- /**
251
- * Get notification data.
252
- *
253
- * @since 2.6/5.9
254
- *
255
- * @return array
256
- */
257
- public function get() {
258
- if ( ! $this->has_access() ) {
259
- return array();
260
- }
261
-
262
- $option = $this->get_option();
263
-
264
- // Update notifications using async task.
265
- if ( empty( $option['update'] ) || sbi_get_current_time() > $option['update'] + DAY_IN_SECONDS ) {
266
- $this->update();
267
- }
268
-
269
- $events = ! empty( $option['events'] ) ? $this->verify_active( $option['events'] ) : array();
270
- $feed = ! empty( $option['feed'] ) ? $this->verify_active( $option['feed'] ) : array();
271
-
272
- // If there is a new user notification, add it to the beginning of the notification list
273
- $sbi_newuser = new SBI_New_User();
274
- $newuser_notifications = $sbi_newuser->get();
275
-
276
- if ( ! empty( $newuser_notifications ) ) {
277
- $events = array_merge( $newuser_notifications, $events );
278
- }
279
-
280
- return array_merge( $events, $feed );
281
- }
282
-
283
- /**
284
- * Get notification count.
285
- *
286
- * @since 2.6/5.9
287
- *
288
- * @return int
289
- */
290
- public function get_count() {
291
- return count( $this->get() );
292
- }
293
-
294
- /**
295
- * Add a manual notification event.
296
- *
297
- * @since 2.6/5.9
298
- *
299
- * @param array $notification Notification data.
300
- */
301
- public function add( $notification ) {
302
- if ( empty( $notification['id'] ) ) {
303
- return;
304
- }
305
-
306
- $option = $this->get_option();
307
-
308
- if ( in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
309
- return;
310
- }
311
-
312
- foreach ( $option['events'] as $item ) {
313
- if ( $item['id'] === $notification['id'] ) {
314
- return;
315
- }
316
- }
317
-
318
- $notification = $this->verify( array( $notification ) );
319
-
320
- update_option(
321
- 'sbi_notifications',
322
- array(
323
- 'update' => $option['update'],
324
- 'feed' => $option['feed'],
325
- 'events' => array_merge( $notification, $option['events'] ),
326
- 'dismissed' => $option['dismissed'],
327
- )
328
- );
329
- }
330
-
331
- /**
332
- * Update notification data from feed.
333
- *
334
- * @since 2.6/5.9
335
- */
336
- public function update() {
337
- $feed = $this->fetch_feed();
338
- $option = $this->get_option();
339
-
340
- update_option(
341
- 'sbi_notifications',
342
- array(
343
- 'update' => sbi_get_current_time(),
344
- 'feed' => $feed,
345
- 'events' => $option['events'],
346
- 'dismissed' => $option['dismissed'],
347
- )
348
- );
349
- }
350
-
351
- /**
352
- * Admin area Form Overview enqueues.
353
- *
354
- * @since 2.6/5.9
355
- */
356
- public function enqueues() {
357
- if ( ! $this->has_access() ) {
358
- return;
359
- }
360
-
361
- $notifications = $this->get();
362
-
363
- if ( empty( $notifications ) ) {
364
- return;
365
- }
366
-
367
- $min = '';
368
-
369
- wp_enqueue_style(
370
- 'sbi-admin-notifications',
371
- SBI_PLUGIN_URL . "css/admin-notifications{$min}.css",
372
- array(),
373
- SBIVER
374
- );
375
-
376
- wp_enqueue_script(
377
- 'sbi-admin-notifications',
378
- SBI_PLUGIN_URL . "js/admin-notifications{$min}.js",
379
- array( 'jquery' ),
380
- SBIVER,
381
- true
382
- );
383
- }
384
-
385
- /**
386
- * Fields from the remote source contain placeholders to allow
387
- * some messages to be used for multiple plugins.
388
- *
389
- * @param $content string
390
- * @param $notification array
391
- *
392
- * @return string
393
- *
394
- * @since 2.6/5.9
395
- */
396
- public function replace_merge_fields( $content, $notification ) {
397
- $merge_fields = array(
398
- '{plugin}' => 'Instagram Feed',
399
- '{amount}' => isset( $notification['amount'] ) ? $notification['amount'] : '',
400
- '{platform}' => 'Instagram',
401
- '{lowerplatform}' => 'instagram',
402
- '{review-url}' => 'https://wordpress.org/support/plugin/instagram-feed/reviews/',
403
- '{slug}' => 'instagram-feed',
404
- '{campaign}' => 'instagram-free',
405
- );
406
-
407
- if ( sbi_is_pro_version() ) {
408
- $merge_fields['{campaign}'] = 'instagram-pro';
409
- $merge_fields['{plugin}'] = 'Instagram Feed Pro';
410
- }
411
-
412
- foreach ( $merge_fields as $find => $replace ) {
413
- $content = str_replace( $find, $replace, $content );
414
- }
415
-
416
- return $content;
417
- }
418
-
419
- /**
420
- * Output notifications on Instagram Feed admin area.
421
- *
422
- * @since 2.6/5.9
423
- */
424
- public function output() {
425
- $notifications = $this->get();
426
-
427
- if ( empty( $notifications ) ) {
428
- return;
429
- }
430
-
431
- $notifications_html = '';
432
- $current_class = ' current';
433
- $content_allowed_tags = array(
434
- 'em' => array(),
435
- 'strong' => array(),
436
- 'span' => array(
437
- 'style' => array(),
438
- ),
439
- 'a' => array(
440
- 'href' => array(),
441
- 'target' => array(),
442
- 'rel' => array(),
443
- ),
444
- );
445
-
446
- foreach ( $notifications as $notification ) {
447
- // Buttons HTML.
448
- $buttons_html = '';
449
- if ( ! empty( $notification['btns'] ) && is_array( $notification['btns'] ) ) {
450
- foreach ( $notification['btns'] as $btn_type => $btn ) {
451
- if ( is_array( $btn['url'] ) ) {
452
- $btn['url'] = wp_nonce_url( add_query_arg( $btn['url'] ), 'sbi-' . sanitize_key( $notification['id'] ), 'sbi_nonce' );
453
- }
454
- if ( ! empty( $btn['attr'] ) ) {
455
- $btn['target'] = '_blank';
456
- }
457
- $buttons_html .= sprintf(
458
- '<a href="%1$s" class="button button-%2$s"%3$s>%4$s</a>',
459
- ! empty( $btn['url'] ) ? esc_url( $this->replace_merge_fields( $btn['url'], $notification ) ) : '',
460
- $btn_type === 'primary' ? 'primary' : 'secondary',
461
- ! empty( $btn['target'] ) && $btn['target'] === '_blank' ? ' target="_blank" rel="noopener noreferrer"' : '',
462
- ! empty( $btn['text'] ) ? sanitize_text_field( $btn['text'] ) : ''
463
- );
464
- }
465
- $buttons_html = ! empty( $buttons_html ) ? '<div class="buttons">' . $buttons_html . '</div>' : '';
466
- }
467
-
468
- if ( empty( $notification['image'] ) ) {
469
- $image_html = '<div class="bell">';
470
-
471
- $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>';
472
- $image_html .= '</div>';
473
- } else {
474
- if ( 'balloon' === $notification['image'] || 'review' === $notification['id'] || 'discount' === $notification['id'] ) {
475
- $image_html = '<div class="bell">';
476
-
477
- $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">';
478
- $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"/>';
479
- $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"/>';
480
- $image_html .= '</svg>';
481
- } else {
482
- $image_html = '<div class="thumb">';
483
- $img_src = SBY_PLUGIN_URL . 'img/' . sanitize_text_field( $notification['image'] );
484
- $image_html .= '<img src="' . esc_url( $img_src ) . '" alt="notice">';
485
-
486
- if ( isset( $notification['image_overlay'] ) ) {
487
- $image_html .= '<div class="img-overlay">' . esc_html( str_replace( '%', '%%', $notification['image_overlay'] ) ) . '</div>';
488
- }
489
- }
490
- $image_html .= '</div>';
491
-
492
- }
493
-
494
- // Notification HTML.
495
- $notifications_html .= sprintf(
496
- '<div class="message%5$s" data-message-id="%4$s">' . $image_html . '
497
- <h3 class="title">%1$s</h3>
498
- <p class="content">%2$s</p>
499
- %3$s
500
- </div>',
501
- ! empty( $notification['title'] ) ? $this->replace_merge_fields( sanitize_text_field( $notification['title'] ), $notification ) : '',
502
- ! empty( $notification['content'] ) ? wp_kses( $this->replace_merge_fields( $notification['content'], $notification ), $content_allowed_tags ) : '',
503
- $buttons_html,
504
- ! empty( $notification['id'] ) ? esc_attr( sanitize_text_field( $notification['id'] ) ) : 0,
505
- $current_class
506
- );
507
-
508
- // Only first notification is current.
509
- $current_class = '';
510
- }
511
- ?>
512
-
513
- <div id="sbi-notifications">
514
- <a class="dismiss" title="<?php echo esc_attr__( 'Dismiss this message', 'instagram-feed' ); ?>"><i class="fa fa-times-circle" aria-hidden="true"></i></a>
515
-
516
- <div class="navigation">
517
- <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>
518
- <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>
519
- </div>
520
-
521
- <div class="messages">
522
- <?php echo $notifications_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
523
- </div>
524
- </div>
525
- <?php
526
- }
527
-
528
- /**
529
- * Dismiss notification via AJAX. If it's a new user message, also dismiss it
530
- * on all admin pages.
531
- *
532
- * @since 2.6/5.9
533
- */
534
- public function dismiss() {
535
- // Run a security check.
536
- check_ajax_referer( 'sbi-admin', 'nonce' );
537
-
538
- // Check for access and required param.
539
- if ( ! $this->has_access() || empty( $_POST['id'] ) ) {
540
- wp_send_json_error();
541
- }
542
-
543
- $id = sanitize_text_field( wp_unslash( $_POST['id'] ) );
544
-
545
- if ( $id === 'review' ) {
546
- $sbi_statuses_option = get_option( 'sbi_statuses', array() );
547
-
548
- update_option( 'sbi_rating_notice', 'dismissed', false );
549
- $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
550
- update_option( 'sbi_statuses', $sbi_statuses_option, false );
551
- } elseif ( $id === 'discount' ) {
552
- update_user_meta( get_current_user_id(), 'sbi_ignore_new_user_sale_notice', 'always' );
553
-
554
- $current_month_number = (int) date( 'n', sbi_get_current_time() );
555
- $not_early_in_the_year = ( $current_month_number > 5 );
556
-
557
- if ( $not_early_in_the_year ) {
558
- update_user_meta( get_current_user_id(), 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
559
- }
560
- }
561
-
562
- $option = $this->get_option();
563
- $type = is_numeric( $id ) ? 'feed' : 'events';
564
-
565
- $option['dismissed'][] = $id;
566
- $option['dismissed'] = array_unique( $option['dismissed'] );
567
-
568
- // Remove notification.
569
- if ( is_array( $option[ $type ] ) && ! empty( $option[ $type ] ) ) {
570
- foreach ( $option[ $type ] as $key => $notification ) {
571
- if ( $notification['id'] == $id ) { // phpcs:ignore WordPress.PHP.StrictComparisons
572
- unset( $option[ $type ][ $key ] );
573
- break;
574
- }
575
- }
576
- }
577
-
578
- update_option( 'sbi_notifications', $option );
579
-
580
- wp_send_json_success();
581
- }
582
- }
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 = 'https://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
+ $args = array(
142
+ 'timeout' => 20,
143
+ );
144
+ if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
145
+ $args['sslverify'] = false;
146
+ }
147
+ $res = wp_remote_get( $this->source_url(), $args );
148
+
149
+ if ( is_wp_error( $res ) ) {
150
+ return array();
151
+ }
152
+
153
+ $body = wp_remote_retrieve_body( $res );
154
+
155
+ if ( empty( $body ) ) {
156
+ return array();
157
+ }
158
+
159
+ return $this->verify( json_decode( $body, true ) );
160
+ }
161
+
162
+ /**
163
+ * Verify notification data before it is saved.
164
+ *
165
+ * @since 2.6/5.9
166
+ *
167
+ * @param array $notifications Array of notifications items to verify.
168
+ *
169
+ * @return array
170
+ */
171
+ public function verify( $notifications ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
172
+ $data = array();
173
+
174
+ if ( ! is_array( $notifications ) || empty( $notifications ) ) {
175
+ return $data;
176
+ }
177
+
178
+ $option = $this->get_option();
179
+
180
+ foreach ( $notifications as $notification ) {
181
+ // Ignore if max wp version detected
182
+ if ( ! empty( $notification['maxwpver'] ) && version_compare( get_bloginfo( 'version' ), $notification['maxwpver'], '>=' ) ) {
183
+ continue;
184
+ }
185
+
186
+ // The message and license should never be empty, if they are, ignore.
187
+ if ( empty( $notification['content'] ) || empty( $notification['type'] ) ) {
188
+ continue;
189
+ }
190
+
191
+ // Ignore if license type does not match.
192
+ $license = sbi_is_pro_version() ? 'pro' : 'free';
193
+
194
+ if ( ! in_array( $license, $notification['type'], true ) ) {
195
+ continue;
196
+ }
197
+
198
+ // Ignore if expired.
199
+ if ( ! empty( $notification['end'] ) && sbi_get_current_time() > strtotime( $notification['end'] ) ) {
200
+ continue;
201
+ }
202
+
203
+ // Ignore if notification has already been dismissed.
204
+ if ( ! empty( $option['dismissed'] ) && in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
205
+ continue;
206
+ }
207
+
208
+ // TODO: Ignore if notification existed before installing SBI.
209
+ // Prevents bombarding the user with notifications after activation.
210
+ $activated = false;
211
+ if ( ! empty( $activated ) && ! empty( $notification['start'] ) && $activated > strtotime( $notification['start'] ) ) {
212
+ continue;
213
+ }
214
+
215
+ $data[] = $notification;
216
+ }
217
+
218
+ return $data;
219
+ }
220
+
221
+ /**
222
+ * Verify saved notification data for active notifications.
223
+ *
224
+ * @since 2.6/5.9
225
+ *
226
+ * @param array $notifications Array of notifications items to verify.
227
+ *
228
+ * @return array
229
+ */
230
+ public function verify_active( $notifications ) {
231
+ if ( ! is_array( $notifications ) || empty( $notifications ) ) {
232
+ return array();
233
+ }
234
+
235
+ // Remove notfications that are not active.
236
+ foreach ( $notifications as $key => $notification ) {
237
+ // Ignore if max wp version detected
238
+ if ( ! empty( $notification['maxwpver'] ) && version_compare( get_bloginfo( 'version' ), $notification['maxwpver'], '>=' ) ) {
239
+ unset( $notifications[ $key ] );
240
+ }
241
+
242
+ if ( ( ! empty( $notification['start'] ) && sbi_get_current_time() < strtotime( $notification['start'] ) ) || ( ! empty( $notification['end'] ) && sbi_get_current_time() > strtotime( $notification['end'] ) ) ) {
243
+ unset( $notifications[ $key ] );
244
+ }
245
+ }
246
+
247
+ return $notifications;
248
+ }
249
+
250
+ /**
251
+ * Get notification data.
252
+ *
253
+ * @since 2.6/5.9
254
+ *
255
+ * @return array
256
+ */
257
+ public function get() {
258
+ if ( ! $this->has_access() ) {
259
+ return array();
260
+ }
261
+
262
+ $option = $this->get_option();
263
+
264
+ // Update notifications using async task.
265
+ if ( empty( $option['update'] ) || sbi_get_current_time() > $option['update'] + DAY_IN_SECONDS ) {
266
+ $this->update();
267
+ }
268
+
269
+ $events = ! empty( $option['events'] ) ? $this->verify_active( $option['events'] ) : array();
270
+ $feed = ! empty( $option['feed'] ) ? $this->verify_active( $option['feed'] ) : array();
271
+
272
+ // If there is a new user notification, add it to the beginning of the notification list
273
+ $sbi_newuser = new SBI_New_User();
274
+ $newuser_notifications = $sbi_newuser->get();
275
+
276
+ if ( ! empty( $newuser_notifications ) ) {
277
+ $events = array_merge( $newuser_notifications, $events );
278
+ }
279
+
280
+ return array_merge( $events, $feed );
281
+ }
282
+
283
+ /**
284
+ * Get notification count.
285
+ *
286
+ * @since 2.6/5.9
287
+ *
288
+ * @return int
289
+ */
290
+ public function get_count() {
291
+ return count( $this->get() );
292
+ }
293
+
294
+ /**
295
+ * Add a manual notification event.
296
+ *
297
+ * @since 2.6/5.9
298
+ *
299
+ * @param array $notification Notification data.
300
+ */
301
+ public function add( $notification ) {
302
+ if ( empty( $notification['id'] ) ) {
303
+ return;
304
+ }
305
+
306
+ $option = $this->get_option();
307
+
308
+ if ( in_array( $notification['id'], $option['dismissed'] ) ) { // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
309
+ return;
310
+ }
311
+
312
+ foreach ( $option['events'] as $item ) {
313
+ if ( $item['id'] === $notification['id'] ) {
314
+ return;
315
+ }
316
+ }
317
+
318
+ $notification = $this->verify( array( $notification ) );
319
+
320
+ update_option(
321
+ 'sbi_notifications',
322
+ array(
323
+ 'update' => $option['update'],
324
+ 'feed' => $option['feed'],
325
+ 'events' => array_merge( $notification, $option['events'] ),
326
+ 'dismissed' => $option['dismissed'],
327
+ )
328
+ );
329
+ }
330
+
331
+ /**
332
+ * Update notification data from feed.
333
+ *
334
+ * @since 2.6/5.9
335
+ */
336
+ public function update() {
337
+ $feed = $this->fetch_feed();
338
+ $option = $this->get_option();
339
+
340
+ update_option(
341
+ 'sbi_notifications',
342
+ array(
343
+ 'update' => sbi_get_current_time(),
344
+ 'feed' => $feed,
345
+ 'events' => $option['events'],
346
+ 'dismissed' => $option['dismissed'],
347
+ )
348
+ );
349
+ }
350
+
351
+ /**
352
+ * Admin area Form Overview enqueues.
353
+ *
354
+ * @since 2.6/5.9
355
+ */
356
+ public function enqueues() {
357
+ if ( ! $this->has_access() ) {
358
+ return;
359
+ }
360
+
361
+ $notifications = $this->get();
362
+
363
+ if ( empty( $notifications ) ) {
364
+ return;
365
+ }
366
+
367
+ $min = '';
368
+
369
+ wp_enqueue_style(
370
+ 'sbi-admin-notifications',
371
+ SBI_PLUGIN_URL . "css/admin-notifications{$min}.css",
372
+ array(),
373
+ SBIVER
374
+ );
375
+
376
+ wp_enqueue_script(
377
+ 'sbi-admin-notifications',
378
+ SBI_PLUGIN_URL . "js/admin-notifications{$min}.js",
379
+ array( 'jquery' ),
380
+ SBIVER,
381
+ true
382
+ );
383
+ }
384
+
385
+ /**
386
+ * Fields from the remote source contain placeholders to allow
387
+ * some messages to be used for multiple plugins.
388
+ *
389
+ * @param $content string
390
+ * @param $notification array
391
+ *
392
+ * @return string
393
+ *
394
+ * @since 2.6/5.9
395
+ */
396
+ public function replace_merge_fields( $content, $notification ) {
397
+ $merge_fields = array(
398
+ '{plugin}' => 'Instagram Feed',
399
+ '{amount}' => isset( $notification['amount'] ) ? $notification['amount'] : '',
400
+ '{platform}' => 'Instagram',
401
+ '{lowerplatform}' => 'instagram',
402
+ '{review-url}' => 'https://wordpress.org/support/plugin/instagram-feed/reviews/',
403
+ '{slug}' => 'instagram-feed',
404
+ '{campaign}' => 'instagram-free',
405
+ );
406
+
407
+ if ( sbi_is_pro_version() ) {
408
+ $merge_fields['{campaign}'] = 'instagram-pro';
409
+ $merge_fields['{plugin}'] = 'Instagram Feed Pro';
410
+ }
411
+
412
+ foreach ( $merge_fields as $find => $replace ) {
413
+ $content = str_replace( $find, $replace, $content );
414
+ }
415
+
416
+ return $content;
417
+ }
418
+
419
+ /**
420
+ * Output notifications on Instagram Feed admin area.
421
+ *
422
+ * @since 2.6/5.9
423
+ */
424
+ public function output() {
425
+ $notifications = $this->get();
426
+
427
+ if ( empty( $notifications ) ) {
428
+ return;
429
+ }
430
+
431
+ $notifications_html = '';
432
+ $current_class = ' current';
433
+ $content_allowed_tags = array(
434
+ 'em' => array(),
435
+ 'strong' => array(),
436
+ 'span' => array(
437
+ 'style' => array(),
438
+ ),
439
+ 'a' => array(
440
+ 'href' => array(),
441
+ 'target' => array(),
442
+ 'rel' => array(),
443
+ ),
444
+ );
445
+
446
+ foreach ( $notifications as $notification ) {
447
+ // Buttons HTML.
448
+ $buttons_html = '';
449
+ if ( ! empty( $notification['btns'] ) && is_array( $notification['btns'] ) ) {
450
+ foreach ( $notification['btns'] as $btn_type => $btn ) {
451
+ if ( is_array( $btn['url'] ) ) {
452
+ $btn['url'] = wp_nonce_url( add_query_arg( $btn['url'] ), 'sbi-' . sanitize_key( $notification['id'] ), 'sbi_nonce' );
453
+ }
454
+ if ( ! empty( $btn['attr'] ) ) {
455
+ $btn['target'] = '_blank';
456
+ }
457
+ $buttons_html .= sprintf(
458
+ '<a href="%1$s" class="button button-%2$s"%3$s>%4$s</a>',
459
+ ! empty( $btn['url'] ) ? esc_url( $this->replace_merge_fields( $btn['url'], $notification ) ) : '',
460
+ $btn_type === 'primary' ? 'primary' : 'secondary',
461
+ ! empty( $btn['target'] ) && $btn['target'] === '_blank' ? ' target="_blank" rel="noopener noreferrer"' : '',
462
+ ! empty( $btn['text'] ) ? sanitize_text_field( $btn['text'] ) : ''
463
+ );
464
+ }
465
+ $buttons_html = ! empty( $buttons_html ) ? '<div class="buttons">' . $buttons_html . '</div>' : '';
466
+ }
467
+
468
+ if ( empty( $notification['image'] ) ) {
469
+ $image_html = '<div class="bell">';
470
+
471
+ $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>';
472
+ $image_html .= '</div>';
473
+ } else {
474
+ if ( 'balloon' === $notification['image'] || 'review' === $notification['id'] || 'discount' === $notification['id'] ) {
475
+ $image_html = '<div class="bell">';
476
+
477
+ $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">';
478
+ $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"/>';
479
+ $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"/>';
480
+ $image_html .= '</svg>';
481
+ } else {
482
+ $image_html = '<div class="thumb">';
483
+ $img_src = SBY_PLUGIN_URL . 'img/' . sanitize_text_field( $notification['image'] );
484
+ $image_html .= '<img src="' . esc_url( $img_src ) . '" alt="notice">';
485
+
486
+ if ( isset( $notification['image_overlay'] ) ) {
487
+ $image_html .= '<div class="img-overlay">' . esc_html( str_replace( '%', '%%', $notification['image_overlay'] ) ) . '</div>';
488
+ }
489
+ }
490
+ $image_html .= '</div>';
491
+
492
+ }
493
+
494
+ // Notification HTML.
495
+ $notifications_html .= sprintf(
496
+ '<div class="message%5$s" data-message-id="%4$s">' . $image_html . '
497
+ <h3 class="title">%1$s</h3>
498
+ <p class="content">%2$s</p>
499
+ %3$s
500
+ </div>',
501
+ ! empty( $notification['title'] ) ? $this->replace_merge_fields( sanitize_text_field( $notification['title'] ), $notification ) : '',
502
+ ! empty( $notification['content'] ) ? wp_kses( $this->replace_merge_fields( $notification['content'], $notification ), $content_allowed_tags ) : '',
503
+ $buttons_html,
504
+ ! empty( $notification['id'] ) ? esc_attr( sanitize_text_field( $notification['id'] ) ) : 0,
505
+ $current_class
506
+ );
507
+
508
+ // Only first notification is current.
509
+ $current_class = '';
510
+ }
511
+ ?>
512
+
513
+ <div id="sbi-notifications">
514
+ <a class="dismiss" title="<?php echo esc_attr__( 'Dismiss this message', 'instagram-feed' ); ?>"><i class="fa fa-times-circle" aria-hidden="true"></i></a>
515
+
516
+ <div class="navigation">
517
+ <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>
518
+ <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>
519
+ </div>
520
+
521
+ <div class="messages">
522
+ <?php echo $notifications_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
523
+ </div>
524
+ </div>
525
+ <?php
526
+ }
527
+
528
+ /**
529
+ * Dismiss notification via AJAX. If it's a new user message, also dismiss it
530
+ * on all admin pages.
531
+ *
532
+ * @since 2.6/5.9
533
+ */
534
+ public function dismiss() {
535
+ // Run a security check.
536
+ check_ajax_referer( 'sbi-admin', 'nonce' );
537
+
538
+ // Check for access and required param.
539
+ if ( ! $this->has_access() || empty( $_POST['id'] ) ) {
540
+ wp_send_json_error();
541
+ }
542
+
543
+ $id = sanitize_text_field( wp_unslash( $_POST['id'] ) );
544
+
545
+ if ( $id === 'review' ) {
546
+ $sbi_statuses_option = get_option( 'sbi_statuses', array() );
547
+
548
+ update_option( 'sbi_rating_notice', 'dismissed', false );
549
+ $sbi_statuses_option['rating_notice_dismissed'] = sbi_get_current_time();
550
+ update_option( 'sbi_statuses', $sbi_statuses_option, false );
551
+ } elseif ( $id === 'discount' ) {
552
+ update_user_meta( get_current_user_id(), 'sbi_ignore_new_user_sale_notice', 'always' );
553
+
554
+ $current_month_number = (int) date( 'n', sbi_get_current_time() );
555
+ $not_early_in_the_year = ( $current_month_number > 5 );
556
+
557
+ if ( $not_early_in_the_year ) {
558
+ update_user_meta( get_current_user_id(), 'sbi_ignore_bfcm_sale_notice', date( 'Y', sbi_get_current_time() ) );
559
+ }
560
+ }
561
+
562
+ $option = $this->get_option();
563
+ $type = is_numeric( $id ) ? 'feed' : 'events';
564
+
565
+ $option['dismissed'][] = $id;
566
+ $option['dismissed'] = array_unique( $option['dismissed'] );
567
+
568
+ // Remove notification.
569
+ if ( is_array( $option[ $type ] ) && ! empty( $option[ $type ] ) ) {
570
+ foreach ( $option[ $type ] as $key => $notification ) {
571
+ if ( $notification['id'] == $id ) { // phpcs:ignore WordPress.PHP.StrictComparisons
572
+ unset( $option[ $type ][ $key ] );
573
+ break;
574
+ }
575
+ }
576
+ }
577
+
578
+ update_option( 'sbi_notifications', $option );
579
+
580
+ wp_send_json_success();
581
+ }
582
+ }
inc/admin/class-sbi-sitehealth.php CHANGED
@@ -1,80 +1,80 @@
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
- if ( $sb_instagram_posts_manager->are_critical_errors() ) {
72
- $link = admin_url( '?page=sb-instagram-feed' );
73
- $result['status'] = 'critical';
74
- $result['label'] = __( 'Your Instagram Feed is experiencing an error.', 'instagram-feed' );
75
- $result['description'] = sprintf( __( 'A critical issue has been detected with your Instagram Feed. Visit the %1$sInstagram Feed settings page%2$s to fix the issue.', 'instagram-feed' ), '<a href="' . esc_url( $link ) . '">', '</a>' );
76
- }
77
-
78
- return $result;
79
- }
80
- }
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
+ if ( $sb_instagram_posts_manager->are_critical_errors() ) {
72
+ $link = admin_url( '?page=sb-instagram-feed' );
73
+ $result['status'] = 'critical';
74
+ $result['label'] = __( 'Your Instagram Feed is experiencing an error.', 'instagram-feed' );
75
+ $result['description'] = sprintf( __( 'A critical issue has been detected with your Instagram Feed. Visit the %1$sInstagram Feed settings page%2$s to fix the issue.', 'instagram-feed' ), '<a href="' . esc_url( $link ) . '">', '</a>' );
76
+ }
77
+
78
+ return $result;
79
+ }
80
+ }
inc/admin/class-sbi-tracking.php CHANGED
@@ -1,345 +1,345 @@
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'] ) ? sanitize_text_field( wp_unslash( $_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['pro'] = (int) sbi_is_pro_version();
155
- $data['sites'] = $count_b;
156
- $data['usagetracking'] = get_option( 'sbi_usage_tracking_config', false );
157
- $num_users = function_exists( 'count_users' ) ? count_users() : 'Not Set';
158
- $data['usercount'] = is_array( $num_users ) ? $num_users['total_users'] : 1;
159
- $data['timezoneoffset'] = date( 'P' );
160
-
161
- $settings_to_send = array();
162
- $raw_settings = get_option( 'sb_instagram_settings', array() );
163
-
164
- foreach ( $raw_settings as $key => $value ) {
165
- $value = $this->normalize_and_format( $key, $value );
166
-
167
- if ( $value !== false ) {
168
- $key = str_replace( array( 'sb_instagram_', 'sbi_' ), '', $key );
169
- $settings_to_send[ $key ] = $value;
170
- }
171
- }
172
- $con_bus_accounts = 0;
173
- $recently_searched_hashtags = 0;
174
- $access_tokens_tried = array();
175
- if ( isset( $raw_settings['connected_accounts'] ) ) {
176
- foreach ( $raw_settings['connected_accounts'] as $connected_account ) {
177
- if ( isset( $connected_account['type'] ) && $connected_account['type'] === 'business' ) {
178
- $con_bus_accounts++;
179
-
180
- if ( ! in_array( $connected_account['access_token'], $access_tokens_tried, true ) && class_exists( 'SB_Instagram_API_Connect_Pro' ) ) {
181
- $access_tokens_tried[] = $connected_account['access_token'];
182
- $connection = new SB_Instagram_API_Connect_Pro( $connected_account, 'recently_searched_hashtags', array( 'hashtag' => '' ) );
183
- $connection->connect();
184
-
185
- $recently_searched_data = ! $connection->is_wp_error() ? $connection->get_data() : false;
186
- $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;
187
- $recently_searched_hashtags = $recently_searched_hashtags + $num_hashatags_searched;
188
- }
189
- }
190
- }
191
- }
192
- $settings_to_send['business_accounts'] = $con_bus_accounts;
193
- $settings_to_send['recently_searched_hashtags'] = $recently_searched_hashtags;
194
-
195
- $feed_caches = SB_Instagram_Cron_Updater::get_feed_cache_option_names();
196
- $settings_to_send['num_found_feed_caches'] = count( $feed_caches );
197
-
198
- if ( isset( $settings_to_send['caching_type'] ) && $settings_to_send['caching_type'] !== 'background' ) {
199
- $settings_to_send['recently_requested_caches'] = $settings_to_send['num_found_feed_caches'];
200
- } else {
201
- $settings_to_send['recently_requested_caches'] = 0;
202
- foreach ( $feed_caches as $feed_cache ) {
203
- $feed_id = str_replace( '_transient_', '', $feed_cache['option_name'] );
204
-
205
- $transient = get_transient( $feed_id );
206
-
207
- if ( $transient ) {
208
- $feed_data = json_decode( $transient, true );
209
- $last_requested = isset( $feed_data['last_requested'] ) ? (int) $feed_data['last_requested'] : false;
210
-
211
- if ( ! $last_requested || $last_requested > time() - 5 * 3600 * 24 ) {
212
- $settings_to_send['recently_requested_caches']++;
213
- }
214
- }
215
- }
216
- }
217
-
218
- $settings_to_send['custom_header_template'] = '' !== locate_template( 'sbi/header.php', false, false ) ? 1 : 0;
219
- $settings_to_send['custom_header_boxed_template'] = '' !== locate_template( 'sbi/header-boxed.php', false, false ) ? 1 : 0;
220
- $settings_to_send['custom_header_generic_template'] = '' !== locate_template( 'sbi/header-generic.php', false, false ) ? 1 : 0;
221
- $settings_to_send['custom_item_template'] = '' !== locate_template( 'sbi/item.php', false, false ) ? 1 : 0;
222
- $settings_to_send['custom_footer_template'] = '' !== locate_template( 'sbi/footer.php', false, false ) ? 1 : 0;
223
- $settings_to_send['custom_feed_template'] = '' !== locate_template( 'sbi/feed.php', false, false ) ? 1 : 0;
224
-
225
- $sbi_current_white_names = get_option( 'sb_instagram_white_list_names', array() );
226
- if ( empty( $sbi_current_white_names ) ) {
227
- $settings_to_send['num_white_lists'] = 0;
228
- } else {
229
- $settings_to_send['num_white_lists'] = count( $sbi_current_white_names );
230
- }
231
-
232
- $data['settings'] = $settings_to_send;
233
-
234
- // Retrieve current plugin information
235
- if ( ! function_exists( 'get_plugins' ) ) {
236
- include ABSPATH . '/wp-admin/includes/plugin.php';
237
- }
238
-
239
- $plugins = get_plugins();
240
- $active_plugins = get_option( 'active_plugins', array() );
241
- $plugins_to_send = array();
242
-
243
- foreach ( $plugins as $plugin_path => $plugin ) {
244
- // If the plugin isn't active, don't show it.
245
- if ( ! in_array( $plugin_path, $active_plugins, true ) ) {
246
- continue;
247
- }
248
-
249
- $plugins_to_send[] = $plugin['Name'];
250
- }
251
-
252
- $data['active_plugins'] = $plugins_to_send;
253
- $data['locale'] = get_locale();
254
-
255
- return $data;
256
- }
257
-
258
- public function send_checkin( $override = false, $ignore_last_checkin = false ) {
259
-
260
- $home_url = trailingslashit( home_url() );
261
- if ( strpos( $home_url, 'smashballoon.com' ) !== false ) {
262
- return false;
263
- }
264
-
265
- if ( ! $this->tracking_allowed() && ! $override ) {
266
- return false;
267
- }
268
-
269
- // Send a maximum of once per week
270
- $usage_tracking = get_option(
271
- 'sbi_usage_tracking',
272
- array(
273
- 'last_send' => 0,
274
- 'enabled' => sbi_is_pro_version(),
275
- )
276
- );
277
- if ( is_numeric( $usage_tracking['last_send'] ) && $usage_tracking['last_send'] > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
278
- return false;
279
- }
280
-
281
- $request = wp_remote_post(
282
- 'https://usage.smashballoon.com/v1/checkin/',
283
- array(
284
- 'method' => 'POST',
285
- 'timeout' => 5,
286
- 'redirection' => 5,
287
- 'httpversion' => '1.1',
288
- 'blocking' => false,
289
- 'body' => $this->get_data(),
290
- 'user-agent' => 'MI/' . SBIVER . '; ' . get_bloginfo( 'url' ),
291
- )
292
- );
293
-
294
- // If we have completed successfully, recheck in 1 week
295
- $usage_tracking['last_send'] = time();
296
- update_option( 'sbi_usage_tracking', $usage_tracking, false );
297
- return true;
298
- }
299
-
300
- private function tracking_allowed() {
301
- $usage_tracking = sbi_get_option(
302
- 'sbi_usage_tracking',
303
- array(
304
- 'last_send' => 0,
305
- 'enabled' => sbi_is_pro_version(),
306
- )
307
- );
308
- $tracking_allowed = isset( $usage_tracking['enabled'] ) ? $usage_tracking['enabled'] : sbi_is_pro_version();
309
-
310
- return $tracking_allowed;
311
- }
312
-
313
- public function schedule_send() {
314
- if ( ! wp_next_scheduled( 'sbi_usage_tracking_cron' ) ) {
315
- $tracking = array();
316
- $tracking['day'] = rand( 0, 6 );
317
- $tracking['hour'] = rand( 0, 23 );
318
- $tracking['minute'] = rand( 0, 59 );
319
- $tracking['second'] = rand( 0, 59 );
320
- $tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) +
321
- ( $tracking['hour'] * HOUR_IN_SECONDS ) +
322
- ( $tracking['minute'] * MINUTE_IN_SECONDS ) +
323
- $tracking['second'];
324
- $last_sunday = strtotime( 'next sunday' ) - ( 7 * DAY_IN_SECONDS );
325
- if ( ( $last_sunday + $tracking['offset'] ) > time() + 6 * HOUR_IN_SECONDS ) {
326
- $tracking['initsend'] = $last_sunday + $tracking['offset'];
327
- } else {
328
- $tracking['initsend'] = strtotime( 'next sunday' ) + $tracking['offset'];
329
- }
330
-
331
- wp_schedule_event( $tracking['initsend'], 'weekly', 'sbi_usage_tracking_cron' );
332
- update_option( 'sbi_usage_tracking_config', $tracking );
333
- }
334
- }
335
-
336
- public function add_schedules( $schedules = array() ) {
337
- // Adds once weekly to the existing schedules.
338
- $schedules['weekly'] = array(
339
- 'interval' => 604800,
340
- 'display' => __( 'Once Weekly', 'instagram-feed' ),
341
- );
342
- return $schedules;
343
- }
344
- }
345
- 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'] ) ? sanitize_text_field( wp_unslash( $_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['pro'] = (int) sbi_is_pro_version();
155
+ $data['sites'] = $count_b;
156
+ $data['usagetracking'] = get_option( 'sbi_usage_tracking_config', false );
157
+ $num_users = function_exists( 'count_users' ) ? count_users() : 'Not Set';
158
+ $data['usercount'] = is_array( $num_users ) ? $num_users['total_users'] : 1;
159
+ $data['timezoneoffset'] = date( 'P' );
160
+
161
+ $settings_to_send = array();
162
+ $raw_settings = get_option( 'sb_instagram_settings', array() );
163
+
164
+ foreach ( $raw_settings as $key => $value ) {
165
+ $value = $this->normalize_and_format( $key, $value );
166
+
167
+ if ( $value !== false ) {
168
+ $key = str_replace( array( 'sb_instagram_', 'sbi_' ), '', $key );
169
+ $settings_to_send[ $key ] = $value;
170
+ }
171
+ }
172
+ $con_bus_accounts = 0;
173
+ $recently_searched_hashtags = 0;
174
+ $access_tokens_tried = array();
175
+ if ( isset( $raw_settings['connected_accounts'] ) ) {
176
+ foreach ( $raw_settings['connected_accounts'] as $connected_account ) {
177
+ if ( isset( $connected_account['type'] ) && $connected_account['type'] === 'business' ) {
178
+ $con_bus_accounts++;
179
+
180
+ if ( ! in_array( $connected_account['access_token'], $access_tokens_tried, true ) && class_exists( 'SB_Instagram_API_Connect_Pro' ) ) {
181
+ $access_tokens_tried[] = $connected_account['access_token'];
182
+ $connection = new SB_Instagram_API_Connect_Pro( $connected_account, 'recently_searched_hashtags', array( 'hashtag' => '' ) );
183
+ $connection->connect();
184
+
185
+ $recently_searched_data = ! $connection->is_wp_error() ? $connection->get_data() : false;
186
+ $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;
187
+ $recently_searched_hashtags = $recently_searched_hashtags + $num_hashatags_searched;
188
+ }
189
+ }
190
+ }
191
+ }
192
+ $settings_to_send['business_accounts'] = $con_bus_accounts;
193
+ $settings_to_send['recently_searched_hashtags'] = $recently_searched_hashtags;
194
+
195
+ $feed_caches = SB_Instagram_Cron_Updater::get_feed_cache_option_names();
196
+ $settings_to_send['num_found_feed_caches'] = count( $feed_caches );
197
+
198
+ if ( isset( $settings_to_send['caching_type'] ) && $settings_to_send['caching_type'] !== 'background' ) {
199
+ $settings_to_send['recently_requested_caches'] = $settings_to_send['num_found_feed_caches'];
200
+ } else {
201
+ $settings_to_send['recently_requested_caches'] = 0;
202
+ foreach ( $feed_caches as $feed_cache ) {
203
+ $feed_id = str_replace( '_transient_', '', $feed_cache['option_name'] );
204
+
205
+ $transient = get_transient( $feed_id );
206
+
207
+ if ( $transient ) {
208
+ $feed_data = json_decode( $transient, true );
209
+ $last_requested = isset( $feed_data['last_requested'] ) ? (int) $feed_data['last_requested'] : false;
210
+
211
+ if ( ! $last_requested || $last_requested > time() - 5 * 3600 * 24 ) {
212
+ $settings_to_send['recently_requested_caches']++;
213
+ }
214
+ }
215
+ }
216
+ }
217
+
218
+ $settings_to_send['custom_header_template'] = '' !== locate_template( 'sbi/header.php', false, false ) ? 1 : 0;
219
+ $settings_to_send['custom_header_boxed_template'] = '' !== locate_template( 'sbi/header-boxed.php', false, false ) ? 1 : 0;
220
+ $settings_to_send['custom_header_generic_template'] = '' !== locate_template( 'sbi/header-generic.php', false, false ) ? 1 : 0;
221
+ $settings_to_send['custom_item_template'] = '' !== locate_template( 'sbi/item.php', false, false ) ? 1 : 0;
222
+ $settings_to_send['custom_footer_template'] = '' !== locate_template( 'sbi/footer.php', false, false ) ? 1 : 0;
223
+ $settings_to_send['custom_feed_template'] = '' !== locate_template( 'sbi/feed.php', false, false ) ? 1 : 0;
224
+
225
+ $sbi_current_white_names = get_option( 'sb_instagram_white_list_names', array() );
226
+ if ( empty( $sbi_current_white_names ) ) {
227
+ $settings_to_send['num_white_lists'] = 0;
228
+ } else {
229
+ $settings_to_send['num_white_lists'] = count( $sbi_current_white_names );
230
+ }
231
+
232
+ $data['settings'] = $settings_to_send;
233
+
234
+ // Retrieve current plugin information
235
+ if ( ! function_exists( 'get_plugins' ) ) {
236
+ include ABSPATH . '/wp-admin/includes/plugin.php';
237
+ }
238
+
239
+ $plugins = get_plugins();
240
+ $active_plugins = get_option( 'active_plugins', array() );
241
+ $plugins_to_send = array();
242
+
243
+ foreach ( $plugins as $plugin_path => $plugin ) {
244
+ // If the plugin isn't active, don't show it.
245
+ if ( ! in_array( $plugin_path, $active_plugins, true ) ) {
246
+ continue;
247
+ }
248
+
249
+ $plugins_to_send[] = $plugin['Name'];
250
+ }
251
+
252
+ $data['active_plugins'] = $plugins_to_send;
253
+ $data['locale'] = get_locale();
254
+
255
+ return $data;
256
+ }
257
+
258
+ public function send_checkin( $override = false, $ignore_last_checkin = false ) {
259
+
260
+ $home_url = trailingslashit( home_url() );
261
+ if ( strpos( $home_url, 'smashballoon.com' ) !== false ) {
262
+ return false;
263
+ }
264
+
265
+ if ( ! $this->tracking_allowed() && ! $override ) {
266
+ return false;
267
+ }
268
+
269
+ // Send a maximum of once per week
270
+ $usage_tracking = get_option(
271
+ 'sbi_usage_tracking',
272
+ array(
273
+ 'last_send' => 0,
274
+ 'enabled' => sbi_is_pro_version(),
275
+ )
276
+ );
277
+ if ( is_numeric( $usage_tracking['last_send'] ) && $usage_tracking['last_send'] > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
278
+ return false;
279
+ }
280
+
281
+ $request = wp_remote_post(
282
+ 'https://usage.smashballoon.com/v1/checkin/',
283
+ array(
284
+ 'method' => 'POST',
285
+ 'timeout' => 5,
286
+ 'redirection' => 5,
287
+ 'httpversion' => '1.1',
288
+ 'blocking' => false,
289
+ 'body' => $this->get_data(),
290
+ 'user-agent' => 'MI/' . SBIVER . '; ' . get_bloginfo( 'url' ),
291
+ )
292
+ );
293
+
294
+ // If we have completed successfully, recheck in 1 week
295
+ $usage_tracking['last_send'] = time();
296
+ update_option( 'sbi_usage_tracking', $usage_tracking, false );
297
+ return true;
298
+ }
299
+
300
+ private function tracking_allowed() {
301
+ $usage_tracking = sbi_get_option(
302
+ 'sbi_usage_tracking',
303
+ array(
304
+ 'last_send' => 0,
305
+ 'enabled' => sbi_is_pro_version(),
306
+ )
307
+ );
308
+ $tracking_allowed = isset( $usage_tracking['enabled'] ) ? $usage_tracking['enabled'] : sbi_is_pro_version();
309
+
310
+ return $tracking_allowed;
311
+ }
312
+
313
+ public function schedule_send() {
314
+ if ( ! wp_next_scheduled( 'sbi_usage_tracking_cron' ) ) {
315
+ $tracking = array();
316
+ $tracking['day'] = rand( 0, 6 );
317
+ $tracking['hour'] = rand( 0, 23 );
318
+ $tracking['minute'] = rand( 0, 59 );
319
+ $tracking['second'] = rand( 0, 59 );
320
+ $tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) +
321
+ ( $tracking['hour'] * HOUR_IN_SECONDS ) +
322
+ ( $tracking['minute'] * MINUTE_IN_SECONDS ) +
323
+ $tracking['second'];
324
+ $last_sunday = strtotime( 'next sunday' ) - ( 7 * DAY_IN_SECONDS );
325
+ if ( ( $last_sunday + $tracking['offset'] ) > time() + 6 * HOUR_IN_SECONDS ) {
326
+ $tracking['initsend'] = $last_sunday + $tracking['offset'];
327
+ } else {
328
+ $tracking['initsend'] = strtotime( 'next sunday' ) + $tracking['offset'];
329
+ }
330
+
331
+ wp_schedule_event( $tracking['initsend'], 'weekly', 'sbi_usage_tracking_cron' );
332
+ update_option( 'sbi_usage_tracking_config', $tracking );
333
+ }
334
+ }
335
+
336
+ public function add_schedules( $schedules = array() ) {
337
+ // Adds once weekly to the existing schedules.
338
+ $schedules['weekly'] = array(
339
+ 'interval' => 604800,
340
+ 'display' => __( 'Once Weekly', 'instagram-feed' ),
341
+ );
342
+ return $schedules;
343
+ }
344
+ }
345
+ new SB_Instagram_Tracking();
inc/admin/main.php CHANGED
@@ -1,4091 +1,4091 @@
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' ) ) {
8
- die( '-1' );
9
- }
10
-
11
- function sb_instagram_menu() {
12
- $cap = current_user_can( 'manage_instagram_feed_options' ) ? 'manage_instagram_feed_options' : 'manage_options';
13
-
14
- $cap = apply_filters( 'sbi_settings_pages_capability', $cap );
15
-
16
- global $sb_instagram_posts_manager;
17
- $notice = '';
18
- if ( $sb_instagram_posts_manager->are_critical_errors() ) {
19
- $notice = ' <span class="update-plugins sbi-error-alert"><span>!</span></span>';
20
- }
21
-
22
- $sbi_notifications = new SBI_Notifications();
23
- $notifications = $sbi_notifications->get();
24
-
25
- $notice_bubble = '';
26
- if ( empty( $notice ) && ! empty( $notifications ) && is_array( $notifications ) ) {
27
- $notice_bubble = ' <span class="sbi-notice-alert"><span>' . count( $notifications ) . '</span></span>';
28
- }
29
-
30
- add_menu_page(
31
- __( 'Instagram Feed', 'instagram-feed' ),
32
- __( 'Instagram Feed', 'instagram-feed' ) . $notice . $notice_bubble,
33
- $cap,
34
- 'sb-instagram-feed',
35
- 'sb_instagram_settings_page'
36
- );
37
- add_submenu_page(
38
- 'sb-instagram-feed',
39
- __( 'Settings', 'instagram-feed' ),
40
- __( 'Settings', 'instagram-feed' ) . $notice,
41
- $cap,
42
- 'sb-instagram-feed',
43
- 'sb_instagram_settings_page'
44
- );
45
- add_submenu_page(
46
- 'sb-instagram-feed',
47
- __( 'About Us', 'instagram-feed' ),
48
- __( 'About Us', 'instagram-feed' ),
49
- $cap,
50
- 'sb-instagram-feed-about',
51
- 'sb_instagram_about_page'
52
- );
53
-
54
- add_submenu_page(
55
- 'sb-instagram-feed',
56
- __( 'oEmbeds', 'instagram-feed' ),
57
- '<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' ),
58
- $cap,
59
- 'sbi-oembeds',
60
- 'sbi_oembeds_page'
61
- );
62
-
63
- //Show a Instagram plugin menu item if it isn't already installed
64
- if ( ! is_plugin_active( 'custom-facebook-feed/custom-facebook-feed.php' ) && ! is_plugin_active( 'custom-facebook-feed-pro/custom-facebook-feed.php' ) ) {
65
- add_submenu_page(
66
- 'sb-instagram-feed',
67
- __( 'Facebook Feed', 'instagram-feed' ),
68
- '<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>',
69
- $cap,
70
- 'admin.php?page=sb-instagram-feed&tab=more',
71
- ''
72
- );
73
- }
74
-
75
- //Show a Twitter plugin menu item if it isn't already installed
76
- if ( ! is_plugin_active( 'custom-twitter-feeds/custom-twitter-feed.php' ) && ! is_plugin_active( 'custom-twitter-feeds-pro/custom-twitter-feed.php' ) ) {
77
- add_submenu_page(
78
- 'sb-instagram-feed',
79
- __( 'Twitter Feed', 'instagram-feed' ),
80
- '<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>',
81
- $cap,
82
- 'admin.php?page=sb-instagram-feed&tab=more',
83
- ''
84
- );
85
- }
86
-
87
- //Show a YouTube plugin menu item if it isn't already installed
88
- if ( ! is_plugin_active( 'feeds-for-youtube/youtube-feed.php' ) && ! is_plugin_active( 'youtube-feed-pro/youtube-feed.php' ) ) {
89
- add_submenu_page(
90
- 'sb-instagram-feed',
91
- __( 'YouTube Feed', 'instagram-feed' ),
92
- '<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>',
93
- $cap,
94
- 'admin.php?page=sb-instagram-feed&tab=more',
95
- ''
96
- );
97
- }
98
-
99
- add_submenu_page(
100
- 'sb-instagram-feed',
101
- __( 'Social Wall', 'instagram-feed' ),
102
- '<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>',
103
- $cap,
104
- 'sbi-sw',
105
- 'sbi_social_wall_page'
106
- );
107
-
108
- add_submenu_page(
109
- 'sb-instagram-feed',
110
- __( 'Try the Pro Demo', 'instagram-feed' ),
111
- '<span class="sbi_get_pro">' . __( 'Try the Pro Demo', 'instagram-feed' ) . '</span>',
112
- $cap,
113
- 'https://smashballoon.com/instagram-feed/demo/?utm_campaign=instagram-free&utm_source=menu-link&utm_medium=upgrade-link',
114
- ''
115
- );
116
- }
117
- add_action( 'admin_menu', 'sb_instagram_menu' );
118
-
119
- function sb_instagram_about_page() {
120
- do_action( 'sbi_admin_page' );
121
- }
122
-
123
- function sbi_oembeds_page() {
124
- ?>
125
-
126
- <div id="sbi_admin" class="wrap sbi-oembeds">
127
- <?php
128
- $lite_notice_dismissed = get_transient( 'instagram_feed_dismiss_lite' );
129
-
130
- if ( ! $lite_notice_dismissed ) :
131
- ?>
132
- <div id="sbi-notice-bar" style="display:none">
133
- <span class="sbi-notice-bar-message"><?php echo wp_kses_post( __( '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>
134
- <button type="button" class="dismiss" title="<?php esc_html_e( 'Dismiss this message.', 'instagram-feed' ); ?>" data-page="overview">
135
- </button>
136
- </div>
137
- <?php endif; ?>
138
- <div id="header">
139
- <h1><?php esc_html_e( 'Instagram oEmbeds', 'instagram-feed' ); ?></h1>
140
- </div>
141
-
142
- <p>
143
- <?php
144
- esc_html_e( 'You can use the Instagram Feed plugin to power your Instagram oEmbeds, both old and new.', 'instagram-feed' );
145
- if ( ! SB_Instagram_Oembed::can_do_oembed() ) {
146
- echo ' ';
147
- esc_html_e( "Just click the button below and we'll do the rest.", 'instagram-feed' );
148
- }
149
- ?>
150
- </p>
151
-
152
- <div class="sbi-oembed-button">
153
-
154
- <?php
155
- $admin_url_state = admin_url( 'admin.php?page=sbi-oembeds' );
156
- $encryption = new SB_Instagram_Data_Encryption();
157
-
158
- $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
159
- $saved_access_token_data = isset( $oembed_token_settings['access_token'] ) ? $oembed_token_settings['access_token'] : false;
160
- if ( $saved_access_token_data && ! $encryption->decrypt( $saved_access_token_data ) ) {
161
- $saved_access_token_data = $encryption->encrypt( $saved_access_token_data );
162
- }
163
-
164
- $access_token_error = false;
165
- $valid_new_access_token = false;
166
- $error_message = '';
167
- $show_token_expiration_modal = false;
168
-
169
- $nonce_verified = isset( $_GET['sbi_con'] ) && wp_verify_nonce( $_GET['sbi_con'], 'sbi-oembed' );
170
- if ( $nonce_verified && ! empty( $_GET['sbi_access_token'] ) && strlen( $_GET['sbi_access_token'] ) <= 20 ) {
171
- $access_token_error = true;
172
- $error_message = __( 'There was a problem with the access token that was retrieved.', 'instagram-feed' );
173
-
174
- } elseif ( $nonce_verified && ! empty( $_GET['transfer'] ) ) {
175
- if ( class_exists( 'CFF_Oembed' ) ) {
176
- $cff_oembed_token = CFF_Oembed::last_access_token();
177
- $valid_new_access_token = $cff_oembed_token;
178
- }
179
- } else {
180
-
181
- $valid_new_access_token = ! empty( $_GET['sbi_access_token'] ) && strlen( $_GET['sbi_access_token'] ) > 20 && $saved_access_token_data !== $_GET['sbi_access_token'] ? sbi_sanitize_alphanumeric_and_equals( $_GET['sbi_access_token'] ) : false;
182
- if ( $valid_new_access_token ) {
183
- $args = array(
184
- 'timeout' => 20,
185
- );
186
- if ( version_compare( get_bloginfo( 'version' ), '3.7', '<' ) ) {
187
- $args['sslverify'] = false;
188
- }
189
- $pages_data_connection = wp_remote_get( esc_url_raw( 'https://graph.facebook.com/me/accounts?limit=500&access_token=' . $valid_new_access_token ), $args );
190
-
191
- if ( ! is_wp_error( $pages_data_connection ) && isset( $pages_data_connection['body'] ) ) {
192
- $pages_data = json_decode( $pages_data_connection['body'], true );
193
- if ( isset( $pages_data['data'][0]['access_token'] ) ) {
194
- $oembed_token_settings['expiration_date'] = 'never';
195
- } else {
196
- $oembed_token_settings['expiration_date'] = time() + ( 60 * DAY_IN_SECONDS );
197
- $show_token_expiration_modal = true;
198
- }
199
- } else {
200
- $oembed_token_settings['expiration_date'] = 'unknown';
201
- }
202
- }
203
- }
204
-
205
- $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;
206
- $need_to_connect_class = ' sbi-need-to-connect';
207
- if ( class_exists( 'CFF_Oembed' ) ) {
208
- $cff_oembed_token = CFF_Oembed::last_access_token();
209
-
210
- if ( ! empty( $cff_oembed_token ) ) {
211
- $need_to_connect_class = '';
212
- $token_href = add_query_arg( 'transfer', '1', $admin_url_state );
213
- }
214
- }
215
- $token_href = str_replace( esc_html( '&sbi_con' ), ',sbi_con', wp_nonce_url( $token_href, 'sbi-oembed', 'sbi_con' ) );
216
-
217
- if ( ! $saved_access_token_data && ! $valid_new_access_token && ! SB_Instagram_Oembed::can_do_oembed() ) {
218
- if ( $access_token_error ) {
219
- ?>
220
- <p class="sbi-error"><?php echo wp_kses_post( $error_message ); ?></p>
221
- <?php
222
- }
223
- ?>
224
-
225
- <a href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn<?php echo esc_attr( $need_to_connect_class ); ?>"><i class="fa fa-instagram"></i> <?php esc_html_e( 'Enable Instagram oEmbeds', 'instagram-feed' ); ?></a>
226
- <div id="sbi_config_info" class="sb_get_token" style="display: none;">
227
- <div class="sbi_config_modal">
228
- <?php esc_html_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' ); ?>
229
-
230
- <p>
231
- <a style="display: inline-block; float: none; margin-bottom: 0;" href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn"><?php esc_html_e( 'Connect to Facebook', 'instagram-feed' ); ?></a>
232
- </p>
233
-
234
- <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
235
- </div>
236
- </div>
237
- <div class="sbi-oembed-promo sbi-oembed-desc">
238
- <div class="sbi-col">
239
- <h2><?php esc_html_e( 'What are oEmbeds?', 'instagram-feed' ); ?></h2>
240
- <p><?php echo wp_kses_post( __( "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>
241
- </div>
242
-
243
- <img src="<?php echo esc_url( SBI_PLUGIN_URL . 'img/sbi-oembed.png' ); ?>" style="padding: 0; background: white;" alt="<?php esc_attr_e( 'Oembed example', 'instagram-feed' ); ?>">
244
- </div>
245
- <?php
246
- } else {
247
- if ( $valid_new_access_token ) {
248
- if ( ! is_array( $oembed_token_settings ) ) {
249
- $oembed_token_settings = array(
250
- 'access_token' => '',
251
- 'disabled' => '',
252
- );
253
- }
254
- if ( $valid_new_access_token && ! $encryption->decrypt( $valid_new_access_token ) ) {
255
- $valid_new_access_token = $encryption->encrypt( $valid_new_access_token );
256
- }
257
- $oembed_token_settings['access_token'] = $valid_new_access_token;
258
- $oembed_token_settings['disabled'] = false;
259
- update_option( 'sbi_oembed_token', $oembed_token_settings );
260
- ?>
261
- <div><p class="sbi-success-message"><?php esc_html_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 esc_html_e( 'Disable', 'instagram-feed' ); ?></a></p></div>
262
- <?php if ( $show_token_expiration_modal ) : ?>
263
- <div id="sbi_config_info" class="sb_get_token">
264
- <div class="sbi_config_modal">
265
- <p><strong><?php esc_html_e( 'Heads up!', 'instagram-feed' ); ?></strong><br></p>
266
-
267
- <p>
268
- <?php esc_html_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' ); ?>
269
- </p>
270
- <p>
271
- <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 esc_html_e( 'How to Create a Facebook Page', 'instagram-feed' ); ?></a>
272
- &nbsp;&nbsp;<a href="<?php echo esc_url( $token_href ); ?>" class="button button-secondary" style="height: 47px;line-height: 47px;font-size: 14px;padding: 0 21px;"><?php esc_html_e( 'Try Again', 'instagram-feed' ); ?></a>
273
- </p>
274
-
275
- <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
276
- </div>
277
- </div>
278
- <?php endif; ?>
279
- <?php
280
- } else {
281
- if ( ! isset( $oembed_token_settings['expiration_date'] ) || (int) $oembed_token_settings['expiration_date'] === 0 || $oembed_token_settings['expiration_date'] > time() ) :
282
- ?>
283
- <div><p class="sbi-success-message"><?php esc_html_e( 'The Instagram Feed plugin is now powering your Instagram oEmbeds.', 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php esc_html_e( 'Disable', 'instagram-feed' ); ?></a></p></div>
284
- <?php
285
- endif;
286
- if ( ! empty( $oembed_token_settings['expiration_date'] )
287
- && $oembed_token_settings['expiration_date'] !== 'never' ) :
288
- $link_1 = '<a href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" target="_blank" rel="noopener">';
289
- $link_2 = '</a>';
290
- $class = 'sbi_warning';
291
- if ( $oembed_token_settings['expiration_date'] > time() ) {
292
- $days_to_expire = floor( ( $oembed_token_settings['expiration_date'] - time() ) / DAY_IN_SECONDS );
293
- $message = sprintf( __( '%1$1sImportant:%2$2s Your access token for powering oEmbeds will expire in %3$3s days.', 'instagram-feed' ), '<strong>', '</strong>', $days_to_expire );
294
- } else {
295
- $class = 'sb_instagram_notice';
296
- $message = __( 'Your access token for powering oEmbeds has expired.', 'instagram-feed' );
297
- }
298
- ?>
299
- <div class="<?php echo esc_attr( $class ); ?>" style="display:inline-block;width: auto;">
300
- <p>
301
- <?php echo wp_kses_post( $message ); ?>
302
- </p>
303
- <p>
304
- <?php echo wp_kses_post( sprintf( __( 'Instagram requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Visit %1$1sthis link%2$2s for instructions on extending your access token to never expire.', 'instagram-feed' ), $link_1, $link_2 ) ); ?>
305
- </p>
306
- <p>
307
- <a style="display: inline-block; float: none; margin-bottom: 0;" href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn"><?php esc_html_e( 'Connect to Facebook and Recheck Access Token', 'instagram-feed' ); ?></a>
308
- </p>
309
- </div>
310
-
311
- <?php endif; ?>
312
-
313
- <?php } ?>
314
- <div class="sbi-oembed-promo">
315
- <h2><?php esc_html_e( 'Did you know, you can also use this Instagram Feed plugin to easily add Instagram content on your website?', 'instagram-feed' ); ?></h2>
316
- <div class="sbi-reasons">
317
- <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 esc_html_e( 'Save time', 'instagram-feed' ); ?></span></div>
318
- <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 esc_html_e( 'Increase social engagement', 'instagram-feed' ); ?></span></div>
319
- <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 esc_html_e( 'Keep Your Site Looking Fresh.', 'instagram-feed' ); ?></span></div>
320
- </div>
321
- <p>
322
- <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><span><?php esc_html_e( 'Super simple to set up', 'instagram-feed' ); ?></span>
323
- <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><span><?php esc_html_e( 'Optimized for speed', 'instagram-feed' ); ?></span>
324
- <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><span><?php esc_html_e( 'Completely customizable', 'instagram-feed' ); ?></span>
325
- <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><span><?php esc_html_e( 'SEO friendly', 'instagram-feed' ); ?></span>
326
- </p>
327
- <a href="?page=sb-instagram-feed" class="button button-primary"><?php esc_html_e( 'Add an Instagram feed now', 'instagram-feed' ); ?></a>
328
- </div>
329
-
330
- <?php } ?>
331
-
332
- </div>
333
- </div>
334
- <?php
335
- }
336
-
337
- function sbi_social_wall_page() {
338
-
339
- ( is_plugin_active( 'social-wall/social-wall.php' ) ) ? $sbi_sw_active = true : $sbi_sw_active = false;
340
-
341
- ?>
342
-
343
- <div id="sbi_admin" class="wrap sw-landing-page">
344
-
345
- <div class="sbi-sw-icons">
346
-
347
- <span style="display: inline-block; padding: 0 0 12px 0; width: 360px; max-width: 100%;">
348
- <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">
349
- <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"/>
350
- <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"/>
351
- <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"/>
352
- <g>
353
- <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"/>
354
- <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"/>
355
- </g>
356
- </svg>
357
- </span>
358
- <br />
359
-
360
- <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>
361
-
362
- <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>
363
-
364
- <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>
365
-
366
- <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>
367
-
368
- <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>
369
-
370
- <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>
371
-
372
- <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>
373
- </div>
374
-
375
- <h1>Combine all your social media channels into one single wall.</h1>
376
- <h2>Maximize your social content and get more followers.</h2>
377
-
378
- <div style="text-align: center;">
379
- <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>
380
- </div>
381
-
382
- <div class="sbi-sw-info">
383
- <div class="sbi-sw-features">
384
- <p><span>A dash of Instagram</span>Add posts from your profile, public hashtag posts, or posts you're tagged in.</p>
385
- <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>
386
- <p><span>A spoonful of Twitter</span>Add Tweets from any Twitter account, hashtag Tweets, mentions, and more.</p>
387
- <p><span>And a dollop of YouTube</span>Embed videos from any public YouTube channel, playlists, searches, and more.</p>
388
- <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>
389
- </div>
390
- <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">
391
- <span class="cta">View Demo</span>
392
-
393
- <img src="<?php echo esc_url( 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.">
394
- </a>
395
- </div>
396
-
397
- <div class="sbi-sw-footer-cta">
398
- <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>
399
- </div>
400
-
401
- </div>
402
-
403
- <?php
404
- }
405
-
406
- function sb_instagram_settings_page() {
407
- //Declare defaults
408
- $sb_instagram_settings_defaults = array(
409
- 'sb_instagram_user_id' => '',
410
- 'sb_instagram_preserve_settings' => '',
411
- 'sb_instagram_cache_time' => 1,
412
- 'sb_instagram_cache_time_unit' => 'hours',
413
- 'sbi_caching_type' => 'page',
414
- 'sbi_cache_cron_interval' => '12hours',
415
- 'sbi_cache_cron_time' => '1',
416
- 'sbi_cache_cron_am_pm' => 'am',
417
- 'sb_instagram_width' => '100',
418
- 'sb_instagram_width_unit' => '%',
419
- 'sb_instagram_feed_width_resp' => false,
420
- 'sb_instagram_height' => '',
421
- 'sb_instagram_num' => '20',
422
- 'sb_instagram_height_unit' => '',
423
- 'sb_instagram_cols' => '4',
424
- 'sb_instagram_disable_mobile' => false,
425
- 'sb_instagram_image_padding' => '5',
426
- 'sb_instagram_image_padding_unit' => 'px',
427
- 'sb_instagram_sort' => 'none',
428
- 'sb_instagram_background' => '',
429
- 'sb_instagram_show_btn' => true,
430
- 'sb_instagram_btn_background' => '',
431
- 'sb_instagram_btn_text_color' => '',
432
- 'sb_instagram_btn_text' => __( 'Load More...', 'instagram-feed' ),
433
- 'sb_instagram_image_res' => 'auto',
434
- //Header
435
- 'sb_instagram_show_header' => true,
436
- 'sb_instagram_header_size' => 'small',
437
- 'sb_instagram_header_color' => '',
438
- 'sb_instagram_custom_bio' => '',
439
- 'sb_instagram_custom_avatar' => '',
440
- //Follow button
441
- 'sb_instagram_show_follow_btn' => true,
442
- 'sb_instagram_folow_btn_background' => '',
443
- 'sb_instagram_follow_btn_text_color' => '',
444
- 'sb_instagram_follow_btn_text' => __( 'Follow on Instagram', 'instagram-feed' ),
445
- //Misc
446
- 'sb_instagram_custom_css' => '',
447
- 'sb_instagram_custom_js' => '',
448
- 'sb_instagram_cron' => 'no',
449
- 'sb_instagram_backup' => true,
450
- 'sb_ajax_initial' => false,
451
- 'enqueue_css_in_shortcode' => false,
452
- 'sb_instagram_ajax_theme' => false,
453
- 'gdpr' => 'auto',
454
- 'sb_instagram_disable_resize' => false,
455
- 'sb_instagram_favor_local' => true,
456
- 'sb_instagram_minnum' => 0,
457
- 'disable_js_image_loading' => false,
458
- 'enqueue_js_in_head' => false,
459
- 'sb_instagram_disable_mob_swipe' => false,
460
- 'custom_template' => false,
461
- 'disable_admin_notice' => false,
462
- 'enable_email_report' => true,
463
- 'email_notification' => 'monday',
464
- 'email_notification_addresses' => get_option( 'admin_email' ),
465
- );
466
- //Save defaults in an array
467
- $options = wp_parse_args( get_option( 'sb_instagram_settings' ), $sb_instagram_settings_defaults );
468
- update_option( 'sb_instagram_settings', $options );
469
-
470
- //Set the page variables
471
- $sb_instagram_user_id = $options['sb_instagram_user_id'];
472
- $sb_instagram_preserve_settings = $options['sb_instagram_preserve_settings'];
473
- $sb_instagram_ajax_theme = $options['sb_instagram_ajax_theme'];
474
- $gdpr = $options['gdpr'];
475
- $enqueue_js_in_head = $options['enqueue_js_in_head'];
476
- $disable_js_image_loading = $options['disable_js_image_loading'];
477
- $sb_instagram_disable_resize = $options['sb_instagram_disable_resize'];
478
- $sb_instagram_favor_local = $options['sb_instagram_favor_local'];
479
- $sb_instagram_minnum = $options['sb_instagram_minnum'];
480
-
481
- $sb_instagram_cache_time = $options['sb_instagram_cache_time'];
482
- $sb_instagram_cache_time_unit = $options['sb_instagram_cache_time_unit'];
483
- if ( $sb_instagram_cache_time_unit === 'days' ) {
484
- $sb_instagram_cache_time_unit = 'hours';
485
- $sb_instagram_cache_time = 24;
486
- }
487
- $sbi_caching_type = $options['sbi_caching_type'];
488
- $sbi_cache_cron_interval = $options['sbi_cache_cron_interval'];
489
- $sbi_cache_cron_time = $options['sbi_cache_cron_time'];
490
- $sbi_cache_cron_am_pm = $options['sbi_cache_cron_am_pm'];
491
-
492
- $sb_instagram_width = $options['sb_instagram_width'];
493
- $sb_instagram_width_unit = $options['sb_instagram_width_unit'];
494
- $sb_instagram_feed_width_resp = $options['sb_instagram_feed_width_resp'];
495
- $sb_instagram_height = $options['sb_instagram_height'];
496
- $sb_instagram_height_unit = $options['sb_instagram_height_unit'];
497
- $sb_instagram_num = $options['sb_instagram_num'];
498
- $sb_instagram_cols = $options['sb_instagram_cols'];
499
- $sb_instagram_disable_mobile = $options['sb_instagram_disable_mobile'];
500
- $sb_instagram_image_padding = $options['sb_instagram_image_padding'];
501
- $sb_instagram_image_padding_unit = $options['sb_instagram_image_padding_unit'];
502
- $sb_instagram_sort = $options['sb_instagram_sort'];
503
- $sb_instagram_background = $options['sb_instagram_background'];
504
- $sb_instagram_show_btn = $options['sb_instagram_show_btn'];
505
- $sb_instagram_btn_background = $options['sb_instagram_btn_background'];
506
- $sb_instagram_btn_text_color = $options['sb_instagram_btn_text_color'];
507
- $sb_instagram_btn_text = $options['sb_instagram_btn_text'];
508
- $sb_instagram_image_res = $options['sb_instagram_image_res'];
509
- //Header
510
- $sb_instagram_show_header = $options['sb_instagram_show_header'];
511
- $sb_instagram_header_size = $options['sb_instagram_header_size'];
512
- $sb_instagram_show_bio = isset( $options['sb_instagram_show_bio'] ) ? $options['sb_instagram_show_bio'] : true;
513
- $sb_instagram_custom_bio = $options['sb_instagram_custom_bio'];
514
- $sb_instagram_custom_avatar = $options['sb_instagram_custom_avatar'];
515
- $sb_instagram_header_color = $options['sb_instagram_header_color'];
516
- //Follow button
517
- $sb_instagram_show_follow_btn = $options['sb_instagram_show_follow_btn'];
518
- $sb_instagram_folow_btn_background = $options['sb_instagram_folow_btn_background'];
519
- $sb_instagram_follow_btn_text_color = $options['sb_instagram_follow_btn_text_color'];
520
- $sb_instagram_follow_btn_text = $options['sb_instagram_follow_btn_text'];
521
- //Misc
522
- $sb_instagram_custom_css = $options['sb_instagram_custom_css'];
523
- $sb_instagram_custom_js = $options['sb_instagram_custom_js'];
524
- $sb_instagram_cron = $options['sb_instagram_cron'];
525
- $sb_instagram_backup = $options['sb_instagram_backup'];
526
- $sb_ajax_initial = $options['sb_ajax_initial'];
527
- $enqueue_css_in_shortcode = $options['enqueue_css_in_shortcode'];
528
- $sb_instagram_custom_template = $options['custom_template'];
529
- $sb_instagram_disable_admin_notice = $options['disable_admin_notice'];
530
- $sb_instagram_enable_email_report = $options['enable_email_report'];
531
- $sb_instagram_email_notification = $options['email_notification'];
532
- $sb_instagram_email_notification_addresses = $options['email_notification_addresses'];
533
-
534
- //Check nonce before saving data
535
- if ( ! isset( $_POST['sb_instagram_settings_nonce'] ) ) {
536
-
537
- } else {
538
- $nonce = isset( $_POST['sb_instagram_settings_nonce'] ) ? $_POST['sb_instagram_settings_nonce'] : false;
539
- if ( ! wp_verify_nonce( $nonce, 'sb_instagram_saving_settings' ) ) {
540
- ?>
541
- <div id="sbi_admin" class="wrap">
542
- <div class="sb_instagram_box" style="display: block;">
543
- <div class="sb_instagram_box_setting" style="display: block;">
544
-
545
- <?php
546
- esc_html_e( 'Sorry your settings were not saved! Please refresh the page and try again.', 'instagram-feed' );
547
- ?>
548
- </div>
549
- </div>
550
- </div>
551
- <?php
552
- return;
553
- }
554
- // See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
555
- if ( isset( $_POST['sb_instagram_settings_hidden_field'] ) && $_POST['sb_instagram_settings_hidden_field'] === 'Y' ) {
556
-
557
- if ( isset( $_POST['sb_instagram_configure_hidden_field'] ) && $_POST['sb_instagram_configure_hidden_field'] === 'Y' ) {
558
-
559
- $sb_instagram_user_id = array();
560
- if ( isset( $_POST['sb_instagram_user_id'] ) ) {
561
- if ( is_array( $_POST['sb_instagram_user_id'] ) ) {
562
- foreach ( $_POST['sb_instagram_user_id'] as $user_id ) {
563
- $sb_instagram_user_id[] = sbi_sanitize_instagram_ids( $user_id );
564
- }
565
- } else {
566
- $sb_instagram_user_id[] = sbi_sanitize_instagram_ids( $_POST['sb_instagram_user_id'] );
567
- }
568
- }
569
- $sb_instagram_preserve_settings = isset( $_POST['sb_instagram_preserve_settings'] );
570
- isset( $_POST['sb_instagram_cache_time'] ) ? $sb_instagram_cache_time = (int) $_POST['sb_instagram_cache_time'] : $sb_instagram_cache_time = 1;
571
- isset( $_POST['sb_instagram_cache_time_unit'] ) ? $sb_instagram_cache_time_unit = SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_cache_time_unit'], 'enum', array( 'minutes', 'hours', 'days' ) ) : $sb_instagram_cache_time_unit = 'hours';
572
-
573
- isset( $_POST['sbi_caching_type'] ) ? $sbi_caching_type = SB_Instagram_Settings::sanitize_setting( $_POST['sbi_caching_type'], 'enum', array( 'page', 'background' ) ) : $sbi_caching_type = 'page';
574
- isset( $_POST['sbi_cache_cron_interval'] ) ? $sbi_cache_cron_interval = SB_Instagram_Settings::sanitize_setting( $_POST['sbi_cache_cron_interval'], 'enum', array( '30mins', '1hour', '12hours', '24hours' ) ) : $sbi_cache_cron_interval = '1hour';
575
- isset( $_POST['sbi_cache_cron_time'] ) ? $sbi_cache_cron_time = SB_Instagram_Settings::sanitize_setting( (string) $_POST['sbi_cache_cron_time'], 'enum', array( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11' ) ) : $sbi_cache_cron_time = '1';
576
- isset( $_POST['sbi_cache_cron_am_pm'] ) ? $sbi_cache_cron_am_pm = SB_Instagram_Settings::sanitize_setting( $_POST['sbi_cache_cron_am_pm'], 'enum', array( 'am', 'pm' ) ) : $sbi_cache_cron_am_pm = 'am';
577
-
578
- $options['sb_instagram_user_id'] = $sb_instagram_user_id;
579
- $options['sb_instagram_preserve_settings'] = $sb_instagram_preserve_settings;
580
- if ( $sb_instagram_cache_time_unit === 'days' ) {
581
- $sb_instagram_cache_time_unit = 'hours';
582
- $sb_instagram_cache_time = 24;
583
- }
584
-
585
- $options['sb_instagram_cache_time'] = $sb_instagram_cache_time;
586
- $options['sb_instagram_cache_time_unit'] = $sb_instagram_cache_time_unit;
587
-
588
- $options['sbi_caching_type'] = $sbi_caching_type;
589
- $options['sbi_cache_cron_interval'] = $sbi_cache_cron_interval;
590
- $options['sbi_cache_cron_time'] = $sbi_cache_cron_time;
591
- $options['sbi_cache_cron_am_pm'] = $sbi_cache_cron_am_pm;
592
-
593
- //Delete all SBI transients
594
- global $wpdb;
595
- $table_name = $wpdb->prefix . 'options';
596
- $wpdb->query(
597
- "
598
- DELETE
599
- FROM $table_name
600
- WHERE `option_name` LIKE ('%\_transient\_sbi\_%')
601
- "
602
- );
603
- $wpdb->query(
604
- "
605
- DELETE
606
- FROM $table_name
607
- WHERE `option_name` LIKE ('%\_transient\_timeout\_sbi\_%')
608
- "
609
- );
610
- $wpdb->query(
611
- "
612
- DELETE
613
- FROM $table_name
614
- WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
615
- "
616
- );
617
- $wpdb->query(
618
- "
619
- DELETE
620
- FROM $table_name
621
- WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
622
- "
623
- );
624
-
625
- if ( $sbi_caching_type === 'background' ) {
626
- delete_option( 'sbi_cron_report' );
627
- SB_Instagram_Cron_Updater::start_cron_job( $sbi_cache_cron_interval, $sbi_cache_cron_time, $sbi_cache_cron_am_pm );
628
- }
629
-
630
- global $sb_instagram_posts_manager;
631
- $sb_instagram_posts_manager->add_action_log( 'Saved settings on the configure tab.' );
632
- $sb_instagram_posts_manager->clear_api_request_delays();
633
-
634
- } //End config tab post
635
-
636
- if ( isset( $_POST['sb_instagram_customize_hidden_field'] ) && $_POST['sb_instagram_customize_hidden_field'] === 'Y' ) {
637
-
638
- //Validate and sanitize width field
639
- $safe_width = intval( $_POST['sb_instagram_width'] );
640
- if ( ! $safe_width ) {
641
- $safe_width = '';
642
- }
643
- if ( strlen( $safe_width ) > 4 ) {
644
- $safe_width = substr( $safe_width, 0, 4 );
645
- }
646
- $sb_instagram_width = $safe_width;
647
-
648
- $sb_instagram_width_unit = isset( $_POST['sb_instagram_width_unit'] ) ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_width_unit'], 'enum', array( 'px', '%' ) ) : 'px';
649
- $sb_instagram_feed_width_resp = isset( $_POST['sb_instagram_feed_width_resp'] );
650
-
651
- //Validate and sanitize height field
652
- $safe_height = intval( $_POST['sb_instagram_height'] );
653
- if ( ! $safe_height ) {
654
- $safe_height = '';
655
- }
656
- if ( strlen( $safe_height ) > 4 ) {
657
- $safe_height = substr( $safe_height, 0, 4 );
658
- }
659
- $sb_instagram_height = $safe_height;
660
-
661
- $sb_instagram_height_unit = isset( $_POST['sb_instagram_height_unit'] ) ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_height_unit'], 'enum', array( 'px', '%' ) ) : 'px';
662
-
663
- //Validate and sanitize number of photos field
664
- $safe_num = intval( sanitize_text_field( $_POST['sb_instagram_num'] ) );
665
- if ( ! $safe_num ) {
666
- $safe_num = '';
667
- }
668
- if ( strlen( $safe_num ) > 4 ) {
669
- $safe_num = substr( $safe_num, 0, 4 );
670
- }
671
- $sb_instagram_num = $safe_num;
672
-
673
- $sb_instagram_cols = isset( $_POST['sb_instagram_cols'] ) ? SB_Instagram_Settings::sanitize_setting( (string) $_POST['sb_instagram_cols'], 'enum', array( '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11' ) ) : 'px';
674
- $sb_instagram_disable_mobile = isset( $_POST['sb_instagram_disable_mobile'] );
675
-
676
- //Validate and sanitize padding field
677
- $safe_padding = intval( $_POST['sb_instagram_image_padding'] );
678
- if ( ! $safe_padding ) {
679
- $safe_padding = '';
680
- }
681
- if ( strlen( $safe_padding ) > 4 ) {
682
- $safe_padding = substr( $safe_padding, 0, 4 );
683
- }
684
- $sb_instagram_image_padding = $safe_padding;
685
-
686
- $sb_instagram_image_padding_unit = isset( $_POST['sb_instagram_image_padding_unit'] ) ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_image_padding_unit'], 'enum', array( 'px', '%' ) ) : 'px';
687
- $sb_instagram_sort = isset( $_POST['sb_instagram_sort'] ) ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_sort'], 'enum', array( 'none', 'random', 'likes' ) ) : 'none';
688
- $sb_instagram_background = isset( $_POST['sb_instagram_background'] ) && $_POST['sb_instagram_background'] !== '#' ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_background'], 'color', 'any' ) : '';
689
- $sb_instagram_show_btn = isset( $_POST['sb_instagram_show_btn'] );
690
- $sb_instagram_btn_background = isset( $_POST['sb_instagram_btn_background'] ) && $_POST['sb_instagram_btn_background'] !== '#' ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_btn_background'], 'color', 'any' ) : '';
691
- $sb_instagram_btn_text_color = isset( $_POST['sb_instagram_btn_text_color'] ) && $_POST['sb_instagram_btn_text_color'] !== '#' ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_btn_text_color'], 'color', 'any' ) : '';
692
- $sb_instagram_btn_text = isset( $_POST['sb_instagram_btn_text'] ) ? sanitize_text_field( wp_unslash( $_POST['sb_instagram_btn_text'] ) ) : __( 'Load More...', 'instagram-feed' );
693
- $sb_instagram_image_res = isset( $_POST['sb_instagram_image_res'] ) ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_image_res'], 'enum', array( 'auto', 'thumb', 'medium', 'full' ) ) : 'auto';
694
- //Header
695
- $sb_instagram_show_header = isset( $_POST['sb_instagram_show_header'] );
696
- $sb_instagram_show_bio = isset( $_POST['sb_instagram_show_bio'] );
697
- if ( function_exists( 'sanitize_textarea_field' ) ) {
698
- isset( $_POST['sb_instagram_custom_bio'] ) ? $sb_instagram_custom_bio = sanitize_textarea_field( wp_unslash( $_POST['sb_instagram_custom_bio'] ) ) : $sb_instagram_custom_bio = '';
699
- } else {
700
- isset( $_POST['sb_instagram_custom_bio'] ) ? $sb_instagram_custom_bio = sanitize_text_field( wp_unslash( $_POST['sb_instagram_custom_bio'] ) ) : $sb_instagram_custom_bio = '';
701
- }
702
- isset( $_POST['sb_instagram_custom_avatar'] ) && sbi_is_url( $_POST['sb_instagram_custom_avatar'] ) ? $sb_instagram_custom_avatar = esc_url( $_POST['sb_instagram_custom_avatar'] ) : $sb_instagram_custom_avatar = '';
703
- $sb_instagram_header_size = 'small';
704
- if ( isset( $_POST['sb_instagram_header_size'] ) ) {
705
- $sb_instagram_header_size = SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_header_size'], 'enum', array( 'small', 'medium', 'large' ) );
706
- }
707
-
708
- $sb_instagram_header_color = isset( $_POST['sb_instagram_header_color'] ) && $_POST['sb_instagram_header_color'] !== '#' ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_header_color'], 'color', 'any' ) : '';
709
- //Follow button
710
- $sb_instagram_show_follow_btn = isset( $_POST['sb_instagram_show_follow_btn'] );
711
- $sb_instagram_folow_btn_background = isset( $_POST['sb_instagram_folow_btn_background'] ) && $_POST['sb_instagram_folow_btn_background'] !== '#' ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_folow_btn_background'], 'color', 'any' ) : '';
712
- $sb_instagram_follow_btn_text_color = isset( $_POST['sb_instagram_follow_btn_text_color'] ) && $_POST['sb_instagram_follow_btn_text_color'] !== '#' ? SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_follow_btn_text_color'], 'color', 'any' ) : '';
713
- $sb_instagram_follow_btn_text = isset( $_POST['sb_instagram_follow_btn_text'] ) ? sanitize_text_field( wp_unslash( $_POST['sb_instagram_follow_btn_text'] ) ) : __( 'Follow on Instagram', 'instagram-feed' );
714
- //Misc
715
- if ( preg_match( '#</?\w+#', $_POST['sb_instagram_custom_css'] ) ) {
716
- $sb_instagram_custom_css = '';
717
- } else {
718
- $sb_instagram_custom_css = $_POST['sb_instagram_custom_css'];
719
- }
720
- $sb_instagram_custom_js = $_POST['sb_instagram_custom_js'];
721
- $sb_instagram_ajax_theme = isset( $_POST['sb_instagram_ajax_theme'] );
722
- isset( $_POST['gdpr'] ) ? $gdpr = SB_Instagram_Settings::sanitize_setting( $_POST['gdpr'], 'enum', array( 'auto', 'yes', 'no' ) ) : $gdpr = 'auto';
723
- $enqueue_js_in_head = isset( $_POST['enqueue_js_in_head'] );
724
- $disable_js_image_loading = isset( $_POST['disable_js_image_loading'] );
725
- $sb_instagram_disable_resize = isset( $_POST['sb_instagram_disable_resize'] );
726
- $sb_instagram_favor_local = isset( $_POST['sb_instagram_favor_local'] );
727
- ! empty( $_POST['sb_instagram_minnum'] ) ? $sb_instagram_minnum = min( 100, (int) $_POST['sb_instagram_minnum'] ) : $sb_instagram_minnum = '';
728
-
729
- if ( isset( $_POST['sb_instagram_cron'] ) ) {
730
- $sb_instagram_cron = SB_Instagram_Settings::sanitize_setting( $_POST['sb_instagram_cron'], 'enum', array( 'unset', 'yes', 'no' ) );
731
- }
732
- $sb_instagram_backup = isset( $_POST['sb_instagram_backup'] );
733
- $sb_ajax_initial = isset( $_POST['sb_ajax_initial'] );
734
- $enqueue_css_in_shortcode = isset( $_POST['enqueue_css_in_shortcode'] );
735
-
736
- $options['sb_instagram_width'] = $sb_instagram_width;
737
- $options['sb_instagram_width_unit'] = $sb_instagram_width_unit;
738
- $options['sb_instagram_feed_width_resp'] = $sb_instagram_feed_width_resp;
739
- $options['sb_instagram_height'] = $sb_instagram_height;
740
- $options['sb_instagram_height_unit'] = $sb_instagram_height_unit;
741
- $options['sb_instagram_num'] = $sb_instagram_num;
742
- $options['sb_instagram_cols'] = $sb_instagram_cols;
743
- $options['sb_instagram_disable_mobile'] = $sb_instagram_disable_mobile;
744
- $options['sb_instagram_image_padding'] = $sb_instagram_image_padding;
745
- $options['sb_instagram_image_padding_unit'] = $sb_instagram_image_padding_unit;
746
- $options['sb_instagram_sort'] = $sb_instagram_sort;
747
- $options['sb_instagram_background'] = $sb_instagram_background;
748
- $options['sb_instagram_show_btn'] = $sb_instagram_show_btn;
749
- $options['sb_instagram_btn_background'] = $sb_instagram_btn_background;
750
- $options['sb_instagram_btn_text_color'] = $sb_instagram_btn_text_color;
751
- $options['sb_instagram_btn_text'] = $sb_instagram_btn_text;
752
- $options['sb_instagram_image_res'] = $sb_instagram_image_res;
753
- //Header
754
- $options['sb_instagram_show_header'] = $sb_instagram_show_header;
755
- $options['sb_instagram_header_size'] = $sb_instagram_header_size;
756
- $options['sb_instagram_show_bio'] = $sb_instagram_show_bio;
757
- $options['sb_instagram_custom_bio'] = $sb_instagram_custom_bio;
758
- $options['sb_instagram_custom_avatar'] = $sb_instagram_custom_avatar;
759
- $options['sb_instagram_header_color'] = $sb_instagram_header_color;
760
- //Follow button
761
- $options['sb_instagram_show_follow_btn'] = $sb_instagram_show_follow_btn;
762
- $options['sb_instagram_folow_btn_background'] = $sb_instagram_folow_btn_background;
763
- $options['sb_instagram_follow_btn_text_color'] = $sb_instagram_follow_btn_text_color;
764
- $options['sb_instagram_follow_btn_text'] = $sb_instagram_follow_btn_text;
765
- //Misc
766
- $options['sb_instagram_custom_css'] = $sb_instagram_custom_css;
767
- $options['sb_instagram_custom_js'] = $sb_instagram_custom_js;
768
- $options['sb_instagram_ajax_theme'] = $sb_instagram_ajax_theme;
769
- $options['gdpr'] = $gdpr;
770
- $options['enqueue_js_in_head'] = $enqueue_js_in_head;
771
- $options['disable_js_image_loading'] = $disable_js_image_loading;
772
- $options['sb_instagram_disable_resize'] = $sb_instagram_disable_resize;
773
- $options['sb_instagram_favor_local'] = $sb_instagram_favor_local;
774
- $options['sb_instagram_minnum'] = $sb_instagram_minnum;
775
-
776
- $options['sb_ajax_initial'] = $sb_ajax_initial;
777
- $options['sb_instagram_cron'] = $sb_instagram_cron;
778
- $options['sb_instagram_backup'] = $sb_instagram_backup;
779
- $options['enqueue_css_in_shortcode'] = $enqueue_css_in_shortcode;
780
-
781
- $sb_instagram_custom_template = isset( $_POST['sb_instagram_custom_template'] );
782
- $options['custom_template'] = $sb_instagram_custom_template;
783
- $sb_instagram_disable_admin_notice = isset( $_POST['sb_instagram_disable_admin_notice'] );
784
- $options['disable_admin_notice'] = $sb_instagram_disable_admin_notice;
785
- $sb_instagram_enable_email_report = isset( $_POST['sb_instagram_enable_email_report'] );
786
- $options['enable_email_report'] = $sb_instagram_enable_email_report;
787
- isset( $_POST['sb_instagram_email_notification'] ) ? $sb_instagram_email_notification = sanitize_text_field( wp_unslash( $_POST['sb_instagram_email_notification'] ) ) : $sb_instagram_email_notification = '';
788
- $original = $options['email_notification'];
789
- $options['email_notification'] = $sb_instagram_email_notification;
790
- isset( $_POST['sb_instagram_email_notification_addresses'] ) ? $sb_instagram_email_notification_addresses = sanitize_text_field( wp_unslash( $_POST['sb_instagram_email_notification_addresses'] ) ) : $sb_instagram_email_notification_addresses = get_option( 'admin_email' );
791
- $options['email_notification_addresses'] = $sb_instagram_email_notification_addresses;
792
-
793
- if ( $original !== $sb_instagram_email_notification && $sb_instagram_enable_email_report ) {
794
- //Clear the existing cron event
795
- wp_clear_scheduled_hook( 'sb_instagram_feed_issue_email' );
796
-
797
- $input = sanitize_text_field( wp_unslash( $_POST['sb_instagram_email_notification'] ) );
798
- $timestamp = strtotime( 'next ' . $input );
799
-
800
- if ( $timestamp - ( 3600 * 1 ) < time() ) {
801
- $timestamp = $timestamp + ( 3600 * 24 * 7 );
802
- }
803
- $six_am_local = $timestamp + sbi_get_utc_offset() + ( 6 * 60 * 60 );
804
-
805
- wp_schedule_event( $six_am_local, 'sbiweekly', 'sb_instagram_feed_issue_email' );
806
- }
807
-
808
- //Delete all SBI transients
809
- global $wpdb;
810
- $table_name = $wpdb->prefix . 'options';
811
- $wpdb->query(
812
- "
813
- DELETE
814
- FROM $table_name
815
- WHERE `option_name` LIKE ('%\_transient\_sbi\_%')
816
- "
817
- );
818
- $wpdb->query(
819
- "
820
- DELETE
821
- FROM $table_name
822
- WHERE `option_name` LIKE ('%\_transient\_timeout\_sbi\_%')
823
- "
824
- );
825
- $wpdb->query(
826
- "
827
- DELETE
828
- FROM $table_name
829
- WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
830
- "
831
- );
832
- $wpdb->query(
833
- "
834
- DELETE
835
- FROM $table_name
836
- WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
837
- "
838
- );
839
-
840
- if ( $sb_instagram_cron === 'no' ) {
841
- wp_clear_scheduled_hook( 'sb_instagram_cron_job' );
842
- }
843
-
844
- //Run cron when Misc settings are saved
845
- if ( $sb_instagram_cron === 'yes' ) {
846
- //Clear the existing cron event
847
- wp_clear_scheduled_hook( 'sb_instagram_cron_job' );
848
-
849
- $sb_instagram_cache_time = $options['sb_instagram_cache_time'];
850
- $sb_instagram_cache_time_unit = $options['sb_instagram_cache_time_unit'];
851
-
852
- //Set the event schedule based on what the caching time is set to
853
- $sb_instagram_cron_schedule = 'hourly';
854
- if ( $sb_instagram_cache_time_unit === 'hours' && $sb_instagram_cache_time > 5 ) {
855
- $sb_instagram_cron_schedule = 'twicedaily';
856
- }
857
- if ( $sb_instagram_cache_time_unit === 'days' ) {
858
- $sb_instagram_cron_schedule = 'daily';
859
- }
860
-
861
- wp_schedule_event( time(), $sb_instagram_cron_schedule, 'sb_instagram_cron_job' );
862
-
863
- sb_instagram_clear_page_caches();
864
- }
865
- } //End customize tab post
866
-
867
- //Save the settings to the settings array
868
- update_option( 'sb_instagram_settings', $options );
869
-
870
- ?>
871
- <div class="updated"><p><strong><?php esc_html_e( 'Settings saved.', 'instagram-feed' ); ?></strong></p></div>
872
- <?php } ?>
873
-
874
- <?php } //End nonce check ?>
875
-
876
-
877
- <div id="sbi_admin" class="wrap">
878
- <?php
879
- $lite_notice_dismissed = get_transient( 'instagram_feed_dismiss_lite' );
880
-
881
- if ( ! $lite_notice_dismissed ) :
882
- ?>
883
- <div id="sbi-notice-bar" style="display:none">
884
- <span class="sbi-notice-bar-message"><?php echo wp_kses_post( __( '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>
885
- <button type="button" class="dismiss" title="<?php esc_html_e( 'Dismiss this message.', 'instagram-feed' ); ?>" data-page="overview">
886
- </button>
887
- </div>
888
- <?php endif; ?>
889
-
890
- <?php do_action( 'sbi_admin_overview_before_table' ); ?>
891
-
892
-
893
- <div id="header">
894
- <h1><?php esc_html_e( 'Instagram Feed', 'instagram-feed' ); ?></h1>
895
- </div>
896
- <?php
897
- $sb_instagram_type = 'user';
898
- $connected_accounts = SBI_Account_Connector::stored_connected_accounts();
899
- $user_feed_ids = ! is_array( $sb_instagram_user_id ) ? explode( ',', $sb_instagram_user_id ) : $sb_instagram_user_id;
900
-
901
- $new_user_name = false;
902
-
903
- SBI_Account_Connector::maybe_launch_modals( $sb_instagram_user_id );
904
- if ( isset( $_POST['sbi_connect_username'] ) ) {
905
- $new_user_name = sanitize_text_field( wp_unslash( $_POST['sbi_connect_username'] ) );
906
- $new_account_details = json_decode( stripslashes( $_POST['sbi_account_json'] ), true );
907
- array_map( 'sanitize_text_field', $new_account_details );
908
-
909
- $basic_account_access_token_connect = new SB_Instagram_API_Connect( $new_account_details, 'access_token', array() );
910
- $basic_account_access_token_connect->wp_http_connect();
911
- $token_data = $basic_account_access_token_connect->get_data();
912
-
913
- if ( ! $basic_account_access_token_connect->is_wp_error() && ! $basic_account_access_token_connect->is_instagram_error() ) {
914
- $expires_in = $token_data['expires_in'];
915
- $expires_timestamp = time() + $expires_in;
916
- } else {
917
- $expires_timestamp = time() + 60 * DAY_IN_SECONDS;
918
- }
919
-
920
- $basic_account_access_token_connect = new SB_Instagram_API_Connect( $new_account_details, 'header', array() );
921
- $basic_account_access_token_connect->wp_http_connect();
922
- $new_data = $basic_account_access_token_connect->get_data();
923
- if ( $basic_account_access_token_connect->is_wp_error() || $basic_account_access_token_connect->is_instagram_error() ) {
924
- return;
925
- }
926
- $api_account_details = array(
927
- 'access_token' => $new_account_details['access_token'],
928
- 'account_type' => 'personal',
929
- 'user_id' => $new_account_details['user_id'],
930
- 'username' => $new_data['username'],
931
- 'expires_timestamp' => $expires_timestamp,
932
- 'type' => 'basic',
933
- 'profile_picture' => '',
934
- );
935
-
936
- $updated_options = sbi_connect_basic_account( $api_account_details );
937
- $connected_accounts = $updated_options['connected_accounts'];
938
- $user_feed_ids = $updated_options['sb_instagram_user_id'];
939
- }
940
-
941
- //Display connected page
942
- if ( isset( $sbi_connected_page ) && strpos( $sbi_connected_page, ':' ) !== false ) {
943
-
944
- $sbi_connected_page_pieces = explode( ':', $sbi_connected_page );
945
- $sbi_connected_page_id = $sbi_connected_page_pieces[0];
946
- $sbi_connected_page_name = $sbi_connected_page_pieces[1];
947
- $sbi_connected_page_image = $sbi_connected_page_pieces[2];
948
-
949
- echo '&nbsp;';
950
- echo '<p style="font-weight: bold; margin-bottom: 5px;">Connected Business Profile:</p>';
951
- echo '<div class="sbi-managed-page sbi-no-select">';
952
- echo '<p><img class="sbi-page-avatar" height="50" width="50" src="' . esc_url( $sbi_connected_page_image ) . '" alt="' . esc_attr( $sbi_connected_page_id ) . '"><strong>' . esc_html( $sbi_connected_page_name ) . '</strong> &nbsp; (' . esc_html( $sbi_connected_page_id ) . ')</p>';
953
- echo '</div>';
954
- }
955
-
956
- ?>
957
-
958
- <form name="form1" method="post" action="">
959
- <input type="hidden" name="sb_instagram_settings_hidden_field" value="Y">
960
- <?php wp_nonce_field( 'sb_instagram_saving_settings', 'sb_instagram_settings_nonce' ); ?>
961
-
962
- <?php $sbi_active_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'configure'; ?>
963
- <h2 class="nav-tab-wrapper">
964
- <a href="?page=sb-instagram-feed&amp;tab=configure" class="nav-tab <?php echo $sbi_active_tab === 'configure' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( '1. Configure', 'instagram-feed' ); ?></a>
965
- <a href="?page=sb-instagram-feed&amp;tab=customize" class="nav-tab <?php echo $sbi_active_tab === 'customize' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( '2. Customize', 'instagram-feed' ); ?></a>
966
- <a href="?page=sb-instagram-feed&amp;tab=display" class="nav-tab <?php echo $sbi_active_tab === 'display' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( '3. Display Your Feed', 'instagram-feed' ); ?></a>
967
- <a href="?page=sb-instagram-feed&amp;tab=support" class="nav-tab <?php echo $sbi_active_tab === 'support' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Support', 'instagram-feed' ); ?></a>
968
- <a href="?page=sb-instagram-feed&amp;tab=more" class="nav-tab <?php echo $sbi_active_tab === 'more' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'More Social Feeds', 'instagram-feed' ); ?>
969
- <?php
970
- $seen_more_plugins_page = get_user_meta( get_current_user_id(), 'seen_more_plugins_page_1', true );
971
- if ( ! $seen_more_plugins_page ) {
972
- echo '<span class="sbi-alert-bubble">1</span>';
973
- }
974
- ?>
975
- </a>
976
- </h2>
977
-
978
- <?php if ( $sbi_active_tab === 'configure' ) { //Start Configure tab ?>
979
- <input type="hidden" name="sb_instagram_configure_hidden_field" value="Y">
980
-
981
- <table class="form-table" aria-describedby="sbi-con-desc">
982
- <tbody>
983
- <h3 id="sbi-con-desc"><?php esc_html_e( 'Configure', 'instagram-feed' ); ?></h3>
984
- <?php
985
- $sb_admin_email = get_option( 'admin_email' );
986
- $state_url = wp_nonce_url( admin_url( 'admin.php?page=sb-instagram-feed' ), 'sbi-connect', 'sbi_con' );
987
- $connect_url = 'https://connect.smashballoon.com/auth/ig/?wordpress_user=' . $sb_admin_email . '&state=' . $state_url;
988
- ?>
989
- <div id="sbi_config">
990
- <a data-new-api="<?php echo esc_attr( $connect_url ); ?>" href="<?php echo esc_attr( $connect_url ); ?>" class="sbi_admin_btn"><i class="fa fa-user-plus" aria-hidden="true" style="font-size: 20px;"></i>&nbsp; <?php esc_html_e( 'Connect an Instagram Account', 'instagram-feed' ); ?></a>
991
- <a href="https://smashballoon.com/instagram-feed/token/" target="_blank" style="position: relative; top: 14px; left: 15px;"><?php esc_html_e( 'Button not working?', 'instagram-feed' ); ?></a>
992
- </div>
993
-
994
- <tr>
995
- <th scope="row"><label><?php esc_html_e( 'Instagram Accounts', 'instagram-feed' ); ?></label><span style="font-weight:normal; font-style:italic; font-size: 12px; display: block;"><?php esc_html_e( 'Use the button above to connect an Instagram account', 'instagram-feed' ); ?></span></th>
996
- <td class="sbi_connected_accounts_wrap">
997
- <?php if ( empty( $connected_accounts ) ) : ?>
998
- <p class="sbi_no_accounts"><?php esc_html_e( 'No Instagram accounts connected. Click the button above to connect an account.', 'instagram-feed' ); ?></p><br />
999
- <?php
1000
- else :
1001
- $doing_account_error_messages = count( $connected_accounts ) > 1;
1002
- global $sb_instagram_posts_manager;
1003
- $encryption = new SB_Instagram_Data_Encryption();
1004
- ?>
1005
- <?php
1006
- foreach ( $connected_accounts as $account ) :
1007
- $username = $account['username'];
1008
- if ( isset( $account['local_avatar'] ) && $account['local_avatar'] && isset( $options['sb_instagram_favor_local'] ) && $options['sb_instagram_favor_local'] ) {
1009
- $upload = wp_upload_dir();
1010
- $resized_url = trailingslashit( $upload['baseurl'] ) . trailingslashit( SBI_UPLOADS_NAME );
1011
- $profile_picture = '<img class="sbi_ca_avatar" src="' . $resized_url . $account['username'] . '.jpg" />'; //Could add placeholder avatar image
1012
- } else {
1013
- $profile_picture = $account['profile_picture'] ? '<img class="sbi_ca_avatar" src="' . $account['profile_picture'] . '" />' : ''; //Could add placeholder avatar image
1014
- }
1015
-
1016
- $is_invalid_class = ! $account['is_valid'] ? ' sbi_account_invalid' : '';
1017
- $in_user_feed = in_array( $account['user_id'], $user_feed_ids, true );
1018
- $account_type = isset( $account['type'] ) ? $account['type'] : 'personal';
1019
- $use_tagged = isset( $account['use_tagged'] ) && $account['use_tagged'] === '1';
1020
- $is_private = isset( $account['private'] ) && $account['private'] !== false;
1021
-
1022
- if ( empty( $profile_picture ) && $account_type === 'personal' ) {
1023
- $account_update = sbi_account_data_for_token( $account['access_token'] );
1024
- if ( isset( $account['is_valid'] ) ) {
1025
- $split = explode( '.', $account['access_token'] );
1026
- $connected_accounts[ $split[0] ] = array(
1027
- 'access_token' => $account['access_token'],
1028
- 'user_id' => $split[0],
1029
- 'username' => $account_update['username'],
1030
- 'is_valid' => true,
1031
- 'last_checked' => time(),
1032
- 'profile_picture' => $account_update['profile_picture'],
1033
- );
1034
-
1035
- $sbi_options = get_option( 'sb_instagram_settings', array() );
1036
- $sbi_options['connected_accounts'] = $connected_accounts;
1037
- update_option( 'sb_instagram_settings', $sbi_options );
1038
- }
1039
- }
1040
- $updated_or_new_account_class = $new_user_name === $username && $account_type !== 'business' ? ' sbi_ca_new_or_updated' : '';
1041
-
1042
- ?>
1043
- <div class="sbi_connected_account<?php echo esc_attr( $is_invalid_class . $updated_or_new_account_class ); ?>
1044
- <?php
1045
- if ( $in_user_feed ) {
1046
- echo ' sbi_account_active';}
1047
- ?>
1048
- sbi_account_type_<?php echo esc_attr( $account_type ); ?>" id="sbi_connected_account_<?php echo esc_attr( $account['user_id'] ); ?>" data-accesstoken="" data-userid="<?php echo esc_attr( $account['user_id'] ); ?>" data-username="<?php echo esc_attr( $account['username'] ); ?>" data-type="<?php echo esc_attr( $account_type ); ?>" data-permissions="
1049
- <?php
1050
- if ( $use_tagged ) {
1051
- echo 'tagged';}
1052
- ?>
1053
- ">
1054
- <?php if ( $doing_account_error_messages && $sb_instagram_posts_manager->connected_account_has_error( $account ) ) : ?>
1055
- <div class="sbi_deprecated">
1056
- <span><i class="fa fa-exclamation-circle" aria-hidden="true"></i><?php esc_html_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>
1057
- </div>
1058
- <?php endif; ?>
1059
-
1060
- <div class="sbi_ca_alert">
1061
- <span><?php esc_html_e( 'The Access Token for this account is expired or invalid. Click the button above to attempt to renew it.', 'instagram-feed' ); ?></span>
1062
- </div>
1063
- <div class="sbi_ca_info">
1064
-
1065
- <div class="sbi_ca_delete">
1066
- <a href="<?php echo esc_url( add_query_arg( 'disconnect', $account['user_id'], admin_url( 'admin.php?page=sb-instagram-feed' ) ) ); ?>" class="sbi_delete_account"><i class="fa fa-times"></i><span class="sbi_remove_text"><?php esc_html_e( 'Remove', 'instagram-feed' ); ?></span></a>
1067
- </div>
1068
-
1069
- <div class="sbi_ca_username">
1070
- <?php echo wp_kses_post( $profile_picture ); ?>
1071
- <strong><?php echo esc_html( $username ); ?><span><?php echo esc_html( sbi_account_type_display( $account_type, isset( $account['private'] ) ) ); ?></span></strong>
1072
- </div>
1073
-
1074
- <div class="sbi_ca_actions">
1075
- <?php if ( ! $in_user_feed ) : ?>
1076
- <a href="JavaScript:void(0);" class="sbi_use_in_user_feed button-primary"><i class="fa fa-plus-circle" aria-hidden="true"></i><?php esc_html_e( 'Add to Primary Feed', 'instagram-feed' ); ?></a>
1077
- <?php else : ?>
1078
- <a href="JavaScript:void(0);" class="sbi_remove_from_user_feed button-primary"><i class="fa fa-minus-circle" aria-hidden="true"></i><?php esc_html_e( 'Remove from Primary Feed', 'instagram-feed' ); ?></a>
1079
- <?php endif; ?>
1080
- <a class="sbi_ca_token_shortcode button-secondary" href="JavaScript:void(0);"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i><?php esc_html_e( 'Add to another Feed', 'instagram-feed' ); ?></a>
1081
- <a class="sbi_ca_show_token button-secondary" href="JavaScript:void(0);" title="<?php esc_attr_e( 'Show access token and account info', 'instagram-feed' ); ?>"><i class="fa fa-cog"></i></a>
1082
- <?php
1083
- if ( $is_private ) :
1084
- $expires_in = max( 0, floor( ( $account['expires_timestamp'] - time() ) / DAY_IN_SECONDS ) );
1085
- $message = $expires_in > 0 ? sprintf( __( 'Expires in %s days', 'instagram-feed' ), $expires_in ) : __( 'Access Token Expired', 'instagram-feed' );
1086
- $alert_class = $expires_in < 10 ? ' sbi_alert' : '';
1087
- ?>
1088
- <div class="sbi_is_private<?php echo esc_attr( $alert_class ); ?>">
1089
- <span><?php echo esc_html( $message ); ?></span>
1090
- <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>
1091
-
1092
- <a href="<?php echo esc_url( '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=' . admin_url( 'admin.php?page=sb-instagram-feed' ) ); ?>" class="button button-secondary"><?php esc_html_e( 'Refresh now', 'instagram-feed' ); ?></a>
1093
- </div>
1094
- <p class="sbi_tooltip sbi-more-info" style="display: none; width: 100%; box-sizing: border-box;"><?php echo wp_kses_post( sprintf( __( 'This account is a "private" account on Instagram. It needs to be manually reconnected every 60 days. %1$sChange this account to be "public"%2$s to have access tokens that are automatically refreshed.', 'instagram-feed' ), '<a href="https://help.instagram.com/116024195217477/In" target="_blank">', '</a>' ) ); ?></p>
1095
- <?php endif; ?>
1096
- <?php
1097
- $show_encryption_warning = false;
1098
- if ( isset( $account['access_token'] ) && strpos( $account['access_token'], 'IG' ) === false && strpos( $account['access_token'], 'EA' ) === false && ! $encryption->decrypt( $account['access_token'] ) ) {
1099
- $show_encryption_warning = true;
1100
- }
1101
- if ( $show_encryption_warning ) :
1102
- ?>
1103
- <div class="sbi_alert sbi_is_private">
1104
- <span><?php esc_html_e( 'Could not decrypt access token. Please reconnect this account.', 'instagram-feed' ); ?></span>
1105
- </div>
1106
- <?php
1107
- endif;
1108
- ?>
1109
-
1110
- </div>
1111
-
1112
- <div class="sbi_ca_shortcode">
1113
-
1114
- <p><?php esc_html_e( 'Copy and paste this shortcode into your page or widget area', 'instagram-feed' ); ?>:<br>
1115
- <?php if ( ! empty( $account['username'] ) ) : ?>
1116
- <code>[instagram-feed user="<?php echo esc_html( $account['username'] ); ?>"]</code>
1117
- <?php endif; ?>
1118
- </p>
1119
-
1120
- <p><?php esc_html_e( 'To add multiple users in the same feed, simply separate them using commas', 'instagram-feed' ); ?>:<br>
1121
- <?php if ( ! empty( $account['username'] ) ) : ?>
1122
- <code>[instagram-feed user="<?php echo esc_html( $account['username'] ); ?>, a_second_user, a_third_user"]</code>
1123
- <?php endif; ?>
1124
-
1125
- <p><?php echo wp_kses_post( 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>
1126
- </div>
1127
-
1128
- <div class="sbi_ca_accesstoken">
1129
- <span class="sbi_ca_token_label"><?php esc_html_e( 'User ID', 'instagram-feed' ); ?>:</span><input type="text" class="sbi_ca_user_id" value="<?php echo esc_attr( $account['user_id'] ); ?>" readonly="readonly" onclick="this.focus();this.select()" title="<?php esc_attr_e( 'To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed' ); ?>"><br>
1130
- </div>
1131
-
1132
- </div>
1133
-
1134
- </div>
1135
-
1136
- <?php endforeach; ?>
1137
- <?php endif; ?>
1138
- <a href="JavaScript:void(0);" class="sbi_manually_connect button-secondary"><?php esc_html_e( 'Manually Connect an Account', 'instagram-feed' ); ?></a>
1139
- <div class="sbi_manually_connect_wrap">
1140
- <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 esc_html_e( 'Business or Basic Display', 'instagram-feed' ); ?></span>
1141
- <div class="sbi_manual_account_id_toggle">
1142
- <label><?php esc_html_e( 'Please enter the User ID for this Profile:', 'instagram-feed' ); ?></label>
1143
- <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" />
1144
- </div>
1145
- <p id="sbi_no_js_warning" class="sbi_nojs_notice"><?php echo wp_kses_post( sprintf( __( 'It looks like JavaScript is not working on this page. Some features may not work fully. Visit %1$sthis page%2$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>
1146
- <p class="sbi_submit" style="display: inline-block;"><input type="submit" name="sbi_submit" id="sbi_manual_submit" class="button button-primary" value="<?php esc_html_e( 'Connect This Account', 'instagram-feed' ); ?>"></p>
1147
- </div>
1148
- </td>
1149
- </tr>
1150
-
1151
- <tr class="sbi_feed_type">
1152
- <th scope="row"><label><?php esc_html_e( 'Select a Feed Type', 'instagram-feed' ); ?>:</label><code class="sbi_shortcode"> type
1153
- Eg: type=user user=smashballoon
1154
- </code>
1155
- <?php if ( SB_Instagram_Feed_Locator::count_unique() > 1 ) : ?>
1156
- <div class="sbi_locations_link">
1157
- <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 esc_html_e( 'Feed Finder', 'instagram-feed' ); ?></a>
1158
- </div>
1159
- <?php endif; ?>
1160
-
1161
- </th>
1162
- <td>
1163
- <div class="sbi_row">
1164
- <div class="sbi_col sbi_one">
1165
- <input type="radio" name="sb_instagram_type" id="sb_instagram_type_user" value="user"
1166
- <?php
1167
- if ( $sb_instagram_type === 'user' ) {
1168
- echo 'checked';}
1169
- ?>
1170
- />
1171
- <label class="sbi_radio_label" for="sb_instagram_type_user"><?php esc_html_e( 'User Account:', 'instagram-feed' ); ?></label>
1172
- </div>
1173
- <div class="sbi_col sbi_two">
1174
- <div class="sbi_user_feed_ids_wrap">
1175
- <?php
1176
- foreach ( $user_feed_ids as $feed_id ) :
1177
- if ( $feed_id !== '' ) :
1178
- ?>
1179
- <?php
1180
- if ( ! empty( $connected_accounts ) ) {
1181
- ?>
1182
- <div id="sbi_user_feed_id_<?php echo esc_attr( $feed_id ); ?>" class="sbi_user_feed_account_wrap"><?php } ?>
1183
-
1184
- <?php if ( isset( $connected_accounts[ $feed_id ] ) && ! empty( $connected_accounts[ $feed_id ]['username'] ) ) : ?>
1185
- <strong><?php echo esc_html( $connected_accounts[ $feed_id ]['username'] ); ?></strong> <span>(<?php echo esc_html( $feed_id ); ?>)</span>
1186
- <input name="sb_instagram_user_id[]" id="sb_instagram_user_id" type="hidden" value="<?php echo esc_attr( $feed_id ); ?>" />
1187
- <?php elseif ( isset( $connected_accounts[ $feed_id ] ) && ! empty( $connected_accounts[ $feed_id ]['access_token'] ) ) : ?>
1188
- <strong><?php echo esc_html( $feed_id ); ?></strong>
1189
- <input name="sb_instagram_user_id[]" id="sb_instagram_user_id" type="hidden" value="<?php echo esc_attr( $feed_id ); ?>" />
1190
- <?php endif; ?>
1191
-
1192
- <?php
1193
- if ( ! empty( $connected_accounts ) ) {
1194
- ?>
1195
- </div><?php } ?>
1196
- <?php
1197
- endif;
1198
- endforeach;
1199
- ?>
1200
- </div>
1201
-
1202
- <?php if ( empty( $user_feed_ids ) ) : ?>
1203
- <p class="sbi_no_accounts" style="margin-top: -3px; margin-right: 10px;"><?php esc_html_e( 'Connect a user account above', 'instagram-feed' ); ?></p>
1204
- <?php endif; ?>
1205
-
1206
- <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="margin: 5px 0 10px 0; display: inline-block; height: 19px;"><?php esc_html_e( 'How to display User feeds', 'instagram-feed' ); ?></a>
1207
- <div class="sbi_tooltip"><?php echo wp_kses_post( __( "<p><strong>Displaying Posts from Your User Account</strong><br />Simply connect an account using the button above.</p><p style='padding-top:8px;'><strong>Displaying Posts from Other Instagram Accounts</strong><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;'><strong>Multiple Acounts</strong><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 />
1208
- </div>
1209
-
1210
- </div>
1211
-
1212
- <div class="sbi_pro sbi_row">
1213
- <div class="sbi_col sbi_one">
1214
- <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_hashtag" value="hashtag"
1215
- <?php
1216
- if ( $sb_instagram_type === 'hashtag' ) {
1217
- echo 'checked';}
1218
- ?>
1219
- />
1220
- <label class="sbi_radio_label" for="sb_instagram_type_hashtag"><?php esc_html_e( 'Hashtag:', 'instagram-feed' ); ?></label>
1221
- </div>
1222
- <div class="sbi_col sbi_two">
1223
-
1224
- <p class="sbi_pro_tooltip"><?php esc_html_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>
1225
- <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 esc_html_e( 'Pro', 'instagram-feed' ); ?></a>
1226
-
1227
- <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1228
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
1229
-
1230
- <p class="sbi_tooltip"><?php esc_html_e( 'Display posts from a specific hashtag instead of from a user', 'instagram-feed' ); ?></p>
1231
- </div>
1232
- </div>
1233
-
1234
- <div class="sbi_pro sbi_row">
1235
- <div class="sbi_col sbi_one">
1236
- <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_tagged" value="tagged"
1237
- <?php
1238
- if ( $sb_instagram_type === 'tagged' ) {
1239
- echo 'checked';}
1240
- ?>
1241
- />
1242
- <label class="sbi_radio_label" for="sb_instagram_type_tagged"><?php esc_html_e( 'Tagged:', 'instagram-feed' ); ?></label>
1243
- </div>
1244
- <div class="sbi_col sbi_two">
1245
- <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1246
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
1247
-
1248
- <p class="sbi_tooltip"><?php esc_html_e( 'Display posts that your account has been tagged in.', 'instagram-feed' ); ?></p>
1249
- </div>
1250
- </div>
1251
-
1252
- <div class="sbi_pro sbi_row sbi_mixed_directions">
1253
- <div class="sbi_col sbi_one">
1254
- <input type="radio" name="sb_instagram_type" disabled />
1255
- <label class="sbi_radio_label" for="sb_instagram_type_mixed">Mixed:</label>
1256
- </div>
1257
- <div class="sbi_col sbi_two">
1258
- <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" disabled />
1259
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
1260
-
1261
- <div class="sbi_tooltip sbi_type_tooltip">
1262
- <p>
1263
- <?php echo wp_kses_post( sprintf( __( 'To display multiple feed types in a single feed, use %1$s in your shortcode and then add the user name or hashtag for each feed into the shortcode, like so: %2$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>' ) ); ?>
1264
- </p>
1265
- <p style="padding-top: 8px;"><strong>Note:</strong> To display a hashtag feed, it is required that you first connect an Instagram Business Profile using the <strong>"Connect an Instagram Account"</strong> button above. &nbsp;<a href="https://smashballoon.com/instagram-business-profiles/" target="_blank">Why is this required?</a>
1266
- </p>
1267
- </div>
1268
- </div>
1269
-
1270
- </div>
1271
-
1272
- <div class="sbi_row sbi_pro">
1273
- <br>
1274
- <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 esc_html_e( 'Combine multiple feed types into a single feed', 'instagram-feed' ); ?></a>
1275
- <p class="sbi_tooltip">
1276
- <strong><?php echo wp_kses_post( __( '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' ) ); ?>.</strong><br />
1277
- <?php echo wp_kses_post( sprintf( __( 'To display multiple feed types in a single feed, use %1$s in your shortcode and then add each user name or hashtag of each feed into the shortcode, like so: %2$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>' ) ); ?>
1278
- </p>
1279
- </div>
1280
-
1281
- </td>
1282
- </tr>
1283
-
1284
- <tr>
1285
- <th scope="row" class="bump-left"><label for="sb_instagram_preserve_settings" class="bump-left"><?php esc_html_e( 'Preserve settings when plugin is removed', 'instagram-feed' ); ?></label></th>
1286
- <td>
1287
- <input name="sb_instagram_preserve_settings" type="checkbox" id="sb_instagram_preserve_settings"
1288
- <?php
1289
- if ( $sb_instagram_preserve_settings ) {
1290
- echo 'checked';}
1291
- ?>
1292
- />
1293
- <label for="sb_instagram_preserve_settings"><?php esc_html_e( 'Yes', 'instagram-feed' ); ?></label>
1294
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
1295
- <p class="sbi_tooltip"><?php esc_html_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>
1296
- </td>
1297
- </tr>
1298
-
1299
-
1300
- <tr class="sbi_cron_cache_opts">
1301
- <th scope="row"><?php esc_html_e( 'Check for new posts', 'instagram-feed' ); ?></th>
1302
- <td>
1303
- <div class="sbi_row">
1304
- <input type="radio" name="sbi_caching_type" id="sbi_caching_type_cron" value="background"
1305
- <?php
1306
- if ( $sbi_caching_type === 'background' ) {
1307
- echo 'checked';}
1308
- ?>
1309
- >
1310
- <label for="sbi_caching_type_cron"><?php esc_html_e( 'In the background', 'instagram-feed' ); ?></label>
1311
- <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>
1312
- <p class="sbi_tooltip sbi-more-info"><?php esc_html_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>
1313
- <?php echo wp_kses_post( __( '<strong>1. In the background</strong><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. <strong>Please note</strong> 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' ) ); ?>
1314
- <br><br>
1315
- <?php echo wp_kses_post( __( '<strong>2. When the page loads</strong><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. <strong>Tip:</strong> If you\'re experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <strong>\'Force cache to clear on interval\'</strong> which is located on the \'Customize\' tab.', 'instagram-feed' ) ) . '</p>'; ?>
1316
-
1317
- </div>
1318
- <div class="sbi_row sbi-caching-cron-options" style="display: block;">
1319
-
1320
- <select name="sbi_cache_cron_interval" id="sbi_cache_cron_interval">
1321
- <option value="30mins"
1322
- <?php
1323
- if ( $sbi_cache_cron_interval === '30mins' ) {
1324
- echo 'selected';}
1325
- ?>
1326
- ><?php esc_html_e( 'Every 30 minutes', 'instagram-feed' ); ?></option>
1327
- <option value="1hour"
1328
- <?php
1329
- if ( $sbi_cache_cron_interval === '1hour' ) {
1330
- echo 'selected';}
1331
- ?>
1332
- ><?php esc_html_e( 'Every hour', 'instagram-feed' ); ?></option>
1333
- <option value="12hours"
1334
- <?php
1335
- if ( $sbi_cache_cron_interval === '12hours' ) {
1336
- echo 'selected';}
1337
- ?>
1338
- ><?php esc_html_e( 'Every 12 hours', 'instagram-feed' ); ?></option>
1339
- <option value="24hours"
1340
- <?php
1341
- if ( $sbi_cache_cron_interval === '24hours' ) {
1342
- echo 'selected';}
1343
- ?>
1344
- ><?php esc_html_e( 'Every 24 hours', 'instagram-feed' ); ?></option>
1345
- </select>
1346
-
1347
- <div id="sbi-caching-time-settings" style="display: none;">
1348
- <?php esc_html_e( 'at' ); ?>
1349
-
1350
- <select name="sbi_cache_cron_time" style="width: 80px">
1351
- <option value="1"
1352
- <?php
1353
- if ( $sbi_cache_cron_time === '1' ) {
1354
- echo 'selected';}
1355
- ?>
1356
- >1:00</option>
1357
- <option value="2"
1358
- <?php
1359
- if ( $sbi_cache_cron_time === '2' ) {
1360
- echo 'selected';}
1361
- ?>
1362
- >2:00</option>
1363
- <option value="3"
1364
- <?php
1365
- if ( $sbi_cache_cron_time === '3' ) {
1366
- echo 'selected';}
1367
- ?>
1368
- >3:00</option>
1369
- <option value="4"
1370
- <?php
1371
- if ( $sbi_cache_cron_time === '4' ) {
1372
- echo 'selected';}
1373
- ?>
1374
- >4:00</option>
1375
- <option value="5"
1376
- <?php
1377
- if ( $sbi_cache_cron_time === '5' ) {
1378
- echo 'selected';}
1379
- ?>
1380
- >5:00</option>
1381
- <option value="6"
1382
- <?php
1383
- if ( $sbi_cache_cron_time === '6' ) {
1384
- echo 'selected';}
1385
- ?>
1386
- >6:00</option>
1387
- <option value="7"
1388
- <?php
1389
- if ( $sbi_cache_cron_time === '7' ) {
1390
- echo 'selected';}
1391
- ?>
1392
- >7:00</option>
1393
- <option value="8"
1394
- <?php
1395
- if ( $sbi_cache_cron_time === '8' ) {
1396
- echo 'selected';}
1397
- ?>
1398
- >8:00</option>
1399
- <option value="9"
1400
- <?php
1401
- if ( $sbi_cache_cron_time === '9' ) {
1402
- echo 'selected';}
1403
- ?>
1404
- >9:00</option>
1405
- <option value="10"
1406
- <?php
1407
- if ( $sbi_cache_cron_time === '10' ) {
1408
- echo 'selected';}
1409
- ?>
1410
- >10:00</option>
1411
- <option value="11"
1412
- <?php
1413
- if ( $sbi_cache_cron_time === '11' ) {
1414
- echo 'selected';}
1415
- ?>
1416
- >11:00</option>
1417
- <option value="0"
1418
- <?php
1419
- if ( $sbi_cache_cron_time === '0' ) {
1420
- echo 'selected';}
1421
- ?>
1422
- >12:00</option>
1423
- </select>
1424
-
1425
- <select name="sbi_cache_cron_am_pm" style="width: 50px">
1426
- <option value="am"
1427
- <?php
1428
- if ( $sbi_cache_cron_am_pm === 'am' ) {
1429
- echo 'selected';}
1430
- ?>
1431
- >AM</option>
1432
- <option value="pm"
1433
- <?php
1434
- if ( $sbi_cache_cron_am_pm === 'pm' ) {
1435
- echo 'selected';}
1436
- ?>
1437
- >PM</option>
1438
- </select>
1439
- </div>
1440
-
1441
- <?php
1442
- if ( wp_next_scheduled( 'sbi_feed_update' ) ) {
1443
- $time_format = get_option( 'time_format' );
1444
- if ( ! $time_format ) {
1445
- $time_format = 'g:i a';
1446
- }
1447
- //
1448
- $schedule = wp_get_schedule( 'sbi_feed_update' );
1449
- if ( $schedule === '30mins' ) {
1450
- $schedule = __( 'every 30 minutes', 'instagram-feed' );
1451
- }
1452
- if ( $schedule === 'twicedaily' ) {
1453
- $schedule = __( 'every 12 hours', 'instagram-feed' );
1454
- }
1455
- $sbi_next_cron_event = wp_next_scheduled( 'sbi_feed_update' );
1456
- echo '<p class="sbi-caching-sched-notice"><span><strong>' . esc_html__( 'Next check', 'instagram-feed' ) . ': ' . esc_html( date( $time_format, $sbi_next_cron_event + sbi_get_utc_offset() ) ) . ' (' . esc_html( $schedule ) . ')</strong> - ' . esc_html__( 'Note: Saving the settings on this page will clear the cache and reset this schedule', 'instagram-feed' ) . '</span></p>';
1457
- } else {
1458
- echo '<p style="font-size: 11px; color: #666;">' . esc_html__( 'Nothing currently scheduled', 'instagram-feed' ) . '</p>';
1459
- }
1460
- ?>
1461
-
1462
- </div>
1463
- <div class="sbi_row">
1464
- <input type="radio" name="sbi_caching_type" id="sbi_caching_type_page" value="page"
1465
- <?php
1466
- if ( $sbi_caching_type === 'page' ) {
1467
- echo 'checked';}
1468
- ?>
1469
- >
1470
- <label for="sbi_caching_type_page"><?php esc_html_e( 'When the page loads', 'instagram-feed' ); ?></label>
1471
- </div>
1472
- <div class="sbi_row sbi-caching-page-options" style="display: none;">
1473
- <?php esc_html_e( 'Every', 'instagram-feed' ); ?>:
1474
- <?php
1475
- if ( $sb_instagram_cache_time_unit === 'minutes' ) {
1476
- $max = 1440;
1477
- } else {
1478
- $max = 24;
1479
- }
1480
- ?>
1481
- <input name="sb_instagram_cache_time" type="number" value="<?php echo esc_attr( $sb_instagram_cache_time ); ?>" size="4" min="1" max="<?php echo esc_attr( $max ); ?>"/>
1482
- <select name="sb_instagram_cache_time_unit">
1483
- <option value="minutes"
1484
- <?php
1485
- if ( $sb_instagram_cache_time_unit === 'minutes' ) {
1486
- echo 'selected="selected"';}
1487
- ?>
1488
- ><?php esc_html_e( 'Minutes', 'instagram-feed' ); ?></option>
1489
- <option value="hours"
1490
- <?php
1491
- if ( $sb_instagram_cache_time_unit === 'hours' ) {
1492
- echo 'selected="selected"';}
1493
- ?>
1494
- ><?php esc_html_e( 'Hours', 'instagram-feed' ); ?></option>
1495
- </select>
1496
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
1497
- <p class="sbi_tooltip"><?php esc_html_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. The maximum caching time is 24 hours.', 'instagram-feed' ); ?></p>
1498
- </div>
1499
-
1500
- </td>
1501
- </tr>
1502
-
1503
- </tbody>
1504
- </table>
1505
-
1506
- <?php submit_button(); ?>
1507
- </form>
1508
-
1509
- <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php echo wp_kses_post( __( 'Next Step: <a href="?page=sb-instagram-feed&tab=customize">Customize your Feed</a>', 'instagram-feed' ) ); ?></p>
1510
-
1511
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php echo wp_kses_post( __( '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>
1512
-
1513
-
1514
- <?php } // End Configure tab ?>
1515
-
1516
- <?php
1517
- if ( $sbi_active_tab === 'allfeeds' ) {
1518
- $locator_summary = SB_Instagram_Feed_Locator::summary();
1519
- include_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/admin/templates/locator-summary.php';
1520
- }
1521
- ?>
1522
-
1523
-
1524
- <?php if ( $sbi_active_tab === 'customize' ) { //Start Configure tab ?>
1525
-
1526
- <p class="sb_instagram_contents_links" id="general">
1527
- <span><?php esc_html_e( 'Quick links:', 'instagram-feed' ); ?> </span>
1528
- <a href="#general"><?php esc_html_e( 'General', 'instagram-feed' ); ?></a>
1529
- <a href="#layout"><?php esc_html_e( 'Layout', 'instagram-feed' ); ?></a>
1530
- <a href="#photos"><?php esc_html_e( 'Photos', 'instagram-feed' ); ?></a>
1531
- <a href="#headeroptions"><?php esc_html_e( 'Header', 'instagram-feed' ); ?></a>
1532
- <a href="#loadmore"><?php esc_html_e( "'Load More' Button", 'instagram-feed' ); ?></a>
1533
- <a href="#follow"><?php esc_html_e( "'Follow' Button", 'instagram-feed' ); ?></a>
1534
- <a href="#gdpr"><?php esc_html_e( 'GDPR', 'instagram-feed' ); ?></a>
1535
- <a href="#customcss"><?php esc_html_e( 'Custom CSS', 'instagram-feed' ); ?></a>
1536
- <a href="#customjs"><?php esc_html_e( 'Custom JavaScript', 'instagram-feed' ); ?></a>
1537
- </p>
1538
-
1539
- <input type="hidden" name="sb_instagram_customize_hidden_field" value="Y">
1540
-
1541
- <h3 id="sbi_general_heading"><?php esc_html_e( 'General', 'instagram-feed' ); ?></h3>
1542
-
1543
- <table class="form-table" aria-describedby="sbi_general_heading">
1544
- <tbody>
1545
- <tr>
1546
- <th scope="row"><label><?php esc_html_e( 'Width of Feed', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> width widthunit
1547
- Eg: width=50 widthunit=%</code></th>
1548
- <td>
1549
- <input name="sb_instagram_width" type="text" value="<?php echo esc_attr( $sb_instagram_width ); ?>" id="sb_instagram_width" size="4" maxlength="4" />
1550
- <select name="sb_instagram_width_unit" id="sb_instagram_width_unit">
1551
- <option value="px"
1552
- <?php
1553
- if ( $sb_instagram_width_unit === 'px' ) {
1554
- echo 'selected="selected"';}
1555
- ?>
1556
- ><?php esc_html_e( 'px', 'instagram-feed' ); ?></option>
1557
- <option value="%"
1558
- <?php
1559
- if ( $sb_instagram_width_unit === '%' ) {
1560
- echo 'selected="selected"';}
1561
- ?>
1562
- ><?php esc_html_e( '%', 'instagram-feed' ); ?></option>
1563
- </select>
1564
- <div id="sb_instagram_width_options">
1565
- <input name="sb_instagram_feed_width_resp" type="checkbox" id="sb_instagram_feed_width_resp"
1566
- <?php
1567
- if ( $sb_instagram_feed_width_resp ) {
1568
- echo 'checked';}
1569
- ?>
1570
- /><label for="sb_instagram_feed_width_resp"><?php esc_html_e( 'Set to be 100% width on mobile?', 'instagram-feed' ); ?></label>
1571
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
1572
- <p class="sbi_tooltip"><?php esc_html_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>
1573
- </div>
1574
- </td>
1575
- </tr>
1576
- <tr>
1577
- <th scope="row"><label><?php esc_html_e( 'Height of Feed', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> height heightunit
1578
- Eg: height=500 heightunit=px</code></th>
1579
- <td>
1580
- <input name="sb_instagram_height" type="text" value="<?php echo esc_attr( $sb_instagram_height ); ?>" size="4" maxlength="4" />
1581
- <select name="sb_instagram_height_unit">
1582
- <option value="px"
1583
- <?php
1584
- if ( $sb_instagram_height_unit === 'px' ) {
1585
- echo 'selected="selected"';}
1586
- ?>
1587
- ><?php esc_html_e( 'px', 'instagram-feed' ); ?></option>
1588
- <option value="%"
1589
- <?php
1590
- if ( $sb_instagram_height_unit === '%' ) {
1591
- echo 'selected="selected"';}
1592
- ?>
1593
- ><?php esc_html_e( '%', 'instagram-feed' ); ?></option>
1594
- </select>
1595
- </td>
1596
- </tr>
1597
- <tr>
1598
- <th scope="row"><label><?php esc_html_e( 'Background Color', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> background
1599
- Eg: background=d89531</code></th>
1600
- <td>
1601
- <input name="sb_instagram_background" type="text" value="<?php echo esc_attr( $sb_instagram_background ); ?>" class="sbi_colorpick" />
1602
- </td>
1603
- </tr>
1604
- </tbody>
1605
- </table>
1606
-
1607
- <hr id="layout" />
1608
- <h3 id="sbi_layout_heading"><?php esc_html_e( 'Layout', 'instagram-feed' ); ?></h3>
1609
-
1610
- <table class="form-table" aria-describedby="sbi_layout_heading">
1611
- <tbody>
1612
- <?php
1613
- $selected_type = isset( $sb_instagram_layout_type ) ? $sb_instagram_layout_type : 'grid';
1614
- $layout_types = array(
1615
- 'grid' => __( 'Grid', 'instagram-feed' ),
1616
- 'carousel' => __( 'Carousel', 'instagram-feed' ),
1617
- 'masonry' => __( 'Masonry', 'instagram-feed' ),
1618
- 'highlight' => __( 'Highlight', 'instagram-feed' ),
1619
- );
1620
- $layout_images = array(
1621
- 'grid' => SBI_PLUGIN_URL . 'img/grid.png',
1622
- 'carousel' => SBI_PLUGIN_URL . 'img/carousel.png',
1623
- 'masonry' => SBI_PLUGIN_URL . 'img/masonry.png',
1624
- 'highlight' => SBI_PLUGIN_URL . 'img/highlight.png',
1625
- );
1626
- ?>
1627
- <tr>
1628
- <th scope="row" class="sbi_pro"><label title="<?php esc_html_e( 'Click for shortcode option', 'instagram-feed' ); ?>"><?php esc_html_e( 'Layout Type', 'instagram-feed' ); ?></label><br /><span class="sbi_note" style="margin: 5px 0 0 0; font-weight: normal;"><?php esc_html_e( 'Select a layout to see associated<br />options', 'instagram-feed' ); ?></span></th>
1629
- <td>
1630
- <div class="sbi_layouts">
1631
- <?php foreach ( $layout_types as $layout_type => $label ) : ?>
1632
- <div class="sbi_layout_cell sbi_pro">
1633
- <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 ); ?>"
1634
- <?php
1635
- if ( $selected_type === $layout_type ) {
1636
- echo 'checked';}
1637
- ?>
1638
- /><label for="sb_layout_type_<?php echo esc_attr( $layout_type ); ?>"><span class="sbi_label"><?php echo esc_html( $label ); ?></span><img alt="Layout Type" src="<?php echo esc_url( $layout_images[ $layout_type ] ); ?>" /></label>
1639
- </div>
1640
- <?php endforeach; ?>
1641
-
1642
- <p class="sbi_pro_tooltip"><?php esc_html_e( 'Upgrade to the Pro version to unlock these layouts', 'instagram-feed' ); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
1643
- <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 esc_html_e( 'Pro', 'instagram-feed' ); ?></a>
1644
-
1645
- </div>
1646
- <div class="sb_layout_options_wrap sbi_pro">
1647
- <a href="JavaScript:void(0);" class="sbi_close_options"><i class="fa fa-close"></i></a>
1648
- <div class="sb_instagram_layout_settings sbi_layout_type_grid">
1649
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'A uniform grid of square-cropped images.', 'instagram-feed' ); ?></span>
1650
- </div>
1651
- <div class="sb_instagram_layout_settings sbi_layout_type_masonry">
1652
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'Images in their original aspect ratios with no vertical space between posts.', 'instagram-feed' ); ?></span>
1653
- </div>
1654
- <div class="sb_instagram_layout_settings sbi_layout_type_carousel">
1655
- <div class="sb_instagram_layout_setting">
1656
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'Posts are displayed in a slideshow carousel.', 'instagram-feed' ); ?></span>
1657
- </div>
1658
- <div class="sb_instagram_layout_setting">
1659
-
1660
- <label><?php esc_html_e( 'Number of Rows', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> carouselrows
1661
- Eg: carouselrows=2</code>
1662
- <br>
1663
- <span class="sbi_note" style="margin: -5px 0 -10px 0; display: block;"><?php esc_html_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>
1664
- <br>
1665
- <select name="sb_instagram_carousel_rows" id="sb_instagram_carousel_rows">
1666
- <option value="1">1</option>
1667
- <option value="2" selected="selected">2</option>
1668
- </select>
1669
- </div>
1670
- <div class="sb_instagram_layout_setting">
1671
- <label><?php esc_html_e( 'Loop Type', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> carouselloop
1672
- Eg: carouselloop=rewind
1673
- carouselloop=infinity</code>
1674
- <br>
1675
- <select name="sb_instagram_carousel_loop" id="sb_instagram_carousel_loop">
1676
- <option value="rewind"><?php esc_html_e( 'Rewind', 'instagram-feed' ); ?></option>
1677
- <option value="infinity" selected="selected"><?php esc_html_e( 'Infinity', 'instagram-feed' ); ?></option>
1678
- </select>
1679
- </div>
1680
- <div class="sb_instagram_layout_setting">
1681
- <input type="checkbox" name="sb_instagram_carousel_arrows" id="sb_instagram_carousel_arrows" checked="checked">
1682
- <label><?php esc_html_e( 'Show Navigation Arrows', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> carouselarrows
1683
- Eg: carouselarrows=true</code>
1684
- </div>
1685
- <div class="sb_instagram_layout_setting">
1686
- <input type="checkbox" name="sb_instagram_carousel_pag" id="sb_instagram_carousel_pag">
1687
- <label><?php esc_html_e( 'Show Pagination', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> carouselpag
1688
- Eg: carouselpag=true</code>
1689
- </div>
1690
- <div class="sb_instagram_layout_setting">
1691
- <input type="checkbox" name="sb_instagram_carousel_autoplay" id="sb_instagram_carousel_autoplay">
1692
- <label><?php esc_html_e( 'Enable Autoplay', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> carouselautoplay
1693
- Eg: carouselautoplay=true</code>
1694
- </div>
1695
- <div class="sb_instagram_layout_setting">
1696
- <label><?php esc_html_e( 'Interval Time', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> carouseltime
1697
- Eg: carouseltime=8000</code>
1698
- <br>
1699
- <input name="sb_instagram_carousel_interval" type="text" value="5000" size="6"><?php esc_html_e( 'miliseconds', 'instagram-feed' ); ?>
1700
- </div>
1701
- </div>
1702
-
1703
- <div class="sb_instagram_layout_settings sbi_layout_type_highlight">
1704
- <div class="sb_instagram_layout_setting">
1705
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'Masonry style, square-cropped, image only (no captions or likes/comments below image). "Highlighted" posts are twice as large.', 'instagram-feed' ); ?></span>
1706
- </div>
1707
- <div class="sb_instagram_layout_setting">
1708
- <label title="Click for shortcode option"><?php esc_html_e( 'Highlighting Type', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> highlighttype
1709
- Eg: highlighttype=pattern</code>
1710
- <br>
1711
- <select name="sb_instagram_highlight_type" id="sb_instagram_highlight_type">
1712
- <option value="pattern" selected="selected"><?php esc_html_e( 'Pattern', 'instagram-feed' ); ?></option>
1713
- <option value="id"><?php esc_html_e( 'Post ID', 'instagram-feed' ); ?></option>
1714
- <option value="hashtag"><?php esc_html_e( 'Hashtag', 'instagram-feed' ); ?></option>
1715
- </select>
1716
- </div>
1717
- <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1718
- <label></label><code class="sbi_shortcode"> highlightoffset
1719
- Eg: highlightoffset=2</code>
1720
- <br>
1721
- <input name="sb_instagram_highlight_offset" type="number" min="0" value="0" style="width: 50px;">
1722
- </div>
1723
- <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
1724
- <label><?php esc_html_e( 'Pattern', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> highlightpattern
1725
- Eg: highlightpattern=3</code>
1726
- <br>
1727
- <span><?php esc_html_e( 'Highlight every', 'instagram-feed' ); ?></span><input name="sb_instagram_highlight_factor" type="number" min="2" value="6" style="width: 50px;"><span><?php esc_html_e( 'posts', 'instagram-feed' ); ?></span>
1728
- </div>
1729
- <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_hashtag sb_instagram_layout_setting" style="display: none;">
1730
- <label><?php esc_html_e( 'Highlight Posts with these Hashtags', 'instagram-feed' ); ?></label>
1731
- <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 esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
1732
- <br>
1733
- <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'Separate multiple hashtags using commas', 'instagram-feed' ); ?></span>
1734
-
1735
-
1736
- <p class="sbi_tooltip"><?php esc_html_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>
1737
- </div>
1738
- <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_ids sb_instagram_layout_setting" style="display: none;">
1739
- <label><?php esc_html_e( 'Highlight Posts by ID', 'instagram-feed' ); ?></label>
1740
- <textarea name="sb_instagram_highlight_ids" id="sb_instagram_highlight_ids" style="width: 100%;" rows="3">sbi_1852317219231323590_3269008872</textarea>
1741
- <br>
1742
- <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'Separate IDs using commas', 'instagram-feed' ); ?></span>
1743
-
1744
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
1745
- <p class="sbi_tooltip"><?php esc_html_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>
1746
- </div>
1747
- </div>
1748
-
1749
- </div>
1750
- </td>
1751
- </tr>
1752
- <tr>
1753
- <th scope="row"><label><?php esc_html_e( 'Number of Photos', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> num
1754
- Eg: num=6</code></th>
1755
- <td>
1756
- <input name="sb_instagram_num" type="text" value="<?php echo esc_attr( $sb_instagram_num ); ?>" size="4" maxlength="4" />
1757
- <span class="sbi_note"><?php esc_html_e( 'Number of photos to show initially.', 'instagram-feed' ); ?></span>
1758
- </td>
1759
- </tr>
1760
- <tr>
1761
- <th scope="row"><label><?php esc_html_e( 'Number of Columns', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> cols
1762
- Eg: cols=3</code></th>
1763
- <td>
1764
- <select name="sb_instagram_cols">
1765
- <option value="1"
1766
- <?php
1767
- if ( $sb_instagram_cols === '1' ) {
1768
- echo 'selected="selected"';}
1769
- ?>
1770
- ><?php esc_html_e( '1', 'instagram-feed' ); ?></option>
1771
- <option value="2"
1772
- <?php
1773
- if ( $sb_instagram_cols === '2' ) {
1774
- echo 'selected="selected"';}
1775
- ?>
1776
- ><?php esc_html_e( '2', 'instagram-feed' ); ?></option>
1777
- <option value="3"
1778
- <?php
1779
- if ( $sb_instagram_cols === '3' ) {
1780
- echo 'selected="selected"';}
1781
- ?>
1782
- ><?php esc_html_e( '3', 'instagram-feed' ); ?></option>
1783
- <option value="4"
1784
- <?php
1785
- if ( $sb_instagram_cols === '4' ) {
1786
- echo 'selected="selected"';}
1787
- ?>
1788
- ><?php esc_html_e( '4', 'instagram-feed' ); ?></option>
1789
- <option value="5"
1790
- <?php
1791
- if ( $sb_instagram_cols === '5' ) {
1792
- echo 'selected="selected"';}
1793
- ?>
1794
- ><?php esc_html_e( '5', 'instagram-feed' ); ?></option>
1795
- <option value="6"
1796
- <?php
1797
- if ( $sb_instagram_cols === '6' ) {
1798
- echo 'selected="selected"';}
1799
- ?>
1800
- ><?php esc_html_e( '6', 'instagram-feed' ); ?></option>
1801
- <option value="7"
1802
- <?php
1803
- if ( $sb_instagram_cols === '7' ) {
1804
- echo 'selected="selected"';}
1805
- ?>
1806
- ><?php esc_html_e( '7', 'instagram-feed' ); ?></option>
1807
- <option value="8"
1808
- <?php
1809
- if ( $sb_instagram_cols === '8' ) {
1810
- echo 'selected="selected"';}
1811
- ?>
1812
- ><?php esc_html_e( '8', 'instagram-feed' ); ?></option>
1813
- <option value="9"
1814
- <?php
1815
- if ( $sb_instagram_cols === '9' ) {
1816
- echo 'selected="selected"';}
1817
- ?>
1818
- ><?php esc_html_e( '9', 'instagram-feed' ); ?></option>
1819
- <option value="10"
1820
- <?php
1821
- if ( $sb_instagram_cols === '10' ) {
1822
- echo 'selected="selected"';}
1823
- ?>
1824
- ><?php esc_html_e( '10', 'instagram-feed' ); ?></option>
1825
- </select>
1826
- </td>
1827
- </tr>
1828
- <tr>
1829
- <th scope="row"><label><?php esc_html_e( 'Padding around Images', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> imagepadding imagepaddingunit</code></th>
1830
- <td>
1831
- <input name="sb_instagram_image_padding" type="text" value="<?php echo esc_attr( $sb_instagram_image_padding ); ?>" size="4" maxlength="4" />
1832
- <select name="sb_instagram_image_padding_unit">
1833
- <option value="px"
1834
- <?php
1835
- if ( $sb_instagram_image_padding_unit === 'px' ) {
1836
- echo 'selected="selected"';}
1837
- ?>
1838
- ><?php esc_html_e( 'px', 'instagram-feed' ); ?></option>
1839
- <option value="%"
1840
- <?php
1841
- if ( $sb_instagram_image_padding_unit === '%' ) {
1842
- echo 'selected="selected"';}
1843
- ?>
1844
- ><?php esc_html_e( '%', 'instagram-feed' ); ?></option>
1845
- </select>
1846
- </td>
1847
- </tr>
1848
- <tr>
1849
- <th scope="row"><label><?php esc_html_e( 'Disable mobile layout', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> disablemobile
1850
- Eg: disablemobile=true</code></th>
1851
- <td>
1852
- <input type="checkbox" name="sb_instagram_disable_mobile" id="sb_instagram_disable_mobile"
1853
- <?php
1854
- if ( $sb_instagram_disable_mobile ) {
1855
- echo 'checked="checked"';}
1856
- ?>
1857
- />
1858
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
1859
- <p class="sbi_tooltip"><?php esc_html_e( 'By default on mobile devices the layout automatically changes to use fewer columns. Checking this setting disables the mobile layout.', 'instagram-feed' ); ?></p>
1860
- </td>
1861
- </tr>
1862
- </tbody>
1863
- </table>
1864
-
1865
- <?php submit_button(); ?>
1866
-
1867
- <hr id="photos" />
1868
- <h3 id="sbi_photos_heading"><?php esc_html_e( 'Photos', 'instagram-feed' ); ?></h3>
1869
- <table class="form-table" aria-describedby="sbi_photos_heading">
1870
- <tbody>
1871
- <tr>
1872
- <th scope="row"><label><?php esc_html_e( 'Sort Photos By', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> sortby
1873
- Eg: sortby=random</code></th>
1874
- <td>
1875
- <select name="sb_instagram_sort">
1876
- <option value="none"
1877
- <?php
1878
- if ( $sb_instagram_sort === 'none' ) {
1879
- echo 'selected="selected"';}
1880
- ?>
1881
- ><?php esc_html_e( 'Newest to oldest', 'instagram-feed' ); ?></option>
1882
- <option value="random"
1883
- <?php
1884
- if ( $sb_instagram_sort === 'random' ) {
1885
- echo 'selected="selected"';}
1886
- ?>
1887
- ><?php esc_html_e( 'Random', 'instagram-feed' ); ?></option>
1888
- </select>
1889
- </td>
1890
- </tr>
1891
- <tr>
1892
- <th scope="row"><label><?php esc_html_e( 'Image Resolution', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> imageres
1893
- Eg: imageres=thumb</code></th>
1894
- <td>
1895
-
1896
- <select name="sb_instagram_image_res">
1897
- <option value="auto"
1898
- <?php
1899
- if ( $sb_instagram_image_res === 'auto' ) {
1900
- echo 'selected="selected"';}
1901
- ?>
1902
- ><?php esc_html_e( 'Auto-detect (recommended)', 'instagram-feed' ); ?></option>
1903
- <option value="thumb"
1904
- <?php
1905
- if ( $sb_instagram_image_res === 'thumb' ) {
1906
- echo 'selected="selected"';}
1907
- ?>
1908
- ><?php esc_html_e( 'Thumbnail (150x150)', 'instagram-feed' ); ?></option>
1909
- <option value="medium"
1910
- <?php
1911
- if ( $sb_instagram_image_res === 'medium' ) {
1912
- echo 'selected="selected"';}
1913
- ?>
1914
- ><?php esc_html_e( 'Medium (320x320)', 'instagram-feed' ); ?></option>
1915
- <option value="full"
1916
- <?php
1917
- if ( $sb_instagram_image_res === 'full' ) {
1918
- echo 'selected="selected"';}
1919
- ?>
1920
- ><?php esc_html_e( 'Full size (640x640)', 'instagram-feed' ); ?></option>
1921
- </select>
1922
-
1923
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does Auto-detect mean?', 'instagram-feed' ); ?></a>
1924
- <p class="sbi_tooltip"><?php esc_html_e( 'Auto-detect means that the plugin automatically sets the image resolution based on the size of your feed.', 'instagram-feed' ); ?></p>
1925
-
1926
- </td>
1927
- </tr>
1928
- </tbody>
1929
- </table>
1930
-
1931
- <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a></span>
1932
-
1933
- <div class="sbi-pro-options">
1934
- <p class="sbi-upgrade-link">
1935
- <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 esc_html_e( 'Upgrade to Pro to enable these settings', 'instagram-feed' ); ?></a>
1936
- </p>
1937
- <table class="form-table" aria-describedby="sbi-mediatype-desc">
1938
- <tbody>
1939
- <tr class="sbi_pro">
1940
- <th scope="row"><label id="sbi-mediatype-desc"><?php esc_html_e( 'Media Type to Display', 'instagram-feed' ); ?></label></th>
1941
- <td>
1942
- <select name="sb_instagram_media_type" disabled>
1943
- <option value="all"><?php esc_html_e( 'All', 'instagram-feed' ); ?></option>
1944
- <option value="photos"><?php esc_html_e( 'Photos only', 'instagram-feed' ); ?></option>
1945
- <option value="videos"><?php esc_html_e( 'Videos only', 'instagram-feed' ); ?></option>
1946
- </select>
1947
- </td>
1948
- </tr>
1949
-
1950
- <tr class="sbi_pro">
1951
- <th scope="row"><label><?php esc_html_e( 'Enable Pop-up Lightbox', 'instagram-feed' ); ?></label></th>
1952
- <td>
1953
- <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1954
- </td>
1955
- </tr>
1956
-
1957
- <tr class="sbi_pro">
1958
- <th scope="row"><label><?php esc_html_e( 'Link Posts to URL in Caption (Shoppable feed)', 'instagram-feed' ); ?></label></th>
1959
- <td>
1960
- <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
1961
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What will this do?', 'instagram-feed' ); ?></a>
1962
- <p class="sbi_tooltip"><?php echo wp_kses_post( __( "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>
1963
- </td>
1964
- </tr>
1965
- </tbody>
1966
- </table>
1967
- </div>
1968
-
1969
-
1970
- <hr />
1971
- <h3 id="sbi-hoverstyle-desc"><?php esc_html_e( 'Photo Hover Style', 'instagram-feed' ); ?></h3>
1972
-
1973
- <p style="padding-bottom: 18px;">
1974
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=photohover" target="_blank"><?php esc_html_e( 'Upgrade to Pro to enable Photo Hover styles', 'instagram-feed' ); ?></a><br />
1975
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a>
1976
- </p>
1977
-
1978
- <div class="sbi-pro-options" style="margin-top: -15px;">
1979
- <table class="form-table" aria-describedby="sbi-hoverstyle-desc">
1980
- <tbody>
1981
- <tr class="sbi_pro">
1982
- <th scope="row"><label><?php esc_html_e( 'Hover Background Color', 'instagram-feed' ); ?></label></th>
1983
- <td>
1984
- <input name="sb_hover_background" type="text" disabled class="sbi_colorpick" />
1985
- </td>
1986
- </tr>
1987
- <tr class="sbi_pro">
1988
- <th scope="row"><label><?php esc_html_e( 'Hover Text Color', 'instagram-feed' ); ?></label></th>
1989
- <td>
1990
- <input name="sb_hover_text" type="text" disabled class="sbi_colorpick" />
1991
- </td>
1992
- </tr>
1993
- <tr class="sbi_pro">
1994
- <th scope="row"><label><?php esc_html_e( 'Information to display', 'instagram-feed' ); ?></label></th>
1995
- <td>
1996
- <div>
1997
- <input name="sbi_hover_inc_username" type="checkbox" disabled />
1998
- <label for="sbi_hover_inc_username"><?php esc_html_e( 'Username', 'instagram-feed' ); ?></label>
1999
- </div>
2000
- <div>
2001
- <input name="sbi_hover_inc_icon" type="checkbox" disabled />
2002
- <label for="sbi_hover_inc_icon"><?php esc_html_e( 'Expand Icon', 'instagram-feed' ); ?></label>
2003
- </div>
2004
- <div>
2005
- <input name="sbi_hover_inc_date" type="checkbox" disabled />
2006
- <label for="sbi_hover_inc_date"><?php esc_html_e( 'Date', 'instagram-feed' ); ?></label>
2007
- </div>
2008
- <div>
2009
- <input name="sbi_hover_inc_instagram" type="checkbox" disabled />
2010
- <label for="sbi_hover_inc_instagram"><?php esc_html_e( 'Instagram Icon/Link', 'instagram-feed' ); ?></label>
2011
- </div>
2012
- <div>
2013
- <input name="sbi_hover_inc_location" type="checkbox" disabled />
2014
- <label for="sbi_hover_inc_location"><?php esc_html_e( 'Location', 'instagram-feed' ); ?></label>
2015
- </div>
2016
- <div>
2017
- <input name="sbi_hover_inc_caption" type="checkbox" disabled />
2018
- <label for="sbi_hover_inc_caption"><?php esc_html_e( 'Caption', 'instagram-feed' ); ?></label>
2019
- </div>
2020
- <div>
2021
- <input name="sbi_hover_inc_likes" type="checkbox" disabled />
2022
- <label for="sbi_hover_inc_likes"><?php esc_html_e( 'Like/Comment Icons', 'instagram-feed' ); ?></label>
2023
- </div>
2024
- </td>
2025
- </tr>
2026
-
2027
- </tbody>
2028
- </table>
2029
- </div>
2030
-
2031
-
2032
- <hr />
2033
- <h3 id="sbi-carousel-desc"><?php esc_html_e( 'Carousel', 'instagram-feed' ); ?></h3>
2034
- <p style="padding-bottom: 18px;">
2035
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=carousel" target="_blank"><?php esc_html_e( 'Upgrade to Pro to enable Carousels', 'instagram-feed' ); ?></a><br />
2036
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a>
2037
- </p>
2038
-
2039
- <div class="sbi-pro-options" style="margin-top: -15px;">
2040
- <table class="form-table" aria-describedby="sbi-carousel-desc">
2041
- <tbody>
2042
- <tr class="sbi_pro">
2043
- <th scope="row"><label><?php esc_html_e( 'Enable Carousel', 'instagram-feed' ); ?></label></th>
2044
- <td>
2045
- <input type="checkbox" disabled />
2046
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
2047
- <p class="sbi_tooltip"><?php esc_html_e( 'Enable this setting to create a carousel slider out of your photos.', 'instagram-feed' ); ?></p>
2048
- </td>
2049
- </tr>
2050
- <tr class="sbi_pro">
2051
- <th scope="row"><label><?php esc_html_e( 'Show Navigation Arrows', 'instagram-feed' ); ?></label></th>
2052
- <td>
2053
- <input type="checkbox" disabled />
2054
- </td>
2055
- </tr>
2056
- <tr class="sbi_pro">
2057
- <th scope="row"><label><?php esc_html_e( 'Show Pagination', 'instagram-feed' ); ?></label></th>
2058
- <td>
2059
- <input type="checkbox" disabled />
2060
- </td>
2061
- </tr>
2062
- <tr class="sbi_pro">
2063
- <th scope="row"><label><?php esc_html_e( 'Enable Autoplay', 'instagram-feed' ); ?></label></th>
2064
- <td>
2065
- <input type="checkbox" disabled />
2066
- </td>
2067
- </tr>
2068
- <tr class="sbi_pro">
2069
- <th scope="row"><label><?php esc_html_e( 'Interval Time', 'instagram-feed' ); ?></label></th>
2070
- <td>
2071
- <input name="sb_instagram_carousel_interval" type="text" disabled size="6" /><?php esc_html_e( 'milliseconds', 'instagram-feed' ); ?>
2072
- </td>
2073
- </tr>
2074
- </tbody>
2075
- </table>
2076
- </div>
2077
-
2078
-
2079
-
2080
- <hr id="headeroptions" />
2081
- <h3 id="sbi_header_heading"><?php esc_html_e( 'Header', 'instagram-feed' ); ?></h3>
2082
- <table class="form-table" aria-describedby="sbi_header_heading">
2083
- <tbody>
2084
- <tr>
2085
- <th scope="row"><label><?php esc_html_e( 'Show Feed Header', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> showheader
2086
- Eg: showheader=false</code></th>
2087
- <td>
2088
- <input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header"
2089
- <?php
2090
- if ( $sb_instagram_show_header ) {
2091
- echo 'checked="checked"';}
2092
- ?>
2093
- />
2094
- </td>
2095
- </tr>
2096
- <tr>
2097
- <th scope="row"><label><?php esc_html_e( 'Header Size', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> headersize
2098
- Eg: headersize=medium</code></th>
2099
- <td>
2100
- <select name="sb_instagram_header_size" id="sb_instagram_header_size" style="float: left;">
2101
- <option value="small"
2102
- <?php
2103
- if ( $sb_instagram_header_size === 'small' ) {
2104
- echo 'selected="selected"';}
2105
- ?>
2106
- ><?php esc_html_e( 'Small', 'instagram-feed' ); ?></option>
2107
- <option value="medium"
2108
- <?php
2109
- if ( $sb_instagram_header_size === 'medium' ) {
2110
- echo 'selected="selected"';}
2111
- ?>
2112
- ><?php esc_html_e( 'Medium', 'instagram-feed' ); ?></option>
2113
- <option value="large"
2114
- <?php
2115
- if ( $sb_instagram_header_size === 'large' ) {
2116
- echo 'selected="selected"';}
2117
- ?>
2118
- ><?php esc_html_e( 'Large', 'instagram-feed' ); ?></option>
2119
- </select>
2120
- </td>
2121
- </tr>
2122
- <tr>
2123
- <th scope="row"><label><?php esc_html_e( 'Show Bio Text', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> showbio
2124
- Eg: showbio=false</code></th>
2125
- <td>
2126
- <?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
2127
- <input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio"
2128
- <?php
2129
- if ( $sb_instagram_show_bio ) {
2130
- echo 'checked="checked"';}
2131
- ?>
2132
- />
2133
- <span class="sbi_note"><?php esc_html_e( 'Only applies for Instagram accounts with bios', 'instagram-feed' ); ?></span>
2134
- <div class="sb_instagram_box" style="display: block;">
2135
- <div class="sb_instagram_box_setting" style="display: block;">
2136
- <label style="padding-bottom: 0;"><?php esc_html_e( 'Add Custom Bio Text', 'instagram-feed' ); ?></label><code class="sbi_shortcode" style="margin-top: 5px;"> custombio
2137
- Eg: custombio="My custom bio."</code>
2138
- <br>
2139
- <span class="sbi_aside" style="padding-bottom: 5px; display: block;"><?php esc_html_e( 'Use your own custom bio text in the feed header. Bio text is automatically retrieved from Instagram for Business accounts.', 'instagram-feed' ); ?></span>
2140
-
2141
- <textarea type="text" name="sb_instagram_custom_bio" id="sb_instagram_custom_bio" ><?php echo esc_textarea( wp_unslash( $sb_instagram_custom_bio ) ); ?></textarea>
2142
- &nbsp;<a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php esc_html_e( 'Why is my bio not displaying automatically?', 'instagram-feed' ); ?></a>
2143
- <p class="sbi_tooltip" style="padding: 10px 0 0 0; width: 99%;"><?php echo wp_kses_post( 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>
2144
- </div>
2145
- </div>
2146
-
2147
- </td>
2148
- </tr>
2149
-
2150
- <tr>
2151
- <th scope="row"><label><?php esc_html_e( 'Use Custom Avatar', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> customavatar
2152
- Eg: customavatar="https://my-website.com/avatar.jpg"</code></th>
2153
- <td>
2154
- <input type="text" name="sb_instagram_custom_avatar" class="large-text" id="sb_instagram_custom_avatar" value="<?php echo esc_attr( wp_unslash( $sb_instagram_custom_avatar ) ); ?>" placeholder="https://example.com/avatar.jpg" />
2155
- <span class="sbi_aside"><?php esc_html_e( 'Avatar is automatically retrieved from Instagram for Business accounts', 'instagram-feed' ); ?></span>
2156
- <br>
2157
- <a class="sbi_tooltip_link sbi_tooltip_under" href="JavaScript:void(0);"><?php esc_html_e( 'Why is my avatar not displaying automatically?', 'instagram-feed' ); ?></a>
2158
-
2159
- <p class="sbi_tooltip sbi_tooltip_under_text" style="padding: 10px 0 0 0;"><?php echo wp_kses_post( 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>
2160
-
2161
- </td>
2162
- </tr>
2163
- <tr>
2164
- <th scope="row"><label><?php esc_html_e( 'Header Text Color', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> headercolor
2165
- Eg: headercolor=fff</code></th>
2166
- <td>
2167
- <input name="sb_instagram_header_color" type="text" value="<?php echo esc_attr( $sb_instagram_header_color ); ?>" class="sbi_colorpick" />
2168
- </td>
2169
- </tr>
2170
- </tbody>
2171
- </table>
2172
-
2173
- <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a></span>
2174
-
2175
- <div class="sbi-pro-options">
2176
- <p class="sbi-upgrade-link">
2177
- <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 esc_html_e( 'Upgrade to Pro to enable these settings', 'instagram-feed' ); ?></a>
2178
- </p>
2179
- <table class="form-table sbi-expandable-options" aria-describedby="sbi-headerstylesub-desc">
2180
- <tbody>
2181
-
2182
- <tr>
2183
- <th scope="row" id="sbi-headerstylesub-desc"><label><?php esc_html_e( 'Header Style', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> headerstyle
2184
- Eg: headerstyle=boxed</code></th>
2185
- <td>
2186
- <select name="sb_instagram_header_style" style="float: left;">
2187
- <option value="circle"><?php esc_html_e( 'Standard', 'instagram-feed' ); ?></option>
2188
- <option value="boxed"><?php esc_html_e( 'Boxed', 'instagram-feed' ); ?></option>
2189
- <option value="centered"><?php esc_html_e( 'Centered', 'instagram-feed' ); ?></option>
2190
- </select>
2191
- </td>
2192
- </tr>
2193
- <tr class="sbi_pro">
2194
- <th scope="row"><label><?php esc_html_e( 'Show Number of Followers', 'instagram-feed' ); ?></label></th>
2195
- <td>
2196
- <input type="checkbox" disabled />
2197
- <span class="sbi_note"><?php esc_html_e( 'This only applies when displaying photos from a User ID', 'instagram-feed' ); ?></span>
2198
- </td>
2199
- </tr>
2200
- </tbody>
2201
- </table>
2202
- </div>
2203
-
2204
- <?php submit_button(); ?>
2205
-
2206
-
2207
- <hr />
2208
- <h3 id="sbi_caption_heading"><?php esc_html_e( 'Caption', 'instagram-feed' ); ?></h3>
2209
- <p style="padding-bottom: 18px;">
2210
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=caption" target="_blank"><?php esc_html_e( 'Upgrade to Pro to enable Photo Captions', 'instagram-feed' ); ?></a><br />
2211
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a>
2212
- </p>
2213
-
2214
- <div class="sbi-pro-options" style="margin-top: -15px;">
2215
- <table class="form-table" aria-describedby="sbi_caption_heading">
2216
- <tbody>
2217
- <tr class="sbi_pro">
2218
- <th scope="row"><label><?php esc_html_e( 'Show Caption', 'instagram-feed' ); ?></label></th>
2219
- <td>
2220
- <input type="checkbox" disabled />
2221
- </td>
2222
- </tr>
2223
- <tr class="sbi_pro">
2224
- <th scope="row"><label><?php esc_html_e( 'Maximum Text Length', 'instagram-feed' ); ?></label></th>
2225
- <td>
2226
- <input disabled size="4" />Characters
2227
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
2228
- <p class="sbi_tooltip"><?php esc_html_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>
2229
- </td>
2230
- </tr>
2231
- <tr class="sbi_pro">
2232
- <th scope="row"><label><?php esc_html_e( 'Text Color', 'instagram-feed' ); ?></label></th>
2233
- <td>
2234
- <input type="text" disabled class="sbi_colorpick" />
2235
- </td>
2236
- </tr>
2237
- <tr class="sbi_pro">
2238
- <th scope="row"><label><?php esc_html_e( 'Text Size', 'instagram-feed' ); ?></label></th>
2239
- <td>
2240
- <select name="sb_instagram_caption_size" style="width: 180px;" disabled>
2241
- <option value="inherit" ><?php esc_html_e( 'Inherit from theme', 'instagram-feed' ); ?></option>
2242
- <option value="10" >10px</option>
2243
- <option value="11" >11px</option>
2244
- <option value="12" >12px</option>
2245
- <option value="13" >13px</option>
2246
- <option value="14" >14px</option>
2247
- <option value="16" >16px</option>
2248
- <option value="18" >18px</option>
2249
- <option value="20" >20px</option>
2250
- <option value="24" >24px</option>
2251
- <option value="28" >28px</option>
2252
- <option value="32" >32px</option>
2253
- <option value="36" >36px</option>
2254
- <option value="40" >40px</option>
2255
- </select>
2256
- </td>
2257
- </tr>
2258
- </tbody>
2259
- </table>
2260
- </div>
2261
-
2262
-
2263
- <hr />
2264
- <h3 id="sbi_likescomments_heading"><?php esc_html_e( 'Likes &amp; Comments', 'instagram-feed' ); ?></h3>
2265
- <p style="padding-bottom: 18px;">
2266
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=stats" target="_blank"><?php esc_html_e( 'Upgrade to Pro to enable Likes &amp; Comments', 'instagram-feed' ); ?></a><br />
2267
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a>
2268
- </p>
2269
-
2270
- <div class="sbi-pro-options" style="margin-top: -15px;">
2271
- <table class="form-table" aria-describedby="sbi_likescomments_heading">
2272
- <tbody>
2273
- <tr class="sbi_pro">
2274
- <th scope="row"><label><?php esc_html_e( 'Show Icons', 'instagram-feed' ); ?></label></th>
2275
- <td>
2276
- <input type="checkbox" disabled />
2277
- </td>
2278
- </tr>
2279
- <tr class="sbi_pro">
2280
- <th scope="row"><label><?php esc_html_e( 'Icon Color', 'instagram-feed' ); ?></label></th>
2281
- <td>
2282
- <input type="text" disabled class="sbi_colorpick" />
2283
- </td>
2284
- </tr>
2285
- <tr class="sbi_pro">
2286
- <th scope="row"><label><?php esc_html_e( 'Icon Size', 'instagram-feed' ); ?></label></th>
2287
- <td>
2288
- <select disabled name="sb_instagram_meta_size" style="width: 180px;">
2289
- <option value="inherit"><?php esc_html_e( 'Inherit from theme', 'instagram-feed' ); ?></option>
2290
- <option value="10" >10px</option>
2291
- <option value="11" >11px</option>
2292
- <option value="12" >12px</option>
2293
- <option value="13" >13px</option>
2294
- <option value="14" >14px</option>
2295
- <option value="16" >16px</option>
2296
- <option value="18" >18px</option>
2297
- <option value="20" >20px</option>
2298
- <option value="24" >24px</option>
2299
- <option value="28" >28px</option>
2300
- <option value="32" >32px</option>
2301
- <option value="36" >36px</option>
2302
- <option value="40" >40px</option>
2303
- </select>
2304
- </td>
2305
- </tr>
2306
- </tbody>
2307
- </table>
2308
- </div>
2309
-
2310
-
2311
- <hr />
2312
- <h3 id="sbi-lightboxcomments-heading"><?php esc_html_e( 'Lightbox Comments', 'instagram-feed' ); ?></h3>
2313
-
2314
- <p style="padding-bottom: 18px;">
2315
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=comments" target="_blank"><?php esc_html_e( 'Upgrade to Pro to enable Comments', 'instagram-feed' ); ?></a><br />
2316
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a>
2317
- </p>
2318
-
2319
- <div class="sbi-pro-options" style="margin-top: -15px;">
2320
- <table class="form-table" aria-describedby="sbi-lightboxcomments-heading">
2321
- <tbody>
2322
-
2323
- <tr class="sbi_pro">
2324
- <th scope="row"><label><?php esc_html_e( 'Show Comments in Lightbox', 'instagram-feed' ); ?></label></th>
2325
- <td style="padding: 5px 10px 0 10px;">
2326
- <input type="checkbox" disabled style="margin-right: 15px;" />
2327
- <input class="button-secondary" style="margin-top: -5px;" disabled value="<?php esc_attr_e( 'Clear Comment Cache', 'instagram-feed' ); ?>" />
2328
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
2329
- <p class="sbi_tooltip"><?php esc_html_e( 'This will remove the cached comments saved in the database', 'instagram-feed' ); ?></p>
2330
- </td>
2331
- </tr>
2332
- <tr class="sbi_pro">
2333
- <th scope="row"><label><?php esc_html_e( 'Number of Comments', 'instagram-feed' ); ?></label></th>
2334
- <td>
2335
- <input name="sb_instagram_num_comments" type="text" disabled size="4" />
2336
- <span class="sbi_note"><?php esc_html_e( 'Max number of latest comments.', 'instagram-feed' ); ?></span>
2337
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
2338
- <p class="sbi_tooltip"><?php esc_html_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>
2339
- </td>
2340
- </tr>
2341
-
2342
- </tbody>
2343
- </table>
2344
- </div>
2345
-
2346
-
2347
- <hr id="loadmore" />
2348
- <h3 id="sbi_button_heading"><?php esc_html_e( "'Load More' Button", 'instagram-feed' ); ?></h3>
2349
- <table class="form-table" aria-describedby="sbi_button_heading">
2350
- <tbody>
2351
- <tr>
2352
- <th scope="row"><label><?php esc_html_e( "Show the 'Load More' button", 'instagram-feed' ); ?></label><code class="sbi_shortcode"> showbutton
2353
- Eg: showbutton=false</code></th>
2354
- <td>
2355
- <input type="checkbox" name="sb_instagram_show_btn" id="sb_instagram_show_btn"
2356
- <?php
2357
- if ( $sb_instagram_show_btn ) {
2358
- echo 'checked="checked"';}
2359
- ?>
2360
- />
2361
- </td>
2362
- </tr>
2363
- <tr>
2364
- <th scope="row"><label><?php esc_html_e( 'Button Background Color', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> buttoncolor
2365
- Eg: buttoncolor=8224e3</code></th>
2366
- <td>
2367
- <input name="sb_instagram_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_btn_background ); ?>" class="sbi_colorpick" />
2368
- </td>
2369
- </tr>
2370
- <tr>
2371
- <th scope="row"><label><?php esc_html_e( 'Button Text Color', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> buttontextcolor
2372
- Eg: buttontextcolor=eeee22</code></th>
2373
- <td>
2374
- <input name="sb_instagram_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_btn_text_color ); ?>" class="sbi_colorpick" />
2375
- </td>
2376
- </tr>
2377
- <tr>
2378
- <th scope="row"><label><?php esc_html_e( 'Button Text', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> buttontext
2379
- Eg: buttontext="Show more.."</code></th>
2380
- <td>
2381
- <input name="sb_instagram_btn_text" type="text" value="<?php echo esc_attr( wp_unslash( $sb_instagram_btn_text ) ); ?>" size="20" />
2382
- </td>
2383
- </tr>
2384
- </tbody>
2385
- </table>
2386
-
2387
- <?php submit_button(); ?>
2388
-
2389
- <hr id="follow" />
2390
- <h3 id="sbi_follow_heading"><?php esc_html_e( "'Follow' Button", 'instagram-feed' ); ?></h3>
2391
- <table class="form-table" aria-describedby="sbi_follow_heading">
2392
- <tbody>
2393
- <tr>
2394
- <th scope="row"><label><?php esc_html_e( 'Show the Follow button', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> showfollow
2395
- Eg: showfollow=true</code></th>
2396
- <td>
2397
- <input type="checkbox" name="sb_instagram_show_follow_btn" id="sb_instagram_show_follow_btn"
2398
- <?php
2399
- if ( $sb_instagram_show_follow_btn ) {
2400
- echo 'checked="checked"';}
2401
- ?>
2402
- />
2403
- </td>
2404
- </tr>
2405
-
2406
- <tr>
2407
- <th scope="row"><label><?php esc_html_e( 'Button Background Color', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> followcolor
2408
- Eg: followcolor=28a1bf</code></th>
2409
- <td>
2410
- <input name="sb_instagram_folow_btn_background" type="text" value="<?php echo esc_attr( $sb_instagram_folow_btn_background ); ?>" class="sbi_colorpick" />
2411
- </td>
2412
- </tr>
2413
- <tr>
2414
- <th scope="row"><label><?php esc_html_e( 'Button Text Color', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> followtextcolor
2415
- Eg: followtextcolor=000</code></th>
2416
- <td>
2417
- <input name="sb_instagram_follow_btn_text_color" type="text" value="<?php echo esc_attr( $sb_instagram_follow_btn_text_color ); ?>" class="sbi_colorpick" />
2418
- </td>
2419
- </tr>
2420
- <tr>
2421
- <th scope="row"><label><?php esc_html_e( 'Button Text', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> followtext
2422
- Eg: followtext="Follow me"</code></th>
2423
- <td>
2424
- <input name="sb_instagram_follow_btn_text" type="text" value="<?php echo esc_attr( wp_unslash( $sb_instagram_follow_btn_text ) ); ?>" size="30" />
2425
- </td>
2426
- </tr>
2427
- </tbody>
2428
- </table>
2429
-
2430
- <hr id="filtering" />
2431
- <h3 id="sbi-filter-heading"><?php esc_html_e( 'Post Filtering', 'instagram-feed' ); ?></h3>
2432
-
2433
- <p style="padding-bottom: 18px;">
2434
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=filtering" target="_blank"><?php esc_html_e( 'Upgrade to Pro to enable Post Filtering options', 'instagram-feed' ); ?></a><br />
2435
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a>
2436
- </p>
2437
-
2438
- <div class="sbi-pro-options" style="margin-top: -15px;">
2439
-
2440
- <table class="form-table" aria-describedby="sbi-filter-heading">
2441
- <tbody>
2442
- <tr class="sbi_pro">
2443
- <th scope="row"><label><?php esc_html_e( 'Remove photos containing these words or hashtags', 'instagram-feed' ); ?></label></th>
2444
- <td>
2445
- <div class="sb_instagram_apply_labels">
2446
- <p><?php esc_html_e( 'Apply to:', 'instagram-feed' ); ?></p>
2447
- <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php esc_html_e( 'All feeds', 'instagram-feed' ); ?></label>
2448
- <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php esc_html_e( 'One feed', 'instagram-feed' ); ?></label>
2449
- </div>
2450
-
2451
- <input disabled name="sb_instagram_exclude_words" id="sb_instagram_exclude_words" type="text" style="width: 70%;" value="" />
2452
- <br />
2453
- <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'Separate words/hashtags using commas', 'instagram-feed' ); ?></span>
2454
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
2455
- <p class="sbi_tooltip"><?php esc_html_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>
2456
- </td>
2457
- </tr>
2458
-
2459
- <tr class="sbi_pro">
2460
- <th scope="row"><label><?php esc_html_e( 'Show photos containing these words or hashtags', 'instagram-feed' ); ?></label></th>
2461
- <td>
2462
- <div class="sb_instagram_apply_labels">
2463
- <p><?php esc_html_e( 'Apply to:', 'instagram-feed' ); ?></p>
2464
- <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php esc_html_e( 'All feeds', 'instagram-feed' ); ?></label>
2465
- <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php esc_html_e( 'One feed', 'instagram-feed' ); ?></label>
2466
- </div>
2467
-
2468
- <input disabled name="sb_instagram_include_words" id="sb_instagram_include_words" type="text" style="width: 70%;" value="" />
2469
- <br />
2470
- <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'Separate words/hashtags using commas', 'instagram-feed' ); ?></span>
2471
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
2472
- <p class="sbi_tooltip"><?php esc_html_e( 'You can use this setting to only show photos which contain certain words or hashtags in the caption. For example, adding "sheep, cow, dog" will show any photos which contain either the word sheep, cow, or dog. Separate multiple words or hashtags using commas.', 'instagram-feed' ); ?></p>
2473
- </td>
2474
- </tr>
2475
- </tbody>
2476
- </table>
2477
- </div>
2478
-
2479
-
2480
- <hr id="moderation" />
2481
- <h3 id="sbi-moderation-heading"><?php esc_html_e( 'Moderation', 'instagram-feed' ); ?></h3>
2482
-
2483
- <p style="padding-bottom: 18px;">
2484
- <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=moderation" target="_blank"><?php esc_html_e( 'Upgrade to Pro to enable Moderation options', 'instagram-feed' ); ?></a><br />
2485
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><strong>+</strong> <?php esc_html_e( 'Show Pro Options', 'instagram-feed' ); ?></a>
2486
- </p>
2487
-
2488
- <div class="sbi-pro-options" style="margin-top: -15px;">
2489
- <table class="form-table" aria-describedby="sbi-moderation-heading">
2490
- <tbody>
2491
- <tr class="sbi_pro">
2492
- <th scope="row"><label><?php esc_html_e( 'Moderation Type', 'instagram-feed' ); ?></label></th>
2493
- <td>
2494
- <input class="sb_instagram_moderation_mode" checked="checked" disabled type="radio" value="visual" style="margin-top: 0;" /><label><?php esc_html_e( 'Visual', 'instagram-feed' ); ?></label>
2495
- <input class="sb_instagram_moderation_mode" disabled type="radio" value="manual" style="margin-top: 0; margin-left: 10px;"/><label><?php esc_html_e( 'Manual', 'instagram-feed' ); ?></label>
2496
-
2497
- <p class="sbi_tooltip" style="display: block;"><?php echo wp_kses_post( "<strong>Visual Moderation Mode</strong><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>
2498
-
2499
- </td>
2500
- </tr>
2501
-
2502
- <tr class="sbi_pro">
2503
- <th scope="row"><label><?php esc_html_e( 'Only show posts by these users', 'instagram-feed' ); ?></label></th>
2504
- <td>
2505
- <input type="text" style="width: 70%;" disabled /><br />
2506
- <span class="sbi_note" style="margin-left: 0;"><?php esc_html_e( 'Separate usernames using commas', 'instagram-feed' ); ?></span>
2507
-
2508
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
2509
- <p class="sbi_tooltip"><?php esc_html_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>
2510
- </td>
2511
- </tr>
2512
- <tr class="sbi_pro">
2513
- <th scope="row"><label><?php esc_html_e( 'White lists', 'instagram-feed' ); ?></label></th>
2514
- <td>
2515
- <div class="sbi_white_list_names_wrapper">
2516
- <?php esc_html_e( 'No white lists currently created', 'instagram-feed' ); ?>
2517
- </div>
2518
-
2519
- <input disabled class="button-secondary" type="submit" value="<?php esc_attr_e( 'Clear White Lists', 'instagram-feed' ); ?>" />
2520
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);" style="display: inline-block; margin-top: 5px;"><?php esc_html_e( 'What is this?', 'instagram-feed' ); ?></a>
2521
- <p class="sbi_tooltip"><?php esc_html_e( 'This will remove all of the white lists from the database', 'instagram-feed' ); ?></p>
2522
- </td>
2523
- </tr>
2524
-
2525
- </tbody>
2526
- </table>
2527
- </div>
2528
-
2529
- <hr id="gdpr" />
2530
- <h3 id="sbi-gdpr-heading"><?php esc_html_e( 'GDPR', 'instagram-feed' ); ?></h3>
2531
-
2532
- <table class="form-table" aria-describedby="sbi-gdpr-heading">
2533
- <tbody>
2534
- <tr>
2535
- <th scope="row" class="bump-left"><label class="bump-left"><?php esc_html_e( 'Enable GDPR settings', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> gdpr
2536
- Eg: gdpr=yes</code></th>
2537
- <td>
2538
-
2539
- <?php
2540
- $select_options = array(
2541
- array(
2542
- 'label' => __( 'Automatic', 'instagram-feed' ),
2543
- 'value' => 'auto',
2544
- ),
2545
- array(
2546
- 'label' => __( 'Yes', 'instagram-feed' ),
2547
- 'value' => 'yes',
2548
- ),
2549
- array(
2550
- 'label' => __( 'No', 'instagram-feed' ),
2551
- 'value' => 'no',
2552
- ),
2553
- )
2554
- ?>
2555
- <?php
2556
- $gdpr_list = "<ul class='sbi-list'>
2557
- <li>" . __( 'Only local images (not from Instagram\'s CDN) will be displayed in the feed.', 'instagram-feed' ) . '</li>
2558
- <li>' . __( 'Placeholder blank images will be displayed until images are available.', 'instagram-feed' ) . '</li>
2559
- </ul>';
2560
- ?>
2561
- <div>
2562
- <select name="gdpr" id="sbi_gdpr_setting">
2563
- <?php
2564
- foreach ( $select_options as $select_option ) :
2565
- $selected = $select_option['value'] === $gdpr ? ' selected' : '';
2566
- ?>
2567
- <option value="<?php echo esc_attr( $select_option['value'] ); ?>"<?php echo esc_attr( $selected ); ?> ><?php echo esc_html( $select_option['label'] ); ?></option>
2568
- <?php endforeach; ?>
2569
- </select>
2570
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2571
- <div class="sbi_tooltip gdpr_tooltip">
2572
-
2573
- <p><span><?php esc_html_e( 'Yes', 'instagram-feed' ); ?>:</span> <?php esc_html_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 esc_html_e( 'What will be limited?', 'instagram-feed' ); ?></a></p>
2574
-
2575
- <?php echo "<div class='sbi_gdpr_list'>" . wp_kses_post( $gdpr_list ) . '</div>'; ?>
2576
-
2577
-
2578
- <p><span><?php esc_html_e( 'No', 'instagram-feed' ); ?>:</span> <?php esc_html_e( 'The plugin will still make some requests to load and display images and videos directly from Instagram.', 'instagram-feed' ); ?></p>
2579
-
2580
-
2581
- <p><span><?php esc_html_e( 'Automatic', 'instagram-feed' ); ?>:</span> <?php echo wp_kses_post( 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>
2582
-
2583
- <p><?php echo wp_kses_post( 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>
2584
- </div>
2585
- </div>
2586
-
2587
- <?php
2588
- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
2589
- if ( ! SB_Instagram_GDPR_Integrations::gdpr_tests_successful( isset( $_GET['retest'] ) ) ) :
2590
- $errors = SB_Instagram_GDPR_Integrations::gdpr_tests_error_message();
2591
- ?>
2592
- <div class="sb_instagram_box sbi_gdpr_error">
2593
- <div class="sb_instagram_box_setting">
2594
- <p>
2595
- <strong><?php esc_html_e( 'Error:', 'instagram-feed' ); ?></strong> <?php esc_html_e( 'Due to a configuration issue on your web server, the GDPR setting is unable to be enabled.', 'instagram-feed' ); ?></p>
2596
- <p>
2597
- <?php echo wp_kses_post( $errors ); ?>
2598
- </p>
2599
- </div>
2600
- </div>
2601
- <?php else : ?>
2602
-
2603
- <div class="sbi_gdpr_auto">
2604
- <?php
2605
- if ( SB_Instagram_GDPR_Integrations::gdpr_plugins_active() ) :
2606
- $active_plugin = SB_Instagram_GDPR_Integrations::gdpr_plugins_active();
2607
- ?>
2608
- <div class="sbi_gdpr_plugin_active">
2609
- <div class="sbi_active">
2610
- <p>
2611
- <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>
2612
- <strong><?php echo wp_kses_post( sprintf( __( '%s detected', 'instagram-feed' ), $active_plugin ) ); ?></strong>
2613
- <br />
2614
- <?php esc_html_e( 'Some Instagram Feed features will be limited for visitors to ensure GDPR compliance until they give consent.', 'instagram-feed' ); ?>
2615
- <a href="JavaScript:void(0);" class="sbi_show_gdpr_list"><?php esc_html_e( 'What will be limited?', 'instagram-feed' ); ?></a>
2616
- </p>
2617
- <?php echo "<div class='sbi_gdpr_list'>" . wp_kses_post( $gdpr_list ) . '</div>'; ?>
2618
- </div>
2619
-
2620
- </div>
2621
- <?php else : ?>
2622
- <div class="sb_instagram_box">
2623
- <div class="sb_instagram_box_setting">
2624
- <p><?php echo wp_kses_post( sprintf( __( 'No GDPR consent plugin detected. Install a compatible %1$sGDPR consent plugin%2$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>
2625
- </div>
2626
- </div>
2627
- <?php endif; ?>
2628
- </div>
2629
-
2630
- <div class="sb_instagram_box sbi_gdpr_yes">
2631
- <div class="sb_instagram_box_setting">
2632
- <p><?php esc_html_e( 'No requests will be made to third-party websites. To accommodate this, some features of the plugin will be limited:', 'instagram-feed' ); ?></p>
2633
- <?php echo wp_kses_post( $gdpr_list ); ?>
2634
- </div>
2635
- </div>
2636
-
2637
- <div class="sb_instagram_box sbi_gdpr_no">
2638
- <div class="sb_instagram_box_setting">
2639
- <p><?php esc_html_e( 'The plugin will function as normal and load images directly from Instagram.', 'instagram-feed' ); ?></p>
2640
- </div>
2641
- </div>
2642
-
2643
- <?php endif; ?>
2644
- </td>
2645
- </tr>
2646
-
2647
- </tbody>
2648
- </table>
2649
-
2650
- <hr id="customcss" />
2651
- <h3 id="sbi-misc-heading"><?php esc_html_e( 'Misc', 'instagram-feed' ); ?></h3>
2652
-
2653
- <table class="form-table" aria-describedby="sbi-misc-heading">
2654
- <tbody>
2655
- <tr>
2656
- <th scope="row" style="padding-bottom: 0;">
2657
- <?php echo wp_kses_post( __( '<strong style="font-size: 15px;">Custom CSS</strong><br />Enter your own custom CSS in the box below', 'instagram-feed' ) ); ?>
2658
- </th>
2659
- </tr>
2660
- <tr>
2661
- <td>
2662
- <textarea name="sb_instagram_custom_css" id="sb_instagram_custom_css" style="width: 70%;" rows="7"><?php echo esc_textarea( wp_unslash( $sb_instagram_custom_css ) ); ?></textarea>
2663
- </td>
2664
- </tr>
2665
- <tr id="customjs">
2666
- <td style="padding-bottom: 0;">
2667
- <?php echo wp_kses_post( __( '<strong style="font-size: 15px;">Custom JavaScript</strong><br />Enter your own custom JavaScript/jQuery in the box below', 'instagram-feed' ) ); ?>
2668
- </td>
2669
- </tr>
2670
- <tr>
2671
- <td>
2672
- <textarea name="sb_instagram_custom_js" id="sb_instagram_custom_js" style="width: 70%;" rows="7"><?php echo esc_textarea( wp_unslash( $sb_instagram_custom_js ) ); ?></textarea>
2673
- </td>
2674
- </tr>
2675
- </tbody>
2676
- </table>
2677
- <table class="form-table" aria-describedby="sbi-misc-heading">
2678
- <tbody>
2679
-
2680
- <tr>
2681
- <th scope="row"><label for="sb_instagram_ajax_theme" class="bump-left"><?php esc_html_e( 'Are you using an Ajax powered theme?', 'instagram-feed' ); ?></label></th>
2682
- <td>
2683
- <input name="sb_instagram_ajax_theme" type="checkbox" id="sb_instagram_ajax_theme"
2684
- <?php
2685
- if ( $sb_instagram_ajax_theme ) {
2686
- echo 'checked';}
2687
- ?>
2688
- />
2689
- <label for="sb_instagram_ajax_theme"><?php esc_html_e( 'Yes', 'instagram-feed' ); ?></label>
2690
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2691
- <p class="sbi_tooltip"><?php esc_html_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>
2692
- </td>
2693
- </tr>
2694
-
2695
- <tr>
2696
- <th scope="row" class="bump-left"><label class="bump-left"><?php esc_html_e( 'Image Resizing', 'instagram-feed' ); ?></label></th>
2697
- <td>
2698
- <input name="sb_instagram_disable_resize" type="checkbox" id="sb_instagram_disable_resize"
2699
- <?php
2700
- if ( $sb_instagram_disable_resize ) {
2701
- echo 'checked';}
2702
- ?>
2703
- />
2704
- <label for="sb_instagram_disable_resize"><?php esc_html_e( 'Disable Local Image Storing and Resizing', 'instagram-feed' ); ?></label><br><br>
2705
- <input name="sb_instagram_favor_local" type="checkbox" id="sb_instagram_favor_local"
2706
- <?php
2707
- if ( $sb_instagram_favor_local ) {
2708
- echo 'checked';}
2709
- ?>
2710
- />
2711
- <label for="sb_instagram_favor_local"><?php esc_html_e( 'Favor Local Images', 'instagram-feed' ); ?></label><br><br>
2712
-
2713
- <input id="sbi_reset_resized" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Reset Resized Images' ); ?>" style="vertical-align: middle;"/>
2714
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2715
- <p class="sbi_tooltip"><?php esc_html_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>
2716
- </td>
2717
- </tr>
2718
-
2719
- <tr>
2720
- <th scope="row"><label><?php esc_html_e( 'API request size', 'instagram-feed' ); ?></label><code class="sbi_shortcode"> minnum
2721
- Eg: minnum=25</code></th>
2722
- <td>
2723
- <input name="sb_instagram_minnum" type="number" min="0" max="100" value="<?php echo esc_attr( $sb_instagram_minnum ); ?>" />
2724
- <span class="sbi_note"><?php esc_html_e( 'Leave at "0" for default', 'instagram-feed' ); ?></span>
2725
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2726
- <p class="sbi_tooltip"><?php esc_html_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>
2727
- </td>
2728
- </tr>
2729
-
2730
- <tr>
2731
- <th scope="row"><label><?php esc_html_e( 'Enqueue JS file in head', 'instagram-feed' ); ?></label></th>
2732
- <td>
2733
- <input type="checkbox" name="enqueue_js_in_head" id="sb_instagram_enqueue_js_in_head"
2734
- <?php
2735
- if ( $enqueue_js_in_head ) {
2736
- echo 'checked="checked"';}
2737
- ?>
2738
- />
2739
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2740
- <p class="sbi_tooltip"><?php esc_html_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>
2741
- </td>
2742
- </tr>
2743
-
2744
- <tr>
2745
- <th scope="row"><label><?php esc_html_e( 'Enqueue CSS file with shortcode', 'instagram-feed' ); ?></label></th>
2746
- <td>
2747
- <input type="checkbox" name="enqueue_css_in_shortcode" id="sb_instagram_enqueue_css_in_shortcode"
2748
- <?php
2749
- if ( $enqueue_css_in_shortcode ) {
2750
- echo 'checked="checked"';}
2751
- ?>
2752
- />
2753
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2754
- <p class="sbi_tooltip"><?php esc_html_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>
2755
- </td>
2756
- </tr>
2757
-
2758
- <tr>
2759
- <th scope="row"><label><?php esc_html_e( 'Disable JS Image Loading', 'instagram-feed' ); ?></label></th>
2760
- <td>
2761
- <input type="checkbox" name="disable_js_image_loading" id="sb_instagram_disable_js_image_loading"
2762
- <?php
2763
- if ( $disable_js_image_loading ) {
2764
- echo 'checked="checked"';}
2765
- ?>
2766
- />
2767
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2768
- <p class="sbi_tooltip"><?php esc_html_e( 'Check this box to have images loaded server side instead of with JS.', 'instagram-feed' ); ?></p>
2769
- </td>
2770
- </tr>
2771
-
2772
- <tr>
2773
- <th scope="row"><label><?php esc_html_e( 'Enable Backup Caching', 'instagram-feed' ); ?></label></th>
2774
- <td class="sbi-customize-tab-opt">
2775
- <input name="sb_instagram_backup" type="checkbox" id="sb_instagram_backup"
2776
- <?php
2777
- if ( $sb_instagram_backup ) {
2778
- echo 'checked';}
2779
- ?>
2780
- />
2781
- <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' ); ?>" />
2782
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2783
- <p class="sbi_tooltip"><?php esc_html_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>
2784
- </td>
2785
- </tr>
2786
-
2787
- <tr>
2788
- <th scope="row" class="bump-left">
2789
- <label class="bump-left"><?php esc_html_e( 'Load initial posts with AJAX', 'instagram-feed' ); ?></label>
2790
- </th>
2791
- <td>
2792
- <input name="sb_ajax_initial" type="checkbox" id="sb_ajax_initial"
2793
- <?php
2794
- if ( $sb_ajax_initial ) {
2795
- echo 'checked';}
2796
- ?>
2797
- />
2798
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2799
- <p class="sbi_tooltip"><?php esc_html_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>
2800
- </td>
2801
- </tr>
2802
-
2803
- <tr>
2804
- <th scope="row" class="bump-left">
2805
- <label for="sb_instagram_cron" class="bump-left"><?php esc_html_e( 'Force cache to clear on interval', 'instagram-feed' ); ?></label>
2806
- </th>
2807
- <td>
2808
- <select name="sb_instagram_cron">
2809
- <option value="unset"
2810
- <?php
2811
- if ( $sb_instagram_cron === 'unset' ) {
2812
- echo 'selected="selected"';}
2813
- ?>
2814
- > - </option>
2815
- <option value="yes"
2816
- <?php
2817
- if ( $sb_instagram_cron === 'yes' ) {
2818
- echo 'selected="selected"';}
2819
- ?>
2820
- ><?php esc_html_e( 'Yes', 'instagram-feed' ); ?></option>
2821
- <option value="no"
2822
- <?php
2823
- if ( $sb_instagram_cron === 'no' ) {
2824
- echo 'selected="selected"';}
2825
- ?>
2826
- ><?php esc_html_e( 'No', 'instagram-feed' ); ?></option>
2827
- </select>
2828
-
2829
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2830
- <p class="sbi_tooltip"><?php esc_html_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>
2831
- </td>
2832
- </tr>
2833
- </tbody>
2834
- </table>
2835
- <table class="form-table" aria-describedby="sbi-misc-heading">
2836
- <tbody>
2837
- <tr>
2838
- <th scope="row" class="bump-left"><label class="bump-left"><?php esc_html_e( 'Enable Custom Templates', 'instagram-feed' ); ?></label></th>
2839
- <td>
2840
- <input name="sb_instagram_custom_template" type="checkbox" id="sb_instagram_custom_template"
2841
- <?php
2842
- if ( $sb_instagram_custom_template ) {
2843
- echo 'checked';}
2844
- ?>
2845
- />
2846
- <label for="sb_instagram_custom_template"><?php esc_html_e( 'Yes', 'instagram-feed' ); ?></label>
2847
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2848
- <p class="sbi_tooltip"><?php echo wp_kses_post( __( "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>
2849
- </td>
2850
- </tr>
2851
- <tr>
2852
- <th scope="row" class="bump-left"><label class="bump-left"><?php esc_html_e( 'Disable Admin Error Notice', 'instagram-feed' ); ?></label></th>
2853
- <td>
2854
- <input name="sb_instagram_disable_admin_notice" type="checkbox" id="sb_instagram_disable_admin_notice"
2855
- <?php
2856
- if ( $sb_instagram_disable_admin_notice ) {
2857
- echo 'checked';}
2858
- ?>
2859
- />
2860
- <label for="sb_instagram_disable_admin_notice"><?php esc_html_e( 'Yes', 'instagram-feed' ); ?></label>
2861
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2862
- <p class="sbi_tooltip"><?php esc_html_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>
2863
- </td>
2864
- </tr>
2865
- <tr>
2866
- <th scope="row" class="bump-left"><label class="bump-left"><?php esc_html_e( 'Feed Issue Email Report', 'instagram-feed' ); ?></label></th>
2867
- <td>
2868
- <input name="sb_instagram_enable_email_report" type="checkbox" id="sb_instagram_enable_email_report"
2869
- <?php
2870
- if ( $sb_instagram_enable_email_report ) {
2871
- echo 'checked';}
2872
- ?>
2873
- />
2874
- <label for="sb_instagram_enable_email_report"><?php esc_html_e( 'Yes', 'instagram-feed' ); ?></label>
2875
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2876
- <p class="sbi_tooltip"><?php esc_html_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>
2877
-
2878
- <div class="sb_instagram_box" style="display: block;">
2879
- <div class="sb_instagram_box_setting">
2880
- <label><?php esc_html_e( 'Schedule Weekly on', 'instagram-feed' ); ?></label><br>
2881
- <?php
2882
- $schedule_options = array(
2883
- array(
2884
- 'val' => 'monday',
2885
- 'label' => __( 'Monday', 'instagram-feed' ),
2886
- ),
2887
- array(
2888
- 'val' => 'tuesday',
2889
- 'label' => __( 'Tuesday', 'instagram-feed' ),
2890
- ),
2891
- array(
2892
- 'val' => 'wednesday',
2893
- 'label' => __( 'Wednesday', 'instagram-feed' ),
2894
- ),
2895
- array(
2896
- 'val' => 'thursday',
2897
- 'label' => __( 'Thursday', 'instagram-feed' ),
2898
- ),
2899
- array(
2900
- 'val' => 'friday',
2901
- 'label' => __( 'Friday', 'instagram-feed' ),
2902
- ),
2903
- array(
2904
- 'val' => 'saturday',
2905
- 'label' => __( 'Saturday', 'instagram-feed' ),
2906
- ),
2907
- array(
2908
- 'val' => 'sunday',
2909
- 'label' => __( 'Sunday', 'instagram-feed' ),
2910
- ),
2911
- );
2912
-
2913
- if ( isset( $_GET['flag'] ) ) {
2914
- echo '<span id="sbi-goto"></span>';
2915
- }
2916
- ?>
2917
- <select name="sb_instagram_email_notification" id="sb_instagram_email_notification">
2918
- <?php foreach ( $schedule_options as $schedule_option ) : ?>
2919
- <option value="<?php echo esc_attr( $schedule_option['val'] ); ?>"
2920
- <?php
2921
- if ( $schedule_option['val'] === $sb_instagram_email_notification ) {
2922
- echo 'selected';}
2923
- ?>
2924
- ><?php echo esc_html( $schedule_option['label'] ); ?></option>
2925
- <?php endforeach; ?>
2926
- </select>
2927
- </div>
2928
- <div class="sb_instagram_box_setting">
2929
- <label><?php esc_html_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 esc_html_e( 'separate multiple emails with commas', 'instagram-feed' ); ?></span>
2930
- <br><br><?php esc_html_e( 'Emails not working?', 'instagram-feed' ); ?> <a href="https://smashballoon.com/email-report-is-not-in-my-inbox/" target="_blank"><?php esc_html_e( 'See our related FAQ', 'instagram-feed' ); ?></a>
2931
- </div>
2932
- </div>
2933
-
2934
- </td>
2935
- </tr>
2936
- <?php
2937
- $usage_tracking = get_option( 'sbi_usage_tracking', false );
2938
- if ( $usage_tracking !== false ) :
2939
-
2940
- if ( isset( $_POST['sb_instagram_enable_email_report'] ) ) {
2941
- $usage_tracking['enabled'] = false;
2942
- if ( isset( $_POST['sbi_usage_tracking_enable'] ) ) {
2943
- $usage_tracking['enabled'] = true;
2944
- }
2945
- update_option( 'sbi_usage_tracking', $usage_tracking, false );
2946
- }
2947
- $sbi_usage_tracking_enable = isset( $usage_tracking['enabled'] ) ? $usage_tracking['enabled'] : true;
2948
-
2949
- // only show this setting after they have opted in or opted out using the admin notice
2950
- ?>
2951
- <tr>
2952
-
2953
- <th scope="row" class="bump-left"><label class="bump-left"><?php esc_html_e( 'Enable Usage Tracking', 'instagram-feed' ); ?></label></th>
2954
- <td>
2955
- <input name="sbi_usage_tracking_enable" type="checkbox" id="sbi_usage_tracking_enable"
2956
- <?php
2957
- if ( $sbi_usage_tracking_enable ) {
2958
- echo 'checked';}
2959
- ?>
2960
- />
2961
- <label for="sbi_usage_tracking_enable"><?php esc_html_e( 'Yes', 'instagram-feed' ); ?></label>
2962
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php esc_html_e( 'What is usage tracking?', 'instagram-feed' ); ?></a>
2963
- <p class="sbi_tooltip"><?php esc_html_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>
2964
- </td>
2965
- </tr>
2966
- <?php endif; ?>
2967
-
2968
- <tr>
2969
- <th scope="row"><label><?php esc_html_e( 'Manage Data', 'instagram-feed' ); ?></label></th>
2970
- <td class="sbi-customize-tab-opt">
2971
- <input id="sbi_clear_platform_data" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Delete all Platform Data' ); ?>" />
2972
- <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 5px;"><?php esc_html_e( 'What does this mean?', 'instagram-feed' ); ?></a>
2973
- <p class="sbi_tooltip"><?php esc_html_e( 'Warning: Clicking this button will permanently delete all Instagram data, including all connected accounts, cached posts, and stored images.', 'instagram-feed' ); ?></p>
2974
- </td>
2975
- </tr>
2976
-
2977
- </tbody>
2978
- </table>
2979
-
2980
- <?php submit_button(); ?>
2981
-
2982
- </form>
2983
-
2984
- <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php echo wp_kses_post( __( 'Next Step: <a href="?page=sb-instagram-feed&tab=display">Display your Feed</a>', 'instagram-feed' ) ); ?></p>
2985
-
2986
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php echo wp_kses_post( __( '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>
2987
-
2988
-
2989
- <?php } //End Customize tab ?>
2990
-
2991
-
2992
-
2993
- <?php if ( $sbi_active_tab === 'display' ) { //Start Display tab ?>
2994
-
2995
- <h3><?php esc_html_e( 'Display your Feed', 'instagram-feed' ); ?></h3>
2996
- <p><?php esc_html_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>
2997
- <input type="text" value="[instagram-feed]" size="16" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="<?php esc_html_e( 'To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'instagram-feed' ); ?>" />
2998
-
2999
- <h3 style="padding-top: 10px;"><?php esc_html_e( 'Multiple Feeds', 'instagram-feed' ); ?></h3>
3000
- <p><?php esc_html_e( "If you'd like to display multiple feeds then you can set different settings directly in the shortcode like so:", 'instagram-feed' ); ?>
3001
- <code>[instagram-feed num=9 cols=3]</code></p>
3002
- <p><?php esc_html_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 />
3003
- <code>[instagram-feed]</code><br />
3004
- <code>[instagram-feed num=4 cols=4 showfollow=false]</code><br />
3005
- </p>
3006
- <p><?php esc_html_e( 'See the table below for a full list of available shortcode options:', 'instagram-feed' ); ?></p>
3007
-
3008
- <p id="sbi-proonly-heading"><span class="sbi_table_key"></span><?php esc_html_e( 'Pro version only', 'instagram-feed' ); ?></p>
3009
-
3010
- <table class="sbi_shortcode_table" aria-describedby="sbi-proonly-heading">
3011
- <tbody>
3012
- <tr>
3013
- <th scope="row"><?php esc_html_e( 'Shortcode option', 'instagram-feed' ); ?></th>
3014
- <th scope="row"><?php esc_html_e( 'Description', 'instagram-feed' ); ?></th>
3015
- <th scope="row"><?php esc_html_e( 'Example', 'instagram-feed' ); ?></th>
3016
- </tr>
3017
-
3018
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Configure Options', 'instagram-feed' ); ?></td></tr>
3019
- <tr class="sbi_pro">
3020
- <td>type</td>
3021
- <td><?php echo wp_kses_post( __( 'Display photos from a User ID (user)<br />Display posts from a Hashtag (hashtag)', 'instagram-feed' ) ); ?><br /><?php esc_html_e( 'Display photos that the account was tagged in (tagged)', 'instagram-feed' ); ?></td>
3022
- <td><code>[instagram-feed type=user]</code><br /><code>[instagram-feed type=hashtag]</code><br /><code>[instagram-feed type=tagged]</code></td>
3023
- </tr>
3024
- <tr>
3025
- <td>user</td>
3026
- <td><?php esc_html_e( 'Your Instagram User Name. This must be from a connected account on the "Configure" tab.', 'instagram-feed' ); ?></td>
3027
- <td><code>[instagram-feed user="smashballoon"]</code></td>
3028
- </tr>
3029
- <tr class="sbi_pro">
3030
- <td>hashtag</td>
3031
- <td><?php esc_html_e( 'Any hashtag. Separate multiple hashtags by commas.', 'instagram-feed' ); ?></td>
3032
- <td><code>[instagram-feed hashtag="#awesome"]</code></td>
3033
- </tr>
3034
- <tr class="sbi_pro">
3035
- <td>tagged</td>
3036
- <td><?php esc_html_e( 'Your Instagram User Name. Separate multiple users by commas.', 'instagram-feed' ); ?></td>
3037
- <td><code>[instagram-feed tagged="smashballoon"]</code></td>
3038
- </tr>
3039
-
3040
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Customize Options', 'instagram-feed' ); ?></td></tr>
3041
- <tr>
3042
- <td>width</td>
3043
- <td><?php esc_html_e( 'The width of your feed. Any number.', 'instagram-feed' ); ?></td>
3044
- <td><code>[instagram-feed width=50]</code></td>
3045
- </tr>
3046
- <tr>
3047
- <td>widthunit</td>
3048
- <td><?php esc_html_e( "The unit of the width. 'px' or '%'", 'instagram-feed' ); ?></td>
3049
- <td><code>[instagram-feed widthunit=%]</code></td>
3050
- </tr>
3051
- <tr>
3052
- <td>height</td>
3053
- <td><?php esc_html_e( 'The height of your feed. Any number.', 'instagram-feed' ); ?></td>
3054
- <td><code>[instagram-feed height=250]</code></td>
3055
- </tr>
3056
- <tr>
3057
- <td>heightunit</td>
3058
- <td><?php esc_html_e( "The unit of the height. 'px' or '%'", 'instagram-feed' ); ?></td>
3059
- <td><code>[instagram-feed heightunit=px]</code></td>
3060
- </tr>
3061
- <tr>
3062
- <td>background</td>
3063
- <td><?php esc_html_e( 'The background color of the feed. Any hex color code.', 'instagram-feed' ); ?></td>
3064
- <td><code>[instagram-feed background=#ffff00]</code></td>
3065
- </tr>
3066
- <tr>
3067
- <td>class</td>
3068
- <td><?php esc_html_e( 'Add a CSS class to the feed container', 'instagram-feed' ); ?></td>
3069
- <td><code>[instagram-feed class=feedOne]</code></td>
3070
- </tr>
3071
-
3072
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Layout Options', 'instagram-feed' ); ?></td></tr>
3073
- <tr class="sbi_pro">
3074
- <td>layout</td>
3075
- <td><?php esc_html_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>
3076
- <td><code>[instagram-feed layout=grid]</code></td>
3077
- </tr>
3078
- <tr>
3079
- <td>num</td>
3080
- <td><?php esc_html_e( 'The number of photos to display initially. Maximum is 33.', 'instagram-feed' ); ?></td>
3081
- <td><code>[instagram-feed num=10]</code></td>
3082
- </tr>
3083
- <tr class="sbi_pro">
3084
- <td>nummobile</td>
3085
- <td><?php esc_html_e( 'The number of photos to display initially for mobile screens (smaller than 480 pixels).', 'instagram-feed' ); ?></td>
3086
- <td><code>[instagram-feed nummobile=6]</code></td>
3087
- </tr>
3088
- <tr>
3089
- <td>cols</td>
3090
- <td><?php esc_html_e( 'The number of columns in your feed. 1 - 10.', 'instagram-feed' ); ?></td>
3091
- <td><code>[instagram-feed cols=5]</code></td>
3092
- </tr>
3093
- <tr class="sbi_pro">
3094
- <td>colsmobile</td>
3095
- <td><?php esc_html_e( 'The number of columns in your feed for mobile screens (smaller than 480 pixels).', 'instagram-feed' ); ?></td>
3096
- <td><code>[instagram-feed colsmobile=2]</code></td>
3097
- </tr>
3098
- <tr>
3099
- <td>imagepadding</td>
3100
- <td><?php esc_html_e( 'The spacing around your photos', 'instagram-feed' ); ?></td>
3101
- <td><code>[instagram-feed imagepadding=10]</code></td>
3102
- </tr>
3103
- <tr>
3104
- <td>imagepaddingunit</td>
3105
- <td><?php esc_html_e( "The unit of the padding. 'px' or '%'", 'instagram-feed' ); ?></td>
3106
- <td><code>[instagram-feed imagepaddingunit=px]</code></td>
3107
- </tr>
3108
-
3109
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Carousel Options', 'instagram-feed' ); ?></td></tr>
3110
- <tr class="sbi_pro">
3111
- <td>carouselrows</td>
3112
- <td><?php esc_html_e( 'Choose 1 or 2 rows of posts in the carousel', 'instagram-feed' ); ?></td>
3113
- <td><code>[instagram-feed carouselrows=1]</code></td>
3114
- </tr>
3115
- <tr class="sbi_pro">
3116
- <td>carouselloop</td>
3117
- <td><?php esc_html_e( 'Infinitely loop through posts or rewind', 'instagram-feed' ); ?></td>
3118
- <td><code>[instagram-feed carouselloop=rewind]</code></td>
3119
- </tr>
3120
- <tr class="sbi_pro">
3121
- <td>carouselarrows</td>
3122
- <td><?php esc_html_e( 'Display directional arrows on the carousel', 'instagram-feed' ); ?></td>
3123
- <td><code>[instagram-feed carouselarrows=true]</code></td>
3124
- </tr>
3125
- <tr class="sbi_pro">
3126
- <td>carouselpag</td>
3127
- <td><?php esc_html_e( 'Display pagination links below the carousel', 'instagram-feed' ); ?></td>
3128
- <td><code>[instagram-feed carouselpag=true]</code></td>
3129
- </tr>
3130
- <tr class="sbi_pro">
3131
- <td>carouselautoplay</td>
3132
- <td><?php esc_html_e( 'Make the carousel autoplay', 'instagram-feed' ); ?></td>
3133
- <td><code>[instagram-feed carouselautoplay=true]</code></td>
3134
- </tr>
3135
- <tr class="sbi_pro">
3136
- <td>carouseltime</td>
3137
- <td><?php esc_html_e( 'The interval time between slides for autoplay. Time in miliseconds.', 'instagram-feed' ); ?></td>
3138
- <td><code>[instagram-feed carouseltime=8000]</code></td>
3139
- </tr>
3140
-
3141
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Highlight Options', 'instagram-feed' ); ?></td></tr>
3142
- <tr class="sbi_pro">
3143
- <td>highlighttype</td>
3144
- <td><?php esc_html_e( 'Choose from 3 different ways of highlighting posts including by pattern, hashtag, post id or. Options:', 'instagram-feed' ); ?> 'pattern', 'hashtag', 'id'.</td>
3145
- <td><code>[instagram-feed highlighttype=hashtag]</code></td>
3146
- </tr>
3147
- <tr class="sbi_pro">
3148
- <td>highlightpattern</td>
3149
- <td><?php esc_html_e( 'How often a post is highlighted.', 'instagram-feed' ); ?></td>
3150
- <td><code>[instagram-feed highlightpattern=7]</code></td>
3151
- </tr>
3152
- <tr class="sbi_pro">
3153
- <td>highlightoffset</td>
3154
- <td><?php esc_html_e( 'When to start the highlight pattern.', 'instagram-feed' ); ?></td>
3155
- <td><code>[instagram-feed highlightoffset=3]</code></td>
3156
- </tr>
3157
- <tr class="sbi_pro">
3158
- <td>highlighthashtag</td>
3159
- <td><?php esc_html_e( 'Highlight posts with these hashtags.', 'instagram-feed' ); ?></td>
3160
- <td><code>[instagram-feed highlighthashtag=best]</code></td>
3161
- </tr>
3162
-
3163
-
3164
-
3165
-
3166
-
3167
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Photos Options', 'instagram-feed' ); ?></td></tr>
3168
- <tr>
3169
- <td>sortby</td>
3170
- <td><?php esc_html_e( 'Sort the posts by Newest to Oldest (none) or Random (random)', 'instagram-feed' ); ?></td>
3171
- <td><code>[instagram-feed sortby=random]</code></td>
3172
- </tr>
3173
- <tr>
3174
- <td>imageres</td>
3175
- <td><?php esc_html_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>
3176
- <td><code>[instagram-feed imageres=full]</code></td>
3177
- </tr>
3178
- <tr class="sbi_pro">
3179
- <td>media</td>
3180
- <td><?php esc_html_e( 'Display all media, only photos, or only videos', 'instagram-feed' ); ?></td>
3181
- <td><code>[instagram-feed media=photos]</code></td>
3182
- </tr>
3183
- <tr class="sbi_pro">
3184
- <td>disablelightbox</td>
3185
- <td><?php esc_html_e( 'Whether to disable the photo Lightbox. It is enabled by default.', 'instagram-feed' ); ?></td>
3186
- <td><code>[instagram-feed disablelightbox=true]</code></td>
3187
- </tr>
3188
- <tr>
3189
- <td>disablemobile</td>
3190
- <td><?php esc_html_e( 'Disable the mobile layout. Options:', 'instagram-feed' ); ?> 'true' or 'false'.</td>
3191
- <td><code>[instagram-feed disablemobile=true]</code></td>
3192
- </tr>
3193
- <tr class="sbi_pro">
3194
- <td>captionlinks</td>
3195
- <td><?php esc_html_e( "Whether to use urls in captions for the photo's link instead of linking to instagram.com.", 'instagram-feed' ); ?></td>
3196
- <td><code>[instagram-feed captionlinks=true]</code></td>
3197
- </tr>
3198
-
3199
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Lightbox Comments Options', 'instagram-feed' ); ?></td></tr>
3200
- <tr class="sbi_pro">
3201
- <td>lightboxcomments</td>
3202
- <td><?php esc_html_e( 'Whether to show comments in the lightbox for this feed.', 'instagram-feed' ); ?></td>
3203
- <td><code>[instagram-feed lightboxcomments=true]</code></td>
3204
- </tr>
3205
- <tr class="sbi_pro">
3206
- <td>numcomments</td>
3207
- <td><?php esc_html_e( 'Number of comments to show starting from the most recent.', 'instagram-feed' ); ?></td>
3208
- <td><code>[instagram-feed numcomments=10]</code></td>
3209
- </tr>
3210
-
3211
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Photos Hover Style Options', 'instagram-feed' ); ?></td></tr>
3212
- <tr class="sbi_pro">
3213
- <td>hovercolor</td>
3214
- <td><?php esc_html_e( 'The background color when hovering over a photo. Any hex color code.', 'instagram-feed' ); ?></td>
3215
- <td><code>[instagram-feed hovercolor=#ff0000]</code></td>
3216
- </tr>
3217
- <tr class="sbi_pro">
3218
- <td>hovertextcolor</td>
3219
- <td><?php esc_html_e( 'The text/icon color when hovering over a photo. Any hex color code.', 'instagram-feed' ); ?></td>
3220
- <td><code>[instagram-feed hovertextcolor=#fff]</code></td>
3221
- </tr>
3222
- <tr class="sbi_pro">
3223
- <td>hoverdisplay</td>
3224
- <td><?php esc_html_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>
3225
- <td><code>[instagram-feed hoverdisplay="date, location, likes"]</code></td>
3226
- </tr>
3227
-
3228
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Header Options', 'instagram-feed' ); ?></td></tr>
3229
- <tr>
3230
- <td>showheader</td>
3231
- <td><?php esc_html_e( 'Whether to show the feed Header. Options:', 'instagram-feed' ); ?> 'true' or 'false'.</td>
3232
- <td><code>[instagram-feed showheader=false]</code></td>
3233
- </tr>
3234
- <tr>
3235
- <td>showbio</td>
3236
- <td><?php esc_html_e( 'Display the bio in the header. Options:', 'instagram-feed' ); ?> 'true' or 'false'</td>
3237
- <td><code>[instagram-feed showbio=true]</code></td>
3238
- </tr>
3239
- <tr>
3240
- <td>custombio</td>
3241
- <td><?php esc_html_e( 'Display a custom bio in the header', 'instagram-feed' ); ?></td>
3242
- <td><code>[instagram-feed custombio="My custom bio."]</code></td>
3243
- </tr>
3244
- <tr>
3245
- <td>customavatar</td>
3246
- <td><?php esc_html_e( 'Display a custom avatar in the header. Enter the full URL of an image file.', 'instagram-feed' ); ?></td>
3247
- <td><code>[instagram-feed customavatar="https://example.com/avatar.jpg"]</code></td>
3248
- </tr>
3249
- <tr>
3250
- <td>headersize</td>
3251
- <td><?php esc_html_e( 'Size of the header including small, medium and large. Options:', 'instagram-feed' ); ?> small, medium, or large.</td>
3252
- <td><code>[instagram-feed headersize=medium]</code></td>
3253
- </tr>
3254
- <tr>
3255
- <td>headercolor</td>
3256
- <td><?php esc_html_e( 'The color of the Header text. Any hex color code.', 'instagram-feed' ); ?></td>
3257
- <td><code>[instagram-feed headercolor=#333]</code></td>
3258
- </tr>
3259
-
3260
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( "'Load More' Button Options", 'instagram-feed' ); ?></td></tr>
3261
- <tr>
3262
- <td>showbutton</td>
3263
- <td><?php esc_html_e( "Whether to show the 'Load More' button. Options:", 'instagram-feed' ); ?> 'true' or 'false'.</td>
3264
- <td><code>[instagram-feed showbutton=false]</code></td>
3265
- </tr>
3266
- <tr>
3267
- <td>buttoncolor</td>
3268
- <td><?php esc_html_e( 'The background color of the button. Any hex color code.', 'instagram-feed' ); ?></td>
3269
- <td><code>[instagram-feed buttoncolor=#000]</code></td>
3270
- </tr>
3271
- <tr>
3272
- <td>buttontextcolor</td>
3273
- <td><?php esc_html_e( 'The text color of the button. Any hex color code.', 'instagram-feed' ); ?></td>
3274
- <td><code>[instagram-feed buttontextcolor=#fff]</code></td>
3275
- </tr>
3276
- <tr>
3277
- <td>buttontext</td>
3278
- <td><?php esc_html_e( 'The text used for the button.', 'instagram-feed' ); ?></td>
3279
- <td><code>[instagram-feed buttontext="Load More Photos"]</code></td>
3280
- </tr>
3281
-
3282
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( "'Follow on Instagram' Button Options", 'instagram-feed' ); ?></td></tr>
3283
- <tr>
3284
- <td>showfollow</td>
3285
- <td><?php esc_html_e( "Whether to show the 'Follow on Instagram' button. Options:", 'instagram-feed' ); ?> 'true' or 'false'.</td>
3286
- <td><code>[instagram-feed showfollow=false]</code></td>
3287
- </tr>
3288
- <tr>
3289
- <td>followcolor</td>
3290
- <td><?php esc_html_e( 'The background color of the button. Any hex color code.', 'instagram-feed' ); ?></td>
3291
- <td><code>[instagram-feed followcolor=#ff0000]</code></td>
3292
- </tr>
3293
- <tr>
3294
- <td>followtextcolor</td>
3295
- <td><?php esc_html_e( 'The text color of the button. Any hex color code.', 'instagram-feed' ); ?></td>
3296
- <td><code>[instagram-feed followtextcolor=#fff]</code></td>
3297
- </tr>
3298
- <tr>
3299
- <td>followtext</td>
3300
- <td><?php esc_html_e( 'The text used for the button.', 'instagram-feed' ); ?></td>
3301
- <td><code>[instagram-feed followtext="Follow me"]</code></td>
3302
- </tr>
3303
-
3304
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Caption Options', 'instagram-feed' ); ?></td></tr>
3305
- <tr class="sbi_pro">
3306
- <td>showcaption</td>
3307
- <td><?php esc_html_e( 'Whether to show the photo caption. Options:', 'instagram-feed' ); ?> 'true' or 'false'.</td>
3308
- <td><code>[instagram-feed showcaption=false]</code></td>
3309
- </tr>
3310
- <tr class="sbi_pro">
3311
- <td>captionlength</td>
3312
- <td><?php esc_html_e( 'The number of characters of the caption to display', 'instagram-feed' ); ?></td>
3313
- <td><code>[instagram-feed captionlength=50]</code></td>
3314
- </tr>
3315
- <tr class="sbi_pro">
3316
- <td>captioncolor</td>
3317
- <td><?php esc_html_e( 'The text color of the caption. Any hex color code.', 'instagram-feed' ); ?></td>
3318
- <td><code>[instagram-feed captioncolor=#000]</code></td>
3319
- </tr>
3320
- <tr class="sbi_pro">
3321
- <td>captionsize</td>
3322
- <td><?php esc_html_e( 'The size of the caption text. Any number.', 'instagram-feed' ); ?></td>
3323
- <td><code>[instagram-feed captionsize=24]</code></td>
3324
- </tr>
3325
-
3326
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Likes &amp; Comments Options', 'instagram-feed' ); ?></td></tr>
3327
- <tr class="sbi_pro">
3328
- <td>showlikes</td>
3329
- <td><?php esc_html_e( 'Whether to show the Likes &amp; Comments. Options:', 'instagram-feed' ); ?> 'true' or 'false'.</td>
3330
- <td><code>[instagram-feed showlikes=false]</code></td>
3331
- </tr>
3332
- <tr class="sbi_pro">
3333
- <td>likescolor</td>
3334
- <td><?php esc_html_e( 'The color of the Likes &amp; Comments. Any hex color code.', 'instagram-feed' ); ?></td>
3335
- <td><code>[instagram-feed likescolor=#FF0000]</code></td>
3336
- </tr>
3337
- <tr class="sbi_pro">
3338
- <td>likessize</td>
3339
- <td><?php esc_html_e( 'The size of the Likes &amp; Comments. Any number.', 'instagram-feed' ); ?></td>
3340
- <td><code>[instagram-feed likessize=14]</code></td>
3341
- </tr>
3342
-
3343
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Post Filtering Options', 'instagram-feed' ); ?></td></tr>
3344
- <tr class="sbi_pro">
3345
- <td>excludewords</td>
3346
- <td><?php esc_html_e( 'Remove posts which contain certain words or hashtags in the caption.', 'instagram-feed' ); ?></td>
3347
- <td><code>[instagram-feed excludewords="bad, words"]</code></td>
3348
- </tr>
3349
- <tr class="sbi_pro">
3350
- <td>includewords</td>
3351
- <td><?php esc_html_e( 'Only display posts which contain certain words or hashtags in the caption.', 'instagram-feed' ); ?></td>
3352
- <td><code>[instagram-feed includewords="sunshine"]</code></td>
3353
- </tr>
3354
-
3355
- <tr class="sbi_table_header"><td colspan=3><?php esc_html_e( 'Auto Load More on Scroll', 'instagram-feed' ); ?></td></tr>
3356
- <tr class="sbi_pro">
3357
- <td>autoscroll</td>
3358
- <td><?php esc_html_e( 'Load more posts automatically as the user scrolls down the page.', 'instagram-feed' ); ?></td>
3359
- <td><code>[instagram-feed autoscroll=true]</code></td>
3360
- </tr>
3361
- <tr class="sbi_pro">
3362
- <td>autoscrolldistance</td>
3363
- <td><?php esc_html_e( 'Distance before the end of feed or page that triggers the loading of more posts.', 'instagram-feed' ); ?></td>
3364
- <td><code>[instagram-feed autoscrolldistance=200]</code></td>
3365
- </tr>
3366
-
3367
- </tbody>
3368
- </table>
3369
-
3370
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php echo wp_kses_post( __( '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>
3371
-
3372
- <?php } //End Display tab ?>
3373
-
3374
-
3375
- <?php if ( $sbi_active_tab === 'support' ) { //Start Support tab ?>
3376
-
3377
- <div class="sbi_support">
3378
-
3379
- <h3 style="padding-bottom: 10px;"><?php esc_html_e( 'Need help?', 'instagram-feed' ); ?></h3>
3380
-
3381
- <p>
3382
- <span class="sbi-support-title"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <a
3383
- href="https://smashballoon.com/instagram-feed/free/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general"
3384
- target="_blank"><?php esc_html_e( 'Setup Directions', 'instagram-feed' ); ?></a></span>
3385
- <?php esc_html_e( 'A step-by-step guide on how to setup and use the plugin.', 'instagram-feed' ); ?>
3386
- </p>
3387
-
3388
- <p>
3389
- <span class="sbi-support-title"><i class="fa fa-youtube-play" aria-hidden="true"></i>&nbsp; <a
3390
- href="https://www.youtube.com/embed/q6ZXVU4g970" target="_blank" rel="noopener noreferrer"
3391
- id="sbi-play-support-video"><?php esc_html_e( 'Watch a Video', 'instagram-feed' ); ?></a></span>
3392
- <?php echo wp_kses_post( __( "Watch a short video demonstrating how to set up, customize and use the plugin.<br /><strong>Please note</strong> that the video shows the set up and use of the <strong><a href='https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=settings&utm_medium=general' target='_blank'>Pro version</a></strong> of the plugin, but the process is the same for this free version. The only difference is some of the features available.", 'instagram-feed' ) ); ?>
3393
-
3394
- <iframe id="sbi-support-video"
3395
- src="//www.youtube.com/embed/q6ZXVU4g970?theme=light&amp;showinfo=0&amp;controls=2" width="960"
3396
- height="540" frameborder="0" allowfullscreen="allowfullscreen" title="<?php esc_attr_e( 'Watch a Video', 'instagram-feed' ); ?>"></iframe>
3397
- </p>
3398
-
3399
- <p>
3400
- <span class="sbi-support-title"><i class="fa fa-question-circle" aria-hidden="true"></i>&nbsp; <a
3401
- href="https://smashballoon.com/instagram-feed/support/faq/?utm_campaign=instagram-free&utm_source=support&utm_medium=faqs"
3402
- target="_blank"><?php esc_html_e( 'FAQs and Docs', 'instagram-feed' ); ?></a></span>
3403
- <?php esc_html_e( 'View our expansive library of FAQs and documentation to help solve your problem as quickly as possible.', 'instagram-feed' ); ?>
3404
- </p>
3405
-
3406
- <div class="sbi-support-faqs">
3407
-
3408
- <ul>
3409
- <li><strong><?php esc_html_e( 'FAQs', 'instagram-feed' ); ?></strong></li>
3410
- <li>&bull;&nbsp; <?php echo wp_kses_post( __( '<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>
3411
- <li>&bull;&nbsp; <?php echo wp_kses_post( __( '<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>
3412
- <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 esc_html_e( 'See All', 'instagram-feed' ); ?><i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
3413
- </ul>
3414
-
3415
- <ul>
3416
- <li><strong><?php esc_html_e( 'Documentation', 'instagram-feed' ); ?></strong></li>
3417
- <li>&bull;&nbsp; <?php echo wp_kses_post( __( '<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>
3418
- <li>&bull;&nbsp; <?php echo wp_kses_post( __( '<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>
3419
- <li>&bull;&nbsp; <?php echo wp_kses_post( __( '<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>
3420
- </ul>
3421
- </div>
3422
-
3423
- <p>
3424
- <span class="sbi-support-title"><i class="fa fa-envelope" aria-hidden="true"></i>&nbsp; <a
3425
- href="https://smashballoon.com/instagram-feed/support/?utm_campaign=instagram-free&utm_source=support&utm_medium=contact"
3426
- target="_blank"><?php esc_html_e( 'Request Support', 'instagram-feed' ); ?></a></span>
3427
- <?php echo wp_kses_post( __( 'Still need help? Submit a ticket and one of our support experts will get back to you as soon as possible.<br /><strong>Important:</strong> Please include your <strong>System Info</strong> below with all support requests.', 'instagram-feed' ) ); ?>
3428
- </p>
3429
- </div>
3430
-
3431
- <hr />
3432
-
3433
- <h3><?php echo wp_kses_post( __( 'System Info &nbsp; <i style="color: #666; font-size: 11px; font-weight: normal;">Click the text below to select all</i>', 'instagram-feed' ) ); ?></h3>
3434
-
3435
-
3436
-
3437
-
3438
- <?php $sbi_options = get_option( 'sb_instagram_settings' ); ?>
3439
- <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;">
3440
- ## SITE/SERVER INFO: ##
3441
- Site URL: <?php echo esc_html( site_url() ) . "\n"; ?>
3442
- Home URL: <?php echo esc_html( home_url() ) . "\n"; ?>
3443
- WordPress Version: <?php echo esc_html( get_bloginfo( 'version' ) ) . "\n"; ?>
3444
- PHP Version: <?php echo esc_html( PHP_VERSION ) . "\n"; ?>
3445
- Web Server Info: <?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ) . "\n"; ?>
3446
-
3447
- ## ACTIVE PLUGINS: ##
3448
- <?php
3449
- $plugins = get_plugins();
3450
- $active_plugins = get_option( 'active_plugins', array() );
3451
-
3452
- foreach ( $plugins as $plugin_path => $plugin ) {
3453
- // If the plugin isn't active, don't show it.
3454
- if ( ! in_array( $plugin_path, $active_plugins, true ) ) {
3455
- continue;
3456
- }
3457
-
3458
- echo esc_html( $plugin['Name'] ) . ': ' . esc_html( $plugin['Version'] ) . "\n";
3459
- }
3460
- ?>
3461
-
3462
- ## PLUGIN SETTINGS: ##
3463
- sb_instagram_plugin_type => Instagram Feed Free
3464
- <?php
3465
- global $wpdb;
3466
- foreach ( $sbi_options as $key => $val ) {
3467
- if ( $key !== 'connected_accounts' ) {
3468
- if ( is_array( $val ) ) {
3469
- foreach ( $val as $item ) {
3470
- if ( is_array( $item ) ) {
3471
- foreach ( $item as $key2 => $val2 ) {
3472
- echo esc_html( $key2 ) . ' => ' . esc_html( $val2 ) . "\n";
3473
- }
3474
- } else {
3475
- echo esc_html( $key ) . ' => ' . esc_html( $item ) . "\n";
3476
- }
3477
- }
3478
- } else {
3479
- echo esc_html( $key ) . ' => ' . esc_html( $val ) . "\n";
3480
- }
3481
- }
3482
- }
3483
- ?>
3484
-
3485
- ## CONNECTED ACCOUNTS: ##
3486
- <?php
3487
- echo "\n";
3488
- $con_accounts = isset( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
3489
- $business_accounts = array();
3490
- $basic_accounts = array();
3491
- $manager = new SB_Instagram_Data_Manager();
3492
- if ( ! empty( $con_accounts ) ) {
3493
- foreach ( $con_accounts as $account ) {
3494
- $type = isset( $account['type'] ) ? $account['type'] : 'personal';
3495
- $original_access_token = ! empty( $account['access_token'] ) ? $account['access_token'] : '';
3496
- $account['access_token'] = ! empty( $original_access_token ) ? $manager->remote_encrypt( $original_access_token ) : '';
3497
- if ( isset( $account['page_access_token'] ) ) {
3498
- unset( $account['page_access_token'] );
3499
- }
3500
- echo '*' . esc_html( $account['user_id'] ) . '*' . "\n";
3501
- var_export( $account );
3502
- echo "\n";
3503
- $account['access_token'] = $original_access_token;
3504
- if ( $type === 'business' ) {
3505
- $business_accounts[] = $account;
3506
- } elseif ( $type === 'basic' ) {
3507
- $basic_accounts[] = $account;
3508
- }
3509
- }
3510
- }
3511
- ?>
3512
-
3513
- ## API RESPONSE: ##
3514
- <?php
3515
- $first_con_basic_account = isset( $basic_accounts[0] ) ? $basic_accounts[0] : array();
3516
- $first_con_business_account = isset( $business_accounts[0] ) ? $business_accounts[0] : array();
3517
-
3518
- if ( ! empty( $first_con_basic_account ) ) {
3519
- echo '*BASIC ACCOUNT*';
3520
- echo "\n";
3521
- $connection = new SB_Instagram_API_Connect( $first_con_basic_account, 'header' );
3522
- $connection->connect();
3523
- if ( ! $connection->is_wp_error() && ! $connection->is_instagram_error() ) {
3524
- foreach ( $connection->get_data() as $key => $item ) {
3525
- if ( is_array( $item ) ) {
3526
- foreach ( $item as $key2 => $item2 ) {
3527
- echo esc_html( $key2 ) . ' => ' . esc_html( $item2 ) . "\n";
3528
- }
3529
- } else {
3530
- echo esc_html( $key ) . ' => ' . esc_html( $item ) . "\n";
3531
- }
3532
- }
3533
- } else {
3534
- if ( $connection->is_wp_error() ) {
3535
- $response = $connection->get_wp_error();
3536
- if ( isset( $response ) && isset( $response->errors ) ) {
3537
- foreach ( $response->errors as $key => $item ) {
3538
- echo esc_html( $key ) . ' => ' . esc_html( $item[0] ) . "\n";
3539
- }
3540
- }
3541
- } else {
3542
- $error = $connection->get_data();
3543
- var_export( $error );
3544
- }
3545
- }
3546
- echo "\n";
3547
- } else {
3548
- echo 'no connected basic accounts';
3549
- echo "\n";
3550
- }
3551
- if ( ! empty( $first_con_business_account ) ) {
3552
- echo '*BUSINESS ACCOUNT*';
3553
- echo "\n";
3554
- $connection = new SB_Instagram_API_Connect( $first_con_business_account, 'header' );
3555
- $connection->connect();
3556
- if ( ! $connection->is_wp_error() && ! $connection->is_instagram_error() ) {
3557
- foreach ( $connection->get_data() as $key => $item ) {
3558
- if ( is_array( $item ) ) {
3559
- foreach ( $item as $key2 => $item2 ) {
3560
- echo esc_html( $key2 ) . ' => ' . esc_html( $item2 ) . "\n";
3561
- }
3562
- } else {
3563
- echo esc_html( $key ) . ' => ' . esc_html( $item ) . "\n";
3564
- }
3565
- }
3566
- } else {
3567
- if ( $connection->is_wp_error() ) {
3568
- $response = $connection->get_wp_error();
3569
- if ( isset( $response ) && isset( $response->errors ) ) {
3570
- foreach ( $response->errors as $key => $item ) {
3571
- echo esc_html( $key ) . ' => ' . esc_html( $item[0] ) . "\n";
3572
- }
3573
- }
3574
- } else {
3575
- $error = $connection->get_data();
3576
- var_export( $error );
3577
- }
3578
- }
3579
- } else {
3580
- echo 'no connected business accounts';
3581
- }
3582
- ?>
3583
-
3584
- ## Cron Events: ##
3585
- <?php
3586
- $cron = _get_cron_array();
3587
- foreach ( $cron as $key => $data ) {
3588
- $is_target = false;
3589
- foreach ( $data as $key2 => $val ) {
3590
- if ( strpos( $key2, 'sbi' ) !== false || strpos( $key2, 'sb_instagram' ) !== false ) {
3591
- $is_target = true;
3592
- echo esc_html( $key2 );
3593
- echo "\n";
3594
- }
3595
- }
3596
- if ( $is_target ) {
3597
- echo esc_html( date( 'Y-m-d H:i:s', $key ) );
3598
- echo "\n";
3599
- echo esc_html( 'Next Scheduled: ' . ( (int) $key - time() ) / 60 . ' minutes' );
3600
- echo "\n\n";
3601
- }
3602
- }
3603
- ?>
3604
- ## Cron Cache Report: ##
3605
- <?php
3606
- $cron_report = get_option( 'sbi_cron_report', array() );
3607
- if ( ! empty( $cron_report ) ) {
3608
- var_export( $cron_report );
3609
- }
3610
- echo "\n";
3611
- ?>
3612
-
3613
- ## Access Token Refresh: ##
3614
- <?php
3615
- $cron_report = get_option( 'sbi_refresh_report', array() );
3616
- if ( ! empty( $cron_report ) ) {
3617
- var_export( $cron_report );
3618
- }
3619
- echo "\n";
3620
- ?>
3621
-
3622
- ## Resizing: ##
3623
- <?php
3624
- $upload = wp_upload_dir();
3625
- $upload_dir = $upload['basedir'];
3626
- $upload_dir = trailingslashit( $upload_dir ) . SBI_UPLOADS_NAME;
3627
- if ( file_exists( $upload_dir ) ) {
3628
- echo 'upload directory exists';
3629
- } else {
3630
- $created = wp_mkdir_p( $upload_dir );
3631
-
3632
- if ( ! $created ) {
3633
- echo 'cannot create upload directory';
3634
- }
3635
- }
3636
- echo "\n";
3637
- echo "\n";
3638
-
3639
- $table_name = esc_sql( $wpdb->prefix . SBI_INSTAGRAM_POSTS_TYPE );
3640
- $feeds_posts_table_name = esc_sql( $wpdb->prefix . SBI_INSTAGRAM_FEEDS_POSTS );
3641
-
3642
- if ( $wpdb->get_var( "show tables like '$feeds_posts_table_name'" ) !== $feeds_posts_table_name ) {
3643
- echo 'no feeds posts table';
3644
- echo "\n";
3645
-
3646
- } else {
3647
- $last_result = $wpdb->get_results( "SELECT * FROM $feeds_posts_table_name ORDER BY id DESC LIMIT 1;" );
3648
- if ( is_array( $last_result ) && isset( $last_result[0] ) ) {
3649
- echo '*FEEDS POSTS TABLE*';
3650
- echo "\n";
3651
-
3652
- foreach ( $last_result as $column ) {
3653
-
3654
- foreach ( $column as $key => $value ) {
3655
- echo esc_html( $key ) . ': ' . esc_html( $value ) . "\n";
3656
-
3657
- }
3658
- }
3659
- } else {
3660
- echo 'feeds posts has no rows';
3661
- echo "\n";
3662
- }
3663
- }
3664
- echo "\n";
3665
-
3666
- if ( $wpdb->get_var( "show tables like '$table_name'" ) !== $table_name ) {
3667
- echo 'no posts table';
3668
- echo "\n";
3669
-
3670
- } else {
3671
- $last_result = $wpdb->get_results( "SELECT * FROM $table_name ORDER BY id DESC LIMIT 1;", ARRAY_A );
3672
- if ( is_array( $last_result ) && isset( $last_result[0] ) ) {
3673
- echo '*POSTS TABLE*';
3674
- echo "\n";
3675
- foreach ( $last_result as $column ) {
3676
- if ( isset( $column['json_data'] ) ) {
3677
- unset( $column['json_data'] );
3678
- }
3679
-
3680
- foreach ( $column as $key => $value ) {
3681
- echo esc_html( $key ) . ': ' . esc_html( $value ) . "\n";
3682
-
3683
- }
3684
- }
3685
- } else {
3686
- echo 'feeds posts has no rows';
3687
- echo "\n";
3688
- }
3689
- }
3690
- ?>
3691
-
3692
- ## Errors: ##
3693
- <?php
3694
- global $sb_instagram_posts_manager;
3695
- $errors = $sb_instagram_posts_manager->get_errors();
3696
- if ( ! empty( $errors['resizing'] ) ) :
3697
- echo '* Resizing *' . "\n";
3698
- echo esc_html( $errors['resizing'] ) . "\n";
3699
- endif;
3700
- if ( ! empty( $errors['database_create'] ) ) :
3701
- echo '* Database Create *' . "\n";
3702
- echo esc_html( $errors['database_create'] ) . "\n";
3703
- endif;
3704
- if ( ! empty( $errors['upload_dir'] ) ) :
3705
- echo '* Uploads Directory *' . "\n";
3706
- echo esc_html( $errors['upload_dir'] ) . "\n";
3707
- endif;
3708
- if ( ! empty( $errors['connection'] ) ) :
3709
- echo '* API/WP_HTTP Request *' . "\n";
3710
- var_export( $errors['connection'] );
3711
- endif;
3712
- ?>
3713
-
3714
- ## Error Log: ##
3715
- <?php
3716
- $error_log = $sb_instagram_posts_manager->get_error_log();
3717
- if ( ! empty( $error_log ) ) :
3718
- foreach ( $error_log as $error ) :
3719
- echo esc_html( $error ) . "\n";
3720
- endforeach;
3721
- endif;
3722
- ?>
3723
-
3724
- ## Action Log: ##
3725
- <?php
3726
- $actions = $sb_instagram_posts_manager->get_action_log();
3727
- if ( ! empty( $actions ) ) :
3728
- foreach ( $actions as $action ) :
3729
- echo esc_html( $action ) . "\n";
3730
- endforeach;
3731
- endif;
3732
- ?>
3733
-
3734
- ## Location Summary: ##
3735
- <?php
3736
- $locator_summary = SB_Instagram_Feed_Locator::summary();
3737
- $condensed_shortcode_atts = array( 'type', 'user', 'hashtag', 'tagged', 'num', 'cols', 'layout', 'whitelist', 'includewords' );
3738
-
3739
- if ( ! empty( $locator_summary ) ) {
3740
-
3741
- foreach ( $locator_summary as $locator_section ) {
3742
- if ( ! empty( $locator_section['results'] ) ) {
3743
- $first_five = array_slice( $locator_section['results'], 0, 5 );
3744
- foreach ( $first_five as $result ) {
3745
- $condensed_shortcode_string = '[instagram-feed';
3746
- $shortcode_atts = json_decode( $result['shortcode_atts'], true );
3747
- $shortcode_atts = is_array( $shortcode_atts ) ? $shortcode_atts : array();
3748
- foreach ( $shortcode_atts as $key => $value ) {
3749
- if ( in_array( $key, $condensed_shortcode_atts, true ) ) {
3750
- $condensed_shortcode_string .= ' ' . esc_html( $key ) . '="' . esc_html( $value ) . '"';
3751
- }
3752
- }
3753
- $condensed_shortcode_string .= ']';
3754
- echo esc_url( get_the_permalink( $result['post_id'] ) ) . ' ' . esc_html( $condensed_shortcode_string ) . "\n";
3755
- }
3756
- }
3757
- }
3758
- }
3759
- ?>
3760
-
3761
- ## GDPR: ##
3762
- <?php
3763
- if ( ! SB_Instagram_GDPR_Integrations::gdpr_tests_successful() ) :
3764
- $errors = SB_Instagram_GDPR_Integrations::gdpr_tests_error_message();
3765
- ?>
3766
- <?php echo wp_kses_post( $errors ); ?>
3767
- <?php endif; ?>
3768
-
3769
- ## oEmbed: ##
3770
- <?php
3771
- $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
3772
- foreach ( $oembed_token_settings as $key => $value ) {
3773
- echo esc_html( $key ) . ': ' . esc_html( $value ) . "\n";
3774
- }
3775
-
3776
- $single = new SB_Instagram_Single( 'https://www.instagram.com/p/CCq1D_cMYMF/' );
3777
- $post = $single->fetch();
3778
- $message = '';
3779
- if ( isset( $post['thumbnail_url'] ) ) {
3780
- $message = 'success';
3781
- } else {
3782
- $error = $single->get_error();
3783
-
3784
- if ( ! empty( $error ) ) {
3785
- $message = $error;
3786
- }
3787
- }
3788
- echo 'oEmbed request test: ' . esc_html( $message );
3789
-
3790
- ?>
3791
- </textarea>
3792
- <div><input id="sbi_reset_log" class="button-secondary" type="submit" value="<?php esc_attr_e( 'Reset Error Log' ); ?>" style="vertical-align: middle;"/></div>
3793
-
3794
- <?php
3795
- } //End Support tab
3796
-
3797
- if ( $sbi_active_tab === 'more' ) { //Start More Social Feeds tab
3798
-
3799
- add_user_meta( get_current_user_id(), 'seen_more_plugins_page_1', 'true', true ); //Iterate when adding a new plugin
3800
- ?>
3801
-
3802
- <div class="sbi_more_plugins" id="sbi-admin-about">
3803
-
3804
- <div class="sbi-more-plugins-intro">
3805
- <h3><?php echo wp_kses_post( __( "Here's some more <span>free</span> plugins you might like!", 'instagram-feed' ) ); ?></h3>
3806
- <p><?php esc_html_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>
3807
- </div>
3808
-
3809
- <?php
3810
- function get_am_plugins() {
3811
-
3812
- $images_url = SBI_PLUGIN_URL . 'img/about/';
3813
-
3814
- return array(
3815
- 'instagram-feed/instagram-feed.php' => array(
3816
- 'icon' => $images_url . 'plugin-if.png',
3817
- 'name' => esc_html__( 'Instagram Feed', 'custom-facebook-feed' ),
3818
- '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' ),
3819
- 'url' => 'https://downloads.wordpress.org/plugin/instagram-feed.zip',
3820
- 'pro' => array(
3821
- 'plug' => 'instagram-feed-pro/instagram-feed.php',
3822
- 'icon' => $images_url . 'plugin-if.png',
3823
- 'name' => esc_html__( 'Instagram Feed Pro', 'custom-facebook-feed' ),
3824
- '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' ),
3825
- 'url' => 'https://smashballoon.com/instagram-feed/?utm_campaign=facebook-free&utm_source=cross&utm_medium=sbiinstaller',
3826
- 'act' => 'go-to-url',
3827
- ),
3828
- ),
3829
- 'custom-facebook-feed/custom-facebook-feed.php' => array(
3830
- 'icon' => $images_url . 'plugin-fb.png',
3831
- 'name' => esc_html__( 'Custom Facebook Feed', 'instagram-feed' ),
3832
- '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' ),
3833
- 'url' => 'https://downloads.wordpress.org/plugin