AccessPress Instagram Feed - Version 2.0.9

Version Description

  • Done the code formatting, optimization and removal of unncessary codes form files.
Download this release

Release Info

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

Code changes from version 2.0.8 to 2.0.9

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: 2.0.8
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.0.8' );
18
  }
19
 
20
  if( !defined( 'APIF_IMAGE_DIR' ) ) {
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.9
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.0.9' );
18
  }
19
 
20
  if( !defined( 'APIF_IMAGE_DIR' ) ) {
inc/backend/boards/instagram-profiles.php CHANGED
@@ -1,5 +1,5 @@
1
  <div class="apsc-boards-tabs" id="apsc-board-social-profile-settings">
2
- <div class="apsc-tab-wrapper">
3
  <!--Instagram-->
4
  <div class="apsc-option-outer-wrapper">
5
  <h4><?php _e('Instagram Feed', 'accesspress-instagram-feed') ?></h4>
@@ -27,6 +27,6 @@
27
  </div>
28
  </div>
29
  </div>
30
- <!--Instagram-->
31
  </div>
32
  </div>
1
  <div class="apsc-boards-tabs" id="apsc-board-social-profile-settings">
2
+ <div class="apsc-tab-wrapper">
3
  <!--Instagram-->
4
  <div class="apsc-option-outer-wrapper">
5
  <h4><?php _e('Instagram Feed', 'accesspress-instagram-feed') ?></h4>
27
  </div>
28
  </div>
29
  </div>
30
+ <!--Instagram-->
31
  </div>
32
  </div>
inc/backend/main-page.php CHANGED
@@ -1,14 +1,12 @@
1
- <?php
2
  defined('ABSPATH') or die("No script kiddies please!");
3
  $apif_settings = get_option( 'apif_settings' );
4
  //$this->print_array($apsc_settings);
5
  ?>
6
-
7
  <div class="wrap">
8
  <div class="apsc-add-set-wrapper clearfix">
9
  <div class="apsc-panel">
10
  <div class="apsc-settings-header">
11
-
12
  <div class="apsc-logo">
13
  <img src="<?php echo APIF_IMAGE_DIR; ?>/instagram.png" alt="<?php esc_attr_e('AccessPress Instagram Feed', 'accesspress-instagram-feed'); ?>" />
14
  </div>
@@ -50,49 +48,48 @@ $apif_settings = get_option( 'apif_settings' );
50
  </ul>
51
 
52
  <div class="metabox-holder">
53
- <div id="optionsframework" class="postbox" style="float: left;">
54
- <form class="apsc-settings-form" method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
55
- <input type="hidden" name="action" value="apif_settings_action"/>
56
- <?php
57
- /**
58
- * Social Profiles
59
- * */
60
- include_once('boards/instagram-profiles.php');
61
- ?>
62
-
63
- <?php
64
- /**
65
- * Display Settings
66
- * */
67
- include_once('boards/display-settings.php');
68
- ?>
69
-
70
- <?php
71
- /**
72
- * Captcha Settings
73
- * */
74
- include_once('boards/how-to-use.php');
75
- ?>
76
-
77
-
78
- <?php
79
- /**
80
- * About Tab
81
- * */
82
- include_once('boards/about.php');
83
- ?>
84
- <?php
85
- /**
86
- * Nonce field
87
- * */
88
- wp_nonce_field('apif_settings_action', 'apif_settings_nonce');
89
- ?>
90
- <div id="optionsframework-submit" class="ap-settings-submit">
91
- <input type="submit" class="button button-primary" value="Save all changes" name="ap_settings_submit"/>
92
- </div>
93
- </form>
94
- </div><!--optionsframework-->
95
- </div>
96
  </div>
97
 
98
  <div class='apif-upgrade-banner'>
@@ -103,7 +100,6 @@ $apif_settings = get_option( 'apif_settings' );
103
  </div>
104
  <img src="<?php echo APIF_IMAGE_DIR.'/upgrade/upgrade-bottom.png'; ?>" alt='upgrade-banner-bottom'/>
105
  </div>
106
-
107
  </div>
108
  </div>
109
  </div><!--div class wrap-->
1
+ <?php
2
  defined('ABSPATH') or die("No script kiddies please!");
3
  $apif_settings = get_option( 'apif_settings' );
4
  //$this->print_array($apsc_settings);
5
  ?>
 
6
  <div class="wrap">
7
  <div class="apsc-add-set-wrapper clearfix">
8
  <div class="apsc-panel">
9
  <div class="apsc-settings-header">
 
10
  <div class="apsc-logo">
11
  <img src="<?php echo APIF_IMAGE_DIR; ?>/instagram.png" alt="<?php esc_attr_e('AccessPress Instagram Feed', 'accesspress-instagram-feed'); ?>" />
12
  </div>
48
  </ul>
49
 
50
  <div class="metabox-holder">
51
+ <div id="optionsframework" class="postbox" style="float: left;">
52
+ <form class="apsc-settings-form" method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
53
+ <input type="hidden" name="action" value="apif_settings_action"/>
54
+ <?php
55
+ /**
56
+ * Social Profiles
57
+ * */
58
+ include_once('boards/instagram-profiles.php');
59
+ ?>
60
+
61
+ <?php
62
+ /**
63
+ * Display Settings
64
+ * */
65
+ include_once('boards/display-settings.php');
66
+ ?>
67
+
68
+ <?php
69
+ /**
70
+ * Captcha Settings
71
+ * */
72
+ include_once('boards/how-to-use.php');
73
+ ?>
74
+
75
+ <?php
76
+ /**
77
+ * About Tab
78
+ * */
79
+ include_once('boards/about.php');
80
+ ?>
81
+ <?php
82
+ /**
83
+ * Nonce field
84
+ * */
85
+ wp_nonce_field('apif_settings_action', 'apif_settings_nonce');
86
+ ?>
87
+ <div id="optionsframework-submit" class="ap-settings-submit">
88
+ <input type="submit" class="button button-primary" value="Save all changes" name="ap_settings_submit"/>
89
+ </div>
90
+ </form>
91
+ </div><!--optionsframework-->
92
+ </div>
 
93
  </div>
94
 
95
  <div class='apif-upgrade-banner'>
100
  </div>
101
  <img src="<?php echo APIF_IMAGE_DIR.'/upgrade/upgrade-bottom.png'; ?>" alt='upgrade-banner-bottom'/>
102
  </div>
 
103
  </div>
104
  </div>
105
  </div><!--div class wrap-->
inc/backend/save-settings.php CHANGED
@@ -1,16 +1,15 @@
1
  <?php
2
- defined('ABSPATH') or die("No script kiddies please!");
3
- foreach($_POST['instagram'] as $key=>$val){
4
  $$key = sanitize_text_field($val);
5
  }
6
-
7
  $apif_settings = array();
8
  $apif_settings['username'] = $username;
9
  $apif_settings['access_token'] = $access_token;
10
- $apif_settings['instagram_mosaic'] = isset($instagram_mosaic)?$instagram_mosaic:'mosaic';
11
  $apif_settings['user_id'] = $user_id;
12
  $apif_settings['active'] = isset($active) ? $active : ' ';
13
- update_option('apif_settings', $apif_settings);
14
- $_SESSION['apif_message'] = __('Settings Saved Successfully','accesspress-instagram-feed');
15
- wp_redirect(admin_url().'admin.php?page=if-instagram-feed');
16
  exit();
1
  <?php
2
+ defined('ABSPATH') or die( "No script kiddies please!" );
3
+ foreach( $_POST['instagram'] as $key=>$val ){
4
  $$key = sanitize_text_field($val);
5
  }
 
6
  $apif_settings = array();
7
  $apif_settings['username'] = $username;
8
  $apif_settings['access_token'] = $access_token;
9
+ $apif_settings['instagram_mosaic'] = isset($instagram_mosaic) ? $instagram_mosaic:'mosaic';
10
  $apif_settings['user_id'] = $user_id;
11
  $apif_settings['active'] = isset($active) ? $active : ' ';
12
+ update_option( 'apif_settings', $apif_settings);
13
+ $_SESSION['apif_message'] = __( 'Settings Saved Successfully','accesspress-instagram-feed' );
14
+ wp_redirect( admin_url().'admin.php?page=if-instagram-feed' );
15
  exit();
inc/backend/widgetside.php CHANGED
@@ -30,7 +30,7 @@ class APIF_SideWidget extends WP_Widget {
30
  if (!empty($instance['title'])) {
31
  echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
32
  }
33
-
34
  $instagram_num_img = isset($instance['instagram_num_img']) ? $instance['instagram_num_img']:'12';
35
  $instance_post = (isset($instance['instance_post']) && $instance['instance_post']==1)?'true':'false';
36
  $instance_followers = (isset($instance['instance_followers']) && $instance['instance_followers']==1)?'true':'false';
@@ -46,7 +46,7 @@ global $apif_settings, $insta;
46
  $access_token = !empty($apif_settings['access_token']) ? $apif_settings['access_token'] : '';
47
 
48
  $api_url = 'https://api.instagram.com/v1/users/' . $user_id . '?access_token=' . $access_token;
49
- $connection = wp_remote_get($api_url);
50
  $response = json_decode($connection['body'], true);
51
  ?>
52
  <div class="instagram-header">
@@ -59,15 +59,15 @@ global $apif_settings, $insta;
59
  </div>
60
  </header>
61
  <header class="profile-follow clearfix">
62
- <div class="post">
63
  <?php echo $response['data']['counts']['media']; ?>
64
  <span>post</span>
65
  </div>
66
- <div class="followers">
67
  <?php echo $response['data']['counts']['followed_by']; ?>
68
  <span>followers</span>
69
  </div>
70
- <div class="following">
71
  <?php echo $response['data']['counts']['follows']; ?>
72
  <span>following</span>
73
  </div>
@@ -84,7 +84,7 @@ global $apif_settings, $insta;
84
  </header>
85
  </div>
86
  <?php
87
-
88
  $count = $instagram_num_img;
89
  require_once(APIF_INST_PATH . 'inc/frontend/instagram.php');
90
  $ins_media = $insta->userMedia();
@@ -103,12 +103,12 @@ global $apif_settings, $insta;
103
  }
104
  $j++;
105
  $img = $vm['images']['thumbnail']['url'];
106
- ?>
107
  <li><img src="<?php echo esc_url($img); ?>"></li>
108
  <?php
109
  }
110
  echo '</ul>';
111
- }
112
  echo $args['after_widget'];
113
  }
114
 
@@ -189,5 +189,5 @@ global $apif_settings, $insta;
189
  return $instance;
190
  }
191
  }
192
- // class APS_PRO_Widget
193
  ?>
30
  if (!empty($instance['title'])) {
31
  echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
32
  }
33
+
34
  $instagram_num_img = isset($instance['instagram_num_img']) ? $instance['instagram_num_img']:'12';
35
  $instance_post = (isset($instance['instance_post']) && $instance['instance_post']==1)?'true':'false';
36
  $instance_followers = (isset($instance['instance_followers']) && $instance['instance_followers']==1)?'true':'false';
46
  $access_token = !empty($apif_settings['access_token']) ? $apif_settings['access_token'] : '';
47
 
48
  $api_url = 'https://api.instagram.com/v1/users/' . $user_id . '?access_token=' . $access_token;
49
+ $connection = wp_remote_get($api_url);
50
  $response = json_decode($connection['body'], true);
51
  ?>
52
  <div class="instagram-header">
59
  </div>
60
  </header>
61
  <header class="profile-follow clearfix">
62
+ <div class="post">
63
  <?php echo $response['data']['counts']['media']; ?>
64
  <span>post</span>
65
  </div>
66
+ <div class="followers">
67
  <?php echo $response['data']['counts']['followed_by']; ?>
68
  <span>followers</span>
69
  </div>
70
+ <div class="following">
71
  <?php echo $response['data']['counts']['follows']; ?>
72
  <span>following</span>
73
  </div>
84
  </header>
85
  </div>
86
  <?php
87
+
88
  $count = $instagram_num_img;
89
  require_once(APIF_INST_PATH . 'inc/frontend/instagram.php');
90
  $ins_media = $insta->userMedia();
103
  }
104
  $j++;
105
  $img = $vm['images']['thumbnail']['url'];
106
+ ?>
107
  <li><img src="<?php echo esc_url($img); ?>"></li>
108
  <?php
109
  }
110
  echo '</ul>';
111
+ }
112
  echo $args['after_widget'];
113
  }
114
 
189
  return $instance;
190
  }
191
  }
192
+ // class APIF_Widget
193
  ?>
inc/frontend/instagram-feed.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
  defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
  global $apif_settings, $insta;
4
  $apif_settings = get_option( 'apif_settings' );
1
+ <?php
2
  defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
  global $apif_settings, $insta;
4
  $apif_settings = get_option( 'apif_settings' );
inc/frontend/instagram-grid-rotator.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
  defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
  global $apif_settings, $insta;
4
  $apif_settings = get_option( 'apif_settings' );
1
+ <?php
2
  defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
  global $apif_settings, $insta;
4
  $apif_settings = get_option( 'apif_settings' );
inc/frontend/instagram-widget.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
  defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
  global $apif_settings, $insta;
4
  $apif_settings = get_option( 'apif_settings' );
1
+ <?php
2
  defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
  global $apif_settings, $insta;
4
  $apif_settings = get_option( 'apif_settings' );
inc/frontend/instagram.php CHANGED
@@ -4,11 +4,10 @@ class InstaWCD{
4
  function userID(){
5
  $username = strtolower($this->username); // sanitization
6
  $token = $this->access_token;
7
-
8
  if(!empty($username) && !empty($token)) {
9
 
10
  $url = "https://api.instagram.com/v1/users/search?q=".$username."&access_token=".$token;
11
-
12
  $get = wp_remote_get($url);
13
  $response = wp_remote_retrieve_body( $get );
14
  $json = json_decode($response);
4
  function userID(){
5
  $username = strtolower($this->username); // sanitization
6
  $token = $this->access_token;
7
+
8
  if(!empty($username) && !empty($token)) {
9
 
10
  $url = "https://api.instagram.com/v1/users/search?q=".$username."&access_token=".$token;
 
11
  $get = wp_remote_get($url);
12
  $response = wp_remote_retrieve_body( $get );
13
  $json = json_decode($response);
js/backend.js CHANGED
@@ -1,9 +1,8 @@
1
  (function ($) {
2
  $(function () {
3
- //All the backend js for the plugin
4
-
5
  /*
6
- Settings Tabs Switching
7
  */
8
  $('.apsc-tabs-trigger').click(function(){
9
  $('.apsc-tabs-trigger').removeClass('apsc-active-tab');
@@ -12,12 +11,11 @@
12
  $('.apsc-boards-tabs').hide();
13
  $('#'+board_id).show();
14
  });
15
-
16
  /**
17
- * For sortable
18
  */
19
  $('.apsc-sortable').sortable({containment: "parent"});
20
-
21
-
22
  });
23
  }(jQuery));
1
  (function ($) {
2
  $(function () {
3
+ //All the backend js for the plugin
 
4
  /*
5
+ Settings Tabs Switching
6
  */
7
  $('.apsc-tabs-trigger').click(function(){
8
  $('.apsc-tabs-trigger').removeClass('apsc-active-tab');
11
  $('.apsc-boards-tabs').hide();
12
  $('#'+board_id).show();
13
  });
14
+
15
  /**
16
+ * For sortable
17
  */
18
  $('.apsc-sortable').sortable({containment: "parent"});
19
+
 
20
  });
21
  }(jQuery));
js/frontend.js CHANGED
@@ -90,7 +90,6 @@ jQuery(window).load(function() {
90
  "use strict";
91
 
92
  if (!hoverEffect.disable_hover_effect && jQuery(window).width() > 768) {
93
- // jQuery('.thumb-elem, .grid-elem header').addClass('hovermove');
94
  initHoverEffectForThumbView();
95
  }else{
96
  initSimpleHoverEffectForThumbView();
90
  "use strict";
91
 
92
  if (!hoverEffect.disable_hover_effect && jQuery(window).width() > 768) {
 
93
  initHoverEffectForThumbView();
94
  }else{
95
  initSimpleHoverEffectForThumbView();
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
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
 
@@ -13,7 +13,7 @@ A plugin to display your instagram images different three layout masonry, masonr
13
  == Description ==
14
  <strong>AccessPress Instagram Feed</strong> is a <strong>Free WordPress plugin</strong> to display your instagram post image in mosaic view. A perfect plugin to show your instagram feed and encourage more to join your network.
15
 
16
- You can enter details of your instagram social media and select one of the designs from beautifully 3 design layouts.
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
 
@@ -130,6 +130,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.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.
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.4
7
+ Stable tag: 2.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
13
  == Description ==
14
  <strong>AccessPress Instagram Feed</strong> is a <strong>Free WordPress plugin</strong> to display your instagram post image in mosaic view. A perfect plugin to show your instagram feed and encourage more to join your network.
15
 
16
+ You can enter details of your instagram social media and select one of the designs from beautifully 3 design layouts.
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
 
130
  5. Backend Display Settings Section
131
 
132
  == Changelog ==
133
+ = 2.0.9 =
134
+ * Done the code formatting, optimization and removal of unncessary codes form files.
135
+
136
  = 2.0.8 =
137
  * Done the modification of the codes for bug fixing of operation time out.
138
  * Done small bug fixings for the instagram slider layout.