Version Description
- New: When you click on the name of a setting on the plugins Settings pages it now displays the shortcode option for that setting, making it easier to find the option that you need
- New: Added a setting to disable the Font Awesome icon font if needed. This can be found under the Misc tab at the bottom of the Customize page.
- Tweak: Updated the Instagram icon to match their new branding
- Tweak: Added a help link next to the Instagram login button in case there's an issue using it
- Fix: Updated the Font Awesome icon font to the latest version: 4.6.3
Download this release
Release Info
Developer | smashballoon |
Plugin | Instagram Feed |
Version | 1.4.5 |
Comparing to | |
See all releases |
Code changes from version 1.4.4 to 1.4.5
- README.txt +8 -8
- css/sb-instagram-admin.css +41 -10
- css/sb-instagram.css +12 -4
- css/sb-instagram.min.css +1 -1
- img/small-logo.png +0 -0
- instagram-feed-admin.php +57 -67
- instagram-feed.php +8 -3
- js/sb-instagram-admin.js +20 -2
- js/sb-instagram.js +1 -1
- js/sb-instagram.min.js +1 -1
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon
|
|
3 |
Tags: Instagram, Instagram feed, Instagram photos, Instagram plugin, Instagram stream, Custom Instagram Feed, responsive Instagram, mobile Instagram, Instagram posts, Instagram wall, Instagram account, Instagram gallery, Instagram photo, Instagram post, Instagram share, Instagram customized, Instagrams, Instagram feeds, Instagram plugins, Instagram responsive, Instagram mobile feed, Instagram accounts, public Instagram feed, Instagram photography, Instagram galleries, multiple Instagram, Instagram widget, Instagram clean, beautiful Instagram, custom Instagram design
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.5.2
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -554,23 +554,23 @@ Relationship of the Parties: Notwithstanding any provision hereof, for all purpo
|
|
554 |
Invalidity of Specific Terms: If any provision of the Instagram API Terms is found by a court of competent jurisdiction to be invalid, the parties nevertheless agree that the court should endeavor to give effect to the parties' intentions as reflected in the provision and that the other provisions remain in full force and effect.
|
555 |
No Waiver of Rights by Instagram: Instagram's failure to exercise or enforce any right or provision of the Instagram API Terms shall not constitute a waiver of such right or provision.
|
556 |
|
557 |
-
== Upgrade Notice ==
|
558 |
-
|
559 |
-
= 1.4.3 =
|
560 |
-
**Important:** Due to the upcoming Instagram API changes, in order for the Instagram Feed plugin to continue working after **June 1st** you must update the plugin and obtain a new Access Token on the plugin's Settings page.
|
561 |
-
|
562 |
== Changelog ==
|
563 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
564 |
= 1.4.4 =
|
565 |
* Fix: Fixed an issue caused by a specific type of emoji which would cause the feed to break when used in a post
|
566 |
* Tweak: Added links to our other **free** plugins to the bottom of the admin pages: [The Custom Facebook Feed](https://wordpress.org/plugins/custom-facebook-feed/) and [Custom Twitter Feeds](https://wordpress.org/plugins/custom-twitter-feeds/)
|
567 |
-
* **Reminder: If you haven't done so already, please update your Access Token on the plugin's Settings page so that the plugin will continue to work after June 1st.**
|
568 |
|
569 |
= 1.4.3 =
|
570 |
* Fix: Important notice added in the last update is now only visible to admins
|
571 |
|
572 |
= 1.4.2 =
|
573 |
-
* **IMPORTANT: Due to the upcoming Instagram API changes, in order for the Instagram Feed plugin to continue working after June 1st you must obtain a new Access Token by using the Instagram button on the plugin's Settings page.**
|
574 |
* New: Compatible with Instagram's new API changes effective June 1st
|
575 |
* New: Added video icons to Instagram posts in the feed which contain videos
|
576 |
* New: Added a setting to allow you to use a fixed pixel width for the feed on desktop but switch to a 100% width responsive layout on mobile
|
3 |
Tags: Instagram, Instagram feed, Instagram photos, Instagram plugin, Instagram stream, Custom Instagram Feed, responsive Instagram, mobile Instagram, Instagram posts, Instagram wall, Instagram account, Instagram gallery, Instagram photo, Instagram post, Instagram share, Instagram customized, Instagrams, Instagram feeds, Instagram plugins, Instagram responsive, Instagram mobile feed, Instagram accounts, public Instagram feed, Instagram photography, Instagram galleries, multiple Instagram, Instagram widget, Instagram clean, beautiful Instagram, custom Instagram design
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.5.2
|
6 |
+
Stable tag: 1.4.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
554 |
Invalidity of Specific Terms: If any provision of the Instagram API Terms is found by a court of competent jurisdiction to be invalid, the parties nevertheless agree that the court should endeavor to give effect to the parties' intentions as reflected in the provision and that the other provisions remain in full force and effect.
|
555 |
No Waiver of Rights by Instagram: Instagram's failure to exercise or enforce any right or provision of the Instagram API Terms shall not constitute a waiver of such right or provision.
|
556 |
|
|
|
|
|
|
|
|
|
|
|
557 |
== Changelog ==
|
558 |
|
559 |
+
= 1.4.5 =
|
560 |
+
* New: When you click on the name of a setting on the plugin’s Settings pages it now displays the shortcode option for that setting, making it easier to find the option that you need
|
561 |
+
* New: Added a setting to disable the Font Awesome icon font if needed. This can be found under the Misc tab at the bottom of the Customize page.
|
562 |
+
* Tweak: Updated the Instagram icon to match their new branding
|
563 |
+
* Tweak: Added a help link next to the Instagram login button in case there's an issue using it
|
564 |
+
* Fix: Updated the Font Awesome icon font to the latest version: 4.6.3
|
565 |
+
|
566 |
= 1.4.4 =
|
567 |
* Fix: Fixed an issue caused by a specific type of emoji which would cause the feed to break when used in a post
|
568 |
* Tweak: Added links to our other **free** plugins to the bottom of the admin pages: [The Custom Facebook Feed](https://wordpress.org/plugins/custom-facebook-feed/) and [Custom Twitter Feeds](https://wordpress.org/plugins/custom-twitter-feeds/)
|
|
|
569 |
|
570 |
= 1.4.3 =
|
571 |
* Fix: Important notice added in the last update is now only visible to admins
|
572 |
|
573 |
= 1.4.2 =
|
|
|
574 |
* New: Compatible with Instagram's new API changes effective June 1st
|
575 |
* New: Added video icons to Instagram posts in the feed which contain videos
|
576 |
* New: Added a setting to allow you to use a fixed pixel width for the feed on desktop but switch to a 100% width responsive layout on mobile
|
css/sb-instagram-admin.css
CHANGED
@@ -46,28 +46,32 @@
|
|
46 |
display: block;
|
47 |
float: left;
|
48 |
clear: both;
|
49 |
-
padding: 0 21px 0
|
50 |
height: 47px;
|
51 |
line-height: 47px;
|
52 |
|
53 |
background: #386793 url('../img/small-logo.png') no-repeat 16px 11px;
|
54 |
-
background: -moz-linear-gradient(top, #3f6a91 0%, #2e6191 100%) url('../img/small-logo.png') no-repeat 16px 11px;
|
55 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3f6a91), color-stop(100%,#2e6191)) url('../img/small-logo.png') no-repeat 16px 11px;
|
56 |
-
background: -webkit-linear-gradient(top, #3f6a91 0%,#2e6191 100%) url('../img/small-logo.png') no-repeat 16px 11px;
|
57 |
-
background: -o-linear-gradient(top, #3f6a91 0%,#2e6191 100%) url('../img/small-logo.png') no-repeat 16px 11px;
|
58 |
-
background: -ms-linear-gradient(top, #3f6a91 0%,#2e6191 100%) url('../img/small-logo.png') no-repeat 16px 11px;
|
59 |
-
background: linear-gradient(to bottom, #3f6a91 0%,#2e6191 100%) url('../img/small-logo.png') no-repeat 16px 11px;
|
60 |
|
61 |
color: #e9eef3;
|
62 |
text-decoration: none;
|
63 |
|
64 |
-moz-border-radius: 5px;
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
#sbi_admin .sbi_admin_btn:hover{
|
69 |
-
background-color: #
|
70 |
color: #fff;
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
#sbi_admin .sbi_note{
|
73 |
font-size: 12px;
|
@@ -209,6 +213,33 @@
|
|
209 |
top: -2px;
|
210 |
}
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
/* Error notice */
|
214 |
#sbi_admin .sbi_notice{
|
46 |
display: block;
|
47 |
float: left;
|
48 |
clear: both;
|
49 |
+
padding: 0 21px 0 160px;
|
50 |
height: 47px;
|
51 |
line-height: 47px;
|
52 |
|
53 |
background: #386793 url('../img/small-logo.png') no-repeat 16px 11px;
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
color: #e9eef3;
|
56 |
text-decoration: none;
|
57 |
|
58 |
-moz-border-radius: 5px;
|
59 |
+
-webkit-border-radius: 5px;
|
60 |
+
border-radius: 5px;
|
61 |
+
|
62 |
+
-moz-transition: all 0.5s ease-in-out;
|
63 |
+
-webkit-transition: all 0.5s ease-in-out;
|
64 |
+
-o-transition: all 0.5s ease-in-out;
|
65 |
+
transition: all 0.5s ease-in-out;
|
66 |
}
|
67 |
#sbi_admin .sbi_admin_btn:hover{
|
68 |
+
background-color: #3880c4;
|
69 |
color: #fff;
|
70 |
+
|
71 |
+
-moz-transition: all 0.1s ease-in-out;
|
72 |
+
-webkit-transition: all 0.1s ease-in-out;
|
73 |
+
-o-transition: all 0.1s ease-in-out;
|
74 |
+
transition: all 0.1s ease-in-out;
|
75 |
}
|
76 |
#sbi_admin .sbi_note{
|
77 |
font-size: 12px;
|
213 |
top: -2px;
|
214 |
}
|
215 |
|
216 |
+
/* Shortcode labels */
|
217 |
+
#sbi_admin label{
|
218 |
+
position: relative;
|
219 |
+
}
|
220 |
+
#sbi_admin th{
|
221 |
+
position: relative;
|
222 |
+
}
|
223 |
+
#sbi_admin .sbi_shortcode{
|
224 |
+
display: none;
|
225 |
+
position: absolute;
|
226 |
+
z-index: 10;
|
227 |
+
font-size: 11px;
|
228 |
+
float: left;
|
229 |
+
width: auto;
|
230 |
+
white-space: pre-line;
|
231 |
+
line-height: 1.4;
|
232 |
+
}
|
233 |
+
#sbi_admin .sbi_shortcode_symbol{
|
234 |
+
position: absolute;
|
235 |
+
right: -24px;
|
236 |
+
bottom: 0px;
|
237 |
+
padding: 2px 4px 3px 3px;
|
238 |
+
width: auto;
|
239 |
+
font-size: 11px;
|
240 |
+
margin-left: 5px;
|
241 |
+
}
|
242 |
+
|
243 |
|
244 |
/* Error notice */
|
245 |
#sbi_admin .sbi_notice{
|
css/sb-instagram.css
CHANGED
@@ -200,6 +200,10 @@
|
|
200 |
margin: 0 !important;
|
201 |
padding: 0 !important;
|
202 |
border: none !important;
|
|
|
|
|
|
|
|
|
203 |
}
|
204 |
/* Profile pic hover */
|
205 |
#sb_instagram .sbi_header_img_hover{
|
@@ -225,12 +229,16 @@
|
|
225 |
#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
|
226 |
opacity: 1;
|
227 |
}
|
228 |
-
#sb_instagram .sbi_header_img_hover
|
229 |
position: absolute;
|
230 |
top: 50%;
|
231 |
-
|
232 |
-
margin-
|
233 |
-
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
/* Header text */
|
236 |
#sb_instagram .sbi_header_text{
|
200 |
margin: 0 !important;
|
201 |
padding: 0 !important;
|
202 |
border: none !important;
|
203 |
+
|
204 |
+
-moz-border-radius: 40px;
|
205 |
+
-webkit-border-radius: 40px;
|
206 |
+
border-radius: 40px;
|
207 |
}
|
208 |
/* Profile pic hover */
|
209 |
#sb_instagram .sbi_header_img_hover{
|
229 |
#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{
|
230 |
opacity: 1;
|
231 |
}
|
232 |
+
#sb_instagram .sbi_header_img_hover i{
|
233 |
position: absolute;
|
234 |
top: 50%;
|
235 |
+
left: 50%;
|
236 |
+
margin-top: -12px;
|
237 |
+
margin-left: -12px;
|
238 |
+
width: 24px;
|
239 |
+
height: 24px;
|
240 |
+
overflow: hidden;
|
241 |
+
background: url('../img/small-logo.png') no-repeat 0 0;
|
242 |
}
|
243 |
/* Header text */
|
244 |
#sb_instagram .sbi_header_text{
|
css/sb-instagram.min.css
CHANGED
@@ -1 +1 @@
|
|
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;-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;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: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 .sbi_type_video .sbi_playbtn{display:block!important;position:absolute;z-index:0;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px;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_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;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;min-width:100%\9;text-decoration:none}#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}#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_img_hover
|
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;-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;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: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 .sbi_type_video .sbi_playbtn{display:block!important;position:absolute;z-index:0;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px;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_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;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;min-width:100%\9;text-decoration:none}#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 .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_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 .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}#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}#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:#517fa4;color:#fff}#sb_instagram #sbi_load .sbi_load_btn:focus,#sb_instagram #sbi_load .sbi_load_btn:hover,#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{filter:alpha(opacity=85);opacity:.85}#sb_instagram #sbi_load .fa,#sb_instagram .sbi_follow_btn .fa{margin-bottom:-1px;margin-right:7px;font-size:15px}#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_playbtn{font-size:23px;margin-top:-12px;margin-left:-9px}#sb_instagram.sbi_small .sbi_playbtn{font-size:18px;margin-top:-9px;margin-left:-7px}@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/small-logo.png
CHANGED
Binary file
|
instagram-feed-admin.php
CHANGED
@@ -60,6 +60,7 @@ function sb_instagram_settings_page() {
|
|
60 |
//Misc
|
61 |
'sb_instagram_custom_css' => '',
|
62 |
'sb_instagram_custom_js' => '',
|
|
|
63 |
);
|
64 |
//Save defaults in an array
|
65 |
$options = wp_parse_args(get_option('sb_instagram_settings'), $sb_instagram_settings_defaults);
|
@@ -98,6 +99,7 @@ function sb_instagram_settings_page() {
|
|
98 |
//Misc
|
99 |
$sb_instagram_custom_css = $options[ 'sb_instagram_custom_css' ];
|
100 |
$sb_instagram_custom_js = $options[ 'sb_instagram_custom_js' ];
|
|
|
101 |
|
102 |
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
|
103 |
if( isset($_POST[ $sb_instagram_settings_hidden_field ]) && $_POST[ $sb_instagram_settings_hidden_field ] == 'Y' ) {
|
@@ -145,7 +147,7 @@ function sb_instagram_settings_page() {
|
|
145 |
//Misc
|
146 |
$sb_instagram_custom_css = $_POST[ 'sb_instagram_custom_css' ];
|
147 |
$sb_instagram_custom_js = $_POST[ 'sb_instagram_custom_js' ];
|
148 |
-
|
149 |
|
150 |
$options[ 'sb_instagram_width' ] = $sb_instagram_width;
|
151 |
$options[ 'sb_instagram_width_unit' ] = $sb_instagram_width_unit;
|
@@ -175,6 +177,7 @@ function sb_instagram_settings_page() {
|
|
175 |
//Misc
|
176 |
$options[ 'sb_instagram_custom_css' ] = $sb_instagram_custom_css;
|
177 |
$options[ 'sb_instagram_custom_js' ] = $sb_instagram_custom_js;
|
|
|
178 |
|
179 |
} //End customize tab post
|
180 |
|
@@ -213,8 +216,7 @@ function sb_instagram_settings_page() {
|
|
213 |
<div id="sbi_config">
|
214 |
<!-- <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> -->
|
215 |
<a href="https://instagram.com/oauth/authorize/?client_id=3a81a9fa2a064751b8c31385b91cc25c&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>
|
216 |
-
|
217 |
-
|
218 |
</div>
|
219 |
|
220 |
<tr valign="top">
|
@@ -227,9 +229,9 @@ function sb_instagram_settings_page() {
|
|
227 |
</tr>
|
228 |
|
229 |
<tr valign="top">
|
230 |
-
<th scope="row"><label><?php _e('Show Photos From:', 'instagram-feed');
|
231 |
-
|
232 |
-
</
|
233 |
<td>
|
234 |
<span>
|
235 |
<?php $sb_instagram_type = 'user'; ?>
|
@@ -319,7 +321,8 @@ function sb_instagram_settings_page() {
|
|
319 |
<table class="form-table">
|
320 |
<tbody>
|
321 |
<tr valign="top">
|
322 |
-
<th scope="row"><label><?php _e('Width of Feed', 'instagram-feed'); ?></label
|
|
|
323 |
<td>
|
324 |
<input name="sb_instagram_width" type="text" value="<?php esc_attr_e( $sb_instagram_width, 'instagram-feed' ); ?>" id="sb_instagram_width" size="4" />
|
325 |
<select name="sb_instagram_width_unit" id="sb_instagram_width_unit">
|
@@ -334,7 +337,8 @@ function sb_instagram_settings_page() {
|
|
334 |
</td>
|
335 |
</tr>
|
336 |
<tr valign="top">
|
337 |
-
<th scope="row"><label><?php _e('Height of Feed', 'instagram-feed'); ?></label
|
|
|
338 |
<td>
|
339 |
<input name="sb_instagram_height" type="text" value="<?php esc_attr_e( $sb_instagram_height, 'instagram-feed' ); ?>" size="4" />
|
340 |
<select name="sb_instagram_height_unit">
|
@@ -344,7 +348,8 @@ function sb_instagram_settings_page() {
|
|
344 |
</td>
|
345 |
</tr>
|
346 |
<tr valign="top">
|
347 |
-
<th scope="row"><label><?php _e('Background Color', 'instagram-feed'); ?></label
|
|
|
348 |
<td>
|
349 |
<input name="sb_instagram_background" type="text" value="<?php esc_attr_e( $sb_instagram_background, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
350 |
</td>
|
@@ -358,7 +363,8 @@ function sb_instagram_settings_page() {
|
|
358 |
<table class="form-table">
|
359 |
<tbody>
|
360 |
<tr valign="top">
|
361 |
-
<th scope="row"><label><?php _e('Sort Photos By', 'instagram-feed'); ?></label
|
|
|
362 |
<td>
|
363 |
<select name="sb_instagram_sort">
|
364 |
<option value="none" <?php if($sb_instagram_sort == "none") echo 'selected="selected"' ?> ><?php _e('Newest to oldest', 'instagram-feed'); ?></option>
|
@@ -379,7 +385,8 @@ function sb_instagram_settings_page() {
|
|
379 |
</td>
|
380 |
</tr>
|
381 |
<tr valign="top">
|
382 |
-
<th scope="row"><label><?php _e('Number of Photos', 'instagram-feed'); ?></label
|
|
|
383 |
<td>
|
384 |
<input name="sb_instagram_num" type="text" value="<?php esc_attr_e( $sb_instagram_num, 'instagram-feed' ); ?>" size="4" />
|
385 |
<span class="sbi_note"><?php _e('Number of photos to show initially. Maximum of 33.', 'instagram-feed'); ?></span>
|
@@ -388,7 +395,8 @@ function sb_instagram_settings_page() {
|
|
388 |
</td>
|
389 |
</tr>
|
390 |
<tr valign="top">
|
391 |
-
<th scope="row"><label><?php _e('Number of Columns', 'instagram-feed'); ?></label
|
|
|
392 |
<td>
|
393 |
|
394 |
<select name="sb_instagram_cols">
|
@@ -407,7 +415,8 @@ function sb_instagram_settings_page() {
|
|
407 |
</td>
|
408 |
</tr>
|
409 |
<tr valign="top">
|
410 |
-
<th scope="row"><label><?php _e('Image Resolution', 'instagram-feed'); ?></label
|
|
|
411 |
<td>
|
412 |
|
413 |
<select name="sb_instagram_image_res">
|
@@ -423,7 +432,7 @@ function sb_instagram_settings_page() {
|
|
423 |
</td>
|
424 |
</tr>
|
425 |
<tr valign="top">
|
426 |
-
<th scope="row"><label><?php _e('Padding around Images', 'instagram-feed'); ?></label></th>
|
427 |
<td>
|
428 |
<input name="sb_instagram_image_padding" type="text" value="<?php esc_attr_e( $sb_instagram_image_padding, 'instagram-feed' ); ?>" size="4" />
|
429 |
<select name="sb_instagram_image_padding_unit">
|
@@ -434,7 +443,8 @@ function sb_instagram_settings_page() {
|
|
434 |
</tr>
|
435 |
|
436 |
<tr valign="top">
|
437 |
-
<th scope="row"><label><?php _e("Disable mobile layout", 'instagram-feed'); ?></label
|
|
|
438 |
<td>
|
439 |
<input type="checkbox" name="sb_instagram_disable_mobile" id="sb_instagram_disable_mobile" <?php if($sb_instagram_disable_mobile == true) echo 'checked="checked"' ?> />
|
440 |
<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What does this mean?", 'instagram-feed'); ?></a>
|
@@ -455,13 +465,15 @@ function sb_instagram_settings_page() {
|
|
455 |
<table class="form-table">
|
456 |
<tbody>
|
457 |
<tr valign="top">
|
458 |
-
<th scope="row"><label><?php _e("Show the Header", 'instagram-feed'); ?></label
|
|
|
459 |
<td>
|
460 |
<input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header" <?php if($sb_instagram_show_header == true) echo 'checked="checked"' ?> />
|
461 |
</td>
|
462 |
</tr>
|
463 |
<tr valign="top">
|
464 |
-
<th scope="row"><label><?php _e('Header Text Color', 'instagram-feed'); ?></label
|
|
|
465 |
<td>
|
466 |
<input name="sb_instagram_header_color" type="text" value="<?php esc_attr_e( $sb_instagram_header_color, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
467 |
</td>
|
@@ -482,25 +494,29 @@ function sb_instagram_settings_page() {
|
|
482 |
<table class="form-table">
|
483 |
<tbody>
|
484 |
<tr valign="top">
|
485 |
-
<th scope="row"><label><?php _e("Show the 'Load More' button", 'instagram-feed'); ?></label
|
|
|
486 |
<td>
|
487 |
<input type="checkbox" name="sb_instagram_show_btn" id="sb_instagram_show_btn" <?php if($sb_instagram_show_btn == true) echo 'checked="checked"' ?> />
|
488 |
</td>
|
489 |
</tr>
|
490 |
<tr valign="top">
|
491 |
-
<th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label
|
|
|
492 |
<td>
|
493 |
<input name="sb_instagram_btn_background" type="text" value="<?php esc_attr_e( $sb_instagram_btn_background, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
494 |
</td>
|
495 |
</tr>
|
496 |
<tr valign="top">
|
497 |
-
<th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label
|
|
|
498 |
<td>
|
499 |
<input name="sb_instagram_btn_text_color" type="text" value="<?php esc_attr_e( $sb_instagram_btn_text_color, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
500 |
</td>
|
501 |
</tr>
|
502 |
<tr valign="top">
|
503 |
-
<th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label
|
|
|
504 |
<td>
|
505 |
<input name="sb_instagram_btn_text" type="text" value="<?php esc_attr_e( $sb_instagram_btn_text, 'instagram-feed' ); ?>" size="20" />
|
506 |
</td>
|
@@ -511,11 +527,12 @@ function sb_instagram_settings_page() {
|
|
511 |
<?php submit_button(); ?>
|
512 |
|
513 |
<hr id="follow" />
|
514 |
-
<h3><?php _e("'Follow
|
515 |
<table class="form-table">
|
516 |
<tbody>
|
517 |
<tr valign="top">
|
518 |
-
<th scope="row"><label><?php _e("Show the Follow button", 'instagram-feed'); ?></label
|
|
|
519 |
<td>
|
520 |
<input type="checkbox" name="sb_instagram_show_follow_btn" id="sb_instagram_show_follow_btn" <?php if($sb_instagram_show_follow_btn == true) echo 'checked="checked"' ?> />
|
521 |
</td>
|
@@ -532,19 +549,22 @@ function sb_instagram_settings_page() {
|
|
532 |
</tr> -->
|
533 |
|
534 |
<tr valign="top">
|
535 |
-
<th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label
|
|
|
536 |
<td>
|
537 |
<input name="sb_instagram_folow_btn_background" type="text" value="<?php esc_attr_e( $sb_instagram_folow_btn_background, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
538 |
</td>
|
539 |
</tr>
|
540 |
<tr valign="top">
|
541 |
-
<th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label
|
|
|
542 |
<td>
|
543 |
<input name="sb_instagram_follow_btn_text_color" type="text" value="<?php esc_attr_e( $sb_instagram_follow_btn_text_color, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
544 |
</td>
|
545 |
</tr>
|
546 |
<tr valign="top">
|
547 |
-
<th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label
|
|
|
548 |
<td>
|
549 |
<input name="sb_instagram_follow_btn_text" type="text" value="<?php esc_attr_e( $sb_instagram_follow_btn_text, 'instagram-feed' ); ?>" size="30" />
|
550 |
</td>
|
@@ -644,6 +664,16 @@ function sb_instagram_settings_page() {
|
|
644 |
</tr>
|
645 |
</tbody>
|
646 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
647 |
|
648 |
<?php submit_button(); ?>
|
649 |
|
@@ -1039,7 +1069,7 @@ while (list($key, $val) = each($sbi_options)) {
|
|
1039 |
|
1040 |
function sb_instagram_admin_style() {
|
1041 |
wp_register_style( 'sb_instagram_admin_css', plugins_url('css/sb-instagram-admin.css', __FILE__), array(), SBIVER );
|
1042 |
-
wp_enqueue_style( 'sb_instagram_font_awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.
|
1043 |
wp_enqueue_style( 'sb_instagram_admin_css' );
|
1044 |
wp_enqueue_style( 'wp-color-picker' );
|
1045 |
}
|
@@ -1078,44 +1108,4 @@ function sbi_add_settings_link( $links, $file ) {
|
|
1078 |
return $links;
|
1079 |
}
|
1080 |
|
1081 |
-
|
1082 |
-
/* Display a notice that can be dismissed regarding updating the Instagram Access Token */
|
1083 |
-
add_action('admin_notices', 'sbi_new_token_notice');
|
1084 |
-
function sbi_new_token_notice() {
|
1085 |
-
|
1086 |
-
//Only show to admins
|
1087 |
-
if( current_user_can('manage_options') ){
|
1088 |
-
|
1089 |
-
global $current_user;
|
1090 |
-
$user_id = $current_user->ID;
|
1091 |
-
|
1092 |
-
// Use this to show notice again
|
1093 |
-
// delete_user_meta($user_id, 'sb_instagram_ignore_notice');
|
1094 |
-
|
1095 |
-
/* Check that the user hasn't already clicked to ignore the message */
|
1096 |
-
if ( ! get_user_meta($user_id, 'sb_instagram_ignore_notice') ) {
|
1097 |
-
|
1098 |
-
_e("
|
1099 |
-
<div class='sb_instagram_notice'>
|
1100 |
-
<p class='sb_instagram_notice_title'><i class='fa fa-exclamation-circle' aria-hidden='true'></i> <b>Important</b></p>
|
1101 |
-
<p><b>Just installed the plugin?</b> You can ignore this notice and hide it using the 'Dismiss' button in the top right corner.</p>
|
1102 |
-
<p><b>Just updated the plugin?</b> Due to the upcoming Instagram API changes, in order for the Instagram Feed plugin to continue working after <b><u>June 1st</u></b> you must obtain a new Access Token by using the Instagram button on the plugin's <a href='".get_admin_url()."admin.php?page=sb-instagram-feed'>Settings page</a>.</p>
|
1103 |
-
<a class='sb_instagram_dismiss' href='" .esc_url( add_query_arg( 'sb_instagram_token_nag_ignore', '0' ) ). "'><i class='fa fa-times-circle' aria-hidden='true'></i> Dismiss</a>
|
1104 |
-
</div>
|
1105 |
-
");
|
1106 |
-
|
1107 |
-
}
|
1108 |
-
|
1109 |
-
}
|
1110 |
-
|
1111 |
-
}
|
1112 |
-
add_action('admin_init', 'sb_instagram_token_nag_ignore');
|
1113 |
-
function sb_instagram_token_nag_ignore() {
|
1114 |
-
global $current_user;
|
1115 |
-
$user_id = $current_user->ID;
|
1116 |
-
if ( isset($_GET['sb_instagram_token_nag_ignore']) && '0' == $_GET['sb_instagram_token_nag_ignore'] ) {
|
1117 |
-
add_user_meta($user_id, 'sb_instagram_ignore_notice', 'true', true);
|
1118 |
-
}
|
1119 |
-
}
|
1120 |
-
|
1121 |
?>
|
60 |
//Misc
|
61 |
'sb_instagram_custom_css' => '',
|
62 |
'sb_instagram_custom_js' => '',
|
63 |
+
'sb_instagram_disable_awesome' => false
|
64 |
);
|
65 |
//Save defaults in an array
|
66 |
$options = wp_parse_args(get_option('sb_instagram_settings'), $sb_instagram_settings_defaults);
|
99 |
//Misc
|
100 |
$sb_instagram_custom_css = $options[ 'sb_instagram_custom_css' ];
|
101 |
$sb_instagram_custom_js = $options[ 'sb_instagram_custom_js' ];
|
102 |
+
$sb_instagram_disable_awesome = $options[ 'sb_instagram_disable_awesome' ];
|
103 |
|
104 |
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
|
105 |
if( isset($_POST[ $sb_instagram_settings_hidden_field ]) && $_POST[ $sb_instagram_settings_hidden_field ] == 'Y' ) {
|
147 |
//Misc
|
148 |
$sb_instagram_custom_css = $_POST[ 'sb_instagram_custom_css' ];
|
149 |
$sb_instagram_custom_js = $_POST[ 'sb_instagram_custom_js' ];
|
150 |
+
isset($_POST[ 'sb_instagram_disable_awesome' ]) ? $sb_instagram_disable_awesome = $_POST[ 'sb_instagram_disable_awesome' ] : $sb_instagram_disable_awesome = '';
|
151 |
|
152 |
$options[ 'sb_instagram_width' ] = $sb_instagram_width;
|
153 |
$options[ 'sb_instagram_width_unit' ] = $sb_instagram_width_unit;
|
177 |
//Misc
|
178 |
$options[ 'sb_instagram_custom_css' ] = $sb_instagram_custom_css;
|
179 |
$options[ 'sb_instagram_custom_js' ] = $sb_instagram_custom_js;
|
180 |
+
$options[ 'sb_instagram_disable_awesome' ] = $sb_instagram_disable_awesome;
|
181 |
|
182 |
} //End customize tab post
|
183 |
|
216 |
<div id="sbi_config">
|
217 |
<!-- <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> -->
|
218 |
<a href="https://instagram.com/oauth/authorize/?client_id=3a81a9fa2a064751b8c31385b91cc25c&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>
|
219 |
+
<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>
|
|
|
220 |
</div>
|
221 |
|
222 |
<tr valign="top">
|
229 |
</tr>
|
230 |
|
231 |
<tr valign="top">
|
232 |
+
<th scope="row"><label><?php _e('Show Photos From:', 'instagram-feed'); ?></label><code class="sbi_shortcode"> type
|
233 |
+
Eg: type=user id=12986477
|
234 |
+
</code></th>
|
235 |
<td>
|
236 |
<span>
|
237 |
<?php $sb_instagram_type = 'user'; ?>
|
321 |
<table class="form-table">
|
322 |
<tbody>
|
323 |
<tr valign="top">
|
324 |
+
<th scope="row"><label><?php _e('Width of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> width widthunit
|
325 |
+
Eg: width=50 widthunit=%</code></th>
|
326 |
<td>
|
327 |
<input name="sb_instagram_width" type="text" value="<?php esc_attr_e( $sb_instagram_width, 'instagram-feed' ); ?>" id="sb_instagram_width" size="4" />
|
328 |
<select name="sb_instagram_width_unit" id="sb_instagram_width_unit">
|
337 |
</td>
|
338 |
</tr>
|
339 |
<tr valign="top">
|
340 |
+
<th scope="row"><label><?php _e('Height of Feed', 'instagram-feed'); ?></label><code class="sbi_shortcode"> height heightunit
|
341 |
+
Eg: height=500 heightunit=px</code></th>
|
342 |
<td>
|
343 |
<input name="sb_instagram_height" type="text" value="<?php esc_attr_e( $sb_instagram_height, 'instagram-feed' ); ?>" size="4" />
|
344 |
<select name="sb_instagram_height_unit">
|
348 |
</td>
|
349 |
</tr>
|
350 |
<tr valign="top">
|
351 |
+
<th scope="row"><label><?php _e('Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> background
|
352 |
+
Eg: background=d89531</code></th>
|
353 |
<td>
|
354 |
<input name="sb_instagram_background" type="text" value="<?php esc_attr_e( $sb_instagram_background, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
355 |
</td>
|
363 |
<table class="form-table">
|
364 |
<tbody>
|
365 |
<tr valign="top">
|
366 |
+
<th scope="row"><label><?php _e('Sort Photos By', 'instagram-feed'); ?></label><code class="sbi_shortcode"> sortby
|
367 |
+
Eg: sortby=random</code></th>
|
368 |
<td>
|
369 |
<select name="sb_instagram_sort">
|
370 |
<option value="none" <?php if($sb_instagram_sort == "none") echo 'selected="selected"' ?> ><?php _e('Newest to oldest', 'instagram-feed'); ?></option>
|
385 |
</td>
|
386 |
</tr>
|
387 |
<tr valign="top">
|
388 |
+
<th scope="row"><label><?php _e('Number of Photos', 'instagram-feed'); ?></label><code class="sbi_shortcode"> num
|
389 |
+
Eg: num=6</code></th>
|
390 |
<td>
|
391 |
<input name="sb_instagram_num" type="text" value="<?php esc_attr_e( $sb_instagram_num, 'instagram-feed' ); ?>" size="4" />
|
392 |
<span class="sbi_note"><?php _e('Number of photos to show initially. Maximum of 33.', 'instagram-feed'); ?></span>
|
395 |
</td>
|
396 |
</tr>
|
397 |
<tr valign="top">
|
398 |
+
<th scope="row"><label><?php _e('Number of Columns', 'instagram-feed'); ?></label><code class="sbi_shortcode"> cols
|
399 |
+
Eg: cols=3</code></th>
|
400 |
<td>
|
401 |
|
402 |
<select name="sb_instagram_cols">
|
415 |
</td>
|
416 |
</tr>
|
417 |
<tr valign="top">
|
418 |
+
<th scope="row"><label><?php _e('Image Resolution', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imageres
|
419 |
+
Eg: imageres=thumb</code></th>
|
420 |
<td>
|
421 |
|
422 |
<select name="sb_instagram_image_res">
|
432 |
</td>
|
433 |
</tr>
|
434 |
<tr valign="top">
|
435 |
+
<th scope="row"><label><?php _e('Padding around Images', 'instagram-feed'); ?></label><code class="sbi_shortcode"> imagepadding imagepaddingunit</code></th>
|
436 |
<td>
|
437 |
<input name="sb_instagram_image_padding" type="text" value="<?php esc_attr_e( $sb_instagram_image_padding, 'instagram-feed' ); ?>" size="4" />
|
438 |
<select name="sb_instagram_image_padding_unit">
|
443 |
</tr>
|
444 |
|
445 |
<tr valign="top">
|
446 |
+
<th scope="row"><label><?php _e("Disable mobile layout", 'instagram-feed'); ?></label><code class="sbi_shortcode"> disablemobile
|
447 |
+
Eg: disablemobile=true</code></th>
|
448 |
<td>
|
449 |
<input type="checkbox" name="sb_instagram_disable_mobile" id="sb_instagram_disable_mobile" <?php if($sb_instagram_disable_mobile == true) echo 'checked="checked"' ?> />
|
450 |
<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e("What does this mean?", 'instagram-feed'); ?></a>
|
465 |
<table class="form-table">
|
466 |
<tbody>
|
467 |
<tr valign="top">
|
468 |
+
<th scope="row"><label><?php _e("Show the Header", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showheader
|
469 |
+
Eg: showheader=false</code></th>
|
470 |
<td>
|
471 |
<input type="checkbox" name="sb_instagram_show_header" id="sb_instagram_show_header" <?php if($sb_instagram_show_header == true) echo 'checked="checked"' ?> />
|
472 |
</td>
|
473 |
</tr>
|
474 |
<tr valign="top">
|
475 |
+
<th scope="row"><label><?php _e('Header Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> headercolor
|
476 |
+
Eg: headercolor=fff</code></th>
|
477 |
<td>
|
478 |
<input name="sb_instagram_header_color" type="text" value="<?php esc_attr_e( $sb_instagram_header_color, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
479 |
</td>
|
494 |
<table class="form-table">
|
495 |
<tbody>
|
496 |
<tr valign="top">
|
497 |
+
<th scope="row"><label><?php _e("Show the 'Load More' button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showbutton
|
498 |
+
Eg: showbutton=false</code></th>
|
499 |
<td>
|
500 |
<input type="checkbox" name="sb_instagram_show_btn" id="sb_instagram_show_btn" <?php if($sb_instagram_show_btn == true) echo 'checked="checked"' ?> />
|
501 |
</td>
|
502 |
</tr>
|
503 |
<tr valign="top">
|
504 |
+
<th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttoncolor
|
505 |
+
Eg: buttoncolor=8224e3</code></th>
|
506 |
<td>
|
507 |
<input name="sb_instagram_btn_background" type="text" value="<?php esc_attr_e( $sb_instagram_btn_background, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
508 |
</td>
|
509 |
</tr>
|
510 |
<tr valign="top">
|
511 |
+
<th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontextcolor
|
512 |
+
Eg: buttontextcolor=eeee22</code></th>
|
513 |
<td>
|
514 |
<input name="sb_instagram_btn_text_color" type="text" value="<?php esc_attr_e( $sb_instagram_btn_text_color, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
515 |
</td>
|
516 |
</tr>
|
517 |
<tr valign="top">
|
518 |
+
<th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> buttontext
|
519 |
+
Eg: buttontext="Show more.."</code></th>
|
520 |
<td>
|
521 |
<input name="sb_instagram_btn_text" type="text" value="<?php esc_attr_e( $sb_instagram_btn_text, 'instagram-feed' ); ?>" size="20" />
|
522 |
</td>
|
527 |
<?php submit_button(); ?>
|
528 |
|
529 |
<hr id="follow" />
|
530 |
+
<h3><?php _e("'Follow' Button", 'instagram-feed'); ?></h3>
|
531 |
<table class="form-table">
|
532 |
<tbody>
|
533 |
<tr valign="top">
|
534 |
+
<th scope="row"><label><?php _e("Show the Follow button", 'instagram-feed'); ?></label><code class="sbi_shortcode"> showfollow
|
535 |
+
Eg: showfollow=true</code></th>
|
536 |
<td>
|
537 |
<input type="checkbox" name="sb_instagram_show_follow_btn" id="sb_instagram_show_follow_btn" <?php if($sb_instagram_show_follow_btn == true) echo 'checked="checked"' ?> />
|
538 |
</td>
|
549 |
</tr> -->
|
550 |
|
551 |
<tr valign="top">
|
552 |
+
<th scope="row"><label><?php _e('Button Background Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followcolor
|
553 |
+
Eg: followcolor=28a1bf</code></th>
|
554 |
<td>
|
555 |
<input name="sb_instagram_folow_btn_background" type="text" value="<?php esc_attr_e( $sb_instagram_folow_btn_background, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
556 |
</td>
|
557 |
</tr>
|
558 |
<tr valign="top">
|
559 |
+
<th scope="row"><label><?php _e('Button Text Color', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtextcolor
|
560 |
+
Eg: followtextcolor=000</code></th>
|
561 |
<td>
|
562 |
<input name="sb_instagram_follow_btn_text_color" type="text" value="<?php esc_attr_e( $sb_instagram_follow_btn_text_color, 'instagram-feed' ); ?>" class="sbi_colorpick" />
|
563 |
</td>
|
564 |
</tr>
|
565 |
<tr valign="top">
|
566 |
+
<th scope="row"><label><?php _e('Button Text', 'instagram-feed'); ?></label><code class="sbi_shortcode"> followtext
|
567 |
+
Eg: followtext="Follow me"</code></th>
|
568 |
<td>
|
569 |
<input name="sb_instagram_follow_btn_text" type="text" value="<?php esc_attr_e( $sb_instagram_follow_btn_text, 'instagram-feed' ); ?>" size="30" />
|
570 |
</td>
|
664 |
</tr>
|
665 |
</tbody>
|
666 |
</table>
|
667 |
+
<table class="form-table">
|
668 |
+
<tbody>
|
669 |
+
<tr valign="top">
|
670 |
+
<th scope="row"><label><?php _e("Disable Font Awesome", 'instagram-feed'); ?></label></th>
|
671 |
+
<td>
|
672 |
+
<input type="checkbox" name="sb_instagram_disable_awesome" id="sb_instagram_disable_awesome" <?php if($sb_instagram_disable_awesome == true) echo 'checked="checked"' ?> /> Yes
|
673 |
+
</td>
|
674 |
+
</tr>
|
675 |
+
</tbody>
|
676 |
+
</table>
|
677 |
|
678 |
<?php submit_button(); ?>
|
679 |
|
1069 |
|
1070 |
function sb_instagram_admin_style() {
|
1071 |
wp_register_style( 'sb_instagram_admin_css', plugins_url('css/sb-instagram-admin.css', __FILE__), array(), SBIVER );
|
1072 |
+
wp_enqueue_style( 'sb_instagram_font_awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );
|
1073 |
wp_enqueue_style( 'sb_instagram_admin_css' );
|
1074 |
wp_enqueue_style( 'wp-color-picker' );
|
1075 |
}
|
1108 |
return $links;
|
1109 |
}
|
1110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
?>
|
instagram-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Instagram Feed
|
4 |
Plugin URI: http://smashballoon.com/instagram-feed
|
5 |
Description: Display beautifully clean, customizable, and responsive Instagram feeds
|
6 |
-
Version: 1.4.
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://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.4.
|
27 |
|
28 |
//Include admin
|
29 |
include dirname( __FILE__ ) .'/instagram-feed-admin.php';
|
@@ -212,7 +212,12 @@ add_action( 'wp_enqueue_scripts', 'sb_instagram_styles_enqueue' );
|
|
212 |
function sb_instagram_styles_enqueue() {
|
213 |
wp_register_style( 'sb_instagram_styles', plugins_url('css/sb-instagram.min.css', __FILE__), array(), SBIVER );
|
214 |
wp_enqueue_style( 'sb_instagram_styles' );
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
217 |
|
218 |
//Enqueue scripts
|
3 |
Plugin Name: Instagram Feed
|
4 |
Plugin URI: http://smashballoon.com/instagram-feed
|
5 |
Description: Display beautifully clean, customizable, and responsive Instagram feeds
|
6 |
+
Version: 1.4.5
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://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.4.5' );
|
27 |
|
28 |
//Include admin
|
29 |
include dirname( __FILE__ ) .'/instagram-feed-admin.php';
|
212 |
function sb_instagram_styles_enqueue() {
|
213 |
wp_register_style( 'sb_instagram_styles', plugins_url('css/sb-instagram.min.css', __FILE__), array(), SBIVER );
|
214 |
wp_enqueue_style( 'sb_instagram_styles' );
|
215 |
+
|
216 |
+
$options = get_option('sb_instagram_settings');
|
217 |
+
if(isset($options['sb_instagram_disable_awesome'])){
|
218 |
+
if( !$options['sb_instagram_disable_awesome'] || !isset($options['sb_instagram_disable_awesome']) ) wp_enqueue_style( 'sb_instagram_icons', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', array(), '4.6.3' );
|
219 |
+
}
|
220 |
+
|
221 |
}
|
222 |
|
223 |
//Enqueue scripts
|
js/sb-instagram-admin.js
CHANGED
@@ -6,7 +6,7 @@ jQuery(document).ready(function($) {
|
|
6 |
id = token.split('.')[0];
|
7 |
//If there's a hash then autofill the token and id
|
8 |
if(hash){
|
9 |
-
$('#sbi_config').append('<div id="sbi_config_info"><p><b>Access Token: </b><input type="text" size=58 readonly value="'+token+'" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p><p><b>User ID: </b><input type="text" size=12 readonly value="'+id+'" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p><p>Copy and paste these into the fields below, or use a different Access Token and User ID if you wish
|
10 |
}
|
11 |
|
12 |
//Tooltips
|
@@ -14,7 +14,25 @@ jQuery(document).ready(function($) {
|
|
14 |
jQuery(this).siblings('.sbi_tooltip').slideToggle();
|
15 |
});
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
if( jQuery('.sbi_colorpick').length > 0 ) jQuery('.sbi_colorpick').wpColorPicker();
|
19 |
|
20 |
//Check User ID is numeric
|
6 |
id = token.split('.')[0];
|
7 |
//If there's a hash then autofill the token and id
|
8 |
if(hash){
|
9 |
+
$('#sbi_config').append('<div id="sbi_config_info"><p><b>Access Token: </b><input type="text" size=58 readonly value="'+token+'" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p><p><b>User ID: </b><input type="text" size=12 readonly value="'+id+'" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p><p><i class="fa fa-clipboard" aria-hidden="true"></i> <b>Copy and paste</b> these into the fields below, or use a different Access Token and User ID if you wish</p></div>');
|
10 |
}
|
11 |
|
12 |
//Tooltips
|
14 |
jQuery(this).siblings('.sbi_tooltip').slideToggle();
|
15 |
});
|
16 |
|
17 |
+
//Shortcode labels
|
18 |
+
jQuery('#sbi_admin label').click(function(){
|
19 |
+
var $sbi_shortcode = jQuery(this).siblings('.sbi_shortcode');
|
20 |
+
if($sbi_shortcode.is(':visible')){
|
21 |
+
jQuery(this).siblings('.sbi_shortcode').css('display','none');
|
22 |
+
} else {
|
23 |
+
jQuery(this).siblings('.sbi_shortcode').css('display','block');
|
24 |
+
}
|
25 |
+
});
|
26 |
+
jQuery('#sbi_admin label').hover(function(){
|
27 |
+
if( jQuery(this).siblings('.sbi_shortcode').length > 0 ){
|
28 |
+
jQuery(this).attr('title', 'Click for shortcode option').append('<code class="sbi_shortcode_symbol">[]</code>');
|
29 |
+
}
|
30 |
+
}, function(){
|
31 |
+
jQuery(this).find('.sbi_shortcode_symbol').remove();
|
32 |
+
});
|
33 |
+
|
34 |
+
|
35 |
+
//Add the color picker
|
36 |
if( jQuery('.sbi_colorpick').length > 0 ) jQuery('.sbi_colorpick').wpColorPicker();
|
37 |
|
38 |
//Check User ID is numeric
|
js/sb-instagram.js
CHANGED
@@ -91,7 +91,7 @@ if(!sbi_js_exists){
|
|
91 |
if( data.data.bio.length ) $header += '<p class="sbi_bio" '+headerStyles+'>'+data.data.bio+'</p>';
|
92 |
$header += '</div>';
|
93 |
$header += '<div class="sbi_header_img">';
|
94 |
-
$header += '<div class="sbi_header_img_hover"><i
|
95 |
$header += '<img src="'+data.data.profile_picture+'" alt="'+data.data.full_name+'" width="50" height="50">';
|
96 |
$header += '</div>';
|
97 |
$header += '</a>';
|
91 |
if( data.data.bio.length ) $header += '<p class="sbi_bio" '+headerStyles+'>'+data.data.bio+'</p>';
|
92 |
$header += '</div>';
|
93 |
$header += '<div class="sbi_header_img">';
|
94 |
+
$header += '<div class="sbi_header_img_hover"><i></i></div>';
|
95 |
$header += '<img src="'+data.data.profile_picture+'" alt="'+data.data.full_name+'" width="50" height="50">';
|
96 |
$header += '</div>';
|
97 |
$header += '</a>';
|
js/sb-instagram.min.js
CHANGED
@@ -3,7 +3,7 @@ if(!Function.prototype.bind){Function.prototype.bind=function(e){if(typeof this!
|
|
3 |
function sbi_init(){jQuery('#sb_instagram.sbi').each(function(){var $self=jQuery(this),$target=$self.find('#sbi_images'),$loadBtn=$self.find("#sbi_load .sbi_load_btn"),imgRes='standard_resolution',cols=parseInt(this.getAttribute('data-cols'),10),num=this.getAttribute('data-num'),feedOptions=JSON.parse(this.getAttribute('data-options')),getType='user',sortby='none',user_id=this.getAttribute('data-id'),num=this.getAttribute('data-num'),posts_arr=[],$header='',morePosts=[];if(feedOptions.sortby!=='')sortby=feedOptions.sortby;switch(this.getAttribute('data-res')){case 'auto':var feedWidth=$self.innerWidth(),colWidth=$self.innerWidth()/cols;var sbiWindowWidth=jQuery(window).width();if(sbiWindowWidth<640){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}
|
4 |
if(colWidth<150){imgRes='thumbnail'}else if(colWidth<320){imgRes='low_resolution'}else{imgRes='standard_resolution'}
|
5 |
if(feedWidth<=100)imgRes='low_resolution';break;case 'thumb':imgRes='thumbnail';break;case 'medium':imgRes='low_resolution';break;default:imgRes='standard_resolution'}
|
6 |
-
var ids_arr=user_id.replace(/ /g,'').split(",");var looparray=ids_arr;var headerStyles='',sbi_page_url='https://api.instagram.com/v1/users/'+ids_arr[0]+'?access_token='+sb_instagram_js_options.sb_instagram_at;if(feedOptions.headercolor.length)headerStyles='style="color: #'+feedOptions.headercolor+'"';jQuery.ajax({method:"GET",url:sbi_page_url,dataType:"jsonp",success:function(data){$header='<a href="http://instagram.com/'+data.data.username+'" target="_blank" title="@'+data.data.username+'" class="sbi_header_link">';$header+='<div class="sbi_header_text">';$header+='<h3 '+headerStyles;if(data.data.bio.length==0)$header+=' class="sbi_no_bio"';$header+='>@'+data.data.username+'</h3>';if(data.data.bio.length)$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
|
7 |
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))}
|
8 |
head.appendChild(style)}();$self.find(".sbi_photo").sbi_imgLiquid({fill:!0})}
|
9 |
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()},500)});function sbiSetPhotoHeight(){if(imgRes!=='thumbnail'){var sbi_photo_width=$self.find('.sbi_photo').eq(0).innerWidth();var sbi_num_cols=parseInt(cols);if(!$self.hasClass('sbi_disable_mobile')){var sbiWindowWidth=jQuery(window).width();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}
|
3 |
function sbi_init(){jQuery('#sb_instagram.sbi').each(function(){var $self=jQuery(this),$target=$self.find('#sbi_images'),$loadBtn=$self.find("#sbi_load .sbi_load_btn"),imgRes='standard_resolution',cols=parseInt(this.getAttribute('data-cols'),10),num=this.getAttribute('data-num'),feedOptions=JSON.parse(this.getAttribute('data-options')),getType='user',sortby='none',user_id=this.getAttribute('data-id'),num=this.getAttribute('data-num'),posts_arr=[],$header='',morePosts=[];if(feedOptions.sortby!=='')sortby=feedOptions.sortby;switch(this.getAttribute('data-res')){case 'auto':var feedWidth=$self.innerWidth(),colWidth=$self.innerWidth()/cols;var sbiWindowWidth=jQuery(window).width();if(sbiWindowWidth<640){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}
|
4 |
if(colWidth<150){imgRes='thumbnail'}else if(colWidth<320){imgRes='low_resolution'}else{imgRes='standard_resolution'}
|
5 |
if(feedWidth<=100)imgRes='low_resolution';break;case 'thumb':imgRes='thumbnail';break;case 'medium':imgRes='low_resolution';break;default:imgRes='standard_resolution'}
|
6 |
+
var ids_arr=user_id.replace(/ /g,'').split(",");var looparray=ids_arr;var headerStyles='',sbi_page_url='https://api.instagram.com/v1/users/'+ids_arr[0]+'?access_token='+sb_instagram_js_options.sb_instagram_at;if(feedOptions.headercolor.length)headerStyles='style="color: #'+feedOptions.headercolor+'"';jQuery.ajax({method:"GET",url:sbi_page_url,dataType:"jsonp",success:function(data){$header='<a href="http://instagram.com/'+data.data.username+'" target="_blank" title="@'+data.data.username+'" class="sbi_header_link">';$header+='<div class="sbi_header_text">';$header+='<h3 '+headerStyles;if(data.data.bio.length==0)$header+=' class="sbi_no_bio"';$header+='>@'+data.data.username+'</h3>';if(data.data.bio.length)$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></i></div>';$header+='<img src="'+data.data.profile_picture+'" alt="'+data.data.full_name+'" width="50" height="50">';$header+='</div>';$header+='</a>';$self.find('.sb_instagram_header').prepend($header);if($self.find('.sbi_follow_btn').length)$self.find('.sbi_follow_btn a').attr('href','http://instagram.com/'+data.data.username)}});jQuery.each(looparray,function(index,entry){var userFeed=new instagramfeed({target:$target,get:getType,sortBy:sortby,resolution:imgRes,limit:parseInt(num,10),template:'<div class="sbi_item sbi_type_{{model.type}} sbi_new" id="sbi_{{id}}" data-date="{{model.created_time_raw}}"><div class="sbi_photo_wrap"><a class="sbi_photo" href="{{link}}" target="_blank"><img src="{{image}}" alt="{{caption}}" width="200" height="200" /></a></div></div>',filter:function(image){var date=new Date(image.created_time*1000),time=date.getTime();image.created_time_raw=time;if(image.caption!=null)image.caption.text=image.caption.text.replace(/[^a-zA-Z ]/g,"");return !0},userId:parseInt(entry,10),accessToken:sb_instagram_js_options.sb_instagram_at,after:function(){$self.find('.sbi_loader').remove();if(this.hasNext())morePosts.push('1');if(morePosts.length>0){$loadBtn.show()}else{$loadBtn.hide();$self.css('padding-bottom',0)}
|
7 |
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))}
|
8 |
head.appendChild(style)}();$self.find(".sbi_photo").sbi_imgLiquid({fill:!0})}
|
9 |
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()},500)});function sbiSetPhotoHeight(){if(imgRes!=='thumbnail'){var sbi_photo_width=$self.find('.sbi_photo').eq(0).innerWidth();var sbi_num_cols=parseInt(cols);if(!$self.hasClass('sbi_disable_mobile')){var sbiWindowWidth=jQuery(window).width();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}
|