AccessPress Instagram Feed - Version 2.1.2

Version Description

  • Done the bug fixings for compatible issue with the June 1st Instagram API changes.
Download this release

Release Info

Developer Access Keys
Plugin Icon 128x128 AccessPress Instagram Feed
Version 2.1.2
Comparing to
See all releases

Code changes from version 2.1.1 to 2.1.2

accesspress-instagram-feed.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
  /*
4
- Plugin name: AccessPress Instagram Feed
5
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-instagram-feed/
6
  Description: A plugin to add various instagram widgets with dynamic configuration options.
7
- Version: 2.1.1
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain:accesspress-instagram-feed
@@ -14,7 +14,7 @@ License: GPLv2 or later
14
 
15
  //Decleration of the necessary constants for plugin
16
  if( !defined( 'APIF_VERSION' ) ) {
17
- define( 'APIF_VERSION', '2.1.1' );
18
  }
19
 
20
  if( !defined( 'APIF_IMAGE_DIR' ) ) {
1
  <?php
2
  defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
  /*
4
+ Plugin name: Instagram Feed for WordPress - AccessPress Instagram Feed
5
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-instagram-feed/
6
  Description: A plugin to add various instagram widgets with dynamic configuration options.
7
+ Version: 2.1.2
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain:accesspress-instagram-feed
14
 
15
  //Decleration of the necessary constants for plugin
16
  if( !defined( 'APIF_VERSION' ) ) {
17
+ define( 'APIF_VERSION', '2.1.2' );
18
  }
19
 
20
  if( !defined( 'APIF_IMAGE_DIR' ) ) {
inc/backend/boards/instagram-profiles.php CHANGED
@@ -21,8 +21,24 @@
21
  <div class="apsc-option-inner-wrapper">
22
  <label><?php _e('Instagram Access Token', 'accesspress-instagram-feed'); ?></label>
23
  <div class="apsc-option-field">
24
- <input type="text" name="instagram[access_token]" value="<?php echo esc_attr($apif_settings['access_token']);?>"/>
25
- <div class="apsc-option-note"><?php _e('Please enter the instagram Access Token.You can get this information from <a href="http://www.pinceladasdaweb.com.br/instagram/access-token/" target="_blank">http://www.pinceladasdaweb.com.br/instagram/access-token/</a>', 'accesspress-instagram-feed'); ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  </div>
27
  </div>
28
  </div>
21
  <div class="apsc-option-inner-wrapper">
22
  <label><?php _e('Instagram Access Token', 'accesspress-instagram-feed'); ?></label>
23
  <div class="apsc-option-field">
24
+ <?php
25
+ if(isset($_GET['access_token'])){
26
+ $access_token = $_GET['access_token'];
27
+ }else if(isset($apif_settings['access_token']) && $apif_settings['access_token'] !=''){
28
+ $access_token = $apif_settings['access_token'];
29
+ }else{
30
+ $access_token = '';
31
+ }
32
+ ?>
33
+ <input type="text" name="instagram[access_token]" value="<?php echo esc_attr($access_token); ?>"/>
34
+ <div class="apsc-option-note">
35
+ <?php _e('Please enter the instagram Access Token.You can get this by clicking the below link. If new access token not received in the above access token field, please copy the access token from the url above after access_token=', 'accesspress-instagram-feed'); ?>
36
+ <?php _e("Please don't forget to click save button.", 'accesspress-instagram-feed'); ?>
37
+ <?php $new_url = urlencode(admin_url('admin.php?page=if-instagram-feed')) . '&response_type=token'; ?>
38
+ <div id="login_with_instagram">
39
+ <a href="https://api.instagram.com/oauth/authorize/?client_id=54da896cf80343ecb0e356ac5479d9ec&scope=basic+public_content&redirect_uri=http://api.web-dorado.com/instagram/?return_url=<?php echo $new_url;?>">Get Access Token</a>
40
+ </div>
41
+ </div>
42
  </div>
43
  </div>
44
  </div>
inc/backend/widgetside.php CHANGED
@@ -46,7 +46,17 @@ class APIF_SideWidget extends WP_Widget {
46
  $user_id = !empty($apif_settings['user_id']) ? $apif_settings['user_id'] : '';
47
  $social_profile_url = 'https://instagram.com/' . $username;
48
  $access_token = !empty($apif_settings['access_token']) ? $apif_settings['access_token'] : '';
49
-
 
 
 
 
 
 
 
 
 
 
50
  $api_url = 'https://api.instagram.com/v1/users/' . $user_id . '?access_token=' . $access_token;
51
  $connection = wp_remote_get($api_url);
52
  $response = json_decode($connection['body'], true);
46
  $user_id = !empty($apif_settings['user_id']) ? $apif_settings['user_id'] : '';
47
  $social_profile_url = 'https://instagram.com/' . $username;
48
  $access_token = !empty($apif_settings['access_token']) ? $apif_settings['access_token'] : '';
49
+ $url = "https://api.instagram.com/v1/users/search?q=" . $username . "&access_token=" . $access_token;
50
+ $get = wp_remote_get( $url );
51
+ $response = wp_remote_retrieve_body( $get );
52
+ $json = json_decode( $response );
53
+ foreach( $json->data as $user )
54
+ {
55
+ if( $user->username == $username )
56
+ {
57
+ $user_id = $user->id;
58
+ }
59
+ }
60
  $api_url = 'https://api.instagram.com/v1/users/' . $user_id . '?access_token=' . $access_token;
61
  $connection = wp_remote_get($api_url);
62
  $response = json_decode($connection['body'], true);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === AccessPress Instagram Feed ===
2
  Contributors: Access Keys
3
  Tags: instagram, instagram feed, instagram tag, instagram slider, instagarm mosaic view, instagarm mosaic layout, instagram lightbox, social media instagram, social network, masonry layout, masonry lightbox, instagarm masonry view, grid rotator, grid rotatory
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.5
7
- Stable tag: 2.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -17,6 +17,8 @@ You can enter details of your instagram social media and select one of the desig
17
 
18
  All you have to do is either use a widget or shortcode to display your instagram feed right on your website in your chosen location.
19
 
 
 
20
  = Features: =
21
 
22
  * <strong>Fetch Instagram Feeds from any account using instagram API</strong>
@@ -130,6 +132,9 @@ Once you install the plugin , you can check some general documentation about how
130
  5. Backend Display Settings Section
131
 
132
  == Changelog ==
 
 
 
133
  = 2.1.1 =
134
  * Updated the follow widget - Added an option to disable the header div, Added option to link images to instagram.
135
  * Done the bug fixing for the options available for follow widget.
1
+ === Instagram Feed for WordPress - AccessPress Instagram Feed ===
2
  Contributors: Access Keys
3
  Tags: instagram, instagram feed, instagram tag, instagram slider, instagarm mosaic view, instagarm mosaic layout, instagram lightbox, social media instagram, social network, masonry layout, masonry lightbox, instagarm masonry view, grid rotator, grid rotatory
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.5
7
+ Stable tag: 2.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
17
 
18
  All you have to do is either use a widget or shortcode to display your instagram feed right on your website in your chosen location.
19
 
20
+ <strong>NOTICE: With the change in the Instagram API after June 1 you need to get a new access token by clicking "Get access token" link if the instagram feed is not working in the instagram profile tab. </strong>
21
+
22
  = Features: =
23
 
24
  * <strong>Fetch Instagram Feeds from any account using instagram API</strong>
132
  5. Backend Display Settings Section
133
 
134
  == Changelog ==
135
+ = 2.1.2 =
136
+ * Done the bug fixings for compatible issue with the June 1st Instagram API changes.
137
+
138
  = 2.1.1 =
139
  * Updated the follow widget - Added an option to disable the header div, Added option to link images to instagram.
140
  * Done the bug fixing for the options available for follow widget.