Instagram Feed - Version 1.3.5

Version Description

  • Fix: Reverted the 'prop' function introduced in the last update back to 'attr' as prop isn't supported in older versions of jQuery
  • Fix: Removed the image load function as it was causing images not to be displayed for some users
Download this release

Release Info

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

Code changes from version 1.3.4 to 1.3.5

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
4
  Requires at least: 3.0
5
  Tested up to: 4.1
6
- Stable tag: 1.3.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -186,6 +186,10 @@ For more FAQs related to the Instagram Feed plugin please visit the [FAQ section
186
  7. The Instagram Feed plugin Settings pages
187
 
188
  == Changelog ==
 
 
 
 
189
  = 1.3.4 =
190
  * Fix: Used the photo caption to add a more descriptive alt tag to the images
191
  * Fix: Images are now only displayed once they're fully loaded
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram plugin, Instagram stream, Custom Instagram Feed, responsive Instagram, mobile Instagram, Instagram posts, Instagram wall, Instagram account
4
  Requires at least: 3.0
5
  Tested up to: 4.1
6
+ Stable tag: 1.3.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
186
  7. The Instagram Feed plugin Settings pages
187
 
188
  == Changelog ==
189
+ = 1.3.5 =
190
+ * Fix: Reverted the 'prop' function introduced in the last update back to 'attr' as prop isn't supported in older versions of jQuery
191
+ * Fix: Removed the image load function as it was causing images not to be displayed for some users
192
+
193
  = 1.3.4 =
194
  * Fix: Used the photo caption to add a more descriptive alt tag to the images
195
  * Fix: Images are now only displayed once they're fully loaded
css/sb-instagram.css CHANGED
@@ -97,9 +97,6 @@
97
  max-width: 100% !important;
98
  opacity: 1 !important;
99
  }
100
- #sb_instagram img.sbi_hide{
101
- display: none;
102
- }
103
  #sb_instagram .sbi_link{
104
  display: none;
105
  position: absolute;
97
  max-width: 100% !important;
98
  opacity: 1 !important;
99
  }
 
 
 
100
  #sb_instagram .sbi_link{
101
  display: none;
102
  position: absolute;
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.3.4
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
@@ -22,6 +22,8 @@ along with this program; if not, write to the Free Software
22
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
  */
24
 
 
 
25
  //Include admin
26
  include dirname( __FILE__ ) .'/instagram-feed-admin.php';
27
 
@@ -177,7 +179,7 @@ function display_instagram($atts, $content = null) {
177
  //If using an ajax theme then add the JS to the bottom of the feed
178
  if($sb_instagram_ajax_theme){
179
  $sb_instagram_content .= '<script type="text/javascript">var sb_instagram_js_options = {"sb_instagram_at":"'.trim($options['sb_instagram_at']).'"};</script>';
180
- $sb_instagram_content .= "<script type='text/javascript' src='".plugins_url( '/js/sb-instagram.js?9' , __FILE__ )."'></script>";
181
  }
182
 
183
  //Return our feed HTML to display
@@ -194,7 +196,7 @@ add_filter('widget_text', 'do_shortcode');
194
  //Enqueue stylesheet
195
  add_action( 'wp_enqueue_scripts', 'sb_instagram_styles_enqueue' );
196
  function sb_instagram_styles_enqueue() {
197
- wp_register_style( 'sb_instagram_styles', plugins_url('css/sb-instagram.css?9', __FILE__) );
198
  wp_enqueue_style( 'sb_instagram_styles' );
199
  wp_enqueue_style( 'sb_instagram_icons', '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css?1', array(), '4.2.0' );
200
  }
@@ -203,7 +205,7 @@ function sb_instagram_styles_enqueue() {
203
  add_action( 'wp_enqueue_scripts', 'sb_instagram_scripts_enqueue' );
204
  function sb_instagram_scripts_enqueue() {
205
  //Register the script to make it available
206
- wp_register_script( 'sb_instagram_scripts', plugins_url( '/js/sb-instagram.js?9' , __FILE__ ), array('jquery'), '1.8', true );
207
 
208
  //Options to pass to JS file
209
  $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.3.5
7
  Author: Smash Balloon
8
  Author URI: http://smashballoon.com/
9
  License: GPLv2 or later
22
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
  */
24
 
25
+ define( 'SBIVER', '1.3.5' );
26
+
27
  //Include admin
28
  include dirname( __FILE__ ) .'/instagram-feed-admin.php';
29
 
179
  //If using an ajax theme then add the JS to the bottom of the feed
180
  if($sb_instagram_ajax_theme){
181
  $sb_instagram_content .= '<script type="text/javascript">var sb_instagram_js_options = {"sb_instagram_at":"'.trim($options['sb_instagram_at']).'"};</script>';
182
+ $sb_instagram_content .= "<script type='text/javascript' src='".plugins_url( '/js/sb-instagram.js?ver='.SBIVER , __FILE__ )."'></script>";
183
  }
184
 
185
  //Return our feed HTML to display
196
  //Enqueue stylesheet
197
  add_action( 'wp_enqueue_scripts', 'sb_instagram_styles_enqueue' );
198
  function sb_instagram_styles_enqueue() {
199
+ wp_register_style( 'sb_instagram_styles', plugins_url('css/sb-instagram.css', __FILE__), array(), SBIVER );
200
  wp_enqueue_style( 'sb_instagram_styles' );
201
  wp_enqueue_style( 'sb_instagram_icons', '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css?1', array(), '4.2.0' );
202
  }
205
  add_action( 'wp_enqueue_scripts', 'sb_instagram_scripts_enqueue' );
206
  function sb_instagram_scripts_enqueue() {
207
  //Register the script to make it available
208
+ wp_register_script( 'sb_instagram_scripts', plugins_url( '/js/sb-instagram.js' , __FILE__ ), array('jquery'), SBIVER, true );
209
 
210
  //Options to pass to JS file
211
  $sb_instagram_settings = get_option('sb_instagram_settings');
js/sb-instagram.js CHANGED
@@ -90,7 +90,7 @@ function sbi_init(){
90
  //Add the header
91
  $self.find('.sb_instagram_header').prepend( $header );
92
  //Change the URL of the follow button
93
- if( $self.find('.sbi_follow_btn').length ) $self.find('.sbi_follow_btn a').prop('href', 'http://instagram.com/' + data.data.username )
94
  }
95
  });
96
 
@@ -104,7 +104,7 @@ function sbi_init(){
104
  sortBy: sortby,
105
  resolution: imgRes,
106
  limit: parseInt( num, 10 ),
107
- 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}}" class="sbi_hide" /></a></div></div>',
108
  filter: function(image) {
109
  //Create time for sorting
110
  var date = new Date(image.created_time*1000),
@@ -142,9 +142,9 @@ function sbi_init(){
142
  });
143
 
144
  //Only show images once they are fully loaded. Prevents issue in Firefox where alt text is shown initially before images appear.
145
- jQuery('#sb_instagram .sbi_new img').on('load', function() {
146
- jQuery(this).removeClass('sbi_hide');
147
- });
148
 
149
 
150
  //Sort posts by date
90
  //Add the header
91
  $self.find('.sb_instagram_header').prepend( $header );
92
  //Change the URL of the follow button
93
+ if( $self.find('.sbi_follow_btn').length ) $self.find('.sbi_follow_btn a').attr('href', 'http://instagram.com/' + data.data.username )
94
  }
95
  });
96
 
104
  sortBy: sortby,
105
  resolution: imgRes,
106
  limit: parseInt( num, 10 ),
107
+ 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}}" /></a></div></div>',
108
  filter: function(image) {
109
  //Create time for sorting
110
  var date = new Date(image.created_time*1000),
142
  });
143
 
144
  //Only show images once they are fully loaded. Prevents issue in Firefox where alt text is shown initially before images appear.
145
+ // jQuery('#sb_instagram .sbi_new img').on('load', function() {
146
+ // jQuery(this).removeClass('sbi_hide');
147
+ // });
148
 
149
 
150
  //Sort posts by date