Instagram Feed - Version 1.4.6.2

Version Description

  • Fix: Removed a comment from the plugin's JavaScript file which was causing an issue with some optimization plugins, such as Autoptimize.
Download this release

Release Info

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

Code changes from version 1.4.6.1 to 1.4.6.2

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.3
6
- Stable tag: 1.4.6.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -562,6 +562,9 @@ No Waiver of Rights by Instagram: Instagram's failure to exercise or enforce any
562
 
563
  == Changelog ==
564
 
 
 
 
565
  = 1.4.6.1 =
566
  * Fix: Fixed an issue with the Instagram image URLs which was resulting in inconsistent url references in some feeds
567
 
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.3
6
+ Stable tag: 1.4.6.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
562
 
563
  == Changelog ==
564
 
565
+ = 1.4.6.2 =
566
+ * Fix: Removed a comment from the plugin's JavaScript file which was causing an issue with some optimization plugins, such as Autoptimize.
567
+
568
  = 1.4.6.1 =
569
  * Fix: Fixed an issue with the Instagram image URLs which was resulting in inconsistent url references in some feeds
570
 
css/sb-instagram-admin.css CHANGED
@@ -309,4 +309,65 @@
309
  right: 10px;
310
  color: #dd3d36;
311
  text-decoration: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  }
309
  right: 10px;
310
  color: #dd3d36;
311
  text-decoration: none;
312
+ }
313
+
314
+ /* Review notice */
315
+ .sbi_review_notice{
316
+ position: relative;
317
+ overflow: hidden;
318
+ max-width: 870px;
319
+ margin-top: 10px;
320
+ padding: 10px 10px 7px 10px;
321
+
322
+ background: #E6F0E8;
323
+ border: 1px solid #6AB074;
324
+ color: #214F28;
325
+ }
326
+ .sbi_review_notice img{
327
+ width: 84px;
328
+ margin: 0 0 0 -100% !important;
329
+
330
+ -moz-border-radius: 4px;
331
+ -webkit-border-radius: 4px;
332
+ border-radius: 4px;
333
+ }
334
+ .sbi_review_notice .ctf-notice-text{
335
+ float: left;
336
+ clear: none;
337
+ width: 100%;
338
+ padding: 4px 0;
339
+ }
340
+ .sbi_review_notice p{
341
+ float: left;
342
+ clear: both;
343
+ width: auto;
344
+ margin: 0 0 0 100px !important;
345
+ padding: 4px 40px 4px 0;
346
+ }
347
+ .sbi_review_notice a{
348
+ display: inline-block;
349
+ padding: 0 8px;
350
+ color: #178529;
351
+ }
352
+ .sbi_review_notice a:hover,
353
+ .sbi_review_notice a:focus{
354
+ color: #0c7abf;
355
+ }
356
+ .sbi_review_notice .links{
357
+ margin: 0 0 0 92px !important;
358
+ padding: 4px 0 0 0;
359
+ }
360
+ .sbi_review_notice .links a:first-child{
361
+ /*padding-left: 0;*/
362
+ }
363
+ .sbi_review_notice .sbi_notice_close{
364
+ position: absolute;
365
+ top: 0;
366
+ right: 0;
367
+ padding: 10px;
368
+ line-height: 1;
369
+ }
370
+ .sbi_review_notice .sbi_notice_close:hover,
371
+ .sbi_review_notice .sbi_notice_close:focus{
372
+ color: #a34100;
373
  }
img/sbi-icon.png ADDED
Binary file
instagram-feed-admin.php CHANGED
@@ -254,6 +254,14 @@ function sb_instagram_settings_page() {
254
  <p class="sbi_tooltip"><?php _e("Display posts from a specific hashtag instead of from a user", 'instagram-feed'); ?></p>
255
  </span>
256
 
 
 
 
 
 
 
 
 
257
  <span class="sbi_pro sbi_row">
258
  <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_location" value="location" <?php if($sb_instagram_type == "location") echo "checked"; ?> />
259
  <label class="sbi_radio_label" for="sb_instagram_type_location">Location:</label>
@@ -1147,4 +1155,82 @@ function sb_instagram_token_nag_ignore_2016() {
1147
  }
1148
  }
1149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1150
  ?>
254
  <p class="sbi_tooltip"><?php _e("Display posts from a specific hashtag instead of from a user", 'instagram-feed'); ?></p>
255
  </span>
256
 
257
+ <div class="sbi_pro sbi_row">
258
+ <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_self_likes" value="liked" <?php if($sb_instagram_type == "liked") echo "checked"; ?> />
259
+ <label class="sbi_radio_label" for="sb_instagram_type_self_likes">Liked:</label>
260
+ <input readonly type="text" size="25" />
261
+ &nbsp;<a class="sbi_tooltip_link sbi_pro" href="JavaScript:void(0);"><?php _e("What is this?"); ?></a><span class="sbi_note"> - <a href="https://smashballoon.com/instagram-feed/" target="_blank">Upgrade to Pro to show posts that you've Liked</a></span>
262
+ <p class="sbi_tooltip"><?php _e("Display posts that your user account has liked."); ?></p>
263
+ </div>
264
+
265
  <span class="sbi_pro sbi_row">
266
  <input disabled type="radio" name="sb_instagram_type" id="sb_instagram_type_location" value="location" <?php if($sb_instagram_type == "location") echo "checked"; ?> />
267
  <label class="sbi_radio_label" for="sb_instagram_type_location">Location:</label>
1155
  }
1156
  }
1157
 
1158
+
1159
+
1160
+ //REVIEW REQUEST NOTICE
1161
+
1162
+ // checks $_GET to see if the nag variable is set and what it's value is
1163
+ function sbi_check_nag_get( $get, $nag, $option, $transient ) {
1164
+ if ( isset( $_GET[$nag] ) && $get[$nag] == 1 ) {
1165
+ update_option( $option, 'dismissed' );
1166
+ } elseif ( isset( $_GET[$nag] ) && $get[$nag] == 'later' ) {
1167
+ $time = 2 * WEEK_IN_SECONDS;
1168
+ set_transient( $transient, 'waiting', $time );
1169
+ update_option( $option, 'pending' );
1170
+ }
1171
+ }
1172
+
1173
+ // will set a transient if the notice hasn't been dismissed or hasn't been set yet
1174
+ function sbi_maybe_set_transient( $transient, $option ) {
1175
+ $sbi_rating_notice_waiting = get_transient( $transient );
1176
+ $notice_status = get_option( $option, false );
1177
+
1178
+ if ( ! $sbi_rating_notice_waiting && !( $notice_status === 'dismissed' || $notice_status === 'pending' ) ) {
1179
+ $time = 2 * WEEK_IN_SECONDS;
1180
+ set_transient( $transient, 'waiting', $time );
1181
+ update_option( $option, 'pending' );
1182
+ }
1183
+ }
1184
+
1185
+ // generates the html for the admin notice
1186
+ function sbi_rating_notice_html() {
1187
+
1188
+ //Only show to admins
1189
+ if ( current_user_can( 'manage_options' ) ){
1190
+
1191
+ global $current_user;
1192
+ $user_id = $current_user->ID;
1193
+
1194
+ /* Check that the user hasn't already clicked to ignore the message */
1195
+ if ( ! get_user_meta( $user_id, 'sbi_ignore_rating_notice') ) {
1196
+
1197
+ _e("
1198
+ <div class='sbi_notice sbi_review_notice'>
1199
+ <img src='". plugins_url( 'instagram-feed/img/sbi-icon.png' ) ."' alt='Instagram Feed'>
1200
+ <div class='ctf-notice-text'>
1201
+ <p>It's great to see that you've been using the <strong>Instagram Feed</strong> plugin for a while now. Hopefully you're happy with it!&nbsp; If so, would you consider leaving a positive review? It really helps to support the plugin and helps others to discover it too!</p>
1202
+ <p class='links'>
1203
+ <a class='sbi_notice_dismiss' href='https://wordpress.org/support/view/plugin-reviews/instagram-feed' target='_blank'>Sure, I'd love to!</a>
1204
+ &middot;
1205
+ <a class='sbi_notice_dismiss' href='" .esc_url( add_query_arg( 'sbi_ignore_rating_notice_nag', '1' ) ). "'>No thanks</a>
1206
+ &middot;
1207
+ <a class='sbi_notice_dismiss' href='" .esc_url( add_query_arg( 'sbi_ignore_rating_notice_nag', '1' ) ). "'>I've already given a review</a>
1208
+ &middot;
1209
+ <a class='sbi_notice_dismiss' href='" .esc_url( add_query_arg( 'sbi_ignore_rating_notice_nag', 'later' ) ). "'>Ask Me Later</a>
1210
+ </p>
1211
+ </div>
1212
+ <a class='sbi_notice_close' href='" .esc_url( add_query_arg( 'sbi_ignore_rating_notice_nag', '1' ) ). "'><i class='fa fa-close'></i></a>
1213
+ </div>
1214
+ ");
1215
+
1216
+ }
1217
+
1218
+ }
1219
+ }
1220
+
1221
+ // variables to define certain terms
1222
+ $transient = 'instagram_feed_rating_notice_waiting';
1223
+ $option = 'sbi_rating_notice';
1224
+ $nag = 'sbi_ignore_rating_notice_nag';
1225
+
1226
+ sbi_check_nag_get( $_GET, $nag, $option, $transient );
1227
+ sbi_maybe_set_transient( $transient, $option );
1228
+ $notice_status = get_option( $option, false );
1229
+
1230
+ // only display the notice if the time offset has passed and the user hasn't already dismissed it
1231
+ if ( get_transient( $transient ) !== 'waiting' && $notice_status !== 'dismissed' ) {
1232
+ add_action( 'admin_notices', 'sbi_rating_notice_html' );
1233
+ }
1234
+
1235
+
1236
  ?>
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.6.1
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.6.1' );
27
 
28
  //Include admin
29
  include dirname( __FILE__ ) .'/instagram-feed-admin.php';
@@ -224,7 +224,7 @@ function sb_instagram_styles_enqueue() {
224
  add_action( 'wp_enqueue_scripts', 'sb_instagram_scripts_enqueue' );
225
  function sb_instagram_scripts_enqueue() {
226
  //Register the script to make it available
227
- wp_register_script( 'sb_instagram_scripts', plugins_url( '/js/sb-instagram.min.js' , __FILE__ ), array('jquery'), SBIVER, true );
228
 
229
  //Options to pass to JS file
230
  $sb_instagram_settings = get_option('sb_instagram_settings');
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.6.2
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.6.2' );
27
 
28
  //Include admin
29
  include dirname( __FILE__ ) .'/instagram-feed-admin.php';
224
  add_action( 'wp_enqueue_scripts', 'sb_instagram_scripts_enqueue' );
225
  function sb_instagram_scripts_enqueue() {
226
  //Register the script to make it available
227
+ wp_register_script( 'sb_instagram_scripts', plugins_url( '/js/sb-instagram.min.js' , __FILE__ ), array('jquery'), SBIVER, true ); //http://www.minifier.org/
228
 
229
  //Options to pass to JS file
230
  $sb_instagram_settings = get_option('sb_instagram_settings');
js/sb-instagram.min.js CHANGED
@@ -11,4 +11,4 @@ var sbi_photo_width_manual=($self.find('#sbi_images').width()/sbi_num_cols)-(fee
11
  sbiSetPhotoHeight();!function(i){var n={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},c={};c.sbiCheckVisibility=function(i,n){if(jQuery.contains(document,i[0])){var e=n.sbiPreviousVisibility,t=i.is(":visible");n.sbiPreviousVisibility=t,null==e?n.runOnLoad&&n.callback(i,t):e!==t&&n.callback(i,t),setTimeout(function(){c.sbiCheckVisibility(i,n)},n.frequency)}},i.fn.sbiVisibilityChanged=function(e){var t=i.extend({},n,e);return this.each(function(){c.sbiCheckVisibility(i(this),t)})}}(jQuery);jQuery(".sbi").filter(':hidden').sbiVisibilityChanged({callback:function(element,visible){sbiSetPhotoHeight()},runOnLoad:!1});jQuery('#sb_instagram .sbi_photo').each(function(){$sbi_photo=jQuery(this);$sbi_photo.hover(function(){jQuery(this).fadeTo(200,0.85)},function(){jQuery(this).stop().fadeTo(500,1)});if($sbi_photo.closest('.sbi_item').hasClass('sbi_type_video')){if(!$sbi_photo.find('.sbi_playbtn').length)$sbi_photo.append('<i class="fa fa-play sbi_playbtn"></i>')}});$self.find('#sbi_images .sbi_item.sbi_new').sort(function(a,b){var aComp=jQuery(a).data('date'),bComp=jQuery(b).data('date');if(sortby=='none'){return bComp-aComp}else{return(Math.round(Math.random())-0.5)}}).appendTo($self.find("#sbi_images"));setTimeout(function(){jQuery('#sbi_images .sbi_item.sbi_new').removeClass('sbi_new');morePosts=[]},500);function sbiGetItemSize(){$self.removeClass('sbi_small sbi_medium');var sbiItemWidth=$self.find('.sbi_item').innerWidth();if(sbiItemWidth>120&&sbiItemWidth<240){$self.addClass('sbi_medium')}else if(sbiItemWidth<=120){$self.addClass('sbi_small')}}
12
  sbiGetItemSize()},error:function(data){var sbiErrorMsg='',sbiErrorDir='';if(data.indexOf('access_token')>-1){sbiErrorMsg+='<p><b>Error: Access Token is not valid</b><br /><span>This error message is only visible to WordPress admins</span>';sbiErrorDir="<p>There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.<br />If you continue to have an issue with your Access Token then please see <a href='https://smashballoon.com/my-instagram-access-token-keep-expiring/' target='_blank'>this FAQ</a> for more information."}else if(data.indexOf('user does not exist')>-1){sbiErrorMsg+='<p><b>Error: The User ID does not exist</b><br /><span>This error is only visible to WordPress admins</span>';sbiErrorDir="<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>"}
13
  if(looparray.length<2)jQuery('#sb_instagram').empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+sbiErrorMsg+sbiErrorDir+'</div>')}});$loadBtn.click(function(){userFeed.next()});userFeed.run()})})}
14
- jQuery(document).ready(function(){sbi_init()})} //http://www.minifier.org/
11
  sbiSetPhotoHeight();!function(i){var n={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},c={};c.sbiCheckVisibility=function(i,n){if(jQuery.contains(document,i[0])){var e=n.sbiPreviousVisibility,t=i.is(":visible");n.sbiPreviousVisibility=t,null==e?n.runOnLoad&&n.callback(i,t):e!==t&&n.callback(i,t),setTimeout(function(){c.sbiCheckVisibility(i,n)},n.frequency)}},i.fn.sbiVisibilityChanged=function(e){var t=i.extend({},n,e);return this.each(function(){c.sbiCheckVisibility(i(this),t)})}}(jQuery);jQuery(".sbi").filter(':hidden').sbiVisibilityChanged({callback:function(element,visible){sbiSetPhotoHeight()},runOnLoad:!1});jQuery('#sb_instagram .sbi_photo').each(function(){$sbi_photo=jQuery(this);$sbi_photo.hover(function(){jQuery(this).fadeTo(200,0.85)},function(){jQuery(this).stop().fadeTo(500,1)});if($sbi_photo.closest('.sbi_item').hasClass('sbi_type_video')){if(!$sbi_photo.find('.sbi_playbtn').length)$sbi_photo.append('<i class="fa fa-play sbi_playbtn"></i>')}});$self.find('#sbi_images .sbi_item.sbi_new').sort(function(a,b){var aComp=jQuery(a).data('date'),bComp=jQuery(b).data('date');if(sortby=='none'){return bComp-aComp}else{return(Math.round(Math.random())-0.5)}}).appendTo($self.find("#sbi_images"));setTimeout(function(){jQuery('#sbi_images .sbi_item.sbi_new').removeClass('sbi_new');morePosts=[]},500);function sbiGetItemSize(){$self.removeClass('sbi_small sbi_medium');var sbiItemWidth=$self.find('.sbi_item').innerWidth();if(sbiItemWidth>120&&sbiItemWidth<240){$self.addClass('sbi_medium')}else if(sbiItemWidth<=120){$self.addClass('sbi_small')}}
12
  sbiGetItemSize()},error:function(data){var sbiErrorMsg='',sbiErrorDir='';if(data.indexOf('access_token')>-1){sbiErrorMsg+='<p><b>Error: Access Token is not valid</b><br /><span>This error message is only visible to WordPress admins</span>';sbiErrorDir="<p>There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.<br />If you continue to have an issue with your Access Token then please see <a href='https://smashballoon.com/my-instagram-access-token-keep-expiring/' target='_blank'>this FAQ</a> for more information."}else if(data.indexOf('user does not exist')>-1){sbiErrorMsg+='<p><b>Error: The User ID does not exist</b><br /><span>This error is only visible to WordPress admins</span>';sbiErrorDir="<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>"}
13
  if(looparray.length<2)jQuery('#sb_instagram').empty().append('<p style="text-align: center;">Unable to show Instagram photos</p><div id="sbi_mod_error">'+sbiErrorMsg+sbiErrorDir+'</div>')}});$loadBtn.click(function(){userFeed.next()});userFeed.run()})})}
14
+ jQuery(document).ready(function(){sbi_init()})}