AccessPress Instagram Feed - Version 4.0.2

Version Description

  • Refined code to fix feed not showing for slider,grid on using shortcode
  • Added settings to change font size as set in backend for follow me text
Download this release

Release Info

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

Code changes from version 4.0.1 to 4.0.2

accesspress-instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin name: AccessPress iFeeds
4
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-instagram-feed/
5
  Description: Display feeds of your instagram using shortcode and widgets.
6
- Version: 4.0.1
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', '4.0.1' );
17
  }
18
 
19
  if( !defined( 'APIF_IMAGE_DIR' ) ) {
3
  Plugin name: AccessPress iFeeds
4
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-instagram-feed/
5
  Description: Display feeds of your instagram using shortcode and widgets.
6
+ Version: 4.0.2
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', '4.0.2' );
17
  }
18
 
19
  if( !defined( 'APIF_IMAGE_DIR' ) ) {
inc/backend/boards/display-settings.php CHANGED
@@ -1,34 +1,25 @@
1
  <?php defined( 'ABSPATH' ) or die( "No script kiddies please!" ); ?>
2
  <div class="apsc-boards-tabs" id="apsc-board-display-settings" style="display: none">
3
  <div class="apsc-tab-wrapper">
4
- <!-- <div class="apsc-option-inner-wrapper">
5
- <div class="apsc-option-field">
6
- <div class="apsc-option-inner-wrapper">
7
- <label style="float:left;"><?php //_e('Image Like', 'accesspress-instagram-feed') ?></label>
8
- <div class="apsc-option-field"><input type="checkbox" name="instagram[active]" value="1" class="apsc-counter-activation-trigger" <?php //if(isset($apif_settings['active'])){ checked( $apif_settings['active'], '1'); } ?>/><?php //_e('Show/Hide', 'accesspress-instagram-feed'); ?></div>
9
- </div>
10
- </div>
11
- </div>-->
12
-
13
  <div class="apsc-option-inner-wrapper">
14
  <label style="width:30%;"><?php _e('Choose Themes Layout', 'accesspress-instagram-feed'); ?></label>
15
  <div class="apsc-option-field">
16
  <label class="apsc-layouts-preview">
17
  <input type="radio" name="instagram[instagram_mosaic]" value="mosaic" <?php if(isset($apif_settings['instagram_mosaic']) && $apif_settings['instagram_mosaic']=='mosaic'){?>checked="checked"<?php }?>/><?php _e('Mosaic layout', 'accesspress-instagram-feed'); ?>
18
- <div class="apsc-theme-image"><img src="<?php echo APIF_IMAGE_DIR.'/themes/massonary.png';?>"/></div>
19
  </label>
20
  <label class="apsc-layouts-preview">
21
  <input type="radio" name="instagram[instagram_mosaic]" value="mosaic_lightview" <?php if(isset($apif_settings['instagram_mosaic']) && $apif_settings['instagram_mosaic']=='mosaic_lightview'){?>checked="checked"<?php }?>/><?php _e('Mosaic LightBox Layout', 'accesspress-instagram-feed'); ?>
22
- <div class="apsc-theme-image"><img src="<?php echo APIF_IMAGE_DIR.'/themes/lightbox.png';?>"/></div>
23
  <div class="apsc-option-note"><p><?php _e("Note:Lightbox feature won't work for videos.Please, update your free plugin to pro to get more features on lightbox as well as in designs.", 'accesspress-instagram-feed'); ?></p></div>
24
  </label>
25
  <label class="apsc-layouts-preview">
26
  <input type="radio" name="instagram[instagram_mosaic]" value="slider" <?php if(isset($apif_settings['instagram_mosaic']) && $apif_settings['instagram_mosaic']=='slider'){?>checked="checked"<?php }?>/><?php _e('Slider Layout', 'accesspress-instagram-feed'); ?>
27
- <div class="apsc-theme-image"><img src="<?php echo APIF_IMAGE_DIR.'/themes/slider.png';?>"/></div>
28
  </label>
29
  <label class="apsc-layouts-preview">
30
  <input type="radio" name="instagram[instagram_mosaic]" value="grid_rotator" <?php if(isset($apif_settings['instagram_mosaic']) && $apif_settings['instagram_mosaic']=='grid_rotator'){?>checked="checked"<?php }?>/><?php _e('Grid Rotator', 'accesspress-instagram-feed'); ?>
31
- <div class="apsc-theme-image"><img src="<?php echo APIF_IMAGE_DIR.'/themes/grid-rotator.png';?>"/></div>
32
  </label>
33
  </div>
34
  </div>
1
  <?php defined( 'ABSPATH' ) or die( "No script kiddies please!" ); ?>
2
  <div class="apsc-boards-tabs" id="apsc-board-display-settings" style="display: none">
3
  <div class="apsc-tab-wrapper">
 
 
 
 
 
 
 
 
 
4
  <div class="apsc-option-inner-wrapper">
5
  <label style="width:30%;"><?php _e('Choose Themes Layout', 'accesspress-instagram-feed'); ?></label>
6
  <div class="apsc-option-field">
7
  <label class="apsc-layouts-preview">
8
  <input type="radio" name="instagram[instagram_mosaic]" value="mosaic" <?php if(isset($apif_settings['instagram_mosaic']) && $apif_settings['instagram_mosaic']=='mosaic'){?>checked="checked"<?php }?>/><?php _e('Mosaic layout', 'accesspress-instagram-feed'); ?>
9
+ <div class="apsc-theme-image"><img src="<?php echo esc_attr(APIF_IMAGE_DIR).'/themes/massonary.png';?>"/></div>
10
  </label>
11
  <label class="apsc-layouts-preview">
12
  <input type="radio" name="instagram[instagram_mosaic]" value="mosaic_lightview" <?php if(isset($apif_settings['instagram_mosaic']) && $apif_settings['instagram_mosaic']=='mosaic_lightview'){?>checked="checked"<?php }?>/><?php _e('Mosaic LightBox Layout', 'accesspress-instagram-feed'); ?>
13
+ <div class="apsc-theme-image"><img src="<?php echo esc_attr(APIF_IMAGE_DIR).'/themes/lightbox.png';?>"/></div>
14
  <div class="apsc-option-note"><p><?php _e("Note:Lightbox feature won't work for videos.Please, update your free plugin to pro to get more features on lightbox as well as in designs.", 'accesspress-instagram-feed'); ?></p></div>
15
  </label>
16
  <label class="apsc-layouts-preview">
17
  <input type="radio" name="instagram[instagram_mosaic]" value="slider" <?php if(isset($apif_settings['instagram_mosaic']) && $apif_settings['instagram_mosaic']=='slider'){?>checked="checked"<?php }?>/><?php _e('Slider Layout', 'accesspress-instagram-feed'); ?>
18
+ <div class="apsc-theme-image"><img src="<?php echo esc_attr(APIF_IMAGE_DIR).'/themes/slider.png';?>"/></div>
19
  </label>
20
  <label class="apsc-layouts-preview">
21
  <input type="radio" name="instagram[instagram_mosaic]" value="grid_rotator" <?php if(isset($apif_settings['instagram_mosaic']) && $apif_settings['instagram_mosaic']=='grid_rotator'){?>checked="checked"<?php }?>/><?php _e('Grid Rotator', 'accesspress-instagram-feed'); ?>
22
+ <div class="apsc-theme-image"><img src="<?php echo esc_attr(APIF_IMAGE_DIR).'/themes/grid-rotator.png';?>"/></div>
23
  </label>
24
  </div>
25
  </div>
inc/backend/boards/instagram-profiles.php CHANGED
@@ -5,66 +5,38 @@
5
  $username = '';
6
  $user_id = '';
7
  $access_token = '';
8
- if(isset($apif_settings['app_id']) && $apif_settings['app_id'] !=''){
9
- $app_id=$apif_settings['app_id'];
10
- }
11
- else{
12
- $app_id='1150049435376376';
13
- }
14
- if(isset($apif_settings['app_secret']) && $apif_settings['app_secret'] !=''){
15
- $app_secret = $apif_settings['app_secret'];
16
- }
17
- else{
18
- $app_secret='5eab5bf8ad269da35069be8e0f2db96e';
19
- }
20
- // if (isset($_GET['access_token'])) {
21
- // $access_token = $_GET['access_token'];
22
- // $url = 'https://api.instagram.com/v1/users/self/?access_token=' . $_GET['access_token'];
23
- // $content = wp_remote_get($url);
24
- // if (!isset($content->errors)) {
25
- // $response = wp_remote_retrieve_body($content);
26
- // $json = json_decode($response, true);
27
- // if (!empty($json['data'])) {
28
- // $username = $json['data']['username'];
29
- // $user_id = $json['data']['id'];
30
- // }
31
- // }
32
- // } else {
33
- // if (isset($apif_settings['username']) && $apif_settings['username'] != '') {
34
- // $username = $apif_settings['username'];
35
- // }
36
- // if (isset($apif_settings['user_id']) && $apif_settings['user_id'] != '') {
37
- // $user_id = $apif_settings['user_id'];
38
- // }
39
- // if (isset($apif_settings['access_token']) && $apif_settings['access_token'] != '') {
40
- // $access_token = $apif_settings['access_token'];
41
- // }
42
- // }
43
  if (isset($apif_settings['username']) && $apif_settings['username'] != '') {
44
- $username = $apif_settings['username'];
45
- }
46
- else{
47
- $username='';
48
- }
49
- if (isset($apif_settings['user_id']) && $apif_settings['user_id'] != '') {
50
- $user_id = $apif_settings['user_id'];
51
- }
52
- else{
53
- $user_id='';
54
- }
55
- if (isset($apif_settings['access_token']) && $apif_settings['access_token'] != '') {
56
- $access_token = $apif_settings['access_token'];
57
- }
58
- else{
59
- $access_token='';
60
- }
61
  ?>
62
  <!--Instagram-->
63
  <div class="apsc-option-outer-wrapper">
64
  <h4><?php _e('Plugin Settings', 'accesspress-instagram-feed') ?></h4>
65
  <div class="updated settings-error notice is-dismissible">
66
  <p><b><?php _e("Note: After the latest changes in instagram api,you either need to create instagram or facebook app.In this plugin, we have used instagram basic display api for which you need have instagram app.On using basic display api, you can fetch normal feeds and get your profile's username and media count.Basic display api has provided only few of these criteria to fetch.But if you want to get more data such as get instagram likes count,comments count,your profile picture and hashtag based search,please upgrade to pro version of this plugin where we have used instagram graph api.", 'accesspress-instagram-feed'); ?></b></p></br>
67
- <hr><p><b><?php _e("In order to get instagram app id and app secret, you need to first go to developers.facebook.com then create new app.In settings page add your site url.Setup instagram basic display api from products list.You will see option to create app there inside basic display api page.Create app then go to basic display of instagram basic display scroll, down a little you should see button that says add/remove instagram tester inside user token generator, click on it then you will be redirected to user roles page, go to the bottom of page.There will see button that says add instagram tester click on it.A popup will come that will ask you to enter your instagram username, find your account and click on submit.Then,open your instagram profile in another tab.Go to your profile click on settings icon.Go to apps and websites.Go to tester invites tab and you will see request from the app you created.Accept the request and again go to basic display page.Put redirect url as 'https://demo.accesspressthemes.com/wordpress-plugins/insta-feed/basic-api/index.php' , then paste it into Valid oauth redirect url. Enter url of homepage of your website in Deauthorize callback url and enter url of privacy policy of your website that states how you will use instagram profile data of user in Data deletion request url fields and save it.Finally copy your instagram app id and app secret and then paste them in their respective field in plugin's backend.First of all, save the settings and then click on get access token button.You should now be redirected to instagram authorize page where it says your app will access your profile info and media.Click on authorize button and now you should be redirected to plugins backend with your username,user id and access token field filled already.Now,save settings.", 'accesspress-instagram-feed'); ?>
68
  </b></p>
69
  </div>
70
  <br/>
@@ -72,18 +44,18 @@ $app_secret='5eab5bf8ad269da35069be8e0f2db96e';
72
  <div class='apsc-option-inner-wrapper'>
73
  <label for='instagram_appid'><?php _e('Your instagram appid', 'accesspress-instagram-feed'); ?></label>
74
  <input type='text' id='instagram-app-id' placeholder="Enter your app id" name='instagram[app_id]' value='<?php
75
- if (isset($apif_settings['app_id'])) {
76
- echo $apif_settings['app_id'];
77
- }
78
- ?>' />
79
  </div>
80
  <div class='apsc-option-inner-wrapper'>
81
  <label for='instagram_appsecret'><?php _e('Your instagram appsecret', 'accesspress-instagram-feed'); ?></label>
82
  <input type='text' id='instagram-app-secret' placeholder="Enter your app secret" name='instagram[app_secret]' value='<?php
83
- if (isset($apif_settings['app_secret'])) {
84
- echo $apif_settings['app_secret'];
85
- }
86
- ?>' />
87
  </div>
88
  <div class="apsc-option-note"><?php _e('Note: After entering your app id and app secret remember to save changes first,then only proceed toward getting access token', 'accesspress-instagram-feed'); ?></div>
89
  <div id="login_with_instagram">
@@ -92,19 +64,26 @@ $app_secret='5eab5bf8ad269da35069be8e0f2db96e';
92
  <div class="apsc-option-inner-wrapper">
93
  <label for='instagram_username'><?php _e('Your instagram username', 'accesspress-instagram-feed'); ?></label>
94
  <div class="apsc-option-field">
95
- <input type="text" name="instagram[username]" id='instagram_username' value="<?php if(isset($_GET["username"])){
96
- echo $_GET["username"];}else{
97
- echo esc_attr($username);}?>"/>
 
 
 
 
98
  <div class="apsc-option-note"><?php _e('Note: If not loaded automatically after clicking <strong>Get Access Token</strong> button provided above, please enter the instagram username.', 'accesspress-instagram-feed'); ?></div>
99
  </div>
100
  </div>
101
  <div class="apsc-option-inner-wrapper">
102
  <label for='instagram_user_id'><?php _e('Your instagram user ID', 'accesspress-instagram-feed'); ?></label>
103
  <div class="apsc-option-field">
104
- <input type="text" name="instagram[user_id]" id='instagram_user_id' value="<?php if(isset($_GET["userid"])){
105
- echo $_GET["userid"];}
106
- else{
107
- echo esc_attr($user_id);}?>"/><?php //var_dump($user_id);?>
 
 
 
108
  <div class="apsc-option-note"><?php _e('Note: If not loaded automatically after clicking <strong>Get Access Token</strong> button provided above, please check if you have followed every step mentioned above properly.', 'accesspress-instagram-feed'); ?></div>
109
  </div>
110
  </div>
@@ -112,23 +91,29 @@ echo esc_attr($user_id);}?>"/><?php //var_dump($user_id);?>
112
  <label for='instagram_access_token'><?php _e('Your instagram access token', 'accesspress-instagram-feed'); ?></label>
113
  <div class="apsc-option-field">
114
  <!--<input type="text" name="instagram[access_token]" id='instagram_access_token' value="<?php echo esc_attr($access_token); ?>"/>-->
115
- <input type="text" name="instagram[access_token]" id='instagram_access_token' value="<?php if(isset($_GET["access_token"])){
116
- echo $_GET["access_token"];}else{
117
- echo esc_attr($access_token);}?>"/>
 
 
 
 
118
  <div class="apsc-option-note">
119
- <?php _e('Please enter the instagram Access Token.You can get this by clicking the above button. If new access token not received in the above Instagram access token field, please check if you have followed every step mentioned above properly.', 'accesspress-instagram-feed'); ?>
120
- <?php _e("Please don't forget to click save button.", 'accesspress-instagram-feed'); ?>
121
- </div>
122
- </div>
123
- </div>
124
 
125
 
126
  <div class="apsc-option-inner-wrapper">
127
  <label for='enablecache'><?php _e('Enable Cache?', 'accesspress-instagram-feed'); ?></label>
128
  <div class="apsc-option-field">
129
- <input type="checkbox" name="instagram[enable_cache]" id="enablecache" value="1" <?php if (isset($apif_settings['enable_cache'])) {
130
- checked($apif_settings['enable_cache'], '1');
131
- } ?> />
 
 
132
  <div class="apsc-option-note"><?php _e('Please enable this option if you want to use the cache on the first load.', 'accesspress-instagram-feed'); ?></div>
133
  </div>
134
  </div>
@@ -136,9 +121,11 @@ echo esc_attr($access_token);}?>"/>
136
  <div class="apsc-option-inner-wrapper">
137
  <label for='enablecache'><?php _e('Cache Period', 'accesspress-instagram-feed'); ?></label>
138
  <div class="apsc-option-field">
139
- <input type="number" step="0.01" min='0' max='24' name="instagram[cache_period]" value="<?php if (isset($apif_settings['cache_period']) && $apif_settings['cache_period'] != '') {
140
- echo $apif_settings['cache_period'];
141
- } ?>" />
 
 
142
  <div class="apsc-option-note"><?php _e('Please set the value in hours only. Default if left empty is set to 24.', 'accesspress-instagram-feed'); ?></div>
143
  </div>
144
  </div>
5
  $username = '';
6
  $user_id = '';
7
  $access_token = '';
8
+ if (isset($apif_settings['app_id']) && $apif_settings['app_id'] != '') {
9
+ $app_id = esc_attr($apif_settings['app_id']);
10
+ } else {
11
+ $app_id = '1150049435376377';
12
+ }
13
+ if (isset($apif_settings['app_secret']) && $apif_settings['app_secret'] != '') {
14
+ $app_secret = esc_attr($apif_settings['app_secret']);
15
+ } else {
16
+ $app_secret = '5eab5bf8ad269da35069be8e0f2db96f';
17
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  if (isset($apif_settings['username']) && $apif_settings['username'] != '') {
19
+ $username = esc_attr($apif_settings['username']);
20
+ } else {
21
+ $username = '';
22
+ }
23
+ if (isset($apif_settings['user_id']) && $apif_settings['user_id'] != '') {
24
+ $user_id = esc_attr($apif_settings['user_id']);
25
+ } else {
26
+ $user_id = '';
27
+ }
28
+ if (isset($apif_settings['access_token']) && $apif_settings['access_token'] != '') {
29
+ $access_token = esc_attr($apif_settings['access_token']);
30
+ } else {
31
+ $access_token = '';
32
+ }
 
 
 
33
  ?>
34
  <!--Instagram-->
35
  <div class="apsc-option-outer-wrapper">
36
  <h4><?php _e('Plugin Settings', 'accesspress-instagram-feed') ?></h4>
37
  <div class="updated settings-error notice is-dismissible">
38
  <p><b><?php _e("Note: After the latest changes in instagram api,you either need to create instagram or facebook app.In this plugin, we have used instagram basic display api for which you need have instagram app.On using basic display api, you can fetch normal feeds and get your profile's username and media count.Basic display api has provided only few of these criteria to fetch.But if you want to get more data such as get instagram likes count,comments count,your profile picture and hashtag based search,please upgrade to pro version of this plugin where we have used instagram graph api.", 'accesspress-instagram-feed'); ?></b></p></br>
39
+ <hr><p><b><?php _e("In order to get instagram app id and app secret, you need to first go to developers.facebook.com then create new app.In settings page add your site url.Setup instagram basic display api from products list.You will see option to create app there inside basic display api page.Create app then go to basic display of instagram basic display scroll, down a little you should see button that says add/remove instagram tester inside user token generator, click on it then you will be redirected to user roles page, go to the bottom of page.There will see button that says add instagram tester click on it.A popup will come that will ask you to enter your instagram username, find your account and click on submit.Then,open your instagram profile in another tab.Go to your profile click on settings icon.Go to apps and websites.Go to tester invites tab and you will see request from the app you created.Accept the request and again go to basic display page.Put redirect url as 'https://demo.accesspressthemes.com/wordpress-plugins/insta-feed/basic-api/index.php' , then paste it into Valid oauth redirect url. Enter url of homepage of your website in Deauthorize callback url and enter url of privacy policy of your website that states how you will use instagram profile data of user in Data deletion request url fields and save it.Finally copy your instagram app id and app secret and then paste them in their respective field in plugin's backend.First of all, save the settings and then click on get access token button.You should now be redirected to instagram authorize page where it says your app will access your profile info and media.Click on authorize button and now you should be redirected to plugins backend with your username,user id and access token field filled already.Now,save settings.", 'accesspress-instagram-feed'); ?>
40
  </b></p>
41
  </div>
42
  <br/>
44
  <div class='apsc-option-inner-wrapper'>
45
  <label for='instagram_appid'><?php _e('Your instagram appid', 'accesspress-instagram-feed'); ?></label>
46
  <input type='text' id='instagram-app-id' placeholder="Enter your app id" name='instagram[app_id]' value='<?php
47
+ if (isset($apif_settings['app_id'])) {
48
+ echo esc_attr($apif_settings['app_id']);
49
+ }
50
+ ?>' />
51
  </div>
52
  <div class='apsc-option-inner-wrapper'>
53
  <label for='instagram_appsecret'><?php _e('Your instagram appsecret', 'accesspress-instagram-feed'); ?></label>
54
  <input type='text' id='instagram-app-secret' placeholder="Enter your app secret" name='instagram[app_secret]' value='<?php
55
+ if (isset($apif_settings['app_secret'])) {
56
+ echo esc_attr($apif_settings['app_secret']);
57
+ }
58
+ ?>' />
59
  </div>
60
  <div class="apsc-option-note"><?php _e('Note: After entering your app id and app secret remember to save changes first,then only proceed toward getting access token', 'accesspress-instagram-feed'); ?></div>
61
  <div id="login_with_instagram">
64
  <div class="apsc-option-inner-wrapper">
65
  <label for='instagram_username'><?php _e('Your instagram username', 'accesspress-instagram-feed'); ?></label>
66
  <div class="apsc-option-field">
67
+ <input type="text" name="instagram[username]" id='instagram_username' value="<?php
68
+ if (isset($_GET["username"])) {
69
+ echo esc_attr($_GET["username"]);
70
+ } else {
71
+ echo esc_attr($username);
72
+ }
73
+ ?>"/>
74
  <div class="apsc-option-note"><?php _e('Note: If not loaded automatically after clicking <strong>Get Access Token</strong> button provided above, please enter the instagram username.', 'accesspress-instagram-feed'); ?></div>
75
  </div>
76
  </div>
77
  <div class="apsc-option-inner-wrapper">
78
  <label for='instagram_user_id'><?php _e('Your instagram user ID', 'accesspress-instagram-feed'); ?></label>
79
  <div class="apsc-option-field">
80
+ <input type="text" name="instagram[user_id]" id='instagram_user_id' value="<?php
81
+ if (isset($_GET["userid"])) {
82
+ echo esc_attr($_GET["userid"]);
83
+ } else {
84
+ echo esc_attr($user_id);
85
+ }
86
+ ?>"/><?php //var_dump($user_id); ?>
87
  <div class="apsc-option-note"><?php _e('Note: If not loaded automatically after clicking <strong>Get Access Token</strong> button provided above, please check if you have followed every step mentioned above properly.', 'accesspress-instagram-feed'); ?></div>
88
  </div>
89
  </div>
91
  <label for='instagram_access_token'><?php _e('Your instagram access token', 'accesspress-instagram-feed'); ?></label>
92
  <div class="apsc-option-field">
93
  <!--<input type="text" name="instagram[access_token]" id='instagram_access_token' value="<?php echo esc_attr($access_token); ?>"/>-->
94
+ <input type="text" name="instagram[access_token]" id='instagram_access_token' value="<?php
95
+ if (isset($_GET["access_token"])) {
96
+ echo esc_attr($_GET["access_token"]);
97
+ } else {
98
+ echo esc_attr($access_token);
99
+ }
100
+ ?>"/>
101
  <div class="apsc-option-note">
102
+ <?php _e('Please enter the instagram Access Token.You can get this by clicking the above button. If new access token not received in the above Instagram access token field, please check if you have followed every step mentioned above properly.', 'accesspress-instagram-feed'); ?>
103
+ <?php _e("Please don't forget to click save button.", 'accesspress-instagram-feed'); ?>
104
+ </div>
105
+ </div>
106
+ </div>
107
 
108
 
109
  <div class="apsc-option-inner-wrapper">
110
  <label for='enablecache'><?php _e('Enable Cache?', 'accesspress-instagram-feed'); ?></label>
111
  <div class="apsc-option-field">
112
+ <input type="checkbox" name="instagram[enable_cache]" id="enablecache" value="1" <?php
113
+ if (isset($apif_settings['enable_cache'])) {
114
+ checked($apif_settings['enable_cache'], '1');
115
+ }
116
+ ?> />
117
  <div class="apsc-option-note"><?php _e('Please enable this option if you want to use the cache on the first load.', 'accesspress-instagram-feed'); ?></div>
118
  </div>
119
  </div>
121
  <div class="apsc-option-inner-wrapper">
122
  <label for='enablecache'><?php _e('Cache Period', 'accesspress-instagram-feed'); ?></label>
123
  <div class="apsc-option-field">
124
+ <input type="number" step="0.01" min='0' max='24' name="instagram[cache_period]" value="<?php
125
+ if (isset($apif_settings['cache_period']) && $apif_settings['cache_period'] != '') {
126
+ echo esc_attr($apif_settings['cache_period']);
127
+ }
128
+ ?>" />
129
  <div class="apsc-option-note"><?php _e('Please set the value in hours only. Default if left empty is set to 24.', 'accesspress-instagram-feed'); ?></div>
130
  </div>
131
  </div>
inc/backend/main-page.php CHANGED
@@ -8,7 +8,7 @@ $apif_settings = get_option( 'apif_settings' );
8
  <div class="apsc-panel">
9
  <div class="apsc-settings-header">
10
  <div class="apsc-logo">
11
- <img src="<?php echo APIF_IMAGE_DIR; ?>/accesspress-ifeeds-backend-logo.png" alt="<?php esc_attr_e('AccessPress iFeeds', 'accesspress-instagram-feed'); ?>" />
12
  </div>
13
 
14
  <div class="apsc-socials">
@@ -90,12 +90,12 @@ $apif_settings = get_option( 'apif_settings' );
90
  </div>
91
 
92
  <div class='apif-upgrade-banner'>
93
- <img src="<?php echo APIF_IMAGE_DIR.'/upgrade/ap-instagram-feeds-pro-advertisement.png'; ?>" alt='upgrade-banner-top'/>
94
  <div class="apif-button-wrap-bckend">
95
  <a href='http://demo.accesspressthemes.com/wordpress-plugins/accesspress-instagram-feeds-pro/' class="apif-demo-btn" target='_blank' />Demo</a>
96
  <a href='https://accesspressthemes.com/wordpress-plugins/accesspress-instagram-feed-pro/' target="_blank" class="apif-upgrade-btn"/>Upgrade To Pro</a>
97
  </div>
98
- <img src="<?php echo APIF_IMAGE_DIR.'/upgrade/upgrade-bottom.png'; ?>" alt='upgrade-banner-bottom'/>
99
  </div>
100
  </div>
101
  </div>
8
  <div class="apsc-panel">
9
  <div class="apsc-settings-header">
10
  <div class="apsc-logo">
11
+ <img src="<?php echo esc_attr(APIF_IMAGE_DIR); ?>/accesspress-ifeeds-backend-logo.png" alt="<?php esc_attr_e('AccessPress iFeeds', 'accesspress-instagram-feed'); ?>" />
12
  </div>
13
 
14
  <div class="apsc-socials">
90
  </div>
91
 
92
  <div class='apif-upgrade-banner'>
93
+ <img src="<?php echo esc_attr(APIF_IMAGE_DIR).'/upgrade/ap-instagram-feeds-pro-advertisement.png'; ?>" alt='upgrade-banner-top'/>
94
  <div class="apif-button-wrap-bckend">
95
  <a href='http://demo.accesspressthemes.com/wordpress-plugins/accesspress-instagram-feeds-pro/' class="apif-demo-btn" target='_blank' />Demo</a>
96
  <a href='https://accesspressthemes.com/wordpress-plugins/accesspress-instagram-feed-pro/' target="_blank" class="apif-upgrade-btn"/>Upgrade To Pro</a>
97
  </div>
98
+ <img src="<?php echo esc_attr(APIF_IMAGE_DIR).'/upgrade/upgrade-bottom.png'; ?>" alt='upgrade-banner-bottom'/>
99
  </div>
100
  </div>
101
  </div>
inc/backend/widgetside.php CHANGED
@@ -106,7 +106,7 @@ class APIF_SideWidget extends WP_Widget {
106
  <div class="follow-inner">
107
  <div class="table-outer">
108
  <div class="table-inner">
109
- <a href="https://instagram.com/<?php echo $apif_settings['username']; ?>" target='_blank' title='Follow <?php echo $apif_settings['username']; ?>' >follow</a>
110
  </div>
111
  </div>
112
  </div>
@@ -134,7 +134,7 @@ class APIF_SideWidget extends WP_Widget {
134
  $img = $vm['media_url'];
135
  ?>
136
  <?php if ($instance_image_link == 'true') { ?>
137
- <li><a href='<?php echo $vm['permalink']; ?>' target='_blank'>
138
  <?php
139
  if ($vm['media_type'] == "VIDEO") {
140
  $video_link = $vm['media_url'];
@@ -143,14 +143,14 @@ class APIF_SideWidget extends WP_Widget {
143
  <div id="inline-1" style="width:100%;height:100%;position:relative">
144
  <!--<a href="<?php //echo $link ?>" target="_blank">-->
145
  <video controls style="width:100% !important;height:100%;position:relative;right:0;display:block">
146
- <source src="<?php echo $video_link; ?>" type="video/mp4">
147
  Your browser does not support the video tag.
148
  </video>
149
  <!--</a>-->
150
  </div>
151
  <!--</a>-->
152
  <?php } else { ?>
153
- <img src="<?php echo esc_url($img); ?>" alt='<?php echo $vm['caption']; ?>' />
154
  <?php } ?>
155
  </a>
156
  </li>
@@ -164,14 +164,14 @@ class APIF_SideWidget extends WP_Widget {
164
  <div id="inline-1" style="width:100%;height:100%;position:relative">
165
  <!--<a href="<?php //echo $link ?>" target="_blank">-->
166
  <video controls style="width:100% !important;height:100%;position:relative;right:0;display:block">
167
- <source src="<?php echo $video_link; ?>" type="video/mp4">
168
  Your browser does not support the video tag.
169
  </video>
170
  <!--</a>-->
171
  </div>
172
  <!--</a>-->
173
  <?php } else { ?>
174
- <img src="<?php echo esc_url($img); ?>" alt='<?php echo $vm['caption']; ?>' />
175
  <?php } ?>
176
  </li>
177
  <?php } ?>
106
  <div class="follow-inner">
107
  <div class="table-outer">
108
  <div class="table-inner">
109
+ <a href="https://instagram.com/<?php echo esc_attr($apif_settings['username']); ?>" target='_blank' title='Follow <?php echo esc_attr($apif_settings['username']); ?>' >follow</a>
110
  </div>
111
  </div>
112
  </div>
134
  $img = $vm['media_url'];
135
  ?>
136
  <?php if ($instance_image_link == 'true') { ?>
137
+ <li><a href='<?php echo esc_url($vm['permalink']); ?>' target='_blank'>
138
  <?php
139
  if ($vm['media_type'] == "VIDEO") {
140
  $video_link = $vm['media_url'];
143
  <div id="inline-1" style="width:100%;height:100%;position:relative">
144
  <!--<a href="<?php //echo $link ?>" target="_blank">-->
145
  <video controls style="width:100% !important;height:100%;position:relative;right:0;display:block">
146
+ <source src="<?php echo esc_url($video_link); ?>" type="video/mp4">
147
  Your browser does not support the video tag.
148
  </video>
149
  <!--</a>-->
150
  </div>
151
  <!--</a>-->
152
  <?php } else { ?>
153
+ <img src="<?php echo esc_url($img); ?>" alt='<?php echo esc_attr($vm['caption']); ?>' />
154
  <?php } ?>
155
  </a>
156
  </li>
164
  <div id="inline-1" style="width:100%;height:100%;position:relative">
165
  <!--<a href="<?php //echo $link ?>" target="_blank">-->
166
  <video controls style="width:100% !important;height:100%;position:relative;right:0;display:block">
167
+ <source src="<?php echo esc_url($video_link); ?>" type="video/mp4">
168
  Your browser does not support the video tag.
169
  </video>
170
  <!--</a>-->
171
  </div>
172
  <!--</a>-->
173
  <?php } else { ?>
174
+ <img src="<?php echo esc_url($img); ?>" alt='<?php echo esc_attr($vm['caption']); ?>' />
175
  <?php } ?>
176
  </li>
177
  <?php } ?>
inc/frontend/instagram-feed.php CHANGED
@@ -7,7 +7,7 @@ $access_token = !empty($apif_settings['access_token']) ? $apif_settings['access_
7
  $user_id = !empty($apif_settings['user_id']) ? $apif_settings['user_id'] : '';
8
  $enable_cache = (isset($apif_settings['enable_cache']) && $apif_settings['enable_cache'] == 1) ? 1 : 0;
9
  $cache_period = (isset($apif_settings['cache_period']) && $apif_settings['cache_period'] == 1) ? intval($apif_settings['cache_period']) : '24';
10
-
11
  $followmetext = !empty($apif_settings['followmetext']) ? $apif_settings['followmetext'] : __('Follow Me', 'accesspress-instagram-feed');
12
  $layout = $apif_settings['instagram_mosaic'];
13
  $image_like = isset($apif_settings['active']) ? $apif_settings['active'] : '';
@@ -93,7 +93,7 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
93
  <a class="example-image-link" href="<?php echo esc_url($video_link); ?>" data-lightbox="example-set">
94
  <div id="inline-1" style="width:100%;height:100%">
95
  <video controls style="width:100%;height:100%">
96
- <source src="<?php echo $video_link; ?>" type="video/mp4">
97
  Your browser does not support the video tag.
98
  </video>
99
  </div>
@@ -105,7 +105,7 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
105
  </a>
106
  <?php } ?>
107
  </div>
108
- <a href="https://instagram.com/<?php echo $username; ?>" target="_blank" class="image-hover">
109
  <span class="follow"><?php echo esc_attr($followmetext); ?></span>
110
  <span class="follow_icon">
111
  <img src="<?php echo $flow_icon; ?>"/>
@@ -119,7 +119,7 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
119
  ?>
120
  <!--<div id="inline-1" style="width:100%;height:100%">-->
121
  <video class="the-thumb" controls style="width:100%;height:100%">
122
- <source class="the-thumb" src="<?php echo $video_link; ?>" type="video/mp4">
123
  Your browser does not support the video tag.
124
  </video>
125
  <!--</div>-->
@@ -128,7 +128,7 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
128
  <img class="transparent-image" src="<?php echo esc_url($image_url); ?>">
129
  <?php } ?>
130
  </div>
131
- <a href="https://instagram.com/<?php echo $username; ?>" target="_blank" class="image-hover">
132
  <span class="follow"><?php echo esc_attr($followmetext); ?></span>
133
  <span class="follow_icon">
134
  <img src="<?php echo $flow_icon; ?>"/>
@@ -136,18 +136,6 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
136
  </a>
137
  <?php } ?>
138
  </header>
139
- <?php //if ($image_like == '1') : ?>
140
- <!-- Image like count section start -->
141
- <!-- <span class="instagram_like_count">
142
- <p class="instagram_imge_like">
143
- <span class="insta like_image">
144
- <i class="fa fa-heart-o fa-2x"></i>
145
- </span>
146
- <span class="count"><?php echo $likes = $vm['like_count']; ?></span>
147
- </p>
148
- </span>-->
149
- <!-- Image like count section end -->
150
- <?php //endif; ?>
151
  </div>
152
  </div>
153
  <?php
@@ -186,7 +174,7 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
186
  ?>
187
  <div id="inline-1" style="width:100%;height:100%">
188
  <video controls style="width:100%;height:100%">
189
- <source src="<?php echo $video_link; ?>" type="video/mp4">
190
  Your browser does not support the video tag.
191
  </video>
192
  </div>
@@ -208,7 +196,7 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
208
  <?php } else if (is_array($ins_media['data']) || is_object($ins_media['data'])) {
209
  ?>
210
  <div class="ri-grid apif-ri-grid">
211
- <img class="ri-loading-image" src="<?php echo APIF_IMAGE_DIR . '/ripple.gif'; ?>"/>
212
  <ul>
213
  <?php
214
  foreach ($ins_media['data'] as $vm):
@@ -228,14 +216,14 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
228
  <!--<div id="inline-1" style="width:100%;height:100%;position:relative">-->
229
  <!--<a href="<?php //echo $link ?>" target="_blank">-->
230
  <video controls style="width:inherit !important;height:100%;position:relative;right:0;display:block">
231
- <source src="<?php echo $video_link; ?>" type="video/mp4">
232
  Your browser does not support the video tag.
233
  </video>
234
  <!--</a>-->
235
  <!--</div>/-->
236
  <!--</a>-->
237
  <?php } else { ?>
238
- <a href="<?php echo $link ?>" target="_blank">
239
  <img src="<?php echo esc_url($image); ?>" alt='<?php echo strip_tags(substr($vm['caption'], 0, 20)); ?>'>
240
  </a>
241
  <?php } ?>
@@ -245,4 +233,10 @@ if ($layout == 'mosaic' || $layout == 'mosaic_lightview') {
245
  </div>
246
  <?php } ?>
247
  <?php
248
- }
 
 
 
 
 
 
7
  $user_id = !empty($apif_settings['user_id']) ? $apif_settings['user_id'] : '';
8
  $enable_cache = (isset($apif_settings['enable_cache']) && $apif_settings['enable_cache'] == 1) ? 1 : 0;
9
  $cache_period = (isset($apif_settings['cache_period']) && $apif_settings['cache_period'] == 1) ? intval($apif_settings['cache_period']) : '24';
10
+ $followmefontsize = !empty($apif_settings['followmefontsize']) ? esc_attr($apif_settings['followmefontsize']) : '';
11
  $followmetext = !empty($apif_settings['followmetext']) ? $apif_settings['followmetext'] : __('Follow Me', 'accesspress-instagram-feed');
12
  $layout = $apif_settings['instagram_mosaic'];
13
  $image_like = isset($apif_settings['active']) ? $apif_settings['active'] : '';
93
  <a class="example-image-link" href="<?php echo esc_url($video_link); ?>" data-lightbox="example-set">
94
  <div id="inline-1" style="width:100%;height:100%">
95
  <video controls style="width:100%;height:100%">
96
+ <source src="<?php echo esc_url($video_link); ?>" type="video/mp4">
97
  Your browser does not support the video tag.
98
  </video>
99
  </div>
105
  </a>
106
  <?php } ?>
107
  </div>
108
+ <a href="https://instagram.com/<?php echo esc_attr($username); ?>" target="_blank" class="image-hover">
109
  <span class="follow"><?php echo esc_attr($followmetext); ?></span>
110
  <span class="follow_icon">
111
  <img src="<?php echo $flow_icon; ?>"/>
119
  ?>
120
  <!--<div id="inline-1" style="width:100%;height:100%">-->
121
  <video class="the-thumb" controls style="width:100%;height:100%">
122
+ <source class="the-thumb" src="<?php echo esc_url($video_link); ?>" type="video/mp4">
123
  Your browser does not support the video tag.
124
  </video>
125
  <!--</div>-->
128
  <img class="transparent-image" src="<?php echo esc_url($image_url); ?>">
129
  <?php } ?>
130
  </div>
131
+ <a href="https://instagram.com/<?php echo esc_attr($username); ?>" target="_blank" class="image-hover">
132
  <span class="follow"><?php echo esc_attr($followmetext); ?></span>
133
  <span class="follow_icon">
134
  <img src="<?php echo $flow_icon; ?>"/>
136
  </a>
137
  <?php } ?>
138
  </header>
 
 
 
 
 
 
 
 
 
 
 
 
139
  </div>
140
  </div>
141
  <?php
174
  ?>
175
  <div id="inline-1" style="width:100%;height:100%">
176
  <video controls style="width:100%;height:100%">
177
+ <source src="<?php echo esc_url($video_link); ?>" type="video/mp4">
178
  Your browser does not support the video tag.
179
  </video>
180
  </div>
196
  <?php } else if (is_array($ins_media['data']) || is_object($ins_media['data'])) {
197
  ?>
198
  <div class="ri-grid apif-ri-grid">
199
+ <img class="ri-loading-image" src="<?php echo esc_attr(APIF_IMAGE_DIR) . '/ripple.gif'; ?>"/>
200
  <ul>
201
  <?php
202
  foreach ($ins_media['data'] as $vm):
216
  <!--<div id="inline-1" style="width:100%;height:100%;position:relative">-->
217
  <!--<a href="<?php //echo $link ?>" target="_blank">-->
218
  <video controls style="width:inherit !important;height:100%;position:relative;right:0;display:block">
219
+ <source src="<?php echo esc_url($video_link); ?>" type="video/mp4">
220
  Your browser does not support the video tag.
221
  </video>
222
  <!--</a>-->
223
  <!--</div>/-->
224
  <!--</a>-->
225
  <?php } else { ?>
226
+ <a href="<?php echo esc_url($link); ?>" target="_blank">
227
  <img src="<?php echo esc_url($image); ?>" alt='<?php echo strip_tags(substr($vm['caption'], 0, 20)); ?>'>
228
  </a>
229
  <?php } ?>
233
  </div>
234
  <?php } ?>
235
  <?php
236
+ }?>
237
+ <style>
238
+ span.follow{
239
+ font-size:<?php if (isset($followmefontsize) && $followmefontsize != "") {
240
+ echo $followmefontsize ;
241
+ }?>px;
242
+ </style>
inc/frontend/instagram-grid-rotator.php CHANGED
@@ -4,6 +4,7 @@ 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'] : '';
 
7
  $layout = $apif_settings['instagram_mosaic'];
8
  $image_like = $apif_settings['active'];
9
  $count = 7; // number of images to show
@@ -66,21 +67,21 @@ if (isset($ins_media['meta']['error_message'])) {
66
  <?php } else if (is_array($ins_media['data']) || is_object($ins_media['data'])) {
67
  ?>
68
  <div class="ri-grid ri-grid-<?php echo $rand_no; ?> apif-ri-grid">
69
- <img class="ri-loading-image" src="<?php echo APIF_IMAGE_DIR . '/ripple.gif'; ?>"/>
70
  <ul>
71
  <?php
72
  foreach ($ins_media['data'] as $vm):
73
  $img = $vm['media_url'];
74
  $image_url = APIF_IMAGE_DIR . '/image-square.png';
75
- $image = $vm['media_url'];
76
 
77
- $link = $vm['permalink'];
78
  $flow_icon = APIF_IMAGE_DIR . '/sc-icon.png';
79
  ?>
80
  <li>
81
  <?php
82
  if ($vm['media_type'] == "VIDEO") {
83
- $video_link = $vm['media_url'];
84
  ?>
85
  <!--<a href="<?php //echo $link ?>" target="_blank">-->
86
  <!--<div id="inline-1" style="width:100%;height:100%;position:relative">-->
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'] : '';
7
+ $user_id = !empty($apif_settings['user_id']) ? $apif_settings['user_id'] : '';
8
  $layout = $apif_settings['instagram_mosaic'];
9
  $image_like = $apif_settings['active'];
10
  $count = 7; // number of images to show
67
  <?php } else if (is_array($ins_media['data']) || is_object($ins_media['data'])) {
68
  ?>
69
  <div class="ri-grid ri-grid-<?php echo $rand_no; ?> apif-ri-grid">
70
+ <img class="ri-loading-image" src="<?php echo esc_attr(APIF_IMAGE_DIR) . '/ripple.gif'; ?>"/>
71
  <ul>
72
  <?php
73
  foreach ($ins_media['data'] as $vm):
74
  $img = $vm['media_url'];
75
  $image_url = APIF_IMAGE_DIR . '/image-square.png';
76
+ $image = esc_url($vm['media_url']);
77
 
78
+ $link = esc_url($vm['permalink']);
79
  $flow_icon = APIF_IMAGE_DIR . '/sc-icon.png';
80
  ?>
81
  <li>
82
  <?php
83
  if ($vm['media_type'] == "VIDEO") {
84
+ $video_link = esc_url($vm['media_url']);
85
  ?>
86
  <!--<a href="<?php //echo $link ?>" target="_blank">-->
87
  <!--<div id="inline-1" style="width:100%;height:100%;position:relative">-->
inc/frontend/instagram-masaic-light.php CHANGED
@@ -4,7 +4,9 @@ global $apif_settings, $insta;
4
  $apif_settings = get_option('apif_settings');
5
  $username = $apif_settings['username']; // your username
6
  $access_token = $apif_settings['access_token'];
 
7
  $followmetext = !empty($apif_settings['followmetext']) ? $apif_settings['followmetext'] : __('Follow Me', 'accesspress-instagram-feed');
 
8
  $image_like = $apif_settings['active'];
9
  $count = 7; // number of images to show
10
  require_once('instagram.php');
@@ -74,7 +76,7 @@ if (isset($ins_media_masaic['meta']['error_message'])) {
74
  <a class="example-image-link" href="<?php echo esc_url($video_link); ?>" data-lightbox="example-set">
75
  <div id="inline-1" style="width:100%;height:100%">
76
  <video controls style="width:100%;height:100%">
77
- <source src="<?php echo $video_link; ?>" type="video/mp4">
78
  Your browser does not support the video tag.
79
  </video>
80
  </div>
@@ -86,7 +88,7 @@ if (isset($ins_media_masaic['meta']['error_message'])) {
86
  </a>
87
  <?php } ?>
88
  </div>
89
- <a href="https://instagram.com/<?php echo $username; ?>" target="_blank" class="image-hover">
90
  <span class="follow"><?php echo esc_attr($followmetext); ?></span>
91
  <span class="follow_icon">
92
  <img src="<?php echo $flow_icon; ?>" alt='Follow'/>
@@ -103,3 +105,9 @@ if (isset($ins_media_masaic['meta']['error_message'])) {
103
  ?>
104
  </div>
105
  </section>
 
 
 
 
 
 
4
  $apif_settings = get_option('apif_settings');
5
  $username = $apif_settings['username']; // your username
6
  $access_token = $apif_settings['access_token'];
7
+ $user_id = !empty($apif_settings['user_id']) ? $apif_settings['user_id'] : '';
8
  $followmetext = !empty($apif_settings['followmetext']) ? $apif_settings['followmetext'] : __('Follow Me', 'accesspress-instagram-feed');
9
+ $followmefontsize = !empty($apif_settings['followmefontsize']) ? esc_attr($apif_settings['followmefontsize']) : '';
10
  $image_like = $apif_settings['active'];
11
  $count = 7; // number of images to show
12
  require_once('instagram.php');
76
  <a class="example-image-link" href="<?php echo esc_url($video_link); ?>" data-lightbox="example-set">
77
  <div id="inline-1" style="width:100%;height:100%">
78
  <video controls style="width:100%;height:100%">
79
+ <source src="<?php echo esc_url($video_link); ?>" type="video/mp4">
80
  Your browser does not support the video tag.
81
  </video>
82
  </div>
88
  </a>
89
  <?php } ?>
90
  </div>
91
+ <a href="https://instagram.com/<?php echo esc_attr($username); ?>" target="_blank" class="image-hover">
92
  <span class="follow"><?php echo esc_attr($followmetext); ?></span>
93
  <span class="follow_icon">
94
  <img src="<?php echo $flow_icon; ?>" alt='Follow'/>
105
  ?>
106
  </div>
107
  </section>
108
+ <style>
109
+ span.follow{
110
+ font-size:<?php if (isset($followmefontsize) && $followmefontsize != "") {
111
+ echo $followmefontsize ;
112
+ }?>px;
113
+ </style>
inc/frontend/instagram-slider.php CHANGED
@@ -5,6 +5,7 @@ $apif_settings = get_option('apif_settings');
5
  $username = $apif_settings['username']; // your username
6
  $access_token = $apif_settings['access_token'];
7
  $image_like = $apif_settings['active'];
 
8
  $count = 10; // number of images to show
9
  require_once('instagram.php');
10
  if ($username == '' && $access_token == '') {
@@ -43,7 +44,7 @@ if (isset($ins_media_slider['meta']['error_message'])) {
43
  <div class="item">
44
  <?php
45
  if ($vm['media_type'] == "VIDEO") {
46
- $video_link = $vm['media_url'];
47
  ?>
48
  <div id="inline-1" style="width:100%;height:100%">
49
  <video controls style="width:100%;height:100%">
5
  $username = $apif_settings['username']; // your username
6
  $access_token = $apif_settings['access_token'];
7
  $image_like = $apif_settings['active'];
8
+ $user_id = !empty($apif_settings['user_id']) ? $apif_settings['user_id'] : '';
9
  $count = 10; // number of images to show
10
  require_once('instagram.php');
11
  if ($username == '' && $access_token == '') {
44
  <div class="item">
45
  <?php
46
  if ($vm['media_type'] == "VIDEO") {
47
+ $video_link = esc_url($vm['media_url']);
48
  ?>
49
  <div id="inline-1" style="width:100%;height:100%">
50
  <video controls style="width:100%;height:100%">
inc/frontend/instagram-widget.php CHANGED
@@ -4,7 +4,9 @@ global $insta;
4
  $apif_settings = get_option('apif_settings');
5
  $username = $apif_settings['username']; // your username
6
  $access_token = $apif_settings['access_token'];
 
7
  $layout = $apif_settings['instagram_mosaic'];
 
8
  $followmetext = !empty($apif_settings['followmetext']) ? $apif_settings['followmetext'] : __('Follow Me', 'accesspress-instagram-feed');
9
  $image_like = isset($apif_settings['active']) ? $apif_settings['active'] : '0';
10
  $count = 7; // number of images to show
@@ -70,7 +72,7 @@ require_once('instagram.php');
70
  ?>
71
  <div id="inline-1" style="width:100%;height:100%">
72
  <video controls style="width:100%;height:100%">
73
- <source src="<?php echo $video_link; ?>" type="video/mp4">
74
  Your browser does not support the video tag.
75
  </video>
76
  </div>
@@ -79,7 +81,7 @@ require_once('instagram.php');
79
  <img class="transparent-image" src="<?php echo esc_url($image_url); ?>" alt='Transparent Image'>
80
  <?php } ?>
81
  </div>
82
- <a href="https://instagram.com/<?php echo $username; ?>" target="_blank" class="image-hover">
83
  <span class="follow"><?php echo esc_attr($followmetext); ?></span>
84
  <span class="follow_icon">
85
  <img src="<?php echo $flow_icon; ?>" alt="Follow"/>
@@ -95,4 +97,10 @@ require_once('instagram.php');
95
  }
96
  ?>
97
  </div>
98
- </section>
 
 
 
 
 
 
4
  $apif_settings = get_option('apif_settings');
5
  $username = $apif_settings['username']; // your username
6
  $access_token = $apif_settings['access_token'];
7
+ $user_id = $apif_settings['user_id'];
8
  $layout = $apif_settings['instagram_mosaic'];
9
+ $followmefontsize = !empty($apif_settings['followmefontsize']) ? esc_attr($apif_settings['followmefontsize']) : '';
10
  $followmetext = !empty($apif_settings['followmetext']) ? $apif_settings['followmetext'] : __('Follow Me', 'accesspress-instagram-feed');
11
  $image_like = isset($apif_settings['active']) ? $apif_settings['active'] : '0';
12
  $count = 7; // number of images to show
72
  ?>
73
  <div id="inline-1" style="width:100%;height:100%">
74
  <video controls style="width:100%;height:100%">
75
+ <source src="<?php echo esc_url($video_link); ?>" type="video/mp4">
76
  Your browser does not support the video tag.
77
  </video>
78
  </div>
81
  <img class="transparent-image" src="<?php echo esc_url($image_url); ?>" alt='Transparent Image'>
82
  <?php } ?>
83
  </div>
84
+ <a href="https://instagram.com/<?php echo esc_attr($username); ?>" target="_blank" class="image-hover">
85
  <span class="follow"><?php echo esc_attr($followmetext); ?></span>
86
  <span class="follow_icon">
87
  <img src="<?php echo $flow_icon; ?>" alt="Follow"/>
97
  }
98
  ?>
99
  </div>
100
+ </section>
101
+ <style>
102
+ span.follow{
103
+ font-size:<?php if (isset($followmefontsize) && $followmefontsize != "") {
104
+ echo $followmefontsize ;
105
+ }?>px;
106
+ </style>
inc/frontend/instagram.php CHANGED
@@ -4,21 +4,6 @@ class InstaWCD{
4
  $username = strtolower($this->username); // sanitization
5
  $token = $this->access_token;
6
  $user_id = $this->user_id;
7
-
8
- // if(!empty($username) && !empty($token)) {
9
- // $url = "https://api.instagram.com/v1/users/search?q=".$username."&access_token=".$token;
10
- // $get = wp_remote_get($url);
11
- // $response = wp_remote_retrieve_body( $get );
12
- // $json = json_decode($response);
13
- // if(isset($json->data)){
14
- // foreach($json->data as $user){
15
- // if($user->username == $username){
16
- // return $user->id;
17
- // }
18
- // }
19
- // }
20
- // return '00000000'; // return this if nothing is found
21
- // }
22
  }
23
 
24
  function get_remote_data_from_instagram_in_json($url){
@@ -30,9 +15,6 @@ class InstaWCD{
30
  }else{
31
  $response = wp_remote_retrieve_body( $content );
32
  $json = json_decode( $response, true );
33
- // echo "<pre>";
34
- // print_r($json);
35
- // echo "</pre>";
36
  return $json;
37
  }
38
  }
@@ -42,8 +24,6 @@ class InstaWCD{
42
  * @return json
43
  */
44
  function userMedia(){
45
- // $url = 'https://api.instagram.com/v1/users/'.$this->userID().'/media/recent/?access_token='.$this->access_token;
46
- //$url = 'https://api.instagram.com/v1/users/self/media/recent/?access_token=' . $this->access_token;
47
  $token = $this->access_token;
48
  $user_id = $this->user_id;
49
  $url = 'https://graph.instagram.com/'.$user_id.'/media?fields=id,caption,media_type,media_url,permalink,thumbnail_url,timestamp,username&access_token=' . $token .'';
@@ -53,8 +33,6 @@ class InstaWCD{
53
 
54
  //retrive user info
55
  function userInfo(){
56
- //$url = 'https://api.instagram.com/v1/users/' . $this->userID() . '?access_token=' . $this->access_token;
57
- //$url = 'https://api.instagram.com/v1/users/self/?access_token=' . $this->access_token;
58
  $token = $this->access_token;
59
  $user_id = $this->user_id;
60
  $url = 'https://graph.instagram.com/'.$user_id.'?fields=id,username,media_count,account_type&access_token=' . $token .'';
4
  $username = strtolower($this->username); // sanitization
5
  $token = $this->access_token;
6
  $user_id = $this->user_id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  }
8
 
9
  function get_remote_data_from_instagram_in_json($url){
15
  }else{
16
  $response = wp_remote_retrieve_body( $content );
17
  $json = json_decode( $response, true );
 
 
 
18
  return $json;
19
  }
20
  }
24
  * @return json
25
  */
26
  function userMedia(){
 
 
27
  $token = $this->access_token;
28
  $user_id = $this->user_id;
29
  $url = 'https://graph.instagram.com/'.$user_id.'/media?fields=id,caption,media_type,media_url,permalink,thumbnail_url,timestamp,username&access_token=' . $token .'';
33
 
34
  //retrive user info
35
  function userInfo(){
 
 
36
  $token = $this->access_token;
37
  $user_id = $this->user_id;
38
  $url = 'https://graph.instagram.com/'.$user_id.'?fields=id,username,media_count,account_type&access_token=' . $token .'';
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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: 5.5
7
- Stable tag: 4.0.1
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
  4. Backend Display Settings Section
131
 
132
  == Changelog ==
 
 
 
 
133
  = 4.0.1 =
134
  * Code refinement to solve design issue
135
  * WordPress latest version compatibility checked
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: 5.5.1
7
+ Stable tag: 4.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
130
  4. Backend Display Settings Section
131
 
132
  == Changelog ==
133
+ = 4.0.2 =
134
+ * Refined code to fix feed not showing for slider,grid on using shortcode
135
+ * Added settings to change font size as set in backend for follow me text
136
+
137
  = 4.0.1 =
138
  * Code refinement to solve design issue
139
  * WordPress latest version compatibility checked