Version Description
- Issue Fixed: Couldnot get access token on clicking Get Access Token button on plugin main setting page issue fixed.
- Added: On click Get Access Token, user id and instagram user name will automatically load on its input field.
- Few Refinement Work on Backend CSS Done
Download this release
Release Info
Developer | Access Keys |
Plugin | ![]() |
Version | 3.0.8 |
Comparing to | |
See all releases |
Code changes from version 3.0.7 to 3.0.8
- accesspress-instagram-feed.php +2 -2
- css/backend.css +13 -2
- css/frontend.css +1 -1
- inc/backend/boards/instagram-profiles.php +46 -19
- js/backend.js +10 -0
- readme.txt +6 -1
accesspress-instagram-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin name: AccessPress Instagram Feed
|
4 |
Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-instagram-feed/
|
5 |
Description: A plugin to add various instagram widgets with dynamic configuration options.
|
6 |
-
Version: 3.0.
|
7 |
Author: AccessPress Themes
|
8 |
Author URI: http://accesspressthemes.com
|
9 |
Text Domain:accesspress-instagram-feed
|
@@ -13,7 +13,7 @@ License: GPLv2 or later
|
|
13 |
|
14 |
//Decleration of the necessary constants for plugin
|
15 |
if( !defined( 'APIF_VERSION' ) ) {
|
16 |
-
define( 'APIF_VERSION', '3.0.
|
17 |
}
|
18 |
|
19 |
if( !defined( 'APIF_IMAGE_DIR' ) ) {
|
3 |
Plugin name: AccessPress Instagram Feed
|
4 |
Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-instagram-feed/
|
5 |
Description: A plugin to add various instagram widgets with dynamic configuration options.
|
6 |
+
Version: 3.0.8
|
7 |
Author: AccessPress Themes
|
8 |
Author URI: http://accesspressthemes.com
|
9 |
Text Domain:accesspress-instagram-feed
|
13 |
|
14 |
//Decleration of the necessary constants for plugin
|
15 |
if( !defined( 'APIF_VERSION' ) ) {
|
16 |
+
define( 'APIF_VERSION', '3.0.8' );
|
17 |
}
|
18 |
|
19 |
if( !defined( 'APIF_IMAGE_DIR' ) ) {
|
css/backend.css
CHANGED
@@ -791,6 +791,17 @@ min-height: 40px; margin:20px 0px 0 0; clear: both; display: block; text-align:
|
|
791 |
@media( max-width: 980px){
|
792 |
.apsc-boards-wrapper{ width: 100%; clear: both; float: none; }
|
793 |
.apif-upgrade-banner {width: 100%; clear: both; float: none; text-align: center;}
|
794 |
-
|
795 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
796 |
}
|
791 |
@media( max-width: 980px){
|
792 |
.apsc-boards-wrapper{ width: 100%; clear: both; float: none; }
|
793 |
.apif-upgrade-banner {width: 100%; clear: both; float: none; text-align: center;}
|
794 |
+
}
|
795 |
+
#login_with_instagram{
|
796 |
+
background: #72b73f;
|
797 |
+
padding: 6px;
|
798 |
+
margin-top: 6px;
|
799 |
+
width: 148px;
|
800 |
+
text-align: center;
|
801 |
+
font-size: 14px;
|
802 |
+
border-radius: 4px;
|
803 |
+
}
|
804 |
+
#login_with_instagram a{
|
805 |
+
color: #ffffff;
|
806 |
+
text-decoration:none;
|
807 |
}
|
css/frontend.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
* Frontend Style - Version 3.0.
|
3 |
*/
|
4 |
/*******************************Mosaic View layout*************************************/
|
5 |
.clearfix:before,
|
1 |
/*
|
2 |
+
* Frontend Style - Version 3.0.8
|
3 |
*/
|
4 |
/*******************************Mosaic View layout*************************************/
|
5 |
.clearfix:before,
|
inc/backend/boards/instagram-profiles.php
CHANGED
@@ -1,6 +1,34 @@
|
|
1 |
<?php defined( 'ABSPATH' ) or die( "No script kiddies please!" ); ?>
|
2 |
<div class="apsc-boards-tabs" id="apsc-board-social-profile-settings">
|
3 |
<div class="apsc-tab-wrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
<!--Instagram-->
|
5 |
<div class="apsc-option-outer-wrapper">
|
6 |
<h4><?php _e('Instagram Settings', 'accesspress-instagram-feed') ?></h4>
|
@@ -8,48 +36,47 @@
|
|
8 |
<div class="apsc-option-inner-wrapper">
|
9 |
<label for='instagram_username'><?php _e('Instagram Username', 'accesspress-instagram-feed'); ?></label>
|
10 |
<div class="apsc-option-field">
|
11 |
-
<input type="text" name="instagram[username]" id='instagram_username' value="<?php echo esc_attr($
|
12 |
-
<div class="apsc-option-note"><?php _e('
|
13 |
</div>
|
14 |
</div>
|
15 |
<div class="apsc-option-inner-wrapper">
|
16 |
<label for='instagram_user_id'><?php _e('Instagram User ID(Optional)', 'accesspress-instagram-feed'); ?></label>
|
17 |
<div class="apsc-option-field">
|
18 |
-
<input type="text" name="instagram[user_id]" id='instagram_user_id' value="<?php echo
|
19 |
-
<div class="apsc-option-note"><?php _e('
|
20 |
</div>
|
21 |
</div>
|
22 |
<div class="apsc-option-inner-wrapper">
|
23 |
<label for='instagram_access_token'><?php _e('Instagram Access Token', 'accesspress-instagram-feed'); ?></label>
|
24 |
<div class="apsc-option-field">
|
25 |
-
<?php
|
26 |
-
if(isset($_GET['access_token'])){
|
27 |
-
$access_token = $_GET['access_token'];
|
28 |
-
}else if(isset($apif_settings['access_token']) && $apif_settings['access_token'] !=''){
|
29 |
-
$access_token = $apif_settings['access_token'];
|
30 |
-
}else{
|
31 |
-
$access_token = '';
|
32 |
-
}
|
33 |
-
?>
|
34 |
<input type="text" name="instagram[access_token]" id='instagram_access_token' value="<?php echo esc_attr($access_token); ?>"/>
|
35 |
<div class="apsc-option-note">
|
36 |
<?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 Instagram access token field, please copy the access token from the url above after access_token=', 'accesspress-instagram-feed'); ?>
|
37 |
<?php _e("Please don't forget to click save button.", 'accesspress-instagram-feed'); ?>
|
38 |
-
<?php
|
|
|
|
|
|
|
39 |
<div id="login_with_instagram">
|
|
|
|
|
40 |
<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>
|
|
|
|
|
|
|
41 |
</div>
|
42 |
</div>
|
43 |
</div>
|
44 |
</div>
|
45 |
|
46 |
-
|
47 |
-
<label for='instagram_user_id'
|
48 |
<div class="apsc-option-field">
|
49 |
-
<input type="text" name="instagram[user_id]" id='instagram_user_id' value="
|
50 |
-
<div class="apsc-option-note"
|
51 |
</div>
|
52 |
-
</div>
|
53 |
|
54 |
<div class="apsc-option-inner-wrapper">
|
55 |
<label for='enablecache'><?php _e('Enable Cache?', 'accesspress-instagram-feed'); ?></label>
|
1 |
<?php defined( 'ABSPATH' ) or die( "No script kiddies please!" ); ?>
|
2 |
<div class="apsc-boards-tabs" id="apsc-board-social-profile-settings">
|
3 |
<div class="apsc-tab-wrapper">
|
4 |
+
<?php
|
5 |
+
$username = '';
|
6 |
+
$user_id = '';
|
7 |
+
$access_token = '';
|
8 |
+
if(isset($_GET['access_token'])){
|
9 |
+
$access_token = $_GET['access_token'];
|
10 |
+
$url = 'https://api.instagram.com/v1/users/self/?access_token=' . $_GET['access_token'];
|
11 |
+
$content = wp_remote_get( $url );
|
12 |
+
if( !isset( $content->errors ) ){
|
13 |
+
$response = wp_remote_retrieve_body( $content );
|
14 |
+
$json = json_decode( $response, true );
|
15 |
+
if(!empty($json['data'])){
|
16 |
+
$username = $json['data']['username'];
|
17 |
+
$user_id = $json['data']['id'];
|
18 |
+
}
|
19 |
+
}
|
20 |
+
}else{
|
21 |
+
if(isset($apif_settings['username']) && $apif_settings['username'] !=''){
|
22 |
+
$username = $apif_settings['username'];
|
23 |
+
}
|
24 |
+
if(isset($apif_settings['user_id']) && $apif_settings['user_id'] !=''){
|
25 |
+
$user_id = $apif_settings['user_id'];
|
26 |
+
}
|
27 |
+
if(isset($apif_settings['access_token']) && $apif_settings['access_token'] !=''){
|
28 |
+
$access_token = $apif_settings['access_token'];
|
29 |
+
}
|
30 |
+
}
|
31 |
+
?>
|
32 |
<!--Instagram-->
|
33 |
<div class="apsc-option-outer-wrapper">
|
34 |
<h4><?php _e('Instagram Settings', 'accesspress-instagram-feed') ?></h4>
|
36 |
<div class="apsc-option-inner-wrapper">
|
37 |
<label for='instagram_username'><?php _e('Instagram Username', 'accesspress-instagram-feed'); ?></label>
|
38 |
<div class="apsc-option-field">
|
39 |
+
<input type="text" name="instagram[username]" id='instagram_username' value="<?php echo esc_attr($username);?>"/>
|
40 |
+
<div class="apsc-option-note"><?php _e('Note: If not loaded automatically after clicking <strong>Get Access Token</strong> button provided below, please enter the instagram username.', 'accesspress-instagram-feed'); ?></div>
|
41 |
</div>
|
42 |
</div>
|
43 |
<div class="apsc-option-inner-wrapper">
|
44 |
<label for='instagram_user_id'><?php _e('Instagram User ID(Optional)', 'accesspress-instagram-feed'); ?></label>
|
45 |
<div class="apsc-option-field">
|
46 |
+
<input type="text" name="instagram[user_id]" id='instagram_user_id' value="<?php echo $user_id;?>"/>
|
47 |
+
<div class="apsc-option-note"><?php _e('Note: If not loaded automatically after clicking <strong>Get Access Token</strong> button provided below, please get your instagram user id from the below access token input field, after receiving access token.The first numbers before "." (dot) is your instagram user id.', 'accesspress-instagram-feed'); ?></div>
|
48 |
</div>
|
49 |
</div>
|
50 |
<div class="apsc-option-inner-wrapper">
|
51 |
<label for='instagram_access_token'><?php _e('Instagram Access Token', 'accesspress-instagram-feed'); ?></label>
|
52 |
<div class="apsc-option-field">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
<input type="text" name="instagram[access_token]" id='instagram_access_token' value="<?php echo esc_attr($access_token); ?>"/>
|
54 |
<div class="apsc-option-note">
|
55 |
<?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 Instagram access token field, please copy the access token from the url above after access_token=', 'accesspress-instagram-feed'); ?>
|
56 |
<?php _e("Please don't forget to click save button.", 'accesspress-instagram-feed'); ?>
|
57 |
+
<?php
|
58 |
+
$return_url = urlencode(admin_url('admin.php?page=if-instagram-feed')) . '&response_type=token&state='. admin_url('admin.php?if-instagram-feed');
|
59 |
+
// $new_url = urlencode(admin_url('admin.php?page=if-instagram-feed')) . '&response_type=token';
|
60 |
+
?>
|
61 |
<div id="login_with_instagram">
|
62 |
+
<?php
|
63 |
+
/*
|
64 |
<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>
|
65 |
+
*/?>
|
66 |
+
<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 $return_url; ?>">
|
67 |
+
<?php _e('Get New Access Token', 'accesspress-instagram-feed'); ?></a>
|
68 |
</div>
|
69 |
</div>
|
70 |
</div>
|
71 |
</div>
|
72 |
|
73 |
+
<!-- <div class="apsc-option-inner-wrapper">
|
74 |
+
<label for='instagram_user_id'>< ?php _e('Instagram User ID(Optional)', 'accesspress-instagram-feed'); ?></label>
|
75 |
<div class="apsc-option-field">
|
76 |
+
<input type="text" name="instagram[user_id]" id='instagram_user_id' value="< ?php echo esc_attr($apif_settings['user_id']);?>"/>
|
77 |
+
<div class="apsc-option-note">< ?php _e('Please get your instagram user id from the below access token input field, after receiving access token. The first numbers before . is your instagram user id', 'accesspress-instagram-feed'); ?></div>
|
78 |
</div>
|
79 |
+
</div> -->
|
80 |
|
81 |
<div class="apsc-option-inner-wrapper">
|
82 |
<label for='enablecache'><?php _e('Enable Cache?', 'accesspress-instagram-feed'); ?></label>
|
js/backend.js
CHANGED
@@ -1,6 +1,16 @@
|
|
1 |
(function ($) {
|
2 |
$(function () {
|
3 |
//All the backend js for the plugin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
/*
|
5 |
Settings Tabs Switching
|
6 |
*/
|
1 |
(function ($) {
|
2 |
$(function () {
|
3 |
//All the backend js for the plugin
|
4 |
+
|
5 |
+
if($('#instagram_access_token').val() !== ''){
|
6 |
+
var access = window.location.hash.substring(14);
|
7 |
+
var url = window.location.href;
|
8 |
+
var arr = url.split('&');
|
9 |
+
arr.pop();
|
10 |
+
//console.log(arr[0]);
|
11 |
+
window.history.replaceState(null, null, arr[0]);
|
12 |
+
}
|
13 |
+
|
14 |
/*
|
15 |
Settings Tabs Switching
|
16 |
*/
|
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: 5.0
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -153,6 +153,11 @@ Once you install the plugin , you can check some general documentation about how
|
|
153 |
5. Backend Display Settings Section
|
154 |
|
155 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
156 |
= 3.0.7 =
|
157 |
* Compatibility check with Latest WordPress Version.
|
158 |
* New Feature: Added Enable Cache and cache period option on backend to resolve the issue with instagram feed API unlimited call.
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.0
|
7 |
+
Stable tag: 3.0.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
153 |
5. Backend Display Settings Section
|
154 |
|
155 |
== Changelog ==
|
156 |
+
= 3.0.8 =
|
157 |
+
* Issue Fixed: Couldnot get access token on clicking Get Access Token button on plugin main setting page issue fixed.
|
158 |
+
* Added: On click Get Access Token, user id and instagram user name will automatically load on its input field.
|
159 |
+
* Few Refinement Work on Backend CSS Done
|
160 |
+
|
161 |
= 3.0.7 =
|
162 |
* Compatibility check with Latest WordPress Version.
|
163 |
* New Feature: Added Enable Cache and cache period option on backend to resolve the issue with instagram feed API unlimited call.
|