AccessPress Instagram Feed - Version 1.0.3

Version Description

  • Fixed bug in widget file about file path.
Download this release

Release Info

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

Code changes from version 1.0.2 to 1.0.3

accesspress-instagram-feed.php CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
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: 1.0.2
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain:if-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', '1.0.2' );
18
  }
19
 
20
  if( !defined( 'APIF_IMAGE_DIR' ) ){
@@ -29,6 +29,10 @@ if( !defined( 'APIF_CSS_DIR' ) ){
29
  define ( 'APIF_CSS_DIR', plugin_dir_url( __FILE__ ) . 'css' );
30
  }
31
 
 
 
 
 
32
  if( !defined( 'APIF_LANG_DIR' ) ){
33
  define ( 'APIF_LANG_DIR', basename( dirname( __FILE__ ) ). '/languages/' );
34
  }
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: 1.0.3
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain:if-feed
14
 
15
  //Decleration of the necessary constants for plugin
16
  if(!defined ( 'APIF_VERSION' ) ){
17
+ define ( 'APIF_VERSION', '1.0.3' );
18
  }
19
 
20
  if( !defined( 'APIF_IMAGE_DIR' ) ){
29
  define ( 'APIF_CSS_DIR', plugin_dir_url( __FILE__ ) . 'css' );
30
  }
31
 
32
+ if( !defined( 'APIF_INST_PATH' ) ){
33
+ define ( 'APIF_INST_PATH', plugin_dir_path( __FILE__ ) );
34
+ }
35
+
36
  if( !defined( 'APIF_LANG_DIR' ) ){
37
  define ( 'APIF_LANG_DIR', basename( dirname( __FILE__ ) ). '/languages/' );
38
  }
inc/backend/instagram.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
- class InstaWCD{
3
- function userID(){
4
- $username = strtolower($this->username); // sanitization
5
- $token = $this->access_token;
6
-
7
- if(!empty($username) && !empty($token)) {
8
-
9
- $url = "https://api.instagram.com/v1/users/search?q=".$username."&access_token=".$token;
10
-
11
- $get = wp_remote_get($url);
12
- $response = wp_remote_retrieve_body( $get );
13
- $json = json_decode($response);
14
-
15
- foreach($json->data as $user){
16
- if($user->username == $username){
17
- return $user->id;
18
- }
19
- }
20
- return '00000000'; // return this if nothing is found
21
- }
22
- }
23
-
24
-
25
- function userMedia(){
26
-
27
- $url = 'https://api.instagram.com/v1/users/'.$this->userID().'/media/recent/?access_token='.$this->access_token;
28
-
29
- $content = wp_remote_get($url);
30
- $response = wp_remote_retrieve_body( $content );
31
- return $json = json_decode($response, true);
32
- }
33
- }
34
- $insta = new InstaWCD();
35
- $insta->username = $username;
36
- $insta->access_token = $access_token;
37
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/backend/widgetside.php CHANGED
@@ -85,7 +85,7 @@ global $apif_settings, $insta;
85
  <?php
86
 
87
  $count = $instagram_num_img;
88
- require_once(dirname(__FILE__) . '/instagram.php');
89
  $ins_media = $insta->userMedia();
90
  $j = 0;
91
  if(isset($ins_media['meta']['error_message'])){
85
  <?php
86
 
87
  $count = $instagram_num_img;
88
+ require_once(APIF_INST_PATH . 'inc/frontend/instagram.php');
89
  $ins_media = $insta->userMedia();
90
  $j = 0;
91
  if(isset($ins_media['meta']['error_message'])){
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: instagram, instagram feed, instagram tag, instagram slider, instagarm mosa
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.3
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -95,6 +95,9 @@ Once you install the plugin , you can check some general documentation about how
95
  5. Backend Display Settings Section
96
 
97
  == Changelog ==
 
 
 
98
  = 1.0.2 =
99
  * Bug fixing for invalid user credentials for latest instagram feeds.
100
  * Addition of the instagram widget with profile details.
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.3
7
+ Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
95
  5. Backend Display Settings Section
96
 
97
  == Changelog ==
98
+ = 1.0.3 =
99
+ * Fixed bug in widget file about file path.
100
+
101
  = 1.0.2 =
102
  * Bug fixing for invalid user credentials for latest instagram feeds.
103
  * Addition of the instagram widget with profile details.