Instagram Feed - Version 2.5.2

Version Description

  • Fix: Fixed an issue with an Instagram API change causing some images not to display if the image resizing feature was disabled.
Download this release

Release Info

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

Code changes from version 2.5.1 to 2.5.2

README.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: smashballoon, craig-at-smash-balloon
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.4
5
- Tested up to: 5.5.1
6
- Stable tag: 2.5.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -331,6 +331,9 @@ We understand that sometimes you need help, have issues or just have questions.
331
  * Plus more customization options added all the time!
332
 
333
  == Changelog ==
 
 
 
334
  = 2.5.1 =
335
  * Tweak: Minor update to footer.php template.
336
  * Tweak: Added support for improved notices on the plugin settings page.
2
  Contributors: smashballoon, craig-at-smash-balloon
3
  Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
4
  Requires at least: 3.4
5
+ Tested up to: 5.5
6
+ Stable tag: 2.5.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
331
  * Plus more customization options added all the time!
332
 
333
  == Changelog ==
334
+ = 2.5.2 =
335
+ * Fix: Fixed an issue with an Instagram API change causing some images not to display if the image resizing feature was disabled.
336
+
337
  = 2.5.1 =
338
  * Tweak: Minor update to footer.php template.
339
  * Tweak: Added support for improved notices on the plugin settings page.
inc/class-sb-instagram-parse.php CHANGED
@@ -143,6 +143,7 @@ class SB_Instagram_Parse
143
  * @since 2.1.3/5.2.3 added 'd' element as a default backup from the API
144
  */
145
  public static function get_media_src_set( $post, $resized_images = array() ) {
 
146
  $media_urls = array(
147
  'd' => SB_Instagram_Parse::get_media_url( $post ),
148
  '150' => '',
@@ -151,7 +152,6 @@ class SB_Instagram_Parse
151
  );
152
  $account_type = isset( $post['images'] ) ? 'personal' : 'business';
153
 
154
-
155
  if ( $account_type === 'personal' ) {
156
  $media_urls['150'] = $post['images']['thumbnail']['url'];
157
  $media_urls['320'] = $post['images']['low_resolution']['url'];
@@ -159,15 +159,9 @@ class SB_Instagram_Parse
159
  } else {
160
  $post_id = SB_Instagram_Parse::get_post_id( $post );
161
 
162
- $permalink = SB_Instagram_Parse::fix_permalink( SB_Instagram_Parse::get_permalink( $post ) );
163
-
164
- if ( ($post['media_type'] === 'CAROUSEL_ALBUM' || $post['media_type'] === 'VIDEO') && ($media_urls['640'] === '' || $media_urls['640'] === 'video' || $media_urls['640'] === 'pending')) {
165
- $media_urls['640'] = $permalink . 'media/?size=l';
166
- } else {
167
- $media_urls['640'] = isset( $post['media_url'] ) ? $post['media_url'] : $permalink . 'media/?size=l';
168
- }
169
- $media_urls['150'] = $permalink . 'media/?size=t';
170
- $media_urls['320'] = $permalink . 'media/?size=m';
171
 
172
  // use resized images if exists
173
  if ( isset( $resized_images[ $post_id ]['id'] )
143
  * @since 2.1.3/5.2.3 added 'd' element as a default backup from the API
144
  */
145
  public static function get_media_src_set( $post, $resized_images = array() ) {
146
+ $full_size = SB_Instagram_Parse::get_media_url( $post );
147
  $media_urls = array(
148
  'd' => SB_Instagram_Parse::get_media_url( $post ),
149
  '150' => '',
152
  );
153
  $account_type = isset( $post['images'] ) ? 'personal' : 'business';
154
 
 
155
  if ( $account_type === 'personal' ) {
156
  $media_urls['150'] = $post['images']['thumbnail']['url'];
157
  $media_urls['320'] = $post['images']['low_resolution']['url'];
159
  } else {
160
  $post_id = SB_Instagram_Parse::get_post_id( $post );
161
 
162
+ $media_urls['640'] = $full_size;
163
+ $media_urls['150'] = $full_size;
164
+ $media_urls['320'] = $full_size;
 
 
 
 
 
 
165
 
166
  // use resized images if exists
167
  if ( isset( $resized_images[ $post_id ]['id'] )
instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Smash Balloon Instagram Feed
4
  Plugin URI: https://smashballoon.com/instagram-feed
5
  Description: Display beautifully clean, customizable, and responsive Instagram feeds.
6
- Version: 2.5.1
7
  Author: Smash Balloon
8
  Author URI: https://smashballoon.com/
9
  License: GPLv2 or later
@@ -23,7 +23,7 @@ along with this program; if not, write to the Free Software
23
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
  if ( ! defined( 'SBIVER' ) ) {
26
- define( 'SBIVER', '2.5.1' );
27
  }
28
  // Db version.
29
  if ( ! defined( 'SBI_DBVERSION' ) ) {
3
  Plugin Name: Smash Balloon Instagram Feed
4
  Plugin URI: https://smashballoon.com/instagram-feed
5
  Description: Display beautifully clean, customizable, and responsive Instagram feeds.
6
+ Version: 2.5.2
7
  Author: Smash Balloon
8
  Author URI: https://smashballoon.com/
9
  License: GPLv2 or later
23
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
  */
25
  if ( ! defined( 'SBIVER' ) ) {
26
+ define( 'SBIVER', '2.5.2' );
27
  }
28
  // Db version.
29
  if ( ! defined( 'SBI_DBVERSION' ) ) {