Instagram Widget by WPZOOM - Version 2.0.2

Version Description

  • Fixing some issues with the legacy widget
Download this release

Release Info

Developer WPZOOM
Plugin Icon 128x128 Instagram Widget by WPZOOM
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

class-wpzoom-instagram-widget.php CHANGED
@@ -182,6 +182,7 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
182
  * @param array $instance Saved values from database.
183
  */
184
  public function widget( $args, $instance ) {
 
185
  $this->api = Wpzoom_Instagram_Widget_API::getInstance();
186
 
187
  $this->enqueue_scripts();
@@ -194,6 +195,21 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
194
  echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
195
  }
196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  $items = $this->api->get_items( $instance );
198
  $errors = $this->api->errors->get_error_messages();
199
 
182
  * @param array $instance Saved values from database.
183
  */
184
  public function widget( $args, $instance ) {
185
+
186
  $this->api = Wpzoom_Instagram_Widget_API::getInstance();
187
 
188
  $this->enqueue_scripts();
195
  echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
196
  }
197
 
198
+ $get_user = get_posts(
199
+ array(
200
+ 'numberposts' => 1,
201
+ 'orderby' => 'date',
202
+ 'order' => 'ASC',
203
+ 'post_type' => 'wpz-insta_user'
204
+ )
205
+ );
206
+
207
+ $user_id = isset( $get_user[0]->ID ) ? intval( $get_user[0]->ID ) : -1;
208
+ $user_account_token = get_post_meta( $user_id, '_wpz-insta_token', true ) ?: '-1';
209
+
210
+ //Set token from first created user
211
+ $this->api->set_access_token( $user_account_token );
212
+
213
  $items = $this->api->get_items( $instance );
214
  $errors = $this->api->errors->get_error_messages();
215
 
instagram-widget-by-wpzoom.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WPZOOM Instagram Widget & Block
4
  * Plugin URI: https://www.wpzoom.com/plugins/instagram-widget/
5
  * Description: Instagram Widget is a customizable and responsive plugin, made to help you gain even more followers by showcasing your Instagram feed on your WordPress website.
6
- * Version: 2.0.1
7
  * Author: WPZOOM
8
  * Author URI: https://www.wpzoom.com/
9
  * Text Domain: instagram-widget-by-wpzoom
@@ -19,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) {
19
  }
20
 
21
  if ( ! defined( 'WPZOOM_INSTAGRAM_VERSION' ) ) {
22
- define( 'WPZOOM_INSTAGRAM_VERSION', '2.0.1' );
23
  }
24
 
25
  require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-image-uploader.php';
3
  * Plugin Name: WPZOOM Instagram Widget & Block
4
  * Plugin URI: https://www.wpzoom.com/plugins/instagram-widget/
5
  * Description: Instagram Widget is a customizable and responsive plugin, made to help you gain even more followers by showcasing your Instagram feed on your WordPress website.
6
+ * Version: 2.0.2
7
  * Author: WPZOOM
8
  * Author URI: https://www.wpzoom.com/
9
  * Text Domain: instagram-widget-by-wpzoom
19
  }
20
 
21
  if ( ! defined( 'WPZOOM_INSTAGRAM_VERSION' ) ) {
22
+ define( 'WPZOOM_INSTAGRAM_VERSION', '2.0.2' );
23
  }
24
 
25
  require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-image-uploader.php';
readme.txt CHANGED
@@ -96,6 +96,9 @@ Yes, you can find the documentation for this plugin with more instructions on ou
96
 
97
  == Changelog ==
98
 
 
 
 
99
  = 2.0.1 =
100
  * Minor bug fixes
101
 
96
 
97
  == Changelog ==
98
 
99
+ = 2.0.2 =
100
+ * Fixing some issues with the legacy widget
101
+
102
  = 2.0.1 =
103
  * Minor bug fixes
104