Version Description
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.
=
Download this release
Release Info
Developer | smashballoon |
Plugin | Instagram Feed |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.4.1
- README.txt +3 -3
- css/sb-instagram.min.css +1 -0
- instagram-feed.php +2 -2
- js/sb-instagram.min.js +1 -0
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.1
|
6 |
-
Stable tag: 1.4
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -187,12 +187,12 @@ For more FAQs related to the Instagram Feed plugin please visit the [FAQ section
|
|
187 |
|
188 |
== Upgrade Notice ==
|
189 |
|
190 |
-
= 1.4 =
|
191 |
**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.
|
192 |
|
193 |
== Changelog ==
|
194 |
|
195 |
-
= 1.4 =
|
196 |
* **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.**
|
197 |
* New: Compatible with Instagram's new API changes effective June 1st
|
198 |
* New: Added video icons to Instagram posts in the feed which contain videos
|
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.1
|
6 |
+
Stable tag: 1.4.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
187 |
|
188 |
== Upgrade Notice ==
|
189 |
|
190 |
+
= 1.4.1 =
|
191 |
**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.
|
192 |
|
193 |
== Changelog ==
|
194 |
|
195 |
+
= 1.4.1 =
|
196 |
* **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.**
|
197 |
* New: Compatible with Instagram's new API changes effective June 1st
|
198 |
* New: Added video icons to Instagram posts in the feed which contain videos
|
css/sb-instagram.min.css
ADDED
@@ -0,0 +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:100%}#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 .fa{position:absolute;top:50%;margin-top:-10px;margin-left:-8px;font-size:20px}#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%}}
|
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';
|
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.1
|
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.1' );
|
27 |
|
28 |
//Include admin
|
29 |
include dirname( __FILE__ ) .'/instagram-feed-admin.php';
|
js/sb-instagram.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
function sbi_init(){jQuery("#sb_instagram.sbi").each(function(){var t=jQuery(this),i=t.find("#sbi_images"),e=t.find("#sbi_load .sbi_load_btn"),s="standard_resolution",o=parseInt(this.getAttribute("data-cols"),10),n=this.getAttribute("data-num"),r=JSON.parse(this.getAttribute("data-options")),a="user",d="none",l=this.getAttribute("data-id"),n=this.getAttribute("data-num"),c="",u=[];switch(""!==r.sortby&&(d=r.sortby),this.getAttribute("data-res")){case"auto":var h=t.innerWidth(),p=t.innerWidth()/o,m=jQuery(window).width();640>m&&(640>h&&t.is(".sbi_col_3, .sbi_col_4, .sbi_col_5, .sbi_col_6")&&(p=300),640>h&&t.is(".sbi_col_7, .sbi_col_8, .sbi_col_9, .sbi_col_10")&&(p=100),h>320&&480>h&&480>m&&(p=480),320>h&&480>m&&(p=300)),s=150>p?"thumbnail":320>p?"low_resolution":"standard_resolution",100>=h&&(s="low_resolution");break;case"thumb":s="thumbnail";break;case"medium":s="low_resolution";break;default:s="standard_resolution"}var f=l.replace(/ /g,"").split(","),g=f,b="",_="https://api.instagram.com/v1/users/"+f[0]+"?access_token="+sb_instagram_js_options.sb_instagram_at;r.headercolor.length&&(b='style="color: #'+r.headercolor+'"'),jQuery.ajax({method:"GET",url:_,dataType:"jsonp",success:function(i){c='<a href="http://instagram.com/'+i.data.username+'" target="_blank" title="@'+i.data.username+'" class="sbi_header_link">',c+='<div class="sbi_header_text">',c+="<h3 "+b,0==i.data.bio.length&&(c+=' class="sbi_no_bio"'),c+=">@"+i.data.username+"</h3>",i.data.bio.length&&(c+='<p class="sbi_bio" '+b+">"+i.data.bio+"</p>"),c+="</div>",c+='<div class="sbi_header_img">',c+='<div class="sbi_header_img_hover"><i class="fa fa-instagram"></i></div>',c+='<img src="'+i.data.profile_picture+'" alt="'+i.data.full_name+'" width="50" height="50">',c+="</div>",c+="</a>",t.find(".sb_instagram_header").prepend(c),t.find(".sbi_follow_btn").length&&t.find(".sbi_follow_btn a").attr("href","http://instagram.com/"+i.data.username)}}),jQuery.each(g,function(l,c){var h=new instagramfeed({target:i,get:a,sortBy:d,resolution:s,limit:parseInt(n,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(t){var i=new Date(1e3*t.created_time),e=i.getTime();return t.created_time_raw=e,null!=t.caption&&(t.caption.text=t.caption.text.replace(/"/g,""")),!0},userId:parseInt(c,10),accessToken:sb_instagram_js_options.sb_instagram_at,after:function(){function i(){if("thumbnail"!==s){var i=t.find(".sbi_photo").eq(0).innerWidth(),e=parseInt(o);if(!t.hasClass("sbi_disable_mobile")){var n=jQuery(window).width();640>n&&parseInt(o)>2&&parseInt(o)<7&&(e=2),640>n&&parseInt(o)>6&&parseInt(o)<11&&(e=4),480>=n&&parseInt(o)>2&&(e=1)}var a=t.find("#sbi_images").width()/e-2*r.imagepadding;a>=i&&(i=a),t.find(".sbi_photo").css("height",i)}}function n(){t.removeClass("sbi_small sbi_medium");var i=t.find(".sbi_item").innerWidth();i>120&&240>i?t.addClass("sbi_medium"):120>=i&&t.addClass("sbi_small")}if(t.find(".sbi_loader").remove(),this.hasNext()&&u.push("1"),u.length>0?e.show():(e.hide(),t.css("padding-bottom",0)),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),"thumbnail"!==s){var a=a||{VER:"0.9.944"};a.bgs_Available=!1,a.bgs_CheckRunned=!1,function(t){function i(){if(!a.bgs_CheckRunned){a.bgs_CheckRunned=!0;var i=t('<span style="background-size:cover" />');t("body").append(i),!function(){var t=i[0];if(t&&window.getComputedStyle){var e=window.getComputedStyle(t,null);e&&e.backgroundSize&&(a.bgs_Available="cover"===e.backgroundSize)}}(),i.remove()}}t.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},i();var s=this;return this.options=e,this.settings=t.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(i){function e(){-1===h.css("background-image").indexOf(encodeURI(p.attr("src")))&&h.css({"background-image":'url("'+encodeURI(p.attr("src"))+'")'}),h.css({"background-size":u.fill?"cover":"contain","background-position":(u.horizontalAlign+" "+u.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),t("a:first",h).css({display:"block",width:"100%",height:"100%"}),t("img",h).css({display:"none"}),u.onItemFinish&&u.onItemFinish(i,h,p),h.addClass("sbi_imgLiquid_bgSize"),h.addClass("sbi_imgLiquid_ready"),c()}function o(){function e(){p.data("sbi_imgLiquid_error")||p.data("sbi_imgLiquid_loaded")||p.data("sbi_imgLiquid_oldProcessed")||(h.is(":visible")&&p[0].complete&&p[0].width>0&&p[0].height>0?(p.data("sbi_imgLiquid_loaded",!0),setTimeout(l,i*u.delay)):setTimeout(e,u.timecheckvisibility))}if(p.data("oldSrc")&&p.data("oldSrc")!==p.attr("src")){var s=p.clone().removeAttr("style");return s.data("sbi_imgLiquid_settings",p.data("sbi_imgLiquid_settings")),p.parent().prepend(s),p.remove(),p=s,p[0].width=0,void setTimeout(o,10)}return p.data("sbi_imgLiquid_oldProcessed")?void l():(p.data("sbi_imgLiquid_oldProcessed",!1),p.data("oldSrc",p.attr("src")),t("img:not(:first)",h).css("display","none"),h.css({overflow:"hidden"}),p.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),p.on("error",r),p[0].onerror=r,e(),void n())}function n(){(u.responsive||p.data("sbi_imgLiquid_oldProcessed"))&&p.data("sbi_imgLiquid_settings")&&(u=p.data("sbi_imgLiquid_settings"),h.actualSize=h.get(0).offsetWidth+h.get(0).offsetHeight/1e4,h.sizeOld&&h.actualSize!==h.sizeOld&&l(),h.sizeOld=h.actualSize,setTimeout(n,u.responsiveCheckTime))}function r(){p.data("sbi_imgLiquid_error",!0),h.addClass("sbi_imgLiquid_error"),u.onItemError&&u.onItemError(i,h,p),c()}function d(){var t={};if(s.settings.useDataHtmlAttr){var i=h.attr("data-sbi_imgLiquid-fill"),e=h.attr("data-sbi_imgLiquid-horizontalAlign"),o=h.attr("data-sbi_imgLiquid-verticalAlign");("true"===i||"false"===i)&&(t.fill=Boolean("true"===i)),void 0===e||"left"!==e&&"center"!==e&&"right"!==e&&-1===e.indexOf("%")||(t.horizontalAlign=e),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(t.verticalAlign=o)}return a.isIE&&s.settings.ieFadeInDisabled&&(t.fadeInTime=0),t}function l(){var t,e,s,o,n,r,a,d,l=0,m=0,f=h.width(),g=h.height();void 0===p.data("owidth")&&p.data("owidth",p[0].width),void 0===p.data("oheight")&&p.data("oheight",p[0].height),u.fill===f/g>=p.data("owidth")/p.data("oheight")?(t="100%",e="auto",s=Math.floor(f),o=Math.floor(f*(p.data("oheight")/p.data("owidth")))):(t="auto",e="100%",s=Math.floor(g*(p.data("owidth")/p.data("oheight"))),o=Math.floor(g)),n=u.horizontalAlign.toLowerCase(),a=f-s,"left"===n&&(m=0),"center"===n&&(m=.5*a),"right"===n&&(m=a),-1!==n.indexOf("%")&&(n=parseInt(n.replace("%",""),10),n>0&&(m=a*n*.01)),r=u.verticalAlign.toLowerCase(),d=g-o,"left"===r&&(l=0),"center"===r&&(l=.5*d),"bottom"===r&&(l=d),-1!==r.indexOf("%")&&(r=parseInt(r.replace("%",""),10),r>0&&(l=d*r*.01)),u.hardPixels&&(t=s,e=o),p.css({width:t,height:e,"margin-left":Math.floor(m),"margin-top":Math.floor(l)}),p.data("sbi_imgLiquid_oldProcessed")||(p.fadeTo(u.fadeInTime,1),p.data("sbi_imgLiquid_oldProcessed",!0),u.removeBoxBackground&&h.css("background-image","none"),h.addClass("sbi_imgLiquid_nobgSize"),h.addClass("sbi_imgLiquid_ready")),u.onItemFinish&&u.onItemFinish(i,h,p),c()}function c(){i===s.length-1&&s.settings.onFinish&&s.settings.onFinish()}var u=s.settings,h=t(this),p=t("img:first",h);return p.length?(p.data("sbi_imgLiquid_settings")?(h.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),u=t.extend({},p.data("sbi_imgLiquid_settings"),s.options)):u=t.extend({},s.settings,d()),p.data("sbi_imgLiquid_settings",u),u.onItemStart&&u.onItemStart(i,h,p),void(a.bgs_Available&&u.useBackgroundSize?e():o())):void r()})}})}(jQuery),!function(){var t=a.injectCss,i=document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),i.appendChild(e)}()}var l=function(){var t=0;return function(i,e){clearTimeout(t),t=setTimeout(i,e)}}();jQuery(window).resize(function(){l(function(){i()},500)}),i(),!function(t){var i={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},e={};e.sbiCheckVisibility=function(t,i){if(jQuery.contains(document,t[0])){var s=i.sbiPreviousVisibility,o=t.is(":visible");i.sbiPreviousVisibility=o,null==s?i.runOnLoad&&i.callback(t,o):s!==o&&i.callback(t,o),setTimeout(function(){e.sbiCheckVisibility(t,i)},i.frequency)}},t.fn.sbiVisibilityChanged=function(s){var o=t.extend({},i,s);return this.each(function(){e.sbiCheckVisibility(t(this),o)})}}(jQuery),jQuery(".sbi").filter(":hidden").sbiVisibilityChanged({callback:function(t,e){i()},runOnLoad:!1}),jQuery("#sb_instagram .sbi_photo").each(function(){$sbi_photo=jQuery(this),$sbi_photo.hover(function(){jQuery(this).fadeTo(200,.85)},function(){jQuery(this).stop().fadeTo(500,1)}),$sbi_photo.closest(".sbi_item").hasClass("sbi_type_video")&&($sbi_photo.find(".sbi_playbtn").length||$sbi_photo.append('<i class="fa fa-play sbi_playbtn"></i>'))}),t.find("#sbi_images .sbi_item.sbi_new").sort(function(t,i){var e=jQuery(t).data("date"),s=jQuery(i).data("date");return"none"==d?s-e:Math.round(Math.random())-.5}).appendTo(t.find("#sbi_images")),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new"),u=[]},500),n()},error:function(t){var i="",e="";t.indexOf("access_token")>-1?(i+="<p><b>Error: Access Token is not valid</b><br /><span>This error message is only visible to WordPress admins</span>",e="<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."):t.indexOf("user does not exist")>-1&&(i+="<p><b>Error: The User ID does not exist</b><br /><span>This error is only visible to WordPress admins</span>",e="<p>Please double check the Instagram User ID that you are using. To find your User ID simply enter your Instagram user name into this <a href='http://www.otzberg.net/iguserid/' target='_blank'>tool</a>.</p>"),g.length<2&&jQuery("#sb_instagram").empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+i+e+"</div>")}});e.click(function(){h.next()}),h.run()})})}var sbi_js_exists="undefined"!=typeof sbi_js_exists?!0:!1;sbi_js_exists||(function(){var t,i;t=function(){function t(t,i){var e,s;if(this.options={target:"instafeed",get:"popular",resolution:"thumbnail",sortBy:"none",links:!0,mock:!1,useHttp:!1},"object"==typeof t)for(e in t)s=t[e],this.options[e]=s;this.context=null!=i?i:this,this.unique=this._genKey()}return t.prototype.hasNext=function(){return"string"==typeof this.context.nextUrl&&this.context.nextUrl.length>0},t.prototype.next=function(){return this.hasNext()?this.run(this.context.nextUrl):!1},t.prototype.run=function(i){var e,s,o;if("string"!=typeof this.options.clientId&&"string"!=typeof this.options.accessToken)throw new Error("Missing clientId or accessToken.");if("string"!=typeof this.options.accessToken&&"string"!=typeof this.options.clientId)throw new Error("Missing clientId or accessToken.");return null!=this.options.before&&"function"==typeof this.options.before&&this.options.before.call(this),"undefined"!=typeof document&&null!==document&&(o=document.createElement("script"),o.id="instafeed-fetcher",o.src=i||this._buildUrl(),e=document.getElementsByTagName("head"),e[0].appendChild(o),s="instafeedCache"+this.unique,window[s]=new t(this.options,this),window[s].unique=this.unique),!0},t.prototype.parse=function(t){var i,e,s,o,n,r,a,d,l,c,u,h,p,m,f,g,b,_,y,v,w,k;if("object"!=typeof t){if(null!=this.options.error&&"function"==typeof this.options.error)return this.options.error.call(this,"Invalid JSON data"),!1;throw new Error("Invalid JSON response")}if(200!==t.meta.code){if(null!=this.options.error&&"function"==typeof this.options.error)return this.options.error.call(this,t.meta.error_message),!1;throw new Error("Error from Instagram: "+t.meta.error_message)}if(0===t.data.length){if(null!=this.options.error&&"function"==typeof this.options.error)return this.options.error.call(this,"No images were returned from Instagram"),!1;throw new Error("No images were returned from Instagram")}if(null!=this.options.success&&"function"==typeof this.options.success&&this.options.success.call(this,t),this.context.nextUrl="",null!=t.pagination&&(this.context.nextUrl=t.pagination.next_url),"none"!==this.options.sortBy)switch(m="random"===this.options.sortBy?["","random"]:this.options.sortBy.split("-"),p="least"===m[0]?!0:!1,m[1]){case"random":t.data.sort(function(){return.5-Math.random()});break;case"recent":t.data=this._sortBy(t.data,"created_time",p);break;case"liked":t.data=this._sortBy(t.data,"likes.count",p);break;case"commented":t.data=this._sortBy(t.data,"comments.count",p);break;default:throw new Error("Invalid option for sortBy: '"+this.options.sortBy+"'.")}if("undefined"!=typeof document&&null!==document&&this.options.mock===!1){if(d=t.data,null!=this.options.limit&&d.length>this.options.limit&&(d=d.slice(0,this.options.limit+1||9e9)),e=document.createDocumentFragment(),null!=this.options.filter&&"function"==typeof this.options.filter&&(d=this._filter(d,this.options.filter)),null!=this.options.template&&"string"==typeof this.options.template){for(o="",r="",c="",f=document.createElement("div"),g=0,y=d.length;y>g;g++)n=d[g],a=n.images[this.options.resolution].url,this.options.useHttp||(a=a.replace("http://","//")),r=this._makeTemplate(this.options.template,{model:n,id:n.id,link:n.link,image:a,caption:this._getObjectProperty(n,"caption.text"),likes:n.likes.count,comments:n.comments.count,location:this._getObjectProperty(n,"location.name")}),o+=r;for(f.innerHTML=o,k=[].slice.call(f.childNodes),b=0,v=k.length;v>b;b++)h=k[b],e.appendChild(h)}else for(_=0,w=d.length;w>_;_++)n=d[_],l=document.createElement("img"),a=n.images[this.options.resolution].url,this.options.useHttp||(a=a.replace("http://","//")),l.src=a,this.options.links===!0?(i=document.createElement("a"),i.href=n.link,i.appendChild(l),e.appendChild(i)):e.appendChild(l);this.options.target.append(e),s=document.getElementsByTagName("head")[0],s.removeChild(document.getElementById("instafeed-fetcher")),u="instafeedCache"+this.unique,window[u]=void 0;try{delete window[u]}catch(I){}}return null!=this.options.after&&"function"==typeof this.options.after&&this.options.after.call(this),!0},t.prototype._buildUrl=function(){var t,i,e;switch(t="https://api.instagram.com/v1",this.options.get){case"popular":i="media/popular";break;case"tagged":if("string"!=typeof this.options.tagName)throw new Error("No tag name specified. Use the 'tagName' option.");i="tags/"+this.options.tagName+"/media/recent";break;case"location":if("number"!=typeof this.options.locationId)throw new Error("No location specified. Use the 'locationId' option.");i="locations/"+this.options.locationId+"/media/recent";break;case"user":if("number"!=typeof this.options.userId)throw new Error("No user specified. Use the 'userId' option.");if("string"!=typeof this.options.accessToken)throw new Error("No access token. Use the 'accessToken' option.");i="users/"+this.options.userId+"/media/recent";break;default:throw new Error("Invalid option for get: '"+this.options.get+"'.")}return e=""+t+"/"+i,e+=null!=this.options.accessToken?"?access_token="+this.options.accessToken:"?client_id="+this.options.clientId,null!=this.options.limit&&(e+="&count="+this.options.limit),e+="&callback=instafeedCache"+this.unique+".parse"},t.prototype._genKey=function(){var t;return t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)},""+t()+t()+t()+t()},t.prototype._makeTemplate=function(t,i){var e,s,o,n,r;for(s=/(?:\{{2})([\w\[\]\.]+)(?:\}{2})/,e=t;s.test(e);)o=e.match(s)[1],n=null!=(r=this._getObjectProperty(i,o))?r:"",e=e.replace(s,""+n);return e},t.prototype._getObjectProperty=function(t,i){var e,s;for(i=i.replace(/\[(\w+)\]/g,".$1"),s=i.split(".");s.length;){if(e=s.shift(),!(null!=t&&e in t))return null;t=t[e]}return t},t.prototype._sortBy=function(t,i,e){var s;return s=function(t,s){var o,n;return o=this._getObjectProperty(t,i),n=this._getObjectProperty(s,i),e?o>n?1:-1:n>o?1:-1},t.sort(s.bind(this)),t},t.prototype._filter=function(t,i){var e,s,o,n,r;for(e=[],o=function(t){return i(t)?e.push(t):void 0},n=0,r=t.length;r>n;n++)s=t[n],o(s);return e},t}(),i="undefined"!=typeof exports&&null!==exports?exports:window,i.instagramfeed=t}.call(this),function(){"use strict";var t=Array.prototype.slice;try{t.call(document.documentElement)}catch(i){Array.prototype.slice=function(i,e){if(e="undefined"!=typeof e?e:this.length,"[object Array]"===Object.prototype.toString.call(this))return t.call(this,i,e);var s,o,n=[],r=this.length,a=i||0;a=a>=0?a:r+a;var d=e?e:r;if(0>e&&(d=r+e),o=d-a,o>0)if(n=new Array(o),this.charAt)for(s=0;o>s;s++)n[s]=this.charAt(a+s);else for(s=0;o>s;s++)n[s]=this[a+s];return n}}}(),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var i=Array.prototype.slice.call(arguments,1),e=this,s=function(){},o=function(){return e.apply(this instanceof s&&t?this:t,i.concat(Array.prototype.slice.call(arguments)))};return s.prototype=this.prototype,o.prototype=new s,o}),jQuery(document).ready(function(){sbi_init()}));
|