Instagram Feed - Version 1.11

Version Description

  • New: Added capability "manage_instagram_feed_options" to support customizations that will allow users/roles other than the administrator to access Instagram Feed settings pages.
  • Fix: rel="noopener" added to all links that contain target="blank"
  • Fix: HTTPS used in xlmns attribute for svgs
  • Fix: Fixed issues with strings in the admin area being translatable
  • Fix: Fixed a potential security vulnerability. Thanks to Martin Verreault for reporting the issue.
Download this release

Release Info

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

Code changes from version 1.10.2 to 1.11

Files changed (5) hide show
  1. README.txt +33 -26
  2. instagram-feed-admin.php +213 -210
  3. instagram-feed.php +125 -26
  4. js/sb-instagram.js +57 -75
  5. js/sb-instagram.min.js +1 -71
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon, craig-at-smash-balloon
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.0
5
  Tested up to: 5.0
6
- Stable tag: 1.10.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -36,19 +36,19 @@ Display Instagram posts from your Instagram accounts, either in the same single
36
 
37
  = Pro Version =
38
  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:
39
-
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 **likes and comments** for each post
44
- * Create **carousels** from your posts
45
- * Use **"Masonry" or "Highlight" layouts** for your feeds
46
- * Display **captions** for photos and videos
47
- * **Filter posts** based on hashtag/word
48
- * Advanced **moderation system** for hiding/showing certain posts
49
- * Create **"shoppable" Instagram feeds**, and more.
50
-
51
- [Find out more about the Pro version](https://smashballoon.com/instagram-feed/ "Instagram Feed Pro") or [try out the Pro demo](https://smashballoon.com/instagram-feed/demo "Instagram Feed Pro Demo").
52
 
53
  = Featured Reviews =
54
  "**Simple and concise** - Excellent plugin. Simple and non-bloated. I had a couple small issues with the plugin when I first started using it, but a quick comment on the support forums got a new version pushed out the next day with the fix. Awesome support!" - [Josh Jones](https://wordpress.org/support/topic/simple-and-concise-3 'Simple and concise Instagram plugin')
@@ -58,7 +58,7 @@ In order to maintain the free version of the plugin on an ongoing basis, and to
58
  = Feedback or Support =
59
  We're dedicated to providing the most customizable, robust and well supported Instagram feed plugin in the world, so if you have an issue or have any feedback on how to improve the plugin then please open a ticket in the [Support forum](http://wordpress.org/support/plugin/instagram-feed 'Instagram Feed Support Forum').
60
 
61
- For a pop-up photo **lightbox**, to display posts by **hashtag**, show photo **captions**, **video** support + more, check out the [Pro version](http://smashballoon.com/instagram-feed/ 'Instagram Feed Pro').
62
 
63
  == Installation ==
64
 
@@ -68,7 +68,7 @@ For a pop-up photo **lightbox**, to display posts by **hashtag**, show photo **c
68
  4. Use the shortcode `[instagram-feed]` in your page, post or widget to display your Instagram photos.
69
  5. You can display multiple Instagram feeds by using shortcode options, for example: `[instagram-feed num=6 cols=3]`
70
 
71
- For simple step-by-step directions on how to set up the Instagram Feed plugin please refer to our [setup guide](http://smashballoon.com/instagram-feed/free/ 'Instagram Feed setup guide').
72
 
73
  = Display your Feed =
74
 
@@ -123,7 +123,7 @@ See the table below for a full list of available shortcode options:
123
  * **followtextcolor** - The text color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followtextcolor=#fff]`
124
  * **followtext** - The text used for the 'Follow on Instagram' button - Example: `[instagram-feed followtext="Follow me"]`
125
 
126
- For more shortcode options, check out the [Pro version](http://smashballoon.com/instagram-feed/ 'Instagram Feed Pro').
127
 
128
  = Setting up the Free Instagram Feed WordPress Plugin =
129
 
@@ -131,7 +131,7 @@ For more shortcode options, check out the [Pro version](http://smashballoon.com/
131
 
132
  2) Click on the large blue Instagram button to log into your Instagram account and get your Instagram Access Token and Instagram User ID
133
 
134
- 3) Copy and paste the Instagram Access Token and Instagram User ID into the relevant Instagram Access Token and Instagram User ID fields. If you're having trouble retrieving your Instagram information from Instagram then try using the Instagram button on [this page](https://smashballoon.com/instagram-feed/token/) instead.
135
 
136
  You can also display photos from other Instagram accounts by using [this tool](http://www.otzberg.net/iguserid/) to find their Instagram User ID.
137
 
@@ -177,7 +177,7 @@ Nope. The Access Token used in the plugin is a "read only" token, which means th
177
 
178
  = Can I view the full-size photos or play Instagram videos directly on my website? =
179
 
180
- This is a feature of the [Pro version](http://smashballoon.com/instagram-feed/ 'Instagram Feed Pro') of the plugin, which allows you to view the photos in a pop-up lightbox, support videos, display captions, display photos by hashtag + more!
181
 
182
  = How do I embed my Instagram Feed directly into a WordPress page template? =
183
 
@@ -191,7 +191,7 @@ If your Instagram photos aren't loading and all your see is a loading symbol the
191
 
192
  You can obtain a new Instagram Access Token on the Instagram Feed Settings page by clicking the blue Instagram login button and then copy and pasting it into the plugin's 'Access Token' field.
193
 
194
- Occasionally the blue Instagram login button does not produce a working access token. You can try [this link](https://smashballoon.com/instagram-feed/token/) as well.
195
 
196
  2) Your Instagram User ID is incorrect or is from a private Instagram account
197
 
@@ -258,9 +258,9 @@ The below options are available on the Instagram Feed Settings page but can also
258
  * **followtextcolor** - The text color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followtextcolor=#fff]`
259
  * **followtext** - The text used for the 'Follow on Instagram' button - Example: `[instagram-feed followtext="Follow me"]`
260
 
261
- For more shortcode options, check out the [Pro version](http://smashballoon.com/instagram-feed/ 'Instagram Feed Pro').
262
 
263
- For more FAQs related to the Instagram Feed plugin please visit the [FAQ section](https://smashballoon.com/instagram-feed/support/faq/ 'Instagram Feed plugin FAQs') on our website.
264
 
265
  == Screenshots ==
266
 
@@ -324,10 +324,17 @@ We understand that sometimes you need help, have issues or just have questions.
324
  * Plus more customization options added all the time!
325
 
326
  == Changelog ==
 
 
 
 
 
 
 
327
  = 1.10.2 =
328
  * Confirmed compatibility with the upcoming WordPress 5.0 "Gutenberg" update
329
  * Fix: Fixed an issue caused by some themes which affected the formatting of the 'Load More' and 'Follow' buttons
330
- * Fix: Fixed an occassional formatting issue with error messages due to no line-height being set
331
  * Fix: Minor admin UI fixes
332
  * Tweak: Removed mention of some Pro features which will be deprecated due to upcoming Instagram API changes
333
 
@@ -368,7 +375,7 @@ We understand that sometimes you need help, have issues or just have questions.
368
  * Fix: Font method setting not working when "Are you using an ajax theme?" setting is enabled
369
 
370
  = 1.8 =
371
- * Important: Due to [recent changes](https://smashballoon.com/instagram-api-changes-april-4-2018/) in the Instagram API it is no longer possible to display photos from other Instagram accounts which are not your own. You can only display the user feed of the account which is associated with your Access Token.
372
  * New: Added an Access Token shortcode option and support for multiple Instagram Access Tokens. If you own multiple Instagram accounts then you can now use multiple Access Tokens in order to display user feeds from each Instagram account, either in separate feeds, or in the same feed. Just use the `accesstoken` shortcode option. See [this FAQ](https://smashballoon.com/display-multiple-instagram-feeds/#multiple-user-feeds) for more information on displaying multiple User feeds.
373
 
374
  = 1.7 =
@@ -514,7 +521,7 @@ We understand that sometimes you need help, have issues or just have questions.
514
  * Tweak: Added a subtle fade effect to the Instagram photos when hovering over them
515
  * Tweak: Improved the responsive layout behavior of the Instagram feed
516
  * Tweak: Improved the documentation within the Instagram Feed plugin settings pages
517
- * Tweak: Included a link to [step-by-step setup directions](http//:smashballoon.com/instagram-feed/free/ 'Instagram feed setup directions') for the plugin
518
  * Fix: Fixed an issue with the feed not clearing other widgets correctly
519
 
520
  = 1.2.3 =
@@ -534,7 +541,7 @@ We understand that sometimes you need help, have issues or just have questions.
534
  * New: Added an option to display your Instagram photos in random order
535
  * New: A new tabbed layout has been implemented on the Instagram Feed plugin's settings pages
536
  * New: Added an option to preserve your Instagram Feed settings when uninstalling the plugin
537
- * New: Added a [Pro version](http://smashballoon.com/instagram-feed/ 'Instagram Feed Pro') of the Instagram Feed plugin which allows you to display Instagram photos by hashtag, display Instagram captions, view Instagram photos in a pop-up lightbox, show the number of Instagram likes & comments and more
538
  * Tweak: The 'Load More' button now automatically hides if there are no more Instagram photos to load
539
  * Tweak: Added a small gap to the top of the 'Load More' button
540
  * Tweak: Added a icon to the Instagram Feed menu item
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.0
5
  Tested up to: 5.0
6
+ Stable tag: 1.11
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
36
 
37
  = Pro Version =
38
  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:
39
+ * Display Hashtag feeds (fully compatible with the Instagram December 11, 2018, API changes)
40
+ * View photos and videos in a popup lightbox directly on your site
41
+ * View post comments for user feeds
42
+ * Display the number of like and comments for each post
43
+ * Create carousels from your posts
44
+ * Use "Masonry" or "Highlight" layouts for your feeds
45
+ * Display captions for photos and videos
46
+ * Filter posts based on hashtag/word
47
+ * Advanced moderation system for hiding/showing certain posts
48
+ * Block posts by specific users
49
+ * Create "shoppable" Instagram feeds, and more.
50
+
51
+ [Find out more about the Pro version](https://smashballoon.com/instagram-feed/?utm_source=wordpress&utm_campaign=sbi "Instagram Feed Pro") or [try out the Pro demo](https://smashballoon.com/instagram-feed/demo/?utm_source=wordpress&utm_campaign=sbi "Instagram Feed Pro Demo").
52
 
53
  = Featured Reviews =
54
  "**Simple and concise** - Excellent plugin. Simple and non-bloated. I had a couple small issues with the plugin when I first started using it, but a quick comment on the support forums got a new version pushed out the next day with the fix. Awesome support!" - [Josh Jones](https://wordpress.org/support/topic/simple-and-concise-3 'Simple and concise Instagram plugin')
58
  = Feedback or Support =
59
  We're dedicated to providing the most customizable, robust and well supported Instagram feed plugin in the world, so if you have an issue or have any feedback on how to improve the plugin then please open a ticket in the [Support forum](http://wordpress.org/support/plugin/instagram-feed 'Instagram Feed Support Forum').
60
 
61
+ For a pop-up photo **lightbox**, to display posts by **hashtag**, show photo **captions**, **video** support + more, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_source=wordpress&utm_campaign=sbi 'Instagram Feed Pro').
62
 
63
  == Installation ==
64
 
68
  4. Use the shortcode `[instagram-feed]` in your page, post or widget to display your Instagram photos.
69
  5. You can display multiple Instagram feeds by using shortcode options, for example: `[instagram-feed num=6 cols=3]`
70
 
71
+ For simple step-by-step directions on how to set up the Instagram Feed plugin please refer to our [setup guide](http://smashballoon.com/instagram-feed/free/?utm_source=wordpress&utm_campaign=sbi 'Instagram Feed setup guide').
72
 
73
  = Display your Feed =
74
 
123
  * **followtextcolor** - The text color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followtextcolor=#fff]`
124
  * **followtext** - The text used for the 'Follow on Instagram' button - Example: `[instagram-feed followtext="Follow me"]`
125
 
126
+ For more shortcode options, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_source=wordpress&utm_campaign=sbi 'Instagram Feed Pro').
127
 
128
  = Setting up the Free Instagram Feed WordPress Plugin =
129
 
131
 
132
  2) Click on the large blue Instagram button to log into your Instagram account and get your Instagram Access Token and Instagram User ID
133
 
134
+ 3) Copy and paste the Instagram Access Token and Instagram User ID into the relevant Instagram Access Token and Instagram User ID fields. If you're having trouble retrieving your Instagram information from Instagram then try using the Instagram button on [this page](https://smashballoon.com/instagram-feed/token/?utm_source=wordpress&utm_campaign=sbi) instead.
135
 
136
  You can also display photos from other Instagram accounts by using [this tool](http://www.otzberg.net/iguserid/) to find their Instagram User ID.
137
 
177
 
178
  = Can I view the full-size photos or play Instagram videos directly on my website? =
179
 
180
+ This is a feature of the [Pro version](http://smashballoon.com/instagram-feed/?utm_source=wordpress&utm_campaign=sbi 'Instagram Feed Pro') of the plugin, which allows you to view the photos in a pop-up lightbox, support videos, display captions, display photos by hashtag + more!
181
 
182
  = How do I embed my Instagram Feed directly into a WordPress page template? =
183
 
191
 
192
  You can obtain a new Instagram Access Token on the Instagram Feed Settings page by clicking the blue Instagram login button and then copy and pasting it into the plugin's 'Access Token' field.
193
 
194
+ Occasionally the blue Instagram login button does not produce a working access token. You can try [this link](https://smashballoon.com/instagram-feed/token/?utm_source=wordpress&utm_campaign=sbi) as well.
195
 
196
  2) Your Instagram User ID is incorrect or is from a private Instagram account
197
 
258
  * **followtextcolor** - The text color of the 'Follow on Instagram' button. Any hex color code - Example: `[instagram-feed followtextcolor=#fff]`
259
  * **followtext** - The text used for the 'Follow on Instagram' button - Example: `[instagram-feed followtext="Follow me"]`
260
 
261
+ For more shortcode options, check out the [Pro version](http://smashballoon.com/instagram-feed/?utm_source=wordpress&utm_campaign=sbi 'Instagram Feed Pro').
262
 
263
+ For more FAQs related to the Instagram Feed plugin please visit the [FAQ section](https://smashballoon.com/instagram-feed/support/faq/?utm_source=wordpress&utm_campaign=sbi 'Instagram Feed plugin FAQs') on our website.
264
 
265
  == Screenshots ==
266
 
324
  * Plus more customization options added all the time!
325
 
326
  == Changelog ==
327
+ = 1.11 =
328
+ * New: Added capability "manage_instagram_feed_options" to support customizations that will allow users/roles other than the administrator to access Instagram Feed settings pages.
329
+ * Fix: rel="noopener" added to all links that contain target="blank"
330
+ * Fix: HTTPS used in xlmns attribute for svgs
331
+ * Fix: Fixed issues with strings in the admin area being translatable
332
+ * Fix: Fixed a potential security vulnerability. Thanks to [Martin Verreault](https://egyde.ca) for reporting the issue.
333
+
334
  = 1.10.2 =
335
  * Confirmed compatibility with the upcoming WordPress 5.0 "Gutenberg" update
336
  * Fix: Fixed an issue caused by some themes which affected the formatting of the 'Load More' and 'Follow' buttons
337
+ * Fix: Fixed an occasional formatting issue with error messages due to no line-height being set
338
  * Fix: Minor admin UI fixes
339
  * Tweak: Removed mention of some Pro features which will be deprecated due to upcoming Instagram API changes
340
 
375
  * Fix: Font method setting not working when "Are you using an ajax theme?" setting is enabled
376
 
377
  = 1.8 =
378
+ * Important: Due to [recent changes](https://smashballoon.com/instagram-api-changes-april-4-2018/?utm_source=wordpress&utm_campaign=sbi) in the Instagram API it is no longer possible to display photos from other Instagram accounts which are not your own. You can only display the user feed of the account which is associated with your Access Token.
379
  * New: Added an Access Token shortcode option and support for multiple Instagram Access Tokens. If you own multiple Instagram accounts then you can now use multiple Access Tokens in order to display user feeds from each Instagram account, either in separate feeds, or in the same feed. Just use the `accesstoken` shortcode option. See [this FAQ](https://smashballoon.com/display-multiple-instagram-feeds/#multiple-user-feeds) for more information on displaying multiple User feeds.
380
 
381
  = 1.7 =
521
  * Tweak: Added a subtle fade effect to the Instagram photos when hovering over them
522
  * Tweak: Improved the responsive layout behavior of the Instagram feed
523
  * Tweak: Improved the documentation within the Instagram Feed plugin settings pages
524
+ * Tweak: Included a link to [step-by-step setup directions](http//:smashballoon.com/instagram-feed/free/?utm_source=wordpress&utm_campaign=sbi 'Instagram feed setup directions') for the plugin
525
  * Fix: Fixed an issue with the feed not clearing other widgets correctly
526
 
527
  = 1.2.3 =
541
  * New: Added an option to display your Instagram photos in random order
542
  * New: A new tabbed layout has been implemented on the Instagram Feed plugin's settings pages
543
  * New: Added an option to preserve your Instagram Feed settings when uninstalling the plugin
544
+ * New: Added a [Pro version](http://smashballoon.com/instagram-feed/?utm_source=wordpress&utm_campaign=sbi 'Instagram Feed Pro') of the Instagram Feed plugin which allows you to display Instagram photos by hashtag, display Instagram captions, view Instagram photos in a pop-up lightbox, show the number of Instagram likes & comments and more
545
  * Tweak: The 'Load More' button now automatically hides if there are no more Instagram photos to load
546
  * Tweak: Added a small gap to the top of the 'Load More' button
547
  * Tweak: Added a icon to the Instagram Feed menu item
instagram-feed-admin.php CHANGED
@@ -1,11 +1,19 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
 
 
 
 
 
 
4
  function sb_instagram_menu() {
 
 
5
  add_menu_page(
6
  __( 'Instagram Feed', 'instagram-feed' ),
7
  __( 'Instagram Feed', 'instagram-feed' ),
8
- 'manage_options',
9
  'sb-instagram-feed',
10
  'sb_instagram_settings_page'
11
  );
@@ -13,7 +21,7 @@ function sb_instagram_menu() {
13
  'sb-instagram-feed',
14
  __( 'Settings', 'instagram-feed' ),
15
  __( 'Settings', 'instagram-feed' ),
16
- 'manage_options',
17
  'sb-instagram-feed',
18
  'sb_instagram_settings_page'
19
  );
@@ -364,7 +372,7 @@ function sb_instagram_settings_page() {
364
  <div id="sbi_config">
365
  <!-- <a href="https://instagram.com/oauth/authorize/?client_id=1654d0c81ad04754a898d89315bec227&redirect_uri=https://smashballoon.com/instagram-feed/instagram-token-plugin/?return_uri=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>&response_type=token" class="sbi_admin_btn"><?php _e( 'Log in and get my Access Token and User ID', 'instagram-feed' ); ?></a> -->
366
  <a href="https://instagram.com/oauth/authorize/?client_id=3a81a9fa2a064751b8c31385b91cc25c&scope=basic+public_content&redirect_uri=https://api.smashballoon.com/instagram-plugin-token.php?return_uri=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>&response_type=token&state=<?php echo admin_url('admin.php?page-sb-instagram-feed'); ?>" class="sbi_admin_btn"><i class="fa fa-user-plus" aria-hidden="true" style="font-size: 20px;"></i>&nbsp; <?php _e( 'Connect an Instagram Account', 'instagram-feed' ); ?></a>
367
- <a href="https://smashballoon.com/instagram-feed/token/" target="_blank" style="position: relative; top: 14px; left: 15px;"><?php _e( 'Button not working?', 'instagram-feed' ); ?></a>
368
  </div>
369
 
370
  <!-- Old Access Token -->
@@ -385,7 +393,7 @@ function sb_instagram_settings_page() {
385
  ?>
386
 
387
  <tr valign="top">
388
- <th scope="row"><label><?php _e( 'Instagram Accounts', 'instagram-feed' ); ?></label><span style="font-weight:normal; font-style:italic; font-size: 12px; display: block;">Use the button above to connect an Instagram account</span></th>
389
  <td class="sbi_connected_accounts_wrap">
390
  <?php if ( empty( $connected_accounts ) ) : ?>
391
  <p class="sbi_no_accounts"><?php _e( 'No Instagram accounts connected. Click the button above to connect an account.', 'instagram-feed' ); ?></p><br />
@@ -420,13 +428,13 @@ function sb_instagram_settings_page() {
420
  <a href="JavaScript:void(0);" class="sbi_remove_from_user_feed button-primary"><i class="fa fa-minus-circle" aria-hidden="true"></i><?php _e( 'Remove from Primary Feed', 'instagram-feed' ); ?></a>
421
  <?php endif; ?>
422
  <a class="sbi_ca_token_shortcode button-secondary" href="JavaScript:void(0);"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i><?php _e( 'Add to another Feed', 'instagram-feed' ); ?></a>
423
- <p class="sbi_ca_show_token"><input type="checkbox" id="sbi_ca_show_token_<?php esc_attr_e( $account['user_id'] ); ?>" /><label for="sbi_ca_show_token_<?php esc_attr_e( $account['user_id'] ); ?>">Show Access Token</label></p>
424
 
425
  </div>
426
 
427
  <div class="sbi_ca_shortcode">
428
 
429
- <p>Copy and paste this shortcode into your page or widget area:<br>
430
  <?php if ( !empty( $account['username'] ) ) : ?>
431
  <code>[instagram-feed user="<?php echo $account['username']; ?>"]</code>
432
  <?php else : ?>
@@ -434,18 +442,18 @@ function sb_instagram_settings_page() {
434
  <?php endif; ?>
435
  </p>
436
 
437
- <p>To add multiple users in the same feed, simply separate them using commas:<br>
438
  <?php if ( !empty( $account['username'] ) ) : ?>
439
  <code>[instagram-feed user="<?php echo $account['username']; ?>, a_second_user, a_third_user"]</code>
440
  <?php else : ?>
441
  <code>[instagram-feed accesstoken="<?php echo $account['access_token']; ?>, another_access_token"]</code>
442
  <?php endif; ?>
443
 
444
- <p>Click on the <a href="?page=sb-instagram-feed&tab=display" target="_blank">Display Your Feed</a> tab to learn more about shortcodes</p>
445
  </div>
446
 
447
  <div class="sbi_ca_accesstoken">
448
- <span class="sbi_ca_token_label">Access Token:</span><input type="text" class="sbi_ca_token" value="<?php echo $account['access_token']; ?>" readonly="readonly" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).">
449
  </div>
450
 
451
  </div>
@@ -456,8 +464,8 @@ function sb_instagram_settings_page() {
456
  <?php endif; ?>
457
  <a href="JavaScript:void(0);" class="sbi_manually_connect button-secondary"><?php _e( 'Manually Connect an Account', 'instagram-feed' ); ?></a>
458
  <div class="sbi_manually_connect_wrap">
459
- <input name="sb_manual_at" id="sb_manual_at" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="64" maxlength="100" placeholder="Enter a valid Instagram Access Token" />
460
- <p class="sbi_submit" style="display: inline-block;"><button name="submit" id="sbi_manual_submit" class="button button-primary">Connect This Account</button></p>
461
  </div>
462
  </td>
463
  </tr>
@@ -490,10 +498,10 @@ function sb_instagram_settings_page() {
490
  </div>
491
 
492
  <?php if ( empty( $user_feed_ids ) ) : ?>
493
- <p class="sbi_no_accounts" style="margin-top: -3px; margin-right: 10px;">Connect a user account above</p>
494
  <?php endif; ?>
495
 
496
- <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="margin: 5px 0 10px 0; display: inline-block; height: 19px;"><?php _e("How to display User feeds"); ?></a>
497
  <div class="sbi_tooltip"><?php _e("<p><b>Displaying Posts from Your User Account</b><br />Simply connect an account using the button above.</p><p style='padding-top:8px;'><b>Displaying Posts from Other Instagram Accounts</b><br />Due to recent changes in the Instagram API it is no longer possible to display photos from other Instagram accounts which you do not have access to. You can only display the user feed of an account which you connect above. You can connect as many account as you like by logging in using the button above, or manually copy/pasting an Access Token by selecting the 'Manually Connect an Account' option.</p><p style='padding-top:10px;'><b>Multiple Acounts</b><br />It is only possible to display feeds from Instagram accounts which you own. In order to display feeds from multiple accounts, first connect them above and then use the buttons to add the account either to your primary feed or to another feed on your site.</p>", 'instagram-feed'); ?></div><br />
498
  </div>
499
 
@@ -506,8 +514,8 @@ function sb_instagram_settings_page() {
506
  </div>
507
  <div class="sbi_col sbi_two">
508
 
509
- <p class="sbi_pro_tooltip">Upgrade to the Pro version to display hashtag feeds<i class="fa fa-caret-down" aria-hidden="true"></i></p>
510
- <a href="https://smashballoon.com/instagram-feed/" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i>Pro</a>
511
 
512
  <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" />
513
  &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
@@ -520,7 +528,7 @@ function sb_instagram_settings_page() {
520
  <br>
521
  <a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);" style="margin-left: 0;"><i class="fa fa-question-circle" aria-hidden="true" style="margin-right: 6px;"></i><?php _e('Combine multiple feed types into a single feed', 'instagram-feed'); ?></a>
522
  <p class="sbi_tooltip">
523
- <b>Please note: this is only available in the <a href="https://smashballoon.com/instagram-feed/" target="_blank">Pro version</a>.</b><br />
524
  <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add each user name or hashtag of each feed into the shortcode, like so: %s. This will combine a user feed and a hashtag feed into the same feed.', 'instagram-feed'), 'type="mixed"', '<code>[instagram-feed type="mixed" user="smashballoon" hashtag="#awesomeplugins"]</code>' ); ?>
525
  </p>
526
  </div>
@@ -539,16 +547,16 @@ function sb_instagram_settings_page() {
539
  </tr>
540
 
541
  <tr valign="top">
542
- <th scope="row"><label><?php _e('Check for new posts every'); ?></label></th>
543
  <td>
544
  <input name="sb_instagram_cache_time" type="text" value="<?php esc_attr_e( $sb_instagram_cache_time ); ?>" size="4" />
545
  <select name="sb_instagram_cache_time_unit">
546
- <option value="minutes" <?php if($sb_instagram_cache_time_unit == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes'); ?></option>
547
- <option value="hours" <?php if($sb_instagram_cache_time_unit == "hours") echo 'selected="selected"' ?> ><?php _e('Hours'); ?></option>
548
- <option value="days" <?php if($sb_instagram_cache_time_unit == "days") echo 'selected="selected"' ?> ><?php _e('Days'); ?></option>
549
  </select>
550
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
551
- <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.'); ?></p>
552
  </td>
553
  </tr>
554
  </tbody>
@@ -559,7 +567,7 @@ function sb_instagram_settings_page() {
559
 
560
  <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php _e('Next Step: <a href="?page=sb-instagram-feed&tab=customize">Customize your Feed</a>', 'instagram-feed'); ?></p>
561
 
562
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
563
 
564
 
565
  <?php } // End Configure tab ?>
@@ -653,28 +661,28 @@ function sb_instagram_settings_page() {
653
  </div>
654
  <?php endforeach; ?>
655
 
656
- <p class="sbi_pro_tooltip">Upgrade to the Pro version to unlock these layouts<i class="fa fa-caret-down" aria-hidden="true"></i></p>
657
- <a href="https://smashballoon.com/instagram-feed/" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i>Pro</a>
658
 
659
  </div>
660
  <div class="sb_layout_options_wrap sbi_pro">
661
  <a href="JavaScript:void(0);" class="sbi_close_options"><i class="fa fa-close"></i></a>
662
  <div class="sb_instagram_layout_settings sbi_layout_type_grid">
663
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;">A uniform grid of square-cropped images.</span>
664
  </div>
665
  <div class="sb_instagram_layout_settings sbi_layout_type_masonry">
666
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;">Images in their original aspect ratios with no vertical space between posts.</span>
667
  </div>
668
  <div class="sb_instagram_layout_settings sbi_layout_type_carousel">
669
  <div class="sb_instagram_layout_setting">
670
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;">Posts are displayed in a slideshow carousel.</span>
671
  </div>
672
  <div class="sb_instagram_layout_setting">
673
 
674
- <label>Number of Rows</label><code class="sbi_shortcode"> carouselrows
675
  Eg: carouselrows=2</code>
676
  <br>
677
- <span class="sbi_note" style="margin: -5px 0 -10px 0; display: block;">Use the "Number of Columns" setting below this section to set how many posts are visible in the carousel at a given time.</span>
678
  <br>
679
  <select name="sb_instagram_carousel_rows" id="sb_instagram_carousel_rows">
680
  <option value="1">1</option>
@@ -682,32 +690,32 @@ function sb_instagram_settings_page() {
682
  </select>
683
  </div>
684
  <div class="sb_instagram_layout_setting">
685
- <label>Loop Type</label><code class="sbi_shortcode"> carouselloop
686
  Eg: carouselloop=rewind
687
  carouselloop=infinity</code>
688
  <br>
689
  <select name="sb_instagram_carousel_loop" id="sb_instagram_carousel_loop">
690
- <option value="rewind">Rewind</option>
691
- <option value="infinity" selected="selected">Infinity</option>
692
  </select>
693
  </div>
694
  <div class="sb_instagram_layout_setting">
695
  <input type="checkbox" name="sb_instagram_carousel_arrows" id="sb_instagram_carousel_arrows" checked="checked">
696
- <label>Show Navigation Arrows</label><code class="sbi_shortcode"> carouselarrows
697
  Eg: carouselarrows=true</code>
698
  </div>
699
  <div class="sb_instagram_layout_setting">
700
  <input type="checkbox" name="sb_instagram_carousel_pag" id="sb_instagram_carousel_pag">
701
- <label>Show Pagination</label><code class="sbi_shortcode"> carouselpag
702
  Eg: carouselpag=true</code>
703
  </div>
704
  <div class="sb_instagram_layout_setting">
705
  <input type="checkbox" name="sb_instagram_carousel_autoplay" id="sb_instagram_carousel_autoplay">
706
- <label>Enable Autoplay</label><code class="sbi_shortcode"> carouselautoplay
707
  Eg: carouselautoplay=true</code>
708
  </div>
709
  <div class="sb_instagram_layout_setting">
710
- <label>Interval Time</label><code class="sbi_shortcode"> carouseltime
711
  Eg: carouseltime=8000</code>
712
  <br>
713
  <input name="sb_instagram_carousel_interval" type="text" value="5000" size="6">miliseconds </div>
@@ -715,47 +723,47 @@ function sb_instagram_settings_page() {
715
 
716
  <div class="sb_instagram_layout_settings sbi_layout_type_highlight">
717
  <div class="sb_instagram_layout_setting">
718
- <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;">Masonry style, square-cropped, image only (no captions or likes/comments below image). "Highlighted" posts are twice as large.</span>
719
  </div>
720
  <div class="sb_instagram_layout_setting">
721
- <label title="Click for shortcode option">Highlighting Type</label><code class="sbi_shortcode"> highlighttype
722
  Eg: highlighttype=pattern</code>
723
  <br>
724
  <select name="sb_instagram_highlight_type" id="sb_instagram_highlight_type">
725
- <option value="pattern" selected="selected">Pattern</option>
726
- <option value="id">Post ID</option>
727
- <option value="hashtag">Hashtag</option>
728
  </select>
729
  </div>
730
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
731
- <label>Offset</label><code class="sbi_shortcode"> highlightoffset
732
  Eg: highlightoffset=2</code>
733
  <br>
734
  <input name="sb_instagram_highlight_offset" type="number" min="0" value="0" style="width: 50px;">
735
  </div>
736
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
737
- <label>Pattern</label><code class="sbi_shortcode"> highlightpattern
738
  Eg: highlightpattern=3</code>
739
  <br>
740
- <span>Highlight every</span><input name="sb_instagram_highlight_factor" type="number" min="2" value="6" style="width: 50px;"><span>posts</span>
741
  </div>
742
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_hashtag sb_instagram_layout_setting" style="display: none;">
743
- <label>Highlight Posts with these Hashtags</label>
744
- <input name="sb_instagram_highlight_hashtag" id="sb_instagram_highlight_hashtag" type="text" size="40" value="#fishing">&nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);">What is this?</a>
745
  <br>
746
- <span class="sbi_note" style="margin-left: 0;">Separate multiple hashtags using commas</span>
747
 
748
 
749
- <p class="sbi_tooltip">You can use this setting to highlight posts by a hashtag. Use a specified hashtag in your posts and they will be automatically highlighted in your feed.</p>
750
  </div>
751
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_ids sb_instagram_layout_setting" style="display: none;">
752
- <label>Highlight Posts by ID</label>
753
  <textarea name="sb_instagram_highlight_ids" id="sb_instagram_highlight_ids" style="width: 100%;" rows="3">sbi_1852317219231323590_3269008872</textarea>
754
  <br>
755
- <span class="sbi_note" style="margin-left: 0;">Separate IDs using commas</span>
756
 
757
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);">What is this?</a>
758
- <p class="sbi_tooltip">You can use this setting to highlight posts by their ID. Enable and use "moderation mode", check the box to show post IDs underneath posts, then copy and paste IDs into this text box.</p>
759
  </div>
760
  </div>
761
 
@@ -849,21 +857,21 @@ function sb_instagram_settings_page() {
849
  </tbody>
850
  </table>
851
 
852
- <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a></span>
853
 
854
  <div class="sbi-pro-options">
855
  <p class="sbi-upgrade-link">
856
- <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
857
  </p>
858
  <table class="form-table">
859
  <tbody>
860
  <tr valign="top" class="sbi_pro">
861
- <th scope="row"><label><?php _e('Media Type to Display'); ?></label></th>
862
  <td>
863
  <select name="sb_instagram_media_type" disabled>
864
- <option value="all"><?php _e('All'); ?></option>
865
- <option value="photos"><?php _e('Photos only'); ?></option>
866
- <option value="videos"><?php _e('Videos only'); ?></option>
867
  </select>
868
  </td>
869
  </tr>
@@ -876,11 +884,11 @@ function sb_instagram_settings_page() {
876
  </tr>
877
 
878
  <tr valign="top" class="sbi_pro">
879
- <th scope="row"><label><?php _e("Link Posts to URL in Caption (Shoppable feed)"); ?></label></th>
880
  <td>
881
  <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
882
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e("What will this do?"); ?></a>
883
- <p class="sbi_tooltip"><?php _e("Checking this box will change the link for each post to any url included in the caption for that Instagram post. The lightbox will be disabled. Visit <a href='https://smashballoon.com/make-a-shoppable-feed'>this link</a> to learn how this works."); ?></p>
884
  </td>
885
  </tr>
886
  </tbody>
@@ -889,58 +897,58 @@ function sb_instagram_settings_page() {
889
 
890
 
891
  <hr />
892
- <h3><?php _e('Photo Hover Style'); ?></h3>
893
 
894
  <p style="padding-bottom: 18px;">
895
- <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to enable Photo Hover styles</a><br />
896
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a>
897
  </p>
898
 
899
  <div class="sbi-pro-options" style="margin-top: -15px;">
900
  <table class="form-table">
901
  <tbody>
902
  <tr valign="top" class="sbi_pro">
903
- <th scope="row"><label><?php _e('Hover Background Color'); ?></label></th>
904
  <td>
905
  <input name="sb_hover_background" type="text" disabled class="sbi_colorpick" />
906
  </td>
907
  </tr>
908
  <tr valign="top" class="sbi_pro">
909
- <th scope="row"><label><?php _e('Hover Text Color'); ?></label></th>
910
  <td>
911
  <input name="sb_hover_text" type="text" disabled class="sbi_colorpick" />
912
  </td>
913
  </tr>
914
  <tr valign="top" class="sbi_pro">
915
- <th scope="row"><label><?php _e('Information to display'); ?></label></th>
916
  <td>
917
  <div>
918
  <input name="sbi_hover_inc_username" type="checkbox" disabled />
919
- <label for="sbi_hover_inc_username"><?php _e('Username'); ?></label>
920
  </div>
921
  <div>
922
  <input name="sbi_hover_inc_icon" type="checkbox" disabled />
923
- <label for="sbi_hover_inc_icon"><?php _e('Expand Icon'); ?></label>
924
  </div>
925
  <div>
926
  <input name="sbi_hover_inc_date" type="checkbox" disabled />
927
- <label for="sbi_hover_inc_date"><?php _e('Date'); ?></label>
928
  </div>
929
  <div>
930
  <input name="sbi_hover_inc_instagram" type="checkbox" disabled />
931
- <label for="sbi_hover_inc_instagram"><?php _e('Instagram Icon/Link'); ?></label>
932
  </div>
933
  <div>
934
  <input name="sbi_hover_inc_location" type="checkbox" disabled />
935
- <label for="sbi_hover_inc_location"><?php _e('Location'); ?></label>
936
  </div>
937
  <div>
938
  <input name="sbi_hover_inc_caption" type="checkbox" disabled />
939
- <label for="sbi_hover_inc_caption"><?php _e('Caption'); ?></label>
940
  </div>
941
  <div>
942
  <input name="sbi_hover_inc_likes" type="checkbox" disabled />
943
- <label for="sbi_hover_inc_likes"><?php _e('Like/Comment Icons'); ?></label>
944
  </div>
945
  </td>
946
  </tr>
@@ -953,8 +961,8 @@ function sb_instagram_settings_page() {
953
  <hr />
954
  <h3><?php _e( 'Carousel', 'instagram-feed' ); ?></h3>
955
  <p style="padding-bottom: 18px;">
956
- <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to enable Carousels</a><br />
957
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a>
958
  </p>
959
 
960
  <div class="sbi-pro-options" style="margin-top: -15px;">
@@ -964,32 +972,32 @@ function sb_instagram_settings_page() {
964
  <th scope="row"><label><?php _e("Enable Carousel"); ?></label></th>
965
  <td>
966
  <input type="checkbox" disabled />
967
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
968
- <p class="sbi_tooltip"><?php _e("Enable this setting to create a carousel slider out of your photos."); ?></p>
969
  </td>
970
  </tr>
971
  <tr valign="top" class="sbi_pro">
972
- <th scope="row"><label><?php _e("Show Navigation Arrows"); ?></label></th>
973
  <td>
974
  <input type="checkbox" disabled />
975
  </td>
976
  </tr>
977
  <tr valign="top" class="sbi_pro">
978
- <th scope="row"><label><?php _e("Show Pagination"); ?></label></th>
979
  <td>
980
  <input type="checkbox" disabled />
981
  </td>
982
  </tr>
983
  <tr valign="top" class="sbi_pro">
984
- <th scope="row"><label><?php _e("Enable Autoplay"); ?></label></th>
985
  <td>
986
  <input type="checkbox" disabled />
987
  </td>
988
  </tr>
989
  <tr valign="top" class="sbi_pro">
990
- <th scope="row"><label><?php _e("Interval Time"); ?></label></th>
991
  <td>
992
- <input name="sb_instagram_carousel_interval" type="text" disabled size="6" /><?php _e("miliseconds"); ?>
993
  </td>
994
  </tr>
995
  </tbody>
@@ -1021,12 +1029,12 @@ function sb_instagram_settings_page() {
1021
  </td>
1022
  </tr>
1023
  <tr valign="top">
1024
- <th scope="row"><label><?php _e("Show Bio Text"); ?></label><code class="sbi_shortcode"> showbio
1025
  Eg: showbio=false</code></th>
1026
  <td>
1027
  <?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
1028
  <input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio" <?php if($sb_instagram_show_bio == true) echo 'checked="checked"' ?> />
1029
- <span class="sbi_note"><?php _e("Only applies for Instagram accounts with bios"); ?></span>
1030
  </td>
1031
  </tr>
1032
  <tr valign="top">
@@ -1039,29 +1047,29 @@ function sb_instagram_settings_page() {
1039
  </tbody>
1040
  </table>
1041
 
1042
- <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a></span>
1043
 
1044
  <div class="sbi-pro-options">
1045
  <p class="sbi-upgrade-link">
1046
- <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1047
  </p>
1048
  <table class="form-table">
1049
  <tbody>
1050
  <tr valign="top" class="sbi_pro">
1051
- <th scope="row"><label><?php _e('Header Style'); ?></label></th>
1052
  <td>
1053
  <select name="sb_instagram_header_style" style="float: left;">
1054
- <option value="circle"><?php _e('Standard'); ?></option>
1055
- <option value="boxed"><?php _e('Boxed'); ?></option>
1056
- <option value="centered"><?php _e('Centered'); ?></option>
1057
  </select>
1058
  </td>
1059
  </tr>
1060
  <tr valign="top" class="sbi_pro">
1061
- <th scope="row"><label><?php _e("Show Number of Followers"); ?></label></th>
1062
  <td>
1063
  <input type="checkbox" disabled />
1064
- <span class="sbi_note"><?php _e("This only applies when displaying photos from a User ID"); ?></span>
1065
  </td>
1066
  </tr>
1067
  </tbody>
@@ -1074,51 +1082,51 @@ function sb_instagram_settings_page() {
1074
  <hr />
1075
  <h3><?php _e("Caption", 'instagram-feed'); ?></h3>
1076
  <p style="padding-bottom: 18px;">
1077
- <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to enable Photo Captions</a><br />
1078
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a>
1079
  </p>
1080
 
1081
  <div class="sbi-pro-options" style="margin-top: -15px;">
1082
  <table class="form-table">
1083
  <tbody>
1084
  <tr valign="top" class="sbi_pro">
1085
- <th scope="row"><label><?php _e("Show Caption"); ?></label></th>
1086
  <td>
1087
  <input type="checkbox" disabled />
1088
  </td>
1089
  </tr>
1090
  <tr valign="top" class="sbi_pro">
1091
- <th scope="row"><label><?php _e("Maximum Text Length"); ?></label></th>
1092
  <td>
1093
  <input disabled size="4" />Characters
1094
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
1095
- <p class="sbi_tooltip"><?php _e("The number of characters of text to display in the caption. An elipsis link will be added to allow the user to reveal more text if desired."); ?></p>
1096
  </td>
1097
  </tr>
1098
  <tr valign="top" class="sbi_pro">
1099
- <th scope="row"><label><?php _e('Text Color'); ?></label></th>
1100
  <td>
1101
  <input type="text" disabled class="sbi_colorpick" />
1102
  </td>
1103
  </tr>
1104
  <tr valign="top" class="sbi_pro">
1105
- <th scope="row"><label><?php _e('Text Size'); ?></label></th>
1106
  <td>
1107
  <select name="sb_instagram_caption_size" style="width: 180px;" disabled>
1108
- <option value="inherit" ><?php _e('Inherit from theme'); ?></option>
1109
- <option value="10" ><?php _e('10px'); ?></option>
1110
- <option value="11" ><?php _e('11px'); ?></option>
1111
- <option value="12" ><?php _e('12px'); ?></option>
1112
- <option value="13" ><?php _e('13px'); ?></option>
1113
- <option value="14" ><?php _e('14px'); ?></option>
1114
- <option value="16" ><?php _e('16px'); ?></option>
1115
- <option value="18" ><?php _e('18px'); ?></option>
1116
- <option value="20" ><?php _e('20px'); ?></option>
1117
- <option value="24" ><?php _e('24px'); ?></option>
1118
- <option value="28" ><?php _e('28px'); ?></option>
1119
- <option value="32" ><?php _e('32px'); ?></option>
1120
- <option value="36" ><?php _e('36px'); ?></option>
1121
- <option value="40" ><?php _e('40px'); ?></option>
1122
  </select>
1123
  </td>
1124
  </tr>
@@ -1130,43 +1138,43 @@ function sb_instagram_settings_page() {
1130
  <hr />
1131
  <h3><?php _e("Likes &amp; Comments", 'instagram-feed'); ?></h3>
1132
  <p style="padding-bottom: 18px;">
1133
- <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to enable Likes &amp; Comments</a><br />
1134
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a>
1135
  </p>
1136
 
1137
  <div class="sbi-pro-options" style="margin-top: -15px;">
1138
  <table class="form-table">
1139
  <tbody>
1140
  <tr valign="top" class="sbi_pro">
1141
- <th scope="row"><label><?php _e("Show Icons"); ?></label></th>
1142
  <td>
1143
  <input type="checkbox" disabled />
1144
  </td>
1145
  </tr>
1146
  <tr valign="top" class="sbi_pro">
1147
- <th scope="row"><label><?php _e('Icon Color'); ?></label></th>
1148
  <td>
1149
  <input type="text" disabled class="sbi_colorpick" />
1150
  </td>
1151
  </tr>
1152
  <tr valign="top" class="sbi_pro">
1153
- <th scope="row"><label><?php _e('Icon Size'); ?></label></th>
1154
  <td>
1155
  <select disabled name="sb_instagram_meta_size" style="width: 180px;">
1156
- <option value="inherit"><?php _e('Inherit from theme'); ?></option>
1157
- <option value="10" ><?php _e('10px'); ?></option>
1158
- <option value="11" ><?php _e('11px'); ?></option>
1159
- <option value="12" ><?php _e('12px'); ?></option>
1160
- <option value="13" ><?php _e('13px'); ?></option>
1161
- <option value="14" ><?php _e('14px'); ?></option>
1162
- <option value="16" ><?php _e('16px'); ?></option>
1163
- <option value="18" ><?php _e('18px'); ?></option>
1164
- <option value="20" ><?php _e('20px'); ?></option>
1165
- <option value="24" ><?php _e('24px'); ?></option>
1166
- <option value="28" ><?php _e('28px'); ?></option>
1167
- <option value="32" ><?php _e('32px'); ?></option>
1168
- <option value="36" ><?php _e('36px'); ?></option>
1169
- <option value="40" ><?php _e('40px'); ?></option>
1170
  </select>
1171
  </td>
1172
  </tr>
@@ -1176,11 +1184,11 @@ function sb_instagram_settings_page() {
1176
 
1177
 
1178
  <hr />
1179
- <h3><?php _e('Lightbox Comments'); ?></h3>
1180
 
1181
  <p style="padding-bottom: 18px;">
1182
- <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to enable Comments</a><br />
1183
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a>
1184
  </p>
1185
 
1186
  <div class="sbi-pro-options" style="margin-top: -15px;">
@@ -1188,21 +1196,21 @@ function sb_instagram_settings_page() {
1188
  <tbody>
1189
 
1190
  <tr valign="top" class="sbi_pro">
1191
- <th scope="row"><label><?php _e('Show Comments in Lightbox'); ?></label></th>
1192
  <td style="padding: 5px 10px 0 10px;">
1193
  <input type="checkbox" disabled style="margin-right: 15px;" />
1194
- <input class="button-secondary" style="margin-top: -5px;" disabled value="<?php esc_attr_e( 'Clear Comment Cache' ); ?>" />
1195
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
1196
- <p class="sbi_tooltip"><?php _e("This will remove the cached comments saved in the database"); ?></p>
1197
  </td>
1198
  </tr>
1199
  <tr valign="top" class="sbi_pro">
1200
- <th scope="row"><label><?php _e('Number of Comments'); ?></label></th>
1201
  <td>
1202
  <input name="sb_instagram_num_comments" type="text" disabled size="4" />
1203
- <span class="sbi_note"><?php _e('Max number of latest comments.'); ?></span>
1204
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
1205
- <p class="sbi_tooltip"><?php _e("This is the maximum number of comments that will be shown in the lightbox. If there are more comments available than the number set, only the latest comments will be shown"); ?></p>
1206
  </td>
1207
  </tr>
1208
 
@@ -1288,8 +1296,8 @@ function sb_instagram_settings_page() {
1288
  <h3><?php _e('Post Filtering', 'instagram-feed'); ?></h3>
1289
 
1290
  <p style="padding-bottom: 18px;">
1291
- <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to enable Post Filtering options</a><br />
1292
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a>
1293
  </p>
1294
 
1295
  <div class="sbi-pro-options" style="margin-top: -15px;">
@@ -1300,9 +1308,9 @@ function sb_instagram_settings_page() {
1300
  <th scope="row"><label><?php _e('Remove photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
1301
  <td>
1302
  <div class="sb_instagram_apply_labels">
1303
- <p>Apply to:</p>
1304
- <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label>All feeds</label>
1305
- <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label>One feed</label>
1306
  </div>
1307
 
1308
  <input disabled name="sb_instagram_exclude_words" id="sb_instagram_exclude_words" type="text" style="width: 70%;" value="" />
@@ -1317,9 +1325,9 @@ function sb_instagram_settings_page() {
1317
  <th scope="row"><label><?php _e('Show photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
1318
  <td>
1319
  <div class="sb_instagram_apply_labels">
1320
- <p>Apply to:</p>
1321
- <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label>All feeds</label>
1322
- <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label>One feed</label>
1323
  </div>
1324
 
1325
  <input disabled name="sb_instagram_include_words" id="sb_instagram_include_words" type="text" style="width: 70%;" value="" />
@@ -1338,44 +1346,44 @@ function sb_instagram_settings_page() {
1338
  <h3><?php _e('Moderation', 'instagram-feed'); ?></h3>
1339
 
1340
  <p style="padding-bottom: 18px;">
1341
- <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to enable Moderation options</a><br />
1342
- <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> Show Pro Options</a>
1343
  </p>
1344
 
1345
  <div class="sbi-pro-options" style="margin-top: -15px;">
1346
  <table class="form-table">
1347
  <tbody>
1348
  <tr valign="top" class="sbi_pro">
1349
- <th scope="row"><label><?php _e('Moderation Type'); ?></label></th>
1350
  <td>
1351
- <input class="sb_instagram_moderation_mode" checked="checked" disabled type="radio" value="visual" style="margin-top: 0;" /><label>Visual</label>
1352
- <input class="sb_instagram_moderation_mode" disabled type="radio" value="manual" style="margin-top: 0; margin-left: 10px;"/><label>Manual</label>
1353
 
1354
- <p class="sbi_tooltip" style="display: block;"><?php _e("<b>Visual Moderation Mode</b><br />This adds a button to each feed that will allow you to hide posts, block users, and create white lists from the front end using a visual interface. Visit <a href='https://smashballoon.com/guide-to-moderation-mode/' target='_blank'>this page</a> for details"); ?></p>
1355
 
1356
  </td>
1357
  </tr>
1358
 
1359
  <tr valign="top" class="sbi_pro">
1360
- <th scope="row"><label><?php _e('Only show posts by these users'); ?></label></th>
1361
  <td>
1362
  <input type="text" style="width: 70%;" disabled /><br />
1363
- <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate usernames using commas'); ?></span>
1364
 
1365
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a>
1366
- <p class="sbi_tooltip"><?php _e("You can use this setting to show photos only from certain users in your feed. Just enter the usernames here which you want to show. Separate multiple usernames using commas."); ?></p>
1367
  </td>
1368
  </tr>
1369
  <tr valign="top" class="sbi_pro">
1370
- <th scope="row"><label><?php _e('White lists'); ?></label></th>
1371
  <td>
1372
  <div class="sbi_white_list_names_wrapper">
1373
- <?php _e("No white lists currently created"); ?>
1374
  </div>
1375
 
1376
- <input disabled class="button-secondary" type="submit" value="<?php esc_attr_e( 'Clear White Lists' ); ?>" />
1377
- &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);" style="display: inline-block; margin-top: 5px;"><?php _e("What is this?"); ?></a>
1378
- <p class="sbi_tooltip"><?php _e("This will remove all of the white lists from the database"); ?></p>
1379
  </td>
1380
  </tr>
1381
 
@@ -1430,16 +1438,16 @@ function sb_instagram_settings_page() {
1430
  <td>
1431
  <input type="checkbox" name="check_api" id="sb_instagram_check_api" <?php if($check_api == true) echo 'checked="checked"' ?> />
1432
  <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
1433
- <p class="sbi_tooltip"><?php _e("If your site uses caching, minification, or JavaScript concatenation, this option can help prevent missing cache problems with the feed."); ?></p>
1434
  </td>
1435
  </tr>
1436
  <tr valign="top">
1437
  <th><label><?php _e("Enable Backup Caching", 'instagram-feed'); ?></label></th>
1438
  <td class="sbi-customize-tab-opt">
1439
  <input name="sb_instagram_backup" type="checkbox" id="sb_instagram_backup" <?php if($sb_instagram_backup == true) echo "checked"; ?> />
1440
- <input id="sbi_clear_backups" class="button-secondary" type="submit" style="position: relative; top: -4px;" value="<?php esc_attr_e( 'Clear Backup Cache' ); ?>" />
1441
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
1442
- <p class="sbi_tooltip"><?php _e('Every feed will save a duplicate version of itself in the database to be used if the normal cache is not available.'); ?></p>
1443
  </td>
1444
  </tr>
1445
  <tr>
@@ -1448,13 +1456,13 @@ function sb_instagram_settings_page() {
1448
  </th>
1449
  <td>
1450
  <select name="sb_instagram_cron">
1451
- <option value="unset" <?php if($sb_instagram_cron == "unset") echo 'selected="selected"' ?> ><?php _e(' - '); ?></option>
1452
- <option value="yes" <?php if($sb_instagram_cron == "yes") echo 'selected="selected"' ?> ><?php _e('Yes'); ?></option>
1453
- <option value="no" <?php if($sb_instagram_cron == "no") echo 'selected="selected"' ?> ><?php _e('No'); ?></option>
1454
  </select>
1455
 
1456
  <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1457
- <p class="sbi_tooltip"><?php _e("If you're experiencing an issue with the plugin not auto-updating then you can set this to 'Yes' to run a scheduled event behind the scenes which forces the plugin cache to clear on a regular basis and retrieve new data from Instagram."); ?></p>
1458
  </td>
1459
  </tr>
1460
  </tbody>
@@ -1472,10 +1480,10 @@ function sb_instagram_settings_page() {
1472
  <td>
1473
  <select name="sbi_font_method" id="sbi_font_method" class="default-text">
1474
  <option value="svg" id="sbi-font_method" class="default-text" <?php if($sbi_font_method == 'svg') echo 'selected="selected"' ?>>SVG</option>
1475
- <option value="fontfile" id="sbi-font_method" class="default-text" <?php if($sbi_font_method == 'fontfile') echo 'selected="selected"' ?>><?php _e("Font File"); ?></option>
1476
  </select>
1477
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
1478
- <p class="sbi_tooltip"><?php _e("This plugin uses SVGs for all icons in the feed. Use this setting to switch to font icons."); ?></p>
1479
  </td>
1480
  </tr>
1481
  </tbody>
@@ -1487,7 +1495,7 @@ function sb_instagram_settings_page() {
1487
 
1488
  <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php _e('Next Step: <a href="?page=sb-instagram-feed&tab=display">Display your Feed</a>', 'instagram-feed'); ?></p>
1489
 
1490
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
1491
 
1492
 
1493
  <?php } //End Customize tab ?>
@@ -1521,11 +1529,6 @@ function sb_instagram_settings_page() {
1521
  </tr>
1522
 
1523
  <tr class="sbi_table_header"><td colspan=3><?php _e("Configure Options", 'instagram-feed'); ?></td></tr>
1524
- <tr>
1525
- <td>accesstoken</td>
1526
- <td><?php _e('Your Instagram Access Token. Separate multiple using commas.', 'instagram-feed'); ?></td>
1527
- <td><code>[instagram-feed accesstoken="XXXXXXXXXX"]</code></td>
1528
- </tr>
1529
  <tr class="sbi_pro">
1530
  <td>type</td>
1531
  <td><?php _e("Display photos from a User ID (user)<br />Display posts from a Hashtag (hashtag)", 'instagram-feed'); ?></td>
@@ -1585,7 +1588,7 @@ function sb_instagram_settings_page() {
1585
  <td><?php _e("The number of photos to display initially. Maximum is 33.", 'instagram-feed'); ?></td>
1586
  <td><code>[instagram-feed num=10]</code></td>
1587
  </tr>
1588
- <tr>
1589
  <td>nummobile</td>
1590
  <td><?php _e("The number of photos to display initially for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
1591
  <td><code>[instagram-feed nummobile=6]</code></td>
@@ -1595,7 +1598,7 @@ function sb_instagram_settings_page() {
1595
  <td><?php _e("The number of columns in your feed. 1 - 10.", 'instagram-feed'); ?></td>
1596
  <td><code>[instagram-feed cols=5]</code></td>
1597
  </tr>
1598
- <tr>
1599
  <td>colsmobile</td>
1600
  <td><?php _e("The number of columns in your feed for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
1601
  <td><code>[instagram-feed colsmobile=2]</code></td>
@@ -1862,7 +1865,7 @@ function sb_instagram_settings_page() {
1862
  </tbody>
1863
  </table>
1864
 
1865
- <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
1866
 
1867
  <?php } //End Display tab ?>
1868
 
@@ -1872,20 +1875,20 @@ function sb_instagram_settings_page() {
1872
  <div class="sbi_support">
1873
 
1874
  <br/>
1875
- <h3 style="padding-bottom: 10px;">Need help?</h3>
1876
 
1877
  <p>
1878
  <span class="sbi-support-title"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <a
1879
- href="https://smashballoon.com/instagram-feed/free/"
1880
  target="_blank"><?php _e( 'Setup Directions' ); ?></a></span>
1881
- <?php _e( 'A step-by-step guide on how to setup and use the plugin.' ); ?>
1882
  </p>
1883
 
1884
  <p>
1885
  <span class="sbi-support-title"><i class="fa fa-youtube-play" aria-hidden="true"></i>&nbsp; <a
1886
  href="https://www.youtube.com/embed/q6ZXVU4g970" target="_blank"
1887
- id="sbi-play-support-video"><?php _e( 'Watch a Video' ); ?></a></span>
1888
- <?php _e( "Watch a short video demonstrating how to set up, customize and use the plugin.<br /><b>Please note</b> that the video shows the set up and use of the <b><a href='https://smashballoon.com/instagram-feed/' target='_blank'>Pro version</a></b> of the plugin, but the process is the same for this free version. The only difference is some of the features available." ); ?>
1889
 
1890
  <iframe id="sbi-support-video"
1891
  src="//www.youtube.com/embed/q6ZXVU4g970?theme=light&amp;showinfo=0&amp;controls=2" width="960"
@@ -1894,39 +1897,39 @@ function sb_instagram_settings_page() {
1894
 
1895
  <p>
1896
  <span class="sbi-support-title"><i class="fa fa-question-circle" aria-hidden="true"></i>&nbsp; <a
1897
- href="https://smashballoon.com/instagram-feed/support/faq/"
1898
- target="_blank"><?php _e( 'FAQs and Docs' ); ?></a></span>
1899
- <?php _e( 'View our expansive library of FAQs and documentation to help solve your problem as quickly as possible.' ); ?>
1900
  </p>
1901
 
1902
  <div class="sbi-support-faqs">
1903
 
1904
  <ul>
1905
  <li><b>FAQs</b></li>
1906
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-photos-wont-load/" target="_blank">My Instagram Feed Won\'t Load</a>' ); ?></li>
1907
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-instagram-access-token-keep-expiring/" target="_blank">My Access Token Keeps Expiring</a>' ); ?></li>
1908
- <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/instagram-feed/support/faq/" target="_blank">See All<i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
1909
  </ul>
1910
 
1911
  <ul>
1912
- <li><b>Documentation</b></li>
1913
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed/free" target="_blank">Installation and Configuration</a>' ); ?></li>
1914
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/display-multiple-instagram-feeds/" target="_blank">Displaying multiple feeds</a>' ); ?></li>
1915
- <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed-faq/customization/" target="_blank">Customizing your Feed</a>' ); ?></li>
1916
  </ul>
1917
  </div>
1918
 
1919
  <p>
1920
  <span class="sbi-support-title"><i class="fa fa-envelope" aria-hidden="true"></i>&nbsp; <a
1921
- href="https://smashballoon.com/instagram-feed/support/"
1922
- target="_blank"><?php _e( 'Request Support' ); ?></a></span>
1923
- <?php _e( 'Still need help? Submit a ticket and one of our support experts will get back to you as soon as possible.<br /><b>Important:</b> Please include your <b>System Info</b> below with all support requests.' ); ?>
1924
  </p>
1925
  </div>
1926
 
1927
  <hr />
1928
 
1929
- <h3><?php _e('System Info &nbsp; <i style="color: #666; font-size: 11px; font-weight: normal;">Click the text below to select all</i>'); ?></h3>
1930
 
1931
 
1932
 
@@ -2042,7 +2045,7 @@ var_export($sb_expired_tokens);
2042
  <p>Find out how to display <a href="?page=sb-instagram-feed&amp;tab=display">multiple feeds</a>.</p>
2043
  </div>
2044
 
2045
- <a href="https://smashballoon.com/instagram-feed/demo" target="_blank" class="sbi-pro-notice">
2046
  <img src="<?php echo plugins_url( 'img/instagram-pro-promo.png' , __FILE__ ) ?>" alt="<?php esc_attr_e( 'Instagram Feed Pro', 'instagram-feed' ); ?>">
2047
  </a>
2048
 
@@ -2451,4 +2454,4 @@ $notice_status = get_option( $option, false );
2451
  // only display the notice if the time offset has passed and the user hasn't already dismissed it
2452
  if ( get_transient( $transient ) !== 'waiting' && $notice_status !== 'dismissed' ) {
2453
  add_action( 'admin_notices', 'sbi_rating_notice_html' );
2454
- }
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
+ function sbi_add_caps() {
5
+ global $wp_roles;
6
+ $wp_roles->add_cap( 'administrator', 'manage_instagram_feed_options' );
7
+ }
8
+ add_action( 'admin_init', 'sbi_add_caps' );
9
+
10
  function sb_instagram_menu() {
11
+ $cap = current_user_can( 'manage_instagram_feed_options' ) ? 'manage_instagram_feed_options' : 'manage_options';
12
+
13
  add_menu_page(
14
  __( 'Instagram Feed', 'instagram-feed' ),
15
  __( 'Instagram Feed', 'instagram-feed' ),
16
+ $cap,
17
  'sb-instagram-feed',
18
  'sb_instagram_settings_page'
19
  );
21
  'sb-instagram-feed',
22
  __( 'Settings', 'instagram-feed' ),
23
  __( 'Settings', 'instagram-feed' ),
24
+ $cap,
25
  'sb-instagram-feed',
26
  'sb_instagram_settings_page'
27
  );
372
  <div id="sbi_config">
373
  <!-- <a href="https://instagram.com/oauth/authorize/?client_id=1654d0c81ad04754a898d89315bec227&redirect_uri=https://smashballoon.com/instagram-feed/instagram-token-plugin/?return_uri=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>&response_type=token" class="sbi_admin_btn"><?php _e( 'Log in and get my Access Token and User ID', 'instagram-feed' ); ?></a> -->
374
  <a href="https://instagram.com/oauth/authorize/?client_id=3a81a9fa2a064751b8c31385b91cc25c&scope=basic+public_content&redirect_uri=https://api.smashballoon.com/instagram-plugin-token.php?return_uri=<?php echo admin_url('admin.php?page=sb-instagram-feed'); ?>&response_type=token&state=<?php echo admin_url('admin.php?page-sb-instagram-feed'); ?>" class="sbi_admin_btn"><i class="fa fa-user-plus" aria-hidden="true" style="font-size: 20px;"></i>&nbsp; <?php _e( 'Connect an Instagram Account', 'instagram-feed' ); ?></a>
375
+ <a href="https://smashballoon.com/instagram-feed/token/?utm_source=plugin-free&utm_campaign=sbi" target="_blank" style="position: relative; top: 14px; left: 15px;"><?php _e( 'Button not working?', 'instagram-feed' ); ?></a>
376
  </div>
377
 
378
  <!-- Old Access Token -->
393
  ?>
394
 
395
  <tr valign="top">
396
+ <th scope="row"><label><?php _e( 'Instagram Accounts', 'instagram-feed' ); ?></label><span style="font-weight:normal; font-style:italic; font-size: 12px; display: block;"><?php _e( 'Use the button above to connect an Instagram account', 'instagram-feed' ); ?></span></th>
397
  <td class="sbi_connected_accounts_wrap">
398
  <?php if ( empty( $connected_accounts ) ) : ?>
399
  <p class="sbi_no_accounts"><?php _e( 'No Instagram accounts connected. Click the button above to connect an account.', 'instagram-feed' ); ?></p><br />
428
  <a href="JavaScript:void(0);" class="sbi_remove_from_user_feed button-primary"><i class="fa fa-minus-circle" aria-hidden="true"></i><?php _e( 'Remove from Primary Feed', 'instagram-feed' ); ?></a>
429
  <?php endif; ?>
430
  <a class="sbi_ca_token_shortcode button-secondary" href="JavaScript:void(0);"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i><?php _e( 'Add to another Feed', 'instagram-feed' ); ?></a>
431
+ <p class="sbi_ca_show_token"><input type="checkbox" id="sbi_ca_show_token_<?php esc_attr_e( $account['user_id'] ); ?>" /><label for="sbi_ca_show_token_<?php esc_attr_e( $account['user_id'] ); ?>"><?php _e( 'Show Access Token', 'instagram-feed' ); ?></label></p>
432
 
433
  </div>
434
 
435
  <div class="sbi_ca_shortcode">
436
 
437
+ <p><?php _e( 'Copy and paste this shortcode into your page or widget area:', 'instagram-feed' ); ?><br>
438
  <?php if ( !empty( $account['username'] ) ) : ?>
439
  <code>[instagram-feed user="<?php echo $account['username']; ?>"]</code>
440
  <?php else : ?>
442
  <?php endif; ?>
443
  </p>
444
 
445
+ <p><?php _e( 'To add multiple users in the same feed, simply separate them using commas:', 'instagram-feed' ); ?><br>
446
  <?php if ( !empty( $account['username'] ) ) : ?>
447
  <code>[instagram-feed user="<?php echo $account['username']; ?>, a_second_user, a_third_user"]</code>
448
  <?php else : ?>
449
  <code>[instagram-feed accesstoken="<?php echo $account['access_token']; ?>, another_access_token"]</code>
450
  <?php endif; ?>
451
 
452
+ <p><?php _e( 'Click on the <a href="?page=sb-instagram-feed&tab=display" target="_blank">Display Your Feed</a> tab to learn more about shortcodes', 'instagram-feed' ); ?></p>
453
  </div>
454
 
455
  <div class="sbi_ca_accesstoken">
456
+ <span class="sbi_ca_token_label"><?php _e( 'Access Token:', 'instagram-feed' ); ?></span><input type="text" class="sbi_ca_token" value="<?php echo $account['access_token']; ?>" readonly="readonly" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).">
457
  </div>
458
 
459
  </div>
464
  <?php endif; ?>
465
  <a href="JavaScript:void(0);" class="sbi_manually_connect button-secondary"><?php _e( 'Manually Connect an Account', 'instagram-feed' ); ?></a>
466
  <div class="sbi_manually_connect_wrap">
467
+ <input name="sb_manual_at" id="sb_manual_at" type="text" value="" style="margin-top: 4px; padding: 5px 9px; margin-left: 0px;" size="64" maxlength="100" placeholder="<?php _e( 'Enter a valid Instagram Access Token', 'instagram-feed' ); ?>" />
468
+ <p class="sbi_submit" style="display: inline-block;"><button name="submit" id="sbi_manual_submit" class="button button-primary"><?php _e( 'Connect This Account', 'instagram-feed' ); ?></button></p>
469
  </div>
470
  </td>
471
  </tr>
498
  </div>
499
 
500
  <?php if ( empty( $user_feed_ids ) ) : ?>
501
+ <p class="sbi_no_accounts" style="margin-top: -3px; margin-right: 10px;"><?php _e( 'Connect a user account above', 'instagram-feed' ); ?></p>
502
  <?php endif; ?>
503
 
504
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);" style="margin: 5px 0 10px 0; display: inline-block; height: 19px;"><?php _e("How to display User feeds", 'instagram-feed' ); ?></a>
505
  <div class="sbi_tooltip"><?php _e("<p><b>Displaying Posts from Your User Account</b><br />Simply connect an account using the button above.</p><p style='padding-top:8px;'><b>Displaying Posts from Other Instagram Accounts</b><br />Due to recent changes in the Instagram API it is no longer possible to display photos from other Instagram accounts which you do not have access to. You can only display the user feed of an account which you connect above. You can connect as many account as you like by logging in using the button above, or manually copy/pasting an Access Token by selecting the 'Manually Connect an Account' option.</p><p style='padding-top:10px;'><b>Multiple Acounts</b><br />It is only possible to display feeds from Instagram accounts which you own. In order to display feeds from multiple accounts, first connect them above and then use the buttons to add the account either to your primary feed or to another feed on your site.</p>", 'instagram-feed'); ?></div><br />
506
  </div>
507
 
514
  </div>
515
  <div class="sbi_col sbi_two">
516
 
517
+ <p class="sbi_pro_tooltip"><?php _e( 'Upgrade to the Pro version to display hashtag feeds', 'instagram-feed' ); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
518
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i>Pro</a>
519
 
520
  <input readonly type="text" size="25" style="height: 32px; top: -2px; position: relative; box-shadow: none;" />
521
  &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
528
  <br>
529
  <a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);" style="margin-left: 0;"><i class="fa fa-question-circle" aria-hidden="true" style="margin-right: 6px;"></i><?php _e('Combine multiple feed types into a single feed', 'instagram-feed'); ?></a>
530
  <p class="sbi_tooltip">
531
+ <b><?php _e( 'Please note: this is only available in the <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank">Pro version</a>', 'instagram-feed' ); ?>.</b><br />
532
  <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add each user name or hashtag of each feed into the shortcode, like so: %s. This will combine a user feed and a hashtag feed into the same feed.', 'instagram-feed'), 'type="mixed"', '<code>[instagram-feed type="mixed" user="smashballoon" hashtag="#awesomeplugins"]</code>' ); ?>
533
  </p>
534
  </div>
547
  </tr>
548
 
549
  <tr valign="top">
550
+ <th scope="row"><label><?php _e('Check for new posts every', 'instagram-feed'); ?></label></th>
551
  <td>
552
  <input name="sb_instagram_cache_time" type="text" value="<?php esc_attr_e( $sb_instagram_cache_time ); ?>" size="4" />
553
  <select name="sb_instagram_cache_time_unit">
554
+ <option value="minutes" <?php if($sb_instagram_cache_time_unit == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes', 'instagram-feed'); ?></option>
555
+ <option value="hours" <?php if($sb_instagram_cache_time_unit == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'instagram-feed'); ?></option>
556
+ <option value="days" <?php if($sb_instagram_cache_time_unit == "days") echo 'selected="selected"' ?> ><?php _e('Days', 'instagram-feed'); ?></option>
557
  </select>
558
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
559
+ <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>
560
  </td>
561
  </tr>
562
  </tbody>
567
 
568
  <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php _e('Next Step: <a href="?page=sb-instagram-feed&tab=customize">Customize your Feed</a>', 'instagram-feed'); ?></p>
569
 
570
+ <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/?utm_source=plugin-free&utm_campaign=sbi" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
571
 
572
 
573
  <?php } // End Configure tab ?>
661
  </div>
662
  <?php endforeach; ?>
663
 
664
+ <p class="sbi_pro_tooltip"><?php _e('Upgrade to the Pro version to unlock these layouts', 'instagram-feed'); ?><i class="fa fa-caret-down" aria-hidden="true"></i></p>
665
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i><?php _e('Pro', 'instagram-feed'); ?></a>
666
 
667
  </div>
668
  <div class="sb_layout_options_wrap sbi_pro">
669
  <a href="JavaScript:void(0);" class="sbi_close_options"><i class="fa fa-close"></i></a>
670
  <div class="sb_instagram_layout_settings sbi_layout_type_grid">
671
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('A uniform grid of square-cropped images.', 'instagram-feed'); ?></span>
672
  </div>
673
  <div class="sb_instagram_layout_settings sbi_layout_type_masonry">
674
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Images in their original aspect ratios with no vertical space between posts.', 'instagram-feed'); ?></span>
675
  </div>
676
  <div class="sb_instagram_layout_settings sbi_layout_type_carousel">
677
  <div class="sb_instagram_layout_setting">
678
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Posts are displayed in a slideshow carousel.', 'instagram-feed'); ?></span>
679
  </div>
680
  <div class="sb_instagram_layout_setting">
681
 
682
+ <label><?php _e('Number of Rows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselrows
683
  Eg: carouselrows=2</code>
684
  <br>
685
+ <span class="sbi_note" style="margin: -5px 0 -10px 0; display: block;"><?php _e('Use the "Number of Columns" setting below this section to set how many posts are visible in the carousel at a given time.', 'instagram-feed'); ?></span>
686
  <br>
687
  <select name="sb_instagram_carousel_rows" id="sb_instagram_carousel_rows">
688
  <option value="1">1</option>
690
  </select>
691
  </div>
692
  <div class="sb_instagram_layout_setting">
693
+ <label><?php _e('Loop Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselloop
694
  Eg: carouselloop=rewind
695
  carouselloop=infinity</code>
696
  <br>
697
  <select name="sb_instagram_carousel_loop" id="sb_instagram_carousel_loop">
698
+ <option value="rewind"><?php _e('Rewind', 'instagram-feed'); ?></option>
699
+ <option value="infinity" selected="selected"><?php _e('Infinity', 'instagram-feed'); ?></option>
700
  </select>
701
  </div>
702
  <div class="sb_instagram_layout_setting">
703
  <input type="checkbox" name="sb_instagram_carousel_arrows" id="sb_instagram_carousel_arrows" checked="checked">
704
+ <label><?php _e('Show Navigation Arrows', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselarrows
705
  Eg: carouselarrows=true</code>
706
  </div>
707
  <div class="sb_instagram_layout_setting">
708
  <input type="checkbox" name="sb_instagram_carousel_pag" id="sb_instagram_carousel_pag">
709
+ <label><?php _e('Show Pagination', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselpag
710
  Eg: carouselpag=true</code>
711
  </div>
712
  <div class="sb_instagram_layout_setting">
713
  <input type="checkbox" name="sb_instagram_carousel_autoplay" id="sb_instagram_carousel_autoplay">
714
+ <label><?php _e('Enable Autoplay', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouselautoplay
715
  Eg: carouselautoplay=true</code>
716
  </div>
717
  <div class="sb_instagram_layout_setting">
718
+ <label><?php _e('Interval Time', 'instagram-feed'); ?></label><code class="sbi_shortcode"> carouseltime
719
  Eg: carouseltime=8000</code>
720
  <br>
721
  <input name="sb_instagram_carousel_interval" type="text" value="5000" size="6">miliseconds </div>
723
 
724
  <div class="sb_instagram_layout_settings sbi_layout_type_highlight">
725
  <div class="sb_instagram_layout_setting">
726
+ <i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="sbi_note" style="margin-left: 0;"><?php _e('Masonry style, square-cropped, image only (no captions or likes/comments below image). "Highlighted" posts are twice as large.', 'instagram-feed'); ?></span>
727
  </div>
728
  <div class="sb_instagram_layout_setting">
729
+ <label title="Click for shortcode option"><?php _e('Highlighting Type', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlighttype
730
  Eg: highlighttype=pattern</code>
731
  <br>
732
  <select name="sb_instagram_highlight_type" id="sb_instagram_highlight_type">
733
+ <option value="pattern" selected="selected"><?php _e('Pattern', 'instagram-feed'); ?></option>
734
+ <option value="id"><?php _e('Post ID', 'instagram-feed'); ?></option>
735
+ <option value="hashtag"><?php _e('Hashtag', 'instagram-feed'); ?></option>
736
  </select>
737
  </div>
738
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
739
+ <label></label><code class="sbi_shortcode"> highlightoffset
740
  Eg: highlightoffset=2</code>
741
  <br>
742
  <input name="sb_instagram_highlight_offset" type="number" min="0" value="0" style="width: 50px;">
743
  </div>
744
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
745
+ <label><?php _e('Pattern', 'instagram-feed'); ?></label><code class="sbi_shortcode"> highlightpattern
746
  Eg: highlightpattern=3</code>
747
  <br>
748
+ <span><?php _e('Highlight every', 'instagram-feed'); ?></span><input name="sb_instagram_highlight_factor" type="number" min="2" value="6" style="width: 50px;"><span><?php _e('posts', 'instagram-feed'); ?></span>
749
  </div>
750
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_hashtag sb_instagram_layout_setting" style="display: none;">
751
+ <label><?php _e('Highlight Posts with these Hashtags', 'instagram-feed'); ?></label>
752
+ <input name="sb_instagram_highlight_hashtag" id="sb_instagram_highlight_hashtag" type="text" size="40" value="#fishing">&nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is this?', 'instagram-feed'); ?></a>
753
  <br>
754
+ <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate multiple hashtags using commas', 'instagram-feed'); ?></span>
755
 
756
 
757
+ <p class="sbi_tooltip"><?php _e('You can use this setting to highlight posts by a hashtag. Use a specified hashtag in your posts and they will be automatically highlighted in your feed.', 'instagram-feed'); ?></p>
758
  </div>
759
  <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_ids sb_instagram_layout_setting" style="display: none;">
760
+ <label><?php _e('Highlight Posts by ID', 'instagram-feed'); ?></label>
761
  <textarea name="sb_instagram_highlight_ids" id="sb_instagram_highlight_ids" style="width: 100%;" rows="3">sbi_1852317219231323590_3269008872</textarea>
762
  <br>
763
+ <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate IDs using commas', 'instagram-feed'); ?></span>
764
 
765
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What is this?', 'instagram-feed'); ?></a>
766
+ <p class="sbi_tooltip"><?php _e('You can use this setting to highlight posts by their ID. Enable and use "moderation mode", check the box to show post IDs underneath posts, then copy and paste IDs into this text box.', 'instagram-feed'); ?></p>
767
  </div>
768
  </div>
769
 
857
  </tbody>
858
  </table>
859
 
860
+ <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a></span>
861
 
862
  <div class="sbi-pro-options">
863
  <p class="sbi-upgrade-link">
864
+ <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
865
  </p>
866
  <table class="form-table">
867
  <tbody>
868
  <tr valign="top" class="sbi_pro">
869
+ <th scope="row"><label><?php _e('Media Type to Display','instagram-feed'); ?></label></th>
870
  <td>
871
  <select name="sb_instagram_media_type" disabled>
872
+ <option value="all"><?php _e('All','instagram-feed'); ?></option>
873
+ <option value="photos"><?php _e('Photos only','instagram-feed'); ?></option>
874
+ <option value="videos"><?php _e('Videos only','instagram-feed'); ?></option>
875
  </select>
876
  </td>
877
  </tr>
884
  </tr>
885
 
886
  <tr valign="top" class="sbi_pro">
887
+ <th scope="row"><label><?php _e("Link Posts to URL in Caption (Shoppable feed)",'instagram-feed'); ?></label></th>
888
  <td>
889
  <input type="checkbox" name="sb_instagram_captionlinks" id="sb_instagram_captionlinks" disabled />
890
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e("What will this do?",'instagram-feed'); ?></a>
891
+ <p class="sbi_tooltip"><?php _e("Checking this box will change the link for each post to any url included in the caption for that Instagram post. The lightbox will be disabled. Visit <a href='https://smashballoon.com/make-a-shoppable-feed?utm_source=plugin-free&utm_campaign=sbi'>this link</a> to learn how this works.",'instagram-feed'); ?></p>
892
  </td>
893
  </tr>
894
  </tbody>
897
 
898
 
899
  <hr />
900
+ <h3><?php _e('Photo Hover Style','instagram-feed'); ?></h3>
901
 
902
  <p style="padding-bottom: 18px;">
903
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e('Upgrade to Pro to enable Photo Hover styles','instagram-feed'); ?></a><br />
904
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options','instagram-feed'); ?></a>
905
  </p>
906
 
907
  <div class="sbi-pro-options" style="margin-top: -15px;">
908
  <table class="form-table">
909
  <tbody>
910
  <tr valign="top" class="sbi_pro">
911
+ <th scope="row"><label><?php _e('Hover Background Color', 'instagram-feed'); ?></label></th>
912
  <td>
913
  <input name="sb_hover_background" type="text" disabled class="sbi_colorpick" />
914
  </td>
915
  </tr>
916
  <tr valign="top" class="sbi_pro">
917
+ <th scope="row"><label><?php _e('Hover Text Color', 'instagram-feed'); ?></label></th>
918
  <td>
919
  <input name="sb_hover_text" type="text" disabled class="sbi_colorpick" />
920
  </td>
921
  </tr>
922
  <tr valign="top" class="sbi_pro">
923
+ <th scope="row"><label><?php _e('Information to display', 'instagram-feed'); ?></label></th>
924
  <td>
925
  <div>
926
  <input name="sbi_hover_inc_username" type="checkbox" disabled />
927
+ <label for="sbi_hover_inc_username"><?php _e('Username', 'instagram-feed'); ?></label>
928
  </div>
929
  <div>
930
  <input name="sbi_hover_inc_icon" type="checkbox" disabled />
931
+ <label for="sbi_hover_inc_icon"><?php _e('Expand Icon', 'instagram-feed'); ?></label>
932
  </div>
933
  <div>
934
  <input name="sbi_hover_inc_date" type="checkbox" disabled />
935
+ <label for="sbi_hover_inc_date"><?php _e('Date', 'instagram-feed'); ?></label>
936
  </div>
937
  <div>
938
  <input name="sbi_hover_inc_instagram" type="checkbox" disabled />
939
+ <label for="sbi_hover_inc_instagram"><?php _e('Instagram Icon/Link', 'instagram-feed'); ?></label>
940
  </div>
941
  <div>
942
  <input name="sbi_hover_inc_location" type="checkbox" disabled />
943
+ <label for="sbi_hover_inc_location"><?php _e('Location', 'instagram-feed'); ?></label>
944
  </div>
945
  <div>
946
  <input name="sbi_hover_inc_caption" type="checkbox" disabled />
947
+ <label for="sbi_hover_inc_caption"><?php _e('Caption', 'instagram-feed'); ?></label>
948
  </div>
949
  <div>
950
  <input name="sbi_hover_inc_likes" type="checkbox" disabled />
951
+ <label for="sbi_hover_inc_likes"><?php _e('Like/Comment Icons', 'instagram-feed'); ?></label>
952
  </div>
953
  </td>
954
  </tr>
961
  <hr />
962
  <h3><?php _e( 'Carousel', 'instagram-feed' ); ?></h3>
963
  <p style="padding-bottom: 18px;">
964
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e('Upgrade to Pro to enable Carousels', 'instagram-feed'); ?></a><br />
965
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
966
  </p>
967
 
968
  <div class="sbi-pro-options" style="margin-top: -15px;">
972
  <th scope="row"><label><?php _e("Enable Carousel"); ?></label></th>
973
  <td>
974
  <input type="checkbox" disabled />
975
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
976
+ <p class="sbi_tooltip"><?php _e("Enable this setting to create a carousel slider out of your photos.", 'instagram-feed'); ?></p>
977
  </td>
978
  </tr>
979
  <tr valign="top" class="sbi_pro">
980
+ <th scope="row"><label><?php _e("Show Navigation Arrows", 'instagram-feed'); ?></label></th>
981
  <td>
982
  <input type="checkbox" disabled />
983
  </td>
984
  </tr>
985
  <tr valign="top" class="sbi_pro">
986
+ <th scope="row"><label><?php _e("Show Pagination", 'instagram-feed'); ?></label></th>
987
  <td>
988
  <input type="checkbox" disabled />
989
  </td>
990
  </tr>
991
  <tr valign="top" class="sbi_pro">
992
+ <th scope="row"><label><?php _e("Enable Autoplay", 'instagram-feed'); ?></label></th>
993
  <td>
994
  <input type="checkbox" disabled />
995
  </td>
996
  </tr>
997
  <tr valign="top" class="sbi_pro">
998
+ <th scope="row"><label><?php _e("Interval Time", 'instagram-feed'); ?></label></th>
999
  <td>
1000
+ <input name="sb_instagram_carousel_interval" type="text" disabled size="6" /><?php _e("miliseconds", 'instagram-feed'); ?>
1001
  </td>
1002
  </tr>
1003
  </tbody>
1029
  </td>
1030
  </tr>
1031
  <tr valign="top">
1032
+ <th scope="row"><label><?php _e("Show Bio Text", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbio
1033
  Eg: showbio=false</code></th>
1034
  <td>
1035
  <?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
1036
  <input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio" <?php if($sb_instagram_show_bio == true) echo 'checked="checked"' ?> />
1037
+ <span class="sbi_note"><?php _e("Only applies for Instagram accounts with bios", 'instagram-feed'); ?></span>
1038
  </td>
1039
  </tr>
1040
  <tr valign="top">
1047
  </tbody>
1048
  </table>
1049
 
1050
+ <span><a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a></span>
1051
 
1052
  <div class="sbi-pro-options">
1053
  <p class="sbi-upgrade-link">
1054
+ <i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e('Upgrade to Pro to enable these settings', 'instagram-feed'); ?></a>
1055
  </p>
1056
  <table class="form-table">
1057
  <tbody>
1058
  <tr valign="top" class="sbi_pro">
1059
+ <th scope="row"><label><?php _e('Header Style','instagram-feed'); ?></label></th>
1060
  <td>
1061
  <select name="sb_instagram_header_style" style="float: left;">
1062
+ <option value="circle"><?php _e('Standard','instagram-feed'); ?></option>
1063
+ <option value="boxed"><?php _e('Boxed','instagram-feed'); ?></option>
1064
+ <option value="centered"><?php _e('Centered','instagram-feed'); ?></option>
1065
  </select>
1066
  </td>
1067
  </tr>
1068
  <tr valign="top" class="sbi_pro">
1069
+ <th scope="row"><label><?php _e("Show Number of Followers",'instagram-feed'); ?></label></th>
1070
  <td>
1071
  <input type="checkbox" disabled />
1072
+ <span class="sbi_note"><?php _e("This only applies when displaying photos from a User ID",'instagram-feed'); ?></span>
1073
  </td>
1074
  </tr>
1075
  </tbody>
1082
  <hr />
1083
  <h3><?php _e("Caption", 'instagram-feed'); ?></h3>
1084
  <p style="padding-bottom: 18px;">
1085
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e("Upgrade to Pro to enable Photo Captions", 'instagram-feed'); ?></a><br />
1086
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e("Show Pro Options", 'instagram-feed'); ?></a>
1087
  </p>
1088
 
1089
  <div class="sbi-pro-options" style="margin-top: -15px;">
1090
  <table class="form-table">
1091
  <tbody>
1092
  <tr valign="top" class="sbi_pro">
1093
+ <th scope="row"><label><?php _e("Show Caption", 'instagram-feed'); ?></label></th>
1094
  <td>
1095
  <input type="checkbox" disabled />
1096
  </td>
1097
  </tr>
1098
  <tr valign="top" class="sbi_pro">
1099
+ <th scope="row"><label><?php _e("Maximum Text Length", 'instagram-feed'); ?></label></th>
1100
  <td>
1101
  <input disabled size="4" />Characters
1102
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1103
+ <p class="sbi_tooltip"><?php _e("The number of characters of text to display in the caption. An elipsis link will be added to allow the user to reveal more text if desired.", 'instagram-feed'); ?></p>
1104
  </td>
1105
  </tr>
1106
  <tr valign="top" class="sbi_pro">
1107
+ <th scope="row"><label><?php _e('Text Color', 'instagram-feed'); ?></label></th>
1108
  <td>
1109
  <input type="text" disabled class="sbi_colorpick" />
1110
  </td>
1111
  </tr>
1112
  <tr valign="top" class="sbi_pro">
1113
+ <th scope="row"><label><?php _e('Text Size', 'instagram-feed'); ?></label></th>
1114
  <td>
1115
  <select name="sb_instagram_caption_size" style="width: 180px;" disabled>
1116
+ <option value="inherit" ><?php _e('Inherit from theme', 'instagram-feed'); ?></option>
1117
+ <option value="10" >10px</option>
1118
+ <option value="11" >11px</option>
1119
+ <option value="12" >12px</option>
1120
+ <option value="13" >13px</option>
1121
+ <option value="14" >14px</option>
1122
+ <option value="16" >16px</option>
1123
+ <option value="18" >18px</option>
1124
+ <option value="20" >20px</option>
1125
+ <option value="24" >24px</option>
1126
+ <option value="28" >28px</option>
1127
+ <option value="32" >32px</option>
1128
+ <option value="36" >36px</option>
1129
+ <option value="40" >40px</option>
1130
  </select>
1131
  </td>
1132
  </tr>
1138
  <hr />
1139
  <h3><?php _e("Likes &amp; Comments", 'instagram-feed'); ?></h3>
1140
  <p style="padding-bottom: 18px;">
1141
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e("Upgrade to Pro to enable Likes &amp; Comments", 'instagram-feed'); ?></a><br />
1142
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e("Show Pro Options", 'instagram-feed'); ?></a>
1143
  </p>
1144
 
1145
  <div class="sbi-pro-options" style="margin-top: -15px;">
1146
  <table class="form-table">
1147
  <tbody>
1148
  <tr valign="top" class="sbi_pro">
1149
+ <th scope="row"><label><?php _e("Show Icons", 'instagram-feed'); ?></label></th>
1150
  <td>
1151
  <input type="checkbox" disabled />
1152
  </td>
1153
  </tr>
1154
  <tr valign="top" class="sbi_pro">
1155
+ <th scope="row"><label><?php _e('Icon Color', 'instagram-feed'); ?></label></th>
1156
  <td>
1157
  <input type="text" disabled class="sbi_colorpick" />
1158
  </td>
1159
  </tr>
1160
  <tr valign="top" class="sbi_pro">
1161
+ <th scope="row"><label><?php _e('Icon Size', 'instagram-feed'); ?></label></th>
1162
  <td>
1163
  <select disabled name="sb_instagram_meta_size" style="width: 180px;">
1164
+ <option value="inherit"><?php _e('Inherit from theme', 'instagram-feed'); ?></option>
1165
+ <option value="10" >10px</option>
1166
+ <option value="11" >11px</option>
1167
+ <option value="12" >12px</option>
1168
+ <option value="13" >13px</option>
1169
+ <option value="14" >14px</option>
1170
+ <option value="16" >16px</option>
1171
+ <option value="18" >18px</option>
1172
+ <option value="20" >20px</option>
1173
+ <option value="24" >24px</option>
1174
+ <option value="28" >28px</option>
1175
+ <option value="32" >32px</option>
1176
+ <option value="36" >36px</option>
1177
+ <option value="40" >40px</option>
1178
  </select>
1179
  </td>
1180
  </tr>
1184
 
1185
 
1186
  <hr />
1187
+ <h3><?php _e('Lightbox Comments', 'instagram-feed'); ?></h3>
1188
 
1189
  <p style="padding-bottom: 18px;">
1190
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e('Upgrade to Pro to enable Comments', 'instagram-feed'); ?></a><br />
1191
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1192
  </p>
1193
 
1194
  <div class="sbi-pro-options" style="margin-top: -15px;">
1196
  <tbody>
1197
 
1198
  <tr valign="top" class="sbi_pro">
1199
+ <th scope="row"><label><?php _e('Show Comments in Lightbox', 'instagram-feed'); ?></label></th>
1200
  <td style="padding: 5px 10px 0 10px;">
1201
  <input type="checkbox" disabled style="margin-right: 15px;" />
1202
+ <input class="button-secondary" style="margin-top: -5px;" disabled value="<?php esc_attr_e( 'Clear Comment Cache', 'instagram-feed' ); ?>" />
1203
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1204
+ <p class="sbi_tooltip"><?php _e("This will remove the cached comments saved in the database", 'instagram-feed'); ?></p>
1205
  </td>
1206
  </tr>
1207
  <tr valign="top" class="sbi_pro">
1208
+ <th scope="row"><label><?php _e('Number of Comments', 'instagram-feed'); ?></label></th>
1209
  <td>
1210
  <input name="sb_instagram_num_comments" type="text" disabled size="4" />
1211
+ <span class="sbi_note"><?php _e('Max number of latest comments.', 'instagram-feed'); ?></span>
1212
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1213
+ <p class="sbi_tooltip"><?php _e("This is the maximum number of comments that will be shown in the lightbox. If there are more comments available than the number set, only the latest comments will be shown", 'instagram-feed'); ?></p>
1214
  </td>
1215
  </tr>
1216
 
1296
  <h3><?php _e('Post Filtering', 'instagram-feed'); ?></h3>
1297
 
1298
  <p style="padding-bottom: 18px;">
1299
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e('Upgrade to Pro to enable Post Filtering options', 'instagram-feed'); ?></a><br />
1300
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?></a>
1301
  </p>
1302
 
1303
  <div class="sbi-pro-options" style="margin-top: -15px;">
1308
  <th scope="row"><label><?php _e('Remove photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
1309
  <td>
1310
  <div class="sb_instagram_apply_labels">
1311
+ <p><?php _e('Apply to:', 'instagram-feed'); ?></p>
1312
+ <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php _e('All feeds', 'instagram-feed'); ?></label>
1313
+ <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php _e('One feed', 'instagram-feed'); ?></label>
1314
  </div>
1315
 
1316
  <input disabled name="sb_instagram_exclude_words" id="sb_instagram_exclude_words" type="text" style="width: 70%;" value="" />
1325
  <th scope="row"><label><?php _e('Show photos containing these words or hashtags', 'instagram-feed'); ?></label></th>
1326
  <td>
1327
  <div class="sb_instagram_apply_labels">
1328
+ <p><?php _e('Apply to:', 'instagram-feed'); ?></p>
1329
+ <input class="sb_instagram_incex_one_all" type="radio" value="all" disabled /><label><?php _e('All feeds', 'instagram-feed'); ?></label>
1330
+ <input class="sb_instagram_incex_one_all" type="radio" value="one" disabled /><label><?php _e('One feed', 'instagram-feed'); ?></label>
1331
  </div>
1332
 
1333
  <input disabled name="sb_instagram_include_words" id="sb_instagram_include_words" type="text" style="width: 70%;" value="" />
1346
  <h3><?php _e('Moderation', 'instagram-feed'); ?></h3>
1347
 
1348
  <p style="padding-bottom: 18px;">
1349
+ <a href="https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e('Upgrade to Pro to enable Moderation options', 'instagram-feed'); ?></a><br />
1350
+ <a href="javascript:void(0);" class="button button-secondary sbi-show-pro"><b>+</b> <?php _e('Show Pro Options', 'instagram-feed'); ?>Show Pro Options</a>
1351
  </p>
1352
 
1353
  <div class="sbi-pro-options" style="margin-top: -15px;">
1354
  <table class="form-table">
1355
  <tbody>
1356
  <tr valign="top" class="sbi_pro">
1357
+ <th scope="row"><label><?php _e('Moderation Type', 'instagram-feed'); ?></label></th>
1358
  <td>
1359
+ <input class="sb_instagram_moderation_mode" checked="checked" disabled type="radio" value="visual" style="margin-top: 0;" /><label><?php _e('Visual', 'instagram-feed'); ?></label>
1360
+ <input class="sb_instagram_moderation_mode" disabled type="radio" value="manual" style="margin-top: 0; margin-left: 10px;"/><label><?php _e('Manual', 'instagram-feed'); ?></label>
1361
 
1362
+ <p class="sbi_tooltip" style="display: block;"><?php _e("<b>Visual Moderation Mode</b><br />This adds a button to each feed that will allow you to hide posts, block users, and create white lists from the front end using a visual interface. Visit <a href='https://smashballoon.com/guide-to-moderation-mode/?utm_source=plugin-free&utm_campaign=sbi' target='_blank'>this page</a> for details", 'instagram-feed'); ?></p>
1363
 
1364
  </td>
1365
  </tr>
1366
 
1367
  <tr valign="top" class="sbi_pro">
1368
+ <th scope="row"><label><?php _e('Only show posts by these users', 'instagram-feed'); ?></label></th>
1369
  <td>
1370
  <input type="text" style="width: 70%;" disabled /><br />
1371
+ <span class="sbi_note" style="margin-left: 0;"><?php _e('Separate usernames using commas', 'instagram-feed'); ?></span>
1372
 
1373
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What is this?", 'instagram-feed'); ?></a>
1374
+ <p class="sbi_tooltip"><?php _e("You can use this setting to show photos only from certain users in your feed. Just enter the usernames here which you want to show. Separate multiple usernames using commas.", 'instagram-feed'); ?></p>
1375
  </td>
1376
  </tr>
1377
  <tr valign="top" class="sbi_pro">
1378
+ <th scope="row"><label><?php _e('White lists', 'instagram-feed'); ?></label></th>
1379
  <td>
1380
  <div class="sbi_white_list_names_wrapper">
1381
+ <?php _e("No white lists currently created", 'instagram-feed'); ?>
1382
  </div>
1383
 
1384
+ <input disabled class="button-secondary" type="submit" value="<?php esc_attr_e( 'Clear White Lists', 'instagram-feed' ); ?>" />
1385
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);" style="display: inline-block; margin-top: 5px;"><?php _e("What is this?", 'instagram-feed'); ?></a>
1386
+ <p class="sbi_tooltip"><?php _e("This will remove all of the white lists from the database", 'instagram-feed'); ?></p>
1387
  </td>
1388
  </tr>
1389
 
1438
  <td>
1439
  <input type="checkbox" name="check_api" id="sb_instagram_check_api" <?php if($check_api == true) echo 'checked="checked"' ?> />
1440
  <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
1441
+ <p class="sbi_tooltip"><?php _e("If your site uses caching, minification, or JavaScript concatenation, this option can help prevent missing cache problems with the feed.", 'instagram-feed'); ?></p>
1442
  </td>
1443
  </tr>
1444
  <tr valign="top">
1445
  <th><label><?php _e("Enable Backup Caching", 'instagram-feed'); ?></label></th>
1446
  <td class="sbi-customize-tab-opt">
1447
  <input name="sb_instagram_backup" type="checkbox" id="sb_instagram_backup" <?php if($sb_instagram_backup == true) echo "checked"; ?> />
1448
+ <input id="sbi_clear_backups" class="button-secondary" type="submit" style="position: relative; top: -4px;" value="<?php esc_attr_e( 'Clear Backup Cache', 'instagram-feed' ); ?>" />
1449
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1450
+ <p class="sbi_tooltip"><?php _e('Every feed will save a duplicate version of itself in the database to be used if the normal cache is not available.', 'instagram-feed'); ?></p>
1451
  </td>
1452
  </tr>
1453
  <tr>
1456
  </th>
1457
  <td>
1458
  <select name="sb_instagram_cron">
1459
+ <option value="unset" <?php if($sb_instagram_cron == "unset") echo 'selected="selected"' ?> > - </option>
1460
+ <option value="yes" <?php if($sb_instagram_cron == "yes") echo 'selected="selected"' ?> ><?php _e('Yes', 'instagram-feed'); ?></option>
1461
+ <option value="no" <?php if($sb_instagram_cron == "no") echo 'selected="selected"' ?> ><?php _e('No', 'instagram-feed'); ?></option>
1462
  </select>
1463
 
1464
  <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1465
+ <p class="sbi_tooltip"><?php _e("If you're experiencing an issue with the plugin not auto-updating then you can set this to 'Yes' to run a scheduled event behind the scenes which forces the plugin cache to clear on a regular basis and retrieve new data from Instagram.", 'instagram-feed'); ?></p>
1466
  </td>
1467
  </tr>
1468
  </tbody>
1480
  <td>
1481
  <select name="sbi_font_method" id="sbi_font_method" class="default-text">
1482
  <option value="svg" id="sbi-font_method" class="default-text" <?php if($sbi_font_method == 'svg') echo 'selected="selected"' ?>>SVG</option>
1483
+ <option value="fontfile" id="sbi-font_method" class="default-text" <?php if($sbi_font_method == 'fontfile') echo 'selected="selected"' ?>><?php _e("Font File", 'instagram-feed'); ?></option>
1484
  </select>
1485
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1486
+ <p class="sbi_tooltip"><?php _e("This plugin uses SVGs for all icons in the feed. Use this setting to switch to font icons.", 'instagram-feed'); ?></p>
1487
  </td>
1488
  </tr>
1489
  </tbody>
1495
 
1496
  <p><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>&nbsp; <?php _e('Next Step: <a href="?page=sb-instagram-feed&tab=display">Display your Feed</a>', 'instagram-feed'); ?></p>
1497
 
1498
+ <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/?utm_source=plugin-free&utm_campaign=sbi" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
1499
 
1500
 
1501
  <?php } //End Customize tab ?>
1529
  </tr>
1530
 
1531
  <tr class="sbi_table_header"><td colspan=3><?php _e("Configure Options", 'instagram-feed'); ?></td></tr>
 
 
 
 
 
1532
  <tr class="sbi_pro">
1533
  <td>type</td>
1534
  <td><?php _e("Display photos from a User ID (user)<br />Display posts from a Hashtag (hashtag)", 'instagram-feed'); ?></td>
1588
  <td><?php _e("The number of photos to display initially. Maximum is 33.", 'instagram-feed'); ?></td>
1589
  <td><code>[instagram-feed num=10]</code></td>
1590
  </tr>
1591
+ <tr class="sbi_pro">
1592
  <td>nummobile</td>
1593
  <td><?php _e("The number of photos to display initially for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
1594
  <td><code>[instagram-feed nummobile=6]</code></td>
1598
  <td><?php _e("The number of columns in your feed. 1 - 10.", 'instagram-feed'); ?></td>
1599
  <td><code>[instagram-feed cols=5]</code></td>
1600
  </tr>
1601
+ <tr class="sbi_pro">
1602
  <td>colsmobile</td>
1603
  <td><?php _e("The number of columns in your feed for mobile screens (smaller than 480 pixels).", 'instagram-feed'); ?></td>
1604
  <td><code>[instagram-feed colsmobile=2]</code></td>
1865
  </tbody>
1866
  </table>
1867
 
1868
+ <p><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Need help setting up the plugin? Check out our <a href="https://smashballoon.com/instagram-feed/free/?utm_source=plugin-free&utm_campaign=sbi" target="_blank">setup directions</a>', 'instagram-feed'); ?></p>
1869
 
1870
  <?php } //End Display tab ?>
1871
 
1875
  <div class="sbi_support">
1876
 
1877
  <br/>
1878
+ <h3 style="padding-bottom: 10px;"><?php _e("Need help?", 'instagram-feed'); ?></h3>
1879
 
1880
  <p>
1881
  <span class="sbi-support-title"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <a
1882
+ href="https://smashballoon.com/instagram-feed/free/?utm_source=plugin-free&utm_campaign=sbi"
1883
  target="_blank"><?php _e( 'Setup Directions' ); ?></a></span>
1884
+ <?php _e( 'A step-by-step guide on how to setup and use the plugin.', 'instagram-feed' ); ?>
1885
  </p>
1886
 
1887
  <p>
1888
  <span class="sbi-support-title"><i class="fa fa-youtube-play" aria-hidden="true"></i>&nbsp; <a
1889
  href="https://www.youtube.com/embed/q6ZXVU4g970" target="_blank"
1890
+ id="sbi-play-support-video"><?php _e( 'Watch a Video', 'instagram-feed' ); ?></a></span>
1891
+ <?php _e( "Watch a short video demonstrating how to set up, customize and use the plugin.<br /><b>Please note</b> that the video shows the set up and use of the <b><a href='https://smashballoon.com/instagram-feed/?utm_source=plugin-free&utm_campaign=sbi' target='_blank'>Pro version</a></b> of the plugin, but the process is the same for this free version. The only difference is some of the features available.", 'instagram-feed' ); ?>
1892
 
1893
  <iframe id="sbi-support-video"
1894
  src="//www.youtube.com/embed/q6ZXVU4g970?theme=light&amp;showinfo=0&amp;controls=2" width="960"
1897
 
1898
  <p>
1899
  <span class="sbi-support-title"><i class="fa fa-question-circle" aria-hidden="true"></i>&nbsp; <a
1900
+ href="https://smashballoon.com/instagram-feed/support/faq/?utm_source=plugin-free&utm_campaign=sbi"
1901
+ target="_blank"><?php _e( 'FAQs and Docs', 'instagram-feed' ); ?></a></span>
1902
+ <?php _e( 'View our expansive library of FAQs and documentation to help solve your problem as quickly as possible.', 'instagram-feed' ); ?>
1903
  </p>
1904
 
1905
  <div class="sbi-support-faqs">
1906
 
1907
  <ul>
1908
  <li><b>FAQs</b></li>
1909
+ <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-photos-wont-load/?utm_source=plugin-free&utm_campaign=sbi" target="_blank">My Instagram Feed Won\'t Load</a>', 'instagram-feed' ); ?></li>
1910
+ <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/my-instagram-access-token-keep-expiring/?utm_source=plugin-free&utm_campaign=sbi" target="_blank">My Access Token Keeps Expiring</a>', 'instagram-feed' ); ?></li>
1911
+ <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/instagram-feed/support/faq/?utm_source=plugin-free&utm_campaign=sbi" target="_blank"><?php _e( 'See All', 'instagram-feed' ); ?><i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
1912
  </ul>
1913
 
1914
  <ul>
1915
+ <li><b><?php _e("Documentation", 'instagram-feed'); ?></b></li>
1916
+ <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed/free?utm_source=plugin-free&utm_campaign=sbi" target="_blank">Installation and Configuration</a>', 'instagram-feed' ); ?></li>
1917
+ <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/display-multiple-instagram-feeds/?utm_source=plugin-free&utm_campaign=sbi" target="_blank">Displaying multiple feeds</a>', 'instagram-feed' ); ?></li>
1918
+ <li>&bull;&nbsp; <?php _e( '<a href="https://smashballoon.com/instagram-feed-faq/customization/?utm_source=plugin-free&utm_campaign=sbi" target="_blank">Customizing your Feed</a>', 'instagram-feed' ); ?></li>
1919
  </ul>
1920
  </div>
1921
 
1922
  <p>
1923
  <span class="sbi-support-title"><i class="fa fa-envelope" aria-hidden="true"></i>&nbsp; <a
1924
+ href="https://smashballoon.com/instagram-feed/support/?utm_source=plugin-free&utm_campaign=sbi"
1925
+ target="_blank"><?php _e( 'Request Support', 'instagram-feed' ); ?></a></span>
1926
+ <?php _e( 'Still need help? Submit a ticket and one of our support experts will get back to you as soon as possible.<br /><b>Important:</b> Please include your <b>System Info</b> below with all support requests.', 'instagram-feed' ); ?>
1927
  </p>
1928
  </div>
1929
 
1930
  <hr />
1931
 
1932
+ <h3><?php _e('System Info &nbsp; <i style="color: #666; font-size: 11px; font-weight: normal;">Click the text below to select all</i>', 'instagram-feed'); ?></h3>
1933
 
1934
 
1935
 
2045
  <p>Find out how to display <a href="?page=sb-instagram-feed&amp;tab=display">multiple feeds</a>.</p>
2046
  </div>
2047
 
2048
+ <a href="https://smashballoon.com/instagram-feed/demo/?utm_source=plugin-free&utm_campaign=sbi" target="_blank" class="sbi-pro-notice">
2049
  <img src="<?php echo plugins_url( 'img/instagram-pro-promo.png' , __FILE__ ) ?>" alt="<?php esc_attr_e( 'Instagram Feed Pro', 'instagram-feed' ); ?>">
2050
  </a>
2051
 
2454
  // only display the notice if the time offset has passed and the user hasn't already dismissed it
2455
  if ( get_transient( $transient ) !== 'waiting' && $notice_status !== 'dismissed' ) {
2456
  add_action( 'admin_notices', 'sbi_rating_notice_html' );
2457
+ }
instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Instagram Feed
4
  Plugin URI: https://smashballoon.com/instagram-feed
5
  Description: Display beautifully clean, customizable, and responsive Instagram feeds
6
- Version: 1.10.2
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
 
26
- define( 'SBIVER', '1.10.2' );
27
 
28
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
29
 
@@ -248,7 +248,7 @@ function display_instagram($atts, $content = null) {
248
  //Follow button HTML
249
  $sb_instagram_follow_btn_classes = '';
250
  if( strpos($sb_instagram_follow_btn_styles, 'background') !== false ) $sb_instagram_follow_btn_classes = ' sbi_custom';
251
- $sb_instagram_follow_btn_html = '<span class="sbi_follow_btn'.$sb_instagram_follow_btn_classes.'"><a href="https://www.instagram.com/" '.$sb_instagram_follow_btn_styles.' target="_blank"><i class="fa fab fa-instagram"></i>'.esc_html( stripslashes( $sb_instagram_follow_btn_text ) ).'</a></span>';
252
 
253
  //Mobile
254
  $sb_instagram_disable_mobile = $atts['disablemobile'];
@@ -444,7 +444,7 @@ function sbi_should_use_backup_cache( $token, $cache_name, $is_filtered, $always
444
  if ( !strpos( $cache_name, '_header' ) ) {
445
  echo '<div id="sbi_mod_error">';
446
  echo '<p><b>' . __( 'Error: Access Token is not valid or has expired.', 'instagram-feed' ) . ' ' . __( 'Feed will not update.', 'instagram-feed' ) . '</b><br /><span>' . __(' This error message is only visible to WordPress admins</span>', 'instagram-feed' );
447
- echo '<p>' . __( 'There\'s an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin\'s Settings page.<br />If you continue to have an issue with your Access Token then please see <a href="https://smashballoon.com/my-instagram-access-token-keep-expiring/" target="_blank">this FAQ</a> for more information.', 'instagram-feed' );
448
  echo '</div>';
449
  }
450
 
@@ -474,25 +474,28 @@ function sbi_cache_photos() {
474
  $transient_name = isset( $transient_name['feed'] ) ? sanitize_text_field( $transient_name['feed'] ) : 'sbi_other';
475
  }
476
 
477
- if ( strpos( $_POST['photos'], "%7B%22" ) === 0
478
- && ( strpos( "%22standard_resolution%22", $_POST['photos'] ) && strpos( "%22https://scontent.cdninstagram.com", $_POST['photos'] ) || ! strpos( "%22standard_resolution%22", $_POST['photos'] ) ) ) {
479
 
480
- $stripped_json_string = wp_strip_all_tags( $_POST['photos'] );
481
- set_transient( $transient_name, $stripped_json_string, $cache_seconds );
 
 
 
482
 
483
  $backups_enabled = isset( $sb_instagram_settings['sb_instagram_backup'] ) ? $sb_instagram_settings['sb_instagram_backup'] !== '' : true;
484
 
485
  if ( $backups_enabled ) {
486
- if ( strlen( $stripped_json_string ) > 1999 && strpos( $transient_name, 'sbi_header_' ) !== 0 ) {
487
- update_option( '!'.$transient_name, $stripped_json_string, false );
488
  } elseif ( strpos( $transient_name, 'sbi_header_' ) === 0 ) {
489
- update_option( '!'.$transient_name, $stripped_json_string, false );
490
  }
491
  }
492
 
493
  }
494
 
495
- if ( strlen( $stripped_json_string ) < 2000 && strpos( $transient_name, 'sbi_header_' ) !== 0 && get_option( '!'.$transient_name ) ) {
496
  echo 'too much filtering';
497
  }
498
 
@@ -500,6 +503,96 @@ function sbi_cache_photos() {
500
  add_action('wp_ajax_cache_photos', 'sbi_cache_photos');
501
  add_action('wp_ajax_nopriv_cache_photos', 'sbi_cache_photos');
502
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
503
  function sbi_set_expired_token() {
504
  $access_token = isset( $_POST['access_token'] ) ? sanitize_text_field( $_POST['access_token'] ) : false;
505
 
@@ -573,20 +666,20 @@ function sbi_get_cache() {
573
  if ( ! empty( $feed_cache_transient_data ) ) {
574
  $feed_cache_data = $feed_cache_transient_data;
575
  } elseif ( ! isset( $options['check_api'] ) || $options['check_api'] === 'on' || $options['check_api'] === true ) {
576
- $feed_cache_data = '{%22error%22:%22tryfetch%22}';
577
  } elseif ( !get_transient( 'sbi_doing_tryfetch_once' ) && $backups_enabled ) {
578
  set_transient( 'sbi_doing_tryfetch_once', 'true', 60*60 );
579
- $feed_cache_data = '{%22error%22:%22tryfetch%22}';
580
- $warning_message_data = ',%22tryfetchonce%22:{%22tryfetchonce%22:%22tryfetchonce%22}';
581
  } else {
582
- $feed_cache_data = '{%22error%22:%22nocache%22}';
583
  }
584
 
585
  if ( $transient_names['comments'] === 'need' ) {
586
  $comment_cache_data = get_transient( 'sbinst_comment_cache' );
587
- $comment_cache_data = ! empty( $comment_cache_data ) ? sbi_encode_uri( $comment_cache_data ) : '{%22error%22:%22nocache%22}';
588
  } else {
589
- $comment_cache_data = '{%22error%22:%22nocache%22}';
590
  }
591
 
592
  // maybe use backup cache
@@ -595,19 +688,19 @@ function sbi_get_cache() {
595
  if ( ! empty( $header_cache_data_transient_data ) ) {
596
  $header_cache_data = $header_cache_data_transient_data;
597
  } elseif ( $doing_tryfetch ) {
598
- $header_cache_data = '{%22error%22:%22tryfetch%22}';
599
  } elseif ( !get_transient( 'sbi_doing_tryfetch_once' ) && $backups_enabled ) {
600
  set_transient( 'sbi_doing_tryfetch_once', 'true', 60*60 );
601
- $feed_cache_data = '{%22error%22:%22tryfetch%22}';
602
- $warning_message_data = ',%22tryfetchonce%22:{%22tryfetchonce%22:%22tryfetchonce%22}';
603
  } elseif ( empty( $header_cache_data_transient_data ) || $still_using_backup ) {
604
  $backup_header_cache = get_option( '!' . $transient_names['header'] );
605
- $header_cache_data = ! empty( $backup_header_cache ) ? $backup_header_cache : '{%22error%22:%22nocache%22}';
606
  if ( $still_using_backup === 'falsecache' ) {
607
- $warning_message_data = ',%22warning%22:{%22warning%22:%22falsecache%22}';
608
  }
609
  } else {
610
- $header_cache_data = ! empty( $header_cache_data ) ? $header_cache_data : '{%22error%22:%22nocache%22}';
611
  }
612
 
613
  // maybe use backup cache
@@ -615,11 +708,11 @@ function sbi_get_cache() {
615
  $backup_feed_cache = get_option( '!' . $transient_names['feed'] );
616
  $feed_cache_data = ! empty( $backup_feed_cache ) ? $backup_feed_cache : $feed_cache_data;
617
  if ( $still_using_backup === 'falsecache' ) {
618
- $warning_message_data = ',%22warning%22:{%22warning%22:%22falsecache%22}';
619
  }
620
  }
621
 
622
- $data = '{%22header%22:' . $header_cache_data .',%22feed%22:' . $feed_cache_data . ',%22comments%22:' . $comment_cache_data . $warning_message_data . '}';
623
 
624
  echo $data;
625
 
@@ -809,6 +902,9 @@ function sb_instagram_activate() {
809
  $options[ 'sb_instagram_show_follow_btn' ] = true;
810
  update_option( 'sb_instagram_settings', $options );
811
  delete_option( 'sb_expired_tokens' );
 
 
 
812
  }
813
  register_activation_hook( __FILE__, 'sb_instagram_activate' );
814
 
@@ -843,5 +939,8 @@ function sb_instagram_uninstall()
843
  FROM $table_name
844
  WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
845
  " );
 
 
 
846
  }
847
  register_uninstall_hook( __FILE__, 'sb_instagram_uninstall' );
3
  Plugin Name: Instagram Feed
4
  Plugin URI: https://smashballoon.com/instagram-feed
5
  Description: Display beautifully clean, customizable, and responsive Instagram feeds
6
+ Version: 1.11
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
 
26
+ define( 'SBIVER', '1.11' );
27
 
28
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
29
 
248
  //Follow button HTML
249
  $sb_instagram_follow_btn_classes = '';
250
  if( strpos($sb_instagram_follow_btn_styles, 'background') !== false ) $sb_instagram_follow_btn_classes = ' sbi_custom';
251
+ $sb_instagram_follow_btn_html = '<span class="sbi_follow_btn'.$sb_instagram_follow_btn_classes.'"><a href="https://www.instagram.com/" '.$sb_instagram_follow_btn_styles.' target="_blank" rel="noopener"><i class="fa fab fa-instagram"></i>'.esc_html( stripslashes( $sb_instagram_follow_btn_text ) ).'</a></span>';
252
 
253
  //Mobile
254
  $sb_instagram_disable_mobile = $atts['disablemobile'];
444
  if ( !strpos( $cache_name, '_header' ) ) {
445
  echo '<div id="sbi_mod_error">';
446
  echo '<p><b>' . __( 'Error: Access Token is not valid or has expired.', 'instagram-feed' ) . ' ' . __( 'Feed will not update.', 'instagram-feed' ) . '</b><br /><span>' . __(' This error message is only visible to WordPress admins</span>', 'instagram-feed' );
447
+ echo '<p>' . __( 'There\'s an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin\'s Settings page.<br />If you continue to have an issue with your Access Token then please see <a href="https://smashballoon.com/my-instagram-access-token-keep-expiring/" target="_blank" rel="noopener">this FAQ</a> for more information.', 'instagram-feed' );
448
  echo '</div>';
449
  }
450
 
474
  $transient_name = isset( $transient_name['feed'] ) ? sanitize_text_field( $transient_name['feed'] ) : 'sbi_other';
475
  }
476
 
477
+ $cache_type = strpos( $transient_name, 'sbi_header_' ) !== 0 ? 'feed' : 'header';
478
+ $num_images = isset( $_POST['num_images'] ) ? (int)$_POST['num_images'] : 33;
479
 
480
+ if ( $num_images > 0 ) {
481
+ $feed_tokens = isset( $_POST['feed_tokens'] ) ? $_POST['feed_tokens'] : array();
482
+ $new_cache = ! empty( $feed_tokens ) ? sbi_get_post_data_from_tokens( $feed_tokens, $cache_type, $num_images ) : array();
483
+ echo $new_cache;
484
+ set_transient( $transient_name, $new_cache, $cache_seconds );
485
 
486
  $backups_enabled = isset( $sb_instagram_settings['sb_instagram_backup'] ) ? $sb_instagram_settings['sb_instagram_backup'] !== '' : true;
487
 
488
  if ( $backups_enabled ) {
489
+ if ( strlen( $new_cache ) > 1999 && strpos( $transient_name, 'sbi_header_' ) !== 0 ) {
490
+ update_option( '!'.$transient_name, $new_cache, false );
491
  } elseif ( strpos( $transient_name, 'sbi_header_' ) === 0 ) {
492
+ update_option( '!'.$transient_name, $new_cache, false );
493
  }
494
  }
495
 
496
  }
497
 
498
+ if ( strlen( $new_cache ) < 2000 && strpos( $transient_name, 'sbi_header_' ) !== 0 && get_option( '!'.$transient_name ) ) {
499
  echo 'too much filtering';
500
  }
501
 
503
  add_action('wp_ajax_cache_photos', 'sbi_cache_photos');
504
  add_action('wp_ajax_nopriv_cache_photos', 'sbi_cache_photos');
505
 
506
+ function sbi_get_post_data_from_tokens( $access_tokens = array(), $cache_type = 'feed', $num_needed = 33 ) {
507
+ $images = array();
508
+ $num_images_overall = 0;
509
+ $pagination = array(
510
+ 'next_url' => array()
511
+ );
512
+ foreach ( $access_tokens as $token ) {
513
+ $clean_token = preg_replace("/[^a-zA-Z0-9\.]+/", "", sbi_maybe_clean( $token ) );
514
+ $split_token = explode( '.', $clean_token );
515
+ $id = $split_token[0];
516
+ if ( $cache_type === 'header' ) {
517
+ $api_call = 'https://api.instagram.com/v1/users/' . $id . '?access_token=' . $clean_token;
518
+ } else {
519
+ $api_call = 'https://api.instagram.com/v1/users/' . $id . '/media/recent?access_token=' . $clean_token . '&count=33';
520
+ }
521
+ $args = array(
522
+ 'timeout' => 60,
523
+ 'sslverify' => false
524
+ );
525
+ $result = wp_remote_get( $api_call, $args );
526
+ if ( ! is_wp_error( $result ) ) {
527
+ $decoded_results = json_decode( $result['body'], true );
528
+ $num_images_returned = 0;
529
+ if ( is_array( $decoded_results['data'] ) ) {
530
+ $num_images_returned = count( $decoded_results['data'] );
531
+ }
532
+ $num_images_overall += $num_images_returned;
533
+ $images = array_merge( $images, $decoded_results['data'] );
534
+ if ( !empty( $decoded_results['pagination']['next_url'] ) ) {
535
+ $pagination['next_url'][] = $decoded_results['pagination']['next_url'];
536
+ }
537
+ } else {
538
+ // error
539
+ return json_encode( $result );
540
+ }
541
+ }
542
+
543
+ if ( $cache_type === 'feed' ) {
544
+ $secondary_requests = 0;
545
+
546
+ while ( $num_images_overall < $num_needed && ! empty( $pagination['next_url'] ) && $secondary_requests < 10 ) {
547
+ $secondary_requests++;
548
+ $api_call = array_shift( $pagination['next_url'] );
549
+ $args = array(
550
+ 'timeout' => 60,
551
+ 'sslverify' => false
552
+ );
553
+ $result = wp_remote_get( $api_call, $args );
554
+ if ( ! is_wp_error( $result ) ) {
555
+ $decoded_results = json_decode( $result['body'], true );
556
+ $num_images_returned = 0;
557
+ if ( is_array( $decoded_results['data'] ) ) {
558
+ $num_images_returned = count( $decoded_results['data'] );
559
+ }
560
+ $num_images_overall += $num_images_returned;
561
+ $images = array_merge( $images, $decoded_results['data'] );
562
+ if ( !empty( $decoded_results['pagination']['next_url'] ) ) {
563
+ $pagination['next_url'][] = $decoded_results['pagination']['next_url'];
564
+ }
565
+ } else {
566
+ // error
567
+ return json_encode( $result );
568
+ }
569
+
570
+ }
571
+ }
572
+
573
+ if ( isset( $images[0]['created_time'] ) ) {
574
+ usort($images, 'sbi_date_sort' );
575
+ }
576
+
577
+ $return = array(
578
+ 'pagination' => $pagination,
579
+ 'data' => $images,
580
+ 'meta' => array()
581
+ );
582
+
583
+ return json_encode( $return );
584
+ }
585
+
586
+ function sbi_date_sort( $a, $b ) {
587
+
588
+ if ( isset( $a['created_time'] ) ) {
589
+ return (int)$b['created_time'] - (int)$a['created_time'];
590
+ } else {
591
+ return rand ( -1, 1 );
592
+ }
593
+
594
+ }
595
+
596
  function sbi_set_expired_token() {
597
  $access_token = isset( $_POST['access_token'] ) ? sanitize_text_field( $_POST['access_token'] ) : false;
598
 
666
  if ( ! empty( $feed_cache_transient_data ) ) {
667
  $feed_cache_data = $feed_cache_transient_data;
668
  } elseif ( ! isset( $options['check_api'] ) || $options['check_api'] === 'on' || $options['check_api'] === true ) {
669
+ $feed_cache_data = '{"error":"tryfetch"}';
670
  } elseif ( !get_transient( 'sbi_doing_tryfetch_once' ) && $backups_enabled ) {
671
  set_transient( 'sbi_doing_tryfetch_once', 'true', 60*60 );
672
+ $feed_cache_data = '{"error":"tryfetch"}';
673
+ $warning_message_data = ',"tryfetchonce":{"tryfetchonce":"tryfetchonce"}';
674
  } else {
675
+ $feed_cache_data = '{"error":"nocache"}';
676
  }
677
 
678
  if ( $transient_names['comments'] === 'need' ) {
679
  $comment_cache_data = get_transient( 'sbinst_comment_cache' );
680
+ $comment_cache_data = ! empty( $comment_cache_data ) ? sbi_encode_uri( $comment_cache_data ) : '{"error":"nocache"}';
681
  } else {
682
+ $comment_cache_data = '{"error":"nocache"}';
683
  }
684
 
685
  // maybe use backup cache
688
  if ( ! empty( $header_cache_data_transient_data ) ) {
689
  $header_cache_data = $header_cache_data_transient_data;
690
  } elseif ( $doing_tryfetch ) {
691
+ $header_cache_data = '{"error":"tryfetch"}';
692
  } elseif ( !get_transient( 'sbi_doing_tryfetch_once' ) && $backups_enabled ) {
693
  set_transient( 'sbi_doing_tryfetch_once', 'true', 60*60 );
694
+ $feed_cache_data = '{"error":"tryfetch"}';
695
+ $warning_message_data = ',"tryfetchonce":{"tryfetchonce":"tryfetchonce"}';
696
  } elseif ( empty( $header_cache_data_transient_data ) || $still_using_backup ) {
697
  $backup_header_cache = get_option( '!' . $transient_names['header'] );
698
+ $header_cache_data = ! empty( $backup_header_cache ) ? $backup_header_cache : '{"error":"nocache"}';
699
  if ( $still_using_backup === 'falsecache' ) {
700
+ $warning_message_data = ',"warning":{"warning":"falsecache"}';
701
  }
702
  } else {
703
+ $header_cache_data = ! empty( $header_cache_data ) ? $header_cache_data : '{"error":"nocache"}';
704
  }
705
 
706
  // maybe use backup cache
708
  $backup_feed_cache = get_option( '!' . $transient_names['feed'] );
709
  $feed_cache_data = ! empty( $backup_feed_cache ) ? $backup_feed_cache : $feed_cache_data;
710
  if ( $still_using_backup === 'falsecache' ) {
711
+ $warning_message_data = ',"warning":{"warning":"falsecache"}';
712
  }
713
  }
714
 
715
+ $data = '{"header":' . $header_cache_data .',"feed":' . $feed_cache_data . ',"comments":' . $comment_cache_data . $warning_message_data . '}';
716
 
717
  echo $data;
718
 
902
  $options[ 'sb_instagram_show_follow_btn' ] = true;
903
  update_option( 'sb_instagram_settings', $options );
904
  delete_option( 'sb_expired_tokens' );
905
+
906
+ global $wp_roles;
907
+ $wp_roles->add_cap( 'administrator', 'manage_instagram_feed_options' );
908
  }
909
  register_activation_hook( __FILE__, 'sb_instagram_activate' );
910
 
939
  FROM $table_name
940
  WHERE `option_name` LIKE ('%\_transient\_timeout\_&sbi\_%')
941
  " );
942
+
943
+ global $wp_roles;
944
+ $wp_roles->remove_cap( 'administrator', 'manage_instagram_feed_options' );
945
  }
946
  register_uninstall_hook( __FILE__, 'sb_instagram_uninstall' );
js/sb-instagram.js CHANGED
@@ -9,33 +9,33 @@ if(!sbi_js_exists){
9
 
10
  /* Font Awesome SVG implementation */
11
  var sbIconSVG = {
12
- 'fa-clock' : 'class="svg-inline--fa fa-clock fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="clock" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',
13
- 'fa-play' : 'class="svg-inline--fa fa-play fa-w-14 sbi_playbtn" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"></path></svg>',
14
- 'fa-image' : 'class="svg-inline--fa fa-image fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="image" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>',
15
- 'fa-user' : 'class="svg-inline--fa fa-user fa-w-16" style="margin-right: 3px;" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="user" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M96 160C96 71.634 167.635 0 256 0s160 71.634 160 160-71.635 160-160 160S96 248.366 96 160zm304 192h-28.556c-71.006 42.713-159.912 42.695-230.888 0H112C50.144 352 0 402.144 0 464v24c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24v-24c0-61.856-50.144-112-112-112z"></path></svg>',
16
- 'fa-comment' : 'class="svg-inline--fa fa-comment fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="comment" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M576 240c0 115-129 208-288 208-48.3 0-93.9-8.6-133.9-23.8-40.3 31.2-89.8 50.3-142.4 55.7-5.2.6-10.2-2.8-11.5-7.7-1.3-5 2.7-8.1 6.6-11.8 19.3-18.4 42.7-32.8 51.9-94.6C21.9 330.9 0 287.3 0 240 0 125.1 129 32 288 32s288 93.1 288 208z"></path></svg>',
17
- 'fa-heart' : 'class="svg-inline--fa fa-heart fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M414.9 24C361.8 24 312 65.7 288 89.3 264 65.7 214.2 24 161.1 24 70.3 24 16 76.9 16 165.5c0 72.6 66.8 133.3 69.2 135.4l187 180.8c8.8 8.5 22.8 8.5 31.6 0l186.7-180.2c2.7-2.7 69.5-63.5 69.5-136C560 76.9 505.7 24 414.9 24z"></path></svg>',
18
- 'fa-check' : 'class="svg-inline--fa fa-check fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',
19
- 'fa-exclamation-circle' : 'class="svg-inline--fa fa-exclamation-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="exclamation-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path></svg>',
20
- 'fa-map-marker' : 'class="svg-inline--fa fa-map-marker fa-w-12" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="map-marker" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"></path></svg>',
21
- 'fa-clone' : 'class="svg-inline--fa fa-clone fa-w-16 sbi_lightbox_carousel_icon" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="clone" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 0H144c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h48c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48zM362 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h42v224c0 26.51 21.49 48 48 48h224v42a6 6 0 0 1-6 6zm96-96H150a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h308a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6z"></path></svg>',
22
- 'fa-chevron-right' : 'class="svg-inline--fa fa-chevron-right fa-w-10" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="chevron-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg>',
23
- 'fa-chevron-left' : 'class="svg-inline--fa fa-chevron-left fa-w-10" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="chevron-left" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"></path></svg>',
24
- 'fa-share' : 'class="svg-inline--fa fa-share fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="share" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"></path></svg>',
25
- 'fa-times' : 'class="svg-inline--fa fa-times fa-w-12" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="times" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M323.1 441l53.9-53.9c9.4-9.4 9.4-24.5 0-33.9L279.8 256l97.2-97.2c9.4-9.4 9.4-24.5 0-33.9L323.1 71c-9.4-9.4-24.5-9.4-33.9 0L192 168.2 94.8 71c-9.4-9.4-24.5-9.4-33.9 0L7 124.9c-9.4 9.4-9.4 24.5 0 33.9l97.2 97.2L7 353.2c-9.4 9.4-9.4 24.5 0 33.9L60.9 441c9.4 9.4 24.5 9.4 33.9 0l97.2-97.2 97.2 97.2c9.3 9.3 24.5 9.3 33.9 0z"></path></svg>',
26
- 'fa-envelope' : 'class="svg-inline--fa fa-envelope fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="envelope" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg>',
27
- 'fa-edit' : 'class="svg-inline--fa fa-edit fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="edit" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"></path></svg>',
28
- 'fa-arrows-alt' : 'class="svg-inline--fa fa-arrows-alt fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="arrows-alt" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"></path></svg>',
29
- 'fa-check-circle' : 'class="svg-inline--fa fa-check-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>',
30
- 'fa-ban' : 'class="svg-inline--fa fa-ban fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="ban" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"></path></svg>',
31
- 'fa-facebook-square' : 'class="svg-inline--fa fa-facebook-square fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="facebook-square" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M448 80v352c0 26.5-21.5 48-48 48h-85.3V302.8h60.6l8.7-67.6h-69.3V192c0-19.6 5.4-32.9 33.5-32.9H384V98.7c-6.2-.8-27.4-2.7-52.2-2.7-51.6 0-87 31.5-87 89.4v49.9H184v67.6h60.9V480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48z"></path></svg>',
32
- 'fa-twitter' : 'class="svg-inline--fa fa-twitter fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',
33
- 'fa-google-plus' : 'class="svg-inline--fa fa-google-plus fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="google-plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm-70.7 372c-68.8 0-124-55.5-124-124s55.2-124 124-124c31.3 0 60.1 11 83 32.3l-33.6 32.6c-13.2-12.9-31.3-19.1-49.4-19.1-42.9 0-77.2 35.5-77.2 78.1s34.2 78.1 77.2 78.1c32.6 0 64.9-19.1 70.1-53.3h-70.1v-42.6h116.9c1.3 6.8 1.9 13.6 1.9 20.7 0 70.8-47.5 121.2-118.8 121.2zm230.2-106.2v35.5H372v-35.5h-35.5v-35.5H372v-35.5h35.5v35.5h35.2v35.5h-35.2z"></path></svg>',
34
- 'fa-instagram' : 'class="svg-inline--fa fa-instagram fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" 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"></path></svg>',
35
- 'fa-linkedin' : 'class="svg-inline--fa fa-linkedin fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"></path></svg>',
36
- 'fa-pinterest' : 'class="svg-inline--fa fa-pinterest fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="pinterest" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z"></path></svg>',
37
- 'fa-spinner' : 'class="svg-inline--fa fa-spinner fa-w-16 fa-pulse" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="spinner" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>',
38
- 'fa-spin' : 'class="svg-inline--fa fa-spin fa-w-16 fa-pulse" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="spinner" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>'
39
  };
40
 
41
  function sbSVGify(elem) {
@@ -241,7 +241,8 @@ if(!sbi_js_exists){
241
 
242
  //START FEED
243
  var apiURLs = [],
244
- apiCall = '';
 
245
 
246
  //Loop through ids or hashtags
247
  jQuery.each( looparray, function( index, entry ) {
@@ -250,7 +251,7 @@ if(!sbi_js_exists){
250
  apiCall = "https://api.instagram.com/v1/users/"+ entry +"/media/recent?access_token=" + accessToken+"&count=33";
251
  window.sbiFeedMeta[$i].idsInFeed.push(entry);
252
  apiURLs.push( apiCall );
253
-
254
  }); //End hashtag array loop
255
 
256
  //Create an object of the settings so that they can be passed to the buildFeed function
@@ -347,7 +348,7 @@ if(!sbi_js_exists){
347
 
348
  if(!feedOptions.disablecache && window.sbiCacheStatuses[feedOptions.feedIndex].header !== 'cached' && typeof data.data.username !== 'undefined' && typeof data.data.pagination === 'undefined') {
349
  window.sbiCacheStatuses[feedOptions.feedIndex].header = 'cached';
350
- sbiCachePhotos(data, sbiTransientNames.header);
351
  }
352
 
353
  }
@@ -445,7 +446,7 @@ if(!sbi_js_exists){
445
 
446
  if(!feedOptions.disablecache && window.sbiCacheStatuses[feedOptions.feedIndex].header !== 'cached' && typeof data.data !== 'undefined' && typeof data.data.username !== 'undefined' && typeof data.data.pagination === 'undefined') {
447
  window.sbiCacheStatuses[feedOptions.feedIndex].header = 'cached';
448
- sbiCachePhotos(data, headerTransientName);
449
  }
450
  }
451
  });
@@ -530,7 +531,7 @@ if(!sbi_js_exists){
530
  //TEMPLATE:
531
  imagesHTML += '<div class="sbi_item sbi_type_'+item.type+' sbi_new sbi_transition" id="sbi_'+item.id+'" data-date="'+created_time_raw+'">' +
532
  '<div class="sbi_photo_wrap">'+
533
- '<a class="sbi_photo" href="'+item.link+'" target="_blank" data-full-res="'+item.images.standard_resolution.url+'">' + carouselTypeIcon + playBtnHtml +
534
  '<img src="'+data_image+'" alt="'+captionText.replace(/<>/g, " ")+'" width="200" height="200" />' +
535
  '</a>' +
536
  '</div>' +
@@ -809,7 +810,7 @@ if(!sbi_js_exists){
809
  sbiGetItemSize();
810
  // caching done at the end of all posts in the images Array
811
  if(!feedOptions.disablecache && typeof _cache !== 'undefined' && window.sbiCacheStatuses[feedOptions.feedIndex].feed === 'fetched') {
812
- _cache(imagesArr,transientName); // cache_all_posts
813
  window.sbiCacheStatuses[feedOptions.feedIndex].feed = 'cached';
814
  }
815
 
@@ -837,7 +838,7 @@ if(!sbi_js_exists){
837
  headerStyles = '';
838
  if(feedOptions.headercolor.length) headerStyles = 'style="color: #'+feedOptions.headercolor+'"';
839
 
840
- $header = '<a href="https://www.instagram.com/'+data.data.username+'" target="_blank" title="@'+data.data.username+'" class="sbi_header_link" '+headerStyles+'>';
841
  $header += '<div class="sbi_header_text">';
842
  var classheader = '';
843
  if( ( typeof data.data.bio !== 'undefined' && data.data.bio.length < 1 ) || feedOptions.showbio != 'true' ) classheader = ' class="sbi_no_bio"';
@@ -862,7 +863,7 @@ if(!sbi_js_exists){
862
  if(feedOptions.headerstyle == 'boxed') {
863
  $header += '<div class="sbi_header_bar" style="background: #'+feedOptions.headersecondarycolor+'">';
864
  if(feedOptions.showbio != 'false') $header += $headerInfo;
865
- $header += '<a class="sbi_header_follow_btn" href="https://www.instagram.com/'+data.data.username+'" target="_blank" style="color: #'+feedOptions.headercolor+'; background: #'+feedOptions.headerprimarycolor+';"><i class="sbi_new_logo"></i><span></span></div></div>';
866
  }
867
 
868
  //Add the header to the feed
@@ -923,7 +924,7 @@ if(!sbi_js_exists){
923
 
924
  if( sbiErrorResponse.indexOf('access_token') > -1 ){
925
  sbiErrorMsg += '<p><b>Error: Access Token is not valid or has expired</b><br /><span>This error message is only visible to WordPress admins</span></p>';
926
- sbiErrorDir = "<p>There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.<br />If you continue to have an issue with your Access Token then please see <a href='https://smashballoon.com/my-instagram-access-token-keep-expiring/' target='_blank'>this FAQ</a> for more information.</p>";
927
  jQuery('#sb_instagram').empty().append( '<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">' + sbiErrorMsg + sbiErrorDir + '</div>');
928
  sbiAddTokenToExpiredList(sb_instagram_js_options.sb_instagram_at,transientName);
929
  var submittedData = {
@@ -944,7 +945,7 @@ if(!sbi_js_exists){
944
  } else if( sbiErrorResponse.indexOf('retired') > -1 ){
945
 
946
  sbiErrorMsg += '<p><b>No longer possible to display this feed</b><br /><span>This error message is only visible to WordPress admins</span></p>';
947
- sbiErrorDir = "<p>Due to changes in the Instagram API, it is no longer possible to display a feed from an Instagram account which is not your own. You can now only display your own Instagram account. Please see <a href='https://smashballoon.com/instagram-api-changes-april-4-2018/' target='_blank'>this post</a> for more information.</p>";
948
  jQuery('#sb_instagram').empty().append( '<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">' + sbiErrorMsg + sbiErrorDir + '</div>');
949
  return;
950
 
@@ -975,7 +976,7 @@ if(!sbi_js_exists){
975
  } else if( sbiErrorResponse.indexOf('user does not exist') > -1 || sbiErrorResponse.indexOf('you cannot view this resource') > -1 ){
976
  window.sbiFeedMeta[$i].error = {
977
  errorMsg : '<p><b>Error: User ID <span class="sbiErrorIds">'+window.sbiFeedMeta[$i].idsInFeed[index]+'</span> does not exist, is invalid, or is private</b><br /><span>This error is only visible to WordPress admins</span>',
978
- errorDir : "<p>Please double check that the Instagram User ID you are using is valid and not from a private account. To find your User ID simply enter your Instagram user name into this <a href='https://smashballoon.com/instagram-feed/find-instagram-user-id/' target='_blank'>tool</a>.</p>"
979
  };
980
  if (!$self.find('#sbi_mod_error').length) {
981
  $self.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'</div>');
@@ -1123,16 +1124,13 @@ if(!sbi_js_exists){
1123
  useBackupFeed: window.sbiUseBackup[thisIndex].feed
1124
  },
1125
  success: function(data) {
1126
-
1127
- //Decode the JSON to that it can be used again
1128
- data = decodeURI(data);
1129
- data = data.replace(/\\'/g, "'");
1130
-
1131
- //Replace any escaped single quotes as it results in invalid JSON
1132
-
1133
- data = data.replace(/\\'/g, "'");
1134
- //Convert the cached JSON string back to a JSON object
1135
- var jsonobj = JSON.parse( data );
1136
 
1137
  if ( cacheWhat == 'all' ) {
1138
  if (typeof jsonobj.header.error === 'undefined') {
@@ -1252,13 +1250,13 @@ if(!sbi_js_exists){
1252
  jQuery.ajax(accessTokenOpts);
1253
  }
1254
 
1255
- function sbiCachePhotos(images, transientName){
 
1256
  //Convert the JSON object to a string
1257
- var jsonstring = JSON.stringify( images );
1258
  //Encode the JSON string so that it can be stored in the database
1259
- jsonstring = encodeURI(jsonstring);
1260
 
1261
- if (jsonstring.indexOf('%7B%22') === 0) {
1262
  var setCacheOpts = {
1263
  url: sbiajaxurl,
1264
  type: 'POST',
@@ -1266,27 +1264,11 @@ if(!sbi_js_exists){
1266
  cache: false,
1267
  data:{
1268
  action: 'cache_photos',
1269
- photos: jsonstring,
 
1270
  transientName: transientName,
1271
  },
1272
  success: function(response) {
1273
- if ( response.indexOf('too much filtering') > -1) {
1274
- var useBackupOpts = {
1275
- url: sbiajaxurl,
1276
- type: 'POST',
1277
- async: true,
1278
- cache: false,
1279
- data: {
1280
- action: 'set_use_backup',
1281
- transientName: transientName,
1282
- },
1283
- success: function (response) {
1284
- console.log(response)
1285
- }
1286
- };
1287
- jQuery.ajax(useBackupOpts);
1288
- }
1289
- return;
1290
  },
1291
  error: function(xhr,textStatus,e) {
1292
  console.log(e);
@@ -1389,18 +1371,18 @@ if(!sbi_js_exists){
1389
 
1390
  // Called at the very end of the feed creation process
1391
  // Takes all of the data retrieved from the API during the feed creation process and caches it
1392
- function sbi_cache_all(imagesArr,transientName) {
1393
  if (transientName.indexOf('header') && typeof imagesArr.data.pagination === 'undefined') {
1394
- sbiCachePhotos(imagesArr,transientName);
1395
  } else if (!transientName.indexOf('header') && typeof imagesArr.data.pagination !== 'undefined') {
1396
- sbiCachePhotos(imagesArr,transientName);
1397
  }
1398
  }
1399
 
1400
  jQuery( document ).ready(function() {
1401
  window.sbiCommentCacheStatus = 0;
1402
- sbi_init(function(imagesArr,transientName) {
1403
- sbi_cache_all(imagesArr,transientName);
1404
  });
1405
  });
1406
 
9
 
10
  /* Font Awesome SVG implementation */
11
  var sbIconSVG = {
12
+ 'fa-clock' : 'class="svg-inline--fa fa-clock fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="clock" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',
13
+ 'fa-play' : 'class="svg-inline--fa fa-play fa-w-14 sbi_playbtn" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"></path></svg>',
14
+ 'fa-image' : 'class="svg-inline--fa fa-image fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="image" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>',
15
+ 'fa-user' : 'class="svg-inline--fa fa-user fa-w-16" style="margin-right: 3px;" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="user" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M96 160C96 71.634 167.635 0 256 0s160 71.634 160 160-71.635 160-160 160S96 248.366 96 160zm304 192h-28.556c-71.006 42.713-159.912 42.695-230.888 0H112C50.144 352 0 402.144 0 464v24c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24v-24c0-61.856-50.144-112-112-112z"></path></svg>',
16
+ 'fa-comment' : 'class="svg-inline--fa fa-comment fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="comment" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M576 240c0 115-129 208-288 208-48.3 0-93.9-8.6-133.9-23.8-40.3 31.2-89.8 50.3-142.4 55.7-5.2.6-10.2-2.8-11.5-7.7-1.3-5 2.7-8.1 6.6-11.8 19.3-18.4 42.7-32.8 51.9-94.6C21.9 330.9 0 287.3 0 240 0 125.1 129 32 288 32s288 93.1 288 208z"></path></svg>',
17
+ 'fa-heart' : 'class="svg-inline--fa fa-heart fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="heart" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M414.9 24C361.8 24 312 65.7 288 89.3 264 65.7 214.2 24 161.1 24 70.3 24 16 76.9 16 165.5c0 72.6 66.8 133.3 69.2 135.4l187 180.8c8.8 8.5 22.8 8.5 31.6 0l186.7-180.2c2.7-2.7 69.5-63.5 69.5-136C560 76.9 505.7 24 414.9 24z"></path></svg>',
18
+ 'fa-check' : 'class="svg-inline--fa fa-check fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',
19
+ 'fa-exclamation-circle' : 'class="svg-inline--fa fa-exclamation-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="exclamation-circle" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path></svg>',
20
+ 'fa-map-marker' : 'class="svg-inline--fa fa-map-marker fa-w-12" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="map-marker" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"></path></svg>',
21
+ 'fa-clone' : 'class="svg-inline--fa fa-clone fa-w-16 sbi_lightbox_carousel_icon" aria-hidden="true" data-fa-proƒcessed="" data-prefix="far" data-icon="clone" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 0H144c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h48c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48zM362 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h42v224c0 26.51 21.49 48 48 48h224v42a6 6 0 0 1-6 6zm96-96H150a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h308a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6z"></path></svg>',
22
+ 'fa-chevron-right' : 'class="svg-inline--fa fa-chevron-right fa-w-10" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="chevron-right" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg>',
23
+ 'fa-chevron-left' : 'class="svg-inline--fa fa-chevron-left fa-w-10" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="chevron-left" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"></path></svg>',
24
+ 'fa-share' : 'class="svg-inline--fa fa-share fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="share" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"></path></svg>',
25
+ 'fa-times' : 'class="svg-inline--fa fa-times fa-w-12" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="times" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M323.1 441l53.9-53.9c9.4-9.4 9.4-24.5 0-33.9L279.8 256l97.2-97.2c9.4-9.4 9.4-24.5 0-33.9L323.1 71c-9.4-9.4-24.5-9.4-33.9 0L192 168.2 94.8 71c-9.4-9.4-24.5-9.4-33.9 0L7 124.9c-9.4 9.4-9.4 24.5 0 33.9l97.2 97.2L7 353.2c-9.4 9.4-9.4 24.5 0 33.9L60.9 441c9.4 9.4 24.5 9.4 33.9 0l97.2-97.2 97.2 97.2c9.3 9.3 24.5 9.3 33.9 0z"></path></svg>',
26
+ 'fa-envelope' : 'class="svg-inline--fa fa-envelope fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="envelope" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg>',
27
+ 'fa-edit' : 'class="svg-inline--fa fa-edit fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="edit" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"></path></svg>',
28
+ 'fa-arrows-alt' : 'class="svg-inline--fa fa-arrows-alt fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="arrows-alt" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"></path></svg>',
29
+ 'fa-check-circle' : 'class="svg-inline--fa fa-check-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check-circle" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>',
30
+ 'fa-ban' : 'class="svg-inline--fa fa-ban fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="ban" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"></path></svg>',
31
+ 'fa-facebook-square' : 'class="svg-inline--fa fa-facebook-square fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="facebook-square" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M448 80v352c0 26.5-21.5 48-48 48h-85.3V302.8h60.6l8.7-67.6h-69.3V192c0-19.6 5.4-32.9 33.5-32.9H384V98.7c-6.2-.8-27.4-2.7-52.2-2.7-51.6 0-87 31.5-87 89.4v49.9H184v67.6h60.9V480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48z"></path></svg>',
32
+ 'fa-twitter' : 'class="svg-inline--fa fa-twitter fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="twitter" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',
33
+ 'fa-google-plus' : 'class="svg-inline--fa fa-google-plus fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="google-plus" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm-70.7 372c-68.8 0-124-55.5-124-124s55.2-124 124-124c31.3 0 60.1 11 83 32.3l-33.6 32.6c-13.2-12.9-31.3-19.1-49.4-19.1-42.9 0-77.2 35.5-77.2 78.1s34.2 78.1 77.2 78.1c32.6 0 64.9-19.1 70.1-53.3h-70.1v-42.6h116.9c1.3 6.8 1.9 13.6 1.9 20.7 0 70.8-47.5 121.2-118.8 121.2zm230.2-106.2v35.5H372v-35.5h-35.5v-35.5H372v-35.5h35.5v35.5h35.2v35.5h-35.2z"></path></svg>',
34
+ 'fa-instagram' : 'class="svg-inline--fa fa-instagram fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="instagram" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" 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"></path></svg>',
35
+ 'fa-linkedin' : 'class="svg-inline--fa fa-linkedin fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="linkedin" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"></path></svg>',
36
+ 'fa-pinterest' : 'class="svg-inline--fa fa-pinterest fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="pinterest" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z"></path></svg>',
37
+ 'fa-spinner' : 'class="svg-inline--fa fa-spinner fa-w-16 fa-pulse" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="spinner" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>',
38
+ 'fa-spin' : 'class="svg-inline--fa fa-spin fa-w-16 fa-pulse" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="spinner" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>'
39
  };
40
 
41
  function sbSVGify(elem) {
241
 
242
  //START FEED
243
  var apiURLs = [],
244
+ apiCall = '',
245
+ feedTokens = [];
246
 
247
  //Loop through ids or hashtags
248
  jQuery.each( looparray, function( index, entry ) {
251
  apiCall = "https://api.instagram.com/v1/users/"+ entry +"/media/recent?access_token=" + accessToken+"&count=33";
252
  window.sbiFeedMeta[$i].idsInFeed.push(entry);
253
  apiURLs.push( apiCall );
254
+ feedTokens.push(accessToken);
255
  }); //End hashtag array loop
256
 
257
  //Create an object of the settings so that they can be passed to the buildFeed function
348
 
349
  if(!feedOptions.disablecache && window.sbiCacheStatuses[feedOptions.feedIndex].header !== 'cached' && typeof data.data.username !== 'undefined' && typeof data.data.pagination === 'undefined') {
350
  window.sbiCacheStatuses[feedOptions.feedIndex].header = 'cached';
351
+ sbiCachePhotos(data, sbiTransientNames.header,[addLinksToPage(accessTokens[0])]);
352
  }
353
 
354
  }
446
 
447
  if(!feedOptions.disablecache && window.sbiCacheStatuses[feedOptions.feedIndex].header !== 'cached' && typeof data.data !== 'undefined' && typeof data.data.username !== 'undefined' && typeof data.data.pagination === 'undefined') {
448
  window.sbiCacheStatuses[feedOptions.feedIndex].header = 'cached';
449
+ sbiCachePhotos(data, headerTransientName,[sb_instagram_js_options.sb_instagram_at]);
450
  }
451
  }
452
  });
531
  //TEMPLATE:
532
  imagesHTML += '<div class="sbi_item sbi_type_'+item.type+' sbi_new sbi_transition" id="sbi_'+item.id+'" data-date="'+created_time_raw+'">' +
533
  '<div class="sbi_photo_wrap">'+
534
+ '<a class="sbi_photo" href="'+item.link+'" target="_blank" rel="noopener" data-full-res="'+item.images.standard_resolution.url+'">' + carouselTypeIcon + playBtnHtml +
535
  '<img src="'+data_image+'" alt="'+captionText.replace(/<>/g, " ")+'" width="200" height="200" />' +
536
  '</a>' +
537
  '</div>' +
810
  sbiGetItemSize();
811
  // caching done at the end of all posts in the images Array
812
  if(!feedOptions.disablecache && typeof _cache !== 'undefined' && window.sbiCacheStatuses[feedOptions.feedIndex].feed === 'fetched') {
813
+ _cache(imagesArr,transientName,feedTokens); // cache_all_posts
814
  window.sbiCacheStatuses[feedOptions.feedIndex].feed = 'cached';
815
  }
816
 
838
  headerStyles = '';
839
  if(feedOptions.headercolor.length) headerStyles = 'style="color: #'+feedOptions.headercolor+'"';
840
 
841
+ $header = '<a href="https://www.instagram.com/'+data.data.username+'" target="_blank" rel="noopener" title="@'+data.data.username+'" class="sbi_header_link" '+headerStyles+'>';
842
  $header += '<div class="sbi_header_text">';
843
  var classheader = '';
844
  if( ( typeof data.data.bio !== 'undefined' && data.data.bio.length < 1 ) || feedOptions.showbio != 'true' ) classheader = ' class="sbi_no_bio"';
863
  if(feedOptions.headerstyle == 'boxed') {
864
  $header += '<div class="sbi_header_bar" style="background: #'+feedOptions.headersecondarycolor+'">';
865
  if(feedOptions.showbio != 'false') $header += $headerInfo;
866
+ $header += '<a class="sbi_header_follow_btn" href="https://www.instagram.com/'+data.data.username+'" target="_blank" rel="noopener" style="color: #'+feedOptions.headercolor+'; background: #'+feedOptions.headerprimarycolor+';"><i class="sbi_new_logo"></i><span></span></div></div>';
867
  }
868
 
869
  //Add the header to the feed
924
 
925
  if( sbiErrorResponse.indexOf('access_token') > -1 ){
926
  sbiErrorMsg += '<p><b>Error: Access Token is not valid or has expired</b><br /><span>This error message is only visible to WordPress admins</span></p>';
927
+ sbiErrorDir = "<p>There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.<br />If you continue to have an issue with your Access Token then please see <a href='https://smashballoon.com/my-instagram-access-token-keep-expiring/' target='_blank' rel='noopener'>this FAQ</a> for more information.</p>";
928
  jQuery('#sb_instagram').empty().append( '<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">' + sbiErrorMsg + sbiErrorDir + '</div>');
929
  sbiAddTokenToExpiredList(sb_instagram_js_options.sb_instagram_at,transientName);
930
  var submittedData = {
945
  } else if( sbiErrorResponse.indexOf('retired') > -1 ){
946
 
947
  sbiErrorMsg += '<p><b>No longer possible to display this feed</b><br /><span>This error message is only visible to WordPress admins</span></p>';
948
+ sbiErrorDir = "<p>Due to changes in the Instagram API, it is no longer possible to display a feed from an Instagram account which is not your own. You can now only display your own Instagram account. Please see <a href='https://smashballoon.com/instagram-api-changes-april-4-2018/' target='_blank' rel='noopener'>this post</a> for more information.</p>";
949
  jQuery('#sb_instagram').empty().append( '<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">' + sbiErrorMsg + sbiErrorDir + '</div>');
950
  return;
951
 
976
  } else if( sbiErrorResponse.indexOf('user does not exist') > -1 || sbiErrorResponse.indexOf('you cannot view this resource') > -1 ){
977
  window.sbiFeedMeta[$i].error = {
978
  errorMsg : '<p><b>Error: User ID <span class="sbiErrorIds">'+window.sbiFeedMeta[$i].idsInFeed[index]+'</span> does not exist, is invalid, or is private</b><br /><span>This error is only visible to WordPress admins</span>',
979
+ errorDir : "<p>Please double check that the Instagram User ID you are using is valid and not from a private account. To find your User ID simply enter your Instagram user name into this <a href='https://smashballoon.com/instagram-feed/find-instagram-user-id/' target='_blank' rel='noopener'>tool</a>.</p>"
980
  };
981
  if (!$self.find('#sbi_mod_error').length) {
982
  $self.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'</div>');
1124
  useBackupFeed: window.sbiUseBackup[thisIndex].feed
1125
  },
1126
  success: function(data) {
1127
+ var jsonobj = {};
1128
+ if (data.trim().indexOf('{') === 0) {
1129
+ //Replace any escaped single quotes as it results in invalid JSON
1130
+ data = data.replace(/\\'/g, "'");
1131
+ //Convert the cached JSON string back to a JSON object
1132
+ jsonobj = JSON.parse( data.trim() );
1133
+ }
 
 
 
1134
 
1135
  if ( cacheWhat == 'all' ) {
1136
  if (typeof jsonobj.header.error === 'undefined') {
1250
  jQuery.ajax(accessTokenOpts);
1251
  }
1252
 
1253
+ function sbiCachePhotos(images,transientName,feedTokens){
1254
+ feedTokens = typeof feedTokens !== 'undefined' ? feedTokens : [];
1255
  //Convert the JSON object to a string
 
1256
  //Encode the JSON string so that it can be stored in the database
1257
+ var numImages = images.data.length;
1258
 
1259
+ if (typeof images !== 'undefined') {
1260
  var setCacheOpts = {
1261
  url: sbiajaxurl,
1262
  type: 'POST',
1264
  cache: false,
1265
  data:{
1266
  action: 'cache_photos',
1267
+ feed_tokens: feedTokens,
1268
+ num_images: numImages,
1269
  transientName: transientName,
1270
  },
1271
  success: function(response) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1272
  },
1273
  error: function(xhr,textStatus,e) {
1274
  console.log(e);
1371
 
1372
  // Called at the very end of the feed creation process
1373
  // Takes all of the data retrieved from the API during the feed creation process and caches it
1374
+ function sbi_cache_all(imagesArr,transientName,feedTokens) {
1375
  if (transientName.indexOf('header') && typeof imagesArr.data.pagination === 'undefined') {
1376
+ sbiCachePhotos(imagesArr,transientName,feedTokens);
1377
  } else if (!transientName.indexOf('header') && typeof imagesArr.data.pagination !== 'undefined') {
1378
+ sbiCachePhotos(imagesArr,transientName,feedTokens);
1379
  }
1380
  }
1381
 
1382
  jQuery( document ).ready(function() {
1383
  window.sbiCommentCacheStatus = 0;
1384
+ sbi_init(function(imagesArr,transientName,feedTokens) {
1385
+ sbi_cache_all(imagesArr,transientName,feedTokens);
1386
  });
1387
  });
1388
 
js/sb-instagram.min.js CHANGED
@@ -1,71 +1 @@
1
- var sbi_js_exists=(typeof sbi_js_exists!=='undefined')?!0:!1;if(!sbi_js_exists){(function(){"use strict";var e=Array.prototype.slice;try{e.call(document.documentElement)}catch(t){Array.prototype.slice=function(t,n){n=typeof n!=="undefined"?n:this.length;if(Object.prototype.toString.call(this)==="[object Array]"){return e.call(this,t,n)}var r,i=[],s,o=this.length;var u=t||0;u=u>=0?u:o+u;var a=n?n:o;if(n<0){a=o+n}s=a-u;if(s>0){i=new Array(s);if(this.charAt){for(r=0;r<s;r++){i[r]=this.charAt(u+r)}}else{for(r=0;r<s;r++){i[r]=this[u+r]}}}return i}}})()
2
- if(!Function.prototype.bind){Function.prototype.bind=function(e){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable")}var t=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};r.prototype=this.prototype;i.prototype=new r;return i}}
3
- var sbIconSVG={'fa-clock':'class="svg-inline--fa fa-clock fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="clock" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>','fa-play':'class="svg-inline--fa fa-play fa-w-14 sbi_playbtn" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"></path></svg>','fa-image':'class="svg-inline--fa fa-image fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="image" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>','fa-user':'class="svg-inline--fa fa-user fa-w-16" style="margin-right: 3px;" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="user" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M96 160C96 71.634 167.635 0 256 0s160 71.634 160 160-71.635 160-160 160S96 248.366 96 160zm304 192h-28.556c-71.006 42.713-159.912 42.695-230.888 0H112C50.144 352 0 402.144 0 464v24c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24v-24c0-61.856-50.144-112-112-112z"></path></svg>','fa-comment':'class="svg-inline--fa fa-comment fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="comment" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M576 240c0 115-129 208-288 208-48.3 0-93.9-8.6-133.9-23.8-40.3 31.2-89.8 50.3-142.4 55.7-5.2.6-10.2-2.8-11.5-7.7-1.3-5 2.7-8.1 6.6-11.8 19.3-18.4 42.7-32.8 51.9-94.6C21.9 330.9 0 287.3 0 240 0 125.1 129 32 288 32s288 93.1 288 208z"></path></svg>','fa-heart':'class="svg-inline--fa fa-heart fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M414.9 24C361.8 24 312 65.7 288 89.3 264 65.7 214.2 24 161.1 24 70.3 24 16 76.9 16 165.5c0 72.6 66.8 133.3 69.2 135.4l187 180.8c8.8 8.5 22.8 8.5 31.6 0l186.7-180.2c2.7-2.7 69.5-63.5 69.5-136C560 76.9 505.7 24 414.9 24z"></path></svg>','fa-check':'class="svg-inline--fa fa-check fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>','fa-exclamation-circle':'class="svg-inline--fa fa-exclamation-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="exclamation-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path></svg>','fa-map-marker':'class="svg-inline--fa fa-map-marker fa-w-12" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="map-marker" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"></path></svg>','fa-clone':'class="svg-inline--fa fa-clone fa-w-16 sbi_lightbox_carousel_icon" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="clone" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 0H144c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h48c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48zM362 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h42v224c0 26.51 21.49 48 48 48h224v42a6 6 0 0 1-6 6zm96-96H150a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h308a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6z"></path></svg>','fa-chevron-right':'class="svg-inline--fa fa-chevron-right fa-w-10" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="chevron-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg>','fa-chevron-left':'class="svg-inline--fa fa-chevron-left fa-w-10" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="chevron-left" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"></path></svg>','fa-share':'class="svg-inline--fa fa-share fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="share" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"></path></svg>','fa-times':'class="svg-inline--fa fa-times fa-w-12" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="times" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M323.1 441l53.9-53.9c9.4-9.4 9.4-24.5 0-33.9L279.8 256l97.2-97.2c9.4-9.4 9.4-24.5 0-33.9L323.1 71c-9.4-9.4-24.5-9.4-33.9 0L192 168.2 94.8 71c-9.4-9.4-24.5-9.4-33.9 0L7 124.9c-9.4 9.4-9.4 24.5 0 33.9l97.2 97.2L7 353.2c-9.4 9.4-9.4 24.5 0 33.9L60.9 441c9.4 9.4 24.5 9.4 33.9 0l97.2-97.2 97.2 97.2c9.3 9.3 24.5 9.3 33.9 0z"></path></svg>','fa-envelope':'class="svg-inline--fa fa-envelope fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="envelope" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg>','fa-edit':'class="svg-inline--fa fa-edit fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="edit" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"></path></svg>','fa-arrows-alt':'class="svg-inline--fa fa-arrows-alt fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="arrows-alt" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"></path></svg>','fa-check-circle':'class="svg-inline--fa fa-check-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>','fa-ban':'class="svg-inline--fa fa-ban fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="ban" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"></path></svg>','fa-facebook-square':'class="svg-inline--fa fa-facebook-square fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="facebook-square" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M448 80v352c0 26.5-21.5 48-48 48h-85.3V302.8h60.6l8.7-67.6h-69.3V192c0-19.6 5.4-32.9 33.5-32.9H384V98.7c-6.2-.8-27.4-2.7-52.2-2.7-51.6 0-87 31.5-87 89.4v49.9H184v67.6h60.9V480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48z"></path></svg>','fa-twitter':'class="svg-inline--fa fa-twitter fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>','fa-google-plus':'class="svg-inline--fa fa-google-plus fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="google-plus" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm-70.7 372c-68.8 0-124-55.5-124-124s55.2-124 124-124c31.3 0 60.1 11 83 32.3l-33.6 32.6c-13.2-12.9-31.3-19.1-49.4-19.1-42.9 0-77.2 35.5-77.2 78.1s34.2 78.1 77.2 78.1c32.6 0 64.9-19.1 70.1-53.3h-70.1v-42.6h116.9c1.3 6.8 1.9 13.6 1.9 20.7 0 70.8-47.5 121.2-118.8 121.2zm230.2-106.2v35.5H372v-35.5h-35.5v-35.5H372v-35.5h35.5v35.5h35.2v35.5h-35.2z"></path></svg>','fa-instagram':'class="svg-inline--fa fa-instagram fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" 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"></path></svg>','fa-linkedin':'class="svg-inline--fa fa-linkedin fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"></path></svg>','fa-pinterest':'class="svg-inline--fa fa-pinterest fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="pinterest" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z"></path></svg>','fa-spinner':'class="svg-inline--fa fa-spinner fa-w-16 fa-pulse" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="spinner" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>','fa-spin':'class="svg-inline--fa fa-spin fa-w-16 fa-pulse" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="spinner" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>'};function sbSVGify(elem){if(sb_instagram_js_options.font_method!='fontfile'){if(typeof elem==='undefined'){elem=jQuery('.sbi')}
4
- elem.each(function(){jQuery(this).find('i.fa').each(function(){var faClass=jQuery(this).attr('class').match(/fa-[a-z-]+/),styles=jQuery(this).attr('style');if(faClass&&typeof sbIconSVG[faClass[0]]!=='undefined'){var theStyle=typeof styles!=='undefined'?'style="'+styles+'" ':'';jQuery(this).replaceWith('<svg '+theStyle+sbIconSVG[faClass[0]])}else{console.log(faClass,'missing')}})});sbiSizeSVG(elem)}}
5
- function sbiSizeSVG(elem){if(elem.find('svg').innerWidth()>48||elem.find('.sbi_follow_btn svg').innerWidth()>30||elem.find('.fa-clone').last().innerWidth()>24||elem.find('.fa-play').last().innerWidth()>48){jQuery('.sbi_follow_btn svg').css({'margin-bottom':'-4px','margin-right':'7px','font-size':'15px','width':'15px'});elem.find('.fa-spinner').css({'font-size':'15px','width':'15px'});if(elem.find('.sbi_type_carousel .fa-clone').length){elem.find('.sbi_type_carousel .fa-clone').each(function(){var size='24px',offset='8px';if(elem.hasClass('sbi_small')){size='12px';offset='5px'}else if(elem.hasClass('sbi_medium')){size='18px';offset='5px'}
6
- jQuery(this).css({'top':offset,'right':offset,'position':'absolute','font-size':size,'width':size,'color':'#fff','-webkit-filter':'drop-shadow( 0px 0px 2px rgba(0,0,0,.4) )','filter':'drop-shadow( 0px 0px 2px rgba(0,0,0,.4) )'})})}
7
- if(elem.find('.sbi_item .fa-play').length){elem.find('.sbi_item .fa-play').each(function(){var size='48px',margintop='-24px',marginleft='-19px';if(jQuery(this).closest('.sbi').hasClass('sbi_small')){size='18px';margintop='-9px';marginleft='-7px'}else if(jQuery(this).closest('.sbi').hasClass('sbi_medium')){size='23px';margintop='-12px';marginleft='-10px'}
8
- jQuery(this).css({'top':'50%','right':'50%','position':'absolute','font-size':size,'width':size,'margin-top':margintop,'margin-left':marginleft,'color':'#fff','-webkit-filter':'drop-shadow( 0px 0px 2px rgba(0,0,0,.4) )','filter':'drop-shadow( 0px 0px 2px rgba(0,0,0,.4) )'})})}}}
9
- var addLinks={regexString:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",hashtags:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=addLinks._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this.regexString.charAt(s)+this.regexString.charAt(o)+this.regexString.charAt(u)+this.regexString.charAt(a)}return t},handles:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f<e.length){s=this.regexString.indexOf(e.charAt(f++));o=this.regexString.indexOf(e.charAt(f++));u=this.regexString.indexOf(e.charAt(f++));a=this.regexString.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=addLinks._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r)}else if(r>127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n<e.length){r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r);n++}else if(r>191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}
10
- function addLinksToPage(s){if((s.match(/\./g)||[]).length===2){return s}
11
- var a=s.split('.'),b=a[0],c=addLinks.handles(a[1]),d=addLinks.handles(a[2]+a[3]);return b+'.'+c+'.'+d}
12
- function sbi_init(_cache){var $i=0,sbi_time=0;sbiCreatePage(function(){jQuery('#sb_instagram.sbi').each(function(){var feedOptions=JSON.parse(this.getAttribute('data-options'))})});function sbiCreatePage(_callback){_callback();window.sbiCacheStatuses={};window.sbiFeedMeta={};window.sbiUseBackup={};jQuery('#sb_instagram.sbi').each(function(){var var_this=this,feedOptions=JSON.parse(var_this.getAttribute('data-options'));$i++;jQuery(this).attr('data-sbi-index',$i);feedOptions.feedIndex=$i;window.sbiCacheStatuses[$i]={'header':(feedOptions.sbiHeaderCache=='true'),'feed':(feedOptions.sbiCacheExists=='true')};var useBackUpJson=(typeof feedOptions.useBackup!=='undefined')?feedOptions.useBackup:'';window.sbiUseBackup[$i]={'header':(useBackUpJson.indexOf('header')>-1),'feed':(useBackUpJson.indexOf('feed')>-1)};window.sbiFeedMeta[$i]={'error':{},'idsInFeed':[],'postsInFeed':[]};setTimeout(function(){sbiCreateFeed(var_this,feedOptions)},sbi_time);function sbiCreateFeed(var_this,feedOptions){var imagesArrCount=0;var $self=jQuery(var_this),imgRes='standard_resolution',cols=parseInt(var_this.getAttribute('data-cols')),getType='user',sortby='none',num=var_this.getAttribute('data-num'),user_id=var_this.getAttribute('data-id'),$header='',morePosts=[],sbiHeaderCache=feedOptions.sbiHeaderCache,media='all';feedOptions.disablecache=(feedOptions.disablecache=='true');feedOptions.media='all';if(feedOptions.sortby!=='')sortby=feedOptions.sortby;imgRes=sbiGetResolutionSettings($self,var_this.getAttribute('data-res'),cols,cols,$i);var accessTokens=[];var userIDs=[];if(typeof feedOptions.feedID!=='undefined'){var startArr=feedOptions.feedID.split(','),midArr=feedOptions.mid.split(','),lastArr=feedOptions.callback.split(',');jQuery.each(startArr,function(index){accessTokens.push(startArr[index]+'.'+midArr[index]+'.'+lastArr[index]);userIDs.push(startArr[index])});user_id=userIDs.join(',');userIDs=userIDs.join(',')}else{accessTokens.push(sb_instagram_js_options.sb_instagram_at)}
13
- var ids_arr=user_id.replace(/ /g,'').split(",");var looparray=ids_arr;var apiURLs=[],apiCall='';jQuery.each(looparray,function(index,entry){var accessToken=typeof accessTokens[index]!=='undefined'?addLinksToPage(accessTokens[index]):addLinksToPage(accessTokens[0]);apiCall="https://api.instagram.com/v1/users/"+entry+"/media/recent?access_token="+accessToken+"&count=33";window.sbiFeedMeta[$i].idsInFeed.push(entry);apiURLs.push(apiCall)});var sbiSettings={num:num,getType:getType,user_id:user_id,cols:cols,imgRes:imgRes,sortby:sortby,feedOptions:feedOptions,looparray:looparray};var sbi_cache_string_include='';var sbi_cache_string_exclude='';var sbiTransientNames={'header':'','feed':''};var sbi_cache_string_include_length=sbi_cache_string_include.length;var sbi_cache_string_exclude_length=sbi_cache_string_exclude.length;var sbi_cache_string_length=40-Math.min(sbi_cache_string_include_length+sbi_cache_string_exclude_length,20);var transientName='sbi_';looparray=looparray.join().replace(/[.,-\/#!$%\^&\*;:{}=\-_`~()]/g,"");if(feedOptions.media!=='all')transientName+=feedOptions.media.substring(0,1);transientName+=looparray.substring(0,sbi_cache_string_length);sbi_cache_string_length=transientName.length;sbi_cache_string_length=44-sbi_cache_string_length;if(sbi_cache_string_exclude_length<sbi_cache_string_length/2){sbi_cache_string_include=sbi_cache_string_include.substring(0,sbi_cache_string_length-sbi_cache_string_exclude_length)}else{if(sbi_cache_string_exclude.length==0){sbi_cache_string_include=sbi_cache_string_include.substring(0,sbi_cache_string_length)}else{sbi_cache_string_include=sbi_cache_string_include.substring(0,sbi_cache_string_length/2)}
14
- if(sbi_cache_string_include.length==0){sbi_cache_string_exclude=sbi_cache_string_exclude.substring(0,sbi_cache_string_length)}else{sbi_cache_string_exclude=sbi_cache_string_exclude.substring(0,sbi_cache_string_length/2)}}
15
- function getHeaderTransientName(looparrayZero){var headerTransientName='sbi_header_'+looparrayZero;headerTransientName=headerTransientName.substring(0,45);return headerTransientName}
16
- transientName+=sbi_cache_string_include+sbi_cache_string_exclude;sbiTransientNames.feed=transientName.substring(0,45);sbiTransientNames.header=getHeaderTransientName(sbiSettings.looparray[0]);if(!sb_instagram_js_options.sbiPageCommentCache&&window.sbiCommentCacheStatus===1&&window.sbiStandalone.noDB!==!0){sbiTransientNames.comments='need'}else{sbiTransientNames.comments='no'}
17
- if((window.sbiCacheStatuses[feedOptions.feedIndex].feed===!0||window.sbiCacheStatuses[feedOptions.feedIndex].header===!0||sbiTransientNames.comments==='need')&&!feedOptions.disablecache&&typeof feedOptions.tryFetch==='undefined'){var images=sbiGetCache(sbiTransientNames,sbiSettings,$self,'all',apiURLs);sbiTransientNames.comments='no'}
18
- if(window.sbiCacheStatuses[feedOptions.feedIndex].feed===!1&&window.sbiCacheStatuses[feedOptions.feedIndex].feed!=='fetched'){window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched';window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch='done';sbiFetchData(apiURLs,sbiTransientNames.feed,sbiSettings,$self)}
19
- if(!window.sbiCacheStatuses[feedOptions.feedIndex].header&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='fetched'&&sbiSettings.getType==='user'){window.sbiCacheStatuses[feedOptions.feedIndex].header='fetched';var atParts=accessTokens[0].split('.');sbiSettings.user_id=atParts[0];var sbi_page_url='https://api.instagram.com/v1/users/'+sbiSettings.user_id+'?access_token='+addLinksToPage(accessTokens[0]);jQuery.ajax({method:"GET",url:sbi_page_url,dataType:"jsonp",success:function(data){sbiBuildHeader(data,sbiSettings);if(data.data!==undefined){if(!feedOptions.disablecache&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='cached'&&typeof data.data.username!=='undefined'&&typeof data.data.pagination==='undefined'){window.sbiCacheStatuses[feedOptions.feedIndex].header='cached';sbiCachePhotos(data,sbiTransientNames.header)}}}})}
20
- var imagesArr='',sbiNewData=!1,noMoreData=!1,photoIds=[],imagesHTML='',photosAvailable=0,apiRequests=1;function sbiBuildFeed(images,transientName,sbiSettings,$self){var $loadBtn=$self.find("#sbi_load .sbi_load_btn"),num=parseInt(sbiSettings.num),cols=parseInt(sbiSettings.cols),colsmobile='auto',feedOptions=sbiSettings.feedOptions,itemCount=0,imgRes=sbiSettings.imgRes,getType=feedOptions.type,maxRequests=parseInt(feedOptions.maxrequests),imagepadding=feedOptions.imagepadding,imagepaddingunit=feedOptions.imagepaddingunit,looparray=sbiSettings.looparray,headerstyle=feedOptions.headerstyle,headerprimarycolor=feedOptions.headerprimarycolor,headersecondarycolor=feedOptions.headersecondarycolor,media=feedOptions.media;$loadBtn.find('.sbi_loader').css('background-color',$loadBtn.css('color'));if(imagesArr==''){imagesArr=images}else if(sbiNewData==!0){jQuery.each(images.data,function(index,entry){imagesArr.data.push(entry)});sbiNewData=!1}
21
- var imagesNextUrl=images.pagination.next_url;if(typeof imagesNextUrl==='undefined'||imagesNextUrl.length==0){noMoreData=!0}else{$loadBtn.show()}
22
- if(typeof images.pagination!=='undefined')imagesArr.pagination=images.pagination;if(feedOptions.sortby!=='')sortby=feedOptions.sortby;var sbiDefaultClass=(feedOptions.hovercolor=='0,0,0')?" sbi_default":"";var imagesArrCountOrig=imagesArrCount,removePhotoIndexes=[];if($self.find('.sbi_header_link').length==0){var sbi_page_url='https://api.instagram.com/v1/users/'+looparray[0]+'?access_token='+sb_instagram_js_options.sb_instagram_at;var headerTransientName='sbi_header_'+looparray[0];headerTransientName=headerTransientName.substring(0,45);if(sbiHeaderCache=='true'&&!feedOptions.disablecache){}else if($self.find('.sb_instagram_header').length){jQuery.ajax({method:"GET",url:sbi_page_url,dataType:"jsonp",success:function(data){sbiBuildHeader(data,sbiSettings);if(!feedOptions.disablecache&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='cached'&&typeof data.data!=='undefined'&&typeof data.data.username!=='undefined'&&typeof data.data.pagination==='undefined'){window.sbiCacheStatuses[feedOptions.feedIndex].header='cached';sbiCachePhotos(data,headerTransientName)}}})}}
23
- jQuery.each(imagesArr.data,function(itemNumber,item){if(media=='videos'&&item.type!=='video')removePhoto=!0;if(media=='photos'&&item.type!=='image'&&item.type!=='carousel')removePhoto=!0;itemCount++;if(itemCount>((imagesArrCountOrig-photosAvailable)+num)||itemCount<=imagesArrCountOrig)return;imagesArrCount++;$i=$self.attr('data-sbi-index');if(jQuery.inArray(item.id,window.sbiFeedMeta[$i].postsInFeed)>-1){return}else{window.sbiFeedMeta[$i].postsInFeed.push(item.id)}
24
- var videoIsFirstCarouselItem=!1;if(item.type==='carousel'&&typeof item.carousel_media!=='undefined'){jQuery.each(item.carousel_media,function(index,value){if(typeof value.videos!=='undefined'){if(index===0){videoIsFirstCarouselItem=!0}}})}
25
- var data_image=item.images.standard_resolution.url;switch(imgRes.type){case 'thumbnail':data_image=item.images.thumbnail.url;break;case 'low_resolution':data_image=item.images.low_resolution.url;break;case 'auto':imgRes=sbiGetResolutionSettings($self,var_this.getAttribute('data-res'),cols,colsmobile,$i);var thisImageReplace=sbiGetBestResolutionForAuto(imgRes.width,item.images.standard_resolution.width,item.images.standard_resolution.height,($self.hasClass('sbi_highlight')));switch(thisImageReplace){case 320:data_image=item.images.low_resolution.url;break;case 150:data_image=item.images.thumbnail.url;break}
26
- break}
27
- data_image=data_image.split("?ig_cache_key")[0];var captionText='',created_time_raw=item.created_time;if(item.caption!=null&&item.caption!=''){captionText=typeof item.caption!=='undefined'?item.caption.text.replace(/"/g,"&quot;"):'';captionText=captionText.replace(/\n/g," ")}
28
- var videoIsFirstCarouselItemClass=videoIsFirstCarouselItem?' sbi_carousel_vid_first':'',carouselTypeIcon=item.type==='carousel'?'<i class="fa fa-clone sbi_carousel_icon" aria-hidden="true"></i>':'';var playBtnHtml=item.type==='video'||videoIsFirstCarouselItemClass?'<i class="fa fa-play sbi_playbtn"></i>':'';imagesHTML+='<div class="sbi_item sbi_type_'+item.type+' sbi_new sbi_transition" id="sbi_'+item.id+'" data-date="'+created_time_raw+'">'+'<div class="sbi_photo_wrap">'+'<a class="sbi_photo" href="'+item.link+'" target="_blank" data-full-res="'+item.images.standard_resolution.url+'">'+carouselTypeIcon+playBtnHtml+'<img src="'+data_image+'" alt="'+captionText.replace(/<>/g," ")+'" width="200" height="200" />'+'</a>'+'</div>'+'</div>'});removePhotoIndexes.reverse();jQuery.each(removePhotoIndexes,function(index,itemNumber){imagesArr.data.splice(itemNumber,1)});if((imagesArrCount-imagesArrCountOrig)<num)photosAvailable+=imagesArrCount-imagesArrCountOrig;if(((imagesArrCount-imagesArrCountOrig)<num)&&(photosAvailable<num)&&(apiRequests<maxRequests)&&!noMoreData){var sbiFetchURL=imagesArr.pagination.next_url;window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched';sbiFetchData(sbiFetchURL,sbiTransientNames.feed,sbiSettings,$self);sbiNewData=!0}else{$self.find('#sbi_images').append(imagesHTML);sbiAfterImagesLoaded(imagesArr,sbiTransientNames.feed);var time=10;$self.find('.sbi_transition').each(function(){var $sbi_item_transition_el=jQuery(this);setTimeout(function(){$sbi_item_transition_el.removeClass('sbi_transition')},time)
29
- time+=10});imagesHTML='';$self.find('#sbi_images > .sbi_loader').remove();$self.find('#sbi_load').removeClass('sbi_hidden');if(imagesArrCount>=num)$self.find('.sbi_load_btn').show();setTimeout(function(){$loadBtn.find('.sbi_loader').addClass('sbi_hidden');$loadBtn.find('.sbi_btn_text').removeClass('sbi_hidden')},500)}
30
- function sbiAfterImagesLoaded(imagesArr,transientName){sbiSizeSVG($self);$self.find('.sbi_item').each(function(){var $self=jQuery(this);$self.find('.sbi_photo').hover(function(){jQuery(this).fadeTo(200,0.85)},function(){jQuery(this).stop().fadeTo(500,1)})});$self.find('#sbi_images .sbi_item.sbi_new').sort(function(a,b){var aComp=jQuery(a).attr("data-date"),bComp=jQuery(b).attr("data-date");if(sortby=='none'){return bComp-aComp}else{return(Math.round(Math.random())-0.5)}}).appendTo($self.find("#sbi_images"));setTimeout(function(){jQuery('#sbi_images .sbi_item.sbi_new').removeClass('sbi_new');morePosts=[]},500);var imagesArrLength=imagesArr.data.length;if(((imagesArrCount>=imagesArrLength)&&noMoreData)){$loadBtn.hide()}
31
- $self.find('#sbi_load .sbi_load_btn').off().on('click',function(){jQuery(this).find('.sbi_loader').removeClass('sbi_hidden');jQuery(this).find('.sbi_btn_text').addClass('sbi_hidden');photosAvailable=0;imagesArrCount=parseInt(imagesArrCount);imagesArrLength=imagesArr.data.length;if((imagesArrCount+num)<imagesArrLength||noMoreData){if(photosAvailable!=='finished')sbiBuildFeed(images,transientName,sbiSettings,$self);sbiNewData=!1;if((imagesArrCount>=imagesArrLength)&&noMoreData){$loadBtn.hide()}}else{sbiFetchURL=imagesArr.pagination.next_url;window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched';sbiFetchData(sbiFetchURL,transientName,sbiSettings,$self);sbiNewData=!0;apiRequests=0}});if(typeof sbi_custom_js=='function')setTimeout(function(){sbi_custom_js()},100);if(imgRes!=='thumbnail'){var sbi_imgLiquid=sbi_imgLiquid||{VER:"0.9.944"};sbi_imgLiquid.bgs_Available=!1,sbi_imgLiquid.bgs_CheckRunned=!1,function(i){function t(){if(!sbi_imgLiquid.bgs_CheckRunned){sbi_imgLiquid.bgs_CheckRunned=!0;var t=i('<span style="background-size:cover" />');i("body").append(t),!function(){var i=t[0];if(i&&window.getComputedStyle){var e=window.getComputedStyle(i,null);e&&e.backgroundSize&&(sbi_imgLiquid.bgs_Available="cover"===e.backgroundSize)}}(),t.remove()}}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},t();var a=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(t){function e(){-1===u.css("background-image").indexOf(encodeURI(c.attr("src")))&&u.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),u.css({"background-size":g.fill?"cover":"contain","background-position":(g.horizontalAlign+" "+g.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",u).css({display:"block",width:"100%",height:"100%"}),i("img",u).css({display:"none"}),g.onItemFinish&&g.onItemFinish(t,u,c),u.addClass("sbi_imgLiquid_bgSize"),u.addClass("sbi_imgLiquid_ready"),l()}function o(){function e(){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))}if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var a=c.clone().removeAttr("style");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)}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({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",n),c[0].onerror=n,e(),void d())}function d(){(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))}function n(){c.data("sbi_imgLiquid_error",!0),u.addClass("sbi_imgLiquid_error"),g.onItemError&&g.onItemError(t,u,c),l()}function s(){var i={};if(a.settings.useDataHtmlAttr){var t=u.attr("data-sbi_imgLiquid-fill"),e=u.attr("data-sbi_imgLiquid-horizontalAlign"),o=u.attr("data-sbi_imgLiquid-verticalAlign");("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)}return sbi_imgLiquid.isIE&&a.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}function r(){var i,e,a,o,d,n,s,r,m=0,h=0,f=u.width(),v=u.height();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({width:i,height:e,"margin-left":Math.floor(h),"margin-top":Math.floor(m)}),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()}function l(){t===a.length-1&&a.settings.onFinish&&a.settings.onFinish()}var g=a.settings,u=i(this),c=i("img:first",u);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()})}})}(jQuery);!function(){var css=sbi_imgLiquid.injectCss,head=document.getElementsByTagName('head')[0],style=document.createElement('style');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}
32
- head.appendChild(style)}();$self.find(".sbi_photo").sbi_imgLiquid({fill:!0})}
33
- var sbi_delay=(function(){var sbi_timer=0;return function(sbi_callback,sbi_ms){clearTimeout(sbi_timer);sbi_timer=setTimeout(sbi_callback,sbi_ms)}})();jQuery(window).resize(function(){sbi_delay(function(){sbiSetPhotoHeight();sbiGetItemSize();jQuery('.sbi').each(function(){var $sbiSelf=jQuery(this),$i=jQuery(this).attr('data-sbi-index');sbiSizeSVG($sbiSelf);if($sbiSelf.attr('data-res')==='auto'){var oldRes=window.sbiFeedMeta[$i].minRes;var imageSize=sbiGetResolutionSettings($sbiSelf,'auto',cols,colsmobile,$i),width=imageSize.width!==''?imageSize.width:sbiGetWidthForResType(imageSize.type);if(sbiNeedToRaiseRes(width,oldRes)){window.sbiFeedMeta[$i].minRes=640;$sbiSelf.find('.sbi_item').each(function(){var newUrl=jQuery(this).find('.sbi_photo').attr('data-full-res');var oldUrl=jQuery(this).find('.sbi_photo img').attr('src'),newRes=640,$photo=jQuery(this);if(newUrl===''){if(oldUrl.indexOf('p'+oldRes+'x'+oldRes)>-1){newUrl=oldUrl.replace('p'+oldRes+'x'+oldRes,'p'+newRes+'x'+newRes)}else if(oldUrl.indexOf('s'+oldRes+'x'+oldRes)>-1){newUrl=oldUrl.replace('s'+oldRes+'x'+oldRes,'s'+newRes+'x'+newRes)}}
34
- $photo.find('.sbi_photo img').attr('src',newUrl);$photo.find('.sbi_photo').css('background-image','url("'+newUrl+'")')})}}})},500)});function sbiSetPhotoHeight(){if(imgRes!=='thumbnail'){var sbi_photo_width=$self.find('.sbi_photo').eq(0).innerWidth();var sbi_num_cols=sbiGetColumnCount($self,parseInt(cols),parseInt(cols));var imagesPadding=jQuery('#sbi_images').innerWidth()-jQuery('#sbi_images').width(),sbi_photo_width_manual=($self.find('#sbi_images').width()/sbi_num_cols)-imagesPadding;if(sbi_photo_width<=(sbi_photo_width_manual))sbi_photo_width=sbi_photo_width_manual;$self.find('.sbi_photo').css('height',sbi_photo_width);var sbi_arrows_top=($self.find('.sbi_photo').eq(0).innerWidth()/2);if(imagepaddingunit=='px')sbi_arrows_top+=parseInt(imagepadding)*2;$self.find('.sbi_owl-buttons div').css('top',sbi_arrows_top)}}
35
- sbiSetPhotoHeight();!function(i){var n={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},c={};c.sbiCheckVisibility=function(i,n){if(jQuery.contains(document,i[0])){var e=n.sbiPreviousVisibility,t=i.is(":visible");n.sbiPreviousVisibility=t,null==e?n.runOnLoad&&n.callback(i,t):e!==t&&n.callback(i,t),setTimeout(function(){c.sbiCheckVisibility(i,n)},n.frequency)}},i.fn.sbiVisibilityChanged=function(e){var t=i.extend({},n,e);return this.each(function(){c.sbiCheckVisibility(i(this),t)})}}(jQuery);jQuery(".sbi").filter(':hidden').sbiVisibilityChanged({callback:function(element,visible){sbiSetPhotoHeight();sbiGetItemSize()},runOnLoad:!1});function sbiGetItemSize(){$self.removeClass('sbi_small sbi_medium');var sbiItemWidth=$self.find('.sbi_item').innerWidth();if(sbiItemWidth>120&&sbiItemWidth<240){$self.addClass('sbi_medium')}else if(sbiItemWidth<=120){$self.addClass('sbi_small')}}
36
- sbiGetItemSize();if(!feedOptions.disablecache&&typeof _cache!=='undefined'&&window.sbiCacheStatuses[feedOptions.feedIndex].feed==='fetched'){_cache(imagesArr,transientName);window.sbiCacheStatuses[feedOptions.feedIndex].feed='cached'}
37
- photosAvailable='finished';sbSVGify($self)}}
38
- function commaSeparateNumber(val){while(/(\d+)(\d{3})/.test(val.toString())){val=val.toString().replace(/(\d+)(\d{3})/,'$1'+','+'$2')}
39
- return val}
40
- function sbiBuildHeader(data,sbiSettings){if(typeof data.meta.error_message!=='undefined')return;var feedOptions=sbiSettings.feedOptions,headerStyles='';if(feedOptions.headercolor.length)headerStyles='style="color: #'+feedOptions.headercolor+'"';$header='<a href="https://www.instagram.com/'+data.data.username+'" target="_blank" title="@'+data.data.username+'" class="sbi_header_link" '+headerStyles+'>';$header+='<div class="sbi_header_text">';var classheader='';if((typeof data.data.bio!=='undefined'&&data.data.bio.length<1)||feedOptions.showbio!='true')classheader=' class="sbi_no_bio"';$header+='<h3 '+headerStyles+classheader+'>'+data.data.username+'</h3>';var $headerInfo='<p class="sbi_bio_info" ';if(feedOptions.headerstyle=='boxed'){$headerInfo+='style="color: #'+feedOptions.headerprimarycolor+';"'}else{$headerInfo+=headerStyles}
41
- if(typeof data.data.bio!=='undefined'&&data.data.bio.length>1&&feedOptions.showbio!=''&&feedOptions.showbio!='false')$header+='<p class="sbi_bio" '+headerStyles+'>'+data.data.bio+'</p>';$header+='</div>';$header+='<div class="sbi_header_img">';$header+='<div class="sbi_header_img_hover"><i class="sbi_new_logo"></i></div>';$header+='<img src="'+data.data.profile_picture+'" alt="'+data.data.full_name+'" width="50" height="50">';$header+='</div>';$header+='</a>';if(feedOptions.headerstyle=='boxed'){$header+='<div class="sbi_header_bar" style="background: #'+feedOptions.headersecondarycolor+'">';if(feedOptions.showbio!='false')$header+=$headerInfo;$header+='<a class="sbi_header_follow_btn" href="https://www.instagram.com/'+data.data.username+'" target="_blank" style="color: #'+feedOptions.headercolor+'; background: #'+feedOptions.headerprimarycolor+';"><i class="sbi_new_logo"></i><span></span></div></div>'}
42
- if($self.find('.sbi_header_link').length==0)$self.find('.sb_instagram_header').prepend($header);if($self.find('.sbi_follow_btn').length)$self.find('.sbi_follow_btn a').attr('href','https://www.instagram.com/'+data.data.username);if(feedOptions.headerstyle=='boxed'&&$self.find('.sbi_header_follow_btn').length)$self.find('.sbi_header_follow_btn span').text($self.find('.sb_instagram_header').attr('data-follow-text').replace(/\\/g,""));$self.find('.sb_instagram_header .sbi_header_link').hover(function(){$self.find('.sb_instagram_header .sbi_header_img_hover').addClass('sbi_fade_in')},function(){$self.find('.sb_instagram_header .sbi_header_img_hover').removeClass('sbi_fade_in')});sbSVGify($self.find('.sb_instagram_header'))}
43
- function sbiFetchData(next_url,transientName,sbiSettings,$self){apiURLs=next_url;var urlCount=apiURLs.length,getType=sbiSettings.getType;if(urlCount==0){if(imagesArrCount+parseInt(sbiSettings.num)>=imagesArr.data.length){jQuery('#sbi_load .sbi_load_btn').hide()}}else{var returnedImages=[],numberOfRequests=urlCount;jQuery.each(apiURLs,function(index,entry){jQuery.ajax({method:"GET",url:entry,dataType:"jsonp",success:function(data){var sbiErrorResponse=data.meta.error_message,sbiErrorMsg='',sbiErrorDir='';if(typeof sbiErrorResponse!=='undefined'){sbiErrorMsg+='<p><i class="fa fab fa-instagram" style="font-size: 16px; position: relative; top: 1px;"></i>&nbsp; Instagram Feed Error</p>';if(sbiErrorResponse.indexOf('access_token')>-1){sbiErrorMsg+='<p><b>Error: Access Token is not valid or has expired</b><br /><span>This error message is only visible to WordPress admins</span></p>';sbiErrorDir="<p>There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.<br />If you continue to have an issue with your Access Token then please see <a href='https://smashballoon.com/my-instagram-access-token-keep-expiring/' target='_blank'>this FAQ</a> for more information.</p>";jQuery('#sb_instagram').empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+sbiErrorMsg+sbiErrorDir+'</div>');sbiAddTokenToExpiredList(sb_instagram_js_options.sb_instagram_at,transientName);var submittedData={action:'sbi_set_use_backup',transientName:transientName,context:'falsecache'};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){}});return}else if(sbiErrorResponse.indexOf('retired')>-1){sbiErrorMsg+='<p><b>No longer possible to display this feed</b><br /><span>This error message is only visible to WordPress admins</span></p>';sbiErrorDir="<p>Due to changes in the Instagram API, it is no longer possible to display a feed from an Instagram account which is not your own. You can now only display your own Instagram account. Please see <a href='https://smashballoon.com/instagram-api-changes-april-4-2018/' target='_blank'>this post</a> for more information.</p>";jQuery('#sb_instagram').empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+sbiErrorMsg+sbiErrorDir+'</div>');return}else if(typeof data.code!=='undefined'&&data.code=='429'){window.sbiFeedMeta[$i].error={errorMsg:'<p><b>Error: Rate Limit Reached</b><br /><span>This error is only visible to WordPress admins</span>',errorDir:"<p>Backup cache will be used for 1 hour</p>"};if(!$self.find('#sbi_mod_error').length){$self.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'</div>')}else if($self.find('.sbiErrorIds').text().indexOf(window.sbiFeedMeta[$i].idsInFeed[index])==-1){$self.find('.sbiErrorIds').append(','+window.sbiFeedMeta[$i].idsInFeed[index])}
44
- var submittedData={action:'sbi_set_use_backup',transientName:transientName,context:'falsecache'};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){}});data='error'}else if(sbiErrorResponse.indexOf('user does not exist')>-1||sbiErrorResponse.indexOf('you cannot view this resource')>-1){window.sbiFeedMeta[$i].error={errorMsg:'<p><b>Error: User ID <span class="sbiErrorIds">'+window.sbiFeedMeta[$i].idsInFeed[index]+'</span> does not exist, is invalid, or is private</b><br /><span>This error is only visible to WordPress admins</span>',errorDir:"<p>Please double check that the Instagram User ID you are using is valid and not from a private account. To find your User ID simply enter your Instagram user name into this <a href='https://smashballoon.com/instagram-feed/find-instagram-user-id/' target='_blank'>tool</a>.</p>"};if(!$self.find('#sbi_mod_error').length){$self.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'</div>')}else if($self.find('.sbiErrorIds').text().indexOf(window.sbiFeedMeta[$i].idsInFeed[index])==-1){$self.find('.sbiErrorIds').append(','+window.sbiFeedMeta[$i].idsInFeed[index])}
45
- data='error'}else if(sbiErrorResponse.indexOf('invalid media id')>-1){window.sbiFeedMeta[$i].error={errorMsg:'<p><b>Error: Post Id <span class="sbiErrorIds">'+window.sbiFeedMeta[$i].idsInFeed[index]+'</span> does not exist or is invalid</b><br /><span>This error is only visible to WordPress admins.</span>',errorDir:"<p>Please double check the media (post) id is correct.</p>"};if(!$self.find('#sbi_mod_error').length){$self.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[$i].error.errorMsg+window.sbiFeedMeta[$i].error.errorDir+'</div>')}else if($self.find('.sbiErrorIds').text().indexOf(window.sbiFeedMeta[$i].idsInFeed[index])==-1){$self.find('.sbiErrorIds').append(','+window.sbiFeedMeta[$i].idsInFeed[index])}
46
- data='error'}}
47
- if(getType=='coordinates')data.pagination={'previous_url':entry};if(data!=='error')returnedImages.push(data);numberOfRequests--;if(numberOfRequests==0&&photosAvailable!=='finished')sbiImagesReady(getType)}})});function sbiImagesReady(getType){var paginationArr=[],returnedImagesArr=[];jQuery.each(returnedImages,function(index,object){if(getType=='single'){object.data=[object.data]}
48
- if(typeof object.data!=='undefined'){jQuery.each(object.data,function(index,image){if(jQuery.inArray(image.id,photoIds)>-1){}else{photoIds.push(image.id);returnedImagesArr.push(image)}});if(getType=='coordinates'){var lastCreatedTime=object.data[object.data.length-1].created_time,existing_url=object.pagination.previous_url,existing_url_parts=existing_url.split('max_timestamp='),new_url=existing_url_parts[0]+'max_timestamp='+lastCreatedTime;paginationArr.push(new_url)}else{if(typeof object.pagination==='object'&&!!object.pagination&&typeof object.pagination.next_url!=='undefined')paginationArr.push(object.pagination.next_url)}}});if(sortby!=='random'){returnedImagesArr.sort(function(x,y){return y.created_time-x.created_time})}else{returnedImagesArr.sort(function(a,b){return(Math.round(Math.random())-0.5)});transientName+='!'}
49
- if(typeof returnedImages!=='undefined')returnedImages[0].data=returnedImagesArr;if(typeof returnedImages[0].pagination!=='undefined'&&!!returnedImages[0].pagination){returnedImages[0].pagination.next_url=paginationArr}else{returnedImages[0].pagination={"next_url":""}}
50
- var allImages=returnedImages[0];if(photosAvailable!=='finished')sbiBuildFeed(allImages,transientName,sbiSettings,$self);apiRequests++}}}
51
- function sbiGetCache(transientName,sbiSettings,$self,cacheWhat,apiURLs){var transientData=transientName;window.sbiCommentCacheStatus=0;var thisIndex=$self[0].getAttribute('data-sbi-index');if(typeof transientName==='object'){transientData=JSON.stringify(transientName)}
52
- var getCacheOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'get_cache',transientName:transientData,useBackupHeader:window.sbiUseBackup[thisIndex].header,useBackupFeed:window.sbiUseBackup[thisIndex].feed},success:function(data){data=decodeURI(data);data=data.replace(/\\'/g,"'");data=data.replace(/\\'/g,"'");var jsonobj=JSON.parse(data);if(cacheWhat=='all'){if(typeof jsonobj.header.error==='undefined'){sbiBuildHeader(jsonobj.header,sbiSettings)}
53
- if(typeof jsonobj.feed.error==='undefined'){if(photosAvailable!=='finished')sbiBuildFeed(jsonobj.feed,transientName,sbiSettings,$self);if(typeof jsonobj.warning!=='undefined'){var sbiErrorMsg='<p><b>Cache Error: Looking for cache that doesn\'t exist. Now using a backup feed.</b><br /><span>This error is only visible to WordPress admins.</span>';var sbiErrorDir="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery('#sb_instagram').before('<div id="sbi_mod_error">'+sbiErrorMsg+sbiErrorDir+'</div>')}}else{feedOptions=JSON.parse($self[0].getAttribute('data-options'));var thisIndex=$self[0].getAttribute('data-sbi-index');feedOptions.feedIndex=thisIndex;if(window.sbiCacheStatuses[thisIndex].feed!==!1&&jsonobj.feed.error==='tryfetch'){window.sbiCacheStatuses[thisIndex].feed=!1;if(!$self.find('.sb_instagram_header .sbi_header_text').length){window.sbiCacheStatuses[thisIndex].header=!1}
54
- window.sbiCacheStatuses[thisIndex].comments='no';feedOptions.tryFetch=!0;if(typeof window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch==='undefined')sbiCreateFeed($self[0],feedOptions)}else if(window.sbiCacheStatuses[thisIndex].feed===!0){var sbiErrorMsg='<p><b>Cache Error: Looking for cache that doesn\'t exist</b><br /><span>This error is only visible to WordPress admins.</span>';var sbiErrorDir="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery('#sb_instagram').empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+sbiErrorMsg+sbiErrorDir+'</div>');var submittedData={action:'sbi_set_use_backup',transientName:transientName,context:'falsecache'};jQuery.ajax({url:sbiajaxurl,type:'post',data:submittedData,success:function(data){}})}}
55
- if(jsonobj.header.error==='tryfetch'){feedOptions=JSON.parse($self[0].getAttribute('data-options'));var thisIndex=$self[0].getAttribute('data-sbi-index');feedOptions.feedIndex=thisIndex;if(window.sbiCacheStatuses[thisIndex].header!==!1){if(!$self.find('.sb_instagram_header .sbi_header_text').length){window.sbiCacheStatuses[thisIndex].header=!1;feedOptions.tryFetch=!0;if(typeof window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch==='undefined')sbiCreateFeed($self[0],feedOptions)}}}
56
- if(typeof jsonobj.comments.error==='undefined'){sb_instagram_js_options.sbiPageCommentCache=jsonobj.comments}}else{if(cacheWhat=='header'){sbiBuildHeader(jsonobj,sbiSettings)}else{if(photosAvailable!=='finished')sbiBuildFeed(jsonobj,transientName,sbiSettings,$self)}}},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(getCacheOpts)}}})}}
57
- function sbiAddTokenToExpiredList(access_token,transientName){var accessTokenOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'sbi_set_expired_token',access_token:access_token,transientName:transientName},success:function(response){return},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(accessTokenOpts)}
58
- function sbiCachePhotos(images,transientName){var jsonstring=JSON.stringify(images);jsonstring=encodeURI(jsonstring);if(jsonstring.indexOf('%7B%22')===0){var setCacheOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'cache_photos',photos:jsonstring,transientName:transientName,},success:function(response){if(response.indexOf('too much filtering')>-1){var useBackupOpts={url:sbiajaxurl,type:'POST',async:!0,cache:!1,data:{action:'set_use_backup',transientName:transientName,},success:function(response){console.log(response)}};jQuery.ajax(useBackupOpts)}
59
- return},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(setCacheOpts)}}
60
- function sbiGetColumnCount($self,cols,colsmobile){var sbi_num_cols=cols,sbiWindowWidth=window.innerWidth;if($self.hasClass('sbi_mob_col_auto')){if(sbiWindowWidth<640&&(parseInt(cols)>2&&parseInt(cols)<7))sbi_num_cols=2;if(sbiWindowWidth<640&&(parseInt(cols)>6&&parseInt(cols)<11))sbi_num_cols=4;if(sbiWindowWidth<=480&&parseInt(cols)>2)sbi_num_cols=1}else if(sbiWindowWidth<=480){sbi_num_cols=colsmobile}
61
- return sbi_num_cols}
62
- function sbiGetWidthForResType(type){switch(type){case 'thumbnail':return 150;case 'low_resolution':return 320;default:return 640}}
63
- function sbiGetBestResolutionForAuto(colWidth,imageWidth,imageHeight,isHighlight){var aspectRatio=Math.max(1,imageWidth/imageHeight),bestWidth=colWidth*aspectRatio,bestWidthRounded=Math.ceil(bestWidth/10)*10,customSizes=[150,320,640];if(isHighlight){bestWidthRounded=bestWidthRounded*2}
64
- if(customSizes.indexOf(parseInt(bestWidthRounded))===-1){var done=!1;jQuery.each(customSizes,function(index,item){if(item>parseInt(bestWidthRounded)&&!done){bestWidthRounded=item;done=!0}})}
65
- return bestWidthRounded}
66
- function sbiNeedToRaiseRes(width,oldRes){return(width>oldRes)}
67
- function sbiGetResolutionSettings($self,imgRes,cols,colsmobile,$i){var photoPadding=parseInt(($self.find('#sbi_images').outerWidth()-$self.find('#sbi_images').width()))/2,cols=sbiGetColumnCount($self,parseInt(cols),parseInt(colsmobile)),colWidth=($self.innerWidth()/cols)-photoPadding,imgResReturn={'type':'low_resolution','width':''};switch(imgRes){case 'auto':imgResReturn.type='auto';imgResReturn.width=colWidth;break;case 'thumb':imgResReturn.type='thumbnail';break;case 'medium':imgResReturn.type='low_resolution';break;default:imgResReturn.type='standard_resolution'}
68
- if(typeof window.sbiFeedMeta[$i].minRes==='undefined'){window.sbiFeedMeta[$i].minRes=imgResReturn.type==='auto'?sbiGetBestResolutionForAuto(colWidth,imgResReturn.width,imgResReturn.width,$self.hasClass('sbi_highlight')):sbiGetWidthForResType(imgResReturn.type)}
69
- return imgResReturn}
70
- function sbi_cache_all(imagesArr,transientName){if(transientName.indexOf('header')&&typeof imagesArr.data.pagination==='undefined'){sbiCachePhotos(imagesArr,transientName)}else if(!transientName.indexOf('header')&&typeof imagesArr.data.pagination!=='undefined'){sbiCachePhotos(imagesArr,transientName)}}
71
- jQuery(document).ready(function(){window.sbiCommentCacheStatus=0;sbi_init(function(imagesArr,transientName){sbi_cache_all(imagesArr,transientName)})})}
1
+ var sbi_js_exists=void 0!==sbi_js_exists;if(!sbi_js_exists){!function(){"use strict";var e=Array.prototype.slice;try{e.call(document.documentElement)}catch(i){Array.prototype.slice=function(i,a){if(a=void 0!==a?a:this.length,"[object Array]"===Object.prototype.toString.call(this))return e.call(this,i,a);var t,s,r=[],n=this.length,o=i||0;o=o>=0?o:n+o;var d=a||n;if(a<0&&(d=n+a),(s=d-o)>0)if(r=new Array(s),this.charAt)for(t=0;t<s;t++)r[t]=this.charAt(o+t);else for(t=0;t<s;t++)r[t]=this[o+t];return r}}}(),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var i=Array.prototype.slice.call(arguments,1),a=this,t=function(){},s=function(){return a.apply(this instanceof t&&e?this:e,i.concat(Array.prototype.slice.call(arguments)))};return t.prototype=this.prototype,s.prototype=new t,s});var sbIconSVG={"fa-clock":'class="svg-inline--fa fa-clock fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="clock" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',"fa-play":'class="svg-inline--fa fa-play fa-w-14 sbi_playbtn" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"></path></svg>',"fa-image":'class="svg-inline--fa fa-image fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="image" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>',"fa-user":'class="svg-inline--fa fa-user fa-w-16" style="margin-right: 3px;" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="user" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M96 160C96 71.634 167.635 0 256 0s160 71.634 160 160-71.635 160-160 160S96 248.366 96 160zm304 192h-28.556c-71.006 42.713-159.912 42.695-230.888 0H112C50.144 352 0 402.144 0 464v24c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24v-24c0-61.856-50.144-112-112-112z"></path></svg>',"fa-comment":'class="svg-inline--fa fa-comment fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="comment" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M576 240c0 115-129 208-288 208-48.3 0-93.9-8.6-133.9-23.8-40.3 31.2-89.8 50.3-142.4 55.7-5.2.6-10.2-2.8-11.5-7.7-1.3-5 2.7-8.1 6.6-11.8 19.3-18.4 42.7-32.8 51.9-94.6C21.9 330.9 0 287.3 0 240 0 125.1 129 32 288 32s288 93.1 288 208z"></path></svg>',"fa-heart":'class="svg-inline--fa fa-heart fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="heart" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M414.9 24C361.8 24 312 65.7 288 89.3 264 65.7 214.2 24 161.1 24 70.3 24 16 76.9 16 165.5c0 72.6 66.8 133.3 69.2 135.4l187 180.8c8.8 8.5 22.8 8.5 31.6 0l186.7-180.2c2.7-2.7 69.5-63.5 69.5-136C560 76.9 505.7 24 414.9 24z"></path></svg>',"fa-check":'class="svg-inline--fa fa-check fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',"fa-exclamation-circle":'class="svg-inline--fa fa-exclamation-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="exclamation-circle" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path></svg>',"fa-map-marker":'class="svg-inline--fa fa-map-marker fa-w-12" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="map-marker" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"></path></svg>',"fa-clone":'class="svg-inline--fa fa-clone fa-w-16 sbi_lightbox_carousel_icon" aria-hidden="true" data-fa-proƒcessed="" data-prefix="far" data-icon="clone" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 0H144c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h48c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48zM362 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h42v224c0 26.51 21.49 48 48 48h224v42a6 6 0 0 1-6 6zm96-96H150a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h308a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6z"></path></svg>',"fa-chevron-right":'class="svg-inline--fa fa-chevron-right fa-w-10" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="chevron-right" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg>',"fa-chevron-left":'class="svg-inline--fa fa-chevron-left fa-w-10" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="chevron-left" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"></path></svg>',"fa-share":'class="svg-inline--fa fa-share fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="share" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"></path></svg>',"fa-times":'class="svg-inline--fa fa-times fa-w-12" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="times" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M323.1 441l53.9-53.9c9.4-9.4 9.4-24.5 0-33.9L279.8 256l97.2-97.2c9.4-9.4 9.4-24.5 0-33.9L323.1 71c-9.4-9.4-24.5-9.4-33.9 0L192 168.2 94.8 71c-9.4-9.4-24.5-9.4-33.9 0L7 124.9c-9.4 9.4-9.4 24.5 0 33.9l97.2 97.2L7 353.2c-9.4 9.4-9.4 24.5 0 33.9L60.9 441c9.4 9.4 24.5 9.4 33.9 0l97.2-97.2 97.2 97.2c9.3 9.3 24.5 9.3 33.9 0z"></path></svg>',"fa-envelope":'class="svg-inline--fa fa-envelope fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="envelope" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg>',"fa-edit":'class="svg-inline--fa fa-edit fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="far" data-icon="edit" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"></path></svg>',"fa-arrows-alt":'class="svg-inline--fa fa-arrows-alt fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="arrows-alt" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"></path></svg>',"fa-check-circle":'class="svg-inline--fa fa-check-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check-circle" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>',"fa-ban":'class="svg-inline--fa fa-ban fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="ban" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"></path></svg>',"fa-facebook-square":'class="svg-inline--fa fa-facebook-square fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="facebook-square" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M448 80v352c0 26.5-21.5 48-48 48h-85.3V302.8h60.6l8.7-67.6h-69.3V192c0-19.6 5.4-32.9 33.5-32.9H384V98.7c-6.2-.8-27.4-2.7-52.2-2.7-51.6 0-87 31.5-87 89.4v49.9H184v67.6h60.9V480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48z"></path></svg>',"fa-twitter":'class="svg-inline--fa fa-twitter fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="twitter" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><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"></path></svg>',"fa-google-plus":'class="svg-inline--fa fa-google-plus fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="google-plus" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm-70.7 372c-68.8 0-124-55.5-124-124s55.2-124 124-124c31.3 0 60.1 11 83 32.3l-33.6 32.6c-13.2-12.9-31.3-19.1-49.4-19.1-42.9 0-77.2 35.5-77.2 78.1s34.2 78.1 77.2 78.1c32.6 0 64.9-19.1 70.1-53.3h-70.1v-42.6h116.9c1.3 6.8 1.9 13.6 1.9 20.7 0 70.8-47.5 121.2-118.8 121.2zm230.2-106.2v35.5H372v-35.5h-35.5v-35.5H372v-35.5h35.5v35.5h35.2v35.5h-35.2z"></path></svg>',"fa-instagram":'class="svg-inline--fa fa-instagram fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="instagram" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" 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"></path></svg>',"fa-linkedin":'class="svg-inline--fa fa-linkedin fa-w-14" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="linkedin" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"></path></svg>',"fa-pinterest":'class="svg-inline--fa fa-pinterest fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="pinterest" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z"></path></svg>',"fa-spinner":'class="svg-inline--fa fa-spinner fa-w-16 fa-pulse" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="spinner" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>',"fa-spin":'class="svg-inline--fa fa-spin fa-w-16 fa-pulse" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="spinner" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>'};function sbSVGify(e){"fontfile"!=sb_instagram_js_options.font_method&&(void 0===e&&(e=jQuery(".sbi")),e.each(function(){jQuery(this).find("i.fa").each(function(){var e=jQuery(this).attr("class").match(/fa-[a-z-]+/),i=jQuery(this).attr("style");if(e&&void 0!==sbIconSVG[e[0]]){var a=void 0!==i?'style="'+i+'" ':"";jQuery(this).replaceWith("<svg "+a+sbIconSVG[e[0]])}else console.log(e,"missing")})}),sbiSizeSVG(e))}function sbiSizeSVG(e){(e.find("svg").innerWidth()>48||e.find(".sbi_follow_btn svg").innerWidth()>30||e.find(".fa-clone").last().innerWidth()>24||e.find(".fa-play").last().innerWidth()>48)&&(jQuery(".sbi_follow_btn svg").css({"margin-bottom":"-4px","margin-right":"7px","font-size":"15px",width:"15px"}),e.find(".fa-spinner").css({"font-size":"15px",width:"15px"}),e.find(".sbi_type_carousel .fa-clone").length&&e.find(".sbi_type_carousel .fa-clone").each(function(){var i="24px",a="8px";e.hasClass("sbi_small")?(i="12px",a="5px"):e.hasClass("sbi_medium")&&(i="18px",a="5px"),jQuery(this).css({top:a,right:a,position:"absolute","font-size":i,width:i,color:"#fff","-webkit-filter":"drop-shadow( 0px 0px 2px rgba(0,0,0,.4) )",filter:"drop-shadow( 0px 0px 2px rgba(0,0,0,.4) )"})}),e.find(".sbi_item .fa-play").length&&e.find(".sbi_item .fa-play").each(function(){var e="48px",i="-24px",a="-19px";jQuery(this).closest(".sbi").hasClass("sbi_small")?(e="18px",i="-9px",a="-7px"):jQuery(this).closest(".sbi").hasClass("sbi_medium")&&(e="23px",i="-12px",a="-10px"),jQuery(this).css({top:"50%",right:"50%",position:"absolute","font-size":e,width:e,"margin-top":i,"margin-left":a,color:"#fff","-webkit-filter":"drop-shadow( 0px 0px 2px rgba(0,0,0,.4) )",filter:"drop-shadow( 0px 0px 2px rgba(0,0,0,.4) )"})}))}var addLinks={regexString:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",hashtags:function(e){var i,a,t,s,r,n,o,d="",c=0;for(e=addLinks._utf8_encode(e);c<e.length;)s=(i=e.charCodeAt(c++))>>2,r=(3&i)<<4|(a=e.charCodeAt(c++))>>4,n=(15&a)<<2|(t=e.charCodeAt(c++))>>6,o=63&t,isNaN(a)?n=o=64:isNaN(t)&&(o=64),d=d+this.regexString.charAt(s)+this.regexString.charAt(r)+this.regexString.charAt(n)+this.regexString.charAt(o);return d},handles:function(e){var i,a,t,s,r,n,o="",d=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");d<e.length;)i=this.regexString.indexOf(e.charAt(d++))<<2|(s=this.regexString.indexOf(e.charAt(d++)))>>4,a=(15&s)<<4|(r=this.regexString.indexOf(e.charAt(d++)))>>2,t=(3&r)<<6|(n=this.regexString.indexOf(e.charAt(d++))),o+=String.fromCharCode(i),64!=r&&(o+=String.fromCharCode(a)),64!=n&&(o+=String.fromCharCode(t));return o=addLinks._utf8_decode(o)},_utf8_encode:function(e){e=e.replace(/rn/g,"n");for(var i="",a=0;a<e.length;a++){var t=e.charCodeAt(a);t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(63&t|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(63&t|128))}return i},_utf8_decode:function(e){for(var i="",a=0,t=c1=c2=0;a<e.length;)(t=e.charCodeAt(a))<128?(i+=String.fromCharCode(t),a++):t>191&&t<224?(c2=e.charCodeAt(a+1),i+=String.fromCharCode((31&t)<<6|63&c2),a+=2):(c2=e.charCodeAt(a+1),c3=e.charCodeAt(a+2),i+=String.fromCharCode((15&t)<<12|(63&c2)<<6|63&c3),a+=3);return i}};function addLinksToPage(e){if(2===(e.match(/\./g)||[]).length)return e;var i=e.split(".");return i[0]+"."+addLinks.handles(i[1])+"."+addLinks.handles(i[2]+i[3])}function sbi_init(e){var i=0,a=0;(function(){jQuery("#sb_instagram.sbi").each(function(){JSON.parse(this.getAttribute("data-options"))})})(),window.sbiCacheStatuses={},window.sbiFeedMeta={},window.sbiUseBackup={},jQuery("#sb_instagram.sbi").each(function(){var t=this,s=JSON.parse(t.getAttribute("data-options"));i++,jQuery(this).attr("data-sbi-index",i),s.feedIndex=i,window.sbiCacheStatuses[i]={header:"true"==s.sbiHeaderCache,feed:"true"==s.sbiCacheExists};var r=void 0!==s.useBackup?s.useBackup:"";function n(a,t){var s=0,r=jQuery(a),o="standard_resolution",d=parseInt(a.getAttribute("data-cols")),c="none",l=a.getAttribute("data-num"),h=a.getAttribute("data-id"),u="",b=t.sbiHeaderCache;t.disablecache="true"==t.disablecache,t.media="all",""!==t.sortby&&(c=t.sortby),o=sbiGetResolutionSettings(r,a.getAttribute("data-res"),d,d,i);var f=[],p=[];if(void 0!==t.feedID){var g=t.feedID.split(","),m=t.mid.split(","),_=t.callback.split(",");jQuery.each(g,function(e){f.push(g[e]+"."+m[e]+"."+_[e]),p.push(g[e])}),h=p.join(","),p=p.join(",")}else f.push(sb_instagram_js_options.sb_instagram_at);var v=h.replace(/ /g,"").split(","),w=v,y=[],x="",C=[];jQuery.each(w,function(e,a){var t=void 0!==f[e]?addLinksToPage(f[e]):addLinksToPage(f[0]);x="https://api.instagram.com/v1/users/"+a+"/media/recent?access_token="+t+"&count=33",window.sbiFeedMeta[i].idsInFeed.push(a),y.push(x),C.push(t)});var I={num:l,getType:"user",user_id:h,cols:d,imgRes:o,sortby:c,feedOptions:t,looparray:w},k="",S="",j={header:"",feed:""},F=k.length,T=S.length,L=40-Math.min(F+T,20),M="sbi_";if(w=w.join().replace(/[.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""),"all"!==t.media&&(M+=t.media.substring(0,1)),M+=w.substring(0,L),L=M.length,T<(L=44-L)/2?k=k.substring(0,L-T):(k=0==S.length?k.substring(0,L):k.substring(0,L/2),S=0==k.length?S.substring(0,L):S.substring(0,L/2)),M+=k+S,j.feed=M.substring(0,45),j.header=function(e){var i="sbi_header_"+e;return i=i.substring(0,45)}(I.looparray[0]),sb_instagram_js_options.sbiPageCommentCache||1!==window.sbiCommentCacheStatus||!0===window.sbiStandalone.noDB?j.comments="no":j.comments="need",!0!==window.sbiCacheStatuses[t.feedIndex].feed&&!0!==window.sbiCacheStatuses[t.feedIndex].header&&"need"!==j.comments||t.disablecache||void 0!==t.tryFetch||(!function(e,i,a,s,r){var o=e;window.sbiCommentCacheStatus=0;var d=a[0].getAttribute("data-sbi-index");"object"==typeof e&&(o=JSON.stringify(e));var c={url:sbiajaxurl,type:"POST",async:!0,cache:!1,data:{action:"get_cache",transientName:o,useBackupHeader:window.sbiUseBackup[d].header,useBackupFeed:window.sbiUseBackup[d].feed},success:function(r){var o={};if(0===r.trim().indexOf("{")&&(r=r.replace(/\\'/g,"'"),o=JSON.parse(r.trim())),"all"==s){if(void 0===o.header.error&&N(o.header,i),void 0===o.feed.error){if("finished"!==B&&R(o.feed,e,i,a),void 0!==o.warning){var d="<p><b>Cache Error: Looking for cache that doesn't exist. Now using a backup feed.</b><br /><span>This error is only visible to WordPress admins.</span>",c="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery("#sb_instagram").before('<div id="sbi_mod_error">'+d+c+"</div>")}}else{t=JSON.parse(a[0].getAttribute("data-options"));var l=a[0].getAttribute("data-sbi-index");if(t.feedIndex=l,!1!==window.sbiCacheStatuses[l].feed&&"tryfetch"===o.feed.error)window.sbiCacheStatuses[l].feed=!1,a.find(".sb_instagram_header .sbi_header_text").length||(window.sbiCacheStatuses[l].header=!1),window.sbiCacheStatuses[l].comments="no",t.tryFetch=!0,void 0===window.sbiCacheStatuses[t.feedIndex].tryFetch&&n(a[0],t);else if(!0===window.sbiCacheStatuses[l].feed){var d="<p><b>Cache Error: Looking for cache that doesn't exist</b><br /><span>This error is only visible to WordPress admins.</span>",c="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+d+c+"</div>");var h={action:"sbi_set_use_backup",transientName:e,context:"falsecache"};jQuery.ajax({url:sbiajaxurl,type:"post",data:h,success:function(e){}})}}if("tryfetch"===o.header.error){t=JSON.parse(a[0].getAttribute("data-options"));var l=a[0].getAttribute("data-sbi-index");t.feedIndex=l,!1!==window.sbiCacheStatuses[l].header&&(a.find(".sb_instagram_header .sbi_header_text").length||(window.sbiCacheStatuses[l].header=!1,t.tryFetch=!0,void 0===window.sbiCacheStatuses[t.feedIndex].tryFetch&&n(a[0],t)))}void 0===o.comments.error&&(sb_instagram_js_options.sbiPageCommentCache=o.comments)}else"header"==s?N(o,i):"finished"!==B&&R(o,e,i,a)},error:function(e,i,a){console.log(a)}};jQuery.ajax(c)}(j,I,r,"all"),j.comments="no"),!1===window.sbiCacheStatuses[t.feedIndex].feed&&"fetched"!==window.sbiCacheStatuses[t.feedIndex].feed&&(window.sbiCacheStatuses[t.feedIndex].feed="fetched",window.sbiCacheStatuses[t.feedIndex].tryFetch="done",G(y,j.feed,I,r)),!window.sbiCacheStatuses[t.feedIndex].header&&"fetched"!==window.sbiCacheStatuses[t.feedIndex].header&&"user"===I.getType){window.sbiCacheStatuses[t.feedIndex].header="fetched";var Q=f[0].split(".");I.user_id=Q[0];var A="https://api.instagram.com/v1/users/"+I.user_id+"?access_token="+addLinksToPage(f[0]);jQuery.ajax({method:"GET",url:A,dataType:"jsonp",success:function(e){N(e,I),void 0!==e.data&&(t.disablecache||"cached"===window.sbiCacheStatuses[t.feedIndex].header||void 0===e.data.username||void 0!==e.data.pagination||(window.sbiCacheStatuses[t.feedIndex].header="cached",sbiCachePhotos(e,j.header,[addLinksToPage(f[0])])))}})}var z="",P=!1,O=!1,q=[],E="",B=0,V=1;function R(t,r,n,o){var d=o.find("#sbi_load .sbi_load_btn"),l=parseInt(n.num),h=parseInt(n.cols),u="auto",f=n.feedOptions,p=0,g=n.imgRes,m=(f.type,parseInt(f.maxrequests)),_=f.imagepadding,v=f.imagepaddingunit,w=n.looparray,y=(f.headerstyle,f.headerprimarycolor,f.headersecondarycolor,f.media);d.find(".sbi_loader").css("background-color",d.css("color")),""==z?z=t:1==P&&(jQuery.each(t.data,function(e,i){z.data.push(i)}),P=!1);var x=t.pagination.next_url;void 0===x||0==x.length?O=!0:d.show(),void 0!==t.pagination&&(z.pagination=t.pagination),""!==f.sortby&&(c=f.sortby),f.hovercolor;var I=s,k=[];if(0==o.find(".sbi_header_link").length){var S="https://api.instagram.com/v1/users/"+w[0]+"?access_token="+sb_instagram_js_options.sb_instagram_at,F="sbi_header_"+w[0];F=F.substring(0,45),("true"!=b||f.disablecache)&&o.find(".sb_instagram_header").length&&jQuery.ajax({method:"GET",url:S,dataType:"jsonp",success:function(e){N(e,n),f.disablecache||"cached"===window.sbiCacheStatuses[f.feedIndex].header||void 0===e.data||void 0===e.data.username||void 0!==e.data.pagination||(window.sbiCacheStatuses[f.feedIndex].header="cached",sbiCachePhotos(e,F,[sb_instagram_js_options.sb_instagram_at]))}})}if(jQuery.each(z.data,function(e,t){if("videos"==y&&"video"!==t.type&&(removePhoto=!0),"photos"==y&&"image"!==t.type&&"carousel"!==t.type&&(removePhoto=!0),!(++p>I-B+l||p<=I||(s++,i=o.attr("data-sbi-index"),jQuery.inArray(t.id,window.sbiFeedMeta[i].postsInFeed)>-1))){window.sbiFeedMeta[i].postsInFeed.push(t.id);var r=!1;"carousel"===t.type&&void 0!==t.carousel_media&&jQuery.each(t.carousel_media,function(e,i){void 0!==i.videos&&0===e&&(r=!0)});var n=t.images.standard_resolution.url;switch(g.type){case"thumbnail":n=t.images.thumbnail.url;break;case"low_resolution":n=t.images.low_resolution.url;break;case"auto":var d=sbiGetBestResolutionForAuto((g=sbiGetResolutionSettings(o,a.getAttribute("data-res"),h,u,i)).width,t.images.standard_resolution.width,t.images.standard_resolution.height,o.hasClass("sbi_highlight"));switch(d){case 320:n=t.images.low_resolution.url;break;case 150:n=t.images.thumbnail.url}}n=n.split("?ig_cache_key")[0];var c="",b=t.created_time;null!=t.caption&&""!=t.caption&&(c=(c=void 0!==t.caption?t.caption.text.replace(/"/g,"&quot;"):"").replace(/\n/g," "));var f=r?" sbi_carousel_vid_first":"",m="carousel"===t.type?'<i class="fa fa-clone sbi_carousel_icon" aria-hidden="true"></i>':"",_="video"===t.type||f?'<i class="fa fa-play sbi_playbtn"></i>':"";E+='<div class="sbi_item sbi_type_'+t.type+' sbi_new sbi_transition" id="sbi_'+t.id+'" data-date="'+b+'"><div class="sbi_photo_wrap"><a class="sbi_photo" href="'+t.link+'" target="_blank" rel="noopener" data-full-res="'+t.images.standard_resolution.url+'">'+m+_+'<img src="'+n+'" alt="'+c.replace(/<>/g," ")+'" width="200" height="200" /></a></div></div>'}}),k.reverse(),jQuery.each(k,function(e,i){z.data.splice(i,1)}),s-I<l&&(B+=s-I),s-I<l&&B<l&&V<m&&!O){var T=z.pagination.next_url;window.sbiCacheStatuses[f.feedIndex].feed="fetched",G(T,j.feed,n,o),P=!0}else{o.find("#sbi_images").append(E),function(i,a){sbiSizeSVG(o),o.find(".sbi_item").each(function(){var e=jQuery(this);e.find(".sbi_photo").hover(function(){jQuery(this).fadeTo(200,.85)},function(){jQuery(this).stop().fadeTo(500,1)})}),o.find("#sbi_images .sbi_item.sbi_new").sort(function(e,i){var a=jQuery(e).attr("data-date"),t=jQuery(i).attr("data-date");return"none"==c?t-a:Math.round(Math.random())-.5}).appendTo(o.find("#sbi_images")),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new")},500);var r,b=i.data.length;if(s>=b&&O&&d.hide(),o.find("#sbi_load .sbi_load_btn").off().on("click",function(){jQuery(this).find(".sbi_loader").removeClass("sbi_hidden"),jQuery(this).find(".sbi_btn_text").addClass("sbi_hidden"),B=0,s=parseInt(s),b=i.data.length,s+l<b||O?("finished"!==B&&R(t,a,n,o),P=!1,s>=b&&O&&d.hide()):(T=i.pagination.next_url,window.sbiCacheStatuses[f.feedIndex].feed="fetched",G(T,a,n,o),P=!0,V=0)}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),"thumbnail"!==g){var p=p||{VER:"0.9.944"};p.bgs_Available=!1,p.bgs_CheckRunned=!1,(r=jQuery).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(!p.bgs_CheckRunned){p.bgs_CheckRunned=!0;var e=r('<span style="background-size:cover" />');r("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var a=window.getComputedStyle(i,null);a&&a.backgroundSize&&(p.bgs_Available="cover"===a.backgroundSize)}}(),e.remove()}}();var i=this;return this.options=e,this.settings=r.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function a(){(o.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(o=c.data("sbi_imgLiquid_settings"),d.actualSize=d.get(0).offsetWidth+d.get(0).offsetHeight/1e4,d.sizeOld&&d.actualSize!==d.sizeOld&&s(),d.sizeOld=d.actualSize,setTimeout(a,o.responsiveCheckTime))}function t(){c.data("sbi_imgLiquid_error",!0),d.addClass("sbi_imgLiquid_error"),o.onItemError&&o.onItemError(e,d,c),n()}function s(){var i,a,t,s,r,l,h,u,b=0,f=0,p=d.width(),g=d.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),o.fill===p/g>=c.data("owidth")/c.data("oheight")?(i="100%",a="auto",t=Math.floor(p),s=Math.floor(p*(c.data("oheight")/c.data("owidth")))):(i="auto",a="100%",t=Math.floor(g*(c.data("owidth")/c.data("oheight"))),s=Math.floor(g)),r=o.horizontalAlign.toLowerCase(),h=p-t,"left"===r&&(f=0),"center"===r&&(f=.5*h),"right"===r&&(f=h),-1!==r.indexOf("%")&&(r=parseInt(r.replace("%",""),10))>0&&(f=h*r*.01),l=o.verticalAlign.toLowerCase(),u=g-s,"left"===l&&(b=0),"center"===l&&(b=.5*u),"bottom"===l&&(b=u),-1!==l.indexOf("%")&&(l=parseInt(l.replace("%",""),10))>0&&(b=u*l*.01),o.hardPixels&&(i=t,a=s),c.css({width:i,height:a,"margin-left":Math.floor(f),"margin-top":Math.floor(b)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(o.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),o.removeBoxBackground&&d.css("background-image","none"),d.addClass("sbi_imgLiquid_nobgSize"),d.addClass("sbi_imgLiquid_ready")),o.onItemFinish&&o.onItemFinish(e,d,c),n()}function n(){e===i.length-1&&i.settings.onFinish&&i.settings.onFinish()}var o=i.settings,d=r(this),c=r("img:first",d);return c.length?(c.data("sbi_imgLiquid_settings")?(d.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),o=r.extend({},c.data("sbi_imgLiquid_settings"),i.options)):o=r.extend({},i.settings,function(){var e={};if(i.settings.useDataHtmlAttr){var a=d.attr("data-sbi_imgLiquid-fill"),t=d.attr("data-sbi_imgLiquid-horizontalAlign"),s=d.attr("data-sbi_imgLiquid-verticalAlign");("true"===a||"false"===a)&&(e.fill=Boolean("true"===a)),void 0===t||"left"!==t&&"center"!==t&&"right"!==t&&-1===t.indexOf("%")||(e.horizontalAlign=t),void 0===s||"top"!==s&&"bottom"!==s&&"center"!==s&&-1===s.indexOf("%")||(e.verticalAlign=s)}return p.isIE&&i.settings.ieFadeInDisabled&&(e.fadeInTime=0),e}()),c.data("sbi_imgLiquid_settings",o),o.onItemStart&&o.onItemStart(e,d,c),void(p.bgs_Available&&o.useBackgroundSize?(-1===d.css("background-image").indexOf(encodeURI(c.attr("src")))&&d.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),d.css({"background-size":o.fill?"cover":"contain","background-position":(o.horizontalAlign+" "+o.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),r("a:first",d).css({display:"block",width:"100%",height:"100%"}),r("img",d).css({display:"none"}),o.onItemFinish&&o.onItemFinish(e,d,c),d.addClass("sbi_imgLiquid_bgSize"),d.addClass("sbi_imgLiquid_ready"),n()):function(){if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var i=c.clone().removeAttr("style");return i.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(i),c.remove(),(c=i)[0].width=0,void setTimeout(Dc,10)}c.data("sbi_imgLiquid_oldProcessed")?s():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),r("img:not(:first)",d).css("display","none"),d.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",t),c[0].onerror=t,c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(d.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(s,e*o.delay)):setTimeout(Mc,o.timecheckvisibility)),a())}())):void t()})}}),function(){var e=p.injectCss,i=document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e)),i.appendChild(a)}(),o.find(".sbi_photo").sbi_imgLiquid({fill:!0})}var m=function(){var e=0;return function(i,a){clearTimeout(e),e=setTimeout(i,a)}}();function w(){if("thumbnail"!==g){var e=o.find(".sbi_photo").eq(0).innerWidth(),i=sbiGetColumnCount(o,parseInt(h),parseInt(h)),a=jQuery("#sbi_images").innerWidth()-jQuery("#sbi_images").width(),t=o.find("#sbi_images").width()/i-a;e<=t&&(e=t),o.find(".sbi_photo").css("height",e);var s=o.find(".sbi_photo").eq(0).innerWidth()/2;"px"==v&&(s+=2*parseInt(_)),o.find(".sbi_owl-buttons div").css("top",s)}}function y(){o.removeClass("sbi_small sbi_medium");var e=o.find(".sbi_item").innerWidth();e>120&&e<240?o.addClass("sbi_medium"):e<=120&&o.addClass("sbi_small")}jQuery(window).resize(function(){m(function(){w(),y(),jQuery(".sbi").each(function(){var e=jQuery(this),i=jQuery(this).attr("data-sbi-index");if(sbiSizeSVG(e),"auto"===e.attr("data-res")){var a=window.sbiFeedMeta[i].minRes,t=sbiGetResolutionSettings(e,"auto",h,u,i);sbiNeedToRaiseRes(""!==t.width?t.width:sbiGetWidthForResType(t.type),a)&&(window.sbiFeedMeta[i].minRes=640,e.find(".sbi_item").each(function(){var e=jQuery(this).find(".sbi_photo").attr("data-full-res"),i=jQuery(this).find(".sbi_photo img").attr("src"),t=jQuery(this);""===e&&(i.indexOf("p"+a+"x"+a)>-1?e=i.replace("p"+a+"x"+a,"p640x640"):i.indexOf("s"+a+"x"+a)>-1&&(e=i.replace("s"+a+"x"+a,"s640x640"))),t.find(".sbi_photo img").attr("src",e),t.find(".sbi_photo").css("background-image",'url("'+e+'")')}))}})},500)}),w(),function(e){var i={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},a={sbiCheckVisibility:function(e,i){if(jQuery.contains(document,e[0])){var t=i.sbiPreviousVisibility,s=e.is(":visible");i.sbiPreviousVisibility=s,null==t?i.runOnLoad&&i.callback(e,s):t!==s&&i.callback(e,s),setTimeout(function(){a.sbiCheckVisibility(e,i)},i.frequency)}}};e.fn.sbiVisibilityChanged=function(t){var s=e.extend({},i,t);return this.each(function(){a.sbiCheckVisibility(e(this),s)})}}(jQuery),jQuery(".sbi").filter(":hidden").sbiVisibilityChanged({callback:function(e,i){w(),y()},runOnLoad:!1}),y(),f.disablecache||void 0===e||"fetched"!==window.sbiCacheStatuses[f.feedIndex].feed||(e(i,a,C),window.sbiCacheStatuses[f.feedIndex].feed="cached"),B="finished",sbSVGify(o)}(z,j.feed);var L=10;o.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},L),L+=10}),E="",o.find("#sbi_images > .sbi_loader").remove(),o.find("#sbi_load").removeClass("sbi_hidden"),s>=l&&o.find(".sbi_load_btn").show(),setTimeout(function(){d.find(".sbi_loader").addClass("sbi_hidden"),d.find(".sbi_btn_text").removeClass("sbi_hidden")},500)}}function N(e,i){if(void 0===e.meta.error_message){var a=i.feedOptions,t="";a.headercolor.length&&(t='style="color: #'+a.headercolor+'"'),u='<a href="https://www.instagram.com/'+e.data.username+'" target="_blank" rel="noopener" title="@'+e.data.username+'" class="sbi_header_link" '+t+">",u+='<div class="sbi_header_text">';var s="";(void 0!==e.data.bio&&e.data.bio.length<1||"true"!=a.showbio)&&(s=' class="sbi_no_bio"'),u+="<h3 "+t+s+">"+e.data.username+"</h3>";var n='<p class="sbi_bio_info" ';"boxed"==a.headerstyle?n+='style="color: #'+a.headerprimarycolor+';"':n+=t,void 0!==e.data.bio&&e.data.bio.length>1&&""!=a.showbio&&"false"!=a.showbio&&(u+='<p class="sbi_bio" '+t+">"+e.data.bio+"</p>"),u+="</div>",u+='<div class="sbi_header_img">',u+='<div class="sbi_header_img_hover"><i class="sbi_new_logo"></i></div>',u+='<img src="'+e.data.profile_picture+'" alt="'+e.data.full_name+'" width="50" height="50">',u+="</div>",u+="</a>","boxed"==a.headerstyle&&(u+='<div class="sbi_header_bar" style="background: #'+a.headersecondarycolor+'">',"false"!=a.showbio&&(u+=n),u+='<a class="sbi_header_follow_btn" href="https://www.instagram.com/'+e.data.username+'" target="_blank" rel="noopener" style="color: #'+a.headercolor+"; background: #"+a.headerprimarycolor+';"><i class="sbi_new_logo"></i><span></span></div></div>'),0==r.find(".sbi_header_link").length&&r.find(".sb_instagram_header").prepend(u),r.find(".sbi_follow_btn").length&&r.find(".sbi_follow_btn a").attr("href","https://www.instagram.com/"+e.data.username),"boxed"==a.headerstyle&&r.find(".sbi_header_follow_btn").length&&r.find(".sbi_header_follow_btn span").text(r.find(".sb_instagram_header").attr("data-follow-text").replace(/\\/g,"")),r.find(".sb_instagram_header .sbi_header_link").hover(function(){r.find(".sb_instagram_header .sbi_header_img_hover").addClass("sbi_fade_in")},function(){r.find(".sb_instagram_header .sbi_header_img_hover").removeClass("sbi_fade_in")}),sbSVGify(r.find(".sb_instagram_header"))}}function G(e,a,t,r){var n=(y=e).length,o=t.getType;if(0==n)s+parseInt(t.num)>=z.data.length&&jQuery("#sbi_load .sbi_load_btn").hide();else{var d=[],l=n;jQuery.each(y,function(e,s){jQuery.ajax({method:"GET",url:s,dataType:"jsonp",success:function(n){var h=n.meta.error_message,u="",b="";if(void 0!==h){if(u+='<p><i class="fa fab fa-instagram" style="font-size: 16px; position: relative; top: 1px;"></i>&nbsp; Instagram Feed Error</p>',h.indexOf("access_token")>-1){u+="<p><b>Error: Access Token is not valid or has expired</b><br /><span>This error message is only visible to WordPress admins</span></p>",b="<p>There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.<br />If you continue to have an issue with your Access Token then please see <a href='https://smashballoon.com/my-instagram-access-token-keep-expiring/' target='_blank' rel='noopener'>this FAQ</a> for more information.</p>",jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+u+b+"</div>"),sbiAddTokenToExpiredList(sb_instagram_js_options.sb_instagram_at,a);var f={action:"sbi_set_use_backup",transientName:a,context:"falsecache"};return void jQuery.ajax({url:sbiajaxurl,type:"post",data:f,success:function(e){}})}if(h.indexOf("retired")>-1)return u+="<p><b>No longer possible to display this feed</b><br /><span>This error message is only visible to WordPress admins</span></p>",b="<p>Due to changes in the Instagram API, it is no longer possible to display a feed from an Instagram account which is not your own. You can now only display your own Instagram account. Please see <a href='https://smashballoon.com/instagram-api-changes-april-4-2018/' target='_blank' rel='noopener'>this post</a> for more information.</p>",void jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+u+b+"</div>");if(void 0!==n.code&&"429"==n.code){window.sbiFeedMeta[i].error={errorMsg:"<p><b>Error: Rate Limit Reached</b><br /><span>This error is only visible to WordPress admins</span>",errorDir:"<p>Backup cache will be used for 1 hour</p>"},r.find("#sbi_mod_error").length?-1==r.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&r.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):r.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>");var f={action:"sbi_set_use_backup",transientName:a,context:"falsecache"};jQuery.ajax({url:sbiajaxurl,type:"post",data:f,success:function(e){}}),n="error"}else h.indexOf("user does not exist")>-1||h.indexOf("you cannot view this resource")>-1?(window.sbiFeedMeta[i].error={errorMsg:'<p><b>Error: User ID <span class="sbiErrorIds">'+window.sbiFeedMeta[i].idsInFeed[e]+"</span> does not exist, is invalid, or is private</b><br /><span>This error is only visible to WordPress admins</span>",errorDir:"<p>Please double check that the Instagram User ID you are using is valid and not from a private account. To find your User ID simply enter your Instagram user name into this <a href='https://smashballoon.com/instagram-feed/find-instagram-user-id/' target='_blank' rel='noopener'>tool</a>.</p>"},r.find("#sbi_mod_error").length?-1==r.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&r.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):r.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>"),n="error"):h.indexOf("invalid media id")>-1&&(window.sbiFeedMeta[i].error={errorMsg:'<p><b>Error: Post Id <span class="sbiErrorIds">'+window.sbiFeedMeta[i].idsInFeed[e]+"</span> does not exist or is invalid</b><br /><span>This error is only visible to WordPress admins.</span>",errorDir:"<p>Please double check the media (post) id is correct.</p>"},r.find("#sbi_mod_error").length?-1==r.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&r.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):r.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>"),n="error")}"coordinates"==o&&(n.pagination={previous_url:s}),"error"!==n&&d.push(n),0==--l&&"finished"!==B&&function(e){var i=[],s=[];jQuery.each(d,function(a,t){if("single"==e&&(t.data=[t.data]),void 0!==t.data)if(jQuery.each(t.data,function(e,i){jQuery.inArray(i.id,q)>-1||(q.push(i.id),s.push(i))}),"coordinates"==e){var r=t.data[t.data.length-1].created_time,n=t.pagination.previous_url.split("max_timestamp=")[0]+"max_timestamp="+r;i.push(n)}else"object"==typeof t.pagination&&t.pagination&&void 0!==t.pagination.next_url&&i.push(t.pagination.next_url)}),"random"!==c?s.sort(function(e,i){return i.created_time-e.created_time}):(s.sort(function(e,i){return Math.round(Math.random())-.5}),a+="!"),void 0!==d&&(d[0].data=s),void 0!==d[0].pagination&&d[0].pagination?d[0].pagination.next_url=i:d[0].pagination={next_url:""};var n=d[0];"finished"!==B&&R(n,a,t,r),V++}(o)}})})}}}window.sbiUseBackup[i]={header:r.indexOf("header")>-1,feed:r.indexOf("feed")>-1},window.sbiFeedMeta[i]={error:{},idsInFeed:[],postsInFeed:[]},setTimeout(function(){!function a(t,s){var r=0,n=jQuery(t),o="standard_resolution",d=parseInt(t.getAttribute("data-cols")),c="none",l=t.getAttribute("data-num"),h=t.getAttribute("data-id"),u="",b=s.sbiHeaderCache;s.disablecache="true"==s.disablecache,s.media="all",""!==s.sortby&&(c=s.sortby),o=sbiGetResolutionSettings(n,t.getAttribute("data-res"),d,d,i);var f=[],p=[];if(void 0!==s.feedID){var g=s.feedID.split(","),m=s.mid.split(","),_=s.callback.split(",");jQuery.each(g,function(e){f.push(g[e]+"."+m[e]+"."+_[e]),p.push(g[e])}),h=p.join(","),p=p.join(",")}else f.push(sb_instagram_js_options.sb_instagram_at);var v=h.replace(/ /g,"").split(","),w=v,y=[],x="",C=[];jQuery.each(w,function(e,a){var t=void 0!==f[e]?addLinksToPage(f[e]):addLinksToPage(f[0]);x="https://api.instagram.com/v1/users/"+a+"/media/recent?access_token="+t+"&count=33",window.sbiFeedMeta[i].idsInFeed.push(a),y.push(x),C.push(t)});var I,k,S={num:l,getType:"user",user_id:h,cols:d,imgRes:o,sortby:c,feedOptions:s,looparray:w},j="",F="",T={header:"",feed:""},L=j.length,M=F.length,Q=40-Math.min(L+M,20),A="sbi_";if(w=w.join().replace(/[.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""),"all"!==s.media&&(A+=s.media.substring(0,1)),A+=w.substring(0,Q),Q=A.length,M<(Q=44-Q)/2?j=j.substring(0,Q-M):(j=0==F.length?j.substring(0,Q):j.substring(0,Q/2),F=0==j.length?F.substring(0,Q):F.substring(0,Q/2)),A+=j+F,T.feed=A.substring(0,45),T.header=(I=S.looparray[0],k=(k="sbi_header_"+I).substring(0,45)),sb_instagram_js_options.sbiPageCommentCache||1!==window.sbiCommentCacheStatus||!0===window.sbiStandalone.noDB?T.comments="no":T.comments="need",!0!==window.sbiCacheStatuses[s.feedIndex].feed&&!0!==window.sbiCacheStatuses[s.feedIndex].header&&"need"!==T.comments||s.disablecache||void 0!==s.tryFetch||(!function z(t,r,n,o,d){var c=t;window.sbiCommentCacheStatus=0;var l=n[0].getAttribute("data-sbi-index");"object"==typeof t&&(c=JSON.stringify(t));var h={url:sbiajaxurl,type:"POST",async:!0,cache:!1,data:{action:"get_cache",transientName:c,useBackupHeader:window.sbiUseBackup[l].header,useBackupFeed:window.sbiUseBackup[l].feed},success:function(d){var c={};if(0===d.trim().indexOf("{")&&(d=d.replace(/\\'/g,"'"),c=JSON.parse(d.trim())),"all"==o){if(void 0===c.header.error&&D(c.header,r),void 0===c.feed.error){if("finished"!==N&&W(c.feed,t,r,n),void 0!==c.warning){var l="<p><b>Cache Error: Looking for cache that doesn't exist. Now using a backup feed.</b><br /><span>This error is only visible to WordPress admins.</span>",h="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery("#sb_instagram").before('<div id="sbi_mod_error">'+l+h+"</div>")}}else{s=JSON.parse(n[0].getAttribute("data-options"));var u=n[0].getAttribute("data-sbi-index");if(s.feedIndex=u,!1!==window.sbiCacheStatuses[u].feed&&"tryfetch"===c.feed.error)window.sbiCacheStatuses[u].feed=!1,n.find(".sb_instagram_header .sbi_header_text").length||(window.sbiCacheStatuses[u].header=!1),window.sbiCacheStatuses[u].comments="no",s.tryFetch=!0,void 0===window.sbiCacheStatuses[s.feedIndex].tryFetch&&function(t,s){var r=0,n=jQuery(t),o="standard_resolution",d=parseInt(t.getAttribute("data-cols")),c="none",l=t.getAttribute("data-num"),h=t.getAttribute("data-id"),u="",b=s.sbiHeaderCache;s.disablecache="true"==s.disablecache,s.media="all",""!==s.sortby&&(c=s.sortby),o=sbiGetResolutionSettings(n,t.getAttribute("data-res"),d,d,i);var f=[],p=[];if(void 0!==s.feedID){var g=s.feedID.split(","),m=s.mid.split(","),_=s.callback.split(",");jQuery.each(g,function(e){f.push(g[e]+"."+m[e]+"."+_[e]),p.push(g[e])}),h=p.join(","),p=p.join(",")}else f.push(sb_instagram_js_options.sb_instagram_at);var v=h.replace(/ /g,"").split(","),w=v,y=[],x="",C=[];jQuery.each(w,function(e,a){var t=void 0!==f[e]?addLinksToPage(f[e]):addLinksToPage(f[0]);x="https://api.instagram.com/v1/users/"+a+"/media/recent?access_token="+t+"&count=33",window.sbiFeedMeta[i].idsInFeed.push(a),y.push(x),C.push(t)});var I={num:l,getType:"user",user_id:h,cols:d,imgRes:o,sortby:c,feedOptions:s,looparray:w},k="",S="",j={header:"",feed:""},F=k.length,T=S.length,L=40-Math.min(F+T,20),M="sbi_";if(w=w.join().replace(/[.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""),"all"!==s.media&&(M+=s.media.substring(0,1)),M+=w.substring(0,L),L=M.length,T<(L=44-L)/2?k=k.substring(0,L-T):(k=0==S.length?k.substring(0,L):k.substring(0,L/2),S=0==k.length?S.substring(0,L):S.substring(0,L/2)),M+=k+S,j.feed=M.substring(0,45),j.header=function(e){var i="sbi_header_"+e;return i=i.substring(0,45)}(I.looparray[0]),sb_instagram_js_options.sbiPageCommentCache||1!==window.sbiCommentCacheStatus||!0===window.sbiStandalone.noDB?j.comments="no":j.comments="need",!0!==window.sbiCacheStatuses[s.feedIndex].feed&&!0!==window.sbiCacheStatuses[s.feedIndex].header&&"need"!==j.comments||s.disablecache||void 0!==s.tryFetch||(W(j,I,n,"all",y),j.comments="no"),!1===window.sbiCacheStatuses[s.feedIndex].feed&&"fetched"!==window.sbiCacheStatuses[s.feedIndex].feed&&(window.sbiCacheStatuses[s.feedIndex].feed="fetched",window.sbiCacheStatuses[s.feedIndex].tryFetch="done",G(y,j.feed,I,n)),!window.sbiCacheStatuses[s.feedIndex].header&&"fetched"!==window.sbiCacheStatuses[s.feedIndex].header&&"user"===I.getType){window.sbiCacheStatuses[s.feedIndex].header="fetched";var Q=f[0].split(".");I.user_id=Q[0];var A="https://api.instagram.com/v1/users/"+I.user_id+"?access_token="+addLinksToPage(f[0]);jQuery.ajax({method:"GET",url:A,dataType:"jsonp",success:function(e){N(e,I),void 0!==e.data&&(s.disablecache||"cached"===window.sbiCacheStatuses[s.feedIndex].header||void 0===e.data.username||void 0!==e.data.pagination||(window.sbiCacheStatuses[s.feedIndex].header="cached",sbiCachePhotos(e,j.header,[addLinksToPage(f[0])])))}})}var z="",P=!1,O=!1,q=[],E="",B=0,V=1;function R(a,s,n,o){var d=o.find("#sbi_load .sbi_load_btn"),l=parseInt(n.num),h=parseInt(n.cols),u="auto",f=n.feedOptions,p=0,g=n.imgRes,m=(f.type,parseInt(f.maxrequests)),_=f.imagepadding,v=f.imagepaddingunit,w=n.looparray,y=(f.headerstyle,f.headerprimarycolor,f.headersecondarycolor,f.media);d.find(".sbi_loader").css("background-color",d.css("color")),""==z?z=a:1==P&&(jQuery.each(a.data,function(e,i){z.data.push(i)}),P=!1);var x=a.pagination.next_url;void 0===x||0==x.length?O=!0:d.show(),void 0!==a.pagination&&(z.pagination=a.pagination),""!==f.sortby&&(c=f.sortby),f.hovercolor;var I=r,k=[];if(0==o.find(".sbi_header_link").length){var S="https://api.instagram.com/v1/users/"+w[0]+"?access_token="+sb_instagram_js_options.sb_instagram_at,F="sbi_header_"+w[0];F=F.substring(0,45),("true"!=b||f.disablecache)&&o.find(".sb_instagram_header").length&&jQuery.ajax({method:"GET",url:S,dataType:"jsonp",success:function(e){N(e,n),f.disablecache||"cached"===window.sbiCacheStatuses[f.feedIndex].header||void 0===e.data||void 0===e.data.username||void 0!==e.data.pagination||(window.sbiCacheStatuses[f.feedIndex].header="cached",sbiCachePhotos(e,F,[sb_instagram_js_options.sb_instagram_at]))}})}if(jQuery.each(z.data,function(e,a){if("videos"==y&&"video"!==a.type&&(removePhoto=!0),"photos"==y&&"image"!==a.type&&"carousel"!==a.type&&(removePhoto=!0),!(++p>I-B+l||p<=I||(r++,i=o.attr("data-sbi-index"),jQuery.inArray(a.id,window.sbiFeedMeta[i].postsInFeed)>-1))){window.sbiFeedMeta[i].postsInFeed.push(a.id);var s=!1;"carousel"===a.type&&void 0!==a.carousel_media&&jQuery.each(a.carousel_media,function(e,i){void 0!==i.videos&&0===e&&(s=!0)});var n=a.images.standard_resolution.url;switch(g.type){case"thumbnail":n=a.images.thumbnail.url;break;case"low_resolution":n=a.images.low_resolution.url;break;case"auto":var d=sbiGetBestResolutionForAuto((g=sbiGetResolutionSettings(o,t.getAttribute("data-res"),h,u,i)).width,a.images.standard_resolution.width,a.images.standard_resolution.height,o.hasClass("sbi_highlight"));switch(d){case 320:n=a.images.low_resolution.url;break;case 150:n=a.images.thumbnail.url}}n=n.split("?ig_cache_key")[0];var c="",b=a.created_time;null!=a.caption&&""!=a.caption&&(c=(c=void 0!==a.caption?a.caption.text.replace(/"/g,"&quot;"):"").replace(/\n/g," "));var f=s?" sbi_carousel_vid_first":"",m="carousel"===a.type?'<i class="fa fa-clone sbi_carousel_icon" aria-hidden="true"></i>':"",_="video"===a.type||f?'<i class="fa fa-play sbi_playbtn"></i>':"";E+='<div class="sbi_item sbi_type_'+a.type+' sbi_new sbi_transition" id="sbi_'+a.id+'" data-date="'+b+'"><div class="sbi_photo_wrap"><a class="sbi_photo" href="'+a.link+'" target="_blank" rel="noopener" data-full-res="'+a.images.standard_resolution.url+'">'+m+_+'<img src="'+n+'" alt="'+c.replace(/<>/g," ")+'" width="200" height="200" /></a></div></div>'}}),k.reverse(),jQuery.each(k,function(e,i){z.data.splice(i,1)}),r-I<l&&(B+=r-I),r-I<l&&B<l&&V<m&&!O){var T=z.pagination.next_url;window.sbiCacheStatuses[f.feedIndex].feed="fetched",G(T,j.feed,n,o),P=!0}else{o.find("#sbi_images").append(E),function(i,t){sbiSizeSVG(o),o.find(".sbi_item").each(function(){var e=jQuery(this);e.find(".sbi_photo").hover(function(){jQuery(this).fadeTo(200,.85)},function(){jQuery(this).stop().fadeTo(500,1)})}),o.find("#sbi_images .sbi_item.sbi_new").sort(function(e,i){var a=jQuery(e).attr("data-date"),t=jQuery(i).attr("data-date");return"none"==c?t-a:Math.round(Math.random())-.5}).appendTo(o.find("#sbi_images")),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new")},500);var s,b,p,m=i.data.length;if(r>=m&&O&&d.hide(),o.find("#sbi_load .sbi_load_btn").off().on("click",function(){jQuery(this).find(".sbi_loader").removeClass("sbi_hidden"),jQuery(this).find(".sbi_btn_text").addClass("sbi_hidden"),B=0,r=parseInt(r),m=i.data.length,r+l<m||O?("finished"!==B&&R(a,t,n,o),P=!1,r>=m&&O&&d.hide()):(T=i.pagination.next_url,window.sbiCacheStatuses[f.feedIndex].feed="fetched",G(T,t,n,o),P=!0,V=0)}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),"thumbnail"!==g){var w=w||{VER:"0.9.944"};w.bgs_Available=!1,w.bgs_CheckRunned=!1,function(e){e.fn.extend({sbi_imgLiquid:function(i){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(!w.bgs_CheckRunned){w.bgs_CheckRunned=!0;var i=e('<span style="background-size:cover" />');e("body").append(i),function(){var e=i[0];if(e&&window.getComputedStyle){var a=window.getComputedStyle(e,null);a&&a.backgroundSize&&(w.bgs_Available="cover"===a.backgroundSize)}}(),i.remove()}}();var a=this;return this.options=i,this.settings=e.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(i){function t(){(o.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(o=c.data("sbi_imgLiquid_settings"),d.actualSize=d.get(0).offsetWidth+d.get(0).offsetHeight/1e4,d.sizeOld&&d.actualSize!==d.sizeOld&&r(),d.sizeOld=d.actualSize,setTimeout(t,o.responsiveCheckTime))}function s(){c.data("sbi_imgLiquid_error",!0),d.addClass("sbi_imgLiquid_error"),o.onItemError&&o.onItemError(i,d,c),n()}function r(){var e,a,t,s,r,l,h,u,b=0,f=0,p=d.width(),g=d.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),o.fill===p/g>=c.data("owidth")/c.data("oheight")?(e="100%",a="auto",t=Math.floor(p),s=Math.floor(p*(c.data("oheight")/c.data("owidth")))):(e="auto",a="100%",t=Math.floor(g*(c.data("owidth")/c.data("oheight"))),s=Math.floor(g)),r=o.horizontalAlign.toLowerCase(),h=p-t,"left"===r&&(f=0),"center"===r&&(f=.5*h),"right"===r&&(f=h),-1!==r.indexOf("%")&&(r=parseInt(r.replace("%",""),10))>0&&(f=h*r*.01),l=o.verticalAlign.toLowerCase(),u=g-s,"left"===l&&(b=0),"center"===l&&(b=.5*u),"bottom"===l&&(b=u),-1!==l.indexOf("%")&&(l=parseInt(l.replace("%",""),10))>0&&(b=u*l*.01),o.hardPixels&&(e=t,a=s),c.css({width:e,height:a,"margin-left":Math.floor(f),"margin-top":Math.floor(b)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(o.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),o.removeBoxBackground&&d.css("background-image","none"),d.addClass("sbi_imgLiquid_nobgSize"),d.addClass("sbi_imgLiquid_ready")),o.onItemFinish&&o.onItemFinish(i,d,c),n()}function n(){i===a.length-1&&a.settings.onFinish&&a.settings.onFinish()}var o=a.settings,d=e(this),c=e("img:first",d);return c.length?(c.data("sbi_imgLiquid_settings")?(d.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),o=e.extend({},c.data("sbi_imgLiquid_settings"),a.options)):o=e.extend({},a.settings,function(){var e={};if(a.settings.useDataHtmlAttr){var i=d.attr("data-sbi_imgLiquid-fill"),t=d.attr("data-sbi_imgLiquid-horizontalAlign"),s=d.attr("data-sbi_imgLiquid-verticalAlign");("true"===i||"false"===i)&&(e.fill=Boolean("true"===i)),void 0===t||"left"!==t&&"center"!==t&&"right"!==t&&-1===t.indexOf("%")||(e.horizontalAlign=t),void 0===s||"top"!==s&&"bottom"!==s&&"center"!==s&&-1===s.indexOf("%")||(e.verticalAlign=s)}return w.isIE&&a.settings.ieFadeInDisabled&&(e.fadeInTime=0),e}()),c.data("sbi_imgLiquid_settings",o),o.onItemStart&&o.onItemStart(i,d,c),void(w.bgs_Available&&o.useBackgroundSize?(-1===d.css("background-image").indexOf(encodeURI(c.attr("src")))&&d.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),d.css({"background-size":o.fill?"cover":"contain","background-position":(o.horizontalAlign+" "+o.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),e("a:first",d).css({display:"block",width:"100%",height:"100%"}),e("img",d).css({display:"none"}),o.onItemFinish&&o.onItemFinish(i,d,c),d.addClass("sbi_imgLiquid_bgSize"),d.addClass("sbi_imgLiquid_ready"),n()):function a(){if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var n=c.clone().removeAttr("style");return n.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(n),c.remove(),(c=n)[0].width=0,void setTimeout(a,10)}return c.data("sbi_imgLiquid_oldProcessed")?void r():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),e("img:not(:first)",d).css("display","none"),d.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",s),c[0].onerror=s,c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(d.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(r,i*o.delay)):setTimeout(Mc,o.timecheckvisibility)),void t())}())):void s()})}})}(jQuery),s=w.injectCss,b=document.getElementsByTagName("head")[0],(p=document.createElement("style")).type="text/css",p.styleSheet?p.styleSheet.cssText=s:p.appendChild(document.createTextNode(s)),b.appendChild(p),o.find(".sbi_photo").sbi_imgLiquid({fill:!0})}var y,x,I,k,S=(y=0,function(e,i){clearTimeout(y),y=setTimeout(e,i)});function j(){if("thumbnail"!==g){var e=o.find(".sbi_photo").eq(0).innerWidth(),i=sbiGetColumnCount(o,parseInt(h),parseInt(h)),a=jQuery("#sbi_images").innerWidth()-jQuery("#sbi_images").width(),t=o.find("#sbi_images").width()/i-a;e<=t&&(e=t),o.find(".sbi_photo").css("height",e);var s=o.find(".sbi_photo").eq(0).innerWidth()/2;"px"==v&&(s+=2*parseInt(_)),o.find(".sbi_owl-buttons div").css("top",s)}}function F(){o.removeClass("sbi_small sbi_medium");var e=o.find(".sbi_item").innerWidth();e>120&&e<240?o.addClass("sbi_medium"):e<=120&&o.addClass("sbi_small")}jQuery(window).resize(function(){S(function(){j(),F(),jQuery(".sbi").each(function(){var e=jQuery(this),i=jQuery(this).attr("data-sbi-index");if(sbiSizeSVG(e),"auto"===e.attr("data-res")){var a=window.sbiFeedMeta[i].minRes,t=sbiGetResolutionSettings(e,"auto",h,u,i);sbiNeedToRaiseRes(""!==t.width?t.width:sbiGetWidthForResType(t.type),a)&&(window.sbiFeedMeta[i].minRes=640,e.find(".sbi_item").each(function(){var e=jQuery(this).find(".sbi_photo").attr("data-full-res"),i=jQuery(this).find(".sbi_photo img").attr("src"),t=jQuery(this);""===e&&(i.indexOf("p"+a+"x"+a)>-1?e=i.replace("p"+a+"x"+a,"p640x640"):i.indexOf("s"+a+"x"+a)>-1&&(e=i.replace("s"+a+"x"+a,"s640x640"))),t.find(".sbi_photo img").attr("src",e),t.find(".sbi_photo").css("background-image",'url("'+e+'")')}))}})},500)}),j(),x=jQuery,I={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},k={sbiCheckVisibility:function(e,i){if(jQuery.contains(document,e[0])){var a=i.sbiPreviousVisibility,t=e.is(":visible");i.sbiPreviousVisibility=t,null==a?i.runOnLoad&&i.callback(e,t):a!==t&&i.callback(e,t),setTimeout(function(){k.sbiCheckVisibility(e,i)},i.frequency)}}},x.fn.sbiVisibilityChanged=function(e){var i=x.extend({},I,e);return this.each(function(){k.sbiCheckVisibility(x(this),i)})},jQuery(".sbi").filter(":hidden").sbiVisibilityChanged({callback:function(e,i){j(),F()},runOnLoad:!1}),F(),f.disablecache||void 0===e||"fetched"!==window.sbiCacheStatuses[f.feedIndex].feed||(e(i,t,C),window.sbiCacheStatuses[f.feedIndex].feed="cached"),B="finished",sbSVGify(o)}(z,j.feed);var L=10;o.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},L),L+=10}),E="",o.find("#sbi_images > .sbi_loader").remove(),o.find("#sbi_load").removeClass("sbi_hidden"),r>=l&&o.find(".sbi_load_btn").show(),setTimeout(function(){d.find(".sbi_loader").addClass("sbi_hidden"),d.find(".sbi_btn_text").removeClass("sbi_hidden")},500)}}function N(e,i){if(void 0===e.meta.error_message){var a=i.feedOptions,t="";a.headercolor.length&&(t='style="color: #'+a.headercolor+'"'),u='<a href="https://www.instagram.com/'+e.data.username+'" target="_blank" rel="noopener" title="@'+e.data.username+'" class="sbi_header_link" '+t+">",u+='<div class="sbi_header_text">';var s="";(void 0!==e.data.bio&&e.data.bio.length<1||"true"!=a.showbio)&&(s=' class="sbi_no_bio"'),u+="<h3 "+t+s+">"+e.data.username+"</h3>";var r='<p class="sbi_bio_info" ';"boxed"==a.headerstyle?r+='style="color: #'+a.headerprimarycolor+';"':r+=t,void 0!==e.data.bio&&e.data.bio.length>1&&""!=a.showbio&&"false"!=a.showbio&&(u+='<p class="sbi_bio" '+t+">"+e.data.bio+"</p>"),u+="</div>",u+='<div class="sbi_header_img">',u+='<div class="sbi_header_img_hover"><i class="sbi_new_logo"></i></div>',u+='<img src="'+e.data.profile_picture+'" alt="'+e.data.full_name+'" width="50" height="50">',u+="</div>",u+="</a>","boxed"==a.headerstyle&&(u+='<div class="sbi_header_bar" style="background: #'+a.headersecondarycolor+'">',"false"!=a.showbio&&(u+=r),u+='<a class="sbi_header_follow_btn" href="https://www.instagram.com/'+e.data.username+'" target="_blank" rel="noopener" style="color: #'+a.headercolor+"; background: #"+a.headerprimarycolor+';"><i class="sbi_new_logo"></i><span></span></div></div>'),0==n.find(".sbi_header_link").length&&n.find(".sb_instagram_header").prepend(u),n.find(".sbi_follow_btn").length&&n.find(".sbi_follow_btn a").attr("href","https://www.instagram.com/"+e.data.username),"boxed"==a.headerstyle&&n.find(".sbi_header_follow_btn").length&&n.find(".sbi_header_follow_btn span").text(n.find(".sb_instagram_header").attr("data-follow-text").replace(/\\/g,"")),n.find(".sb_instagram_header .sbi_header_link").hover(function(){n.find(".sb_instagram_header .sbi_header_img_hover").addClass("sbi_fade_in")},function(){n.find(".sb_instagram_header .sbi_header_img_hover").removeClass("sbi_fade_in")}),sbSVGify(n.find(".sb_instagram_header"))}}function G(e,a,t,s){var n=(y=e).length,o=t.getType;if(0==n)r+parseInt(t.num)>=z.data.length&&jQuery("#sbi_load .sbi_load_btn").hide();else{var d=[],l=n;jQuery.each(y,function(e,r){jQuery.ajax({method:"GET",url:r,dataType:"jsonp",success:function(n){var h=n.meta.error_message,u="",b="";if(void 0!==h){if(u+='<p><i class="fa fab fa-instagram" style="font-size: 16px; position: relative; top: 1px;"></i>&nbsp; Instagram Feed Error</p>',h.indexOf("access_token")>-1){u+="<p><b>Error: Access Token is not valid or has expired</b><br /><span>This error message is only visible to WordPress admins</span></p>",b="<p>There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.<br />If you continue to have an issue with your Access Token then please see <a href='https://smashballoon.com/my-instagram-access-token-keep-expiring/' target='_blank' rel='noopener'>this FAQ</a> for more information.</p>",jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+u+b+"</div>"),sbiAddTokenToExpiredList(sb_instagram_js_options.sb_instagram_at,a);var f={action:"sbi_set_use_backup",transientName:a,context:"falsecache"};return void jQuery.ajax({url:sbiajaxurl,type:"post",data:f,success:function(e){}})}if(h.indexOf("retired")>-1)return u+="<p><b>No longer possible to display this feed</b><br /><span>This error message is only visible to WordPress admins</span></p>",b="<p>Due to changes in the Instagram API, it is no longer possible to display a feed from an Instagram account which is not your own. You can now only display your own Instagram account. Please see <a href='https://smashballoon.com/instagram-api-changes-april-4-2018/' target='_blank' rel='noopener'>this post</a> for more information.</p>",void jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+u+b+"</div>");if(void 0!==n.code&&"429"==n.code){window.sbiFeedMeta[i].error={errorMsg:"<p><b>Error: Rate Limit Reached</b><br /><span>This error is only visible to WordPress admins</span>",errorDir:"<p>Backup cache will be used for 1 hour</p>"},s.find("#sbi_mod_error").length?-1==s.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&s.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):s.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>");var f={action:"sbi_set_use_backup",transientName:a,context:"falsecache"};jQuery.ajax({url:sbiajaxurl,type:"post",data:f,success:function(e){}}),n="error"}else h.indexOf("user does not exist")>-1||h.indexOf("you cannot view this resource")>-1?(window.sbiFeedMeta[i].error={errorMsg:'<p><b>Error: User ID <span class="sbiErrorIds">'+window.sbiFeedMeta[i].idsInFeed[e]+"</span> does not exist, is invalid, or is private</b><br /><span>This error is only visible to WordPress admins</span>",errorDir:"<p>Please double check that the Instagram User ID you are using is valid and not from a private account. To find your User ID simply enter your Instagram user name into this <a href='https://smashballoon.com/instagram-feed/find-instagram-user-id/' target='_blank' rel='noopener'>tool</a>.</p>"},s.find("#sbi_mod_error").length?-1==s.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&s.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):s.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>"),n="error"):h.indexOf("invalid media id")>-1&&(window.sbiFeedMeta[i].error={errorMsg:'<p><b>Error: Post Id <span class="sbiErrorIds">'+window.sbiFeedMeta[i].idsInFeed[e]+"</span> does not exist or is invalid</b><br /><span>This error is only visible to WordPress admins.</span>",errorDir:"<p>Please double check the media (post) id is correct.</p>"},s.find("#sbi_mod_error").length?-1==s.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&s.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):s.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>"),n="error")}"coordinates"==o&&(n.pagination={previous_url:r}),"error"!==n&&d.push(n),0==--l&&"finished"!==B&&function(e){var i=[],r=[];jQuery.each(d,function(a,t){if("single"==e&&(t.data=[t.data]),void 0!==t.data)if(jQuery.each(t.data,function(e,i){jQuery.inArray(i.id,q)>-1||(q.push(i.id),r.push(i))}),"coordinates"==e){var s=t.data[t.data.length-1].created_time,n=t.pagination.previous_url.split("max_timestamp=")[0]+"max_timestamp="+s;i.push(n)}else"object"==typeof t.pagination&&t.pagination&&void 0!==t.pagination.next_url&&i.push(t.pagination.next_url)}),"random"!==c?r.sort(function(e,i){return i.created_time-e.created_time}):(r.sort(function(e,i){return Math.round(Math.random())-.5}),a+="!"),void 0!==d&&(d[0].data=r),void 0!==d[0].pagination&&d[0].pagination?d[0].pagination.next_url=i:d[0].pagination={next_url:""};var n=d[0];"finished"!==B&&R(n,a,t,s),V++}(o)}})})}}function W(e,i,t,r,n){var o=e;window.sbiCommentCacheStatus=0;var d=t[0].getAttribute("data-sbi-index");"object"==typeof e&&(o=JSON.stringify(e));var c={url:sbiajaxurl,type:"POST",async:!0,cache:!1,data:{action:"get_cache",transientName:o,useBackupHeader:window.sbiUseBackup[d].header,useBackupFeed:window.sbiUseBackup[d].feed},success:function(n){var o={};if(0===n.trim().indexOf("{")&&(n=n.replace(/\\'/g,"'"),o=JSON.parse(n.trim())),"all"==r){if(void 0===o.header.error&&N(o.header,i),void 0===o.feed.error){if("finished"!==B&&R(o.feed,e,i,t),void 0!==o.warning){var d="<p><b>Cache Error: Looking for cache that doesn't exist. Now using a backup feed.</b><br /><span>This error is only visible to WordPress admins.</span>",c="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery("#sb_instagram").before('<div id="sbi_mod_error">'+d+c+"</div>")}}else{s=JSON.parse(t[0].getAttribute("data-options"));var l=t[0].getAttribute("data-sbi-index");if(s.feedIndex=l,!1!==window.sbiCacheStatuses[l].feed&&"tryfetch"===o.feed.error)window.sbiCacheStatuses[l].feed=!1,t.find(".sb_instagram_header .sbi_header_text").length||(window.sbiCacheStatuses[l].header=!1),window.sbiCacheStatuses[l].comments="no",s.tryFetch=!0,void 0===window.sbiCacheStatuses[s.feedIndex].tryFetch&&a(t[0],s);else if(!0===window.sbiCacheStatuses[l].feed){var d="<p><b>Cache Error: Looking for cache that doesn't exist</b><br /><span>This error is only visible to WordPress admins.</span>",c="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+d+c+"</div>");var h={action:"sbi_set_use_backup",transientName:e,context:"falsecache"};jQuery.ajax({url:sbiajaxurl,type:"post",data:h,success:function(e){}})}}if("tryfetch"===o.header.error){s=JSON.parse(t[0].getAttribute("data-options"));var l=t[0].getAttribute("data-sbi-index");s.feedIndex=l,!1!==window.sbiCacheStatuses[l].header&&(t.find(".sb_instagram_header .sbi_header_text").length||(window.sbiCacheStatuses[l].header=!1,s.tryFetch=!0,void 0===window.sbiCacheStatuses[s.feedIndex].tryFetch&&a(t[0],s)))}void 0===o.comments.error&&(sb_instagram_js_options.sbiPageCommentCache=o.comments)}else"header"==r?N(o,i):"finished"!==B&&R(o,e,i,t)},error:function(e,i,a){console.log(a)}};jQuery.ajax(c)}}(n[0],s);else if(!0===window.sbiCacheStatuses[u].feed){var l="<p><b>Cache Error: Looking for cache that doesn't exist</b><br /><span>This error is only visible to WordPress admins.</span>",h="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+l+h+"</div>");var b={action:"sbi_set_use_backup",transientName:t,context:"falsecache"};jQuery.ajax({url:sbiajaxurl,type:"post",data:b,success:function(e){}})}}if("tryfetch"===c.header.error){s=JSON.parse(n[0].getAttribute("data-options"));var u=n[0].getAttribute("data-sbi-index");s.feedIndex=u,!1!==window.sbiCacheStatuses[u].header&&(n.find(".sb_instagram_header .sbi_header_text").length||(window.sbiCacheStatuses[u].header=!1,s.tryFetch=!0,void 0===window.sbiCacheStatuses[s.feedIndex].tryFetch&&a(n[0],s)))}void 0===c.comments.error&&(sb_instagram_js_options.sbiPageCommentCache=c.comments)}else"header"==o?D(c,r):"finished"!==N&&W(c,t,r,n)},error:function(e,i,a){console.log(a)}};jQuery.ajax(h)}(T,S,n,"all"),T.comments="no"),!1===window.sbiCacheStatuses[s.feedIndex].feed&&"fetched"!==window.sbiCacheStatuses[s.feedIndex].feed&&(window.sbiCacheStatuses[s.feedIndex].feed="fetched",window.sbiCacheStatuses[s.feedIndex].tryFetch="done",H(y,T.feed,S,n)),!window.sbiCacheStatuses[s.feedIndex].header&&"fetched"!==window.sbiCacheStatuses[s.feedIndex].header&&"user"===S.getType){window.sbiCacheStatuses[s.feedIndex].header="fetched";var P=f[0].split(".");S.user_id=P[0];var O="https://api.instagram.com/v1/users/"+S.user_id+"?access_token="+addLinksToPage(f[0]);jQuery.ajax({method:"GET",url:O,dataType:"jsonp",success:function(e){D(e,S),void 0!==e.data&&(s.disablecache||"cached"===window.sbiCacheStatuses[s.feedIndex].header||void 0===e.data.username||void 0!==e.data.pagination||(window.sbiCacheStatuses[s.feedIndex].header="cached",sbiCachePhotos(e,T.header,[addLinksToPage(f[0])])))}})}var q="",E=!1,B=!1,V=[],R="",N=0,G=1;function W(a,s,n,o){var d=o.find("#sbi_load .sbi_load_btn"),l=parseInt(n.num),h=parseInt(n.cols),u="auto",f=n.feedOptions,p=0,g=n.imgRes,m=(f.type,parseInt(f.maxrequests)),_=f.imagepadding,v=f.imagepaddingunit,w=n.looparray,y=(f.headerstyle,f.headerprimarycolor,f.headersecondarycolor,f.media);d.find(".sbi_loader").css("background-color",d.css("color")),""==q?q=a:1==E&&(jQuery.each(a.data,function(e,i){q.data.push(i)}),E=!1);var x=a.pagination.next_url;void 0===x||0==x.length?B=!0:d.show(),void 0!==a.pagination&&(q.pagination=a.pagination),""!==f.sortby&&(c=f.sortby),f.hovercolor;var I=r,k=[];if(0==o.find(".sbi_header_link").length){var S="https://api.instagram.com/v1/users/"+w[0]+"?access_token="+sb_instagram_js_options.sb_instagram_at,j="sbi_header_"+w[0];j=j.substring(0,45),("true"!=b||f.disablecache)&&o.find(".sb_instagram_header").length&&jQuery.ajax({method:"GET",url:S,dataType:"jsonp",success:function(e){D(e,n),f.disablecache||"cached"===window.sbiCacheStatuses[f.feedIndex].header||void 0===e.data||void 0===e.data.username||void 0!==e.data.pagination||(window.sbiCacheStatuses[f.feedIndex].header="cached",sbiCachePhotos(e,j,[sb_instagram_js_options.sb_instagram_at]))}})}if(jQuery.each(q.data,function(e,a){if("videos"==y&&"video"!==a.type&&(removePhoto=!0),"photos"==y&&"image"!==a.type&&"carousel"!==a.type&&(removePhoto=!0),!(++p>I-N+l||p<=I||(r++,i=o.attr("data-sbi-index"),jQuery.inArray(a.id,window.sbiFeedMeta[i].postsInFeed)>-1))){window.sbiFeedMeta[i].postsInFeed.push(a.id);var s=!1;"carousel"===a.type&&void 0!==a.carousel_media&&jQuery.each(a.carousel_media,function(e,i){void 0!==i.videos&&0===e&&(s=!0)});var n=a.images.standard_resolution.url;switch(g.type){case"thumbnail":n=a.images.thumbnail.url;break;case"low_resolution":n=a.images.low_resolution.url;break;case"auto":var d=sbiGetBestResolutionForAuto((g=sbiGetResolutionSettings(o,t.getAttribute("data-res"),h,u,i)).width,a.images.standard_resolution.width,a.images.standard_resolution.height,o.hasClass("sbi_highlight"));switch(d){case 320:n=a.images.low_resolution.url;break;case 150:n=a.images.thumbnail.url}}n=n.split("?ig_cache_key")[0];var c="",b=a.created_time;null!=a.caption&&""!=a.caption&&(c=(c=void 0!==a.caption?a.caption.text.replace(/"/g,"&quot;"):"").replace(/\n/g," "));var f=s?" sbi_carousel_vid_first":"",m="carousel"===a.type?'<i class="fa fa-clone sbi_carousel_icon" aria-hidden="true"></i>':"",_="video"===a.type||f?'<i class="fa fa-play sbi_playbtn"></i>':"";R+='<div class="sbi_item sbi_type_'+a.type+' sbi_new sbi_transition" id="sbi_'+a.id+'" data-date="'+b+'"><div class="sbi_photo_wrap"><a class="sbi_photo" href="'+a.link+'" target="_blank" rel="noopener" data-full-res="'+a.images.standard_resolution.url+'">'+m+_+'<img src="'+n+'" alt="'+c.replace(/<>/g," ")+'" width="200" height="200" /></a></div></div>'}}),k.reverse(),jQuery.each(k,function(e,i){q.data.splice(i,1)}),r-I<l&&(N+=r-I),r-I<l&&N<l&&G<m&&!B){var F=q.pagination.next_url;window.sbiCacheStatuses[f.feedIndex].feed="fetched",H(F,T.feed,n,o),E=!0}else{o.find("#sbi_images").append(R),function(i,t){sbiSizeSVG(o),o.find(".sbi_item").each(function(){var e=jQuery(this);e.find(".sbi_photo").hover(function(){jQuery(this).fadeTo(200,.85)},function(){jQuery(this).stop().fadeTo(500,1)})}),o.find("#sbi_images .sbi_item.sbi_new").sort(function(e,i){var a=jQuery(e).attr("data-date"),t=jQuery(i).attr("data-date");return"none"==c?t-a:Math.round(Math.random())-.5}).appendTo(o.find("#sbi_images")),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new")},500);var s=i.data.length;if(r>=s&&B&&d.hide(),o.find("#sbi_load .sbi_load_btn").off().on("click",function(){jQuery(this).find(".sbi_loader").removeClass("sbi_hidden"),jQuery(this).find(".sbi_btn_text").addClass("sbi_hidden"),N=0,r=parseInt(r),s=i.data.length,r+l<s||B?("finished"!==N&&W(a,t,n,o),E=!1,r>=s&&B&&d.hide()):(F=i.pagination.next_url,window.sbiCacheStatuses[f.feedIndex].feed="fetched",H(F,t,n,o),E=!0,G=0)}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),"thumbnail"!==g){var b=b||{VER:"0.9.944"};b.bgs_Available=!1,b.bgs_CheckRunned=!1,function(e){e.fn.extend({sbi_imgLiquid:function(i){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(!b.bgs_CheckRunned){b.bgs_CheckRunned=!0;var i=e('<span style="background-size:cover" />');e("body").append(i),function(){var e=i[0];if(e&&window.getComputedStyle){var a=window.getComputedStyle(e,null);a&&a.backgroundSize&&(b.bgs_Available="cover"===a.backgroundSize)}}(),i.remove()}}();var a=this;return this.options=i,this.settings=e.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(i){function t(){(o.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(o=c.data("sbi_imgLiquid_settings"),d.actualSize=d.get(0).offsetWidth+d.get(0).offsetHeight/1e4,d.sizeOld&&d.actualSize!==d.sizeOld&&r(),d.sizeOld=d.actualSize,setTimeout(t,o.responsiveCheckTime))}function s(){c.data("sbi_imgLiquid_error",!0),d.addClass("sbi_imgLiquid_error"),o.onItemError&&o.onItemError(i,d,c),n()}function r(){var e,a,t,s,r,l,h,u,b=0,f=0,p=d.width(),g=d.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),o.fill===p/g>=c.data("owidth")/c.data("oheight")?(e="100%",a="auto",t=Math.floor(p),s=Math.floor(p*(c.data("oheight")/c.data("owidth")))):(e="auto",a="100%",t=Math.floor(g*(c.data("owidth")/c.data("oheight"))),s=Math.floor(g)),r=o.horizontalAlign.toLowerCase(),h=p-t,"left"===r&&(f=0),"center"===r&&(f=.5*h),"right"===r&&(f=h),-1!==r.indexOf("%")&&(r=parseInt(r.replace("%",""),10))>0&&(f=h*r*.01),l=o.verticalAlign.toLowerCase(),u=g-s,"left"===l&&(b=0),"center"===l&&(b=.5*u),"bottom"===l&&(b=u),-1!==l.indexOf("%")&&(l=parseInt(l.replace("%",""),10))>0&&(b=u*l*.01),o.hardPixels&&(e=t,a=s),c.css({width:e,height:a,"margin-left":Math.floor(f),"margin-top":Math.floor(b)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(o.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),o.removeBoxBackground&&d.css("background-image","none"),d.addClass("sbi_imgLiquid_nobgSize"),d.addClass("sbi_imgLiquid_ready")),o.onItemFinish&&o.onItemFinish(i,d,c),n()}function n(){i===a.length-1&&a.settings.onFinish&&a.settings.onFinish()}var o=a.settings,d=e(this),c=e("img:first",d);return c.length?(c.data("sbi_imgLiquid_settings")?(d.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),o=e.extend({},c.data("sbi_imgLiquid_settings"),a.options)):o=e.extend({},a.settings,function(){var e={};if(a.settings.useDataHtmlAttr){var i=d.attr("data-sbi_imgLiquid-fill"),t=d.attr("data-sbi_imgLiquid-horizontalAlign"),s=d.attr("data-sbi_imgLiquid-verticalAlign");("true"===i||"false"===i)&&(e.fill=Boolean("true"===i)),void 0===t||"left"!==t&&"center"!==t&&"right"!==t&&-1===t.indexOf("%")||(e.horizontalAlign=t),void 0===s||"top"!==s&&"bottom"!==s&&"center"!==s&&-1===s.indexOf("%")||(e.verticalAlign=s)}return b.isIE&&a.settings.ieFadeInDisabled&&(e.fadeInTime=0),e}()),c.data("sbi_imgLiquid_settings",o),o.onItemStart&&o.onItemStart(i,d,c),void(b.bgs_Available&&o.useBackgroundSize?(-1===d.css("background-image").indexOf(encodeURI(c.attr("src")))&&d.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),d.css({"background-size":o.fill?"cover":"contain","background-position":(o.horizontalAlign+" "+o.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),e("a:first",d).css({display:"block",width:"100%",height:"100%"}),e("img",d).css({display:"none"}),o.onItemFinish&&o.onItemFinish(i,d,c),d.addClass("sbi_imgLiquid_bgSize"),d.addClass("sbi_imgLiquid_ready"),n()):function(){if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var a=c.clone().removeAttr("style");return a.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(a),c.remove(),(c=a)[0].width=0,void setTimeout(Dc,10)}c.data("sbi_imgLiquid_oldProcessed")?r():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),e("img:not(:first)",d).css("display","none"),d.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",s),c[0].onerror=s,c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(d.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(r,i*o.delay)):setTimeout(Mc,o.timecheckvisibility)),t())}())):void s()})}})}(jQuery),function(){var e=b.injectCss,i=document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e)),i.appendChild(a)}(),o.find(".sbi_photo").sbi_imgLiquid({fill:!0})}var p=function(){var e=0;return function(i,a){clearTimeout(e),e=setTimeout(i,a)}}();function m(){if("thumbnail"!==g){var e=o.find(".sbi_photo").eq(0).innerWidth(),i=sbiGetColumnCount(o,parseInt(h),parseInt(h)),a=jQuery("#sbi_images").innerWidth()-jQuery("#sbi_images").width(),t=o.find("#sbi_images").width()/i-a;e<=t&&(e=t),o.find(".sbi_photo").css("height",e);var s=o.find(".sbi_photo").eq(0).innerWidth()/2;"px"==v&&(s+=2*parseInt(_)),o.find(".sbi_owl-buttons div").css("top",s)}}function w(){o.removeClass("sbi_small sbi_medium");var e=o.find(".sbi_item").innerWidth();e>120&&e<240?o.addClass("sbi_medium"):e<=120&&o.addClass("sbi_small")}jQuery(window).resize(function(){p(function(){m(),w(),jQuery(".sbi").each(function(){var e=jQuery(this),i=jQuery(this).attr("data-sbi-index");if(sbiSizeSVG(e),"auto"===e.attr("data-res")){var a=window.sbiFeedMeta[i].minRes,t=sbiGetResolutionSettings(e,"auto",h,u,i);sbiNeedToRaiseRes(""!==t.width?t.width:sbiGetWidthForResType(t.type),a)&&(window.sbiFeedMeta[i].minRes=640,e.find(".sbi_item").each(function(){var e=jQuery(this).find(".sbi_photo").attr("data-full-res"),i=jQuery(this).find(".sbi_photo img").attr("src"),t=jQuery(this);""===e&&(i.indexOf("p"+a+"x"+a)>-1?e=i.replace("p"+a+"x"+a,"p640x640"):i.indexOf("s"+a+"x"+a)>-1&&(e=i.replace("s"+a+"x"+a,"s640x640"))),t.find(".sbi_photo img").attr("src",e),t.find(".sbi_photo").css("background-image",'url("'+e+'")')}))}})},500)}),m(),function(e){var i={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},a={sbiCheckVisibility:function(e,i){if(jQuery.contains(document,e[0])){var t=i.sbiPreviousVisibility,s=e.is(":visible");i.sbiPreviousVisibility=s,null==t?i.runOnLoad&&i.callback(e,s):t!==s&&i.callback(e,s),setTimeout(function(){a.sbiCheckVisibility(e,i)},i.frequency)}}};e.fn.sbiVisibilityChanged=function(t){var s=e.extend({},i,t);return this.each(function(){a.sbiCheckVisibility(e(this),s)})}}(jQuery),jQuery(".sbi").filter(":hidden").sbiVisibilityChanged({callback:function(e,i){m(),w()},runOnLoad:!1}),w(),f.disablecache||void 0===e||"fetched"!==window.sbiCacheStatuses[f.feedIndex].feed||(e(i,t,C),window.sbiCacheStatuses[f.feedIndex].feed="cached"),N="finished",sbSVGify(o)}(q,T.feed);var L=10;o.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},L),L+=10}),R="",o.find("#sbi_images > .sbi_loader").remove(),o.find("#sbi_load").removeClass("sbi_hidden"),r>=l&&o.find(".sbi_load_btn").show(),setTimeout(function(){d.find(".sbi_loader").addClass("sbi_hidden"),d.find(".sbi_btn_text").removeClass("sbi_hidden")},500)}}function D(e,i){if(void 0===e.meta.error_message){var a=i.feedOptions,t="";a.headercolor.length&&(t='style="color: #'+a.headercolor+'"'),u='<a href="https://www.instagram.com/'+e.data.username+'" target="_blank" rel="noopener" title="@'+e.data.username+'" class="sbi_header_link" '+t+">",u+='<div class="sbi_header_text">';var s="";(void 0!==e.data.bio&&e.data.bio.length<1||"true"!=a.showbio)&&(s=' class="sbi_no_bio"'),u+="<h3 "+t+s+">"+e.data.username+"</h3>";var r='<p class="sbi_bio_info" ';"boxed"==a.headerstyle?r+='style="color: #'+a.headerprimarycolor+';"':r+=t,void 0!==e.data.bio&&e.data.bio.length>1&&""!=a.showbio&&"false"!=a.showbio&&(u+='<p class="sbi_bio" '+t+">"+e.data.bio+"</p>"),u+="</div>",u+='<div class="sbi_header_img">',u+='<div class="sbi_header_img_hover"><i class="sbi_new_logo"></i></div>',u+='<img src="'+e.data.profile_picture+'" alt="'+e.data.full_name+'" width="50" height="50">',u+="</div>",u+="</a>","boxed"==a.headerstyle&&(u+='<div class="sbi_header_bar" style="background: #'+a.headersecondarycolor+'">',"false"!=a.showbio&&(u+=r),u+='<a class="sbi_header_follow_btn" href="https://www.instagram.com/'+e.data.username+'" target="_blank" rel="noopener" style="color: #'+a.headercolor+"; background: #"+a.headerprimarycolor+';"><i class="sbi_new_logo"></i><span></span></div></div>'),0==n.find(".sbi_header_link").length&&n.find(".sb_instagram_header").prepend(u),n.find(".sbi_follow_btn").length&&n.find(".sbi_follow_btn a").attr("href","https://www.instagram.com/"+e.data.username),"boxed"==a.headerstyle&&n.find(".sbi_header_follow_btn").length&&n.find(".sbi_header_follow_btn span").text(n.find(".sb_instagram_header").attr("data-follow-text").replace(/\\/g,"")),n.find(".sb_instagram_header .sbi_header_link").hover(function(){n.find(".sb_instagram_header .sbi_header_img_hover").addClass("sbi_fade_in")},function(){n.find(".sb_instagram_header .sbi_header_img_hover").removeClass("sbi_fade_in")}),sbSVGify(n.find(".sb_instagram_header"))}}function H(e,a,t,s){var n=(y=e).length,o=t.getType;if(0==n)r+parseInt(t.num)>=q.data.length&&jQuery("#sbi_load .sbi_load_btn").hide();else{var d=[],l=n;jQuery.each(y,function(e,r){jQuery.ajax({method:"GET",url:r,dataType:"jsonp",success:function(n){var h=n.meta.error_message,u="",b="";if(void 0!==h){if(u+='<p><i class="fa fab fa-instagram" style="font-size: 16px; position: relative; top: 1px;"></i>&nbsp; Instagram Feed Error</p>',h.indexOf("access_token")>-1){u+="<p><b>Error: Access Token is not valid or has expired</b><br /><span>This error message is only visible to WordPress admins</span></p>",b="<p>There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.<br />If you continue to have an issue with your Access Token then please see <a href='https://smashballoon.com/my-instagram-access-token-keep-expiring/' target='_blank' rel='noopener'>this FAQ</a> for more information.</p>",jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+u+b+"</div>"),sbiAddTokenToExpiredList(sb_instagram_js_options.sb_instagram_at,a);var f={action:"sbi_set_use_backup",transientName:a,context:"falsecache"};return void jQuery.ajax({url:sbiajaxurl,type:"post",data:f,success:function(e){}})}if(h.indexOf("retired")>-1)return u+="<p><b>No longer possible to display this feed</b><br /><span>This error message is only visible to WordPress admins</span></p>",b="<p>Due to changes in the Instagram API, it is no longer possible to display a feed from an Instagram account which is not your own. You can now only display your own Instagram account. Please see <a href='https://smashballoon.com/instagram-api-changes-april-4-2018/' target='_blank' rel='noopener'>this post</a> for more information.</p>",void jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+u+b+"</div>");if(void 0!==n.code&&"429"==n.code){window.sbiFeedMeta[i].error={errorMsg:"<p><b>Error: Rate Limit Reached</b><br /><span>This error is only visible to WordPress admins</span>",errorDir:"<p>Backup cache will be used for 1 hour</p>"},s.find("#sbi_mod_error").length?-1==s.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&s.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):s.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>");var f={action:"sbi_set_use_backup",transientName:a,context:"falsecache"};jQuery.ajax({url:sbiajaxurl,type:"post",data:f,success:function(e){}}),n="error"}else h.indexOf("user does not exist")>-1||h.indexOf("you cannot view this resource")>-1?(window.sbiFeedMeta[i].error={errorMsg:'<p><b>Error: User ID <span class="sbiErrorIds">'+window.sbiFeedMeta[i].idsInFeed[e]+"</span> does not exist, is invalid, or is private</b><br /><span>This error is only visible to WordPress admins</span>",errorDir:"<p>Please double check that the Instagram User ID you are using is valid and not from a private account. To find your User ID simply enter your Instagram user name into this <a href='https://smashballoon.com/instagram-feed/find-instagram-user-id/' target='_blank' rel='noopener'>tool</a>.</p>"},s.find("#sbi_mod_error").length?-1==s.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&s.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):s.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>"),n="error"):h.indexOf("invalid media id")>-1&&(window.sbiFeedMeta[i].error={errorMsg:'<p><b>Error: Post Id <span class="sbiErrorIds">'+window.sbiFeedMeta[i].idsInFeed[e]+"</span> does not exist or is invalid</b><br /><span>This error is only visible to WordPress admins.</span>",errorDir:"<p>Please double check the media (post) id is correct.</p>"},s.find("#sbi_mod_error").length?-1==s.find(".sbiErrorIds").text().indexOf(window.sbiFeedMeta[i].idsInFeed[e])&&s.find(".sbiErrorIds").append(","+window.sbiFeedMeta[i].idsInFeed[e]):s.prepend('<div id="sbi_mod_error">'+window.sbiFeedMeta[i].error.errorMsg+window.sbiFeedMeta[i].error.errorDir+"</div>"),n="error")}"coordinates"==o&&(n.pagination={previous_url:r}),"error"!==n&&d.push(n),0==--l&&"finished"!==N&&function(e){var i=[],r=[];jQuery.each(d,function(a,t){if("single"==e&&(t.data=[t.data]),void 0!==t.data)if(jQuery.each(t.data,function(e,i){jQuery.inArray(i.id,V)>-1||(V.push(i.id),r.push(i))}),"coordinates"==e){var s=t.data[t.data.length-1].created_time,n=t.pagination.previous_url.split("max_timestamp=")[0]+"max_timestamp="+s;i.push(n)}else"object"==typeof t.pagination&&t.pagination&&void 0!==t.pagination.next_url&&i.push(t.pagination.next_url)}),"random"!==c?r.sort(function(e,i){return i.created_time-e.created_time}):(r.sort(function(e,i){return Math.round(Math.random())-.5}),a+="!"),void 0!==d&&(d[0].data=r),void 0!==d[0].pagination&&d[0].pagination?d[0].pagination.next_url=i:d[0].pagination={next_url:""};var n=d[0];"finished"!==N&&W(n,a,t,s),G++}(o)}})})}}function z(e,i,t,r,n){var o=e;window.sbiCommentCacheStatus=0;var d=t[0].getAttribute("data-sbi-index");"object"==typeof e&&(o=JSON.stringify(e));var c={url:sbiajaxurl,type:"POST",async:!0,cache:!1,data:{action:"get_cache",transientName:o,useBackupHeader:window.sbiUseBackup[d].header,useBackupFeed:window.sbiUseBackup[d].feed},success:function(n){var o={};if(0===n.trim().indexOf("{")&&(n=n.replace(/\\'/g,"'"),o=JSON.parse(n.trim())),"all"==r){if(void 0===o.header.error&&D(o.header,i),void 0===o.feed.error){if("finished"!==N&&W(o.feed,e,i,t),void 0!==o.warning){var d="<p><b>Cache Error: Looking for cache that doesn't exist. Now using a backup feed.</b><br /><span>This error is only visible to WordPress admins.</span>",c="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery("#sb_instagram").before('<div id="sbi_mod_error">'+d+c+"</div>")}}else{s=JSON.parse(t[0].getAttribute("data-options"));var l=t[0].getAttribute("data-sbi-index");if(s.feedIndex=l,!1!==window.sbiCacheStatuses[l].feed&&"tryfetch"===o.feed.error)window.sbiCacheStatuses[l].feed=!1,t.find(".sb_instagram_header .sbi_header_text").length||(window.sbiCacheStatuses[l].header=!1),window.sbiCacheStatuses[l].comments="no",s.tryFetch=!0,void 0===window.sbiCacheStatuses[s.feedIndex].tryFetch&&a(t[0],s);else if(!0===window.sbiCacheStatuses[l].feed){var d="<p><b>Cache Error: Looking for cache that doesn't exist</b><br /><span>This error is only visible to WordPress admins.</span>",c="<p>If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'</p>";jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+d+c+"</div>");var h={action:"sbi_set_use_backup",transientName:e,context:"falsecache"};jQuery.ajax({url:sbiajaxurl,type:"post",data:h,success:function(e){}})}}if("tryfetch"===o.header.error){s=JSON.parse(t[0].getAttribute("data-options"));var l=t[0].getAttribute("data-sbi-index");s.feedIndex=l,!1!==window.sbiCacheStatuses[l].header&&(t.find(".sb_instagram_header .sbi_header_text").length||(window.sbiCacheStatuses[l].header=!1,s.tryFetch=!0,void 0===window.sbiCacheStatuses[s.feedIndex].tryFetch&&a(t[0],s)))}void 0===o.comments.error&&(sb_instagram_js_options.sbiPageCommentCache=o.comments)}else"header"==r?D(o,i):"finished"!==N&&W(o,e,i,t)},error:function(e,i,a){console.log(a)}};jQuery.ajax(c)}}(t,s)},a)})}function sbiAddTokenToExpiredList(e,i){var a={url:sbiajaxurl,type:"POST",async:!0,cache:!1,data:{action:"sbi_set_expired_token",access_token:e,transientName:i},success:function(e){},error:function(e,i,a){console.log(a)}};jQuery.ajax(a)}function sbiCachePhotos(e,i,a){a=void 0!==a?a:[];var t=e.data.length;if(void 0!==e){var s={url:sbiajaxurl,type:"POST",async:!0,cache:!1,data:{action:"cache_photos",feed_tokens:a,num_images:t,transientName:i},success:function(e){},error:function(e,i,a){console.log(a)}};jQuery.ajax(s)}}function sbiGetColumnCount(e,i,a){var t=i,s=window.innerWidth;return e.hasClass("sbi_mob_col_auto")?(s<640&&parseInt(i)>2&&parseInt(i)<7&&(t=2),s<640&&parseInt(i)>6&&parseInt(i)<11&&(t=4),s<=480&&parseInt(i)>2&&(t=1)):s<=480&&(t=a),t}function sbiGetWidthForResType(e){switch(e){case"thumbnail":return 150;case"low_resolution":return 320;default:return 640}}function sbiGetBestResolutionForAuto(e,i,a,t){var s=e*Math.max(1,i/a),r=10*Math.ceil(s/10),n=[150,320,640];if(t&&(r*=2),-1===n.indexOf(parseInt(r))){var o=!1;jQuery.each(n,function(e,i){i>parseInt(r)&&!o&&(r=i,o=!0)})}return r}function sbiNeedToRaiseRes(e,i){return e>i}function sbiGetResolutionSettings(e,i,a,t,s){var r=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,n=(a=sbiGetColumnCount(e,parseInt(a),parseInt(t)),e.innerWidth()/a-r),o={type:"low_resolution",width:""};switch(i){case"auto":o.type="auto",o.width=n;break;case"thumb":o.type="thumbnail";break;case"medium":o.type="low_resolution";break;default:o.type="standard_resolution"}return void 0===window.sbiFeedMeta[s].minRes&&(window.sbiFeedMeta[s].minRes="auto"===o.type?sbiGetBestResolutionForAuto(n,o.width,o.width,e.hasClass("sbi_highlight")):sbiGetWidthForResType(o.type)),o}function sbi_cache_all(e,i,a){i.indexOf("header")&&void 0===e.data.pagination?sbiCachePhotos(e,i,a):i.indexOf("header")||void 0===e.data.pagination||sbiCachePhotos(e,i,a)}jQuery(document).ready(function(){window.sbiCommentCacheStatus=0,sbi_init(function(e,i,a){sbi_cache_all(e,i,a)})})}