Version Description
- Done the modification of the codes for bug fixing of operation time out.
- Done small bug fixings for the instagram slider layout.
Download this release
Release Info
Developer | Access Keys |
Plugin | AccessPress Instagram Feed |
Version | 2.0.8 |
Comparing to | |
See all releases |
Code changes from version 2.0.7 to 2.0.8
- accesspress-instagram-feed.php +4 -3
- inc/backend/widget.php +7 -12
- inc/frontend/instagram-feed.php +6 -8
- inc/frontend/instagram-slider.php +3 -3
- inc/frontend/instagram.php +5 -8
- js/frontend.js +0 -1
- readme.txt +6 -2
accesspress-instagram-feed.php
CHANGED
@@ -4,16 +4,17 @@ 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: 2.0.
|
8 |
Author: AccessPress Themes
|
9 |
Author URI: http://accesspressthemes.com
|
10 |
Text Domain:accesspress-instagram-feed
|
11 |
Domain Path: /languages/
|
12 |
License: GPLv2 or later
|
13 |
*/
|
|
|
14 |
//Decleration of the necessary constants for plugin
|
15 |
if( !defined( 'APIF_VERSION' ) ) {
|
16 |
-
define( 'APIF_VERSION', '2.0.
|
17 |
}
|
18 |
|
19 |
if( !defined( 'APIF_IMAGE_DIR' ) ) {
|
@@ -122,7 +123,7 @@ if( !class_exists( 'IF_Class' ) ) {
|
|
122 |
*/
|
123 |
function apif_settings_action() {
|
124 |
if( !empty( $_POST ) && wp_verify_nonce( $_POST['apif_settings_nonce'], 'apif_settings_action' ) ) {
|
125 |
-
|
126 |
include( 'inc/backend/save-settings.php' );
|
127 |
}
|
128 |
}
|
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.0.8
|
8 |
Author: AccessPress Themes
|
9 |
Author URI: http://accesspressthemes.com
|
10 |
Text Domain:accesspress-instagram-feed
|
11 |
Domain Path: /languages/
|
12 |
License: GPLv2 or later
|
13 |
*/
|
14 |
+
|
15 |
//Decleration of the necessary constants for plugin
|
16 |
if( !defined( 'APIF_VERSION' ) ) {
|
17 |
+
define( 'APIF_VERSION', '2.0.8' );
|
18 |
}
|
19 |
|
20 |
if( !defined( 'APIF_IMAGE_DIR' ) ) {
|
123 |
*/
|
124 |
function apif_settings_action() {
|
125 |
if( !empty( $_POST ) && wp_verify_nonce( $_POST['apif_settings_nonce'], 'apif_settings_action' ) ) {
|
126 |
+
|
127 |
include( 'inc/backend/save-settings.php' );
|
128 |
}
|
129 |
}
|
inc/backend/widget.php
CHANGED
@@ -28,30 +28,26 @@ class APIF_Widget extends WP_Widget {
|
|
28 |
|
29 |
echo $args['before_widget']; ?>
|
30 |
<div class='apif-widget-wrapper'>
|
31 |
-
<?php
|
32 |
if (!empty($instance['title'])) {
|
33 |
echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
|
34 |
}
|
35 |
|
36 |
-
if(isset($instance['layout']) && $instance['layout'] == 'layout-1')
|
37 |
-
{
|
38 |
echo do_shortcode('[ap_instagram_widget]');
|
39 |
}
|
40 |
-
else if(isset($instance['layout']) && $instance['layout'] == 'layout-2')
|
41 |
-
{
|
42 |
echo do_shortcode('[ap_instagram_mosaic_lightview]');
|
43 |
}
|
44 |
-
else if(isset($instance['layout']) && $instance['layout'] == 'layout-3')
|
45 |
-
{
|
46 |
echo do_shortcode('[ap_instagram_slider]');
|
47 |
}
|
48 |
-
else
|
49 |
-
{
|
50 |
echo do_shortcode('[ap_instagram_feed]');
|
51 |
}
|
52 |
?>
|
53 |
</div>
|
54 |
-
<?php
|
55 |
echo $args['after_widget'];
|
56 |
}
|
57 |
|
@@ -106,5 +102,4 @@ class APIF_Widget extends WP_Widget {
|
|
106 |
return $instance;
|
107 |
}
|
108 |
}
|
109 |
-
// class
|
110 |
-
?>
|
28 |
|
29 |
echo $args['before_widget']; ?>
|
30 |
<div class='apif-widget-wrapper'>
|
31 |
+
<?php
|
32 |
if (!empty($instance['title'])) {
|
33 |
echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
|
34 |
}
|
35 |
|
36 |
+
if(isset($instance['layout']) && $instance['layout'] == 'layout-1'){
|
|
|
37 |
echo do_shortcode('[ap_instagram_widget]');
|
38 |
}
|
39 |
+
else if(isset($instance['layout']) && $instance['layout'] == 'layout-2'){
|
|
|
40 |
echo do_shortcode('[ap_instagram_mosaic_lightview]');
|
41 |
}
|
42 |
+
else if(isset($instance['layout']) && $instance['layout'] == 'layout-3'){
|
|
|
43 |
echo do_shortcode('[ap_instagram_slider]');
|
44 |
}
|
45 |
+
else{
|
|
|
46 |
echo do_shortcode('[ap_instagram_feed]');
|
47 |
}
|
48 |
?>
|
49 |
</div>
|
50 |
+
<?php
|
51 |
echo $args['after_widget'];
|
52 |
}
|
53 |
|
102 |
return $instance;
|
103 |
}
|
104 |
}
|
105 |
+
// class APIF_Widget
|
|
inc/frontend/instagram-feed.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
3 |
-
|
4 |
$apif_settings = get_option( 'apif_settings' );
|
5 |
$username = !empty($apif_settings['username']) ? $apif_settings['username'] : ''; // your username
|
6 |
$access_token = !empty($apif_settings['access_token']) ? $apif_settings['access_token'] : '';
|
@@ -10,8 +10,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
10 |
require_once('instagram.php');
|
11 |
$ins_media = $insta->userMedia();
|
12 |
|
13 |
-
if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
|
14 |
-
?>
|
15 |
<section id="main" class="thumb-view">
|
16 |
<div class="row masonry for-mosaic isotope ifgrid">
|
17 |
<?php
|
@@ -19,7 +18,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
19 |
$j = 0;
|
20 |
if(isset($ins_media['meta']['error_message'])){
|
21 |
?>
|
22 |
-
<h1 class="widget-title-insta"><span><?php echo $ins_media['meta']['error_message']; ?></span></h1>
|
23 |
<?php
|
24 |
}else if (is_array($ins_media['data']) || is_object($ins_media['data'])) {
|
25 |
foreach ($ins_media['data'] as $vm):
|
@@ -120,7 +119,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
120 |
<div class="item">
|
121 |
<img src="<?php echo esc_url($imgslider); ?>" />
|
122 |
<?php if ($image_like == '1') : ?>
|
123 |
-
<!-- Image like
|
124 |
<span class="instagram_like_count">
|
125 |
<p class="instagram_imge_like">
|
126 |
<span class="insta like_image">
|
@@ -129,7 +128,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
129 |
<span class="count"><?php echo $likes = $vm['likes']['count']; ?></span>
|
130 |
</p>
|
131 |
</span>
|
132 |
-
<!-- Image like
|
133 |
<?php endif; ?>
|
134 |
</div>
|
135 |
<?php
|
@@ -152,7 +151,6 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
152 |
$img = $vm['images']['standard_resolution']['url'];
|
153 |
$image_url = APIF_IMAGE_DIR . '/image-square.png';
|
154 |
$image = $vm['images']['standard_resolution']['url'];
|
155 |
-
|
156 |
$link = $vm["link"];
|
157 |
$flow_icon = APIF_IMAGE_DIR . '/sc-icon.png';
|
158 |
?>
|
@@ -162,5 +160,5 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
162 |
</ul>
|
163 |
<?php } ?>
|
164 |
</div>
|
165 |
-
<?php
|
166 |
}
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
3 |
+
global $apif_settings, $insta;
|
4 |
$apif_settings = get_option( 'apif_settings' );
|
5 |
$username = !empty($apif_settings['username']) ? $apif_settings['username'] : ''; // your username
|
6 |
$access_token = !empty($apif_settings['access_token']) ? $apif_settings['access_token'] : '';
|
10 |
require_once('instagram.php');
|
11 |
$ins_media = $insta->userMedia();
|
12 |
|
13 |
+
if ($layout == 'mosaic' || $layout == 'mosaic_lightview') { ?>
|
|
|
14 |
<section id="main" class="thumb-view">
|
15 |
<div class="row masonry for-mosaic isotope ifgrid">
|
16 |
<?php
|
18 |
$j = 0;
|
19 |
if(isset($ins_media['meta']['error_message'])){
|
20 |
?>
|
21 |
+
<h1 class="widget-title-insta"><span><?php echo $ins_media['meta']['error_message']; ?></span></h1>
|
22 |
<?php
|
23 |
}else if (is_array($ins_media['data']) || is_object($ins_media['data'])) {
|
24 |
foreach ($ins_media['data'] as $vm):
|
119 |
<div class="item">
|
120 |
<img src="<?php echo esc_url($imgslider); ?>" />
|
121 |
<?php if ($image_like == '1') : ?>
|
122 |
+
<!-- Image like count section start -->
|
123 |
<span class="instagram_like_count">
|
124 |
<p class="instagram_imge_like">
|
125 |
<span class="insta like_image">
|
128 |
<span class="count"><?php echo $likes = $vm['likes']['count']; ?></span>
|
129 |
</p>
|
130 |
</span>
|
131 |
+
<!-- Image like count section end -->
|
132 |
<?php endif; ?>
|
133 |
</div>
|
134 |
<?php
|
151 |
$img = $vm['images']['standard_resolution']['url'];
|
152 |
$image_url = APIF_IMAGE_DIR . '/image-square.png';
|
153 |
$image = $vm['images']['standard_resolution']['url'];
|
|
|
154 |
$link = $vm["link"];
|
155 |
$flow_icon = APIF_IMAGE_DIR . '/sc-icon.png';
|
156 |
?>
|
160 |
</ul>
|
161 |
<?php } ?>
|
162 |
</div>
|
163 |
+
<?php
|
164 |
}
|
inc/frontend/instagram-slider.php
CHANGED
@@ -7,14 +7,14 @@ global $apif_settings, $insta;
|
|
7 |
$image_like = $apif_settings['active'];
|
8 |
$count = 10; // number of images to show
|
9 |
require_once('instagram.php');
|
|
|
10 |
?>
|
11 |
<div id="owl-demo" class="owl-carousel">
|
12 |
<?php
|
13 |
-
$ins_media_slider = $insta->userMedia();
|
14 |
$j = 0;
|
15 |
-
if(isset($
|
16 |
?>
|
17 |
-
<h1 class="widget-title-insta"><span><?php echo $
|
18 |
<?php
|
19 |
}else if (is_array($ins_media_slider['data']) || is_object($ins_media_slider['data'])) {
|
20 |
foreach ($ins_media_slider['data'] as $vm):
|
7 |
$image_like = $apif_settings['active'];
|
8 |
$count = 10; // number of images to show
|
9 |
require_once('instagram.php');
|
10 |
+
$ins_media_slider = $insta->userMedia();
|
11 |
?>
|
12 |
<div id="owl-demo" class="owl-carousel">
|
13 |
<?php
|
|
|
14 |
$j = 0;
|
15 |
+
if(isset($ins_media_slider['meta']['error_message'])){
|
16 |
?>
|
17 |
+
<h1 class="widget-title-insta"><span><?php echo $ins_media_slider['meta']['error_message']; ?></span></h1>
|
18 |
<?php
|
19 |
}else if (is_array($ins_media_slider['data']) || is_object($ins_media_slider['data'])) {
|
20 |
foreach ($ins_media_slider['data'] as $vm):
|
inc/frontend/instagram.php
CHANGED
@@ -25,8 +25,9 @@ class InstaWCD{
|
|
25 |
function get_remote_data_from_instagram_in_json($url){
|
26 |
$content = wp_remote_get( $url );
|
27 |
if(isset($content->errors)){
|
28 |
-
|
29 |
-
|
|
|
30 |
}else{
|
31 |
$response = wp_remote_retrieve_body( $content );
|
32 |
$json = json_decode( $response, true );
|
@@ -38,12 +39,8 @@ class InstaWCD{
|
|
38 |
$url = 'https://api.instagram.com/v1/users/'.$this->userID().'/media/recent/?access_token='.$this->access_token;
|
39 |
$json = self:: get_remote_data_from_instagram_in_json( $url );
|
40 |
return $json;
|
41 |
-
// $content = wp_remote_get($url);
|
42 |
-
// $response = wp_remote_retrieve_body( $content );
|
43 |
-
// return $json = json_decode($response, true);
|
44 |
}
|
45 |
}
|
46 |
$insta = new InstaWCD();
|
47 |
-
|
48 |
-
|
49 |
-
?>
|
25 |
function get_remote_data_from_instagram_in_json($url){
|
26 |
$content = wp_remote_get( $url );
|
27 |
if(isset($content->errors)){
|
28 |
+
$content = json_encode(array('meta'=>array('error_message'=>$content->errors['http_request_failed']['0'])));
|
29 |
+
$content = json_decode($content, true);
|
30 |
+
return $content;
|
31 |
}else{
|
32 |
$response = wp_remote_retrieve_body( $content );
|
33 |
$json = json_decode( $response, true );
|
39 |
$url = 'https://api.instagram.com/v1/users/'.$this->userID().'/media/recent/?access_token='.$this->access_token;
|
40 |
$json = self:: get_remote_data_from_instagram_in_json( $url );
|
41 |
return $json;
|
|
|
|
|
|
|
42 |
}
|
43 |
}
|
44 |
$insta = new InstaWCD();
|
45 |
+
$insta->username = $username;
|
46 |
+
$insta->access_token = $access_token;
|
|
js/frontend.js
CHANGED
@@ -6,7 +6,6 @@
|
|
6 |
});
|
7 |
});
|
8 |
});
|
9 |
-
|
10 |
}(jQuery));
|
11 |
|
12 |
jQuery(document).ready(function($) {
|
6 |
});
|
7 |
});
|
8 |
});
|
|
|
9 |
}(jQuery));
|
10 |
|
11 |
jQuery(document).ready(function($) {
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
|
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
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -130,6 +130,10 @@ Once you install the plugin , you can check some general documentation about how
|
|
130 |
5. Backend Display Settings Section
|
131 |
|
132 |
== Changelog ==
|
|
|
|
|
|
|
|
|
133 |
= 2.0.7 =
|
134 |
* removal of unnecessary codes from plugins settings page.
|
135 |
|
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
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 2.0.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
130 |
5. Backend Display Settings Section
|
131 |
|
132 |
== Changelog ==
|
133 |
+
= 2.0.8 =
|
134 |
+
* Done the modification of the codes for bug fixing of operation time out.
|
135 |
+
* Done small bug fixings for the instagram slider layout.
|
136 |
+
|
137 |
= 2.0.7 =
|
138 |
* removal of unnecessary codes from plugins settings page.
|
139 |
|