Instagram Feed - Version 2.5

Version Description

  • 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.
  • 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.
  • 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.
  • Tweak: Background caching and favoring local images are now the default settings for new installs.
  • Fix: Fixed PHP warning too few arguments when using Spanish translation files.
Download this release

Release Info

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

Code changes from version 2.4.7 to 2.5

README.txt CHANGED
@@ -3,17 +3,18 @@ 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.5
6
- Stable tag: 2.4.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Formerly "Instagram Feed". Display beautifully clean, customizable, and responsive Instagram feeds from multiple Instagram accounts
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
  * Super **simple to set up**
18
  * Display photos from **multiple Instagram accounts** in the same feed or in separate feeds
19
  * Completely **responsive** and mobile ready - layout looks great on any screen size and in any container width
@@ -34,10 +35,11 @@ Display Instagram posts from your Instagram accounts, either in the same single
34
  * **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!
35
  * **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.
36
  * **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.
 
37
 
38
  = Pro Version =
39
  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:
40
- * Display Hashtag feeds (fully compatible with the Instagram December 11, 2018, API changes)
41
  * View photos and videos in a popup lightbox directly on your site
42
  * View post comments for user feeds
43
  * Display the number of like and comments for each post
@@ -160,6 +162,10 @@ Yep. You can display multiple Instagram feeds by using our built-in shortcode op
160
 
161
  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"]`.
162
 
 
 
 
 
163
  = How do I find my Instagram Access Token and Instagram User ID =
164
 
165
  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.
@@ -325,6 +331,13 @@ We understand that sometimes you need help, have issues or just have questions.
325
  * Plus more customization options added all the time!
326
 
327
  == Changelog ==
 
 
 
 
 
 
 
328
  = 2.4.7 =
329
  * 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.
330
  * 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.
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.4
5
  Tested up to: 5.5
6
+ Stable tag: 2.5
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
35
  * **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!
36
  * **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.
37
  * **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.
38
+ * **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.
39
 
40
  = Pro Version =
41
  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:
42
+ * Display Hashtag feeds
43
  * View photos and videos in a popup lightbox directly on your site
44
  * View post comments for user feeds
45
  * Display the number of like and comments for each post
162
 
163
  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"]`.
164
 
165
+ = Does the plugin work with Instagram oEmbeds? =
166
+
167
+ 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.
168
+
169
  = How do I find my Instagram Access Token and Instagram User ID =
170
 
171
  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.
331
  * Plus more customization options added all the time!
332
 
333
  == Changelog ==
334
+ = 2.5 =
335
+ * 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.
336
+ * 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.
337
+ * 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.
338
+ * Tweak: Background caching and favoring local images are now the default settings for new installs.
339
+ * Fix: Fixed PHP warning too few arguments when using Spanish translation files.
340
+
341
  = 2.4.7 =
342
  * 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.
343
  * 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.
css/sb-instagram-admin.css CHANGED
@@ -44,16 +44,17 @@
44
  }
45
 
46
  /* Instagram btn */
47
- #sbi_admin .sbi_admin_btn{
 
48
  display: block;
49
  float: left;
50
  clear: both;
51
- padding: 0 21px 0 160px;
52
  height: 47px;
53
  line-height: 47px;
54
  font-size: 14px;
55
 
56
- background: #386793 url('../img/small-logo.png') no-repeat 16px 11px;
57
 
58
  color: #e9eef3;
59
  text-decoration: none;
@@ -67,7 +68,18 @@
67
  -o-transition: all 0.5s ease-in-out;
68
  transition: all 0.5s ease-in-out;
69
  }
70
- #sbi_admin .sbi_admin_btn:hover{
 
 
 
 
 
 
 
 
 
 
 
71
  background-color: #3880c4;
72
  color: #fff;
73
 
@@ -701,7 +713,8 @@
701
  margin: 0 -5px 0 5px;
702
  }
703
 
704
- .sbi_is_private {
 
705
  position: relative;
706
  display: inline-block;
707
  border: 1px solid #ccc;
@@ -715,6 +728,17 @@
715
  border: 1px solid #e6bc88;
716
  color: #94570c;
717
  }
 
 
 
 
 
 
 
 
 
 
 
718
  .sbi_is_private > span {
719
  display: inline-block;
720
  padding-top: 3px;
@@ -1100,6 +1124,9 @@
1100
  padding: 0 21px;
1101
  background-image: none;
1102
  }
 
 
 
1103
 
1104
  /* Pro 3.0 Styles */
1105
  .sbi_layout_cell {
@@ -1921,14 +1948,6 @@
1921
  padding: 20px
1922
  }
1923
 
1924
- #sbi-admin-about #sbi-admin-addons .addon-item img {
1925
- padding: 10px
1926
- }
1927
-
1928
- #sbi-admin-about #sbi-admin-addons .addon-item img[src*="-mi"] {
1929
- padding: 13px
1930
- }
1931
-
1932
  #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button {
1933
  display: inline-block;
1934
  text-decoration: none;
@@ -2277,14 +2296,397 @@
2277
  box-shadow: none
2278
  }
2279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2280
  /* Clear */
2281
  .sbi-clear:before {
2282
  content: " ";
2283
  display: table
2284
  }
2285
-
2286
  .sbi-clear:after {
2287
  clear: both;
2288
  content: " ";
2289
  display: table
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2290
  }
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;
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
 
713
  margin: 0 -5px 0 5px;
714
  }
715
 
716
+ .sbi_is_private,
717
+ .sbi_warning {
718
  position: relative;
719
  display: inline-block;
720
  border: 1px solid #ccc;
728
  border: 1px solid #e6bc88;
729
  color: #94570c;
730
  }
731
+ #sbi_admin .sbi_warning,
732
+ .sbi-oembed-button .sb_instagram_notice{
733
+ clear: both;
734
+ padding: 20px 30px;
735
+ border-radius: 3px;
736
+ }
737
+ .sbi-oembed-button .sb_instagram_notice p {
738
+ font-size: 13px;
739
+ line-height: 1.5;
740
+ margin: 1em 0;
741
+ }
742
  .sbi_is_private > span {
743
  display: inline-block;
744
  padding-top: 3px;
1124
  padding: 0 21px;
1125
  background-image: none;
1126
  }
1127
+ .sbi-oembeds #sbi_config_info .sbi_config_modal{
1128
+ padding: 40px 40px 25px 40px;
1129
+ }
1130
 
1131
  /* Pro 3.0 Styles */
1132
  .sbi_layout_cell {
1948
  padding: 20px
1949
  }
1950
 
 
 
 
 
 
 
 
 
1951
  #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button {
1952
  display: inline-block;
1953
  text-decoration: none;
2296
  box-shadow: none
2297
  }
2298
 
2299
+ /* oEmbeds */
2300
+ #sbi_admin.sbi-oembeds #header{
2301
+ border-bottom: 1px solid #ccc;
2302
+ padding-bottom: 15px;
2303
+ margin-bottom: 25px;
2304
+ }
2305
+ #sbi_admin.sbi-oembeds .sbi_admin_btn{
2306
+ margin-top: 10px;
2307
+ }
2308
+ #sbi_admin.sbi-oembeds .sbi-success{
2309
+ display: inline-block;
2310
+ clear: both;
2311
+ padding: 20px 30px;
2312
+ border-radius: 3px;
2313
+ }
2314
+ #sbi_admin.sbi-oembeds .sbi-success a{
2315
+ margin-left: 5px;
2316
+ color: #e34f0e;
2317
+ }
2318
+ #sbi_admin .sbi-oembed-promo{
2319
+ margin: 30px 0 0 0;
2320
+ padding: 30px;
2321
+ border: 1px solid #ccc;
2322
+ border-radius: 3px;
2323
+ background: rgba(255,255,255,0.5);
2324
+ }
2325
+ #sbi_admin .sbi-oembed-promo h2{
2326
+ padding: 0 0 20px 0;
2327
+ margin: 0;
2328
+ font-size: 18px;
2329
+ line-height: 1.5;
2330
+ }
2331
+ #sbi_admin .sbi-oembed-promo .sbi-reasons div{
2332
+ display: inline-block;
2333
+ margin-right: 15px;
2334
+ }
2335
+ #sbi_admin .sbi-oembed-promo .sbi-reasons span{
2336
+ font-size: 15px;
2337
+ }
2338
+ #sbi_admin .sbi-oembed-promo svg{
2339
+ position: relative;
2340
+ top: 3px;
2341
+ margin: 0 8px 0 0;
2342
+ width: 16px;
2343
+ height: 16px;
2344
+ }
2345
+ #sbi_admin .sbi-oembed-promo .button{
2346
+ margin-top: 12px;
2347
+ font-size: 16px;
2348
+ padding: 5px 20px;
2349
+ height: auto;
2350
+ }
2351
+ #sbi_admin .sbi-oembed-promo p span{
2352
+ display: inline-block;
2353
+ padding-right: 10px;
2354
+ }
2355
+ #sbi_admin .sbi-oembed-promo .fa-check{
2356
+ width: 14px;
2357
+ height: 14px;
2358
+ margin-right: 5px;
2359
+ top: 2px;
2360
+ }
2361
+ #sbi_admin .sbi-oembed-promo .fa-check path{
2362
+ fill: #3fa03f;
2363
+ }
2364
+ #sbi_admin.sbi-oembeds .sbi-error{
2365
+ display: inline-block;
2366
+ clear: both;
2367
+ padding: 20px 30px;
2368
+ border-radius: 3px;
2369
+ background: #F7E6E6;
2370
+ border: 1px solid #BA7B7B;
2371
+ color: #592626;
2372
+ }
2373
+ #sbi_admin.sbi-oembeds .sbi-success-message{
2374
+ display: inline-block;
2375
+ clear: both;
2376
+ padding: 20px 30px;
2377
+ border-radius: 3px;
2378
+ background: #dceada;
2379
+ border: 1px solid #6ca365;
2380
+ color: #3e5f1c;
2381
+ }
2382
+ #sbi_admin.sbi-oembeds .sbi-oembed-connect-btn {
2383
+ margin-top: 10px;
2384
+ }
2385
+ #sbi_admin .sbi-oembed-desc{
2386
+ overflow: hidden;
2387
+ max-width: 900px;
2388
+ clear: both;
2389
+ margin-top: 30px;
2390
+ float: left;
2391
+ }
2392
+ #sbi_admin .sbi-oembed-desc p{
2393
+ padding: 0 0 10px 0;
2394
+ margin: 0;
2395
+ }
2396
+ #sbi_admin .sbi-oembed-desc .sbi-col{
2397
+ width: 45%;
2398
+ margin-right: 5%;
2399
+ float: left;
2400
+ }
2401
+ #sbi_admin .sbi-oembed-desc img{
2402
+ width: 50%;
2403
+ max-width: 446px;
2404
+ float: left;
2405
+ border-bottom: 1px solid #ddd;
2406
+ }
2407
+ #sbi_admin .sbi-oembed-button{
2408
+ margin-top: 20px;
2409
+ }
2410
+
2411
  /* Clear */
2412
  .sbi-clear:before {
2413
  content: " ";
2414
  display: table
2415
  }
 
2416
  .sbi-clear:after {
2417
  clear: both;
2418
  content: " ";
2419
  display: table
2420
+ }
2421
+
2422
+ /* Social Wall landing page */
2423
+ #sbi_admin.sw-landing-page{
2424
+ padding: 20px 0;
2425
+ }
2426
+ #sbi_admin .sbi-sw-icons{
2427
+ width: 100%;
2428
+ text-align: center;
2429
+ }
2430
+ #sbi_admin .sbi-sw-icons span{
2431
+ display: inline-block;
2432
+ width: 32px;
2433
+ margin: 0 7px;
2434
+ position: relative;
2435
+ top: -2px;
2436
+ }
2437
+ #sbi_admin .sbi-sw-icons .sbi-sb-plus{
2438
+ width: 12px;
2439
+ height: 12px;
2440
+ position: relative;
2441
+ top: -12px;
2442
+ opacity: 0.9;
2443
+ }
2444
+ #sbi_admin.sw-landing-page h1,
2445
+ #sbi_admin.sw-landing-page h2{
2446
+ width: 100%;
2447
+ text-align: center;
2448
+ }
2449
+ #sbi_admin.sw-landing-page h1{
2450
+ font-size: 44px;
2451
+ margin: 20px 0 0 0;
2452
+ line-height: 1.3;
2453
+ }
2454
+ #sbi_admin.sw-landing-page h2{
2455
+ font-size: 30px;
2456
+ font-weight: 100;
2457
+ line-height: 1.2;
2458
+ margin: 5px 0 20px 0;
2459
+ }
2460
+ #sbi_admin .sbi-sw-info{
2461
+ width: 95%;
2462
+ max-width: 1400px;
2463
+ margin: 0 auto;
2464
+ padding: 50px 10px;
2465
+ clear: both;
2466
+ overflow: hidden;
2467
+ box-sizing: border-box;
2468
+ }
2469
+ #sbi_admin .sbi-sw-features{
2470
+ float: left;
2471
+ width: 40%;
2472
+ margin-right: 5%;
2473
+ padding: 20px 0 0 0;
2474
+ }
2475
+ #sbi_admin .sbi-sw-screenshot{
2476
+ position: relative;
2477
+ width: 55%;
2478
+ float: left;
2479
+ box-sizing: border-box;
2480
+ border: 5px solid #fff;
2481
+ box-shadow: 0 0 20px 0 rgba(0,0,0,0.05);
2482
+ }
2483
+ #sbi_admin .sbi-sw-features p{
2484
+ margin: 35px 0;
2485
+ padding: 0;
2486
+ font-size: 15px;
2487
+ }
2488
+ #sbi_admin .sbi-sw-features p:first-child{
2489
+ margin-top: 0;
2490
+ }
2491
+ #sbi_admin .sbi-sw-features span{
2492
+ display: block;
2493
+ font-size: 20px;
2494
+ font-weight: bold;
2495
+ }
2496
+ #sbi_admin.sw-landing-page .cta {
2497
+ margin: 20px 0 0 5px;
2498
+ padding: 8px 40px 10px 40px;
2499
+ font-size: 20px;
2500
+ }
2501
+ #sbi_admin .sbi-sw-screenshot img{
2502
+ width: 100%;
2503
+ display: block;
2504
+ }
2505
+ #sbi_admin .sbi-sw-screenshot .cta{
2506
+ position: absolute;
2507
+ top: 50%;
2508
+ left: 50%;
2509
+ margin-top: -32px;
2510
+ margin-left: -80px;
2511
+ padding: 15px 30px 17px 30px;
2512
+ color: #333;
2513
+ text-decoration: none;
2514
+ background: rgba(255,255,255,0.95);
2515
+ border-radius: 3px;
2516
+ /*border: 2px solid rgba(0,0,0,0.1);*/
2517
+ box-shadow: 0 0 20px 0 rgba(0,0,0,0.1);
2518
+ }
2519
+ #sbi_admin .sbi-sw-screenshot:hover .cta,
2520
+ #sbi_admin .sbi-sw-screenshot:focus .cta{
2521
+ background: #e34717;
2522
+ color: #fff;
2523
+ box-shadow: 0;
2524
+ }
2525
+ #sbi_admin .sbi-sw-footer-cta{
2526
+ width: 100%;
2527
+ text-align: center;
2528
+ }
2529
+ #sbi_admin .sbi-sw-footer-cta a{
2530
+ font-size: 22px;
2531
+ display: inline-block;
2532
+ text-decoration: none;
2533
+ line-height: 25px;
2534
+ font-weight: normal;
2535
+ padding: 10px 0 30px 0;
2536
+ }
2537
+ #sbi_admin .sbi-sw-footer-cta span{
2538
+ width: 30px;
2539
+ height: 30px;
2540
+ display: inline-block;
2541
+ margin: 0 10px 0 0;
2542
+ position: relative;
2543
+ top: 4px;
2544
+ }
2545
+ #sbi_admin .sbi-sw-footer-cta span .emoji{
2546
+ width: 30px !important;
2547
+ height: 30px !important;
2548
+ }
2549
+
2550
+ @media all and (max-width: 1500px){
2551
+ #sbi_admin .sbi-sw-screenshot{
2552
+ width: 55%;
2553
+ float: left;
2554
+ height: 500px;
2555
+ background: url('../img/sw-screenshot.png') no-repeat center center;
2556
+ background-size: cover;
2557
+ }
2558
+ #sbi_admin .sbi-sw-screenshot img{
2559
+ display: none;
2560
+ }
2561
+ }
2562
+ @media all and (max-width: 900px){
2563
+ #sbi_admin .sbi-sw-info{
2564
+ padding: 20px 0;
2565
+ }
2566
+ #sbi_admin .sbi-sw-features{
2567
+ width: 100%;
2568
+ padding: 10px 0;
2569
+ margin: 0;
2570
+ }
2571
+ #sbi_admin .sbi-sw-screenshot{
2572
+ width: 100%;
2573
+ padding: 0;
2574
+ height: auto;
2575
+ background: none;
2576
+ }
2577
+ #sbi_admin .sbi-sw-screenshot img{
2578
+ display: block;
2579
+ }
2580
+ #sbi_admin .sbi-sw-features .cta {
2581
+ width: 100%;
2582
+ box-sizing: border-box;
2583
+ text-align: center;
2584
+ margin: 20px 0;
2585
+ }
2586
+ }
2587
+
2588
+ /* Alert bubble */
2589
+ #sbi_admin .nav-tab{
2590
+ position: relative;
2591
+ }
2592
+ #sbi_admin .sbi-alert-bubble{
2593
+ position: absolute;
2594
+ top: -9px;
2595
+ right: -10px;
2596
+
2597
+ display: inline-block;
2598
+ vertical-align: top;
2599
+ box-sizing: border-box;
2600
+ margin: 0;
2601
+ padding: 0 7px;
2602
+ height: 18px;
2603
+
2604
+ border-radius: 9px;
2605
+ background-color: #ca4a1f;
2606
+ color: #fff;
2607
+ font-size: 11px;
2608
+ line-height: 1.6;
2609
+ text-align: center;
2610
+ z-index: 26;
2611
+ }
2612
+
2613
+ /* Install another plugin modal */
2614
+ .sb_cross_install_modal {
2615
+ position: fixed;
2616
+ z-index: 999;
2617
+ width: 100%;
2618
+ top: 0;
2619
+ right: 0;
2620
+ bottom: 0;
2621
+ left: 0;
2622
+ background: rgba(0, 0, 0, 0.3);
2623
+ }
2624
+ .sb_cross_install_inner {
2625
+ position: absolute;
2626
+ top: 140px;
2627
+ left: 50%;
2628
+ width: 480px;
2629
+ margin: 0 0 0 -245px;
2630
+ padding: 35px;
2631
+ background: #fff;
2632
+ text-align: left;
2633
+
2634
+ -webkit-box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2);
2635
+ box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2);
2636
+
2637
+ -moz-border-radius: 3px;
2638
+ -webkit-border-radius: 3px;
2639
+ border-radius: 3px;
2640
+ }
2641
+ .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons .addon-container,
2642
+ .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons .addons-container{
2643
+ width: 100%;
2644
+ margin: 0;
2645
+ padding: 0;
2646
+ min-height: 198px;
2647
+ }
2648
+ .sb_cross_install_modal #sbi-admin-addons .addon-item .action-button button{
2649
+ background: #007cba;
2650
+ border: 0;
2651
+ }
2652
+ .sb_cross_install_modal #sbi-admin-addons .addon-item .action-button button:hover{
2653
+ background: #0071a1;
2654
+ }
2655
+ .sb_cross_install_modal #sbi-admin-about #sbi-admin-addons{
2656
+ padding: 0;
2657
+ }
2658
+ .sb_cross_install_modal .sbi-loader{
2659
+ position: absolute;
2660
+ left: 50%;
2661
+ top: 50%;
2662
+ margin: -10px 0 0 -10px;
2663
+ }
2664
+ /* More social feeds page */
2665
+ #sbi-admin-about #sbi-admin-addons .addon-item .action-button .button.button-primary .fa-spinner {
2666
+ color: #333;
2667
+ }
2668
+ #sbi_admin .sbi_more_plugins h2{
2669
+ margin-top: 15px;
2670
+ }
2671
+ #sbi_admin .sbi_more_plugins #sbi-admin-addons .addons-container{
2672
+ overflow: hidden;
2673
+ margin: 0;
2674
+ }
2675
+ #sbi_admin .sbi_more_plugins#sbi-admin-about #sbi-admin-addons{
2676
+ padding: 20px 0;
2677
+ }
2678
+ #sbi_admin .sbi-more-plugins-intro span{
2679
+ color: #e34f0e;
2680
+ }
2681
+ #sbi_admin .sbi-cols-4{
2682
+ max-width: 1100px;
2683
+ padding-top: 20px;
2684
+ }
2685
+ #sbi_admin .sbi-cols-4 .addon-container{
2686
+ width: 50%;
2687
+ }
2688
+ @media all and (max-width: 780px){
2689
+ #sbi_admin .sbi-cols-4 .addon-container{
2690
+ width: 100%;
2691
+ }
2692
  }
css/sbi-styles.css ADDED
@@ -0,0 +1,819 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**************/
2
+ /*** LAYOUT ***/
3
+ /**************/
4
+
5
+ /* Feed container */
6
+ #sb_instagram {
7
+ width: 100%;
8
+ margin: 0 auto;
9
+ padding: 0;
10
+ -webkit-box-sizing: border-box;
11
+ -moz-box-sizing: border-box;
12
+ box-sizing: border-box;
13
+ }
14
+ #sb_instagram:after{
15
+ content: "";
16
+ display: table;
17
+ clear: both;
18
+ }
19
+
20
+ /*********************/
21
+ /*** STYLE OPTIONS ***/
22
+ /*********************/
23
+ #sb_instagram.sbi_fixed_height{
24
+ overflow: hidden;
25
+ overflow-y: auto;
26
+ -webkit-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
+ box-sizing: border-box;
29
+ }
30
+ #sb_instagram #sbi_images{
31
+ width: 100%;
32
+ float: left;
33
+ line-height: 0;
34
+
35
+ -webkit-box-sizing: border-box;
36
+ -moz-box-sizing: border-box;
37
+ box-sizing: border-box;
38
+ }
39
+ /* Remove header shadow/border */
40
+ #sb_instagram .sbi_header_link {
41
+ -webkit-box-shadow: none;
42
+ box-shadow: none;
43
+ }
44
+ #sb_instagram .sbi_header_link:hover {
45
+ border: none;
46
+ }
47
+
48
+ /* Items */
49
+ #sb_instagram #sbi_images .sbi_item{
50
+ display: -moz-inline-stack;
51
+ display: inline-block;
52
+ float: left;
53
+ vertical-align: top;
54
+ zoom: 1;
55
+ *display: inline;
56
+
57
+ max-height: 1000px;
58
+ padding: inherit !important;
59
+ margin: 0 !important;
60
+ text-decoration: none;
61
+ opacity: 1;
62
+ overflow: hidden;
63
+
64
+ -webkit-box-sizing: border-box;
65
+ -moz-box-sizing: border-box;
66
+ box-sizing: border-box;
67
+
68
+ -webkit-transition: all 0.5s ease;
69
+ -moz-transition: all 0.5s ease;
70
+ -o-transition: all 0.5s ease;
71
+ -ms-transition: all 0.5s ease;
72
+ transition: all 0.5s ease;
73
+ }
74
+ /* Transition items in */
75
+ #sb_instagram #sbi_images .sbi_item.sbi_transition{
76
+ opacity: 0;
77
+ max-height: 0;
78
+ }
79
+
80
+ /* Cols */
81
+ #sb_instagram.sbi_col_1 #sbi_images .sbi_item{ width: 100%; }
82
+ #sb_instagram.sbi_col_2 #sbi_images .sbi_item{ width: 50%; }
83
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item{ width: 33.33%; }
84
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item{ width: 25%; }
85
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item{ width: 20%; }
86
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{ width: 16.66%; }
87
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item{ width: 14.28%; }
88
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item{ width: 12.5%; }
89
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item{ width: 11.11%; }
90
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{ width: 10%; }
91
+
92
+ /* Disable mobile layout */
93
+ #sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{ width: 100%; }
94
+ #sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{ width: 50%; }
95
+ #sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{ width: 33.33%; }
96
+ #sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{ width: 25%; }
97
+ #sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{ width: 20%; }
98
+ #sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{ width: 16.66%; }
99
+ #sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{ width: 14.28%; }
100
+ #sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{ width: 12.5%; }
101
+ #sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{ width: 11.11%; }
102
+ #sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{ width: 10%; }
103
+
104
+ /* Photos */
105
+ #sb_instagram .sbi_photo_wrap{
106
+ position: relative;
107
+ }
108
+ #sb_instagram .sbi_photo{
109
+ display: block;
110
+ text-decoration: none;
111
+ }
112
+ #sb_instagram .sbi_photo img{
113
+ width: 100%;
114
+ height: auto;
115
+ }
116
+ #sb_instagram .sbi_no_js img{
117
+ display: none;
118
+ }
119
+ #sb_instagram a,
120
+ #sb_instagram a:hover,
121
+ #sb_instagram a:focus,
122
+ #sb_instagram a:active{
123
+ outline: none;
124
+ }
125
+ #sb_instagram img{
126
+ display: block;
127
+ padding: 0 !important;
128
+ margin: 0 !important;
129
+ max-width: 100% !important;
130
+ opacity: 1 !important;
131
+ }
132
+ #sb_instagram .sbi_link{
133
+ display: none;
134
+ position: absolute;
135
+ bottom: 0;
136
+ right: 0;
137
+
138
+ width: 100%;
139
+ padding: 10px 0;
140
+ background: rgba(0,0,0,0.5);
141
+ text-align: center;
142
+ color: #fff;
143
+ font-size: 12px;
144
+ line-height: 1.1;
145
+ }
146
+ #sb_instagram .sbi_link a{
147
+ padding: 0 6px;
148
+ text-decoration: none;
149
+ color: #fff;
150
+ font-size: 12px;
151
+ line-height: 1.1;
152
+
153
+ display: -moz-inline-stack;
154
+ display: inline-block;
155
+ vertical-align: top;
156
+ zoom: 1;
157
+ *display: inline;
158
+ }
159
+ #sb_instagram .sbi_link .sbi_lightbox_link{
160
+ padding-bottom: 5px;
161
+ }
162
+ #sb_instagram .sbi_link a:hover,
163
+ #sb_instagram .sbi_link a:focus{
164
+ text-decoration: underline;
165
+ }
166
+ #sb_instagram .sbi_photo_wrap:hover .sbi_link,
167
+ #sb_instagram .sbi_photo_wrap:focus .sbi_link{
168
+ display: block;
169
+ }
170
+
171
+ /* Videos */
172
+ #sb_instagram svg:not(:root).svg-inline--fa {
173
+ height: 1em;
174
+ display: inline-block;
175
+ }
176
+
177
+ #sb_instagram .sbi_type_video .sbi_playbtn,
178
+ #sb_instagram .sbi_type_carousel .sbi_playbtn,
179
+ .sbi_type_carousel .fa-clone,
180
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,
181
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play{
182
+ display: block !important;
183
+ position: absolute;
184
+ z-index: 1;
185
+
186
+ color: #fff;
187
+ color: rgba(255,255,255,0.9);
188
+ font-style: normal !important;
189
+ text-shadow: 0 0 8px rgba(0,0,0,0.8);
190
+ }
191
+ #sb_instagram .sbi_type_video .sbi_playbtn,
192
+ #sb_instagram .sbi_type_carousel .sbi_playbtn {
193
+ z-index: 2;
194
+ top: 50%;
195
+ left: 50%;
196
+ margin-top: -24px;
197
+ margin-left: -19px;
198
+ padding: 0;
199
+ font-size: 48px;
200
+ }
201
+ #sb_instagram .sbi_type_carousel .fa-clone{
202
+ right: 12px;
203
+ top: 12px;
204
+ font-size: 24px;
205
+ text-shadow: 0 0 8px rgba(0,0,0,0.3);
206
+ }
207
+ .sbi_type_carousel svg.fa-clone,
208
+ #sb_instagram .sbi_type_video .svg-inline--fa.fa-play,
209
+ #sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{
210
+ -webkit-filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
211
+ filter: drop-shadow( 0px 0px 2px rgba(0,0,0,.4) );
212
+ }
213
+
214
+ /* Loader */
215
+ #sb_instagram .sbi_loader{
216
+ width: 20px;
217
+ height: 20px;
218
+
219
+ position: relative;
220
+ top: 50%;
221
+ left: 50%;
222
+ margin: -10px 0 0 -10px;
223
+ background-color: #000;
224
+ background-color: rgba(0,0,0,0.5);
225
+
226
+ border-radius: 100%;
227
+ -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
228
+ animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
229
+ }
230
+ #sb_instagram br {
231
+ display: none;
232
+ }
233
+ #sbi_load p {
234
+ display: inline;
235
+ padding: 0;
236
+ margin: 0;
237
+ }
238
+ /* Loader in button */
239
+ #sb_instagram #sbi_load .sbi_loader{
240
+ position: absolute;
241
+ margin-top: -11px;
242
+ background-color: #fff;
243
+ opacity: 1;
244
+ }
245
+ @-webkit-keyframes sbi-sk-scaleout {
246
+ 0% { -webkit-transform: scale(0) }
247
+ 100% {
248
+ -webkit-transform: scale(1.0);
249
+ opacity: 0;
250
+ }
251
+ }
252
+ @keyframes sbi-sk-scaleout {
253
+ 0% {
254
+ -webkit-transform: scale(0);
255
+ -ms-transform: scale(0);
256
+ transform: scale(0);
257
+ } 100% {
258
+ -webkit-transform: scale(1.0);
259
+ -ms-transform: scale(1.0);
260
+ transform: scale(1.0);
261
+ opacity: 0;
262
+ }
263
+ }
264
+
265
+ #sb_instagram .fa-spin,
266
+ #sbi_lightbox .fa-spin{
267
+ -webkit-animation: fa-spin 2s infinite linear;
268
+ animation: fa-spin 2s infinite linear
269
+ }
270
+
271
+ #sb_instagram .fa-pulse,
272
+ #sbi_lightbox .fa-pulse{
273
+ -webkit-animation: fa-spin 1s infinite steps(8);
274
+ animation: fa-spin 1s infinite steps(8)
275
+ }
276
+
277
+ @-webkit-keyframes fa-spin {
278
+ 0% {
279
+ -webkit-transform: rotate(0deg);
280
+ transform: rotate(0deg)
281
+ }
282
+ 100% {
283
+ -webkit-transform: rotate(359deg);
284
+ transform: rotate(359deg)
285
+ }
286
+ }
287
+
288
+ @keyframes fa-spin {
289
+ 0% {
290
+ -webkit-transform: rotate(0deg);
291
+ transform: rotate(0deg)
292
+ }
293
+ 100% {
294
+ -webkit-transform: rotate(359deg);
295
+ transform: rotate(359deg)
296
+ }
297
+ }
298
+ /* Screen reader */
299
+ .sbi-screenreader{text-indent: -9999px !important;display: block !important;width: 0 !important;height: 0 !important;line-height: 0 !important;text-align: left !important; }
300
+
301
+ /* HEADER */
302
+ #sb_instagram .sb_instagram_header{
303
+ float: left;
304
+ clear: both;
305
+ margin: 0 0 15px 0;
306
+ padding: 0;
307
+ line-height: 1.2;
308
+ width: 100%;
309
+ }
310
+ #sb_instagram .sb_instagram_header a{
311
+ float: left;
312
+ display: block;
313
+ /*width: 100%;*/
314
+ min-width: 100%\9;
315
+ text-decoration: none;
316
+ transition: color 0.5s ease;
317
+ }
318
+ .sbi_no_avatar .sbi_header_img{
319
+ background: #333;
320
+ color: #fff;
321
+ width: 50px;
322
+ height: 50px;
323
+ position: relative;
324
+ }
325
+ .sbi_no_avatar .sbi_header_hashtag_icon {
326
+ display: block;
327
+ color: #fff;
328
+ opacity: .9;
329
+ -webkit-transition: background .6s linear,color .6s linear;
330
+ -moz-transition: background .6s linear,color .6s linear;
331
+ -ms-transition: background .6s linear,color .6s linear;
332
+ -o-transition: background .6s linear,color .6s linear;
333
+ transition: background .6s linear,color .6s linear
334
+ }
335
+
336
+ .sbi_no_avatar:hover .sbi_header_hashtag_icon {
337
+ display: block;
338
+ opacity: 1;
339
+ -webkit-transition: background .2s linear,color .2s linear;
340
+ -moz-transition: background .2s linear,color .2s linear;
341
+ -ms-transition: background .2s linear,color .2s linear;
342
+ -o-transition: background .2s linear,color .2s linear;
343
+ transition: background .2s linear,color .2s linear
344
+ }
345
+ /** Medium Header */
346
+ /* Only use medium & large headers on devices above 480px */
347
+ @media all and (min-width: 480px){
348
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
349
+ width: 80px;
350
+ height: 80px;
351
+ border-radius: 40px;
352
+ }
353
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
354
+ width: 80px;
355
+ height: 80px;
356
+ border-radius: 40px;
357
+ }
358
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
359
+ font-size: 20px;
360
+ }
361
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
362
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
363
+ font-size: 14px;
364
+ }
365
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,
366
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
367
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
368
+ margin-left: 95px !important;
369
+ line-height: 1.4
370
+ }
371
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{
372
+ margin-right: -85px !important;
373
+ }
374
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
375
+ margin-top: 4px !important;
376
+ }
377
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{
378
+ padding-top: 20px !important;
379
+ }
380
+ /** Large Header */
381
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
382
+ width: 120px;
383
+ height: 120px;
384
+ border-radius: 60px;
385
+ }
386
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
387
+ width: 120px;
388
+ height: 120px;
389
+ border-radius: 60px;
390
+ }
391
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
392
+ font-size: 28px;
393
+ }
394
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
395
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
396
+ font-size: 16px;
397
+ }
398
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,
399
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
400
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
401
+ margin-left: 140px !important;
402
+ line-height: 1.5;
403
+ }
404
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{
405
+ margin-right: -120px !important;
406
+ }
407
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
408
+ margin-top: 12px !important;
409
+ }
410
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{
411
+ padding-top: 32px !important;
412
+ }
413
+ }
414
+
415
+ /* Header profile pic */
416
+ #sb_instagram .sb_instagram_header .sbi_header_img{
417
+ float: left;
418
+ position: relative;
419
+ width: 50px;
420
+ margin: 0 0 0 -100% !important;
421
+ overflow: hidden;
422
+
423
+ -moz-border-radius: 40px;
424
+ -webkit-border-radius: 40px;
425
+ border-radius: 40px;
426
+ }
427
+ #sb_instagram .sb_instagram_header .sbi_header_img img{
428
+ float: left;
429
+ margin: 0 !important;
430
+ padding: 0 !important;
431
+ border: none !important;
432
+
433
+ -moz-border-radius: 40px;
434
+ -webkit-border-radius: 40px;
435
+ border-radius: 40px;
436
+ }
437
+ /* Profile pic hover */
438
+ /* Profile pic hover */
439
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
440
+ opacity: 0;
441
+ position: absolute;
442
+ width: 100%;
443
+ top: 0;
444
+ bottom: 0;
445
+ left: 0;
446
+ text-align: center;
447
+ color: #fff;
448
+ background: rgba(0,0,0,0.75);
449
+ }
450
+
451
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo,
452
+ #sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo{
453
+ position: absolute;
454
+ top: 50%;
455
+ left: 50%;
456
+ margin-top: -12px;
457
+ margin-left: -12px;
458
+ width: 24px;
459
+ height: 24px;
460
+ font-size: 24px;
461
+ }
462
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,
463
+ .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{
464
+ margin-top: -18px;
465
+ margin-left: -18px;
466
+ width: 36px;
467
+ height: 36px;
468
+ font-size: 36px
469
+ }
470
+
471
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,
472
+ .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo {
473
+ margin-top: -24px;
474
+ margin-left: -24px;
475
+ width: 48px;
476
+ height: 48px;
477
+ font-size: 48px
478
+ }
479
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover i {
480
+ overflow: hidden;
481
+ background: url('../img/small-logo.png') no-repeat 0 0;
482
+ }
483
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
484
+ z-index: 2;
485
+ transition: opacity 0.4s ease-in-out;
486
+ }
487
+ #sb_instagram .sb_instagram_header .sbi_fade_in{
488
+ opacity: 1;
489
+ transition: opacity 0.2s ease-in-out;
490
+ }
491
+ #sb_instagram .sb_instagram_header .sbi_header_img_hover{
492
+ position: absolute;
493
+ width: 100%;
494
+ top: 0;
495
+ bottom: 0;
496
+ left: 0;
497
+ text-align: center;
498
+ color: #fff;
499
+ background: rgba(0,0,0,0.75);
500
+
501
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
502
+ filter: alpha(opacity=0);
503
+ -moz-opacity: 0;
504
+ -khtml-opacity: 0;
505
+ opacity: 0;
506
+ border-radius: 40px;
507
+ transition: opacity 0.2s;
508
+ }
509
+ /* Fade the Instagram icon in when hovering on the header */
510
+ #sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,
511
+ #sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
512
+ opacity: 1;
513
+ }
514
+ /* Header text */
515
+ #sb_instagram .sb_instagram_header .sbi_header_text{
516
+ float: left;
517
+ width: 100%;
518
+ padding-top: 5px;
519
+ }
520
+ #sb_instagram .sb_instagram_header a{
521
+ text-decoration: none;
522
+ }
523
+ #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,
524
+ #sb_instagram .sb_instagram_header .sbi_header_text h3{
525
+ float: left;
526
+ clear: both;
527
+ width: auto;
528
+ margin: 0 0 0 60px !important;
529
+ padding: 0 !important;
530
+ }
531
+ #sb_instagram .sb_instagram_header h3{
532
+ font-size: 16px;
533
+ line-height: 1.3;
534
+ }
535
+ #sb_instagram .sb_instagram_header p{
536
+ font-size: 13px;
537
+ line-height: 1.3;
538
+ margin: 0;
539
+ padding: 0;
540
+ }
541
+ #sb_instagram p:empty { display: none; }
542
+ #sb_instagram .sb_instagram_header .sbi_header_text img.emoji{
543
+ margin-right: 3px !important;
544
+ }
545
+
546
+ /* No bio */
547
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{
548
+ padding-top: 9px !important;
549
+ }
550
+ #sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{
551
+ clear: both;
552
+ }
553
+
554
+
555
+ /* Buttons */
556
+ #sb_instagram #sbi_load{
557
+ float: left;
558
+ clear: both;
559
+ width: 100%;
560
+ text-align: center;
561
+ }
562
+ #sb_instagram #sbi_load .fa-spinner{
563
+ display: none;
564
+ position: absolute;
565
+ top: 50%;
566
+ left: 50%;
567
+ margin: -8px 0 0 -7px;
568
+ font-size: 15px;
569
+ }
570
+ #sb_instagram #sbi_load{
571
+ opacity: 1;
572
+ transition: all 0.5s ease-in;
573
+ }
574
+ #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
575
+ opacity: 1;
576
+ transition: all 0.1s ease-in;
577
+ }
578
+ #sb_instagram .sbi_hidden{
579
+ opacity: 0 !important;
580
+ }
581
+ #sb_instagram #sbi_load .sbi_load_btn,
582
+ #sb_instagram .sbi_follow_btn a{
583
+ display: -moz-inline-stack;
584
+ display: inline-block;
585
+ vertical-align: top;
586
+ zoom: 1;
587
+ *display: inline;
588
+
589
+ padding: 7px 14px;
590
+ margin: 5px auto 0 auto;
591
+ background: #333;
592
+ color: #eee;
593
+ border: none;
594
+ color: #fff;
595
+ text-decoration: none;
596
+ font-size: 13px;
597
+ line-height: 1.5;
598
+
599
+ -moz-border-radius: 4px;
600
+ -webkit-border-radius: 4px;
601
+ border-radius: 4px;
602
+
603
+ -webkit-box-sizing: border-box;
604
+ -moz-box-sizing: border-box;
605
+ box-sizing: border-box;
606
+ }
607
+ #sb_instagram #sbi_load .sbi_load_btn {
608
+ position: relative;
609
+ }
610
+ /* Follow button */
611
+ #sb_instagram .sbi_follow_btn{
612
+ display: -moz-inline-stack;
613
+ display: inline-block;
614
+ vertical-align: top;
615
+ zoom: 1;
616
+ *display: inline;
617
+ text-align: center;
618
+ }
619
+ #sb_instagram .sbi_follow_btn.sbi_top{
620
+ display: block;
621
+ margin-bottom: 5px;
622
+ }
623
+ #sb_instagram .sbi_follow_btn a{
624
+ background: #408bd1;
625
+ color: #fff;
626
+ }
627
+ #sb_instagram .sbi_follow_btn a,
628
+ #sb_instagram .sbi_follow_btn a,
629
+ #sb_instagram #sbi_load .sbi_load_btn{
630
+ transition: all 0.1s ease-in;
631
+ }
632
+ /* Hover state for default colors */
633
+ #sb_instagram #sbi_load .sbi_load_btn:hover{
634
+ outline: none;
635
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
636
+ }
637
+ #sb_instagram .sbi_follow_btn a:hover,
638
+ #sb_instagram .sbi_follow_btn a:focus{
639
+ outline: none;
640
+ box-shadow: inset 0 0 10px 20px #359dff;
641
+ }
642
+ /* If a custom color is applied then just use opacity for the hover effect */
643
+ #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
644
+ #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
645
+ #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
646
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
647
+ }
648
+ /* Active state */
649
+ #sb_instagram .sbi_follow_btn a:active,
650
+ #sb_instagram #sbi_load .sbi_load_btn:active{
651
+ box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
652
+ }
653
+
654
+ #sb_instagram .sbi_follow_btn .fa,
655
+ #sb_instagram .sbi_follow_btn svg{
656
+ margin-bottom: -1px;
657
+ margin-right: 7px;
658
+ font-size: 15px;
659
+ }
660
+ #sb_instagram .sbi_follow_btn svg{
661
+ vertical-align: -.125em;
662
+ }
663
+ #sb_instagram #sbi_load .sbi_follow_btn{
664
+ margin-left: 5px;
665
+ }
666
+
667
+ /* Error messages */
668
+ #sb_instagram .sb_instagram_error{
669
+ width: 100%;
670
+ text-align: center;
671
+ line-height: 1.4;
672
+ }
673
+
674
+ /* Mod only error msgs */
675
+ #sbi_mod_error{
676
+ display: none;
677
+ border: 1px solid #ddd;
678
+ background: #eee;
679
+ color: #333;
680
+ margin: 10px 0 0;
681
+ padding: 10px 15px;
682
+ font-size: 13px;
683
+ text-align: center;
684
+ clear: both;
685
+
686
+ -moz-border-radius: 4px;
687
+ -webkit-border-radius: 4px;
688
+ border-radius: 4px;
689
+ }
690
+ #sbi_mod_error br {
691
+ display: initial !important;
692
+ }
693
+ #sbi_mod_error p{
694
+ padding: 5px 0 !important;
695
+ margin: 0 !important;
696
+ line-height: 1.3 !important;
697
+ }
698
+ #sbi_mod_error ol,
699
+ #sbi_mod_error ul{
700
+ padding: 5px 0 5px 20px !important;
701
+ margin: 0 !important;
702
+ }
703
+ #sbi_mod_error li{
704
+ padding: 1px 0 !important;
705
+ margin: 0 !important;
706
+ }
707
+ #sbi_mod_error span{
708
+ font-size: 12px;
709
+ }
710
+
711
+ /* Medium */
712
+ #sb_instagram.sbi_medium .sbi_playbtn,
713
+ #sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{
714
+ margin-top: -12px;
715
+ margin-left: -9px;
716
+ font-size: 23px;
717
+ }
718
+ #sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{
719
+ right: 8px;
720
+ top: 8px;
721
+ font-size: 18px;
722
+ }
723
+ /* Small */
724
+ #sb_instagram.sbi_small .sbi_playbtn,
725
+ #sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{
726
+ margin-top: -9px;
727
+ margin-left: -7px;
728
+ font-size: 18px;
729
+ }
730
+ #sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{
731
+ right: 5px;
732
+ top: 5px;
733
+ font-size: 12px;
734
+ }
735
+
736
+ /* Media queries */
737
+ @media all and (max-width: 640px){
738
+ /* Make 3-6 cols into 2 col */
739
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
740
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
741
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
742
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item{
743
+ width: 50%;
744
+ }
745
+ /* Make 7-10 cols into 4 col */
746
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
747
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
748
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
749
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
750
+ width: 25%;
751
+ }
752
+ /* On mobile make the min-width 100% */
753
+ #sb_instagram.sbi_width_resp{
754
+ width: 100% !important;
755
+ }
756
+ }
757
+ @media all and (max-width: 480px){
758
+ /* Make all cols into 1 col */
759
+ #sb_instagram.sbi_col_3 #sbi_images .sbi_item,
760
+ #sb_instagram.sbi_col_4 #sbi_images .sbi_item,
761
+ #sb_instagram.sbi_col_5 #sbi_images .sbi_item,
762
+ #sb_instagram.sbi_col_6 #sbi_images .sbi_item,
763
+ #sb_instagram.sbi_col_7 #sbi_images .sbi_item,
764
+ #sb_instagram.sbi_col_8 #sbi_images .sbi_item,
765
+ #sb_instagram.sbi_col_9 #sbi_images .sbi_item,
766
+ #sb_instagram.sbi_col_10 #sbi_images .sbi_item{
767
+ width: 100%;
768
+ }
769
+ }
770
+
771
+ /* NO JS */
772
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{
773
+ box-sizing: border-box;
774
+ position: relative;
775
+ overflow: hidden;
776
+ }
777
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before {
778
+ content: "";
779
+ display: block;
780
+ padding-top: 100%;
781
+ z-index: -300;
782
+ }
783
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo {
784
+ position: absolute;
785
+ top: 0;
786
+ left: 0;
787
+ bottom: 0;
788
+ right: 0;
789
+ }
790
+ #sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition {
791
+ opacity: 1;
792
+ max-height: 640px;
793
+ }
794
+ #sb_instagram.sbi_no_js .sbi_photo img,
795
+ #sb_instagram.sbi_no_js .sbi_load_btn{
796
+ display: none;
797
+ }
798
+ #sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
799
+ padding-bottom: 0 !important;
800
+ }
801
+ #sb_instagram #sbi_mod_error .sb_frontend_btn {
802
+ display: inline-block;
803
+ padding: 6px 10px;
804
+ background: #ddd;
805
+ background: rgba(0,0,0,.1);
806
+ text-decoration: none;
807
+ border-radius: 5px;
808
+ margin-top: 10px;
809
+ color: #444
810
+ }
811
+
812
+ #sb_instagram #sbi_mod_error .sb_frontend_btn:hover {
813
+ background: #ccc;
814
+ background: rgba(0,0,0,.15)
815
+ }
816
+
817
+ #sb_instagram #sbi_mod_error .sb_frontend_btn .fa {
818
+ margin-right: 2px
819
+ }
css/sbi-styles.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram .sbi_header_link{-webkit-box-shadow:none;box-shadow:none}#sb_instagram .sbi_header_link:hover{border:none}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em;display:inline-block}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important;text-align:left!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}.sbi_no_avatar .sbi_header_img{background:#333;color:#fff;width:50px;height:50px;position:relative}.sbi_no_avatar .sbi_header_hashtag_icon{display:block;color:#fff;opacity:.9;-webkit-transition:background .6s linear,color .6s linear;-moz-transition:background .6s linear,color .6s linear;-ms-transition:background .6s linear,color .6s linear;-o-transition:background .6s linear,color .6s linear;transition:background .6s linear,color .6s linear}.sbi_no_avatar:hover .sbi_header_hashtag_icon{display:block;opacity:1;-webkit-transition:background .2s linear,color .2s linear;-moz-transition:background .2s linear,color .2s linear;-ms-transition:background .2s linear,color .2s linear;-o-transition:background .2s linear,color .2s linear;transition:background .2s linear,color .2s linear}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_hashtag_icon .sbi_new_logo,#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_medium .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-18px;margin-left:-18px;width:36px;height:36px;font-size:36px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo,.sb_instagram_header.sbi_large .sbi_header_hashtag_icon .sbi_new_logo{margin-top:-24px;margin-left:-24px;width:48px;height:48px;font-size:48px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error br{display:initial!important}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}#sb_instagram #sbi_mod_error .sb_frontend_btn{display:inline-block;padding:6px 10px;background:#ddd;background:rgba(0,0,0,.1);text-decoration:none;border-radius:5px;margin-top:10px;color:#444}#sb_instagram #sbi_mod_error .sb_frontend_btn:hover{background:#ccc;background:rgba(0,0,0,.15)}#sb_instagram #sbi_mod_error .sb_frontend_btn .fa{margin-right:2px}
img/about/plugin-if.png ADDED
Binary file
img/sbi-oembed.png ADDED
Binary file
img/sw-screenshot.png ADDED
Binary file
inc/admin/actions.php CHANGED
@@ -1171,7 +1171,7 @@ function sbi_notices_html() {
1171
  <div class='sbi_notice sbi_review_notice'>
1172
  <img src='". SBI_PLUGIN_URL . 'img/sbi-icon.png' ."' alt='" . __( 'Instagram Feed', 'instagram-feed' ) . "'>
1173
  <div class='sbi-notice-text'>
1174
- <p style='padding-top: 4px;'>" . sprintf( __( "It's great to see that you've been using the %sInstagram Feed%s plugin for a while now. Hopefully you're happy with it!&nbsp; If so, would you consider leaving a positive review? It really helps to support the plugin and helps others to discover it too!", 'instagram-feed' ), '<strong style=\'font-weight: 700;\'>', '</strong>' ) . "</p>
1175
  <p class='links'";
1176
  if( $should_show_bfcm_discount ) echo " style='margin-top: 0 !important;'";
1177
  echo ">
@@ -1198,7 +1198,7 @@ function sbi_notices_html() {
1198
  <div class='sbi_notice sbi_review_notice sbi_new_user_sale_notice'>
1199
  <img src='" . SBI_PLUGIN_URL . 'img/sbi-icon-offer.png' . "' alt='Instagram Feed'>
1200
  <div class='sbi-notice-text'>
1201
- <p><b style'font-weight: 700;'>" . sprintf( __( 'Exclusive offer!%s We don\'t run promotions very often, but for a limited time we\'re offering %s60%% off%s our Pro version to all users of our free Instagram Feed plugin.', 'instagram-feed' ), '</b> ', '<b style="font-weight: 700;">', '</b>' ) . "</p>
1202
  <p class='sbi-links'>
1203
  <a class='sbi_notice_dismiss sbi_offer_btn' href='https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=newuser&discount=instagramthankyou' target='_blank'><b>" . __( 'Get this offer', 'instagram-feed' ) . "</b></a>
1204
  <a class='sbi_notice_dismiss' style='margin-left: 5px;' href='" . esc_url( add_query_arg( 'sbi_ignore_new_user_sale_notice', 'always' ) ) . "'>" . __( 'I\'m not interested', 'instagram-feed' ) . "</a>
@@ -1299,7 +1299,7 @@ function sbi_get_future_date( $month, $year, $week, $day, $direction ) {
1299
  function sbi_admin_hide_unrelated_notices() {
1300
 
1301
  // Bail if we're not on a sbi screen or page.
1302
- if ( ! isset( $_GET['page'] ) || strpos( $_GET['page'], 'sb-instagram-feed') === false ) {
1303
  return;
1304
  }
1305
 
@@ -1402,4 +1402,26 @@ function sbi_usage_opt_in_or_out() {
1402
 
1403
  die();
1404
  }
1405
- add_action( 'wp_ajax_sbi_usage_opt_in_or_out', 'sbi_usage_opt_in_or_out' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1171
  <div class='sbi_notice sbi_review_notice'>
1172
  <img src='". SBI_PLUGIN_URL . 'img/sbi-icon.png' ."' alt='" . __( 'Instagram Feed', 'instagram-feed' ) . "'>
1173
  <div class='sbi-notice-text'>
1174
+ <p style='padding-top: 4px;'>" . sprintf( __( "It's great to see that you've been using the %1sInstagram Feed%2s plugin for a while now. Hopefully you're happy with it!&nbsp; If so, would you consider leaving a positive review? It really helps to support the plugin and helps others to discover it too!", 'instagram-feed' ), '<strong style=\'font-weight: 700;\'>', '</strong>' ) . "</p>
1175
  <p class='links'";
1176
  if( $should_show_bfcm_discount ) echo " style='margin-top: 0 !important;'";
1177
  echo ">
1198
  <div class='sbi_notice sbi_review_notice sbi_new_user_sale_notice'>
1199
  <img src='" . SBI_PLUGIN_URL . 'img/sbi-icon-offer.png' . "' alt='Instagram Feed'>
1200
  <div class='sbi-notice-text'>
1201
+ <p><b style'font-weight: 700;'>" . sprintf( __( 'Exclusive offer!%1s We don\'t run promotions very often, but for a limited time we\'re offering %2s60%% off%3s our Pro version to all users of our free Instagram Feed plugin.', 'instagram-feed' ), '</b> ', '<b style="font-weight: 700;">', '</b>' ) . "</p>
1202
  <p class='sbi-links'>
1203
  <a class='sbi_notice_dismiss sbi_offer_btn' href='https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=newuser&discount=instagramthankyou' target='_blank'><b>" . __( 'Get this offer', 'instagram-feed' ) . "</b></a>
1204
  <a class='sbi_notice_dismiss' style='margin-left: 5px;' href='" . esc_url( add_query_arg( 'sbi_ignore_new_user_sale_notice', 'always' ) ) . "'>" . __( 'I\'m not interested', 'instagram-feed' ) . "</a>
1299
  function sbi_admin_hide_unrelated_notices() {
1300
 
1301
  // Bail if we're not on a sbi screen or page.
1302
+ if ( ! isset( $_GET['page'] ) || ( strpos( $_GET['page'], 'sb-instagram-feed') === false && strpos( $_GET['page'], 'sbi-') === false ) ) {
1303
  return;
1304
  }
1305
 
1402
 
1403
  die();
1404
  }
1405
+ add_action( 'wp_ajax_sbi_usage_opt_in_or_out', 'sbi_usage_opt_in_or_out' );
1406
+
1407
+ function sbi_oembed_disable() {
1408
+ $nonce = isset( $_POST['sbi_nonce'] ) ? sanitize_text_field( $_POST['sbi_nonce'] ) : '';
1409
+
1410
+ if ( ! wp_verify_nonce( $nonce, 'sbi_nonce' ) ) {
1411
+ die ( 'You did not do this the right way!' );
1412
+ }
1413
+
1414
+ $oembed_settings = get_option( 'sbi_oembed_token', array() );
1415
+ $oembed_settings['access_token'] = '';
1416
+ $oembed_settings['disabled'] = true;
1417
+ echo '<strong>';
1418
+ if ( update_option( 'sbi_oembed_token', $oembed_settings ) ) {
1419
+ _e( 'Instagram oEmbeds will no longer be handled by Instagram Feed.', 'instagram-feed' );
1420
+ } else {
1421
+ _e( 'An error occurred when trying to delete your oEmbed token.', 'instagram-feed' );
1422
+ }
1423
+ echo '</strong>';
1424
+
1425
+ die();
1426
+ }
1427
+ add_action( 'wp_ajax_sbi_oembed_disable', 'sbi_oembed_disable' );
inc/admin/class-sbi-about.php CHANGED
@@ -325,9 +325,9 @@ class SB_Instagram_About {
325
 
326
  $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
327
 
328
- if ( $plugin === 'wpforms-lite/wpforms.php' ) {
329
- echo '<h3>' .__( 'Plugins We Recommend', 'instagram-feed' ). '</h3>';
330
- }
331
 
332
  ?>
333
  <div class="addon-container">
@@ -847,7 +847,7 @@ class SB_Instagram_About {
847
  ),
848
  ),
849
 
850
- 'feeds-for-youtube/youtube-feed.php' => array(
851
  'icon' => $images_url . 'plugin-yt.png',
852
  'name' => esc_html__( 'Feeds for YouTube', 'instagram-feed' ),
853
  'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'instagram-feed' ),
325
 
326
  $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
327
 
328
+ if ( $plugin === 'wpforms-lite/wpforms.php' ) {
329
+ echo '<h3>' .__( 'Plugins We Recommend', 'instagram-feed' ). '</h3>';
330
+ }
331
 
332
  ?>
333
  <div class="addon-container">
847
  ),
848
  ),
849
 
850
+ 'youtube-feed/youtube-feed.php' => array(
851
  'icon' => $images_url . 'plugin-yt.png',
852
  'name' => esc_html__( 'Feeds for YouTube', 'instagram-feed' ),
853
  'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'instagram-feed' ),
inc/admin/main.php CHANGED
@@ -40,12 +40,331 @@ function sb_instagram_menu() {
40
  'sb-instagram-feed-about',
41
  'sb_instagram_about_page'
42
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
  add_action('admin_menu', 'sb_instagram_menu');
45
 
46
  function sb_instagram_about_page() {
47
  do_action('sbi_admin_page' );
48
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  function sb_instagram_settings_page() {
51
 
@@ -102,7 +421,7 @@ function sb_instagram_settings_page() {
102
  'enqueue_css_in_shortcode' => false,
103
  'sb_instagram_ajax_theme' => false,
104
  'sb_instagram_disable_resize' => false,
105
- 'sb_instagram_favor_local' => false,
106
  'sb_instagram_minnum' => 0,
107
  'disable_js_image_loading' => false,
108
  'enqueue_js_in_head' => false,
@@ -493,8 +812,6 @@ function sb_instagram_settings_page() {
493
  $new_user_name = false;
494
 
495
 
496
-
497
-
498
  if( isset($_GET['access_token']) && isset($_GET['graph_api']) && empty($_POST) ) { ?>
499
  <?php
500
  $access_token = sbi_maybe_clean(urldecode($_GET['access_token']));
@@ -691,8 +1008,14 @@ function sb_instagram_settings_page() {
691
  <h2 class="nav-tab-wrapper">
692
  <a href="?page=sb-instagram-feed&amp;tab=configure" class="nav-tab <?php echo $sbi_active_tab == 'configure' ? 'nav-tab-active' : ''; ?>"><?php _e( '1. Configure', 'instagram-feed' ); ?></a>
693
  <a href="?page=sb-instagram-feed&amp;tab=customize" class="nav-tab <?php echo $sbi_active_tab == 'customize' ? 'nav-tab-active' : ''; ?>"><?php _e( '2. Customize', 'instagram-feed' ); ?></a>
694
- <a href="?page=sb-instagram-feed&amp;tab=display" class="nav-tab <?php echo $sbi_active_tab == 'display' ? 'nav-tab-active' : ''; ?>"><?php _e( '3. Display Your Feed', 'instagram-feed' ); ?></a>
695
- <a href="?page=sb-instagram-feed&amp;tab=support" class="nav-tab <?php echo $sbi_active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Support', 'instagram-feed' ); ?></a>
 
 
 
 
 
 
696
  </h2>
697
 
698
  <?php if( $sbi_active_tab == 'configure' ) { //Start Configure tab ?>
@@ -961,31 +1284,15 @@ function sb_instagram_settings_page() {
961
  <tr valign="top" class="sbi_cron_cache_opts">
962
  <th scope="row"><?php _e( 'Check for new posts', 'instagram-feed' ); ?></th>
963
  <td>
964
-
965
  <div class="sbi_row">
966
- <input type="radio" name="sbi_caching_type" id="sbi_caching_type_page" value="page" <?php if ( $sbi_caching_type === 'page' ) echo 'checked'; ?>>
967
- <label for="sbi_caching_type_page"><?php _e( 'When the page loads', 'instagram-feed' ); ?></label>
968
  <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>
969
  <p class="sbi_tooltip sbi-more-info"><?php _e( 'Your Instagram post data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data', 'instagram-feed' ); ?>:<br><br>
970
- <?php _e( '<b>1. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check Instagram for new posts the next time that the feed is loaded. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you\'re experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>\'Force cache to clear on interval\'</b> which is located on the \'Customize\' tab.', 'instagram-feed' ); ?>
971
  <br><br>
972
- <?php _e( '<b>2. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from Instagram when the page first loads, but then after that will check in the background on the schedule selected - unless the cache is cleared.</p>', 'instagram-feed' ); ?>
973
- </div>
974
- <div class="sbi_row sbi-caching-page-options" style="display: none;">
975
- <?php _e( 'Every', 'instagram-feed' ); ?>:
976
- <input name="sb_instagram_cache_time" type="text" value="<?php echo esc_attr( $sb_instagram_cache_time ); ?>" size="4" />
977
- <select name="sb_instagram_cache_time_unit">
978
- <option value="minutes" <?php if($sb_instagram_cache_time_unit == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes', 'instagram-feed'); ?></option>
979
- <option value="hours" <?php if($sb_instagram_cache_time_unit == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'instagram-feed'); ?></option>
980
- <option value="days" <?php if($sb_instagram_cache_time_unit == "days") echo 'selected="selected"' ?> ><?php _e('Days', 'instagram-feed'); ?></option>
981
- </select>
982
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
983
- <p class="sbi_tooltip"><?php _e('Your Instagram posts are temporarily cached by the plugin in your WordPress database. You can choose how long the posts should be cached for. If you set the time to 1 hour then the plugin will clear the cache after that length of time and check Instagram for posts again.', 'instagram-feed'); ?></p>
984
- </div>
985
 
986
- <div class="sbi_row">
987
- <input type="radio" name="sbi_caching_type" id="sbi_caching_type_cron" value="background" <?php if ( $sbi_caching_type === 'background' ) echo 'checked'; ?>>
988
- <label for="sbi_caching_type_cron"><?php _e( 'In the background', 'instagram-feed' ); ?></label>
989
  </div>
990
  <div class="sbi_row sbi-caching-cron-options" style="display: block;">
991
 
@@ -997,7 +1304,7 @@ function sb_instagram_settings_page() {
997
  </select>
998
 
999
  <div id="sbi-caching-time-settings" style="display: none;">
1000
- <?php _e('at' ); ?>
1001
 
1002
  <select name="sbi_cache_cron_time" style="width: 80px">
1003
  <option value="1" <?php if ( $sbi_cache_cron_time === '1' ) echo 'selected'; ?>>1:00</option>
@@ -1020,24 +1327,39 @@ function sb_instagram_settings_page() {
1020
  </select>
1021
  </div>
1022
 
1023
- <?php
1024
- if ( wp_next_scheduled( 'sbi_feed_update' ) ) {
1025
- $time_format = get_option( 'time_format' );
1026
- if ( ! $time_format ) {
1027
- $time_format = 'g:i a';
1028
- }
1029
- //
1030
- $schedule = wp_get_schedule( 'sbi_feed_update' );
1031
- if ( $schedule == '30mins' ) $schedule = __( 'every 30 minutes', 'instagram-feed' );
1032
- if ( $schedule == 'twicedaily' ) $schedule = __( 'every 12 hours', 'instagram-feed' );
1033
- $sbi_next_cron_event = wp_next_scheduled( 'sbi_feed_update' );
1034
- echo '<p class="sbi-caching-sched-notice"><span><b>' . __( 'Next check', 'instagram-feed' ) . ': ' . date( $time_format, $sbi_next_cron_event + sbi_get_utc_offset() ) . ' (' . $schedule . ')</b> - ' . __( 'Note: Saving the settings on this page will clear the cache and reset this schedule', 'instagram-feed' ) . '</span></p>';
1035
- } else {
1036
- echo '<p style="font-size: 11px; color: #666;">' . __( 'Nothing currently scheduled', 'instagram-feed' ) . '</p>';
1037
- }
1038
- ?>
1039
 
1040
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1041
 
1042
  </td>
1043
  </tr>
@@ -2559,7 +2881,6 @@ function sb_instagram_settings_page() {
2559
 
2560
  <div class="sbi_support">
2561
 
2562
- <br/>
2563
  <h3 style="padding-bottom: 10px;"><?php _e("Need help?", 'instagram-feed'); ?></h3>
2564
 
2565
  <p>
@@ -2887,7 +3208,272 @@ if ( ! $ajax_statuses['successful'] ) {
2887
 
2888
  <?php
2889
  } //End Support tab
2890
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2891
 
2892
 
2893
  <div class="sbi_quickstart">
40
  'sb-instagram-feed-about',
41
  'sb_instagram_about_page'
42
  );
43
+
44
+ add_submenu_page(
45
+ 'sb-instagram-feed',
46
+ __( 'oEmbeds', 'instagram-feed' ),
47
+ '<svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="far" data-icon="code" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-code fa-w-18 fa-2x"><path fill="currentColor" d="M234.8 511.7L196 500.4c-4.2-1.2-6.7-5.7-5.5-9.9L331.3 5.8c1.2-4.2 5.7-6.7 9.9-5.5L380 11.6c4.2 1.2 6.7 5.7 5.5 9.9L244.7 506.2c-1.2 4.3-5.6 6.7-9.9 5.5zm-83.2-121.1l27.2-29c3.1-3.3 2.8-8.5-.5-11.5L72.2 256l106.1-94.1c3.4-3 3.6-8.2.5-11.5l-27.2-29c-3-3.2-8.1-3.4-11.3-.4L2.5 250.2c-3.4 3.2-3.4 8.5 0 11.7L140.3 391c3.2 3 8.2 2.8 11.3-.4zm284.1.4l137.7-129.1c3.4-3.2 3.4-8.5 0-11.7L435.7 121c-3.2-3-8.3-2.9-11.3.4l-27.2 29c-3.1 3.3-2.8 8.5.5 11.5L503.8 256l-106.1 94.1c-3.4 3-3.6 8.2-.5 11.5l27.2 29c3.1 3.2 8.1 3.4 11.3.4z" class=""></path></svg>' . __( 'oEmbeds', 'instagram-feed' ),
48
+ $cap,
49
+ 'sbi-oembeds',
50
+ 'sbi_oembeds_page'
51
+ );
52
+
53
+ //Show a Instagram plugin menu item if it isn't already installed
54
+ if( !is_plugin_active( 'custom-facebook-feed/custom-facebook-feed.php' ) && !is_plugin_active( 'custom-facebook-feed-pro/custom-facebook-feed.php' ) ){
55
+ add_submenu_page(
56
+ 'sb-instagram-feed',
57
+ __( 'Facebook Feed', 'instagram-feed' ),
58
+ '<span class="sbi_get_cff"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-facebook fa-w-16 fa-2x"><path fill="currentColor" d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z" class=""></path></svg>' . __( 'Facebook Feed', 'instagram-feed' ) . '</span>',
59
+ $cap,
60
+ 'admin.php?page=sb-instagram-feed&tab=more',
61
+ ''
62
+ );
63
+ }
64
+
65
+ //Show a Twitter plugin menu item if it isn't already installed
66
+ if( !is_plugin_active( 'custom-twitter-feeds/custom-twitter-feed.php' ) && !is_plugin_active( 'custom-twitter-feeds-pro/custom-twitter-feed.php' ) ){
67
+ add_submenu_page(
68
+ 'sb-instagram-feed',
69
+ __( 'Twitter Feed', 'instagram-feed' ),
70
+ '<span class="sbi_get_ctf"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-twitter fa-w-16 fa-2x"><path fill="currentColor" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" class=""></path></svg>' . __( 'Twitter Feed', 'instagram-feed' ) . '</span>',
71
+ $cap,
72
+ 'admin.php?page=sb-instagram-feed&tab=more',
73
+ ''
74
+ );
75
+ }
76
+
77
+ //Show a YouTube plugin menu item if it isn't already installed
78
+ if( !is_plugin_active( 'feeds-for-youtube/youtube-feed.php' ) && !is_plugin_active( 'youtube-feed-pro/youtube-feed.php' ) ){
79
+ add_submenu_page(
80
+ 'sb-instagram-feed',
81
+ __( 'YouTube Feed', 'instagram-feed' ),
82
+ '<span class="sbi_get_yt"><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="youtube" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-youtube fa-w-18 fa-2x"><path fill="currentColor" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" class=""></path></svg>' . __( 'YouTube Feed', 'instagram-feed' ) . '</span>',
83
+ $cap,
84
+ 'admin.php?page=sb-instagram-feed&tab=more',
85
+ ''
86
+ );
87
+ }
88
+
89
+ add_submenu_page(
90
+ 'sb-instagram-feed',
91
+ __( 'Social Wall', 'instagram-feed' ),
92
+ '<span><svg style="height: 14px; margin: 0 8px 0 0; position: relative; top: 2px;" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="th" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-th fa-w-16 fa-2x"><path fill="currentColor" d="M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z" class=""></path></svg>' . __( 'Social Wall', 'instagram-feed' ) . '</span>',
93
+ $cap,
94
+ 'sbi-sw',
95
+ 'sbi_social_wall_page'
96
+ );
97
+
98
+
99
  }
100
  add_action('admin_menu', 'sb_instagram_menu');
101
 
102
  function sb_instagram_about_page() {
103
  do_action('sbi_admin_page' );
104
  }
105
+ function sbi_oembeds_page() {
106
+ ( is_plugin_active( 'social-wall/social-wall.php' ) ) ? $sbi_sw_active = true : $sbi_sw_active = false;
107
+ ?>
108
+
109
+ <div id="sbi_admin" class="wrap sbi-oembeds">
110
+ <?php
111
+ $lite_notice_dismissed = get_transient( 'instagram_feed_dismiss_lite' );
112
+
113
+ if ( ! $lite_notice_dismissed ) :
114
+ ?>
115
+ <div id="sbi-notice-bar" style="display:none">
116
+ <span class="sbi-notice-bar-message"><?php _e( 'You\'re using Instagram Feed Lite. To unlock more features consider <a href="https://smashballoon.com/instagram-feed/?utm_campaign=instagram-free&utm_source=notices&utm_medium=litenotice" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'instagram-feed'); ?></span>
117
+ <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'instagram-feed'); ?>" data-page="overview">
118
+ </button>
119
+ </div>
120
+ <?php endif; ?>
121
+ <div id="header">
122
+ <h1><?php _e('Instagram oEmbeds', 'instagram-feed'); ?></h1>
123
+ </div>
124
+
125
+ <p>
126
+ <?php
127
+ _e( "You can use the Instagram Feed plugin to power your Instagram oEmbeds, both old and new.", 'instagram-feed' );
128
+ if ( ! SB_Instagram_Oembed::can_do_oembed() ) {
129
+ echo ' ';
130
+ _e( "Just click the button below and we'll do the rest.", 'instagram-feed' );
131
+ }
132
+ ?>
133
+ </p>
134
+
135
+ <div class="sbi-oembed-button">
136
+
137
+ <?php
138
+ $admin_url_state = admin_url('admin.php?page=sbi-oembeds');
139
+ //If the admin_url isn't returned correctly then use a fallback
140
+ if ( $admin_url_state == '/wp-admin/admin.php?page=sbi-oembeds' ){
141
+ $admin_url_state = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
142
+ }
143
+ $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
144
+ $saved_access_token_data = isset( $oembed_token_settings['access_token'] ) ? $oembed_token_settings['access_token'] : false;
145
+
146
+ $access_token_error = false;
147
+ $valid_new_access_token = false;
148
+ $error_message = '';
149
+ $show_token_expiration_modal = false;
150
+ if ( ! empty( $_GET['access_token'] ) && strlen( $_GET['access_token'] ) <= 20 ) {
151
+ $access_token_error = true;
152
+ $error_message = __("There was a problem with the access token that was retrieved.", 'instagram-feed' );
153
+
154
+ } elseif ( ! empty( $_GET['transfer'] ) ) {
155
+ if ( class_exists( 'CFF_Oembed' ) ) {
156
+ $cff_oembed_token = CFF_Oembed::last_access_token();
157
+ $valid_new_access_token = $cff_oembed_token;
158
+ }
159
+ } else {
160
+ $valid_new_access_token = ! empty( $_GET['access_token'] ) && strlen( $_GET['access_token'] ) > 20 && $saved_access_token_data !== $_GET['access_token'] ? sanitize_text_field( $_GET['access_token'] ) : false;
161
+ if ( $valid_new_access_token && ! empty( $_GET['access_token'] ) ) {
162
+ $url = esc_url_raw( 'https://graph.facebook.com/me/accounts?limit=500&access_token=' . $valid_new_access_token );
163
+ $pages_data_connection = wp_remote_get( $url );
164
+
165
+ if ( ! is_wp_error( $pages_data_connection ) && isset( $pages_data_connection['body'] ) ) {
166
+ $pages_data = json_decode( $pages_data_connection['body'], true );
167
+ if ( isset( $pages_data['data'][0]['access_token'] ) ) {
168
+ $oembed_token_settings['expiration_date'] = 'never';
169
+ } else {
170
+ $oembed_token_settings['expiration_date'] = time() + (60 * DAY_IN_SECONDS);
171
+ $show_token_expiration_modal = true;
172
+ }
173
+ } else {
174
+ $oembed_token_settings['expiration_date'] = 'unknown';
175
+ }
176
+ }
177
+
178
+ }
179
+
180
+
181
+ if ( ! $saved_access_token_data && ! $valid_new_access_token && ! SB_Instagram_Oembed::can_do_oembed() ) {
182
+ if ( $access_token_error ) { ?>
183
+ <p class="sbi-error"><?php echo $error_message; ?></p>
184
+ <?php }
185
+ $need_to_connect_class = ' sbi-need-to-connect';
186
+ $token_href = 'https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/instagram-graph-api-redirect.php&scope=pages_show_list&state=' . $admin_url_state;
187
+ if ( class_exists( 'CFF_Oembed' ) ) {
188
+ $cff_oembed_token = CFF_Oembed::last_access_token();
189
+
190
+ if ( ! empty( $cff_oembed_token ) ) {
191
+ $need_to_connect_class = '';
192
+ $token_href = add_query_arg( 'transfer', '1', $admin_url_state );
193
+ }
194
+ }
195
+
196
+ ?>
197
+ <a href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn<?php echo $need_to_connect_class; ?>"><i class="fa fa-instagram"></i> <?php _e( 'Enable Instagram oEmbeds', 'instagram-feed' ); ?></a>
198
+ <div id="sbi_config_info" class="sb_get_token" style="display: none;">
199
+ <div class="sbi_config_modal">
200
+ <?php _e( 'As Instagram is part of Facebook, in order to display Instagram oEmbeds, you must connect to Facebook. Click on the button below to connect', 'instagram-feed' ); ?>
201
+
202
+ <p>
203
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="<?php echo esc_url( $token_href ); ?>" class="sbi-oembed-connect-btn"><?php _e( 'Connect to Facebook', 'instagram-feed' ); ?></a>
204
+ </p>
205
+
206
+ <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
207
+ </div>
208
+ </div>
209
+ <div class="sbi-oembed-promo sbi-oembed-desc">
210
+ <div class="sbi-col">
211
+ <h2><?php _e("What are oEmbeds?", "instagram-feed"); ?></h2>
212
+ <p><?php _e("Anytime you share a link to an Instagram post in WordPress, it is automatically converted into an embedded version of that Instagram post (an \"oEmbed\").</p><p>However, WordPress is discontinuing support for Instagram oEmbeds due to them now requiring an Access Token to work. Don't worry though, we have your back. Just use the button above to connect to Facebook and we'll make sure your Instagram oEmbeds keep working.", "instagram-feed"); ?></p>
213
+ </div>
214
+
215
+ <img src="<?php echo SBI_PLUGIN_URL . 'img/sbi-oembed.png'; ?>" style="padding: 0px; background: white;">
216
+ </div>
217
+ <?php } else {
218
+ if ( $valid_new_access_token ) {
219
+ $oembed_token_settings['access_token'] = $valid_new_access_token;
220
+ $oembed_token_settings['disabled'] = false;
221
+ update_option( 'sbi_oembed_token', $oembed_token_settings );
222
+ ?>
223
+ <div><p class="sbi-success-message"><?php _e("You're all set! Instagram Feed will replace your old oEmbeds automatically and generate all new content for all new links.", 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php _e("Disable", 'instagram-feed' ); ?></a></p></div>
224
+ <?php if ( $show_token_expiration_modal ) : ?>
225
+ <div id="sbi_config_info" class="sb_get_token">
226
+ <div class="sbi_config_modal">
227
+ <p><strong><?php _e( 'Heads up!', 'instagram-feed' ); ?></strong><br></p>
228
+
229
+ <p>
230
+ <?php _e( 'Your access token will expire in 60 days. Facebook requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Click the button below for instructions on creating a Facebook page and extending your access token to never expire.', 'instagram-feed' ); ?>
231
+ </p>
232
+ <p>
233
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" class="sbi-oembed-connect-btn" target="_blank" rel="noopener"><?php _e( 'How to Create a Facebook Page', 'instagram-feed' ); ?></a>
234
+ &nbsp;&nbsp;<a href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="button button-secondary" style="height: 47px;line-height: 47px;font-size: 14px;padding: 0 21px;"><?php _e( 'Try Again', 'instagram-feed' ); ?></a>
235
+ </p>
236
+
237
+ <a href="JavaScript:void(0);"><i class="sbi_modal_close fa fa-times"></i></a>
238
+ </div>
239
+ </div>
240
+ <?php endif; ?>
241
+ <?php } else {
242
+ if ( ! isset( $oembed_token_settings['expiration_date'] ) || (int)$oembed_token_settings['expiration_date'] === 0 || $oembed_token_settings['expiration_date'] > time() ) :
243
+ ?>
244
+ <div><p class="sbi-success-message"><?php _e("The Instagram Feed plugin is now powering your Instagram oEmbeds.", 'instagram-feed' ); ?> <a href="javascript:void(0);" id="sbi-oembed-disable"><?php _e("Disable", 'instagram-feed' ); ?></a></p></div>
245
+ <?php
246
+ endif;
247
+ if ( ! empty( $oembed_token_settings['expiration_date'] )
248
+ && $oembed_token_settings['expiration_date'] !== 'never' ) :
249
+ $link_1 = '<a href="https://smashballoon.com/doc/how-to-prevent-your-oembed-access-token-from-expiring/?instagram" target="_blank" rel="noopener">';
250
+ $link_2 = '</a>';
251
+ $class = 'sbi_warning';
252
+ if ( $oembed_token_settings['expiration_date'] > time() ) {
253
+ $days_to_expire = floor( ( $oembed_token_settings['expiration_date'] - time() ) / DAY_IN_SECONDS );
254
+ $message = sprintf( __( '%1sImportant:%2s Your access token for powering oEmbeds will expire in %3s days.', 'instagram-feed' ), '<strong>', '</strong>', $days_to_expire );
255
+ } else {
256
+ $class = 'sb_instagram_notice';
257
+ $message = __( 'Your access token for powering oEmbeds has expired.', 'instagram-feed' );
258
+ }
259
+ ?>
260
+ <div class="<?php echo $class; ?>" style="display:inline-block;width: auto;">
261
+ <p>
262
+ <?php echo $message ; ?>
263
+ </p>
264
+ <p>
265
+ <?php echo sprintf( __( 'Instagram requires that users have a role on a Facebook page in order to create access tokens that don\'t expire. Visit %1sthis link%2s for instructions on extending your access token to never expire.', 'instagram-feed' ), $link_1, $link_2 ); ?>
266
+ </p>
267
+ <p>
268
+ <a style="display: inline-block; float: none; margin-bottom: 0;" href="https://www.facebook.com/dialog/oauth?client_id=254638078422287&redirect_uri=https://api.smashballoon.com/instagram-graph-api-redirect.php&scope=pages_show_list&state=<?php echo $admin_url_state; ?>" class="sbi-oembed-connect-btn"><?php _e( 'Connect to Facebook and Recheck Access Token', 'instagram-feed' ); ?></a>
269
+ </p>
270
+ </div>
271
+
272
+ <?php endif; ?>
273
+
274
+ <?php } ?>
275
+ <div class="sbi-oembed-promo">
276
+ <h2><?php _e("Did you know, you can also use this Instagram Feed plugin to easily add Instagram content on your website?", 'instagram-feed'); ?></h2>
277
+ <div class="sbi-reasons">
278
+ <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="clock" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-clock fa-w-16 fa-2x"><path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z" class=""></path></svg><span><?php _e("Save time", 'instagram-feed'); ?></span></div>
279
+ <div><svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="chart-line" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-chart-line fa-w-16 fa-2x"><path fill="currentColor" d="M117.65 277.65c6.25 6.25 16.38 6.25 22.63 0L192 225.94l84.69 84.69c6.25 6.25 16.38 6.25 22.63 0L409.54 200.4l29.49 29.5c15.12 15.12 40.97 4.41 40.97-16.97V112c0-8.84-7.16-16-16-16H363.07c-21.38 0-32.09 25.85-16.97 40.97l29.5 29.49-87.6 87.6-84.69-84.69c-6.25-6.25-16.38-6.25-22.63 0l-74.34 74.34c-6.25 6.25-6.25 16.38 0 22.63l11.31 11.31zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z" class=""></path></svg><span><?php _e("Increase social engagement", 'instagram-feed'); ?></span></div>
280
+ <div><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-heart fa-w-16 fa-2x"><path fill="currentColor" d="M462.3 62.7c-54.5-46.4-136-38.7-186.6 13.5L256 96.6l-19.7-20.3C195.5 34.1 113.2 8.7 49.7 62.7c-62.8 53.6-66.1 149.8-9.9 207.8l193.5 199.8c6.2 6.4 14.4 9.7 22.6 9.7 8.2 0 16.4-3.2 22.6-9.7L472 270.5c56.4-58 53.1-154.2-9.7-207.8zm-13.1 185.6L256.4 448.1 62.8 248.3c-38.4-39.6-46.4-115.1 7.7-161.2 54.8-46.8 119.2-12.9 142.8 11.5l42.7 44.1 42.7-44.1c23.2-24 88.2-58 142.8-11.5 54 46 46.1 121.5 7.7 161.2z" class=""></path></svg><span><?php _e("Keep Your Site Looking Fresh.", 'instagram-feed'); ?></span></div>
281
+ </div>
282
+ <p>
283
+ <?php $check_svg = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-check fa-w-16 fa-2x"><path fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg>'; ?>
284
+ <?php echo $check_svg; ?><span><?php _e("Super simple to set up", 'instagram-feed'); ?></span>
285
+ <?php echo $check_svg; ?><span><?php _e("Optimized for speed", 'instagram-feed'); ?></span>
286
+ <?php echo $check_svg; ?><span><?php _e("Completely customizable", 'instagram-feed'); ?></span>
287
+ <?php echo $check_svg; ?><span><?php _e("SEO friendly", 'instagram-feed'); ?></span>
288
+ </p>
289
+ <a href="?page=sb-instagram-feed" class="button button-primary"><?php _e("Add an Instagram feed now", 'instagram-feed'); ?></a>
290
+ </div>
291
+
292
+ <?php } ?>
293
+
294
+ </div>
295
+ </div>
296
+ <?php }
297
+
298
+ function sbi_social_wall_page() {
299
+
300
+ ( is_plugin_active( 'social-wall/social-wall.php' ) ) ? $sbi_sw_active = true : $sbi_sw_active = false;
301
+
302
+ ?>
303
+
304
+ <div id="sbi_admin" class="wrap sw-landing-page">
305
+
306
+ <?php $plus_svg = '<span class="sbi-sb-plus"><svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" class="svg-inline--fa fa-plus fa-w-12 fa-2x"><path fill="currentColor" d="M376 232H216V72c0-4.42-3.58-8-8-8h-32c-4.42 0-8 3.58-8 8v160H8c-4.42 0-8 3.58-8 8v32c0 4.42 3.58 8 8 8h160v160c0 4.42 3.58 8 8 8h32c4.42 0 8-3.58 8-8V280h160c4.42 0 8-3.58 8-8v-32c0-4.42-3.58-8-8-8z" class=""></path></svg></span>'; ?>
307
+
308
+ <div class="sbi-sw-icons">
309
+
310
+ <span style="display: inline-block; padding: 0 0 12px 0; width: 360px; max-width: 100%;">
311
+ <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">
312
+ <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"/>
313
+ <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"/>
314
+ <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"/>
315
+ <g>
316
+ <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"/>
317
+ <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"/>
318
+ </g>
319
+ </svg>
320
+ </span>
321
+ <br />
322
+
323
+ <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>
324
+
325
+ <?php echo $plus_svg; ?>
326
+
327
+ <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>
328
+
329
+ <?php echo $plus_svg; ?>
330
+
331
+ <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>
332
+
333
+ <?php echo $plus_svg; ?>
334
+
335
+ <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>
336
+ </div>
337
+
338
+ <h1>Combine all your social media channels into one single wall.</h1>
339
+ <h2>Maximize your social content and get more followers.</h2>
340
+
341
+ <div style="text-align: center;">
342
+ <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>
343
+ </div>
344
+
345
+ <div class="sbi-sw-info">
346
+ <div class="sbi-sw-features">
347
+ <p><span>A dash of Instagram</span>Add posts from your profile, public hashtag posts, or posts you're tagged in.</p>
348
+ <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>
349
+ <p><span>A spoonful of Twitter</span>Add Tweets from any Twitter account, hashtag Tweets, mentions, and more.</p>
350
+ <p><span>And a dollop of YouTube</span>Embed videos from any public YouTube channel, playlists, searches, and more.</p>
351
+ <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>
352
+ </div>
353
+ <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">
354
+ <span class="cta">View Demo</span>
355
+
356
+ <img src="<?php echo SBI_PLUGIN_URL . 'img/sw-screenshot.png'; ?>" alt="Smash Balloon Social Wall plugin screenshot showing Facebook, Instagram, Twitter, and YouTube posts combined into one wall.">
357
+ </a>
358
+ </div>
359
+
360
+ <div class="sbi-sw-footer-cta">
361
+ <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>
362
+ </div>
363
+
364
+ </div>
365
+
366
+ <?php
367
+ }
368
 
369
  function sb_instagram_settings_page() {
370
 
421
  'enqueue_css_in_shortcode' => false,
422
  'sb_instagram_ajax_theme' => false,
423
  'sb_instagram_disable_resize' => false,
424
+ 'sb_instagram_favor_local' => true,
425
  'sb_instagram_minnum' => 0,
426
  'disable_js_image_loading' => false,
427
  'enqueue_js_in_head' => false,
812
  $new_user_name = false;
813
 
814
 
 
 
815
  if( isset($_GET['access_token']) && isset($_GET['graph_api']) && empty($_POST) ) { ?>
816
  <?php
817
  $access_token = sbi_maybe_clean(urldecode($_GET['access_token']));
1008
  <h2 class="nav-tab-wrapper">
1009
  <a href="?page=sb-instagram-feed&amp;tab=configure" class="nav-tab <?php echo $sbi_active_tab == 'configure' ? 'nav-tab-active' : ''; ?>"><?php _e( '1. Configure', 'instagram-feed' ); ?></a>
1010
  <a href="?page=sb-instagram-feed&amp;tab=customize" class="nav-tab <?php echo $sbi_active_tab == 'customize' ? 'nav-tab-active' : ''; ?>"><?php _e( '2. Customize', 'instagram-feed' ); ?></a>
1011
+ <a href="?page=sb-instagram-feed&amp;tab=display" class="nav-tab <?php echo $sbi_active_tab == 'display' ? 'nav-tab-active' : ''; ?>"><?php _e( '3. Display Your Feed', 'instagram-feed' ); ?></a>
1012
+ <a href="?page=sb-instagram-feed&amp;tab=support" class="nav-tab <?php echo $sbi_active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Support', 'instagram-feed' ); ?></a>
1013
+ <a href="?page=sb-instagram-feed&amp;tab=more" class="nav-tab <?php echo $sbi_active_tab == 'more' ? 'nav-tab-active' : ''; ?>"><?php _e( 'More Social Feeds', 'instagram-feed' ); ?>
1014
+ <?php
1015
+ $seen_more_plugins_page = get_user_meta(get_current_user_id(), 'seen_more_plugins_page_1', true);
1016
+ if( !$seen_more_plugins_page ) echo '<span class="sbi-alert-bubble">1</span>';
1017
+ ?>
1018
+ </a>
1019
  </h2>
1020
 
1021
  <?php if( $sbi_active_tab == 'configure' ) { //Start Configure tab ?>
1284
  <tr valign="top" class="sbi_cron_cache_opts">
1285
  <th scope="row"><?php _e( 'Check for new posts', 'instagram-feed' ); ?></th>
1286
  <td>
 
1287
  <div class="sbi_row">
1288
+ <input type="radio" name="sbi_caching_type" id="sbi_caching_type_cron" value="background" <?php if ( $sbi_caching_type === 'background' ) echo 'checked'; ?>>
1289
+ <label for="sbi_caching_type_cron"><?php _e( 'In the background', 'instagram-feed' ); ?></label>
1290
  <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>
1291
  <p class="sbi_tooltip sbi-more-info"><?php _e( 'Your Instagram post data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data', 'instagram-feed' ); ?>:<br><br>
1292
+ <?php _e( '<b>1. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from Instagram when the page first loads, but then after that will check in the background on the schedule selected - unless the cache is cleared.', 'instagram-feed' ); ?>
1293
  <br><br>
1294
+ <?php _e( '<b>2. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check Instagram for new posts the next time that the feed is loaded. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you\'re experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>\'Force cache to clear on interval\'</b> which is located on the \'Customize\' tab.', 'instagram-feed' ) . '</p>'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
1295
 
 
 
 
1296
  </div>
1297
  <div class="sbi_row sbi-caching-cron-options" style="display: block;">
1298
 
1304
  </select>
1305
 
1306
  <div id="sbi-caching-time-settings" style="display: none;">
1307
+ <?php _e('at' ); ?>
1308
 
1309
  <select name="sbi_cache_cron_time" style="width: 80px">
1310
  <option value="1" <?php if ( $sbi_cache_cron_time === '1' ) echo 'selected'; ?>>1:00</option>
1327
  </select>
1328
  </div>
1329
 
1330
+ <?php
1331
+ if ( wp_next_scheduled( 'sbi_feed_update' ) ) {
1332
+ $time_format = get_option( 'time_format' );
1333
+ if ( ! $time_format ) {
1334
+ $time_format = 'g:i a';
1335
+ }
1336
+ //
1337
+ $schedule = wp_get_schedule( 'sbi_feed_update' );
1338
+ if ( $schedule == '30mins' ) $schedule = __( 'every 30 minutes', 'instagram-feed' );
1339
+ if ( $schedule == 'twicedaily' ) $schedule = __( 'every 12 hours', 'instagram-feed' );
1340
+ $sbi_next_cron_event = wp_next_scheduled( 'sbi_feed_update' );
1341
+ echo '<p class="sbi-caching-sched-notice"><span><b>' . __( 'Next check', 'instagram-feed' ) . ': ' . date( $time_format, $sbi_next_cron_event + sbi_get_utc_offset() ) . ' (' . $schedule . ')</b> - ' . __( 'Note: Saving the settings on this page will clear the cache and reset this schedule', 'instagram-feed' ) . '</span></p>';
1342
+ } else {
1343
+ echo '<p style="font-size: 11px; color: #666;">' . __( 'Nothing currently scheduled', 'instagram-feed' ) . '</p>';
1344
+ }
1345
+ ?>
1346
 
1347
  </div>
1348
+ <div class="sbi_row">
1349
+ <input type="radio" name="sbi_caching_type" id="sbi_caching_type_page" value="page" <?php if ( $sbi_caching_type === 'page' ) echo 'checked'; ?>>
1350
+ <label for="sbi_caching_type_page"><?php _e( 'When the page loads', 'instagram-feed' ); ?></label>
1351
+ </div>
1352
+ <div class="sbi_row sbi-caching-page-options" style="display: none;">
1353
+ <?php _e( 'Every', 'instagram-feed' ); ?>:
1354
+ <input name="sb_instagram_cache_time" type="text" value="<?php echo esc_attr( $sb_instagram_cache_time ); ?>" size="4" />
1355
+ <select name="sb_instagram_cache_time_unit">
1356
+ <option value="minutes" <?php if($sb_instagram_cache_time_unit == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes', 'instagram-feed'); ?></option>
1357
+ <option value="hours" <?php if($sb_instagram_cache_time_unit == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'instagram-feed'); ?></option>
1358
+ <option value="days" <?php if($sb_instagram_cache_time_unit == "days") echo 'selected="selected"' ?> ><?php _e('Days', 'instagram-feed'); ?></option>
1359
+ </select>
1360
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1361
+ <p class="sbi_tooltip"><?php _e('Your Instagram posts are temporarily cached by the plugin in your WordPress database. You can choose how long the posts should be cached for. If you set the time to 1 hour then the plugin will clear the cache after that length of time and check Instagram for posts again.', 'instagram-feed'); ?></p>
1362
+ </div>
1363
 
1364
  </td>
1365
  </tr>
2881
 
2882
  <div class="sbi_support">
2883
 
 
2884
  <h3 style="padding-bottom: 10px;"><?php _e("Need help?", 'instagram-feed'); ?></h3>
2885
 
2886
  <p>
3208
 
3209
  <?php
3210
  } //End Support tab
3211
+
3212
+
3213
+ if( $sbi_active_tab == 'more' ) { //Start More Social Feeds tab
3214
+
3215
+ add_user_meta(get_current_user_id(), 'seen_more_plugins_page_1', 'true', true); //Iterate when adding a new plugin
3216
+ ?>
3217
+
3218
+ <div class="sbi_more_plugins" id="sbi-admin-about">
3219
+
3220
+ <div class="sbi-more-plugins-intro">
3221
+ <h3><?php _e( "Here's some more <span>free</span> plugins you might like!", 'instagram-feed' ); ?></h3>
3222
+ <p><?php _e( "As you're already using one of our free plugins we thought we'd suggest some others you might like to. Check out our other free plugins below:", 'instagram-feed' ); ?></p>
3223
+ </div>
3224
+
3225
+ <?php function get_am_plugins() {
3226
+
3227
+ $images_url = SBI_PLUGIN_URL . 'img/about/';
3228
+
3229
+ return array(
3230
+ 'instagram-feed/instagram-feed.php' => array(
3231
+ 'icon' => $images_url . 'plugin-if.png',
3232
+ 'name' => esc_html__( 'Instagram Feed', 'custom-facebook-feed' ),
3233
+ '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' ),
3234
+ 'url' => 'https://downloads.wordpress.org/plugin/instagram-feed.zip',
3235
+ 'pro' => array(
3236
+ 'plug' => 'instagram-feed-pro/instagram-feed.php',
3237
+ 'icon' => $images_url . 'plugin-if.png',
3238
+ 'name' => esc_html__( 'Instagram Feed Pro', 'custom-facebook-feed' ),
3239
+ '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' ),
3240
+ 'url' => 'https://smashballoon.com/instagram-feed/?utm_campaign=facebook-free&utm_source=cross&utm_medium=sbiinstaller',
3241
+ 'act' => 'go-to-url',
3242
+ ),
3243
+ ),
3244
+ 'custom-facebook-feed/custom-facebook-feed.php' => array(
3245
+ 'icon' => $images_url . 'plugin-fb.png',
3246
+ 'name' => esc_html__( 'Custom Facebook Feed', 'instagram-feed' ),
3247
+ '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' ),
3248
+ 'url' => 'https://downloads.wordpress.org/plugin/custom-facebook-feed.zip',
3249
+ 'pro' => array(
3250
+ 'plug' => 'custom-facebook-feed-pro/custom-facebook-feed.php',
3251
+ 'icon' => $images_url . 'plugin-fb.png',
3252
+ 'name' => esc_html__( 'Custom Facebook Feed Pro', 'instagram-feed' ),
3253
+ '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' ),
3254
+ 'url' => 'https://smashballoon.com/custom-facebook-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=cffinstaller',
3255
+ 'act' => 'go-to-url',
3256
+ )
3257
+ ),
3258
+
3259
+ 'custom-twitter-feeds/custom-twitter-feed.php' => array(
3260
+ 'icon' => $images_url . 'plugin-tw.jpg',
3261
+ 'name' => esc_html__( 'Custom Twitter Feeds', 'instagram-feed' ),
3262
+ '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' ),
3263
+ 'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
3264
+ 'pro' => array(
3265
+ 'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
3266
+ 'icon' => $images_url . 'plugin-tw.jpg',
3267
+ 'name' => esc_html__( 'Custom Twitter Feeds Pro', 'instagram-feed' ),
3268
+ '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' ),
3269
+ 'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_campaign=instagram-free&utm_source=cross&utm_medium=ctfinstaller',
3270
+ 'act' => 'go-to-url',
3271
+ )
3272
+ ),
3273
+
3274
+ 'feeds-for-youtube/youtube-feed.php' => array(
3275
+ 'icon' => $images_url . 'plugin-yt.png',
3276
+ 'name' => esc_html__( 'Feeds for YouTube', 'instagram-feed' ),
3277
+ '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' ),
3278
+ 'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
3279
+ 'pro' => array(
3280
+ 'plug' => 'youtube-feed-pro/youtube-feed.php',
3281
+ 'icon' => $images_url . 'plugin-yt.png',
3282
+ 'name' => esc_html__( 'Feeds for YouTube Pro', 'instagram-feed' ),
3283
+ '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' ),
3284
+ 'url' => 'https://smashballoon.com/youtube-feed/?utm_campaign=instagram-free&utm_source=cross&utm_medium=sbyinstaller',
3285
+ 'act' => 'go-to-url',
3286
+ )
3287
+ ),
3288
+ );
3289
+
3290
+ }
3291
+
3292
+ function output_about_addons() {
3293
+
3294
+ if ( version_compare( PHP_VERSION, '5.3.0' ) <= 0
3295
+ || version_compare( get_bloginfo('version'), '4.6' , '<' ) ){
3296
+ return;
3297
+ }
3298
+
3299
+ $all_plugins = get_plugins();
3300
+ $am_plugins = get_am_plugins();
3301
+ $has_all_plugins = true;
3302
+
3303
+ ?>
3304
+ <div id="sbi-admin-addons">
3305
+ <div class="addons-container">
3306
+ <?php
3307
+ foreach ( $am_plugins as $plugin => $details ) :
3308
+
3309
+ $free_only = true;
3310
+ $plugin_data = get_the_plugin_data( $plugin, $details, $all_plugins, $free_only );
3311
+ $plugin_slug = strtolower( str_replace( ' ', '_', $plugin_data['details']['name'] ) );
3312
+
3313
+ //Only show the plugin if both free/pro versions aren't already active
3314
+ isset( $plugin_data['details']['plug'] ) ? $pro_plugin_source = $plugin_data['details']['plug'] : $pro_plugin_source = '';
3315
+ if( !is_plugin_active( $plugin ) && !is_plugin_active( $pro_plugin_source ) ){
3316
+ $has_all_plugins = false;
3317
+ ?>
3318
+ <div class="addon-container" id="install_<?php echo $plugin_slug; ?>">
3319
+ <div class="addon-item">
3320
+ <div class="details sbi-clear">
3321
+ <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
3322
+ <h5 class="addon-name">
3323
+ <?php echo esc_html( $plugin_data['details']['name'] ); ?>
3324
+ </h5>
3325
+ <p class="addon-desc">
3326
+ <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
3327
+ </p>
3328
+ </div>
3329
+ <div class="actions sbi-clear">
3330
+ <div class="status">
3331
+ <strong>
3332
+ <?php _e( 'Price:', 'instagram-feed' );
3333
+ echo ' <span style="color: green;">';
3334
+ _e( 'Free', 'instagram-feed' );
3335
+ echo '</span>'; ?>
3336
+ </strong>
3337
+ </div>
3338
+ <div class="action-button">
3339
+ <button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
3340
+ <?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
3341
+ </button>
3342
+ </div>
3343
+ </div>
3344
+ </div>
3345
+ </div>
3346
+
3347
+ <?php } ?>
3348
+
3349
+ <?php endforeach;
3350
+
3351
+ if( $has_all_plugins == true ){ ?>
3352
+
3353
+ <style type="text/css">.sbi-more-plugins-intro{display:none;}</style>
3354
+ <h2><?php _e( 'You already have all of our free plugins. Awesome!', 'instagram-feed' ); ?></h2>
3355
+
3356
+ <p><?php _e( 'Thank you so much for using our plugins. We appreciate you trusting us to power your social media feeds.', 'instagram-feed' ); ?></p>
3357
+ <p><?php _e( 'If you want to support us in our mission to make bringing social media content to your website both easy and reliable, then consider upgrading to one of our Pro plugins.', 'instagram-feed' ); ?></p>
3358
+
3359
+ <div class="sbi-cols-4">
3360
+ <?php //Show a list of Pro plugins which aren't currently active ?>
3361
+ <?php foreach ( $am_plugins as $plugin => $details ) :
3362
+
3363
+ $plugin_data = get_the_plugin_data( $plugin, $details, $all_plugins );
3364
+ $plugin_slug = strtolower( str_replace( ' ', '_', $plugin_data['details']['name'] ) );
3365
+
3366
+ isset( $plugin_data['details']['plug'] ) ? $pro_plugin_source = $plugin_data['details']['plug'] : $pro_plugin_source = '';
3367
+ if( !is_plugin_active( $pro_plugin_source ) ){
3368
+ ?>
3369
+
3370
+ <div class="addon-container" id="install_<?php echo $plugin_slug; ?>">
3371
+ <div class="addon-item">
3372
+ <div class="details sbi-clear">
3373
+ <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
3374
+ <h5 class="addon-name">
3375
+ <?php echo esc_html( $plugin_data['details']['name'] ); ?>
3376
+ </h5>
3377
+ <p class="addon-desc">
3378
+ <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
3379
+ </p>
3380
+ </div>
3381
+ <div class="actions sbi-clear">
3382
+ <div class="action-button">
3383
+ <a href="<?php echo esc_attr( $details['pro']['url'] ); ?>" target="_blank" class="status-go-to-url button button-primary">
3384
+ <?php _e( 'Upgrade to Pro', 'instagram-feed' ); ?>
3385
+ </a>
3386
+ </div>
3387
+ </div>
3388
+ </div>
3389
+ </div>
3390
+
3391
+ <?php } ?>
3392
+
3393
+ <?php endforeach; ?>
3394
+ </div>
3395
+
3396
+ <?php } ?>
3397
+
3398
+ </div>
3399
+ </div>
3400
+ <?php
3401
+ }
3402
+
3403
+
3404
+ function get_the_plugin_data( $plugin, $details, $all_plugins, $free_only = false ) {
3405
+
3406
+ $have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
3407
+ $show_pro = false;
3408
+
3409
+ $plugin_data = array();
3410
+
3411
+ if( $free_only ) $have_pro = false;
3412
+
3413
+ if ( $have_pro ) {
3414
+ if ( array_key_exists( $plugin, $all_plugins ) ) {
3415
+ if ( is_plugin_active( $plugin ) ) {
3416
+ $show_pro = true;
3417
+ }
3418
+ }
3419
+ if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
3420
+ $show_pro = true;
3421
+ }
3422
+ if ( $show_pro ) {
3423
+ $plugin = $details['pro']['plug'];
3424
+ $details = $details['pro'];
3425
+ }
3426
+ }
3427
+
3428
+ if( $free_only ) $show_pro = false;
3429
+
3430
+ if ( array_key_exists( $plugin, $all_plugins ) ) {
3431
+ if ( is_plugin_active( $plugin ) ) {
3432
+ // Status text/status.
3433
+ $plugin_data['status_class'] = 'status-active';
3434
+ $plugin_data['status_text'] = esc_html__( 'Active', 'instagram-feed' );
3435
+ // Button text/status.
3436
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
3437
+ $plugin_data['action_text'] = esc_html__( 'Activated', 'instagram-feed' );
3438
+ $plugin_data['plugin_src'] = esc_attr( $plugin );
3439
+ } else {
3440
+ // Status text/status.
3441
+ $plugin_data['status_class'] = 'status-inactive';
3442
+ $plugin_data['status_text'] = esc_html__( 'Inactive', 'instagram-feed' );
3443
+ // Button text/status.
3444
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
3445
+ $plugin_data['action_text'] = esc_html__( 'Activate', 'instagram-feed' );
3446
+ $plugin_data['plugin_src'] = esc_attr( $plugin );
3447
+ }
3448
+ } else {
3449
+ // Doesn't exist, install.
3450
+ // Status text/status.
3451
+ $plugin_data['status_class'] = 'status-download';
3452
+ if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
3453
+ $plugin_data['status_class'] = 'status-go-to-url';
3454
+ }
3455
+ $plugin_data['status_text'] = esc_html__( 'Not Installed', 'instagram-feed' );
3456
+ // Button text/status.
3457
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
3458
+ $plugin_data['action_text'] = esc_html__( 'Install Plugin', 'instagram-feed' );
3459
+ $plugin_data['plugin_src'] = esc_url( $details['url'] );
3460
+ }
3461
+
3462
+ $plugin_data['details'] = $details;
3463
+
3464
+ return $plugin_data;
3465
+ }
3466
+
3467
+
3468
+ output_about_addons();
3469
+
3470
+ ?>
3471
+ <style>.sbi_quickstart, .sbi-pro-notice, .sbi_plugins_promo, .sbi_share_plugin{ display: none !Important; }</style>
3472
+ </div>
3473
+
3474
+ <?php
3475
+ } //End More tab ?>
3476
+
3477
 
3478
 
3479
  <div class="sbi_quickstart">
inc/class-sb-instagram-feed.php CHANGED
@@ -1169,7 +1169,7 @@ class SB_Instagram_Feed
1169
  $encoded_options = sbi_json_encode( $js_options );
1170
 
1171
  $js_option_html = '<script type="text/javascript">var sb_instagram_js_options = ' . $encoded_options . ';</script>';
1172
- $js_option_html .= "<script type='text/javascript' src='" . trailingslashit( SBI_PLUGIN_URL ) . 'js/sb-instagram.min.js?ver=' . SBIVER . "'></script>";
1173
 
1174
  return $js_option_html;
1175
  }
1169
  $encoded_options = sbi_json_encode( $js_options );
1170
 
1171
  $js_option_html = '<script type="text/javascript">var sb_instagram_js_options = ' . $encoded_options . ';</script>';
1172
+ $js_option_html .= "<script type='text/javascript' src='" . trailingslashit( SBI_PLUGIN_URL ) . 'js/sbi-scripts.min.js?ver=' . SBIVER . "'></script>";
1173
 
1174
  return $js_option_html;
1175
  }
inc/class-sb-instagram-oembed.php ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class SB_Instagram_Oembed
4
+ *
5
+ * Replaces the native WordPress functionality for Instagram oembed
6
+ * to allow authenticated oembeds
7
+ *
8
+ * @since 2.5/5.8
9
+ */
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ die( '-1' );
13
+ }
14
+
15
+ class SB_Instagram_Oembed
16
+ {
17
+ /**
18
+ * SB_Instagram_Oembed constructor.
19
+ *
20
+ * If an account has been connected, hooks are added
21
+ * to change how Instagram links are handled for oembeds
22
+ *
23
+ * @since 2.5/5.8
24
+ */
25
+ public function __construct() {
26
+ if ( SB_Instagram_Oembed::can_do_oembed() ) {
27
+ if ( SB_Instagram_Oembed::can_check_for_old_oembeds() ) {
28
+ add_action( 'the_post', array( 'SB_Instagram_Oembed', 'check_page_for_old_oembeds' ) );
29
+ }
30
+ add_filter( 'oembed_providers', array( 'SB_Instagram_Oembed', 'oembed_providers' ), 10, 1 );
31
+ add_filter( 'oembed_fetch_url', array( 'SB_Instagram_Oembed', 'oembed_set_fetch_url' ), 10, 3 );
32
+ add_filter( 'oembed_result', array( 'SB_Instagram_Oembed', 'oembed_result' ), 10, 3 );
33
+ }
34
+ if ( SB_Instagram_Oembed::should_extend_ttl() ) {
35
+ add_filter( 'oembed_ttl', array( 'SB_Instagram_Oembed', 'oembed_ttl' ), 10, 4 );
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Check to make sure there is a connected account to
41
+ * enable authenticated oembeds
42
+ *
43
+ * @return bool
44
+ *
45
+ * @since 2.5/5.8
46
+ */
47
+ public static function can_do_oembed() {
48
+ $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
49
+
50
+ if ( isset( $oembed_token_settings['disabled'] ) && $oembed_token_settings['disabled'] ) {
51
+ return false;
52
+ }
53
+
54
+ $access_token = SB_Instagram_Oembed::last_access_token();
55
+ if ( ! $access_token ) {
56
+ return false;
57
+ }
58
+
59
+ return true;
60
+ }
61
+
62
+ /**
63
+ * The "time to live" for Instagram oEmbeds is extended if the access token expires.
64
+ * Even if new oEmbeds will not use the Instagram Feed system due to an expired token
65
+ * the time to live should continue to be extended.
66
+ *
67
+ * @return bool
68
+ *
69
+ * @since 2.5/5.8
70
+ */
71
+ public static function should_extend_ttl() {
72
+ $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
73
+
74
+ if ( isset( $oembed_token_settings['disabled'] ) && $oembed_token_settings['disabled'] ) {
75
+ return false;
76
+ }
77
+
78
+ $will_expire = SB_Instagram_Oembed::oembed_access_token_will_expire();
79
+ if ( $will_expire ) {
80
+ return true;
81
+ }
82
+
83
+ return false;
84
+ }
85
+
86
+ /**
87
+ * Checking for old oembeds makes permanent changes to posts
88
+ * so we want the user to turn it off and on
89
+ *
90
+ * @return bool
91
+ *
92
+ * @since 2.5/5.8
93
+ */
94
+ public static function can_check_for_old_oembeds() {
95
+ /**
96
+ * TODO: if setting is enabled
97
+ */
98
+ return true;
99
+ }
100
+
101
+ /**
102
+ * Filters the WordPress list of oembed providers to
103
+ * change what url is used for remote requests for the
104
+ * oembed data
105
+ *
106
+ * @param array $providers
107
+ *
108
+ * @return mixed
109
+ *
110
+ * @since 2.5/5.8
111
+ */
112
+ public static function oembed_providers( $providers ) {
113
+ $oembed_url = SB_Instagram_Oembed::oembed_url();
114
+ if ( $oembed_url ) {
115
+ $providers['#https?://(www\.)?instagr(\.am|am\.com)/(p|tv)/.*#i'] = array( $oembed_url, true );
116
+ }
117
+
118
+ return $providers;
119
+ }
120
+
121
+ /**
122
+ * Add the access token from a connected account to make an authenticated
123
+ * call to get oembed data from Instagram
124
+ *
125
+ * @param string $provider
126
+ * @param string $url
127
+ * @param array $args
128
+ *
129
+ * @return string
130
+ *
131
+ * @since 2.5/5.8
132
+ */
133
+ public static function oembed_set_fetch_url( $provider, $url, $args ) {
134
+ $access_token = SB_Instagram_Oembed::last_access_token();
135
+ if ( ! $access_token ) {
136
+ return $provider;
137
+ }
138
+
139
+ if ( strpos( $provider, 'instagram_oembed' ) !== false ) {
140
+ if ( strpos( $url, '?' ) !== false ) {
141
+ $exploded = explode( '?', $url );
142
+ if ( isset( $exploded[1] ) ) {
143
+ $provider = str_replace( urlencode( '?' . $exploded[1] ), '', $provider );
144
+ }
145
+ }
146
+ $provider = add_query_arg( 'access_token', $access_token, $provider );
147
+ }
148
+
149
+ return $provider;
150
+ }
151
+
152
+ /**
153
+ * New oembeds are wrapped in a div for easy detection of older oembeds
154
+ * that will need to be updated
155
+ *
156
+ * @param string $html
157
+ * @param string $url
158
+ * @param array $args
159
+ *
160
+ * @return string
161
+ *
162
+ * @since 2.5/5.8
163
+ */
164
+ public static function oembed_result( $html, $url, $args ) {
165
+ if ( preg_match( '#https?://(www\.)?instagr(\.am|am\.com)/(p|tv)/.*#i', $url ) === 1 ) {
166
+ if ( strpos( $html, 'class="instagram-media"' ) !== false ) {
167
+ $html = '<div class="sbi-embed-wrap">' . str_replace( 'class="instagram-media"', 'class="instagram-media sbi-embed"', $html ) . '</div>';
168
+ }
169
+ }
170
+
171
+ return $html;
172
+ }
173
+
174
+ /**
175
+ * Extend the "time to live" for oEmbeds created with access tokens that expire
176
+ *
177
+ * @param $ttl
178
+ * @param $url
179
+ * @param $attr
180
+ * @param $post_ID
181
+ *
182
+ * @return float|int
183
+ *
184
+ * @since 2.5/5.8
185
+ */
186
+ public static function oembed_ttl( $ttl, $url, $attr, $post_ID ) {
187
+ if ( preg_match( '#https?://(www\.)?instagr(\.am|am\.com)/(p|tv)/.*#i', $url ) === 1 ) {
188
+ $ttl = 30 * YEAR_IN_SECONDS;
189
+ }
190
+
191
+ return $ttl;
192
+ }
193
+
194
+ /**
195
+ * Depending on whether a business or personal account is connected,
196
+ * a different oembed endpoint is used
197
+ *
198
+ * @return bool|string
199
+ *
200
+ * @since 2.5/5.8
201
+ */
202
+ public static function oembed_url() {
203
+ return 'https://graph.facebook.com/v8.0/instagram_oembed';
204
+ }
205
+
206
+ /**
207
+ * Any access token will work for oembeds so the most recently connected account's
208
+ * access token is returned
209
+ *
210
+ * @return bool|string
211
+ *
212
+ * @since 2.5/5.8
213
+ */
214
+ public static function last_access_token() {
215
+ $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
216
+ $will_expire = SB_Instagram_Oembed::oembed_access_token_will_expire();
217
+ if ( ! empty( $oembed_token_settings['access_token'] )
218
+ && (! $will_expire || $will_expire > time()) ) {
219
+ return sbi_maybe_clean( sbi_fixer( $oembed_token_settings['access_token'] ) );
220
+ } else {
221
+ $if_database_settings = sbi_get_database_settings();
222
+
223
+ if ( isset( $if_database_settings['connected_accounts'] ) ) {
224
+ $connected_accounts = $if_database_settings['connected_accounts'];
225
+ foreach ( $connected_accounts as $connected_account ) {
226
+ if ( empty( $oembed_token_settings['access_token'] ) ) {
227
+ if ( isset( $connected_account['type'] ) && $connected_account['type'] === 'business' ) {
228
+ $oembed_token_settings['access_token'] = $connected_account['access_token'];
229
+ }
230
+ }
231
+
232
+ }
233
+ }
234
+
235
+ if ( ! empty( $oembed_token_settings['access_token'] ) ) {
236
+ return sbi_maybe_clean( sbi_fixer( $oembed_token_settings['access_token'] ) );
237
+ }
238
+
239
+ if ( class_exists( 'CFF_Oembed' ) ) {
240
+ $cff_oembed_token_settings = get_option( 'cff_oembed_token', array() );
241
+ if ( ! empty( $cff_oembed_token_settings['access_token'] ) ) {
242
+ return $cff_oembed_token_settings['access_token'];
243
+ }
244
+ }
245
+ }
246
+
247
+ return false;
248
+ }
249
+
250
+ /**
251
+ * Access tokens created from FB accounts not connected to an
252
+ * FB page expire after 60 days.
253
+ *
254
+ * @return bool|int
255
+ */
256
+ public static function oembed_access_token_will_expire() {
257
+ $oembed_token_settings = get_option( 'sbi_oembed_token', array() );
258
+ $will_expire = isset( $oembed_token_settings['expiration_date'] ) && (int)$oembed_token_settings['expiration_date'] > 0 ? (int)$oembed_token_settings['expiration_date'] : false;
259
+
260
+ return $will_expire;
261
+ }
262
+
263
+ /**
264
+ * Before links in the content are processed, old oembed post meta
265
+ * records are deleted so new oembed data will be retrieved and saved.
266
+ * If this check has been done and no old oembeds are found, a flag
267
+ * is saved as post meta to skip the process.
268
+ *
269
+ * @since 2.5/5.8
270
+ */
271
+ public static function check_page_for_old_oembeds() {
272
+ if ( is_admin() ) {
273
+ return;
274
+ }
275
+
276
+ $post_ID = get_the_ID();
277
+ $done_checking = (int)get_post_meta( $post_ID, '_sbi_oembed_done_checking', true ) === 1;
278
+
279
+ if ( ! $done_checking ) {
280
+
281
+ $num_found = SB_Instagram_Oembed::delete_instagram_oembed_caches( $post_ID );
282
+ if ( $num_found === 0 ) {
283
+ update_post_meta( $post_ID, '_sbi_oembed_done_checking', 1 );
284
+ }
285
+ }
286
+ }
287
+
288
+ /**
289
+ * Loop through post meta data and if it's an oembed and has content
290
+ * that looks like an Instagram oembed, delete it
291
+ *
292
+ * @param $post_ID
293
+ *
294
+ * @return int number of old oembed caches found
295
+ *
296
+ * @since 2.5/5.8
297
+ */
298
+ public static function delete_instagram_oembed_caches( $post_ID ) {
299
+ $post_metas = get_post_meta( $post_ID );
300
+ if ( empty( $post_metas ) ) {
301
+ return 0;
302
+ }
303
+
304
+ $total_found = 0;
305
+ foreach ( $post_metas as $post_meta_key => $post_meta_value ) {
306
+ if ( '_oembed_' === substr( $post_meta_key, 0, 8 ) ) {
307
+ if ( strpos( $post_meta_value[0], 'class="instagram-media"' ) !== false
308
+ && strpos( $post_meta_value[0], 'sbi-embed-wrap' ) === false ) {
309
+ $total_found++;
310
+ delete_post_meta( $post_ID, $post_meta_key );
311
+ if ( '_oembed_time_' !== substr( $post_meta_key, 0, 13 ) ) {
312
+ delete_post_meta( $post_ID, str_replace( '_oembed_', '_oembed_time_', $post_meta_key ) );
313
+ }
314
+ }
315
+ }
316
+ }
317
+
318
+ return $total_found;
319
+ }
320
+
321
+ /**
322
+ * Used for clearing the oembed update check flag for all posts
323
+ *
324
+ * @since 2.5/5.8
325
+ */
326
+ public static function clear_checks() {
327
+ global $wpdb;
328
+ $table_name = esc_sql( $wpdb->prefix . "postmeta" );
329
+ $result = $wpdb->query("
330
+ DELETE
331
+ FROM $table_name
332
+ WHERE meta_key = '_sbi_oembed_done_checking';");
333
+ }
334
+ }
335
+
336
+ function sbiOembedInit() {
337
+ return new SB_Instagram_Oembed();
338
+ }
339
+ sbiOembedInit();
inc/class-sb-instagram-parse.php CHANGED
@@ -307,13 +307,13 @@ class SB_Instagram_Parse
307
  *
308
  * @since 2.0/5.0
309
  */
310
- protected static function fix_permalink( $permalink ) {
311
  if ( substr_count( $permalink, '/' ) > 5 ) {
312
  $permalink_array = explode( '/', $permalink );
313
  $perm_id = $permalink_array[ count( $permalink_array ) - 2 ];
314
  $permalink = 'https://www.instagram.com/p/' . $perm_id . '/';
315
  }
316
-
317
  return $permalink;
 
318
  }
319
  }
307
  *
308
  * @since 2.0/5.0
309
  */
310
+ public static function fix_permalink( $permalink ) {
311
  if ( substr_count( $permalink, '/' ) > 5 ) {
312
  $permalink_array = explode( '/', $permalink );
313
  $perm_id = $permalink_array[ count( $permalink_array ) - 2 ];
314
  $permalink = 'https://www.instagram.com/p/' . $perm_id . '/';
315
  }
 
316
  return $permalink;
317
+
318
  }
319
  }
inc/class-sb-instagram-posts-manager.php CHANGED
@@ -363,7 +363,7 @@ class SB_Instagram_Posts_Manager
363
  return;
364
  }
365
  foreach ( $this->errors as $type => $error ) {
366
- if ( strpos( $type, 'expiration_' ) !== false ) {
367
  unset( $this->errors[ $type ] );
368
  }
369
  }
363
  return;
364
  }
365
  foreach ( $this->errors as $type => $error ) {
366
+ if ( strpos( $type, 'expiration_' ) === false ) {
367
  unset( $this->errors[ $type ] );
368
  }
369
  }
inc/class-sb-instagram-settings.php CHANGED
@@ -123,8 +123,8 @@ class SB_Instagram_Settings {
123
  $this->settings['showheader'] = false;
124
  }
125
  $this->settings['disable_resize'] = isset( $db['sb_instagram_disable_resize'] ) && ($db['sb_instagram_disable_resize'] === 'on');
126
- $this->settings['favor_local'] = isset( $db['sb_instagram_favor_local'] ) && ($db['sb_instagram_favor_local'] === 'on');
127
- $this->settings['backup_cache_enabled'] = ! isset( $db['sb_instagram_backup'] ) || ($db['sb_instagram_backup'] === 'on');
128
  $this->settings['font_method'] = isset( $db['sbi_font_method'] ) ? $db['sbi_font_method'] : 'svg';
129
  $this->settings['headeroutside'] = ($this->settings['headeroutside'] === true || $this->settings['headeroutside'] === 'on' || $this->settings['headeroutside'] === 'true');
130
  $this->settings['disable_js_image_loading'] = isset( $db['disable_js_image_loading'] ) && ($db['disable_js_image_loading'] === 'on');
@@ -720,10 +720,10 @@ class SB_Instagram_Settings {
720
  'enqueue_js_in_head' => false,
721
  'disable_js_image_loading' => false,
722
  'sb_instagram_disable_resize' => false,
723
- 'sb_instagram_favor_local' => false,
724
  'sb_instagram_cache_time' => '1',
725
  'sb_instagram_cache_time_unit' => 'hours',
726
- 'sbi_caching_type' => 'page',
727
  'sbi_cache_cron_interval' => '12hours',
728
  'sbi_cache_cron_time' => '1',
729
  'sbi_cache_cron_am_pm' => 'am',
123
  $this->settings['showheader'] = false;
124
  }
125
  $this->settings['disable_resize'] = isset( $db['sb_instagram_disable_resize'] ) && ($db['sb_instagram_disable_resize'] === 'on');
126
+ $this->settings['favor_local'] = ! isset( $db['sb_instagram_favor_local'] ) || ($db['sb_instagram_favor_local'] === 'on') || ($db['sb_instagram_favor_local'] === true);
127
+ $this->settings['backup_cache_enabled'] = ! isset( $db['sb_instagram_backup'] ) || ($db['sb_instagram_backup'] === 'on') || $db['sb_instagram_backup'] === true;
128
  $this->settings['font_method'] = isset( $db['sbi_font_method'] ) ? $db['sbi_font_method'] : 'svg';
129
  $this->settings['headeroutside'] = ($this->settings['headeroutside'] === true || $this->settings['headeroutside'] === 'on' || $this->settings['headeroutside'] === 'true');
130
  $this->settings['disable_js_image_loading'] = isset( $db['disable_js_image_loading'] ) && ($db['disable_js_image_loading'] === 'on');
720
  'enqueue_js_in_head' => false,
721
  'disable_js_image_loading' => false,
722
  'sb_instagram_disable_resize' => false,
723
+ 'sb_instagram_favor_local' => true,
724
  'sb_instagram_cache_time' => '1',
725
  'sb_instagram_cache_time_unit' => 'hours',
726
+ 'sbi_caching_type' => 'background',
727
  'sbi_cache_cron_interval' => '12hours',
728
  'sbi_cache_cron_time' => '1',
729
  'sbi_cache_cron_am_pm' => 'am',
inc/class-sb-instagram-token-refresher.php CHANGED
@@ -151,6 +151,14 @@ class SB_Instagram_Token_Refresher
151
  update_option( 'sb_instagram_settings', $options );
152
  }
153
 
 
 
 
 
 
 
 
 
154
  public function get_last_error_code() {
155
  if ( isset( $this->report['error_log'] ) ) {
156
  $error = $this->report['error_log']->get_data();
151
  update_option( 'sb_instagram_settings', $options );
152
  }
153
 
154
+ /**
155
+ * Helps determine if an access token is from a private
156
+ * account which can't be refreshed
157
+ *
158
+ * @return bool
159
+ *
160
+ * @since 2.4.7/5.7.1
161
+ */
162
  public function get_last_error_code() {
163
  if ( isset( $this->report['error_log'] ) ) {
164
  $error = $this->report['error_log']->get_data();
inc/if-functions.php CHANGED
@@ -943,9 +943,9 @@ function sb_instagram_scripts_enqueue() {
943
  //Options to pass to JS file
944
  $sb_instagram_settings = get_option( 'sb_instagram_settings' );
945
 
946
- $js_file = 'js/sb-instagram-2-2.min.js';
947
  if ( isset( $_GET['sbi_debug'] ) ) {
948
- $js_file = 'js/sb-instagram.js';
949
  }
950
 
951
  if ( isset( $sb_instagram_settings['enqueue_js_in_head'] ) && $sb_instagram_settings['enqueue_js_in_head'] ) {
@@ -955,9 +955,9 @@ function sb_instagram_scripts_enqueue() {
955
  }
956
 
957
  if ( isset( $sb_instagram_settings['enqueue_css_in_shortcode'] ) && $sb_instagram_settings['enqueue_css_in_shortcode'] ) {
958
- wp_register_style( 'sb_instagram_styles', trailingslashit( SBI_PLUGIN_URL ) . 'css/sb-instagram-2-2.min.css', array(), SBIVER );
959
  } else {
960
- wp_enqueue_style( 'sb_instagram_styles', trailingslashit( SBI_PLUGIN_URL ) . 'css/sb-instagram-2-2.min.css', array(), SBIVER );
961
  }
962
 
963
  $font_method = isset( $sb_instagram_settings['sbi_font_method'] ) ? $sb_instagram_settings['sbi_font_method'] : 'svg';
943
  //Options to pass to JS file
944
  $sb_instagram_settings = get_option( 'sb_instagram_settings' );
945
 
946
+ $js_file = 'js/sbi-scripts.min.js';
947
  if ( isset( $_GET['sbi_debug'] ) ) {
948
+ $js_file = 'js/sbi-scripts.js';
949
  }
950
 
951
  if ( isset( $sb_instagram_settings['enqueue_js_in_head'] ) && $sb_instagram_settings['enqueue_js_in_head'] ) {
955
  }
956
 
957
  if ( isset( $sb_instagram_settings['enqueue_css_in_shortcode'] ) && $sb_instagram_settings['enqueue_css_in_shortcode'] ) {
958
+ wp_register_style( 'sb_instagram_styles', trailingslashit( SBI_PLUGIN_URL ) . 'css/sbi-styles.min.css', array(), SBIVER );
959
  } else {
960
+ wp_enqueue_style( 'sb_instagram_styles', trailingslashit( SBI_PLUGIN_URL ) . 'css/sbi-styles.min.css', array(), SBIVER );
961
  }
962
 
963
  $font_method = isset( $sb_instagram_settings['sbi_font_method'] ) ? $sb_instagram_settings['sbi_font_method'] : 'svg';
instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Smash Balloon Instagram Feed
4
  Plugin URI: https://smashballoon.com/instagram-feed
5
  Description: Display beautifully clean, customizable, and responsive Instagram feeds.
6
- Version: 2.4.7
7
  Author: Smash Balloon
8
  Author URI: https://smashballoon.com/
9
  License: GPLv2 or later
@@ -23,7 +23,7 @@ along with this program; if not, write to the Free Software
23
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
  if ( ! defined( 'SBIVER' ) ) {
26
- define( 'SBIVER', '2.4.7' );
27
  }
28
  // Db version.
29
  if ( ! defined( 'SBI_DBVERSION' ) ) {
@@ -97,6 +97,7 @@ if ( function_exists( 'sb_instagram_feed_init' ) ) {
97
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-cron-updater.php';
98
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-display-elements.php';
99
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-feed.php';
 
100
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-parse.php';
101
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-post.php';
102
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-post-set.php';
@@ -547,25 +548,25 @@ if ( function_exists( 'sb_instagram_feed_init' ) ) {
547
  global $wpdb;
548
  $table_name = $wpdb->prefix . "options";
549
  $wpdb->query( "
550
- DELETE
551
- FROM $table_name
552
- WHERE `option_name` LIKE ('%!sbi\_%')
553
  " );
554
  $wpdb->query( "
555
- DELETE
556
- FROM $table_name
557
- WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
558
  " );
559
  $wpdb->query( "
560
- DELETE
561
- FROM $table_name
562
- WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
563
  " );
564
  $wpdb->query( "
565
- DELETE
566
- FROM $table_name
567
- WHERE `option_name` LIKE ('%sb_wlupdated_%')
568
- " );
569
 
570
  //image resizing
571
  $upload = wp_upload_dir();
@@ -597,10 +598,12 @@ if ( function_exists( 'sb_instagram_feed_init' ) ) {
597
  FROM $table_name
598
  WHERE `option_name` LIKE ('%\_transient\_timeout\_\$sbi\_%')
599
  " );
600
- delete_option( 'sbi_hashtag_ids' );
601
- delete_option( 'sb_instagram_errors' );
602
  delete_option( 'sbi_usage_tracking_config' );
603
  delete_option( 'sbi_usage_tracking' );
 
 
 
 
604
 
605
  global $wp_roles;
606
  $wp_roles->remove_cap( 'administrator', 'manage_instagram_feed_options' );
3
  Plugin Name: Smash Balloon Instagram Feed
4
  Plugin URI: https://smashballoon.com/instagram-feed
5
  Description: Display beautifully clean, customizable, and responsive Instagram feeds.
6
+ Version: 2.5
7
  Author: Smash Balloon
8
  Author URI: https://smashballoon.com/
9
  License: GPLv2 or later
23
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
  if ( ! defined( 'SBIVER' ) ) {
26
+ define( 'SBIVER', '2.5' );
27
  }
28
  // Db version.
29
  if ( ! defined( 'SBI_DBVERSION' ) ) {
97
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-cron-updater.php';
98
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-display-elements.php';
99
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-feed.php';
100
+ require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-oembed.php';
101
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-parse.php';
102
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-post.php';
103
  require_once trailingslashit( SBI_PLUGIN_DIR ) . 'inc/class-sb-instagram-post-set.php';
548
  global $wpdb;
549
  $table_name = $wpdb->prefix . "options";
550
  $wpdb->query( "
551
+ DELETE
552
+ FROM $table_name
553
+ WHERE `option_name` LIKE ('%!sbi\_%')
554
  " );
555
  $wpdb->query( "
556
+ DELETE
557
+ FROM $table_name
558
+ WHERE `option_name` LIKE ('%\_transient\_&sbi\_%')
559
  " );
560
  $wpdb->query( "
561
+ DELETE
562
+ FROM $table_name
563
+ WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
564
  " );
565
  $wpdb->query( "
566
+ DELETE
567
+ FROM $table_name
568
+ WHERE `option_name` LIKE ('%sb_wlupdated_%')
569
+ " );
570
 
571
  //image resizing
572
  $upload = wp_upload_dir();
598
  FROM $table_name
599
  WHERE `option_name` LIKE ('%\_transient\_timeout\_\$sbi\_%')
600
  " );
 
 
601
  delete_option( 'sbi_usage_tracking_config' );
602
  delete_option( 'sbi_usage_tracking' );
603
+ delete_option( 'sbi_oembed_token' );
604
+ delete_option( 'sbi_rating_notice' );
605
+ delete_option( 'sbi_refresh_report' );
606
+ delete_option( 'sbi_welcome_seen' );
607
 
608
  global $wp_roles;
609
  $wp_roles->remove_cap( 'administrator', 'manage_instagram_feed_options' );
js/sb-instagram-admin-2-2.js CHANGED
@@ -1,4 +1,11 @@
1
  jQuery(document).ready(function($) {
 
 
 
 
 
 
 
2
  jQuery('#sbi_no_js_warning').remove();
3
  /* NEW API CODE */
4
  $('.sbi_admin_btn, .sbi_reconnect').click(function(event) {
@@ -36,7 +43,11 @@ jQuery(document).ready(function($) {
36
  '</div>');
37
 
38
  $('.sbi_modal_close').on('click', function(){
39
- $('#sbi_config_info').remove();
 
 
 
 
40
  });
41
 
42
  $('input[name=sbi_login_type]').change(function() {
@@ -113,7 +124,11 @@ jQuery(document).ready(function($) {
113
  });
114
 
115
  $('.sbi_modal_close').on('click', function(){
116
- $('#sbi_config_info').remove();
 
 
 
 
117
  });
118
  /* NEW API CODE */
119
  //Autofill the token and id
@@ -774,6 +789,22 @@ jQuery(document).ready(function($) {
774
  sbiSubmitOptIn(true);
775
  }); // clear_comment_cache click
776
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
777
  $('.sb-no-usage-opt-out').click(function(event) {
778
  event.preventDefault();
779
 
@@ -892,18 +923,18 @@ jQuery(document).ready(function($) {
892
  }
893
 
894
  //Scroll to hash for quick links
895
- jQuery('#sbi_admin a').click(function() {
896
- if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
897
- var target = jQuery(this.hash);
898
- target = target.length ? target : this.hash.slice(1);
899
- if (target.length) {
900
- jQuery('html,body').animate({
901
- scrollTop: target.offset().top
902
- }, 500);
903
- return false;
904
- }
905
- }
906
- });
907
 
908
  //Support tab show video
909
  jQuery('#sbi-play-support-video').on('click', function(e){
@@ -1040,7 +1071,7 @@ jQuery(document).ready(function($) {
1040
  });
1041
  });
1042
  /* removing padding */
1043
- if (jQuery('#sbi-admin-about').length) {
1044
  jQuery('#wpcontent').css('padding', 0);
1045
  }
1046
 
@@ -1069,6 +1100,38 @@ jQuery(document).ready(function($) {
1069
  }
1070
  }); // ajax call
1071
  })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1072
  });
1073
 
1074
 
@@ -1141,7 +1204,9 @@ jQuery(document).ready(function($) {
1141
  }
1142
 
1143
  // Display all addon boxes as the same height.
1144
- $( '.addon-item .details' ).matchHeight( { byrow: false, property: 'height' } );
 
 
1145
 
1146
  // Addons searching.
1147
  if ( $('#sbi-admin-addons-list').length ) {
1
  jQuery(document).ready(function($) {
2
+
3
+ //Close the modal if clicking anywhere outside it
4
+ jQuery('body').on('click', '.sb_cross_install_modal', function(e){
5
+ if (e.target !== this) return;
6
+ jQuery('.sb_cross_install_modal').remove();
7
+ });
8
+
9
  jQuery('#sbi_no_js_warning').remove();
10
  /* NEW API CODE */
11
  $('.sbi_admin_btn, .sbi_reconnect').click(function(event) {
43
  '</div>');
44
 
45
  $('.sbi_modal_close').on('click', function(){
46
+ if (jQuery('.sbi-need-to-connect').length) {
47
+ $('#sbi_config_info').hide();
48
+ } else {
49
+ $('#sbi_config_info').remove();
50
+ }
51
  });
52
 
53
  $('input[name=sbi_login_type]').change(function() {
124
  });
125
 
126
  $('.sbi_modal_close').on('click', function(){
127
+ if (jQuery('.sbi-need-to-connect').length) {
128
+ $('#sbi_config_info').hide();
129
+ } else {
130
+ $('#sbi_config_info').remove();
131
+ }
132
  });
133
  /* NEW API CODE */
134
  //Autofill the token and id
789
  sbiSubmitOptIn(true);
790
  }); // clear_comment_cache click
791
 
792
+ jQuery('#sbi-oembed-disable').click(function(e) {
793
+ e.preventDefault();
794
+ jQuery(this).addClass( 'loading' ).html('<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>');
795
+ jQuery.ajax({
796
+ url : sbiA.ajax_url,
797
+ type: 'post',
798
+ data: {
799
+ action : 'sbi_oembed_disable',
800
+ sbi_nonce : sbiA.sbi_nonce,
801
+ },
802
+ success: function (data) {
803
+ jQuery('#sbi-oembed-disable').closest('p').html(data);
804
+ }
805
+ });
806
+ });
807
+
808
  $('.sb-no-usage-opt-out').click(function(event) {
809
  event.preventDefault();
810
 
923
  }
924
 
925
  //Scroll to hash for quick links
926
+ jQuery('#sbi_admin a').click(function() {
927
+ if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
928
+ var target = jQuery(this.hash);
929
+ target = target.length ? target : this.hash.slice(1);
930
+ if (target.length) {
931
+ jQuery('html,body').animate({
932
+ scrollTop: target.offset().top
933
+ }, 500);
934
+ return false;
935
+ }
936
+ }
937
+ });
938
 
939
  //Support tab show video
940
  jQuery('#sbi-play-support-video').on('click', function(e){
1071
  });
1072
  });
1073
  /* removing padding */
1074
+ if (jQuery('#sbi-admin-about').length && ! jQuery('.sbi_more_plugins').length) {
1075
  jQuery('#wpcontent').css('padding', 0);
1076
  }
1077
 
1100
  }
1101
  }); // ajax call
1102
  })
1103
+
1104
+ //Click event for other plugins in menu
1105
+ $('.sbi_get_cff, .sbi_get_sbi, .sbi_get_ctf, .sbi_get_yt').parent().on('click', function(e){
1106
+ e.preventDefault();
1107
+
1108
+ jQuery('.sb_cross_install_modal').remove();
1109
+
1110
+ $('#wpbody-content').prepend('<div class="sb_cross_install_modal"><div class="sb_cross_install_inner" id="sbi-admin-about"><div id="sbi-admin-addons"><div class="addons-container"><i class="fa fa-spinner fa-spin sbi-loader" aria-hidden="true"></i></div></div></div></div>');
1111
+
1112
+ var $self = $(this).find('span'),
1113
+ sb_get_plugin = 'custom_twitter_feeds';
1114
+
1115
+ if( $self.hasClass('sbi_get_cff') ){
1116
+ sb_get_plugin = 'custom_facebook_feed';
1117
+ } else if( $self.hasClass('sbi_get_sbi') ){
1118
+ sb_get_plugin = 'instagram_feed';
1119
+ } else if( $self.hasClass('sbi_get_yt') ){
1120
+ sb_get_plugin = 'feeds_for_youtube';
1121
+ }
1122
+
1123
+ $get_plugins_url = sbiA.ajax_url.replace('admin-ajax.php', '');
1124
+
1125
+ //Get the quick install box from the about page
1126
+ $('.sb_cross_install_modal .addons-container').load($get_plugins_url+'admin.php?page=sb-instagram-feed&tab=more #install_'+sb_get_plugin);
1127
+ });
1128
+
1129
+ jQuery('.sbi-need-to-connect').click(function(e) {
1130
+ e.preventDefault();
1131
+
1132
+ jQuery('#sbi_config_info').show();
1133
+ });
1134
+
1135
  });
1136
 
1137
 
1204
  }
1205
 
1206
  // Display all addon boxes as the same height.
1207
+ if( $( '#sbi-admin-about.sbi-admin-wrap').length ){
1208
+ $( '#sbi-admin-about .addon-item .details' ).matchHeight( { byrow: false, property: 'height' } );
1209
+ }
1210
 
1211
  // Addons searching.
1212
  if ( $('#sbi-admin-addons-list').length ) {
js/sbi-scripts.js ADDED
@@ -0,0 +1,887 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var sbi_js_exists = (typeof sbi_js_exists !== 'undefined') ? true : false;
2
+ if(!sbi_js_exists) {
3
+ (function($){
4
+
5
+ function sbiAddImgLiquid() {
6
+ /*! imgLiquid v0.9.944 / 03-05-2013 https://github.com/karacas/imgLiquid */
7
+ var sbi_imgLiquid = sbi_imgLiquid || {VER: "0.9.944"};
8
+ sbi_imgLiquid.bgs_Available = !1, sbi_imgLiquid.bgs_CheckRunned = !1, function (i) {
9
+ function t() {
10
+ if (!sbi_imgLiquid.bgs_CheckRunned) {
11
+ sbi_imgLiquid.bgs_CheckRunned = !0;
12
+ var t = i('<span style="background-size:cover" />');
13
+ i("body").append(t), !function () {
14
+ var i = t[0];
15
+ if (i && window.getComputedStyle) {
16
+ var e = window.getComputedStyle(i, null);
17
+ e && e.backgroundSize && (sbi_imgLiquid.bgs_Available = "cover" === e.backgroundSize)
18
+ }
19
+ }(), t.remove()
20
+ }
21
+ }
22
+
23
+ i.fn.extend({
24
+ sbi_imgLiquid: function (e) {
25
+ this.defaults = {
26
+ fill: !0,
27
+ verticalAlign: "center",
28
+ horizontalAlign: "center",
29
+ useBackgroundSize: !0,
30
+ useDataHtmlAttr: !0,
31
+ responsive: !0,
32
+ delay: 0,
33
+ fadeInTime: 0,
34
+ removeBoxBackground: !0,
35
+ hardPixels: !0,
36
+ responsiveCheckTime: 500,
37
+ timecheckvisibility: 500,
38
+ onStart: null,
39
+ onFinish: null,
40
+ onItemStart: null,
41
+ onItemFinish: null,
42
+ onItemError: null
43
+ }, t();
44
+ var a = this;
45
+ return this.options = e, this.settings = i.extend({}, this.defaults, this.options), this.settings.onStart && this.settings.onStart(), this.each(function (t) {
46
+ function e() {
47
+ -1 === u.css("background-image").indexOf(encodeURI(c.attr("src"))) && u.css({"background-image": 'url("' + encodeURI(c.attr("src")) + '")'}), u.css({
48
+ "background-size": g.fill ? "cover" : "contain",
49
+ "background-position": (g.horizontalAlign + " " + g.verticalAlign).toLowerCase(),
50
+ "background-repeat": "no-repeat"
51
+ }), i("a:first", u).css({
52
+ display: "block",
53
+ width: "100%",
54
+ height: "100%"
55
+ }), i("img", u).css({display: "none"}), g.onItemFinish && g.onItemFinish(t, u, c), u.addClass("sbi_imgLiquid_bgSize"), u.addClass("sbi_imgLiquid_ready"), l()
56
+ }
57
+
58
+ function o() {
59
+ function e() {
60
+ c.data("sbi_imgLiquid_error") || c.data("sbi_imgLiquid_loaded") || c.data("sbi_imgLiquid_oldProcessed") || (u.is(":visible") && c[0].complete && c[0].width > 0 && c[0].height > 0 ? (c.data("sbi_imgLiquid_loaded", !0), setTimeout(r, t * g.delay)) : setTimeout(e, g.timecheckvisibility))
61
+ }
62
+
63
+ if (c.data("oldSrc") && c.data("oldSrc") !== c.attr("src")) {
64
+ var a = c.clone().removeAttr("style");
65
+ return a.data("sbi_imgLiquid_settings", c.data("sbi_imgLiquid_settings")), c.parent().prepend(a), c.remove(), c = a, c[0].width = 0, void setTimeout(o, 10)
66
+ }
67
+ return c.data("sbi_imgLiquid_oldProcessed") ? void r() : (c.data("sbi_imgLiquid_oldProcessed", !1), c.data("oldSrc", c.attr("src")), i("img:not(:first)", u).css("display", "none"), u.css({overflow: "hidden"}), c.fadeTo(0, 0).removeAttr("width").removeAttr("height").css({
68
+ visibility: "visible",
69
+ "max-width": "none",
70
+ "max-height": "none",
71
+ width: "auto",
72
+ height: "auto",
73
+ display: "block"
74
+ }), c.on("error", n), c[0].onerror = n, e(), void d())
75
+ }
76
+
77
+ function d() {
78
+ (g.responsive || c.data("sbi_imgLiquid_oldProcessed")) && c.data("sbi_imgLiquid_settings") && (g = c.data("sbi_imgLiquid_settings"), u.actualSize = u.get(0).offsetWidth + u.get(0).offsetHeight / 1e4, u.sizeOld && u.actualSize !== u.sizeOld && r(), u.sizeOld = u.actualSize, setTimeout(d, g.responsiveCheckTime))
79
+ }
80
+
81
+ function n() {
82
+ c.data("sbi_imgLiquid_error", !0), u.addClass("sbi_imgLiquid_error"), g.onItemError && g.onItemError(t, u, c), l()
83
+ }
84
+
85
+ function s() {
86
+ var i = {};
87
+ if (a.settings.useDataHtmlAttr) {
88
+ var t = u.attr("data-sbi_imgLiquid-fill"),
89
+ e = u.attr("data-sbi_imgLiquid-horizontalAlign"),
90
+ o = u.attr("data-sbi_imgLiquid-verticalAlign");
91
+ ("true" === t || "false" === t) && (i.fill = Boolean("true" === t)), void 0 === e || "left" !== e && "center" !== e && "right" !== e && -1 === e.indexOf("%") || (i.horizontalAlign = e), void 0 === o || "top" !== o && "bottom" !== o && "center" !== o && -1 === o.indexOf("%") || (i.verticalAlign = o)
92
+ }
93
+ return sbi_imgLiquid.isIE && a.settings.ieFadeInDisabled && (i.fadeInTime = 0), i
94
+ }
95
+
96
+ function r() {
97
+ var i, e, a, o, d, n, s, r, m = 0, h = 0, f = u.width(), v = u.height();
98
+ void 0 === c.data("owidth") && c.data("owidth", c[0].width), void 0 === c.data("oheight") && c.data("oheight", c[0].height), g.fill === f / v >= c.data("owidth") / c.data("oheight") ? (i = "100%", e = "auto", a = Math.floor(f), o = Math.floor(f * (c.data("oheight") / c.data("owidth")))) : (i = "auto", e = "100%", a = Math.floor(v * (c.data("owidth") / c.data("oheight"))), o = Math.floor(v)), d = g.horizontalAlign.toLowerCase(), s = f - a, "left" === d && (h = 0), "center" === d && (h = .5 * s), "right" === d && (h = s), -1 !== d.indexOf("%") && (d = parseInt(d.replace("%", ""), 10), d > 0 && (h = s * d * .01)), n = g.verticalAlign.toLowerCase(), r = v - o, "left" === n && (m = 0), "center" === n && (m = .5 * r), "bottom" === n && (m = r), -1 !== n.indexOf("%") && (n = parseInt(n.replace("%", ""), 10), n > 0 && (m = r * n * .01)), g.hardPixels && (i = a, e = o), c.css({
99
+ width: i,
100
+ height: e,
101
+ "margin-left": Math.floor(h),
102
+ "margin-top": Math.floor(m)
103
+ }), c.data("sbi_imgLiquid_oldProcessed") || (c.fadeTo(g.fadeInTime, 1), c.data("sbi_imgLiquid_oldProcessed", !0), g.removeBoxBackground && u.css("background-image", "none"), u.addClass("sbi_imgLiquid_nobgSize"), u.addClass("sbi_imgLiquid_ready")), g.onItemFinish && g.onItemFinish(t, u, c), l()
104
+ }
105
+
106
+ function l() {
107
+ t === a.length - 1 && a.settings.onFinish && a.settings.onFinish()
108
+ }
109
+
110
+ var g = a.settings, u = i(this), c = i("img:first", u);
111
+ return c.length ? (c.data("sbi_imgLiquid_settings") ? (u.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"), g = i.extend({}, c.data("sbi_imgLiquid_settings"), a.options)) : g = i.extend({}, a.settings, s()), c.data("sbi_imgLiquid_settings", g), g.onItemStart && g.onItemStart(t, u, c), void (sbi_imgLiquid.bgs_Available && g.useBackgroundSize ? e() : o())) : void n()
112
+ })
113
+ }
114
+ })
115
+ }(jQuery);
116
+
117
+ // Use imagefill to set the images as backgrounds so they can be square
118
+ !function () {
119
+ var css = sbi_imgLiquid.injectCss,
120
+ head = document.getElementsByTagName('head')[0],
121
+ style = document.createElement('style');
122
+ style.type = 'text/css';
123
+ if (style.styleSheet) {
124
+ style.styleSheet.cssText = css;
125
+ } else {
126
+ style.appendChild(document.createTextNode(css));
127
+ }
128
+ head.appendChild(style);
129
+ }();
130
+ }
131
+
132
+ function sbiAddVisibilityListener() {
133
+ /* Detect when element becomes visible. Used for when the feed is initially hidden, in a tab for example. https://github.com/shaunbowe/jquery.visibilityChanged */
134
+ !function (i) {
135
+ var n = {
136
+ callback: function () {
137
+ }, runOnLoad: !0, frequency: 100, sbiPreviousVisibility: null
138
+ }, c = {};
139
+ c.sbiCheckVisibility = function (i, n) {
140
+ if (jQuery.contains(document, i[0])) {
141
+ var e = n.sbiPreviousVisibility, t = i.is(":visible");
142
+ n.sbiPreviousVisibility = t, null == e ? n.runOnLoad && n.callback(i, t) : e !== t && n.callback(i, t), setTimeout(function () {
143
+ c.sbiCheckVisibility(i, n)
144
+ }, n.frequency)
145
+ }
146
+ }, i.fn.sbiVisibilityChanged = function (e) {
147
+ var t = i.extend({}, n, e);
148
+ return this.each(function () {
149
+ c.sbiCheckVisibility(i(this), t)
150
+ })
151
+ }
152
+ }(jQuery);
153
+ }
154
+
155
+ function Sbi() {
156
+ this.feeds = {};
157
+ this.options = sb_instagram_js_options;
158
+ }
159
+
160
+ Sbi.prototype = {
161
+ createPage: function (createFeeds, createFeedsArgs) {
162
+ if (typeof window.sbiajaxurl === 'undefined' || window.sbiajaxurl.indexOf(window.location.hostname) === -1) {
163
+ window.sbiajaxurl = location.protocol + '//'+ window.location.hostname + '/wp-admin/admin-ajax.php';
164
+ }
165
+
166
+ $('.sbi_no_js_error_message').remove();
167
+ $('.sbi_no_js').removeClass('sbi_no_js');
168
+ createFeeds(createFeedsArgs);
169
+ },
170
+ createFeeds: function (args) {
171
+ args.whenFeedsCreated(
172
+ $('.sbi').each(function (index) {
173
+ $(this).attr('data-sbi-index', index + 1);
174
+ var $self = $(this),
175
+ flags = typeof $self.attr('data-sbi-flags') !== 'undefined' ? $self.attr('data-sbi-flags').split(',') : [],
176
+ general = typeof $self.attr('data-options') !== 'undefined' ? JSON.parse($self.attr('data-options')) : {};
177
+ if (flags.indexOf('testAjax') > -1) {
178
+ window.sbi.triggeredTest = true;
179
+ var submitData = {
180
+ 'action' : 'sbi_on_ajax_test_trigger'
181
+ },
182
+ onSuccess = function(data) {
183
+ console.log('did test');
184
+ };
185
+ sbiAjax(submitData,onSuccess)
186
+ }
187
+ var feedOptions = {
188
+ cols : $self.attr('data-cols'),
189
+ colsmobile : $self.attr('data-colsmobile') !== 'same' ? $self.attr('data-colsmobile') : $self.attr('data-cols'),
190
+ num : $self.attr('data-num'),
191
+ imgRes : $self.attr('data-res'),
192
+ feedID : $self.attr('data-feedid'),
193
+ shortCodeAtts : $self.attr('data-shortcode-atts'),
194
+ resizingEnabled : (flags.indexOf('resizeDisable') === -1),
195
+ imageLoadEnabled : (flags.indexOf('imageLoadDisable') === -1),
196
+ debugEnabled : (flags.indexOf('debug') > -1),
197
+ favorLocal : (flags.indexOf('favorLocal') > -1),
198
+ ajaxPostLoad : (flags.indexOf('ajaxPostLoad') > -1),
199
+ autoMinRes : 1,
200
+ general : general
201
+ };
202
+
203
+ window.sbi.feeds[index] = sbiGetNewFeed(this, index, feedOptions);
204
+ window.sbi.feeds[index].setResizedImages();
205
+ window.sbi.feeds[index].init();
206
+
207
+ var evt = jQuery.Event('sbiafterfeedcreate');
208
+ evt.feed = window.sbi.feeds[index];
209
+ jQuery(window).trigger(evt);
210
+
211
+ })
212
+ );
213
+ },
214
+ afterFeedsCreated: function () {
215
+ // enable header hover action
216
+ $('.sb_instagram_header').each(function () {
217
+ var $thisHeader = $(this);
218
+ $thisHeader.find('.sbi_header_link').hover(function () {
219
+ $thisHeader.find('.sbi_header_img_hover').addClass('sbi_fade_in');
220
+ }, function () {
221
+ $thisHeader.find('.sbi_header_img_hover').removeClass('sbi_fade_in');
222
+ });
223
+ });
224
+
225
+ },
226
+ encodeHTML: function(raw) {
227
+ // make sure passed variable is defined
228
+ if (typeof raw === 'undefined') {
229
+ return '';
230
+ }
231
+ // replace greater than and less than symbols with html entity to disallow html in comments
232
+ var encoded = raw.replace(/(>)/g,'&gt;'),
233
+ encoded = encoded.replace(/(<)/g,'&lt;');
234
+ encoded = encoded.replace(/(&lt;br\/&gt;)/g,'<br>');
235
+ encoded = encoded.replace(/(&lt;br&gt;)/g,'<br>');
236
+
237
+ return encoded;
238
+ },
239
+ urlDetect: function(text) {
240
+ var urlRegex = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;
241
+ return text.match(urlRegex);
242
+ }
243
+ };
244
+
245
+ function SbiFeed(el, index, settings) {
246
+ this.el = el;
247
+ this.index = index;
248
+ this.settings = settings;
249
+ this.minImageWidth = 0;
250
+ this.imageResolution = 150;
251
+ this.resizedImages = {};
252
+ this.needsResizing = [];
253
+ this.outOfPages = false;
254
+ this.isInitialized = false;
255
+ }
256
+
257
+ SbiFeed.prototype = {
258
+ init: function() {
259
+ var feed = this;
260
+ if ($(this.el).find('#sbi_mod_error').length) {
261
+ $(this.el).prepend($(this.el).find('#sbi_mod_error'));
262
+ }
263
+ if (this.settings.ajaxPostLoad) {
264
+ this.getNewPostSet();
265
+ } else {
266
+ this.afterInitialImagesLoaded();
267
+ //Only check the width once the resize event is over
268
+ }
269
+ var sbi_delay = (function () {
270
+ var sbi_timer = 0;
271
+ return function (sbi_callback, sbi_ms) {
272
+ clearTimeout(sbi_timer);
273
+ sbi_timer = setTimeout(sbi_callback, sbi_ms);
274
+ };
275
+ })();
276
+ jQuery(window).resize(function () {
277
+ sbi_delay(function () {
278
+ feed.afterResize();
279
+ }, 500);
280
+ });
281
+
282
+ },
283
+ initLayout: function() {
284
+
285
+ },
286
+ afterInitialImagesLoaded: function() {
287
+ this.initLayout();
288
+ this.loadMoreButtonInit();
289
+ this.hideExtraImagesForWidth();
290
+ this.beforeNewImagesRevealed();
291
+ this.revealNewImages();
292
+ this.afterNewImagesRevealed();
293
+ },
294
+ afterResize: function() {
295
+ this.setImageHeight();
296
+ this.setImageResolution();
297
+ this.maybeRaiseImageResolution();
298
+ this.setImageSizeClass();
299
+ },
300
+ afterLoadMoreClicked: function($button) {
301
+ $button.find('.sbi_loader').removeClass('sbi_hidden');
302
+ $button.find('.sbi_btn_text').addClass('sbi_hidden');
303
+ $button.closest('.sbi').find('.sbi_num_diff_hide').addClass('sbi_transition').removeClass('sbi_num_diff_hide');
304
+ },
305
+ afterNewImagesLoaded: function() {
306
+ var $self = $(this.el),
307
+ feed = this;
308
+ this.beforeNewImagesRevealed();
309
+ this.revealNewImages();
310
+ this.afterNewImagesRevealed();
311
+ setTimeout(function () {
312
+ //Hide the loader in the load more button
313
+ $self.find('.sbi_loader').addClass('sbi_hidden');
314
+ $self.find('.sbi_btn_text').removeClass('sbi_hidden');
315
+ feed.maybeRaiseImageResolution();
316
+ }, 500);
317
+ },
318
+ beforeNewImagesRevealed: function() {
319
+ this.setImageHeight();
320
+ this.maybeRaiseImageResolution(true);
321
+ this.setImageSizeClass();
322
+ },
323
+ revealNewImages: function() {
324
+ var $self = $(this.el),
325
+ feed = this;
326
+
327
+ // Call Custom JS if it exists
328
+ if (typeof sbi_custom_js == 'function') setTimeout(function(){ sbi_custom_js(); }, 100);
329
+
330
+ this.applyImageLiquid();
331
+ $self.find('.sbi_item').each(function (index) {
332
+ var $self = jQuery(this);
333
+
334
+ //Photo links
335
+ //If lightbox is disabled
336
+ $self.find('.sbi_photo').hover(function () {
337
+ jQuery(this).fadeTo(200, 0.85);
338
+ }, function () {
339
+ jQuery(this).stop().fadeTo(500, 1);
340
+ });
341
+
342
+ }); //End .sbi_item each
343
+
344
+ //Remove the new class after 500ms, once the sorting is done
345
+ setTimeout(function () {
346
+ jQuery('#sbi_images .sbi_item.sbi_new').removeClass('sbi_new');
347
+ //Loop through items and remove class to reveal them
348
+ var time = 10;
349
+ $self.find('.sbi_transition').each(function() {
350
+ var $sbi_item_transition_el = jQuery(this);
351
+
352
+ setTimeout( function(){
353
+ $sbi_item_transition_el.removeClass('sbi_transition');
354
+ }, time);
355
+ time += 10;
356
+ });
357
+ }, 500);
358
+ },
359
+ afterNewImagesRevealed: function() {
360
+ this.listenForVisibilityChange();
361
+ this.sendNeedsResizingToServer();
362
+ if (!this.settings.imageLoadEnabled) {
363
+ $('.sbi_no_resraise').removeClass('sbi_no_resraise');
364
+ }
365
+
366
+ var evt = $.Event('sbiafterimagesloaded');
367
+ evt.el = $(this.el);
368
+ $(window).trigger(evt);
369
+ },
370
+ setResizedImages: function () {
371
+ if ($(this.el).find('.sbi_resized_image_data').length
372
+ && typeof $(this.el).find('.sbi_resized_image_data').attr('data-resized') !== 'undefined'
373
+ && $(this.el).find('.sbi_resized_image_data').attr('data-resized').indexOf('{"') === 0) {
374
+ this.resizedImages = JSON.parse($(this.el).find('.sbi_resized_image_data').attr('data-resized'));
375
+ $(this.el).find('.sbi_resized_image_data').remove();
376
+ }
377
+ },
378
+ sendNeedsResizingToServer: function() {
379
+ var feed = this;
380
+ if (feed.needsResizing.length > 0 && feed.settings.resizingEnabled) {
381
+ var itemOffset = $(this.el).find('.sbi_item').length;
382
+
383
+ var submitData = {
384
+ action: 'sbi_resized_images_submit',
385
+ needs_resizing: feed.needsResizing,
386
+ offset: itemOffset,
387
+ feed_id: feed.settings.feedID,
388
+ atts: feed.settings.shortCodeAtts,
389
+ };
390
+ var onSuccess = function(data) {
391
+ if (data.trim().indexOf('{') === 0) {
392
+ var response = JSON.parse(data);
393
+ if (feed.settings.debugEnabled) {
394
+ console.log(response);
395
+ }
396
+ }
397
+ };
398
+ sbiAjax(submitData,onSuccess);
399
+ }
400
+ },
401
+ loadMoreButtonInit: function () {
402
+ var $self = $(this.el),
403
+ feed = this;
404
+ $self.find('#sbi_load .sbi_load_btn').off().on('click', function () {
405
+
406
+ feed.afterLoadMoreClicked(jQuery(this));
407
+ feed.getNewPostSet();
408
+
409
+ }); //End click event
410
+ },
411
+ getNewPostSet: function () {
412
+ var $self = $(this.el),
413
+ feed = this;
414
+ var itemOffset = $self.find('.sbi_item').length,
415
+ submitData = {
416
+ action: 'sbi_load_more_clicked',
417
+ offset: itemOffset,
418
+ feed_id: feed.settings.feedID,
419
+ atts: feed.settings.shortCodeAtts,
420
+ current_resolution: feed.imageResolution
421
+ };
422
+ var onSuccess = function (data) {
423
+ if (data.trim().indexOf('{') === 0) {
424
+ var response = JSON.parse(data);
425
+ if (feed.settings.debugEnabled) {
426
+ console.log(response);
427
+ }
428
+ feed.appendNewPosts(response.html);
429
+ feed.addResizedImages(response.resizedImages);
430
+ if (feed.settings.ajaxPostLoad) {
431
+ feed.settings.ajaxPostLoad = false;
432
+ feed.afterInitialImagesLoaded();
433
+ } else {
434
+ feed.afterNewImagesLoaded();
435
+ }
436
+
437
+ if (!response.feedStatus.shouldPaginate) {
438
+ feed.outOfPages = true;
439
+ $self.find('.sbi_load_btn').hide();
440
+ } else {
441
+ feed.outOfPages = false;
442
+ }
443
+ $('.sbi_no_js').removeClass('sbi_no_js');
444
+ }
445
+
446
+ };
447
+ sbiAjax(submitData, onSuccess);
448
+ },
449
+ appendNewPosts: function (newPostsHtml) {
450
+ var $self = $(this.el),
451
+ feed = this;
452
+ if ($self.find('#sbi_images .sbi_item').length) {
453
+ $self.find('#sbi_images .sbi_item').last().after(newPostsHtml);
454
+ } else {
455
+ $self.find('#sbi_images').append(newPostsHtml);
456
+ }
457
+ },
458
+ addResizedImages: function (resizedImagesToAdd) {
459
+ for (var imageID in resizedImagesToAdd) {
460
+ this.resizedImages[imageID] = resizedImagesToAdd[imageID];
461
+ }
462
+ },
463
+ setImageHeight: function() {
464
+ var $self = $(this.el);
465
+
466
+ var sbi_photo_width = $self.find('.sbi_photo').eq(0).innerWidth();
467
+
468
+ //Figure out number of columns for either desktop or mobile
469
+ var sbi_num_cols = this.getColumnCount();
470
+
471
+ //Figure out what the width should be using the number of cols
472
+ //Figure out what the width should be using the number of cols
473
+ var imagesPadding = $self.find('#sbi_images').innerWidth() - $self.find('#sbi_images').width(),
474
+ imagepadding = imagesPadding / 2;
475
+ sbi_photo_width_manual = ( $self.find('#sbi_images').width() / sbi_num_cols ) - imagesPadding;
476
+ //If the width is less than it should be then set it manually
477
+ //if( sbi_photo_width <= (sbi_photo_width_manual) ) sbi_photo_width = sbi_photo_width_manual;
478
+
479
+ $self.find('.sbi_photo').css('height', sbi_photo_width);
480
+
481
+ //Set the position of the carousel arrows
482
+ if ($self.find('.sbi-owl-nav').length) {
483
+ setTimeout(function(){
484
+ //If there's 2 rows then adjust position
485
+ var sbi_ratio = 2;
486
+ if( $self.find('.sbi_owl2row-item').length ) sbi_ratio = 1;
487
+
488
+ var sbi_arrows_top = ($self.find('.sbi_photo').eq(0).innerWidth()/sbi_ratio);
489
+ sbi_arrows_top += parseInt(imagepadding)*(2+(2-sbi_ratio));
490
+ $self.find('.sbi-owl-nav div').css('top', sbi_arrows_top);
491
+ }, 100);
492
+ }
493
+
494
+ },
495
+ maybeRaiseSingleImageResolution: function ($item, index, forceChange) {
496
+ var feed = this,
497
+ imgSrcSet = feed.getImageUrls($item),
498
+ currentUrl = $item.find('.sbi_photo img').attr('src'),
499
+ currentRes = 150,
500
+ imagEl = $item.find('img').get(0),
501
+ aspectRatio = currentUrl === window.sbi.options.placeholder ? 1 : imagEl.naturalWidth/imagEl.naturalHeight,
502
+ forceChange = typeof forceChange !== 'undefined' ? forceChange : false;
503
+
504
+ if ($item.hasClass('sbi_no_resraise') || $item.hasClass('sbi_had_error') || ($item.find('.sbi_link_area').length && $item.find('.sbi_link_area').hasClass('sbi_had_error'))) {
505
+ return;
506
+ }
507
+
508
+ $.each(imgSrcSet, function (index, value) {
509
+ if (value === currentUrl) {
510
+ currentRes = parseInt(index);
511
+ // If the image has already been changed to an existing real source, don't force the change
512
+ forceChange = false;
513
+ }
514
+ });
515
+ //Image res
516
+ var newRes = 640;
517
+ switch (feed.settings.imgRes) {
518
+ case 'thumb':
519
+ newRes = 150;
520
+ break;
521
+ case 'medium':
522
+ newRes = 320;
523
+ break;
524
+ case 'full':
525
+ newRes = 640;
526
+ break;
527
+ default:
528
+ var minImageWidth = Math.max(feed.settings.autoMinRes,$item.find('.sbi_photo').innerWidth()),
529
+ thisImageReplace = feed.getBestResolutionForAuto(minImageWidth, aspectRatio, $item);
530
+ switch (thisImageReplace) {
531
+ case 320:
532
+ newRes = 320;
533
+ break;
534
+ case 150:
535
+ newRes = 150;
536
+ break;
537
+ }
538
+ break;
539
+ }
540
+
541
+ if (newRes > currentRes || currentUrl === window.sbi.options.placeholder || forceChange) {
542
+ if (feed.settings.debugEnabled) {
543
+ var reason = currentUrl === window.sbi.options.placeholder ? 'was placeholder' : 'too small';
544
+ console.log('raise res for ' + currentUrl, reason);
545
+ }
546
+ var newUrl = imgSrcSet[newRes].split("?ig_cache_key")[0];
547
+ $item.find('.sbi_photo img').attr('src', newUrl);
548
+ $item.find('.sbi_photo').css('background-image', 'url("' + newUrl + '")');
549
+ currentRes = newRes;
550
+
551
+ if (feed.settings.imgRes === 'auto') {
552
+ var checked = false;
553
+ $item.find('.sbi_photo img').on('load', function () {
554
+
555
+ var $this_image = $(this);
556
+ var newAspectRatio = ($this_image.get(0).naturalWidth / $this_image.get(0).naturalHeight);
557
+
558
+ if ($this_image.get(0).naturalWidth !== 1000 && newAspectRatio > aspectRatio && !checked) {
559
+ if (feed.settings.debugEnabled) {
560
+ console.log('raise res again for aspect ratio change ' + currentUrl);
561
+ }
562
+ checked = true;
563
+ minImageWidth = $item.find('.sbi_photo').innerWidth();
564
+ thisImageReplace = feed.getBestResolutionForAuto(minImageWidth, newAspectRatio, $item);
565
+ newRes = 640;
566
+
567
+ switch (thisImageReplace) {
568
+ case 320:
569
+ newRes = 320;
570
+ break;
571
+ case 150:
572
+ newRes = 150;
573
+ break;
574
+ }
575
+
576
+ if (newRes > currentRes) {
577
+ newUrl = imgSrcSet[newRes].split("?ig_cache_key")[0];
578
+ $this_image.attr('src', newUrl);
579
+ $this_image.closest('.sbi_photo').css('background-image', 'url("' + newUrl + '")');
580
+ }
581
+ if (feed.layout === 'masonry' || feed.layout === 'highlight') {
582
+ $(feed.el).find('#sbi_images').smashotope(feed.isotopeArgs);
583
+ setTimeout(function() {
584
+ $(feed.el).find('#sbi_images').smashotope(feed.isotopeArgs);
585
+ },500)
586
+ }
587
+ } else {
588
+ if (feed.settings.debugEnabled) {
589
+ var reason = checked ? 'already checked' : 'no aspect ratio change';
590
+ console.log('not raising res for replacement ' + currentUrl, reason);
591
+ }
592
+ }
593
+ });
594
+ }
595
+
596
+
597
+ }
598
+
599
+ $item.find('img').on('error', function () {
600
+ if (!$(this).hasClass('sbi_img_error')) {
601
+ $(this).addClass('sbi_img_error');
602
+ var sourceFromAPI = ($(this).attr('src').indexOf('media/?size=') > -1 || $(this).attr('src').indexOf('cdninstagram') > -1 || $(this).attr('src').indexOf('fbcdn') > -1)
603
+
604
+ if (!sourceFromAPI) {
605
+
606
+ if ($(this).closest('.sbi_photo').attr('data-img-src-set') !== 'undefined') {
607
+ var srcSet = JSON.parse($(this).closest('.sbi_photo').attr('data-img-src-set').replace(/\\\//g, '/'));
608
+ if (typeof srcSet.d !== 'undefined') {
609
+ $(this).attr('src', srcSet.d);
610
+ $(this).closest('.sbi_photo').css('background-image', 'url(' + srcSet.d + ')');
611
+ $(this).closest('.sbi_item').addClass('sbi_had_error').find('.sbi_link_area').attr('href', srcSet[640]).addClass('sbi_had_error');
612
+ }
613
+ }
614
+ } else {
615
+ feed.settings.favorLocal = true;
616
+ var srcSet = feed.getImageUrls($(this).closest('.sbi_item'));
617
+ if (typeof srcSet[640] !== 'undefined') {
618
+ $(this).attr('src', srcSet[640]);
619
+ $(this).closest('.sbi_photo').css('background-image', 'url(' + srcSet[640] + ')');
620
+ $(this).closest('.sbi_item').addClass('sbi_had_error').find('.sbi_link_area').attr('href', srcSet[640]).addClass('sbi_had_error');
621
+ }
622
+ }
623
+ setTimeout(function() {
624
+ feed.afterResize();
625
+ }, 1500)
626
+ } else {
627
+ console.log('unfixed error ' + $(this).attr('src'));
628
+ }
629
+ });
630
+ },
631
+ maybeRaiseImageResolution: function (justNew) {
632
+ var feed = this,
633
+ itemsSelector = typeof justNew !== 'undefined' && justNew === true ? '.sbi_item.sbi_new' : '.sbi_item',
634
+ forceChange = !feed.isInitialized ? true : false;
635
+ $(feed.el).find(itemsSelector).each(function (index) {
636
+ if (!$(this).hasClass('sbi_num_diff_hide')
637
+ && $(this).find('.sbi_photo').length
638
+ && typeof $(this).find('.sbi_photo').attr('data-img-src-set') !== 'undefined') {
639
+ feed.maybeRaiseSingleImageResolution($(this),index,forceChange);
640
+ }
641
+ }); //End .sbi_item each
642
+ feed.isInitialized = true;
643
+ },
644
+ getBestResolutionForAuto: function(colWidth, aspectRatio, $item) {
645
+ if (isNaN(aspectRatio) || aspectRatio < 1) {
646
+ aspectRatio = 1;
647
+ }
648
+ var bestWidth = colWidth * aspectRatio,
649
+ bestWidthRounded = Math.ceil(bestWidth / 10) * 10,
650
+ customSizes = [150, 320, 640];
651
+
652
+ if ($item.hasClass('sbi_highlighted')) {
653
+ bestWidthRounded = bestWidthRounded *2;
654
+ }
655
+
656
+ if (customSizes.indexOf(parseInt(bestWidthRounded)) === -1) {
657
+ var done = false;
658
+ $.each(customSizes, function (index, item) {
659
+ if (item > parseInt(bestWidthRounded) && !done) {
660
+ bestWidthRounded = item;
661
+
662
+ done = true;
663
+ }
664
+ });
665
+ }
666
+
667
+ return bestWidthRounded;
668
+ },
669
+ hideExtraImagesForWidth: function() {
670
+ if (this.layout === 'carousel') {
671
+ return;
672
+ }
673
+ var $self = $(this.el),
674
+ num = typeof $self.attr('data-num') !== 'undefined' && $self.attr('data-num') !== '' ? parseInt($self.attr('data-num')) : 1,
675
+ nummobile = typeof $self.attr('data-nummobile') !== 'undefined' && $self.attr('data-nummobile') !== '' ? parseInt($self.attr('data-nummobile')) : num;
676
+
677
+ if ($(window).width() < 480) {
678
+ if (nummobile < $self.find('.sbi_item').length) {
679
+ $self.find('.sbi_item').slice(nummobile - $self.find('.sbi_item').length).addClass('sbi_num_diff_hide');
680
+ }
681
+ } else {
682
+ if (num < $self.find('.sbi_item').length) {
683
+ $self.find('.sbi_item').slice(num - $self.find('.sbi_item').length).addClass('sbi_num_diff_hide');
684
+ }
685
+ }
686
+ },
687
+ setImageSizeClass: function () {
688
+ var $self = $(this.el);
689
+ $self.removeClass('sbi_small sbi_medium');
690
+ var feedWidth = $self.innerWidth(),
691
+ photoPadding = parseInt(($self.find('#sbi_images').outerWidth() - $self.find('#sbi_images').width())) / 2,
692
+ cols = this.getColumnCount(),
693
+ feedWidthSansPadding = feedWidth - (photoPadding * (cols+2)),
694
+ colWidth = (feedWidthSansPadding / cols);
695
+ if (colWidth > 120 && colWidth < 240) {
696
+ $self.addClass('sbi_medium');
697
+ } else if (colWidth <= 120) {
698
+ $self.addClass('sbi_small');
699
+ }
700
+ },
701
+ setMinImageWidth: function () {
702
+ if ($(this.el).find('.sbi_item .sbi_photo').first().length) {
703
+ this.minImageWidth = $(this.el).find('.sbi_item .sbi_photo').first().innerWidth();
704
+ } else {
705
+ this.minImageWidth = 150;
706
+ }
707
+ },
708
+ setImageResolution: function () {
709
+ if (this.settings.imgRes === 'auto') {
710
+ this.imageResolution = 'auto';
711
+ } else {
712
+ switch (this.settings.imgRes) {
713
+ case 'thumb':
714
+ this.imageResolution = 150;
715
+ break;
716
+ case 'medium':
717
+ this.imageResolution = 320;
718
+ break;
719
+ default:
720
+ this.imageResolution = 640;
721
+ }
722
+ }
723
+ },
724
+ getImageUrls: function ($item) {
725
+ var srcSet = JSON.parse($item.find('.sbi_photo').attr('data-img-src-set').replace(/\\\//g, '/')),
726
+ id = $item.attr('id').replace('sbi_', '');
727
+ if (typeof this.resizedImages[id] !== 'undefined'
728
+ && this.resizedImages[id] !== 'video'
729
+ && this.resizedImages[id] !== 'pending'
730
+ && this.resizedImages[id].id !== 'error'
731
+ && this.resizedImages[id].id !== 'video'
732
+ && this.resizedImages[id].id !== 'pending') {
733
+
734
+ if (typeof this.resizedImages[id]['sizes'] !== 'undefined') {
735
+ var foundSizes = [];
736
+ if (typeof this.resizedImages[id]['sizes']['full'] !== 'undefined') {
737
+ srcSet[640] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'full.jpg';
738
+ foundSizes.push(640);
739
+ }
740
+ if (typeof this.resizedImages[id]['sizes']['low'] !== 'undefined') {
741
+ srcSet[320] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'low.jpg';
742
+ foundSizes.push(320);
743
+ }
744
+ if (typeof this.resizedImages[id]['sizes']['thumb'] !== 'undefined') {
745
+ foundSizes.push(150);
746
+ srcSet[150] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'thumb.jpg';
747
+ }
748
+ if (this.settings.favorLocal) {
749
+ if (foundSizes.indexOf(640) === -1) {
750
+ if (foundSizes.indexOf(320) > -1) {
751
+ srcSet[640] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'low.jpg';
752
+ }
753
+ }
754
+ if (foundSizes.indexOf(320) === -1) {
755
+ if (foundSizes.indexOf(640) > -1) {
756
+ srcSet[320] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'full.jpg';
757
+ } else if (foundSizes.indexOf(150) > -1) {
758
+ srcSet[320] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'thumb.jpg';
759
+ }
760
+ }
761
+ if (foundSizes.indexOf(150) === -1) {
762
+ if (foundSizes.indexOf(320) > -1) {
763
+ srcSet[150] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'low.jpg';
764
+ } else if (foundSizes.indexOf(640) > -1) {
765
+ srcSet[150] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'full.jpg';
766
+ }
767
+ }
768
+ }
769
+ }
770
+ } else if (typeof this.resizedImages[id] === 'undefined'
771
+ || (typeof this.resizedImages[id]['id'] !== 'undefined' && this.resizedImages[id]['id'] !== 'pending' && this.resizedImages[id]['id'] !== 'error')) {
772
+ this.addToNeedsResizing(id);
773
+ }
774
+
775
+ return srcSet;
776
+ },
777
+ getAvatarUrl: function (username,favorType) {
778
+ if (username === '') {
779
+ return '';
780
+ }
781
+
782
+ var availableAvatars = this.settings.general.avatars,
783
+ favorType = typeof favorType !== 'undefined' ? favorType : 'local';
784
+
785
+ if (favorType === 'local') {
786
+ if (typeof availableAvatars['LCL'+username] !== 'undefined' && parseInt(availableAvatars['LCL'+username]) === 1) {
787
+ return sb_instagram_js_options.resized_url + username + '.jpg';
788
+ } else if (typeof availableAvatars[username] !== 'undefined') {
789
+ return availableAvatars[username];
790
+ } else {
791
+ return '';
792
+ }
793
+ } else {
794
+ if (typeof availableAvatars[username] !== 'undefined') {
795
+ return availableAvatars[username];
796
+ } else if (typeof availableAvatars['LCL'+username] !== 'undefined' && parseInt(availableAvatars['LCL'+username]) === 1) {
797
+ return sb_instagram_js_options.resized_url + username + '.jpg';
798
+ } else {
799
+ return '';
800
+ }
801
+ }
802
+ },
803
+ addToNeedsResizing: function (id) {
804
+ if (this.needsResizing.indexOf(id) === -1) {
805
+ this.needsResizing.push(id);
806
+ }
807
+ },
808
+ applyImageLiquid: function () {
809
+ var $self = $(this.el),
810
+ feed = this;
811
+ sbiAddImgLiquid();
812
+ if (typeof $self.find(".sbi_photo").sbi_imgLiquid == 'function') {
813
+ $self.find(".sbi_photo").sbi_imgLiquid({fill: true});
814
+ }
815
+ },
816
+ listenForVisibilityChange: function() {
817
+ var feed = this;
818
+ sbiAddVisibilityListener();
819
+ if (typeof $(this.el).filter(':hidden').sbiVisibilityChanged == 'function') {
820
+ //If the feed is initially hidden (in a tab for example) then check for when it becomes visible and set then set the height
821
+ $(this.el).filter(':hidden').sbiVisibilityChanged({
822
+ callback: function (element, visible) {
823
+ feed.afterResize();
824
+ },
825
+ runOnLoad: false
826
+ });
827
+ }
828
+ },
829
+ getColumnCount: function() {
830
+ var $self = $(this.el),
831
+ cols = this.settings.cols,
832
+ colsmobile = this.settings.colsmobile,
833
+ returnCols = cols;
834
+
835
+ sbiWindowWidth = window.innerWidth;
836
+
837
+ if ($self.hasClass('sbi_mob_col_auto')) {
838
+ if (sbiWindowWidth < 640 && (parseInt(cols) > 2 && parseInt(cols) < 7)) returnCols = 2;
839
+ if (sbiWindowWidth < 640 && (parseInt(cols) > 6 && parseInt(cols) < 11)) returnCols = 4;
840
+ if (sbiWindowWidth <= 480 && parseInt(cols) > 2) returnCols = 1;
841
+ } else if (sbiWindowWidth <= 480) {
842
+ returnCols = colsmobile;
843
+ }
844
+
845
+ return parseInt(returnCols);
846
+ }
847
+ };
848
+
849
+ window.sbi_init = function() {
850
+ window.sbi = new Sbi();
851
+ window.sbi.createPage( window.sbi.createFeeds, {whenFeedsCreated: window.sbi.afterFeedsCreated});
852
+ };
853
+
854
+ function sbiGetNewFeed(feed,index,feedOptions) {
855
+ return new SbiFeed(feed,index,feedOptions);
856
+ }
857
+
858
+ function sbiAjax(submitData,onSuccess) {
859
+ $.ajax({
860
+ url: sbiajaxurl,
861
+ type: 'post',
862
+ data: submitData,
863
+ success: onSuccess
864
+ });
865
+ }
866
+
867
+ })(jQuery);
868
+
869
+ jQuery(document).ready(function($) {
870
+ if (typeof window.sb_instagram_js_options === 'undefined') {
871
+ window.sb_instagram_js_options = {
872
+ font_method: "svg",
873
+ resized_url: location.protocol + '//' + window.location.hostname + "/wp-content/uploads/sb-instagram-feed-images/",
874
+ placeholder: location.protocol + '//' + window.location.hostname + "/wp-content/plugins/instagram-feed/img/placeholder.png"
875
+ };
876
+ }
877
+ if (typeof window.sb_instagram_js_options.resized_url !== 'undefined' && window.sb_instagram_js_options.resized_url.indexOf(location.protocol) === -1) {
878
+ if (location.protocol === 'http:') {
879
+ window.sb_instagram_js_options.resized_url = window.sb_instagram_js_options.resized_url.replace('https:','http:');
880
+ } else {
881
+ window.sb_instagram_js_options.resized_url = window.sb_instagram_js_options.resized_url.replace('http:','https:');
882
+ }
883
+ }
884
+ sbi_init();
885
+ });
886
+
887
+ } // if sbi_js_exists
js/sbi-scripts.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function(i){function e(){var i,e,s,t=t||{VER:"0.9.944"};t.bgs_Available=!1,t.bgs_CheckRunned=!1,function(i){i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!t.bgs_CheckRunned){t.bgs_CheckRunned=!0;var e=i('<span style="background-size:cover" />');i("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var s=window.getComputedStyle(i,null);s&&s.backgroundSize&&(t.bgs_Available="cover"===s.backgroundSize)}}(),e.remove()}}();var s=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function a(){(r.responsive||h.data("sbi_imgLiquid_oldProcessed"))&&h.data("sbi_imgLiquid_settings")&&(r=h.data("sbi_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&o(),l.sizeOld=l.actualSize,setTimeout(a,r.responsiveCheckTime))}function n(){h.data("sbi_imgLiquid_error",!0),l.addClass("sbi_imgLiquid_error"),r.onItemError&&r.onItemError(e,l,h),d()}function o(){var i,s,t,a,n,o,g,u,m=0,_=0,f=l.width(),c=l.height();void 0===h.data("owidth")&&h.data("owidth",h[0].width),void 0===h.data("oheight")&&h.data("oheight",h[0].height),r.fill===f/c>=h.data("owidth")/h.data("oheight")?(i="100%",s="auto",t=Math.floor(f),a=Math.floor(f*(h.data("oheight")/h.data("owidth")))):(i="auto",s="100%",t=Math.floor(c*(h.data("owidth")/h.data("oheight"))),a=Math.floor(c)),g=f-t,"left"===(n=r.horizontalAlign.toLowerCase())&&(_=0),"center"===n&&(_=.5*g),"right"===n&&(_=g),-1!==n.indexOf("%")&&((n=parseInt(n.replace("%",""),10))>0&&(_=g*n*.01)),u=c-a,"left"===(o=r.verticalAlign.toLowerCase())&&(m=0),"center"===o&&(m=.5*u),"bottom"===o&&(m=u),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(m=u*o*.01)),r.hardPixels&&(i=t,s=a),h.css({width:i,height:s,"margin-left":Math.floor(_),"margin-top":Math.floor(m)}),h.data("sbi_imgLiquid_oldProcessed")||(h.fadeTo(r.fadeInTime,1),h.data("sbi_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sbi_imgLiquid_nobgSize"),l.addClass("sbi_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(e,l,h),d()}function d(){e===s.length-1&&s.settings.onFinish&&s.settings.onFinish()}var r=s.settings,l=i(this),h=i("img:first",l);return h.length?(h.data("sbi_imgLiquid_settings")?(l.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),r=i.extend({},h.data("sbi_imgLiquid_settings"),s.options)):r=i.extend({},s.settings,function(){var i={};if(s.settings.useDataHtmlAttr){var e=l.attr("data-sbi_imgLiquid-fill"),a=l.attr("data-sbi_imgLiquid-horizontalAlign"),n=l.attr("data-sbi_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(i.fill=Boolean("true"===e)),void 0===a||"left"!==a&&"center"!==a&&"right"!==a&&-1===a.indexOf("%")||(i.horizontalAlign=a),void 0===n||"top"!==n&&"bottom"!==n&&"center"!==n&&-1===n.indexOf("%")||(i.verticalAlign=n)}return t.isIE&&s.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}()),h.data("sbi_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(e,l,h),void(t.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(h.attr("src")))&&l.css({"background-image":'url("'+encodeURI(h.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",l).css({display:"block",width:"100%",height:"100%"}),i("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(e,l,h),l.addClass("sbi_imgLiquid_bgSize"),l.addClass("sbi_imgLiquid_ready"),d()):function s(){if(h.data("oldSrc")&&h.data("oldSrc")!==h.attr("src")){var t=h.clone().removeAttr("style");return t.data("sbi_imgLiquid_settings",h.data("sbi_imgLiquid_settings")),h.parent().prepend(t),h.remove(),(h=t)[0].width=0,void setTimeout(s,10)}return h.data("sbi_imgLiquid_oldProcessed")?void o():(h.data("sbi_imgLiquid_oldProcessed",!1),h.data("oldSrc",h.attr("src")),i("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),h.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),h.on("error",n),h[0].onerror=n,function i(){h.data("sbi_imgLiquid_error")||h.data("sbi_imgLiquid_loaded")||h.data("sbi_imgLiquid_oldProcessed")||(l.is(":visible")&&h[0].complete&&h[0].width>0&&h[0].height>0?(h.data("sbi_imgLiquid_loaded",!0),setTimeout(o,e*r.delay)):setTimeout(i,r.timecheckvisibility))}(),void a())}())):void n()})}})}(jQuery),i=t.injectCss,e=document.getElementsByTagName("head")[0],(s=document.createElement("style")).type="text/css",s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i)),e.appendChild(s)}function s(){this.feeds={},this.options=sb_instagram_js_options}function t(i,e,s){this.el=i,this.index=e,this.settings=s,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.isInitialized=!1}function a(e,s){i.ajax({url:sbiajaxurl,type:"post",data:e,success:s})}s.prototype={createPage:function(e,s){void 0!==window.sbiajaxurl&&-1!==window.sbiajaxurl.indexOf(window.location.hostname)||(window.sbiajaxurl=location.protocol+"//"+window.location.hostname+"/wp-admin/admin-ajax.php"),i(".sbi_no_js_error_message").remove(),i(".sbi_no_js").removeClass("sbi_no_js"),e(s)},createFeeds:function(e){e.whenFeedsCreated(i(".sbi").each(function(e){i(this).attr("data-sbi-index",e+1);var s=i(this),n=void 0!==s.attr("data-sbi-flags")?s.attr("data-sbi-flags").split(","):[],o=void 0!==s.attr("data-options")?JSON.parse(s.attr("data-options")):{};if(n.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;a({action:"sbi_on_ajax_test_trigger"},function(i){console.log("did test")})}var d={cols:s.attr("data-cols"),colsmobile:"same"!==s.attr("data-colsmobile")?s.attr("data-colsmobile"):s.attr("data-cols"),num:s.attr("data-num"),imgRes:s.attr("data-res"),feedID:s.attr("data-feedid"),shortCodeAtts:s.attr("data-shortcode-atts"),resizingEnabled:-1===n.indexOf("resizeDisable"),imageLoadEnabled:-1===n.indexOf("imageLoadDisable"),debugEnabled:n.indexOf("debug")>-1,favorLocal:n.indexOf("favorLocal")>-1,ajaxPostLoad:n.indexOf("ajaxPostLoad")>-1,autoMinRes:1,general:o};window.sbi.feeds[e]=function(i,e,s){return new t(i,e,s)}(this,e,d),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var r=jQuery.Event("sbiafterfeedcreate");r.feed=window.sbi.feeds[e],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){i(".sb_instagram_header").each(function(){var e=i(this);e.find(".sbi_header_link").hover(function(){e.find(".sbi_header_img_hover").addClass("sbi_fade_in")},function(){e.find(".sbi_header_img_hover").removeClass("sbi_fade_in")})})},encodeHTML:function(i){return void 0===i?"":i.replace(/(>)/g,"&gt;").replace(/(<)/g,"&lt;").replace(/(&lt;br\/&gt;)/g,"<br>").replace(/(&lt;br&gt;)/g,"<br>")},urlDetect:function(i){return i.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}},t.prototype={init:function(){var e=this;i(this.el).find("#sbi_mod_error").length&&i(this.el).prepend(i(this.el).find("#sbi_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var s,t=(s=0,function(i,e){clearTimeout(s),s=setTimeout(i,e)});jQuery(window).resize(function(){t(function(){e.afterResize()},500)})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(i){i.find(".sbi_loader").removeClass("sbi_hidden"),i.find(".sbi_btn_text").addClass("sbi_hidden"),i.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var e=i(this.el),s=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){e.find(".sbi_loader").addClass("sbi_hidden"),e.find(".sbi_btn_text").removeClass("sbi_hidden"),s.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var e=i(this.el);e.find(".sbi-screenreader").each(function(){i(this).find("img").remove()}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),e.find(".sbi_item").each(function(i){jQuery(this).find(".sbi_photo").hover(function(){jQuery(this).fadeTo(200,.85)},function(){jQuery(this).stop().fadeTo(500,1)})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var i=10;e.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},i),i+=10})},500)},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.settings.imageLoadEnabled||i(".sbi_no_resraise").removeClass("sbi_no_resraise");var e=i.Event("sbiafterimagesloaded");e.el=i(this.el),i(window).trigger(e)},setResizedImages:function(){i(this.el).find(".sbi_resized_image_data").length&&void 0!==i(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===i(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(i(this.el).find(".sbi_resized_image_data").attr("data-resized")),i(this.el).find(".sbi_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this;if(e.needsResizing.length>0&&e.settings.resizingEnabled){var s=i(this.el).find(".sbi_item").length;a({action:"sbi_resized_images_submit",needs_resizing:e.needsResizing,offset:s,feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts},function(i){if(0===i.trim().indexOf("{")){var s=JSON.parse(i);e.settings.debugEnabled&&console.log(s)}})}},loadMoreButtonInit:function(){var e=i(this.el),s=this;e.find("#sbi_load .sbi_load_btn").off().on("click",function(){s.afterLoadMoreClicked(jQuery(this)),s.getNewPostSet()})},getNewPostSet:function(){var e=i(this.el),s=this;a({action:"sbi_load_more_clicked",offset:e.find(".sbi_item").length,feed_id:s.settings.feedID,atts:s.settings.shortCodeAtts,current_resolution:s.imageResolution},function(t){if(0===t.trim().indexOf("{")){var a=JSON.parse(t);s.settings.debugEnabled&&console.log(a),s.appendNewPosts(a.html),s.addResizedImages(a.resizedImages),s.settings.ajaxPostLoad?(s.settings.ajaxPostLoad=!1,s.afterInitialImagesLoaded()):s.afterNewImagesLoaded(),a.feedStatus.shouldPaginate?s.outOfPages=!1:(s.outOfPages=!0,e.find(".sbi_load_btn").hide()),i(".sbi_no_js").removeClass("sbi_no_js")}})},appendNewPosts:function(e){var s=i(this.el);s.find("#sbi_images .sbi_item").length?s.find("#sbi_images .sbi_item").last().after(e):s.find("#sbi_images").append(e)},addResizedImages:function(i){for(var e in i)this.resizedImages[e]=i[e]},setImageHeight:function(){var e=i(this.el),s=e.find(".sbi_photo").eq(0).innerWidth(),t=this.getColumnCount(),a=e.find("#sbi_images").innerWidth()-e.find("#sbi_images").width(),n=a/2;sbi_photo_width_manual=e.find("#sbi_images").width()/t-a,e.find(".sbi_photo").css("height",s),e.find(".sbi-owl-nav").length&&setTimeout(function(){var i=2;e.find(".sbi_owl2row-item").length&&(i=1);var s=e.find(".sbi_photo").eq(0).innerWidth()/i;s+=parseInt(n)*(2-i+2),e.find(".sbi-owl-nav div").css("top",s)},100)},maybeRaiseSingleImageResolution:function(e,s,t){var a=this,n=a.getImageUrls(e),o=e.find(".sbi_photo img").attr("src"),d=150,r=e.find("img").get(0),l=o===window.sbi.options.placeholder?1:r.naturalWidth/r.naturalHeight;t=void 0!==t&&t;if(!(e.hasClass("sbi_no_resraise")||e.hasClass("sbi_had_error")||e.find(".sbi_link_area").length&&e.find(".sbi_link_area").hasClass("sbi_had_error"))){i.each(n,function(i,e){e===o&&(d=parseInt(i),t=!1)});var h=640;switch(a.settings.imgRes){case"thumb":h=150;break;case"medium":h=320;break;case"full":h=640;break;default:var g=Math.max(a.settings.autoMinRes,e.find(".sbi_photo").innerWidth()),u=a.getBestResolutionForAuto(g,l,e);switch(u){case 320:h=320;break;case 150:h=150}}if(h>d||o===window.sbi.options.placeholder||t){if(a.settings.debugEnabled){var m=o===window.sbi.options.placeholder?"was placeholder":"too small";console.log("raise res for "+o,m)}var _=n[h].split("?ig_cache_key")[0];if(e.find(".sbi_photo img").attr("src",_),e.find(".sbi_photo").css("background-image",'url("'+_+'")'),d=h,"auto"===a.settings.imgRes){var f=!1;e.find(".sbi_photo img").on("load",function(){var s=i(this),t=s.get(0).naturalWidth/s.get(0).naturalHeight;if(1e3!==s.get(0).naturalWidth&&t>l&&!f){switch(a.settings.debugEnabled&&console.log("raise res again for aspect ratio change "+o),f=!0,g=e.find(".sbi_photo").innerWidth(),u=a.getBestResolutionForAuto(g,t,e),h=640,u){case 320:h=320;break;case 150:h=150}h>d&&(_=n[h].split("?ig_cache_key")[0],s.attr("src",_),s.closest(".sbi_photo").css("background-image",'url("'+_+'")')),"masonry"!==a.layout&&"highlight"!==a.layout||(i(a.el).find("#sbi_images").smashotope(a.isotopeArgs),setTimeout(function(){i(a.el).find("#sbi_images").smashotope(a.isotopeArgs)},500))}else if(a.settings.debugEnabled){var r=f?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+o,r)}})}}e.find("img").on("error",function(){if(i(this).hasClass("sbi_img_error"))console.log("unfixed error "+i(this).attr("src"));else{var e;if(i(this).addClass("sbi_img_error"),i(this).attr("src").indexOf("media/?size=")>-1||i(this).attr("src").indexOf("cdninstagram")>-1||i(this).attr("src").indexOf("fbcdn")>-1)a.settings.favorLocal=!0,void 0!==(e=a.getImageUrls(i(this).closest(".sbi_item")))[640]&&(i(this).attr("src",e[640]),i(this).closest(".sbi_photo").css("background-image","url("+e[640]+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"));else if("undefined"!==i(this).closest(".sbi_photo").attr("data-img-src-set"))void 0!==(e=JSON.parse(i(this).closest(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/"))).d&&(i(this).attr("src",e.d),i(this).closest(".sbi_photo").css("background-image","url("+e.d+")"),i(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",e[640]).addClass("sbi_had_error"));setTimeout(function(){a.afterResize()},1500)}})}},maybeRaiseImageResolution:function(e){var s=this,t=void 0!==e&&!0===e?".sbi_item.sbi_new":".sbi_item",a=!s.isInitialized;i(s.el).find(t).each(function(e){!i(this).hasClass("sbi_num_diff_hide")&&i(this).find(".sbi_photo").length&&void 0!==i(this).find(".sbi_photo").attr("data-img-src-set")&&s.maybeRaiseSingleImageResolution(i(this),e,a)}),s.isInitialized=!0},getBestResolutionForAuto:function(e,s,t){(isNaN(s)||s<1)&&(s=1);var a=e*s,n=10*Math.ceil(a/10),o=[150,320,640];if(t.hasClass("sbi_highlighted")&&(n*=2),-1===o.indexOf(parseInt(n))){var d=!1;i.each(o,function(i,e){e>parseInt(n)&&!d&&(n=e,d=!0)})}return n},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var e=i(this.el),s=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,t=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):s;i(window).width()<480?t<e.find(".sbi_item").length&&e.find(".sbi_item").slice(t-e.find(".sbi_item").length).addClass("sbi_num_diff_hide"):s<e.find(".sbi_item").length&&e.find(".sbi_item").slice(s-e.find(".sbi_item").length).addClass("sbi_num_diff_hide")}},setImageSizeClass:function(){var e=i(this.el);e.removeClass("sbi_small sbi_medium");var s=e.innerWidth(),t=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,a=this.getColumnCount(),n=(s-t*(a+2))/a;n>120&&n<240?e.addClass("sbi_medium"):n<=120&&e.addClass("sbi_small")},setMinImageWidth:function(){i(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=i(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(i){var e=JSON.parse(i.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),s=i.attr("id").replace("sbi_","");if(void 0!==this.resizedImages[s]&&"video"!==this.resizedImages[s]&&"pending"!==this.resizedImages[s]&&"error"!==this.resizedImages[s].id&&"video"!==this.resizedImages[s].id&&"pending"!==this.resizedImages[s].id){if(void 0!==this.resizedImages[s].sizes){var t=[];void 0!==this.resizedImages[s].sizes.full&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg",t.push(640)),void 0!==this.resizedImages[s].sizes.low&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg",t.push(320)),void 0!==this.resizedImages[s].sizes.thumb&&(t.push(150),e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg"),this.settings.favorLocal&&(-1===t.indexOf(640)&&t.indexOf(320)>-1&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"),-1===t.indexOf(320)&&(t.indexOf(640)>-1?e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg":t.indexOf(150)>-1&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg")),-1===t.indexOf(150)&&(t.indexOf(320)>-1?e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg":t.indexOf(640)>-1&&(e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg")))}}else(void 0===this.resizedImages[s]||void 0!==this.resizedImages[s].id&&"pending"!==this.resizedImages[s].id&&"error"!==this.resizedImages[s].id)&&this.addToNeedsResizing(s);return e},getAvatarUrl:function(i,e){if(""===i)return"";var s=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":void 0!==s[i]?s[i]:"":void 0!==s[i]?s[i]:void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":""},addToNeedsResizing:function(i){-1===this.needsResizing.indexOf(i)&&this.needsResizing.push(i)},applyImageLiquid:function(){var s=i(this.el);e(),"function"==typeof s.find(".sbi_photo").sbi_imgLiquid&&s.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var e,s,t,a=this;e=jQuery,s={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},t={sbiCheckVisibility:function(i,e){if(jQuery.contains(document,i[0])){var s=e.sbiPreviousVisibility,a=i.is(":visible");e.sbiPreviousVisibility=a,null==s?e.runOnLoad&&e.callback(i,a):s!==a&&e.callback(i,a),setTimeout(function(){t.sbiCheckVisibility(i,e)},e.frequency)}}},e.fn.sbiVisibilityChanged=function(i){var a=e.extend({},s,i);return this.each(function(){t.sbiCheckVisibility(e(this),a)})},"function"==typeof i(this.el).filter(":hidden").sbiVisibilityChanged&&i(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(i,e){a.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=i(this.el),s=this.settings.cols,t=this.settings.colsmobile,a=s;return sbiWindowWidth=window.innerWidth,e.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(s)>2&&parseInt(s)<7&&(a=2),sbiWindowWidth<640&&parseInt(s)>6&&parseInt(s)<11&&(a=4),sbiWindowWidth<=480&&parseInt(s)>2&&(a=1)):sbiWindowWidth<=480&&(a=t),parseInt(a)}},window.sbi_init=function(){window.sbi=new s,window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})}}(jQuery),jQuery(document).ready(function(i){void 0===window.sb_instagram_js_options&&(window.sb_instagram_js_options={font_method:"svg",resized_url:location.protocol+"//"+window.location.hostname+"/wp-content/uploads/sb-instagram-feed-images/",placeholder:location.protocol+"//"+window.location.hostname+"/wp-content/plugins/instagram-feed/img/placeholder.png"}),void 0!==window.sb_instagram_js_options.resized_url&&-1===window.sb_instagram_js_options.resized_url.indexOf(location.protocol)&&("http:"===location.protocol?window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("http:","https:"):window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("https:","http:")),sbi_init()}));