Instagram Feed - Version 1.10

Version Description

  • New: We've made improvements to the way photos are loaded into the feed, adding a smooth transition to display photos subtly rather than suddenly.
  • New: More header sizes; you can now choose from three sizes: small, medium, and large. Change this on the "Customize" tab.
  • Fix: Using a percent for the image padding was causing the height of images to be too tall
  • Fix: Removed a PHP notice when the Instagram API was blocked by the web host
Download this release

Release Info

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

Code changes from version 1.9.1 to 1.10

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: 4.9
6
- Stable tag: 1.9.1
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -310,41 +310,48 @@ We understand that sometimes you need help, have issues or just have questions.
310
* Plus more customization options added all the time!
311
312
== Changelog ==
313
= 1.9.1 =
314
- * Fix: Captions missing as "alt" text for images
315
- * Fix: System information was not formatting connected accounts and user ids correctly
316
- * Fix: "Unauthorized redirect URL" error occurring while trying to connect a new account due to recent changes from Instagram
317
318
= 1.9 =
319
- * New: Retrieving Access Tokens and connecting multiple Instagram accounts is now easier using our improved interface for managing account information. While on the Configure tab, click on the big blue button to connect an account, or use the "Manually Connect an Account" option to connect one using an existing Access Token. Once an account is connected, you can use the associated buttons to either add it to your primary User feed or to a different feed on your site using the `user` shortcode option, eg: `user=smashballoon`.
320
* Tweak: Disabled auto load in the database for backup caches
321
* Fix: Fixed an occasional issue with the Instagram login flow which would result in an "Unauthorized redirect URL" error
322
323
= 1.8.3 =
324
* Fix: SVG icons caused some display problems in IE 11
325
- * Fix: Removed support for using usernames in the User ID setting due to recent API changes. Will now default to the User ID attached to the Access Token.
326
* Fix: Backup feed not always being used when Access Tokens expire
327
- * Fix: Access Tokens may have been incorrectly saved as invalid under certain circumstances
328
329
= 1.8.2 =
330
- * Tweak: Setting "Cache Error API Recheck" enabled by default for new installs
331
* Fix: Page caches created with the WP Rocket plugin will be cleared when the Instagram Feed settings are updated or the cache is forced to clear
332
* Fix: Fixed a rare issue where feeds were displaying "Looking for cache that doesn't exist" when page caching was not being used
333
334
= 1.8.1 =
335
- * Fix: Fixed issue where feeds were displaying "Looking for cache that doesn't exist" when page caching was not being used
336
* Fix: Font method setting not working when "Are you using an ajax theme?" setting is enabled
337
338
= 1.8 =
339
* 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.
340
- * New: Added an Access Token shortcode option and support for multiple Access Tokens. If you own multiple Instagram accounts then you can now use multiple Access Tokens in order to display user feeds from each 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.
341
342
= 1.7 =
343
- * New: Added feed caching to limit the number of API requests. Use the setting on the "Configure" tab "Check for new posts every" to set how long feed data will be cached before refreshing.
344
- * New: Added backup caching for all feeds. If the feed is unable to display then a backup feed will be shown to visitors if one is available. The backup cache can be disabled or cleared by using the following setting: `Customize > Misc > Enable Backup Caching`.
345
* New: Icons are now generated as SVGs for a sharper look and more semantic markup
346
- * New: Carousel posts include an icon to indicate that they are carousel posts
347
- * Tweak: Using the "sort posts by random" feature will include the most recent 33 posts instead of just the posts shown in the feed
348
* Fix: links back to instagram.com will use the "www" prefix
349
350
= 1.6.2 =
3
Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
Requires at least: 3.0
5
Tested up to: 4.9
6
+ Stable tag: 1.10
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
310
* Plus more customization options added all the time!
311
312
== Changelog ==
313
+ = 1.10 =
314
+ * New: We've made improvements to the way photos are loaded into the feed, adding a smooth transition to display photos subtly rather than suddenly.
315
+ * New: More header sizes; you can now choose from three sizes: small, medium, and large. Change this on the "Customize" tab.
316
+ * Fix: Using a percent for the image padding was causing the height of images to be too tall
317
+ * Fix: Removed a PHP notice when the Instagram API was blocked by the web host
318
+
319
= 1.9.1 =
320
+ * Fix: Captions missing as "alt" text for Instagram images.
321
+ * Fix: System information was not formatting connected Instagram accounts and user ids correctly
322
+ * Fix: "Unauthorized redirect URL" error occurring while trying to connect a new Instagram account due to recent changes from Instagram
323
+ * Fix: Using a percent for the image padding was causing the height of Instagram images to be to tall
324
325
= 1.9 =
326
+ * New: Retrieving Access Tokens and connecting multiple Instagram accounts is now easier using our improved interface for managing account information. While on the Configure tab, click on the big blue button to connect an account, or use the "Manually Connect an Account" option to connect one using an existing Access Token. Once an account is connected, you can use the associated buttons to either add it to your primary Instagram User feed or to a different Instagram feed on your site using the `user` shortcode option, eg: `user=smashballoon`.
327
* Tweak: Disabled auto load in the database for backup caches
328
* Fix: Fixed an occasional issue with the Instagram login flow which would result in an "Unauthorized redirect URL" error
329
330
= 1.8.3 =
331
* Fix: SVG icons caused some display problems in IE 11
332
+ * Fix: Removed support for using usernames in the Instagram User ID setting due to recent API changes. Will now default to the Instagram User ID attached to the Access Token.
333
* Fix: Backup feed not always being used when Access Tokens expire
334
+ * Fix: Instagram Access Tokens may have been incorrectly saved as invalid under certain circumstances
335
336
= 1.8.2 =
337
+ * Tweak: Setting "Cache Error API Recheck" enabled by default for new Instagram Feed installs
338
* Fix: Page caches created with the WP Rocket plugin will be cleared when the Instagram Feed settings are updated or the cache is forced to clear
339
* Fix: Fixed a rare issue where feeds were displaying "Looking for cache that doesn't exist" when page caching was not being used
340
341
= 1.8.1 =
342
+ * Fix: Fixed issue where Instagram feeds were displaying "Looking for cache that doesn't exist" when page caching was not being used
343
* Fix: Font method setting not working when "Are you using an ajax theme?" setting is enabled
344
345
= 1.8 =
346
* 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.
347
+ * 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.
348
349
= 1.7 =
350
+ * New: Added feed caching to limit the number of Instagram API requests. Use the setting on the "Configure" tab "Check for new posts every" to set how long feed data will be cached before refreshing.
351
+ * New: Added backup caching for all feeds. If the Instagram feed is unable to display then a backup feed will be shown to visitors if one is available. The backup cache can be disabled or cleared by using the following setting: `Customize > Misc > Enable Backup Caching`.
352
* New: Icons are now generated as SVGs for a sharper look and more semantic markup
353
+ * New: Instagram carousel posts include an icon to indicate that they are carousel posts
354
+ * Tweak: Using the "sort posts by random" feature will include the most recent 33 posts instead of just the posts shown in the Instagram feed
355
* Fix: links back to instagram.com will use the "www" prefix
356
357
= 1.6.2 =
css/sb-instagram-admin.css CHANGED
@@ -180,7 +180,9 @@
180
clear: left;
181
}
182
#sbi_admin .sbi_pro,
183
- #sbi_admin .sbi_pro label{
184
color: #999 !important;
185
}
186
#sbi_admin .sbi_shortcode_table tr.sbi_pro{
@@ -799,6 +801,7 @@
799
800
#sbi_admin .sbi_col {
801
float: left;
802
}
803
#sbi_admin .sbi_col.sbi_one{
804
width: 118px;
@@ -919,3 +922,210 @@
919
.sbi_config_modal .sbi_modal_close:hover{
920
color: #333;
921
}
180
clear: left;
181
}
182
#sbi_admin .sbi_pro,
183
+ #sbi_admin .sbi_pro label,
184
+ #sbi_admin .sbi_pro input,
185
+ #sbi_admin .sbi_pro select{
186
color: #999 !important;
187
}
188
#sbi_admin .sbi_shortcode_table tr.sbi_pro{
801
802
#sbi_admin .sbi_col {
803
float: left;
804
+ position: relative;
805
}
806
#sbi_admin .sbi_col.sbi_one{
807
width: 118px;
922
.sbi_config_modal .sbi_modal_close:hover{
923
color: #333;
924
}
925
+
926
+ /* Pro 3.0 Styles */
927
+ .sbi_layout_cell {
928
+ padding: 0;
929
+ display: inline-block;
930
+ float: left;
931
+ width: 100px;
932
+ padding: 15px 15px 10px 15px;
933
+ margin-right: 10px;
934
+ background: #f6f6f6;
935
+ border: 1px solid #ddd;
936
+ -moz-border-radius: 5px;
937
+ -webkit-border-radius: 5px;
938
+ border-radius: 5px;
939
+ vertical-align: top;
940
+ }
941
+ .sbi_layout_cell:nth-child(4) {
942
+ margin-right: 0;
943
+ }
944
+ @media all and (max-width: 1200px){
945
+ .sbi_layout_cell{
946
+ width: 21%;
947
+ padding: 1%;
948
+ margin-right: 1%;
949
+ }
950
+ }
951
+ @media all and (max-width: 480px){
952
+ .sbi_layout_cell{
953
+ width: 98%;
954
+ padding: 1%;
955
+ margin: 5px 0;
956
+ }
957
+ }
958
+ .sbi_label {
959
+ font-size: 16px;
960
+ font-weight: bold;
961
+ padding-left: 2px;
962
+ }
963
+ .sbi_layout_cell:hover,
964
+ .sbi_layout_cell:focus{
965
+ background: #fcfcfc;
966
+ cursor: pointer;
967
+ }
968
+ .sbi_layout_cell.sbi_layout_selected{
969
+ /*background: #f7faf1;*/
970
+ /*border: 1px solid #7ad03a;*/
971
+ }
972
+ .sbi_layout_cell h3{
973
+ font-size: 15px;
974
+ margin-top: 0;
975
+ }
976
+ .sbi_layout_cell img{
977
+ width: 100%;
978
+ border: 1px solid #ddd;
979
+ margin-top: 5px;
980
+ }
981
+
982
+ #sbi_admin .sb_instagram_mobile_layout_setting,
983
+ #sbi_admin .sb_instagram_layout_settings{
984
+ float: left;
985
+ clear: both;
986
+ width: 96%;
987
+
988
+ padding: 20px 2%;
989
+ margin: 10px 0;
990
+ font-size: 13px;
991
+ background: #f9f9f9;
992
+ background: rgba(255,255,255,0.8);
993
+
994
+ -moz-border-radius: 8px;
995
+ -webkit-border-radius: 8px;
996
+ border-radius: 8px;
997
+ }
998
+ .sb_instagram_layout_setting {
999
+ clear:left;
1000
+ margin-bottom: 10px;
1001
+ }
1002
+ #sbi_admin .sb_instagram_mobile_layout_setting {
1003
+ width: auto;
1004
+ }
1005
+
1006
+ .form-table .sb_layout_type {
1007
+ display: inline-block;
1008
+ margin-left: 20px;
1009
+ }
1010
+ .form-table .sb_layout_type:first-child {
1011
+ margin-left: 0;
1012
+ }
1013
+ .sb_instagram_layout_setting {
1014
+ margin-bottom: 20px;
1015
+ }
1016
+ .sb_instagram_layout_setting:last-child {
1017
+ margin-bottom: 0;
1018
+ }
1019
+ .sb_instagram_layout_setting label {
1020
+ display: inline-block;
1021
+ font-weight: bold;
1022
+ font-size: 14px;
1023
+ padding-bottom: 5px;
1024
+ padding-right: 5px;
1025
+ }
1026
+
1027
+ /* Layout settings */
1028
+ #sbi_admin .sb_layout_options_wrap{
1029
+ position: relative;
1030
+ clear: both;
1031
+ overflow: hidden;
1032
+ }
1033
+ #sbi_admin .sb_layout_options_wrap .sb_instagram_layout_settings{
1034
+ display: none;
1035
+ }
1036
+ #sbi_admin .sb_layout_options_wrap .sbi_shortcode_symbol{
1037
+ bottom: 4px;
1038
+ right: -20px;
1039
+ }
1040
+ #sbi_admin .sb_layout_options_wrap .sbi_shortcode{
1041
+ position: relative;
1042
+ float: none;
1043
+ top: -4px
1044
+ }
1045
+ #sbi_admin .sbi_close_options{
1046
+ position: absolute;
1047
+ top: 10px;
1048
+ right: 2px;
1049
+ padding: 15px 14px;
1050
+ color: #999;
1051
+ }
1052
+ #sbi_admin .sbi_close_options:hover,
1053
+ #sbi_admin .sbi_close_options:focus{
1054
+ color: #666;
1055
+ }
1056
+ #sbi_admin .sbi_pro input[type=radio]:checked:before{
1057
+ background-color: #ccc;
1058
+ }
1059
+ #sbi_admin .sbi_layout_cell{
1060
+ position: relative;
1061
+ }
1062
+ #sbi_admin .sbi_layout_cell img{
1063
+ opacity: 0.5;
1064
+ }
1065
+ #sbi_admin .sbi_lock{
1066
+ padding: 8px 10px 8px 13px;
1067
+ position: absolute;
1068
+ top: 50px;
1069
+ left: 50%;
1070
+ margin-left: -34px;
1071
+ background: rgba(255,255,255,0.8);
1072
+ border-radius: 5px;
1073
+ box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
1074
+ color: #333;
1075
+ z-index: 999;
1076
+ font-size: 14px;
1077
+ color: #666;
1078
+ font-weight: 700;
1079
+ text-decoration: none;
1080
+ border: 1px solid #ccc;
1081
+ }
1082
+ #sbi_admin .sbi_feed_type .sbi_lock{
1083
+ top: -3px;
1084
+ left: 100px;
1085
+ color: #999;
1086
+ }
1087
+ #sbi_admin .sbi_lock:hover,
1088
+ #sbi_admin .sbi_feed_type .sbi_lock:hover{
1089
+ background: #fff;
1090
+ border: 1px solid #ccc;
1091
+ color: #333;
1092
+ box-shadow: 0 0 8px 0 rgba(0,0,0,0.2);
1093
+ }
1094
+
1095
+ #sbi_admin .sbi_lock i{
1096
+ margin-right: 6px;
1097
+ }
1098
+ #sbi_admin .sbi_layouts{
1099
+ position: relative;
1100
+ float: left;
1101
+ }
1102
+ #sbi_admin .sbi_feed_type td{
1103
+ position: relative;
1104
+ }
1105
+ #sbi_admin .sbi_pro_tooltip{
1106
+ display: none;
1107
+ position: absolute;
1108
+ background: #333;
1109
+ color: #eee;
1110
+ width: 90%;
1111
+ padding: 8px 10px 10px 10px;
1112
+ border-radius: 3px;
1113
+ bottom: 45px;
1114
+ line-height: 1.3;
1115
+ font-size: 12px;
1116
+ width: 174px;
1117
+ bottom: 40px;
1118
+ }
1119
+ #sbi_admin .sbi_pro_tooltip .fa-caret-down {
1120
+ position: absolute;
1121
+ bottom: -12px;
1122
+ font-size: 20px;
1123
+ left: 49%;
1124
+ color: #333;
1125
+ }
1126
+ #sbi_admin .sbi_layouts .sbi_pro_tooltip{
1127
+ left: 50%;
1128
+ top: -10px;
1129
+ bottom: auto;
1130
+ margin-left: -101px;
1131
+ }
css/sb-instagram.css CHANGED
@@ -30,6 +30,7 @@
30
#sb_instagram #sbi_images{
31
width: 100%;
32
float: left;
33
34
-webkit-box-sizing: border-box;
35
-moz-box-sizing: border-box;
@@ -44,13 +45,27 @@
44
zoom: 1;
45
*display: inline;
46
47
padding: inherit !important;
48
margin: 0 !important;
49
text-decoration: none;
50
51
-webkit-box-sizing: border-box;
52
-moz-box-sizing: border-box;
53
box-sizing: border-box;
54
}
55
56
/* Cols */
@@ -185,12 +200,79 @@
185
186
/* Loader */
187
#sb_instagram .sbi_loader{
188
position: relative;
189
left: 50%;
190
- width: 16px;
191
- height: 16px;
192
- margin: 10px 0 10px -8px;
193
- background: url('../img/loader.png') no-repeat;
194
}
195
196
/* HEADER */
@@ -207,7 +289,79 @@
207
display: block;
208
/*width: 100%;*/
209
min-width: 100%\9;
210
}
211
/* Header profile pic */
212
#sb_instagram .sbi_header_img{
213
float: left;
@@ -231,6 +385,36 @@
231
border-radius: 40px;
232
}
233
/* Profile pic hover */
234
#sb_instagram .sbi_header_img_hover{
235
position: absolute;
236
width: 100%;
@@ -254,17 +438,6 @@
254
#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
255
opacity: 1;
256
}
257
- #sb_instagram .sbi_header_img_hover i{
258
- position: absolute;
259
- top: 50%;
260
- left: 50%;
261
- margin-top: -12px;
262
- margin-left: -12px;
263
- width: 24px;
264
- height: 24px;
265
- overflow: hidden;
266
- background: url('../img/small-logo.png') no-repeat 0 0;
267
- }
268
/* Header text */
269
#sb_instagram .sbi_header_text{
270
float: left;
@@ -313,6 +486,17 @@
313
margin: -8px 0 0 -7px;
314
font-size: 15px;
315
}
316
#sb_instagram #sbi_load .sbi_load_btn,
317
#sb_instagram .sbi_follow_btn a{
318
display: -moz-inline-stack;
@@ -351,31 +535,50 @@
351
*display: inline;
352
text-align: center;
353
}
354
- #sb_instagram #sbi_load .sbi_follow_btn svg.fa-instagram{
355
- margin-right: 7px;
356
- }
357
#sb_instagram .sbi_follow_btn.sbi_top{
358
display: block;
359
margin-bottom: 5px;
360
}
361
#sb_instagram .sbi_follow_btn a{
362
- background: #517fa4;
363
color: #fff;
364
}
365
#sb_instagram .sbi_follow_btn a:hover,
366
- #sb_instagram .sbi_follow_btn a:focus,
367
- #sb_instagram #sbi_load .sbi_load_btn:hover,
368
- #sb_instagram #sbi_load .sbi_load_btn:focus{
369
- filter: alpha(opacity=85);
370
- opacity: 0.85;
371
}
372
- #sb_instagram #sbi_load .fa-spinner,
373
#sb_instagram .sbi_follow_btn .fa,
374
#sb_instagram .sbi_follow_btn svg{
375
margin-bottom: -1px;
376
margin-right: 7px;
377
font-size: 15px;
378
}
379
#sb_instagram #sbi_load .sbi_follow_btn{
380
margin-left: 5px;
381
}
30
#sb_instagram #sbi_images{
31
width: 100%;
32
float: left;
33
+ line-height: 0;
34
35
-webkit-box-sizing: border-box;
36
-moz-box-sizing: border-box;
45
zoom: 1;
46
*display: inline;
47
48
+ max-height: 1000px;
49
padding: inherit !important;
50
margin: 0 !important;
51
text-decoration: none;
52
+ opacity: 1;
53
+ overflow: hidden;
54
55
-webkit-box-sizing: border-box;
56
-moz-box-sizing: border-box;
57
box-sizing: border-box;
58
+
59
+ -webkit-transition: all 0.5s ease;
60
+ -moz-transition: all 0.5s ease;
61
+ -o-transition: all 0.5s ease;
62
+ -ms-transition: all 0.5s ease;
63
+ transition: all 0.5s ease;
64
+ }
65
+ /* Transition items in */
66
+ #sb_instagram #sbi_images .sbi_item.sbi_transition{
67
+ opacity: 0;
68
+ max-height: 0;
69
}
70
71
/* Cols */
200
201
/* Loader */
202
#sb_instagram .sbi_loader{
203
+ width: 20px;
204
+ height: 20px;
205
+
206
position: relative;
207
+ top: 50%;
208
left: 50%;
209
+ margin: -10px 0 0 -10px;
210
+ background-color: #000;
211
+ background-color: rgba(0,0,0,0.5);
212
+
213
+ border-radius: 100%;
214
+ -webkit-animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
215
+ animation: sbi-sk-scaleout 1.0s infinite ease-in-out;
216
+ }
217
+ /* Loader in button */
218
+ #sb_instagram #sbi_load .sbi_loader{
219
+ position: absolute;
220
+ margin-top: -11px;
221
+ background-color: #fff;
222
+ opacity: 1;
223
+ }
224
+ @-webkit-keyframes sbi-sk-scaleout {
225
+ 0% { -webkit-transform: scale(0) }
226
+ 100% {
227
+ -webkit-transform: scale(1.0);
228
+ opacity: 0;
229
+ }
230
+ }
231
+ @keyframes sbi-sk-scaleout {
232
+ 0% {
233
+ -webkit-transform: scale(0);
234
+ -ms-transform: scale(0);
235
+ transform: scale(0);
236
+ } 100% {
237
+ -webkit-transform: scale(1.0);
238
+ -ms-transform: scale(1.0);
239
+ transform: scale(1.0);
240
+ opacity: 0;
241
+ }
242
+ }
243
+
244
+ #sb_instagram .fa-spin,
245
+ #sbi_lightbox .fa-spin{
246
+ -webkit-animation: fa-spin 2s infinite linear;
247
+ animation: fa-spin 2s infinite linear
248
+ }
249
+
250
+ #sb_instagram .fa-pulse,
251
+ #sbi_lightbox .fa-pulse{
252
+ -webkit-animation: fa-spin 1s infinite steps(8);
253
+ animation: fa-spin 1s infinite steps(8)
254
+ }
255
+
256
+ @-webkit-keyframes fa-spin {
257
+ 0% {
258
+ -webkit-transform: rotate(0deg);
259
+ transform: rotate(0deg)
260
+ }
261
+ 100% {
262
+ -webkit-transform: rotate(359deg);
263
+ transform: rotate(359deg)
264
+ }
265
+ }
266
+
267
+ @keyframes fa-spin {
268
+ 0% {
269
+ -webkit-transform: rotate(0deg);
270
+ transform: rotate(0deg)
271
+ }
272
+ 100% {
273
+ -webkit-transform: rotate(359deg);
274
+ transform: rotate(359deg)
275
+ }
276
}
277
278
/* HEADER */
289
display: block;
290
/*width: 100%;*/
291
min-width: 100%\9;
292
+ text-decoration: none;
293
+ transition: color 0.5s ease;
294
+ }
295
+ /** Medium Header */
296
+ /* Only use medium & large headers on devices above 480px */
297
+ @media all and (min-width: 480px){
298
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img {
299
+ width: 80px;
300
+ height: 80px;
301
+ border-radius: 40px;
302
+ }
303
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img {
304
+ width: 80px;
305
+ height: 80px;
306
+ border-radius: 40px;
307
+ }
308
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3 {
309
+ font-size: 20px;
310
+ }
311
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
312
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
313
+ font-size: 14px;
314
+ }
315
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,
316
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,
317
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{
318
+ margin-left: 95px !important;
319
+ line-height: 1.4
320
+ }
321
+ #sb_instagram .sbi_medium .sbi_header_text h3{
322
+ margin-right: -85px !important;
323
+ }
324
+ #sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{
325
+ margin-top: 4px !important;
326
+ }
327
+ #sb_instagram .sbi_medium .sbi_header_text.sbi_no_info h3{
328
+ padding-top: 20px !important;
329
+ }
330
+ /** Large Header */
331
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img {
332
+ width: 120px;
333
+ height: 120px;
334
+ border-radius: 60px;
335
+ }
336
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img {
337
+ width: 120px;
338
+ height: 120px;
339
+ border-radius: 60px;
340
+ }
341
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3 {
342
+ font-size: 28px;
343
+ }
344
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
345
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
346
+ font-size: 16px;
347
+ }
348
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,
349
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,
350
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{
351
+ margin-left: 140px !important;
352
+ line-height: 1.5;
353
+ }
354
+ #sb_instagram .sbi_large .sbi_header_text h3{
355
+ margin-right: -120px !important;
356
+ }
357
+ #sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{
358
+ margin-top: 12px !important;
359
+ }
360
+ #sb_instagram .sbi_large .sbi_header_text.sbi_no_info h3{
361
+ padding-top: 32px !important;
362
+ }
363
}
364
+
365
/* Header profile pic */
366
#sb_instagram .sbi_header_img{
367
float: left;
385
border-radius: 40px;
386
}
387
/* Profile pic hover */
388
+ /* Profile pic hover */
389
+ #sb_instagram .sbi_header_img_hover{
390
+ opacity: 0;
391
+ position: absolute;
392
+ width: 100%;
393
+ top: 0;
394
+ bottom: 0;
395
+ left: 0;
396
+ text-align: center;
397
+ color: #fff;
398
+ background: rgba(0,0,0,0.75);
399
+ }
400
+ #sb_instagram .sbi_header_img_hover i{
401
+ position: absolute;
402
+ top: 50%;
403
+ left: 50%;
404
+ margin-top: -12px;
405
+ margin-left: -12px;
406
+ width: 24px;
407
+ height: 24px;
408
+ overflow: hidden;
409
+ background: url('../img/small-logo.png') no-repeat 0 0;
410
+ }
411
+ #sb_instagram .sbi_header_img_hover{
412
+ transition: opacity 0.4s ease-in-out;
413
+ }
414
+ #sb_instagram .sb_instagram_header .sbi_fade_in{
415
+ opacity: 1;
416
+ transition: opacity 0.2s ease-in-out;
417
+ }
418
#sb_instagram .sbi_header_img_hover{
419
position: absolute;
420
width: 100%;
438
#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
439
opacity: 1;
440
}
441
/* Header text */
442
#sb_instagram .sbi_header_text{
443
float: left;
486
margin: -8px 0 0 -7px;
487
font-size: 15px;
488
}
489
+ #sb_instagram #sbi_load{
490
+ opacity: 1;
491
+ transition: all 0.5s ease-in;
492
+ }
493
+ #sb_instagram .sbi_load_btn .sbi_btn_text, #sb_instagram .sbi_load_btn .sbi_loader{
494
+ opacity: 1;
495
+ transition: all 0.1s ease-in;
496
+ }
497
+ #sb_instagram .sbi_hidden{
498
+ opacity: 0 !important;
499
+ }
500
#sb_instagram #sbi_load .sbi_load_btn,
501
#sb_instagram .sbi_follow_btn a{
502
display: -moz-inline-stack;
535
*display: inline;
536
text-align: center;
537
}
538
#sb_instagram .sbi_follow_btn.sbi_top{
539
display: block;
540
margin-bottom: 5px;
541
}
542
#sb_instagram .sbi_follow_btn a{
543
+ background: #408bd1;
544
color: #fff;
545
}
546
+ #sb_instagram .sbi_follow_btn a,
547
+ #sb_instagram .sbi_follow_btn a,
548
+ #sb_instagram #sbi_load .sbi_load_btn{
549
+ transition: all 0.1s ease-in;
550
+ }
551
+ /* Hover state for default colors */
552
+ #sb_instagram #sbi_load .sbi_load_btn:hover{
553
+ outline: none;
554
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.25);
555
+ }
556
#sb_instagram .sbi_follow_btn a:hover,
557
+ #sb_instagram .sbi_follow_btn a:focus{
558
+ outline: none;
559
+ box-shadow: inset 0 0 10px 20px #359dff;
560
+ }
561
+ /* If a custom color is applied then just use opacity for the hover effect */
562
+ #sb_instagram .sbi_follow_btn.sbi_custom a:hover,
563
+ #sb_instagram .sbi_follow_btn.sbi_custom a:focus,
564
+ #sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{
565
+ box-shadow: inset 0 0 20px 20px rgba(255,255,255,0.15);
566
+ }
567
+ /* Active state */
568
+ #sb_instagram .sbi_follow_btn a:active,
569
+ #sb_instagram #sbi_load .sbi_load_btn:active{
570
+ box-shadow: inset 0 0 10px 20px rgba(0,0,0,0.3);
571
}
572
+
573
#sb_instagram .sbi_follow_btn .fa,
574
#sb_instagram .sbi_follow_btn svg{
575
margin-bottom: -1px;
576
margin-right: 7px;
577
font-size: 15px;
578
}
579
+ #sb_instagram .sbi_follow_btn svg{
580
+ vertical-align: -.125em;
581
+ }
582
#sb_instagram #sbi_load .sbi_follow_btn{
583
margin-left: 5px;
584
}
css/sb-instagram.min.css CHANGED
@@ -1 +1 @@
1
- #sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;padding:inherit!important;margin:0!important;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram a,#sb_instagram a:hover,#sb_instagram a:focus,#sb_instagram a:active{outline:none}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:hover,#sb_instagram .sbi_link a:focus{text-decoration:underline}#sb_instagram .sbi_photo_wrap:hover .sbi_link,#sb_instagram .sbi_photo_wrap:focus .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em}#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_carousel .sbi_playbtn,.sbi_type_carousel .fa-clone,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_carousel .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}.sbi_type_carousel svg.fa-clone,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{-webkit-filter:drop-shadow(0 0 2px rgba(0,0,0,.4));filter:drop-shadow(0 0 2px rgba(0,0,0,.4))}#sb_instagram .sbi_loader{position:relative;left:50%;width:16px;height:16px;margin:10px 0 10px -8px;background:url(../img/loader.png) no-repeat}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;min-width:100%\9}#sb_instagram .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity 0.2s}#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{opacity:1}#sb_instagram .sbi_header_img_hover i{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sbi_header_text .sbi_bio,#sb_instagram .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3}#sb_instagram .sb_instagram_header h3.sbi_no_bio{padding-top:9px!important}#sb_instagram .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;text-align:center}#sb_instagram #sbi_load .sbi_follow_btn svg.fa-instagram{margin-right:7px}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#517fa4;color:#fff}#sb_instagram .sbi_follow_btn a:hover,#sb_instagram .sbi_follow_btn a:focus,#sb_instagram #sbi_load .sbi_load_btn:hover,#sb_instagram #sbi_load .sbi_load_btn:focus{filter:alpha(opacity=85);opacity:.85}#sb_instagram #sbi_load .fa-spinner,#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:0;padding:10px 15px;font-size:13px;text-align:center;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_playbtn,#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_playbtn,#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item,#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item,#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:100%}}
1
+ #sb_instagram,#sb_instagram.sbi_fixed_height{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}#sb_instagram{width:100%;margin:0 auto;padding:0;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0, 0, 0, .4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;min-width:100%\9;transition:color .5s ease;text-decoration:none}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sbi_medium .sbi_header_text.sbi_no_info h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sbi_large .sbi_header_text.sbi_no_info h3{padding-top:32px!important}}#sb_instagram .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sbi_header_img_hover i{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;overflow:hidden;background:url(../img/small-logo.png) no-repeat}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sbi_header_text .sbi_bio,#sb_instagram .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram #sbi_load,#sb_instagram .sb_instagram_error{width:100%;text-align:center}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3}#sb_instagram .sb_instagram_header h3.sbi_no_bio{padding-top:9px!important}#sb_instagram .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram #sbi_load{float:left;clear:both;opacity:1;transition:all .5s ease-in}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0;background:#333;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:0;padding:10px 15px;font-size:13px;text-align:center;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}
img/instagram-pro-promo.png CHANGED
Binary file
instagram-feed-admin.php CHANGED
@@ -54,6 +54,7 @@ function sb_instagram_settings_page() {
54
'sb_instagram_image_res' => 'auto',
55
//Header
56
'sb_instagram_show_header' => true,
57
'sb_instagram_header_color' => '',
58
//Follow button
59
'sb_instagram_show_follow_btn' => true,
@@ -102,7 +103,8 @@ function sb_instagram_settings_page() {
102
$sb_instagram_image_res = $options[ 'sb_instagram_image_res' ];
103
//Header
104
$sb_instagram_show_header = $options[ 'sb_instagram_show_header' ];
105
- $sb_instagram_show_bio = isset( $options[ 'sb_instagram_show_bio' ] ) ? $options[ 'sb_instagram_show_bio' ] : true;
106
$sb_instagram_header_color = $options[ 'sb_instagram_header_color' ];
107
//Follow button
108
$sb_instagram_show_follow_btn = $options[ 'sb_instagram_show_follow_btn' ];
@@ -140,14 +142,12 @@ function sb_instagram_settings_page() {
140
}
141
}
142
isset($_POST[ 'sb_instagram_preserve_settings' ]) ? $sb_instagram_preserve_settings = sanitize_text_field( $_POST[ 'sb_instagram_preserve_settings' ] ) : $sb_instagram_preserve_settings = '';
143
- isset($_POST[ 'sb_instagram_ajax_theme' ]) ? $sb_instagram_ajax_theme = sanitize_text_field( $_POST[ 'sb_instagram_ajax_theme' ] ) : $sb_instagram_ajax_theme = '';
144
isset($_POST[ 'sb_instagram_cache_time' ]) ? $sb_instagram_cache_time = sanitize_text_field( $_POST[ 'sb_instagram_cache_time' ] ) : $sb_instagram_cache_time = '';
145
isset($_POST[ 'sb_instagram_cache_time_unit' ]) ? $sb_instagram_cache_time_unit = sanitize_text_field( $_POST[ 'sb_instagram_cache_time_unit' ] ) : $sb_instagram_cache_time_unit = '';
146
147
$options[ 'sb_instagram_at' ] = $sb_instagram_at;
148
$options[ 'sb_instagram_user_id' ] = $sb_instagram_user_id;
149
$options[ 'sb_instagram_preserve_settings' ] = $sb_instagram_preserve_settings;
150
- $options[ 'sb_instagram_ajax_theme' ] = $sb_instagram_ajax_theme;
151
152
$options[ 'sb_instagram_cache_time' ] = $sb_instagram_cache_time;
153
$options[ 'sb_instagram_cache_time_unit' ] = $sb_instagram_cache_time_unit;
@@ -222,6 +222,7 @@ function sb_instagram_settings_page() {
222
//Header
223
isset($_POST[ 'sb_instagram_show_header' ]) ? $sb_instagram_show_header = sanitize_text_field( $_POST[ 'sb_instagram_show_header' ] ) : $sb_instagram_show_header = '';
224
isset($_POST[ 'sb_instagram_show_bio' ]) ? $sb_instagram_show_bio = sanitize_text_field( $_POST[ 'sb_instagram_show_bio' ] ) : $sb_instagram_show_bio = '';
225
226
$sb_instagram_header_color = sanitize_text_field( $_POST[ 'sb_instagram_header_color' ] );
227
//Follow button
@@ -232,6 +233,7 @@ function sb_instagram_settings_page() {
232
//Misc
233
$sb_instagram_custom_css = $_POST[ 'sb_instagram_custom_css' ];
234
$sb_instagram_custom_js = $_POST[ 'sb_instagram_custom_js' ];
235
if (isset($_POST[ 'sb_instagram_cron' ]) ) $sb_instagram_cron = $_POST[ 'sb_instagram_cron' ];
236
isset($_POST[ 'check_api' ]) ? $check_api = $_POST[ 'check_api' ] : $check_api = '';
237
isset($_POST[ 'sb_instagram_backup' ]) ? $sb_instagram_backup = $_POST[ 'sb_instagram_backup' ] : $sb_instagram_backup = '';
@@ -257,7 +259,8 @@ function sb_instagram_settings_page() {
257
$options[ 'sb_instagram_image_res' ] = $sb_instagram_image_res;
258
//Header
259
$options[ 'sb_instagram_show_header' ] = $sb_instagram_show_header;
260
- $options[ 'sb_instagram_show_bio' ] = $sb_instagram_show_bio;
261
$options[ 'sb_instagram_header_color' ] = $sb_instagram_header_color;
262
//Follow button
263
$options[ 'sb_instagram_show_follow_btn' ] = $sb_instagram_show_follow_btn;
@@ -267,6 +270,7 @@ function sb_instagram_settings_page() {
267
//Misc
268
$options[ 'sb_instagram_custom_css' ] = $sb_instagram_custom_css;
269
$options[ 'sb_instagram_custom_js' ] = $sb_instagram_custom_js;
270
$options[ 'sb_instagram_cron' ] = $sb_instagram_cron;
271
$options[ 'check_api' ] = $check_api;
272
$options['sb_instagram_backup'] = $sb_instagram_backup;
@@ -359,7 +363,7 @@ function sb_instagram_settings_page() {
359
360
<div id="sbi_config">
361
<!-- <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> -->
362
- <a href="https://instagram.com/oauth/authorize/?client_id=3a81a9fa2a064751b8c31385b91cc25c&scope=basic+public_content&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&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>
363
<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>
364
</div>
365
@@ -502,7 +506,10 @@ function sb_instagram_settings_page() {
502
</div>
503
<div class="sbi_col sbi_two">
504
<input readonly type="text" size="25" />
505
- &nbsp; <a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a><span class="sbi_note"> - <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to show posts by Hashtag</a></span>
506
<p class="sbi_tooltip"><?php _e( 'Display posts from a specific hashtag instead of from a user', 'instagram-feed' ); ?></p>
507
</div>
508
</div>
@@ -514,8 +521,14 @@ function sb_instagram_settings_page() {
514
</div>
515
<div class="sbi_col sbi_two">
516
517
<input readonly type="text" size="25" />
518
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a><span class="sbi_note"> - <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to show single posts</a></span>
519
<p class="sbi_tooltip"><?php _e("Display a feed comprised of specific single posts."); ?></p>
520
</div>
521
</div>
@@ -526,11 +539,24 @@ function sb_instagram_settings_page() {
526
<label class="sbi_radio_label" for="sb_instagram_type_location"><?php _e( 'Location:', 'instagram-feed' ); ?></label>
527
</div>
528
<div class="sbi_col sbi_two">
529
- <input readonly type="text" size="25" />
530
- &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a><span class="sbi_note"> - <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to show posts by Location</a></span>
531
<p class="sbi_tooltip"><?php _e( 'Display posts from an Instagram location ID or location coordinates.', 'instagram-feed' ); ?></p>
532
</div>
533
</div>
534
</td>
535
</tr>
536
@@ -544,16 +570,6 @@ function sb_instagram_settings_page() {
544
</td>
545
</tr>
546
547
- <tr>
548
- <th class="bump-left"><label for="sb_instagram_ajax_theme" class="bump-left"><?php _e("Are you using an Ajax powered theme?", 'instagram-feed'); ?></label></th>
549
- <td>
550
- <input name="sb_instagram_ajax_theme" type="checkbox" id="sb_instagram_ajax_theme" <?php if($sb_instagram_ajax_theme == true) echo "checked"; ?> />
551
- <label for="sb_instagram_ajax_theme"><?php _e('Yes', 'instagram-feed'); ?></label>
552
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
553
- <p class="sbi_tooltip"><?php _e("When navigating your site, if your theme uses Ajax to load content into your pages (meaning your page doesn't refresh) then check this setting. If you're not sure then please check with the theme author.", 'instagram-feed'); ?></p>
554
- </td>
555
- </tr>
556
-
557
<tr valign="top">
558
<th scope="row"><label><?php _e('Check for new posts every'); ?></label></th>
559
<td>
@@ -644,6 +660,140 @@ function sb_instagram_settings_page() {
644
645
<table class="form-table">
646
<tbody>
647
<tr valign="top">
648
<th scope="row"><label><?php _e('Number of Photos', 'instagram-feed'); ?></label><code class="sbi_shortcode"> num
649
Eg: num=6</code></th>
@@ -885,19 +1035,30 @@ function sb_instagram_settings_page() {
885
<table class="form-table">
886
<tbody>
887
<tr valign="top">
888
- <th scope="row"><label><?php _e("Show the Header", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showheader
889
Eg: showheader=false</code></th>
890
<td>
891
<input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header" <?php if($sb_instagram_show_header == true) echo 'checked="checked"' ?> />
892
</td>
893
</tr>
894
<tr valign="top">
895
<th scope="row"><label><?php _e("Show Bio Text"); ?></label><code class="sbi_shortcode"> showbio
896
Eg: showbio=false</code></th>
897
<td>
898
<?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
899
<input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio" <?php if($sb_instagram_show_bio == true) echo 'checked="checked"' ?> />
900
- <span class="sbi_note"><?php _e("This only applies for User IDs with bios"); ?></span>
901
</td>
902
</tr>
903
<tr valign="top">
@@ -921,22 +1082,11 @@ function sb_instagram_settings_page() {
921
<tr valign="top" class="sbi_pro">
922
<th scope="row"><label><?php _e('Header Style'); ?></label></th>
923
<td>
924
- <select name="sb_instagram_header_style" style="float: left;" disabled>
925
- <option value="circle"><?php _e('Circle'); ?></option>
926
<option value="boxed"><?php _e('Boxed'); ?></option>
927
</select>
928
- <div id="sb_instagram_header_style_boxed_options">
929
- <div class="sbi_row">
930
- <div class="sbi_col sbi_one">
931
- <label><?php _e('Primary Color'); ?></label>
932
- <input name="sb_instagram_header_primary_color" type="text" class="sbi_colorpick" />
933
- </div>
934
- <div class="sbi_col sbi_one">
935
- <label><?php _e('Secondary Color'); ?></label>
936
- <input name="sb_instagram_header_secondary_color" type="text" class="sbi_colorpick" />
937
- </div>
938
- </div>
939
- </div>
940
</td>
941
</tr>
942
<tr valign="top" class="sbi_pro">
@@ -1296,8 +1446,19 @@ function sb_instagram_settings_page() {
1296
</table>
1297
<table class="form-table">
1298
<tbody>
1299
<tr valign="top">
1300
- <th scope="row"><label><?php _e('Cache error API recheck'); ?></label></th>
1301
<td>
1302
<input type="checkbox" name="check_api" id="sb_instagram_check_api" <?php if($check_api == true) echo 'checked="checked"' ?> />
1303
<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
@@ -1305,7 +1466,7 @@ function sb_instagram_settings_page() {
1305
</td>
1306
</tr>
1307
<tr valign="top">
1308
- <th><label><?php _e("Enable Backup Caching"); ?></label></th>
1309
<td class="sbi-customize-tab-opt">
1310
<input name="sb_instagram_backup" type="checkbox" id="sb_instagram_backup" <?php if($sb_instagram_backup == true) echo "checked"; ?> />
1311
<input id="sbi_clear_backups" class="button-secondary" type="submit" style="position: relative; top: -4px;" value="<?php esc_attr_e( 'Clear Backup Cache' ); ?>" />
@@ -1315,7 +1476,7 @@ function sb_instagram_settings_page() {
1315
</tr>
1316
<tr>
1317
<th class="bump-left">
1318
- <label for="sb_instagram_cron" class="bump-left"><?php _e("Force cache to clear on interval"); ?></label>
1319
</th>
1320
<td>
1321
<select name="sb_instagram_cron">
@@ -1324,7 +1485,7 @@ function sb_instagram_settings_page() {
1324
<option value="no" <?php if($sb_instagram_cron == "no") echo 'selected="selected"' ?> ><?php _e('No'); ?></option>
1325
</select>
1326
1327
- <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
1328
<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>
1329
</td>
1330
</tr>
@@ -1339,7 +1500,7 @@ function sb_instagram_settings_page() {
1339
</td>
1340
</tr>
1341
<tr>
1342
- <th scope="row"><label for="sbi_font_method"><?php _e("Icon Method"); ?></label></th>
1343
<td>
1344
<select name="sbi_font_method" id="sbi_font_method" class="default-text">
1345
<option value="svg" id="sbi-font_method" class="default-text" <?php if($sbi_font_method == 'svg') echo 'selected="selected"' ?>>SVG</option>
@@ -1547,6 +1708,11 @@ function sb_instagram_settings_page() {
1547
<td><?php _e("Display the bio in the header. 'true' or 'false'."); ?></td>
1548
<td><code>[instagram-feed showbio=true]</code></td>
1549
</tr>
1550
<tr>
1551
<td>headercolor</td>
1552
<td><?php _e("The color of the Header text. Any hex color code.", 'instagram-feed'); ?></td>
@@ -1765,7 +1931,20 @@ foreach( $sbi_options as $key => $val ) {
1765
1766
## API RESPONSE: ##
1767
<?php
1768
- $url = isset( $sbi_options['sb_instagram_at'] ) ? 'https://api.instagram.com/v1/users/self/?access_token=' . sbi_maybe_clean( $sbi_options['sb_instagram_at'] ) : 'no_at';
1769
if ( $url !== 'no_at' ) {
1770
$args = array(
1771
'timeout' => 60,
@@ -1773,28 +1952,37 @@ if ( $url !== 'no_at' ) {
1773
);
1774
$result = wp_remote_get( $url, $args );
1775
1776
- $data = json_decode( $result['body'] );
1777
-
1778
- if ( isset( $data->data->id ) ) {
1779
- echo 'id: ' . $data->data->id . "\n";
1780
- echo 'username: ' . $data->data->username . "\n";
1781
- echo 'posts: ' . $data->data->counts->media . "\n";
1782
-
1783
} else {
1784
- echo 'No id returned' . "\n";
1785
- echo 'code: ' . $data->meta->code . "\n";
1786
- if ( isset( $data->meta->error_message ) ) {
1787
- echo 'error_message: ' . $data->meta->error_message . "\n";
1788
- }
1789
}
1790
1791
} else {
1792
echo 'No Access Token';
1793
}?>
1794
1795
## Invalid Tokens: ##
1796
<?php
1797
- var_dump( get_option( 'sb_expired_tokens' ) );
1798
?>
1799
</textarea>
1800
@@ -1832,7 +2020,7 @@ var_dump( get_option( 'sb_expired_tokens' ) );
1832
var js, fjs = d.getElementsByTagName(s)[0];
1833
if (d.getElementById(id)) return;
1834
js = d.createElement(s); js.id = id;
1835
- js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=640861236031365&version=v2.0";
1836
fjs.parentNode.insertBefore(js, fjs);
1837
}(document, 'script', 'facebook-jssdk'));</script>
1838
<div class="fb-like" data-href="https://wordpress.org/plugins/instagram-feed/" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true" style="display: block; float: left; margin-right: 20px;"></div>
@@ -2145,7 +2333,11 @@ function sbi_account_data_for_token( $access_token ) {
2145
);
2146
$result = wp_remote_get( $url, $args );
2147
2148
- $data = json_decode( $result['body'] );
2149
2150
if ( isset( $data->data->id ) ) {
2151
$return['id'] = $data->data->id;
54
'sb_instagram_image_res' => 'auto',
55
//Header
56
'sb_instagram_show_header' => true,
57
+ 'sb_instagram_header_size' => 'small',
58
'sb_instagram_header_color' => '',
59
//Follow button
60
'sb_instagram_show_follow_btn' => true,
103
$sb_instagram_image_res = $options[ 'sb_instagram_image_res' ];
104
//Header
105
$sb_instagram_show_header = $options[ 'sb_instagram_show_header' ];
106
+ $sb_instagram_header_size = $options[ 'sb_instagram_header_size' ];
107
+ $sb_instagram_show_bio = isset( $options[ 'sb_instagram_show_bio' ] ) ? $options[ 'sb_instagram_show_bio' ] : true;
108
$sb_instagram_header_color = $options[ 'sb_instagram_header_color' ];
109
//Follow button
110
$sb_instagram_show_follow_btn = $options[ 'sb_instagram_show_follow_btn' ];
142
}
143
}
144
isset($_POST[ 'sb_instagram_preserve_settings' ]) ? $sb_instagram_preserve_settings = sanitize_text_field( $_POST[ 'sb_instagram_preserve_settings' ] ) : $sb_instagram_preserve_settings = '';
145
isset($_POST[ 'sb_instagram_cache_time' ]) ? $sb_instagram_cache_time = sanitize_text_field( $_POST[ 'sb_instagram_cache_time' ] ) : $sb_instagram_cache_time = '';
146
isset($_POST[ 'sb_instagram_cache_time_unit' ]) ? $sb_instagram_cache_time_unit = sanitize_text_field( $_POST[ 'sb_instagram_cache_time_unit' ] ) : $sb_instagram_cache_time_unit = '';
147
148
$options[ 'sb_instagram_at' ] = $sb_instagram_at;
149
$options[ 'sb_instagram_user_id' ] = $sb_instagram_user_id;
150
$options[ 'sb_instagram_preserve_settings' ] = $sb_instagram_preserve_settings;
151
152
$options[ 'sb_instagram_cache_time' ] = $sb_instagram_cache_time;
153
$options[ 'sb_instagram_cache_time_unit' ] = $sb_instagram_cache_time_unit;
222
//Header
223
isset($_POST[ 'sb_instagram_show_header' ]) ? $sb_instagram_show_header = sanitize_text_field( $_POST[ 'sb_instagram_show_header' ] ) : $sb_instagram_show_header = '';
224
isset($_POST[ 'sb_instagram_show_bio' ]) ? $sb_instagram_show_bio = sanitize_text_field( $_POST[ 'sb_instagram_show_bio' ] ) : $sb_instagram_show_bio = '';
225
+ if (isset($_POST[ 'sb_instagram_header_size' ]) ) $sb_instagram_header_size = $_POST[ 'sb_instagram_header_size' ];
226
227
$sb_instagram_header_color = sanitize_text_field( $_POST[ 'sb_instagram_header_color' ] );
228
//Follow button
233
//Misc
234
$sb_instagram_custom_css = $_POST[ 'sb_instagram_custom_css' ];
235
$sb_instagram_custom_js = $_POST[ 'sb_instagram_custom_js' ];
236
+ isset($_POST[ 'sb_instagram_ajax_theme' ]) ? $sb_instagram_ajax_theme = sanitize_text_field( $_POST[ 'sb_instagram_ajax_theme' ] ) : $sb_instagram_ajax_theme = '';
237
if (isset($_POST[ 'sb_instagram_cron' ]) ) $sb_instagram_cron = $_POST[ 'sb_instagram_cron' ];
238
isset($_POST[ 'check_api' ]) ? $check_api = $_POST[ 'check_api' ] : $check_api = '';
239
isset($_POST[ 'sb_instagram_backup' ]) ? $sb_instagram_backup = $_POST[ 'sb_instagram_backup' ] : $sb_instagram_backup = '';
259
$options[ 'sb_instagram_image_res' ] = $sb_instagram_image_res;
260
//Header
261
$options[ 'sb_instagram_show_header' ] = $sb_instagram_show_header;
262
+ $options[ 'sb_instagram_header_size' ] = $sb_instagram_header_size;
263
+ $options[ 'sb_instagram_show_bio' ] = $sb_instagram_show_bio;
264
$options[ 'sb_instagram_header_color' ] = $sb_instagram_header_color;
265
//Follow button
266
$options[ 'sb_instagram_show_follow_btn' ] = $sb_instagram_show_follow_btn;
270
//Misc
271
$options[ 'sb_instagram_custom_css' ] = $sb_instagram_custom_css;
272
$options[ 'sb_instagram_custom_js' ] = $sb_instagram_custom_js;
273
+ $options[ 'sb_instagram_ajax_theme' ] = $sb_instagram_ajax_theme;
274
$options[ 'sb_instagram_cron' ] = $sb_instagram_cron;
275
$options[ 'check_api' ] = $check_api;
276
$options['sb_instagram_backup'] = $sb_instagram_backup;
363
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
506
</div>
507
<div class="sbi_col sbi_two">
508
<input readonly type="text" size="25" />
509
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
510
+
511
+ <!-- <span class="sbi_note"> - <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to show posts by Hashtag</a></span> -->
512
+
513
<p class="sbi_tooltip"><?php _e( 'Display posts from a specific hashtag instead of from a user', 'instagram-feed' ); ?></p>
514
</div>
515
</div>
521
</div>
522
<div class="sbi_col sbi_two">
523
524
+ <p class="sbi_pro_tooltip">Upgrade to the Pro version to display hashtag, single post, or location feeds.<i class="fa fa-caret-down" aria-hidden="true"></i></p>
525
+ <a href="https://smashballoon.com/instagram-feed/" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i>Pro</a>
526
+
527
<input readonly type="text" size="25" />
528
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
529
+
530
+ <!-- <span class="sbi_note"> - <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to show single posts</a></span> -->
531
+
532
<p class="sbi_tooltip"><?php _e("Display a feed comprised of specific single posts."); ?></p>
533
</div>
534
</div>
539
<label class="sbi_radio_label" for="sb_instagram_type_location"><?php _e( 'Location:', 'instagram-feed' ); ?></label>
540
</div>
541
<div class="sbi_col sbi_two">
542
+ <input readonly type="text" size="25" />
543
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e( 'What is this?', 'instagram-feed' ); ?></a>
544
+
545
+ <!-- <span class="sbi_note"> - <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to show posts by Location</a></span> -->
546
+
547
<p class="sbi_tooltip"><?php _e( 'Display posts from an Instagram location ID or location coordinates.', 'instagram-feed' ); ?></p>
548
</div>
549
</div>
550
+
551
+ <div class="sbi_row sbi_pro">
552
+ <br>
553
+ <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>
554
+ <p class="sbi_tooltip">
555
+ <b>Please note: this is only available in the <a href="https://smashballoon.com/instagram-feed/" target="_blank">Pro version</a>.</b><br />
556
+ <?php echo sprintf( __('To display multiple feed types in a single feed, use %s in your shortcode and then add each user name, hashtag, location, or single post 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>' ); ?>
557
+ </p>
558
+ </div>
559
+
560
</td>
561
</tr>
562
570
</td>
571
</tr>
572
573
<tr valign="top">
574
<th scope="row"><label><?php _e('Check for new posts every'); ?></label></th>
575
<td>
660
661
<table class="form-table">
662
<tbody>
663
+ <?php
664
+ $selected_type = isset( $sb_instagram_layout_type ) ? $sb_instagram_layout_type : 'grid';
665
+ $layout_types = array(
666
+ 'grid' => __( 'Grid', 'instagram-feed' ),
667
+ 'carousel' => __( 'Carousel', 'instagram-feed' ),
668
+ 'masonry' => __( 'Masonry', 'instagram-feed' ),
669
+ 'highlight' => __( 'Highlight', 'instagram-feed' )
670
+ );
671
+ $layout_images = array(
672
+ 'grid' => plugins_url( 'img/grid.png' , __FILE__ ),
673
+ 'carousel' => plugins_url( 'img/carousel.png' , __FILE__ ),
674
+ 'masonry' => plugins_url( 'img/masonry.png' , __FILE__ ),
675
+ 'highlight' => plugins_url( 'img/highlight.png' , __FILE__ )
676
+ );
677
+ ?>
678
+ <tr valign="top">
679
+ <th scope="row" class="sbi_pro"><label title="Click for shortcode option">Layout Type</label><br /><span class="sbi_note" style="margin: 5px 0 0 0; font-weight: normal;"><?php _e('Select a layout to see associated<br />options', 'instagram-feed'); ?></span></th>
680
+ <td>
681
+ <div class="sbi_layouts">
682
+ <?php foreach( $layout_types as $layout_type => $label ) : ?>
683
+ <div class="sbi_layout_cell sbi_pro">
684
+ <input class="sb_layout_type" id="sb_layout_type_<?php esc_attr_e( $layout_type ); ?>" name="sb_instagram_layout_type" type="radio" value="<?php esc_attr_e( $layout_type ); ?>" <?php if ( $selected_type === $layout_type ) echo 'checked'; ?>/><label for="sb_layout_type_<?php esc_attr_e( $layout_type ); ?>"><span class="sbi_label"><?php echo esc_html( $label ); ?></span><img src="<?php echo $layout_images[ $layout_type ]; ?>" /></label>
685
+ </div>
686
+ <?php endforeach; ?>
687
+
688
+ <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>
689
+ <a href="https://smashballoon.com/instagram-feed/" target="_blank" class="sbi_lock"><i class="fa fa-rocket"></i>Pro</a>
690
+
691
+ </div>
692
+ <div class="sb_layout_options_wrap sbi_pro">
693
+ <a href="JavaScript:void(0);" class="sbi_close_options"><i class="fa fa-close"></i></a>
694
+ <div class="sb_instagram_layout_settings sbi_layout_type_grid">
695
+ <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>
696
+ </div>
697
+ <div class="sb_instagram_layout_settings sbi_layout_type_masonry">
698
+ <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>
699
+ </div>
700
+ <div class="sb_instagram_layout_settings sbi_layout_type_carousel">
701
+ <div class="sb_instagram_layout_setting">
702
+ <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>
703
+ </div>
704
+ <div class="sb_instagram_layout_setting">
705
+
706
+ <label>Number of Rows</label><code class="sbi_shortcode"> carouselrows
707
+ Eg: carouselrows=2</code>
708
+ <br>
709
+ <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>
710
+ <br>
711
+ <select name="sb_instagram_carousel_rows" id="sb_instagram_carousel_rows">
712
+ <option value="1">1</option>
713
+ <option value="2" selected="selected">2</option>
714
+ </select>
715
+ </div>
716
+ <div class="sb_instagram_layout_setting">
717
+ <label>Loop Type</label><code class="sbi_shortcode"> carouselloop
718
+ Eg: carouselloop=rewind
719
+ carouselloop=infinity</code>
720
+ <br>
721
+ <select name="sb_instagram_carousel_loop" id="sb_instagram_carousel_loop">
722
+ <option value="rewind">Rewind</option>
723
+ <option value="infinity" selected="selected">Infinity</option>
724
+ </select>
725
+ </div>
726
+ <div class="sb_instagram_layout_setting">
727
+ <input type="checkbox" name="sb_instagram_carousel_arrows" id="sb_instagram_carousel_arrows" checked="checked">
728
+ <label>Show Navigation Arrows</label><code class="sbi_shortcode"> carouselarrows
729
+ Eg: carouselarrows=true</code>
730
+ </div>
731
+ <div class="sb_instagram_layout_setting">
732
+ <input type="checkbox" name="sb_instagram_carousel_pag" id="sb_instagram_carousel_pag">
733
+ <label>Show Pagination</label><code class="sbi_shortcode"> carouselpag
734
+ Eg: carouselpag=true</code>
735
+ </div>
736
+ <div class="sb_instagram_layout_setting">
737
+ <input type="checkbox" name="sb_instagram_carousel_autoplay" id="sb_instagram_carousel_autoplay">
738
+ <label>Enable Autoplay</label><code class="sbi_shortcode"> carouselautoplay
739
+ Eg: carouselautoplay=true</code>
740
+ </div>
741
+ <div class="sb_instagram_layout_setting">
742
+ <label>Interval Time</label><code class="sbi_shortcode"> carouseltime
743
+ Eg: carouseltime=8000</code>
744
+ <br>
745
+ <input name="sb_instagram_carousel_interval" type="text" value="5000" size="6">miliseconds </div>
746
+ </div>
747
+
748
+ <div class="sb_instagram_layout_settings sbi_layout_type_highlight">
749
+ <div class="sb_instagram_layout_setting">
750
+ <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>
751
+ </div>
752
+ <div class="sb_instagram_layout_setting">
753
+ <label title="Click for shortcode option">Highlighting Type</label><code class="sbi_shortcode"> highlighttype
754
+ Eg: highlighttype=pattern</code>
755
+ <br>
756
+ <select name="sb_instagram_highlight_type" id="sb_instagram_highlight_type">
757
+ <option value="pattern" selected="selected">Pattern</option>
758
+ <option value="id">Post ID</option>
759
+ <option value="hashtag">Hashtag</option>
760
+ </select>
761
+ </div>
762
+ <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
763
+ <label>Offset</label><code class="sbi_shortcode"> highlightoffset
764
+ Eg: highlightoffset=2</code>
765
+ <br>
766
+ <input name="sb_instagram_highlight_offset" type="number" min="0" value="0" style="width: 50px;">
767
+ </div>
768
+ <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_pattern sb_instagram_layout_setting" style="display: block;">
769
+ <label>Pattern</label><code class="sbi_shortcode"> highlightpattern
770
+ Eg: highlightpattern=3</code>
771
+ <br>
772
+ <span>Highlight every</span><input name="sb_instagram_highlight_factor" type="number" min="2" value="6" style="width: 50px;"><span>posts</span>
773
+ </div>
774
+ <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_hashtag sb_instagram_layout_setting" style="display: none;">
775
+ <label>Highlight Posts with these Hashtags</label>
776
+ <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>
777
+ <br>
778
+ <span class="sbi_note" style="margin-left: 0;">Separate multiple hashtags using commas</span>
779
+
780
+
781
+ <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>
782
+ </div>
783
+ <div class="sb_instagram_highlight_sub_options sb_instagram_highlight_ids sb_instagram_layout_setting" style="display: none;">
784
+ <label>Highlight Posts by ID</label>
785
+ <textarea name="sb_instagram_highlight_ids" id="sb_instagram_highlight_ids" style="width: 100%;" rows="3">sbi_1852317219231323590_3269008872</textarea>
786
+ <br>
787
+ <span class="sbi_note" style="margin-left: 0;">Separate IDs using commas</span>
788
+
789
+ &nbsp;<a class="sbi_tooltip_link" href="JavaScript:void(0);">What is this?</a>
790
+ <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>
791
+ </div>
792
+ </div>
793
+
794
+ </div>
795
+ </td>
796
+ </tr>
797
<tr valign="top">
798
<th scope="row"><label><?php _e('Number of Photos', 'instagram-feed'); ?></label><code class="sbi_shortcode"> num
799
Eg: num=6</code></th>
1035
<table class="form-table">
1036
<tbody>
1037
<tr valign="top">
1038
+ <th scope="row"><label><?php _e("Show Feed Header", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showheader
1039
Eg: showheader=false</code></th>
1040
<td>
1041
<input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header" <?php if($sb_instagram_show_header == true) echo 'checked="checked"' ?> />
1042
</td>
1043
</tr>
1044
+ <tr valign="top">
1045
+ <th scope="row"><label><?php _e('Header Size', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headersize
1046
+ Eg: headersize=medium</code></th>
1047
+ <td>
1048
+ <select name="sb_instagram_header_size" id="sb_instagram_header_size" style="float: left;">
1049
+ <option value="small" <?php if($sb_instagram_header_size == "small") echo 'selected="selected"' ?> ><?php _e('Small', 'instagram-feed'); ?></option>
1050
+ <option value="medium" <?php if($sb_instagram_header_size == "medium") echo 'selected="selected"' ?> ><?php _e('Medium', 'instagram-feed'); ?></option>
1051
+ <option value="large" <?php if($sb_instagram_header_size == "large") echo 'selected="selected"' ?> ><?php _e('Large', 'instagram-feed'); ?></option>
1052
+ </select>
1053
+ </td>
1054
+ </tr>
1055
<tr valign="top">
1056
<th scope="row"><label><?php _e("Show Bio Text"); ?></label><code class="sbi_shortcode"> showbio
1057
Eg: showbio=false</code></th>
1058
<td>
1059
<?php $sb_instagram_show_bio = isset( $sb_instagram_show_bio ) ? $sb_instagram_show_bio : true; ?>
1060
<input type="checkbox" name="sb_instagram_show_bio" id="sb_instagram_show_bio" <?php if($sb_instagram_show_bio == true) echo 'checked="checked"' ?> />
1061
+ <span class="sbi_note"><?php _e("Only applies for Instagram accounts with bios"); ?></span>
1062
</td>
1063
</tr>
1064
<tr valign="top">
1082
<tr valign="top" class="sbi_pro">
1083
<th scope="row"><label><?php _e('Header Style'); ?></label></th>
1084
<td>
1085
+ <select name="sb_instagram_header_style" style="float: left;">
1086
+ <option value="circle"><?php _e('Standard'); ?></option>
1087
<option value="boxed"><?php _e('Boxed'); ?></option>
1088
+ <option value="centered"><?php _e('Centered'); ?></option>
1089
</select>
1090
</td>
1091
</tr>
1092
<tr valign="top" class="sbi_pro">
1446
</table>
1447
<table class="form-table">
1448
<tbody>
1449
+
1450
+ <tr valign="top">
1451
+ <th scope="row"><label for="sb_instagram_ajax_theme" class="bump-left"><?php _e("Are you using an Ajax powered theme?", 'instagram-feed'); ?></label></th>
1452
+ <td>
1453
+ <input name="sb_instagram_ajax_theme" type="checkbox" id="sb_instagram_ajax_theme" <?php if($sb_instagram_ajax_theme == true) echo "checked"; ?> />
1454
+ <label for="sb_instagram_ajax_theme"><?php _e('Yes', 'instagram-feed'); ?></label>
1455
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1456
+ <p class="sbi_tooltip"><?php _e("When navigating your site, if your theme uses Ajax to load content into your pages (meaning your page doesn't refresh) then check this setting. If you're not sure then please check with the theme author.", 'instagram-feed'); ?></p>
1457
+ </td>
1458
+ </tr>
1459
+
1460
<tr valign="top">
1461
+ <th scope="row"><label><?php _e('Cache error API recheck', 'instagram-feed'); ?></label></th>
1462
<td>
1463
<input type="checkbox" name="check_api" id="sb_instagram_check_api" <?php if($check_api == true) echo 'checked="checked"' ?> />
1464
<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
1466
</td>
1467
</tr>
1468
<tr valign="top">
1469
+ <th><label><?php _e("Enable Backup Caching", 'instagram-feed'); ?></label></th>
1470
<td class="sbi-customize-tab-opt">
1471
<input name="sb_instagram_backup" type="checkbox" id="sb_instagram_backup" <?php if($sb_instagram_backup == true) echo "checked"; ?> />
1472
<input id="sbi_clear_backups" class="button-secondary" type="submit" style="position: relative; top: -4px;" value="<?php esc_attr_e( 'Clear Backup Cache' ); ?>" />
1476
</tr>
1477
<tr>
1478
<th class="bump-left">
1479
+ <label for="sb_instagram_cron" class="bump-left"><?php _e("Force cache to clear on interval", 'instagram-feed'); ?></label>
1480
</th>
1481
<td>
1482
<select name="sb_instagram_cron">
1485
<option value="no" <?php if($sb_instagram_cron == "no") echo 'selected="selected"' ?> ><?php _e('No'); ?></option>
1486
</select>
1487
1488
+ <a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
1489
<p class="sbi_tooltip"><?php _e("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>
1490
</td>
1491
</tr>
1500
</td>
1501
</tr>
1502
<tr>
1503
+ <th scope="row"><label for="sbi_font_method"><?php _e("Icon Method", 'instagram-feed'); ?></label></th>
1504
<td>
1505
<select name="sbi_font_method" id="sbi_font_method" class="default-text">
1506
<option value="svg" id="sbi-font_method" class="default-text" <?php if($sbi_font_method == 'svg') echo 'selected="selected"' ?>>SVG</option>
1708
<td><?php _e("Display the bio in the header. 'true' or 'false'."); ?></td>
1709
<td><code>[instagram-feed showbio=true]</code></td>
1710
</tr>
1711
+ <tr>
1712
+ <td>headersize</td>
1713
+ <td><?php _e("Size of the header. Choose from small, medium, or large.", 'instagram-feed'); ?></td>
1714
+ <td><code>[instagram-feed headersize=medium]</code></td>
1715
+ </tr>
1716
<tr>
1717
<td>headercolor</td>
1718
<td><?php _e("The color of the Header text. Any hex color code.", 'instagram-feed'); ?></td>
1931
1932
## API RESPONSE: ##
1933
<?php
1934
+ $con_accounts = isset( $sbi_options['connected_accounts'] ) ? $sbi_options['connected_accounts'] : array();
1935
+ $first_at = '';
1936
+ $i = 0;
1937
+ if ( ! empty( $con_accounts ) ) {
1938
+ foreach ( $con_accounts as $account ) {
1939
+ if ( $i == 0 ) {
1940
+ $first_at = $account['access_token'];
1941
+ $i++;
1942
+ }
1943
+ }
1944
+
1945
+ }
1946
+
1947
+ $url = ! empty( $first_at ) ? 'https://api.instagram.com/v1/users/self/?access_token=' . sbi_maybe_clean( $first_at ) : 'no_at';
1948
if ( $url !== 'no_at' ) {
1949
$args = array(
1950
'timeout' => 60,
1952
);
1953
$result = wp_remote_get( $url, $args );
1954
1955
+ if ( ! is_wp_error( $result ) ) {
1956
+ $data = json_decode( $result['body'] );
1957
+
1958
+ if ( isset( $data->data->id ) ) {
1959
+ echo 'id: ' . $data->data->id . "\n";
1960
+ echo 'username: ' . $data->data->username . "\n";
1961
+ echo 'posts: ' . $data->data->counts->media . "\n";
1962
+
1963
+ } else {
1964
+ echo 'No id returned' . "\n";
1965
+ echo 'code: ' . $data->meta->code . "\n";
1966
+ if ( isset( $data->meta->error_message ) ) {
1967
+ echo 'error_message: ' . $data->meta->error_message . "\n";
1968
+ }
1969
+ }
1970
} else {
1971
+ var_export( $result );
1972
}
1973
1974
+
1975
} else {
1976
echo 'No Access Token';
1977
}?>
1978
1979
## Invalid Tokens: ##
1980
<?php
1981
+ $sb_expired_tokens = get_option( 'sb_expired_tokens' );
1982
+ if (is_array($sb_expired_tokens)){
1983
+ $sb_expired_tokens = array_unique($sb_expired_tokens);
1984
+ }
1985
+ var_export($sb_expired_tokens);
1986
?>
1987
</textarea>
1988
2020
var js, fjs = d.getElementsByTagName(s)[0];
2021
if (d.getElementById(id)) return;
2022
js = d.createElement(s); js.id = id;
2023
+ js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=&version=v2.0";
2024
fjs.parentNode.insertBefore(js, fjs);
2025
}(document, 'script', 'facebook-jssdk'));</script>
2026
<div class="fb-like" data-href="https://wordpress.org/plugins/instagram-feed/" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true" style="display: block; float: left; margin-right: 20px;"></div>
2333
);
2334
$result = wp_remote_get( $url, $args );
2335
2336
+ if ( ! is_wp_error( $result ) ) {
2337
+ $data = json_decode( $result['body'] );
2338
+ } else {
2339
+ $data = array();
2340
+ }
2341
2342
if ( isset( $data->data->id ) ) {
2343
$return['id'] = $data->data->id;
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.9.1
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.9.1' );
27
28
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
29
@@ -64,6 +64,7 @@ function display_instagram($atts, $content = null) {
64
'followtextcolor' => isset($options[ 'sb_instagram_follow_btn_text_color' ]) ? $options[ 'sb_instagram_follow_btn_text_color' ] : '',
65
'followtext' => isset($options[ 'sb_instagram_follow_btn_text' ]) ? $options[ 'sb_instagram_follow_btn_text' ] : '',
66
'showheader' => isset($options[ 'sb_instagram_show_header' ]) ? $options[ 'sb_instagram_show_header' ] : '',
67
'showbio' => isset($options[ 'sb_instagram_show_bio' ]) ? $options[ 'sb_instagram_show_bio' ] : '',
68
'headercolor' => isset($options[ 'sb_instagram_header_color' ]) ? $options[ 'sb_instagram_header_color' ] : '',
69
'class' => '',
@@ -207,7 +208,8 @@ function display_instagram($atts, $content = null) {
207
$sb_instagram_show_header = $atts['showheader'];
208
( $sb_instagram_show_header == 'on' || $sb_instagram_show_header == 'true' || $sb_instagram_show_header == true ) ? $sb_instagram_show_header = true : $sb_instagram_show_header = false;
209
if( $atts[ 'showheader' ] === 'false' ) $sb_instagram_show_header = false;
210
- $sb_instagram_header_color = str_replace('#', '', $atts['headercolor']);
211
212
//As this is a new option in the update then set it to be true if it doesn't exist yet
213
if ( !array_key_exists( 'sb_instagram_show_bio', $options ) ) $sb_instagram_show_bio = 'true';
@@ -227,7 +229,7 @@ function display_instagram($atts, $content = null) {
227
$sb_instagram_btn_background = str_replace('#', '', $atts['buttoncolor']);
228
$sb_instagram_btn_text_color = str_replace('#', '', $atts['buttontextcolor']);
229
//Load more button styles
230
- $sb_instagram_button_styles = 'style="';
231
if ( !empty($sb_instagram_btn_background) ) $sb_instagram_button_styles .= 'background: #'.$sb_instagram_btn_background.'; ';
232
if ( !empty($sb_instagram_btn_text_color) ) $sb_instagram_button_styles .= 'color: #'.$sb_instagram_btn_text_color.';';
233
$sb_instagram_button_styles .= '"';
@@ -244,7 +246,9 @@ function display_instagram($atts, $content = null) {
244
if ( !empty($sb_instagram_follow_btn_text_color) ) $sb_instagram_follow_btn_styles .= 'color: #'.$sb_instagram_follow_btn_text_color.';';
245
$sb_instagram_follow_btn_styles .= '"';
246
//Follow button HTML
247
- $sb_instagram_follow_btn_html = '<div class="sbi_follow_btn"><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></div>';
248
249
//Mobile
250
$sb_instagram_disable_mobile = $atts['disablemobile'];
@@ -362,7 +366,7 @@ function display_instagram($atts, $content = null) {
362
$sb_instagram_content .= '" '.$sb_instagram_styles .' data-id="' . $sb_instagram_user_id . '" data-num="' . trim($atts['num']) . '" data-res="' . trim($atts['imageres']) . '" data-cols="' . trim($sb_instagram_cols) . '" data-options=\'{&quot;sortby&quot;: &quot;'.$atts['sortby'].'&quot;, &quot;showbio&quot;: &quot;'.$sb_instagram_show_bio.'&quot;,'.$at_front_string.' &quot;headercolor&quot;: &quot;'.$sb_instagram_header_color.'&quot;, &quot;imagepadding&quot;: &quot;'.$sb_instagram_image_padding.'&quot;,'.$at_middle_string.' &quot;disablecache&quot;: &quot;'.$sb_instagram_disable_cache.'&quot;, &quot;sbiCacheExists&quot;: &quot;'.$sbi_cache_exists.'&quot;,'.$at_back_string.' &quot;sbiHeaderCache&quot;: &quot;'.$sbiHeaderCache.'&quot;'.$use_backup_json.'}\'>';
363
364
//Header
365
- if( $sb_instagram_show_header ) $sb_instagram_content .= '<div class="sb_instagram_header" style="padding: '.(2*intval($sb_instagram_image_padding)) . $sb_instagram_image_padding_unit .'; padding-bottom: 0;"></div>';
366
367
//Images container
368
$padding_style = (int)$sb_instagram_image_padding > 0 ? ' style="padding: '.$sb_instagram_image_padding . $sb_instagram_image_padding_unit . ';"' : '';
@@ -377,16 +381,16 @@ function display_instagram($atts, $content = null) {
377
}
378
379
//Loader
380
- if( !$sb_instagram_error ) $sb_instagram_content .= '<div class="sbi_loader fa-spin"></div>';
381
382
//Load section
383
- $sb_instagram_content .= '</div><div id="sbi_load"';
384
385
if(($sb_instagram_image_padding == 0 || !isset($sb_instagram_image_padding)) && ($sb_instagram_show_btn || $sb_instagram_show_follow_btn)) $sb_instagram_content .= ' style="padding-top: 5px"';
386
$sb_instagram_content .= '>';
387
388
//Load More button
389
- if( $sb_instagram_show_btn && !$sb_instagram_error ) $sb_instagram_content .= '<a class="sbi_load_btn" href="javascript:void(0);" '.$sb_instagram_button_styles.'><span class="sbi_btn_text">' . esc_html( stripslashes( $sb_instagram_load_btn_text ) ).'</span><i class="fa fa-spinner fa-pulse" aria-hidden="true" style="display:none;"></i></a>';
390
391
//Follow button
392
if( $sb_instagram_show_follow_btn && !$sb_instagram_error ) $sb_instagram_content .= $sb_instagram_follow_btn_html;
@@ -402,7 +406,7 @@ function display_instagram($atts, $content = null) {
402
$access_token = isset( $options['sb_instagram_at'] ) ? $options['sb_instagram_at'] : '';
403
404
$sb_instagram_content .= '<script type="text/javascript">var sb_instagram_js_options = {"sb_instagram_at":"'.sbi_get_parts( $access_token ).'", "font_method":"'.$font_method.'"};</script>';
405
- $sb_instagram_content .= "<script type='text/javascript' src='".plugins_url( '/js/sb-instagram.js?ver='.SBIVER , __FILE__ )."'></script>";
406
}
407
408
//Return our feed HTML to display
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
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.10' );
27
28
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
29
64
'followtextcolor' => isset($options[ 'sb_instagram_follow_btn_text_color' ]) ? $options[ 'sb_instagram_follow_btn_text_color' ] : '',
65
'followtext' => isset($options[ 'sb_instagram_follow_btn_text' ]) ? $options[ 'sb_instagram_follow_btn_text' ] : '',
66
'showheader' => isset($options[ 'sb_instagram_show_header' ]) ? $options[ 'sb_instagram_show_header' ] : '',
67
+ 'headersize' => isset($options[ 'sb_instagram_header_size' ]) ? $options[ 'sb_instagram_header_size' ] : '',
68
'showbio' => isset($options[ 'sb_instagram_show_bio' ]) ? $options[ 'sb_instagram_show_bio' ] : '',
69
'headercolor' => isset($options[ 'sb_instagram_header_color' ]) ? $options[ 'sb_instagram_header_color' ] : '',
70
'class' => '',
208
$sb_instagram_show_header = $atts['showheader'];
209
( $sb_instagram_show_header == 'on' || $sb_instagram_show_header == 'true' || $sb_instagram_show_header == true ) ? $sb_instagram_show_header = true : $sb_instagram_show_header = false;
210
if( $atts[ 'showheader' ] === 'false' ) $sb_instagram_show_header = false;
211
+ $sb_instagram_header_size_class = in_array( strtolower( $atts['headersize'] ), array( 'medium', 'large' ) ) ? ' sbi_'.strtolower( $atts['headersize'] ) : '';
212
+ $sb_instagram_header_color = str_replace('#', '', $atts['headercolor']);
213
214
//As this is a new option in the update then set it to be true if it doesn't exist yet
215
if ( !array_key_exists( 'sb_instagram_show_bio', $options ) ) $sb_instagram_show_bio = 'true';
229
$sb_instagram_btn_background = str_replace('#', '', $atts['buttoncolor']);
230
$sb_instagram_btn_text_color = str_replace('#', '', $atts['buttontextcolor']);
231
//Load more button styles
232
+ $sb_instagram_button_styles = 'style="display: none; ';
233
if ( !empty($sb_instagram_btn_background) ) $sb_instagram_button_styles .= 'background: #'.$sb_instagram_btn_background.'; ';
234
if ( !empty($sb_instagram_btn_text_color) ) $sb_instagram_button_styles .= 'color: #'.$sb_instagram_btn_text_color.';';
235
$sb_instagram_button_styles .= '"';
246
if ( !empty($sb_instagram_follow_btn_text_color) ) $sb_instagram_follow_btn_styles .= 'color: #'.$sb_instagram_follow_btn_text_color.';';
247
$sb_instagram_follow_btn_styles .= '"';
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 = '<div 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></div>';
252
253
//Mobile
254
$sb_instagram_disable_mobile = $atts['disablemobile'];
366
$sb_instagram_content .= '" '.$sb_instagram_styles .' data-id="' . $sb_instagram_user_id . '" data-num="' . trim($atts['num']) . '" data-res="' . trim($atts['imageres']) . '" data-cols="' . trim($sb_instagram_cols) . '" data-options=\'{&quot;sortby&quot;: &quot;'.$atts['sortby'].'&quot;, &quot;showbio&quot;: &quot;'.$sb_instagram_show_bio.'&quot;,'.$at_front_string.' &quot;headercolor&quot;: &quot;'.$sb_instagram_header_color.'&quot;, &quot;imagepadding&quot;: &quot;'.$sb_instagram_image_padding.'&quot;,'.$at_middle_string.' &quot;disablecache&quot;: &quot;'.$sb_instagram_disable_cache.'&quot;, &quot;sbiCacheExists&quot;: &quot;'.$sbi_cache_exists.'&quot;,'.$at_back_string.' &quot;sbiHeaderCache&quot;: &quot;'.$sbiHeaderCache.'&quot;'.$use_backup_json.'}\'>';
367
368
//Header
369
+ if( $sb_instagram_show_header ) $sb_instagram_content .= '<div class="sb_instagram_header'.$sb_instagram_header_size_class.'" style="padding: '.(2*intval($sb_instagram_image_padding)) . $sb_instagram_image_padding_unit .'; padding-bottom: 0;"></div>';
370
371
//Images container
372
$padding_style = (int)$sb_instagram_image_padding > 0 ? ' style="padding: '.$sb_instagram_image_padding . $sb_instagram_image_padding_unit . ';"' : '';
381
}
382
383
//Loader
384
+ if( !$sb_instagram_error ) $sb_instagram_content .= '<div class="sbi_loader"></div>';
385
386
//Load section
387
+ $sb_instagram_content .= '</div><div id="sbi_load" class="sbi_hidden"';
388
389
if(($sb_instagram_image_padding == 0 || !isset($sb_instagram_image_padding)) && ($sb_instagram_show_btn || $sb_instagram_show_follow_btn)) $sb_instagram_content .= ' style="padding-top: 5px"';
390
$sb_instagram_content .= '>';
391
392
//Load More button
393
+ if( $sb_instagram_show_btn && !$sb_instagram_error ) $sb_instagram_content .= '<a class="sbi_load_btn" href="javascript:void(0);" '.$sb_instagram_button_styles.'><span class="sbi_btn_text">' . esc_html( stripslashes( $sb_instagram_load_btn_text ) ).'</span><div class="sbi_loader sbi_hidden"></div></a>';
394
395
//Follow button
396
if( $sb_instagram_show_follow_btn && !$sb_instagram_error ) $sb_instagram_content .= $sb_instagram_follow_btn_html;
406
$access_token = isset( $options['sb_instagram_at'] ) ? $options['sb_instagram_at'] : '';
407
408
$sb_instagram_content .= '<script type="text/javascript">var sb_instagram_js_options = {"sb_instagram_at":"'.sbi_get_parts( $access_token ).'", "font_method":"'.$font_method.'"};</script>';
409
+ $sb_instagram_content .= "<script type='text/javascript' src='".plugins_url( '/js/sb-instagram.min.js?ver='.SBIVER , __FILE__ )."'></script>";
410
}
411
412
//Return our feed HTML to display
js/sb-instagram-admin.js CHANGED
@@ -343,6 +343,15 @@ jQuery(document).ready(function($) {
343
});
344
345
346
//Add the color picker
347
if( jQuery('.sbi_colorpick').length > 0 ) jQuery('.sbi_colorpick').wpColorPicker();
348
@@ -422,4 +431,54 @@ jQuery(document).ready(function($) {
422
jQuery(this).parent().next('.sbi-pro-options').toggle();
423
});
424
425
});
343
});
344
345
346
+ jQuery('#sbi_admin .sbi_lock').hover(function(){
347
+ jQuery(this).siblings('.sbi_pro_tooltip').show();
348
+ }, function(){
349
+ jQuery('.sbi_pro_tooltip').hide();
350
+ });
351
+
352
+
353
+
354
+
355
//Add the color picker
356
if( jQuery('.sbi_colorpick').length > 0 ) jQuery('.sbi_colorpick').wpColorPicker();
357
431
jQuery(this).parent().next('.sbi-pro-options').toggle();
432
});
433
434
+ /* Pro 3.0 JS */
435
+ function sbiUpdateLayoutTypeOptionsDisplay() {
436
+ setTimeout(function(){
437
+ jQuery('.sb_instagram_layout_settings').hide();
438
+ jQuery('.sb_instagram_layout_settings.sbi_layout_type_'+jQuery('.sb_layout_type:checked').val()).show();
439
+ }, 1);
440
+ }
441
+ jQuery('.sb_layout_type').change(sbiUpdateLayoutTypeOptionsDisplay);
442
+
443
+ jQuery('.sbi_close_options').on('click', function(){
444
+ jQuery('.sb_instagram_layout_settings').hide();
445
+ });
446
+
447
+ function sbiUpdateHighlightOptionsDisplay() {
448
+ jQuery('.sb_instagram_highlight_sub_options').hide();
449
+ var selected = jQuery('#sb_instagram_highlight_type').val();
450
+
451
+ if (selected === 'pattern') {
452
+ jQuery('.sb_instagram_highlight_pattern').show();
453
+ } else if (selected === 'id') {
454
+ jQuery('.sb_instagram_highlight_ids').show();
455
+ } else {
456
+ jQuery('.sb_instagram_highlight_hashtag').show();
457
+ }
458
+
459
+ }
460
+ sbiUpdateHighlightOptionsDisplay();
461
+ jQuery('#sb_instagram_highlight_type').change(sbiUpdateHighlightOptionsDisplay);
462
+
463
+ //Open/close the expandable option sections
464
+ jQuery('.sbi-expandable-options').hide();
465
+ jQuery('.sbi-expand-button a').on('click', function(e){
466
+ e.preventDefault();
467
+ var $self = jQuery(this);
468
+ $self.parent().next('.sbi-expandable-options').toggle();
469
+ if( $self.text().indexOf('Show') !== -1 ){
470
+ $self.text( $self.text().replace('Show', 'Hide') );
471
+ } else {
472
+ $self.text( $self.text().replace('Hide', 'Show') );
473
+ }
474
+ });
475
+
476
+ //Selecting a post layout
477
+ jQuery('.sbi_layout_cell').click(function(){
478
+ var $self = jQuery(this);
479
+ $('.sb_layout_type').trigger('change');
480
+ $self.addClass('sbi_layout_selected').find('.sb_layout_type').attr('checked', 'checked');
481
+ $self.siblings().removeClass('sbi_layout_selected');
482
+ });
483
+
484
});
js/sb-instagram.js CHANGED
@@ -387,6 +387,8 @@ if(!sbi_js_exists){
387
headersecondarycolor = feedOptions.headersecondarycolor,
388
media = feedOptions.media;
389
390
//On first load imagesArr is empty so set it to be the images
391
if(imagesArr == ''){
392
imagesArr = images;
@@ -520,9 +522,9 @@ if(!sbi_js_exists){
520
var playBtnHtml = item.type === 'video' || videoIsFirstCarouselItemClass ? '<i class="fa fa-play sbi_playbtn"></i>' : '';
521
522
//TEMPLATE:
523
- imagesHTML += '<div class="sbi_item sbi_type_'+item.type+' sbi_new" id="sbi_'+item.id+'" data-date="'+created_time_raw+'">' +
524
- '<div class="sbi_photo_wrap">'+carouselTypeIcon+playBtnHtml +
525
- '<a class="sbi_photo" href="'+item.link+'" target="_blank">' +
526
'<img src="'+data_image+'" alt="'+captionText.replace(/<>/g, " ")+'" width="200" height="200" />' +
527
'</a>' +
528
'</div>' +
@@ -554,15 +556,30 @@ if(!sbi_js_exists){
554
//Add the images to the feed
555
$self.find('#sbi_images').append(imagesHTML);
556
sbiAfterImagesLoaded(imagesArr,sbiTransientNames.feed);
557
558
imagesHTML = '';
559
560
//Remove the initial loader
561
- $self.find('.sbi_loader').remove();
562
563
- //Hide the spinner in the load more button
564
- $loadBtn.find('.fa-spinner').hide();
565
- $loadBtn.find('.sbi_btn_text').css('opacity', 1);
566
}
567
568
@@ -621,8 +638,8 @@ if(!sbi_js_exists){
621
//Load More button
622
$self.find('#sbi_load .sbi_load_btn').off().on('click', function(){
623
624
- $loadBtn.find('.fa-spinner').show();
625
- $loadBtn.find('.sbi_btn_text').css('opacity', 0);
626
//Reset the photosAvailable var so it can be used again
627
photosAvailable = 0;
628
@@ -741,8 +758,9 @@ if(!sbi_js_exists){
741
var sbi_num_cols = sbiGetColumnCount($self, parseInt(cols), parseInt(cols));
742
743
//Figure out what the width should be using the number of cols
744
- var sbi_photo_width_manual = ( $self.find('#sbi_images').width() / sbi_num_cols ) - (imagepadding*2);
745
-
746
//If the width is less than it should be then set it manually
747
if( sbi_photo_width <= (sbi_photo_width_manual) ) sbi_photo_width = sbi_photo_width_manual;
748
@@ -849,9 +867,9 @@ if(!sbi_js_exists){
849
850
//Header profile pic hover
851
$self.find('.sb_instagram_header .sbi_header_link').hover(function(){
852
- $self.find('.sb_instagram_header .sbi_header_img_hover').fadeIn(200);
853
}, function(){
854
- $self.find('.sb_instagram_header .sbi_header_img_hover').stop().fadeOut(600);
855
});
856
857
sbSVGify($self.find('.sb_instagram_header'));
387
headersecondarycolor = feedOptions.headersecondarycolor,
388
media = feedOptions.media;
389
390
+ $loadBtn.find('.sbi_loader').css('background-color', $loadBtn.css('color'));
391
+
392
//On first load imagesArr is empty so set it to be the images
393
if(imagesArr == ''){
394
imagesArr = images;
522
var playBtnHtml = item.type === 'video' || videoIsFirstCarouselItemClass ? '<i class="fa fa-play sbi_playbtn"></i>' : '';
523
524
//TEMPLATE:
525
+ imagesHTML += '<div class="sbi_item sbi_type_'+item.type+' sbi_new sbi_transition" id="sbi_'+item.id+'" data-date="'+created_time_raw+'">' +
526
+ '<div class="sbi_photo_wrap">'+
527
+ '<a class="sbi_photo" href="'+item.link+'" target="_blank">' + carouselTypeIcon + playBtnHtml +
528
'<img src="'+data_image+'" alt="'+captionText.replace(/<>/g, " ")+'" width="200" height="200" />' +
529
'</a>' +
530
'</div>' +
556
//Add the images to the feed
557
$self.find('#sbi_images').append(imagesHTML);
558
sbiAfterImagesLoaded(imagesArr,sbiTransientNames.feed);
559
+ //Loop through items and remove class to reveal them
560
+ var time = 10;
561
+ $self.find('.sbi_transition').each(function() {
562
+ var $sbi_item_transition_el = jQuery(this);
563
+
564
+ setTimeout( function(){
565
+ $sbi_item_transition_el.removeClass('sbi_transition');
566
+ }, time)
567
+ time += 10;
568
+ });
569
570
imagesHTML = '';
571
572
//Remove the initial loader
573
+ $self.find('#sbi_images > .sbi_loader').remove();
574
575
+ //Show the Load More button
576
+ $self.find('#sbi_load').removeClass('sbi_hidden');
577
+
578
+ setTimeout(function(){
579
+ //Hide the loader in the load more button
580
+ $loadBtn.find('.sbi_loader').addClass('sbi_hidden');
581
+ $loadBtn.find('.sbi_btn_text').removeClass('sbi_hidden');
582
+ }, 500);
583
}
584
585
638
//Load More button
639
$self.find('#sbi_load .sbi_load_btn').off().on('click', function(){
640
641
+ jQuery(this).find('.sbi_loader').removeClass('sbi_hidden');
642
+ jQuery(this).find('.sbi_btn_text').addClass('sbi_hidden');
643
//Reset the photosAvailable var so it can be used again
644
photosAvailable = 0;
645
758
var sbi_num_cols = sbiGetColumnCount($self, parseInt(cols), parseInt(cols));
759
760
//Figure out what the width should be using the number of cols
761
+ //Figure out what the width should be using the number of cols
762
+ var imagesPadding = jQuery('#sbi_images').innerWidth() - jQuery('#sbi_images').width(),
763
+ sbi_photo_width_manual = ( $self.find('#sbi_images').width() / sbi_num_cols ) - imagesPadding;
764
//If the width is less than it should be then set it manually
765
if( sbi_photo_width <= (sbi_photo_width_manual) ) sbi_photo_width = sbi_photo_width_manual;
766
867
868
//Header profile pic hover
869
$self.find('.sb_instagram_header .sbi_header_link').hover(function(){
870
+ $self.find('.sb_instagram_header .sbi_header_img_hover').addClass('sbi_fade_in');
871
}, function(){
872
+ $self.find('.sb_instagram_header .sbi_header_img_hover').removeClass('sbi_fade_in');
873
});
874
875
sbSVGify($self.find('.sb_instagram_header'));
js/sb-instagram.min.js CHANGED
@@ -1,72 +1,73 @@
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),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;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 'custom':data_image=item.images.standard_resolution.url.replace('640x640/',imgRes.width+'x'+imgRes.width+'/');break;case 'autocustom':var thisImageReplace=sbiGetBestResolutionForCustom(imgRes.width,item.images.standard_resolution.width,item.images.standard_resolution.height)
26
- data_image=item.images.standard_resolution.url.replace('640x640/',thisImageReplace+'x'+thisImageReplace+'/');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" id="sbi_'+item.id+'" data-date="'+created_time_raw+'">'+'<div class="sbi_photo_wrap">'+carouselTypeIcon+playBtnHtml+'<a class="sbi_photo" href="'+item.link+'" target="_blank">'+'<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);imagesHTML='';$self.find('.sbi_loader').remove();$loadBtn.find('.fa-spinner').hide();$loadBtn.find('.sbi_btn_text').css('opacity',1)}
29
- 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()}
30
- $self.find('#sbi_load .sbi_load_btn').off().on('click',function(){$loadBtn.find('.fa-spinner').show();$loadBtn.find('.sbi_btn_text').css('opacity',0);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))}
31
- head.appendChild(style)}();$self.find(".sbi_photo").sbi_imgLiquid({fill:!0})}
32
- 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')==='autocustom'){var oldRes=window.sbiFeedMeta[$i].minRes;var imageSize=sbiGetResolutionSettings($sbiSelf,'autocustom',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_link_area').length?jQuery(this).find('.sbi_link_area').attr('href'):'';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)}}
33
- $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 sbi_photo_width_manual=($self.find('#sbi_images').width()/sbi_num_cols)-(imagepadding*2);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)}}
34
- 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')}}
35
- sbiGetItemSize();if(!feedOptions.disablecache&&typeof _cache!=='undefined'&&window.sbiCacheStatuses[feedOptions.feedIndex].feed==='fetched'){_cache(imagesArr,transientName);window.sbiCacheStatuses[feedOptions.feedIndex].feed='cached'}
36
- photosAvailable='finished';sbSVGify($self)}}
37
- function commaSeparateNumber(val){while(/(\d+)(\d{3})/.test(val.toString())){val=val.toString().replace(/(\d+)(\d{3})/,'$1'+','+'$2')}
38
- return val}
39
- 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}
40
- 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>'}
41
- 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').fadeIn(200)},function(){$self.find('.sb_instagram_header .sbi_header_img_hover').stop().fadeOut(600)});sbSVGify($self.find('.sb_instagram_header'))}
42
- 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])}
43
- 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])}
44
- 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])}
45
- data='error'}}
46
- 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]}
47
- 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+='!'}
48
- 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":""}}
49
- var allImages=returnedImages[0];if(photosAvailable!=='finished')sbiBuildFeed(allImages,transientName,sbiSettings,$self);apiRequests++}}}
50
- 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)}
51
- 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)}
52
- 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}
53
- 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){}})}}
54
- 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)}}}
55
- 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)}}})}}
56
- 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)}
57
- 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)}
58
- return},error:function(xhr,textStatus,e){console.log(e);return}};jQuery.ajax(setCacheOpts)}}
59
- 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}
60
- return sbi_num_cols}
61
- function sbiGetWidthForResType(type){switch(type){case 'thumbnail':return 150;case 'low_resolution':return 320;default:return 640}}
62
- function sbiGetBestResolutionForCustom(colWidth,imageWidth,imageHeight){var aspectRatio=Math.max(1,imageWidth/imageHeight),bestWidth=colWidth*aspectRatio,bestWidthRounded=Math.ceil(bestWidth/10)*10,customSizes=[30,40,50,60,80,90,100,120,130,150,160,180,190,200,240,270,280,320,350,360,390,480,540,600,640,720,750,800,810,960,1280];if(customSizes.indexOf(parseInt(bestWidthRounded))===-1){var done=!1;jQuery.each(customSizes,function(index,item){if(item>parseInt(bestWidthRounded)&&!done){bestWidthRounded=item;done=!0}})}
63
- return bestWidthRounded}
64
- function sbiNeedToRaiseRes(width,oldRes){return(width>oldRes)}
65
- function sbiGetResolutionSettings($self,imgRes,cols,colsmobile,$i){var feedWidth=$self.innerWidth(),photoPadding=parseInt($self.find('#sbi_images').css('padding'))*2,cols=sbiGetColumnCount($self,parseInt(cols),parseInt(colsmobile)),colWidth=($self.innerWidth()/cols)-photoPadding,imgResReturn={'type':'low_resolution','width':''},customSizes=[30,40,50,60,80,90,100,120,130,150,160,180,190,200,240,270,280,320,350,360,390,480,540,600,640,720,750,800,810,960,1280];if(!isNaN(imgRes)){imgResReturn.type='custom';if(customSizes.indexOf(parseInt(imgRes))>-1){imgResReturn.width=imgRes}else{var done=!1;jQuery.each(customSizes,function(index,item){if(item>parseInt(imgRes)&&!done){imgResReturn.width=item;done=!0}})}}else{switch(imgRes){case 'auto':colWidth=feedWidth/cols;var sbiWindowWidth=jQuery(window).width();if(sbiWindowWidth<640&&$self.is('.sbi_mob_col_auto')){if(feedWidth<640&&$self.is('.sbi_col_1'))colWidth=480;if(feedWidth<640&&$self.is('.sbi_col_3, .sbi_col_4, .sbi_col_5, .sbi_col_6'))colWidth=300;if(feedWidth<640&&$self.is('.sbi_col_7, .sbi_col_8, .sbi_col_9, .sbi_col_10'))colWidth=100;if((feedWidth>320&&feedWidth<480)&&sbiWindowWidth<480)colWidth=480;if(feedWidth<320&&sbiWindowWidth<480)colWidth=300}
66
- if(colWidth<150){imgResReturn.type='thumbnail'}else if(colWidth<320){imgResReturn.type='low_resolution'}else{imgResReturn.type='standard_resolution'}
67
- break;case 'autocustom':if(colWidth>960){imgResReturn.type='custom';imgResReturn.width=1280}else if((colWidth>130&&colWidth<=150)||(colWidth>280&&colWidth<=320)||(colWidth>600&&colWidth<=640)){if(colWidth<150){imgResReturn.type='thumbnail';imgResReturn.width=150}else if(colWidth<=320){imgResReturn.type='low_resolution';imgResReturn.width=320}else{imgResReturn.type='standard_resolution';imgResReturn.width=640}}else{imgResReturn.type='autocustom';imgResReturn.width=colWidth}
68
- break;case 'thumb':imgResReturn.type='thumbnail';break;case 'medium':imgResReturn.type='low_resolution';break;default:imgResReturn.type='standard_resolution'}}
69
- if(typeof window.sbiFeedMeta[$i].minRes==='undefined'){window.sbiFeedMeta[$i].minRes=imgResReturn.type==='autocustom'?sbiGetBestResolutionForCustom(colWidth,imgResReturn.width,imgResReturn.width):sbiGetWidthForResType(imgResReturn.type)}
70
- return imgResReturn}
71
- 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)}}
72
- jQuery(document).ready(function(){window.sbiCommentCacheStatus=0;sbi_init(function(imagesArr,transientName){sbi_cache_all(imagesArr,transientName)})})}
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),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 'custom':data_image=item.images.standard_resolution.url.replace('640x640/',imgRes.width+'x'+imgRes.width+'/');break;case 'autocustom':var thisImageReplace=sbiGetBestResolutionForCustom(imgRes.width,item.images.standard_resolution.width,item.images.standard_resolution.height)
26
+ data_image=item.images.standard_resolution.url.replace('640x640/',thisImageReplace+'x'+thisImageReplace+'/');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">'+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');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')==='autocustom'){var oldRes=window.sbiFeedMeta[$i].minRes;var imageSize=sbiGetResolutionSettings($sbiSelf,'autocustom',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_link_area').length?jQuery(this).find('.sbi_link_area').attr('href'):'';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 sbiGetBestResolutionForCustom(colWidth,imageWidth,imageHeight){var aspectRatio=Math.max(1,imageWidth/imageHeight),bestWidth=colWidth*aspectRatio,bestWidthRounded=Math.ceil(bestWidth/10)*10,customSizes=[30,40,50,60,80,90,100,120,130,150,160,180,190,200,240,270,280,320,350,360,390,480,540,600,640,720,750,800,810,960,1280];if(customSizes.indexOf(parseInt(bestWidthRounded))===-1){var done=!1;jQuery.each(customSizes,function(index,item){if(item>parseInt(bestWidthRounded)&&!done){bestWidthRounded=item;done=!0}})}
64
+ return bestWidthRounded}
65
+ function sbiNeedToRaiseRes(width,oldRes){return(width>oldRes)}
66
+ function sbiGetResolutionSettings($self,imgRes,cols,colsmobile,$i){var feedWidth=$self.innerWidth(),photoPadding=parseInt($self.find('#sbi_images').css('padding'))*2,cols=sbiGetColumnCount($self,parseInt(cols),parseInt(colsmobile)),colWidth=($self.innerWidth()/cols)-photoPadding,imgResReturn={'type':'low_resolution','width':''},customSizes=[30,40,50,60,80,90,100,120,130,150,160,180,190,200,240,270,280,320,350,360,390,480,540,600,640,720,750,800,810,960,1280];if(!isNaN(imgRes)){imgResReturn.type='custom';if(customSizes.indexOf(parseInt(imgRes))>-1){imgResReturn.width=imgRes}else{var done=!1;jQuery.each(customSizes,function(index,item){if(item>parseInt(imgRes)&&!done){imgResReturn.width=item;done=!0}})}}else{switch(imgRes){case 'auto':colWidth=feedWidth/cols;var sbiWindowWidth=jQuery(window).width();if(sbiWindowWidth<640&&$self.is('.sbi_mob_col_auto')){if(feedWidth<640&&$self.is('.sbi_col_1'))colWidth=480;if(feedWidth<640&&$self.is('.sbi_col_3, .sbi_col_4, .sbi_col_5, .sbi_col_6'))colWidth=300;if(feedWidth<640&&$self.is('.sbi_col_7, .sbi_col_8, .sbi_col_9, .sbi_col_10'))colWidth=100;if((feedWidth>320&&feedWidth<480)&&sbiWindowWidth<480)colWidth=480;if(feedWidth<320&&sbiWindowWidth<480)colWidth=300}
67
+ if(colWidth<150){imgResReturn.type='thumbnail'}else if(colWidth<320){imgResReturn.type='low_resolution'}else{imgResReturn.type='standard_resolution'}
68
+ break;case 'autocustom':if(colWidth>960){imgResReturn.type='custom';imgResReturn.width=1280}else if((colWidth>130&&colWidth<=150)||(colWidth>280&&colWidth<=320)||(colWidth>600&&colWidth<=640)){if(colWidth<150){imgResReturn.type='thumbnail';imgResReturn.width=150}else if(colWidth<=320){imgResReturn.type='low_resolution';imgResReturn.width=320}else{imgResReturn.type='standard_resolution';imgResReturn.width=640}}else{imgResReturn.type='autocustom';imgResReturn.width=colWidth}
69
+ break;case 'thumb':imgResReturn.type='thumbnail';break;case 'medium':imgResReturn.type='low_resolution';break;default:imgResReturn.type='standard_resolution'}}
70
+ if(typeof window.sbiFeedMeta[$i].minRes==='undefined'){window.sbiFeedMeta[$i].minRes=imgResReturn.type==='autocustom'?sbiGetBestResolutionForCustom(colWidth,imgResReturn.width,imgResReturn.width):sbiGetWidthForResType(imgResReturn.type)}
71
+ return imgResReturn}
72
+ 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)}}
73
+ jQuery(document).ready(function(){window.sbiCommentCacheStatus=0;sbi_init(function(imagesArr,transientName){sbi_cache_all(imagesArr,transientName)})})}