Instagram Gallery - Version 2.2.3

Version Description

Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 Instagram Gallery
Version 2.2.3
Comparing to
See all releases

Code changes from version 2.1.8 to 2.2.3

Files changed (50) hide show
  1. app/inc/IGIASpi.php +0 -251
  2. app/inc/utis.php +0 -144
  3. app/views/account.php +0 -250
  4. app/views/documentation.php +0 -145
  5. app/views/edit.php +0 -461
  6. app/views/list.php +0 -288
  7. app/wp-front.php +0 -326
  8. app/wp-panel.php +0 -120
  9. app/wp-widget.php +0 -96
  10. assets/admin-style.css +0 -349
  11. assets/css/qligg-admin.css +348 -0
  12. assets/css/qligg-admin.min.css +1 -0
  13. assets/{insta-gallery.css → css/qligg.css} +187 -186
  14. assets/css/qligg.min.css +1 -0
  15. assets/{media → img}/demo-carousel.jpg +0 -0
  16. assets/{media → img}/demo-gallery.jpg +0 -0
  17. assets/img/gallery.jpg +0 -0
  18. assets/{media → img}/ig-hdp-1.png +0 -0
  19. assets/{media → img}/ig-hdp-2.jpg +0 -0
  20. assets/{media → img}/ig-hdp-3.png +0 -0
  21. assets/{media → img}/ig-hdp-4.png +0 -0
  22. assets/{media → img}/ig-hdp-5.png +0 -0
  23. assets/{media → img}/ig-hdp-6.png +0 -0
  24. assets/{media → img}/ig-hdp-7.png +0 -0
  25. assets/{media → img}/ig-hdp-p1.png +0 -0
  26. assets/img/logo.png +0 -0
  27. assets/{media → img}/paypal-logo.svg +0 -0
  28. assets/img/quadlayers.jpg +0 -0
  29. assets/insta-gallery-min.css +0 -3
  30. assets/insta-gallery-min.js +0 -25
  31. assets/js/qligg-admin.js +473 -0
  32. assets/js/qligg-admin.min.js +1 -0
  33. assets/{insta-gallery.js → js/qligg.js} +0 -0
  34. assets/js/qligg.min.js +1 -0
  35. includes/AJAX.php +255 -0
  36. includes/API.php +266 -0
  37. includes/defaults.php +66 -0
  38. includes/frontend.php +301 -0
  39. includes/pages/documentation.php +154 -0
  40. includes/pages/token.php +89 -0
  41. includes/pages/views/edit.php +358 -0
  42. includes/pages/views/list.php +53 -0
  43. includes/pages/views/spinner.php +113 -0
  44. includes/pages/welcome.php +39 -0
  45. includes/settings.php +175 -0
  46. includes/utis.php +120 -0
  47. includes/widget.php +79 -0
  48. insta-gallery.php +87 -236
  49. readme.txt +16 -3
  50. uninstall.php +10 -11
app/inc/IGIASpi.php DELETED
@@ -1,251 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * IGIASpi
5
- * @author Karan Singh
6
- * @version 1.2.1
7
- * @depends Wordpress
8
- * @description script to get instagram public media by using Username and Tag-name.
9
- */
10
- if (! defined('INSGALLERY_PATH')) {
11
- return;
12
- }
13
-
14
- class IGIASpi
15
- {
16
-
17
- protected $instagram;
18
-
19
- // handle raw result from server, for further processing in your app
20
- public $remoteResult;
21
-
22
- public $message;
23
-
24
- private $resultsLimit;
25
-
26
- public function __construct()
27
- {
28
- $this->instagram = 'https://www.instagram.com/';
29
- $this->message = '';
30
- $this->resultsLimit = 50; // limit to 50 only
31
- }
32
-
33
- /*
34
- * API call to get access token using authorization code
35
- * @return boolean or string[access token]
36
- */
37
- public function getAccessToken($client_id, $client_secret, $redirect_uri, $code)
38
- {
39
- $url = 'https://api.instagram.com/oauth/access_token';
40
-
41
- $response = wp_remote_post($url, array(
42
- 'body' => array(
43
- 'client_id' => $client_id,
44
- 'client_secret' => $client_secret,
45
- 'redirect_uri' => $redirect_uri,
46
- 'code' => $code,
47
- 'grant_type' => 'authorization_code',
48
- 'scope' => 'public_content'
49
- )
50
- ));
51
- if (! is_wp_error($response) && isset($response['body']) && ! empty($response['body'])) {
52
- $data = json_decode($response['body'], true);
53
- if (isset($data['error_message'])) {
54
- $this->message = $data['error_message'];
55
- }
56
- if (isset($data['access_token'])) {
57
- return $data['access_token'];
58
- }
59
- }
60
- return false;
61
- }
62
-
63
- /*
64
- * API call to get user profile information using access token
65
- * @return false or array[result]
66
- */
67
- public function getUserProfileInfo($access_token)
68
- {
69
- $url = 'https://api.instagram.com/v1/users/self/?access_token=' . $access_token;
70
-
71
- $response = $this->spider($url);
72
- if (empty($response)) {
73
- return false;
74
- }
75
- $response = json_decode($response, true);
76
-
77
- if (isset($response['meta']['code']) && ($response['meta']['code'] != 200) && isset($response['meta']['error_message'])) {
78
- $this->message = $response['meta']['error_message'];
79
- return false;
80
- }
81
-
82
- return isset($response['data']) ? $response['data'] : false;
83
- }
84
-
85
- /*
86
- * API call to check if access token is valid
87
- * @return true or error message
88
- */
89
- public function isTokenValid($access_token)
90
- {
91
- $url = 'https://api.instagram.com/v1/users/self/?access_token=' . $access_token;
92
-
93
- $response = $this->spider($url);
94
- if (empty($response)) {
95
- return $this->message;
96
- }
97
- $response = json_decode($response);
98
-
99
- if (isset($response->meta->code) && ($response->meta->code != 200) && isset($response->meta->error_message)) {
100
- return $response->meta->error_message;
101
- }
102
-
103
- return true;
104
- }
105
-
106
- // API call to get user feed using access token :
107
- public function getUserMedia($access_token, $count = 30)
108
- {
109
- $url = 'https://api.instagram.com/v1/users/self/media/recent/?access_token=' . $access_token . '&count=' . $count;
110
-
111
- $response = $this->spider($url);
112
- if (empty($response)) {
113
- return false;
114
- }
115
- $response = json_decode($response, true);
116
-
117
- if (isset($response['meta']['code']) && ($response['meta']['code'] != 200) && isset($response['meta']['error_message'])) {
118
- $this->message = $response['meta']['error_message'];
119
- return false;
120
- }
121
-
122
- if (! isset($response['data'])) {
123
- return false;
124
- }
125
-
126
- return $this->setupUserMedia($response['data']);
127
- }
128
-
129
- protected function setupUserMedia($data)
130
- {
131
- $instaItems = array();
132
- if (is_array($data) && ! empty($data)) {
133
- foreach ($data as $item)
134
- $instaItems[] = array(
135
- 'img_standard' => $item['images']['standard_resolution']['url'],
136
- 'img_low' => $item['images']['low_resolution']['url'],
137
- 'img_thumb' => $item['images']['thumbnail']['url'],
138
- 'likes' => $item['likes']['count'],
139
- 'comments' => $item['comments']['count'],
140
- 'caption' => '',
141
- 'code' => '',
142
- 'link' => $item['link'],
143
- 'type' => $item['type'],
144
- 'owner_id' => ''
145
- );
146
- }
147
- return $instaItems;
148
- }
149
-
150
- /**
151
- * takes Tag name and return items list array
152
- *
153
- * @param string $tag
154
- * @return array|false
155
- */
156
- public function getTagItems($tag = '')
157
- {
158
- $instalink = 'https://www.' . 'instagram.com/';
159
- $tag = urlencode((string) $tag);
160
- if (empty($tag)) {
161
- $this->message = 'Please provide a valid # tag';
162
- return false;
163
- }
164
- $url = $instalink . 'explore/tags/' . $tag . '/?__a=1';
165
-
166
- $response = $this->spider($url);
167
- if (empty($response)) {
168
- return false;
169
- }
170
- $response = json_decode($response);
171
-
172
- $items = array();
173
- // API updated on Jan 03 17
174
- if (isset($response->graphql->hashtag->edge_hashtag_to_media->edges)) {
175
- $instaItems = $response->graphql->hashtag->edge_hashtag_to_media->edges;
176
-
177
- if (! empty($instaItems) && is_array($instaItems)) {
178
- $instaItems = array_slice($instaItems, 0, $this->resultsLimit);
179
- foreach ($instaItems as $res) {
180
- // its to check if this API have required variables
181
- if (! isset($res->node->display_url)) {
182
- continue;
183
- }
184
- $type = 'image';
185
- if (isset($res->node->is_video) && (true === $res->node->is_video)) {
186
- $type = 'video';
187
- }
188
- $caption = isset($res->node->edge_media_to_caption->edges[0]->node->text) ? htmlspecialchars($res->node->edge_media_to_caption->edges[0]->node->text) : '';
189
- $items[] = array(
190
- 'img_standard' => $res->node->display_url,
191
- 'img_low' => $res->node->thumbnail_src,
192
- 'img_thumb' => $res->node->thumbnail_resources[0]->src,
193
- 'likes' => $res->node->edge_liked_by->count,
194
- 'comments' => $res->node->edge_media_to_comment->count,
195
- 'caption' => '', // $caption
196
- 'code' => $res->node->shortcode,
197
- 'type' => $type,
198
- 'owner_id' => $res->node->owner->id
199
- );
200
- }
201
- }
202
- }
203
-
204
- return empty($items) ? false : $items;
205
- }
206
-
207
- /**
208
- * takes URL string and return URL content
209
- *
210
- * @param string $url
211
- * @return string|boolean
212
- */
213
- public function spider($url = '')
214
- {
215
- if (empty($url) || (! filter_var($url, FILTER_VALIDATE_URL))) {
216
- $this->message = 'Please provide a Valid URL';
217
- return false;
218
- }
219
- $responseBody = '';
220
-
221
- // get results if script executed in WP
222
- if (function_exists('wp_remote_request')) {
223
- $response = wp_remote_request($url);
224
- if (is_wp_error($response)) {
225
- $this->message = 'WP Error: ' . implode(', ', $response->get_error_messages());
226
- } else {
227
- if (200 !== wp_remote_retrieve_response_code($response)) {
228
- $this->message = 'ERROR: Response Code: ' . wp_remote_retrieve_response_code($response);
229
- }
230
-
231
- if (isset($response['body']) && ! empty($response['body'])) {
232
- $responseBody = $response['body'];
233
- }
234
- }
235
- } else {
236
- $this->message = 'Error: running outside WP.';
237
- }
238
- if (! defined('INSGALLERY' . '_PATH'))
239
- $responseBody = '';
240
-
241
- $this->remoteResult = $responseBody;
242
- return $responseBody;
243
- }
244
-
245
- // return message
246
- public function getMessage()
247
- {
248
- return $this->message;
249
- }
250
- }
251
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/inc/utis.php DELETED
@@ -1,144 +0,0 @@
1
- <?php
2
- /*
3
- * @package Instagram Gallery
4
- * @version 1
5
- * some usefull application utilities
6
- */
7
- if (! defined('INSGALLERY_PATH')) {
8
- return;
9
- }
10
- global $insgalleryIAC, $iispi;
11
-
12
- // some global instagram galley functions
13
-
14
- // save account info
15
- function igf_saveIAC()
16
- {
17
- global $insgalleryIAC;
18
- $option = $insgalleryIAC;
19
- $option = array_map(function ($value) {
20
- return base64_encode($value);
21
- }, $option);
22
- update_option('insta_gallery_iac', $option, false);
23
- }
24
-
25
- // clear old cache
26
- function igf_clearTransients($tk = false)
27
- {
28
- if ($tk) {
29
- delete_transient($tk);
30
- } else {
31
- delete_transient('instagallery_user_profile_info');
32
- delete_transient('instagallery_user_feed');
33
- }
34
- }
35
-
36
- // initialise account info
37
- function igf_initIAC()
38
- {
39
- global $insgalleryIAC;
40
- $option = get_option('insta_gallery_iac');
41
- if ($option && is_array($option)) {
42
- $option = array_map(function ($value) {
43
- return base64_decode($value);
44
- }, $option);
45
- $insgalleryIAC = $option;
46
- }
47
- }
48
-
49
- // generate code generation url
50
- function igf_getCodegURL()
51
- {
52
- $redtURL = 'https://api.instagram.com/oauth/authorize/';
53
- global $insgalleryIAC;
54
- $red_uri = urlencode(igf_getIGRedURI());
55
- $redtURL .= "?client_id={$insgalleryIAC ['client_id']}&response_type=code&scope=public_content&redirect_uri={$red_uri}";
56
- return $redtURL;
57
- }
58
-
59
- // generate code generation url
60
- function igf_getIGRedURI()
61
- {
62
- return admin_url('options-general.php?page=insta_gallery&igigresponse=1');
63
- }
64
-
65
- // return profile info
66
- function igf_getUserProfileInfo()
67
- {
68
- $profileInfo = false;
69
- global $insgalleryIAC, $iispi;
70
- $tk = 'instagallery_user_profile_info';
71
-
72
- if (false === ($profileInfo = get_transient($tk))) {
73
- $profileInfo = $iispi->getUserProfileInfo($insgalleryIAC['access_token']);
74
- if (! empty($profileInfo)) {
75
- set_transient($tk, $profileInfo, HOUR_IN_SECONDS);
76
- }
77
- }
78
- return $profileInfo;
79
- }
80
-
81
- // get user feed
82
- function igf_getUserItems($IGItem)
83
- {
84
- $instaItems = '';
85
- $limit = empty($IGItem['insta_user-limit']) ? 12 : (int) $IGItem['insta_user-limit'];
86
- global $insgalleryIAC, $iispi;
87
-
88
- if (empty($insgalleryIAC['access_token'])) {
89
- return '';
90
- }
91
- $tk = 'instagallery_user_feed'; // transient key
92
- $tkart = $tk . '_artimeout'; // transient key admin request timeout
93
- if (current_user_can('administrator') && (false === get_transient($tkart))) {
94
- $instaItems = $iispi->getUserMedia($insgalleryIAC['access_token'], $limit);
95
- if (! empty($instaItems)) {
96
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
97
- set_transient($tkart, true, 5 * MINUTE_IN_SECONDS);
98
- }
99
- } else {
100
- // Get any existing copy of our transient data
101
- if (false === ($instaItems = get_transient($tk))) {
102
- $instaItems = $iispi->getUserMedia($insgalleryIAC['access_token'], $limit);
103
- if (! empty($instaItems)) {
104
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
105
- }
106
- }
107
- }
108
-
109
- return $instaItems;
110
- }
111
-
112
- // get Tag Items
113
- function igf_getTagItems($IGItem)
114
- {
115
- $instaItems = '';
116
- global $insgalleryIAC, $iispi;
117
-
118
- if (empty($IGItem['insta_tag'])) {
119
- return '';
120
- }
121
- $tk = 'instagallery_tag_' . $IGItem['insta_tag']; // transient key
122
- $tkart = $tk . '_artimeout'; // transient key admin request timeout
123
- if (current_user_can('administrator') && (false === get_transient($tkart))) {
124
- $instaItems = $iispi->getTagItems($IGItem['insta_tag']);
125
- if (! empty($instaItems)) {
126
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
127
- set_transient($tkart, true, 5 * MINUTE_IN_SECONDS);
128
- }
129
- } else {
130
- // Get any existing copy of our transient data
131
- if (false === ($instaItems = get_transient($tk))) {
132
- $instaItems = $iispi->getTagItems($IGItem['insta_tag']);
133
- if (! empty($instaItems)) {
134
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
135
- }
136
- }
137
- }
138
-
139
- return $instaItems;
140
- }
141
- // --------------------------------------------------
142
- igf_initIAC();
143
- include_once (INSGALLERY_PATH . 'app/inc/IGIASpi.php');
144
- $iispi = new IGIASpi();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/views/account.php DELETED
@@ -1,250 +0,0 @@
1
- <?php
2
- if (! defined('ABSPATH')) {
3
- die();
4
- }
5
-
6
- global $insgalleryIAC;
7
- // $insgalleryIAC['access_token'] = '12hfjhdsurybbjdjsudydsghgh';
8
-
9
- ?>
10
-
11
- <div class="ig-account-section">
12
- <header>
13
- <h3>
14
- <?php _e('Instagram account connection','insta-gallery'); ?> &nbsp; &nbsp; &nbsp; <a
15
- href="<?php echo INSGALLERY_URL_ADMIN_PAGE; ?>&tab=documentation" target="_blank" class="button-link" style="font-size: 14px;"><?php _e('How to connect?','insta-gallery'); ?></a>
16
- </h3>
17
- </header>
18
- <?php
19
- if(isset($_GET['code']) && isset($_GET['igigresponse'])){
20
- global $iispi;
21
- $msg = $iispi->getMessage();
22
- if(!empty($msg)){ ?>
23
- <div class="notice notice-warning">
24
- <p><strong><?php echo $msg; ?></strong></p>
25
- </div>
26
- <?php }
27
- }
28
- ?>
29
- <?php if(empty($insgalleryIAC['access_token'])): ?>
30
- <?php
31
- $ig_client_id = empty($insgalleryIAC['client_id']) ? '' : $insgalleryIAC['client_id'];
32
- $ig_client_secret = empty($insgalleryIAC['client_secret']) ? '' : $insgalleryIAC['client_secret'];
33
- ?>
34
- <div class="notice notice-warning">
35
- <p>
36
- <?php _e('No Instagram account connected. please connect an account with the website to access Instagram feed.','insta-gallery'); ?><br /> <strong
37
- style="font-style: italic;"><?php _e('valid Instagram access token is required to connect.','insta-gallery'); ?></strong>
38
- </p>
39
- </div>
40
-
41
- <div class="ig-account-cards">
42
- <form method="post" class="ig-account-card" id="ig-generate-token">
43
- <h4>Generate new access token.</h4>
44
- <p class="field-item">
45
- <input name="ig_client_id" type="text" maxlength="200" placeholder="Instagram Client ID" value="<?php echo $ig_client_id; ?>" required />
46
- </p>
47
- <p class="field-item">
48
- <input name="ig_client_secret" type="text" maxlength="200" placeholder="Instagram Client Secret" value="<?php echo $ig_client_secret; ?>" required />
49
- </p>
50
- <button type="submit" class="button button-primary">Generate Token</button>
51
- <input type="hidden" name="action" value="igara_generate_token" /> <input type="hidden" name="ig_nonce"
52
- value="<?php echo wp_create_nonce( 'igfreq_nonce_key' ); ?>" />
53
- <div class="igf-response"></div>
54
- <p>
55
- <a href="<?php echo INSGALLERY_URL_ADMIN_PAGE; ?>&tab=documentation" target="_blank" class="button-link" style="font-size: 14px;"><?php _e('click here','insta-gallery'); ?></a>
56
- for instructions on how to generate these credentials.
57
- </p>
58
- </form>
59
- <form method="post" class="ig-account-card" id="ig-update-token">
60
- <h4>Already have access token?</h4>
61
- <p class="field-item">
62
- <input name="ig_access_token" type="text" maxlength="200" placeholder="Enter a valid Access Token" required />
63
- </p>
64
- <button type="submit" class="button button-primary">Update Token</button>
65
- <div class="igf-response"></div>
66
- <input type="hidden" name="action" value="igara_update_token" /> <input type="hidden" name="ig_nonce"
67
- value="<?php echo wp_create_nonce( 'igfreq_nonce_key' ); ?>" />
68
- </form>
69
- </div>
70
- <?php endif; ?>
71
-
72
- <?php if(!empty($insgalleryIAC['access_token'])): ?>
73
- <div class="ig-account-cards ig-ac-have-token">
74
- <?php
75
- $token = filter_var($insgalleryIAC['access_token'], FILTER_SANITIZE_STRING);
76
- global $iispi;
77
- $profileInfo = igf_getUserProfileInfo();
78
- ?>
79
- <div class="ig-account-card">
80
- <?php if($profileInfo): ?>
81
- <figure>
82
- <img src="<?php echo $profileInfo['profile_picture']; ?>" width="150" />
83
- <figcaption>
84
- <strong style="color: #e23565;">Connected: </strong> <?php echo $profileInfo['full_name']; ?></figcaption>
85
- </figure>
86
- <?php else : ?>
87
- <?php $msg = $iispi->getMessage();
88
- if(!empty($msg)){ ?>
89
- <div class="notice notice-warning">
90
- <p><strong><?php echo $msg; ?></strong></p>
91
- </div>
92
- <?php } ?>
93
- <?php endif; ?>
94
- <div style="text-align: center;">
95
- <button type="submit" data-igtoggle="#ig-remove-token" class="button">Disconnect</button>
96
- </div>
97
- </div>
98
- <form method="post" class="ig-account-card" id="ig-remove-token">
99
- <p class="field-item">
100
- <label>Active access token:</label> <input name="ig_access_token" type="text" maxlength="200"
101
- value="x x x x x x <?php echo substr($token,-10); ?>" readonly />
102
- </p>
103
- <button type="submit" class="button button-primary">Remove Token</button>
104
- <span class="igf-response"></span> <input type="hidden" name="action" value="igara_remove_token" /> <input type="hidden" name="ig_nonce"
105
- value="<?php echo wp_create_nonce( 'igfreq_nonce_key' ); ?>" />
106
-
107
- <p>
108
- note: it will remove <strong>access token</strong> and <strong>client secret</strong>.
109
- </p>
110
- <p>
111
- you can also Login to <a href="https://www.instagram.com/developer/clients/manage/" rel="noreferrer nofollow noopener"
112
- target="_blank">Instagram Developer Web page</a> and can delete the registered App.
113
- </p>
114
- </form>
115
- </div>
116
- <?php endif; ?>
117
-
118
- </div>
119
- <hr />
120
-
121
-
122
- <script>
123
- jQuery(function($){
124
- // update Token handling
125
- $('#ig-update-token').on('submit',function(ev){
126
- ev.preventDefault();
127
- $f = $(this);
128
- var $fresponse = $f.find('.igf-response');
129
- var spinner = '<span class="spinner" style="float: none; margin: 0 3px; visibility: visible;"></span>';
130
- jQuery.ajax({
131
- url : ajaxurl,
132
- type : 'post',
133
- dataType: 'JSON',
134
- data : $f.serialize(),
135
- beforeSend : function()
136
- {
137
- $fresponse.html(spinner);
138
- },
139
- success : function( response ) {
140
- if ((typeof response === 'object') && response.hasOwnProperty('success')) {
141
- $fresponse.html(response.data);
142
- if(response.success){
143
- setTimeout(function(){
144
- window.location.href = window.location.href;
145
- },3000);
146
- }
147
- }else{
148
- $fresponse.html('invalid response.');
149
- }
150
- }
151
- }).fail(function (jqXHR, textStatus) {
152
- console.log(textStatus);
153
- }).always(function()
154
- {
155
- if($fresponse.find('.spinner').length){
156
- $fresponse.empty();
157
- }
158
- });
159
- });
160
-
161
- // generate Token handling
162
- $('#ig-generate-token').on('submit',function(ev){
163
- ev.preventDefault();
164
- $f = $(this);
165
- var $fresponse = $f.find('.igf-response');
166
- var spinner = '<span class="spinner" style="float: none; margin: 0 3px; visibility: visible;"></span>';
167
- jQuery.ajax({
168
- url : ajaxurl,
169
- type : 'post',
170
- dataType: 'JSON',
171
- data : $f.serialize(),
172
- beforeSend : function()
173
- {
174
- $fresponse.html(spinner);
175
- },
176
- success : function( response ) {
177
- if ((typeof response === 'object') && response.hasOwnProperty('success')) {
178
-
179
- if(response.success){
180
- window.location.href = response.data;
181
- //$fresponse.html(response.data);
182
- }else{
183
- $fresponse.html(response.data);
184
- }
185
- }else{
186
- $fresponse.html('invalid response.');
187
- }
188
- }
189
- }).fail(function (jqXHR, textStatus) {
190
- console.log(textStatus);
191
- }).always(function()
192
- {
193
- if($fresponse.find('.spinner').length){
194
- $fresponse.empty();
195
- }
196
- });
197
- });
198
-
199
- // remove Token handling
200
- $('#ig-remove-token').on('submit',function(ev){
201
- ev.preventDefault();
202
- var c = confirm('<?php _e('Are you sure want to delete this Token?','insta-gallery'); ?>');
203
- if(!c){
204
- return false;
205
- }
206
- $f = $(this);
207
- var $fresponse = $f.find('.igf-response');
208
- var spinner = '<span class="spinner" style="float: none; margin: 0 3px; visibility: visible;"></span>';
209
- jQuery.ajax({
210
- url : ajaxurl,
211
- type : 'post',
212
- dataType: 'JSON',
213
- data : $f.serialize(),
214
- beforeSend : function()
215
- {
216
- $fresponse.html(spinner);
217
- },
218
- success : function( response ) {
219
- if ((typeof response === 'object') && response.hasOwnProperty('success')) {
220
- $fresponse.html(response.data);
221
- if(response.success){
222
- setTimeout(function(){
223
- window.location.href = window.location.href;
224
- },3000);
225
- }
226
- }else{
227
- $fresponse.html('invalid response.');
228
- }
229
- }
230
- }).fail(function (jqXHR, textStatus) {
231
- console.log(textStatus);
232
- }).always(function()
233
- {
234
- if($fresponse.find('.spinner').length){
235
- $fresponse.empty();
236
- }
237
- });
238
- });
239
-
240
- // toggler
241
- jQuery('[data-igtoggle]').on('click',function(ev){
242
- var $e = $(this);
243
- var target = $e.data('igtoggle');
244
- if($(target).length){
245
- ev.preventDefault();
246
- $(target).fadeToggle();
247
- }
248
- });
249
- });
250
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/views/documentation.php DELETED
@@ -1,145 +0,0 @@
1
-
2
- <header class="ig-doc-header">
3
- <h3>
4
- How to Get Instagram API Credentials: <a href="#TB_inline?&width=920&height=600&inlineId=ig-ahcreds" class="thickbox" style="font-size: 75%;">(i
5
- already have API credentials)</a>
6
- </h3>
7
- <p>
8
- To fetch Instagram feed you have to pass <strong>access token</strong> to Instagram. And access token can be generated using Instagram API (which
9
- need to register an Application). So please register Instagram Gallery plugin to access feed, which requires authentication. <strong><a
10
- href="https://www.instagram.com/developer/" title="Instagram Developer Documentation" target="_blank" rel="noreferrer nofollow noopener">Read More</a></strong>
11
- </p>
12
- <p>
13
- Please follow the below steps carefully to get API Credentials. Let’s go!<br />
14
- </p>
15
- </header>
16
- <div class="notice notice-info is-dismissible"><p>if you are facing any issue while generating access token, then you can take help from <a href="https://www.google.co.in/search?q=how+to+generate+instagram+access+token&amp;ie=UTF-8&amp;oe=UTF-8" title="Google search for Instagram access token" target="_blank" rel="noreferrer nofollow noopener">Internet</a>. there are lots of videos and articles available there.</p></div>
17
- <div id="ig-ahcreds" style="display: none;">
18
- <h4>
19
- if you already have API credentials and already registerd an Application, but <strong>access token</strong> is not generated,<br /> then you can use
20
- same credentials by following the simple steps below:
21
- </h4>
22
- <ol>
23
- <li>Login to <a href="https://www.instagram.com/developer/" target="_blank" rel="noreferrer nofollow noopener">Instagram developer web page</a></li>
24
- <li>goto <strong>Manage Clients</strong> section.
25
- </li>
26
- <li>click <strong>Manage</strong> button within specific client.
27
- </li>
28
- <li>click <strong>Security</strong> tab within the opened client.
29
- </li>
30
- <li>and add the below <strong>redirect URI</strong> within the <strong>Valid redirect URIs:</strong> field.
31
- </li>
32
- </ol>
33
- <p>
34
- <label ><strong>Redirect URI</strong>: <input type="url" onclick="select();document.execCommand('copy');alert('copied');" title="click to copy" value="<?php echo igf_getIGRedURI(); ?>"
35
- class="ig-doc-red-url" readonly /></label>
36
- </p>
37
- <hr />
38
- <figure class="ig-doc-figure">
39
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/ig-hdp-p1.png" />
40
- </figure>
41
- </div>
42
- <div class="ig-doc-body">
43
- <article>
44
- <h3>
45
- <span>Step 1:</span> Sign in Instargam as a developer.
46
- </h3>
47
- <p>
48
- You have to register as a developer in Instagram to receive <b>Client ID</b> and <b>Client Secret</b>. That’s why please follow the link to the <a
49
- href="https://www.instagram.com/developer/" target="_blank" rel="noreferrer nofollow noopener">Instagram developer web page</a> and Login to your
50
- account.
51
- </p>
52
- <figure>
53
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/ig-hdp-1.png" />
54
- </figure>
55
- <p>
56
- After login click on <strong>Register Your Application</strong> button to continue.
57
- </p>
58
- <figure>
59
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/ig-hdp-2.jpg" />
60
- </figure>
61
- </article>
62
- <article>
63
- <h3>
64
- <span>Step 2:</span> Fill in the Developer Signup Details.
65
- </h3>
66
- <p>Instagram demands to be registered as a developer from everyone, who wants to display Instagram feed on his website. After you log in the next
67
- window will appear.</p>
68
- <p>Fill-up all the fields on the web page:</p>
69
- <table>
70
- <tr>
71
- <th>Your website:</th>
72
- <td>the URL of your website.</td>
73
- </tr>
74
- <tr>
75
- <th>Phone number:</th>
76
- <td>your phone number.</td>
77
- </tr>
78
- <tr>
79
- <th>What do you want to build with API?</th>
80
- <td>any short description.</td>
81
- </tr>
82
- </table>
83
- <figure>
84
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/ig-hdp-3.png" />
85
- </figure>
86
- </article>
87
- <article>
88
- <h3>
89
- <span>Step 3:</span> Register your Application.
90
- </h3>
91
- <p>After Developer signup, Now you can register your Application.</p>
92
- <figure>
93
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/ig-hdp-4.png" />
94
- </figure>
95
- <h3>Register New Client ID</h3>
96
- <p>Check the fields on the web page:</p>
97
- <table>
98
- <tr>
99
- <th>Application name</th>
100
- <td>choose any appropriate name, which fits Instagram requirements.</td>
101
- </tr>
102
- <tr>
103
- <th>Description</th>
104
- <td>any short description.</td>
105
- </tr>
106
- <tr>
107
- <th>Company Name</th>
108
- <td>company/website name.</td>
109
- </tr>
110
- <tr>
111
- <th>Website URL</th>
112
- <td>your website url e.g. <strong><?php echo home_url(); ?></strong></td>
113
- </tr>
114
- <tr>
115
- <th>Valid redirect URIs</th>
116
- <td>have to be <input type="url" onclick="select();document.execCommand('copy');alert('copied');" title="click to copy"
117
- value="<?php echo igf_getIGRedURI(); ?>" class="ig-doc-red-url" readonly /><br /> <strong
118
- style="color: #e93b59; font-size: 15px; line-height: normal; font-style: italic;">(note that you should set the redirect link exactly the same
119
- displayed here.)</strong></td>
120
- </tr>
121
- <tr>
122
- <th>Privacy Policy URL</th>
123
- <td>your website url e.g. <strong><?php echo home_url(); ?></strong></td>
124
- </tr>
125
- <tr>
126
- <th>Contact email</th>
127
- <td>your email address.</td>
128
- </tr>
129
- </table>
130
- <p>In the "Security" tab, leave the default settings ("Disable implicit OAuth" should be checked & "Enforce signed requests" should be unchecked).</p>
131
-
132
- <figure>
133
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/ig-hdp-5.png" />
134
- </figure>
135
- <p>Now confirm the filled details and proceed to the next page. Here you can see Instagram Client ID and Client Secret.</p>
136
- <figure>
137
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/ig-hdp-6.png" />
138
- </figure>
139
- <p>Copy the crendentials and go back to your Instagram Gallery plugin setting page and enter the generated crendentials to get Access Token.</p>
140
- <figure>
141
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/ig-hdp-7.png" />
142
- </figure>
143
- </article>
144
- </div>
145
- <footer> </footer>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/views/edit.php DELETED
@@ -1,461 +0,0 @@
1
- <?php
2
- if (! defined('ABSPATH')) {
3
- die();
4
- }
5
- global $insgalleryIAC;
6
- $InstaGalleryItem = null;
7
- if (isset($_GET['ig_item']) && ! empty($_GET['ig_item'])) {
8
- $ig_item_id = (int) $_GET['ig_item'];
9
- $InstaGalleryItems = get_option('insta_gallery_items');
10
- if (isset($InstaGalleryItems[$ig_item_id])) {
11
- $InstaGalleryItem = $InstaGalleryItems[$ig_item_id];
12
- $InstaGalleryItem['ig_item_id'] = $ig_item_id;
13
- }
14
- }
15
-
16
- $active_username = true;
17
- $active_tag = false;
18
- if (isset($InstaGalleryItem['ig_select_from'])) {
19
- if ($InstaGalleryItem['ig_select_from'] != 'username') {
20
- $active_username = false;
21
- $active_tag = true;
22
- }
23
- }
24
-
25
- $active_gallery = true;
26
- $active_carousel = false;
27
- if (isset($InstaGalleryItem['ig_display_type'])) {
28
- if ($InstaGalleryItem['ig_display_type'] == 'carousel') {
29
- $active_gallery = false;
30
- $active_carousel = true;
31
- }
32
- }
33
-
34
- ?>
35
- <p>
36
- <a href="<?php echo INSGALLERY_URL_ADMIN_PAGE; ?>" title="<?php _e('View Galleries List','insta-gallery'); ?>" class="ig-btn"><span
37
- class="dashicons dashicons-arrow-left-alt"></span><?php _e('Back to List','insta-gallery'); ?></a>
38
- </p>
39
-
40
- <!-- Fix: Exifography plugin drag-n-drop rows issue -->
41
- <div class="form-table"></div>
42
-
43
- <div class="form-table"></div>
44
- <!-- Exifography sortable fix -->
45
- <form method="post" id="ig-form-update" action="<?php if(empty($InstaGalleryItem)) echo INSGALLERY_URL_ADMIN_PAGE; ?>">
46
- <table class="form-table ig-table-edit">
47
- <tbody>
48
- <tr>
49
- <th scope="row"><?php _e('Display Instagram Gallery from','insta-gallery'); ?>:</th>
50
- <td>
51
- <ul class="ig-list-buttons">
52
- <li><input type="radio" id="ig_select_from-username" name="ig_select_from" value="username" <?php if($active_username) echo 'checked';?> /><label
53
- for="ig_select_from-username"><?php _e('My Account','insta-gallery'); ?></label>
54
- <div class="check"></div></li>
55
- <li><input type="radio" id="ig_select_from-tag" name="ig_select_from" value="tag" <?php if($active_tag) echo 'checked';?> /> <label
56
- for="ig_select_from-tag"><?php _e('Tagname','insta-gallery'); ?></label>
57
- <div class="check"></div></li>
58
- </ul> <span class="description"> (<?php _e('Please select option to display pictures from Instagram Username OR # Tag.','insta-gallery'); ?>)</span>
59
-
60
- </td>
61
- </tr>
62
- <tr id="ig-select-username-wrap" class="ig-tab-content-row <?php if($active_username) echo 'active';?>">
63
- <td colspan="100%">
64
- <table>
65
- <tr>
66
- <th scope="row"><?php _e('Instagram Username','insta-gallery'); ?>:</th>
67
- <td>
68
- <?php if(empty($insgalleryIAC['access_token'])): ?>
69
- <p class="ig-thm-color">
70
- <strong><?php _e('No Instagram account connected. please connect an account with the website to access Instagram media.','insta-gallery'); ?></strong></strong>
71
- </p>
72
- <input name="insta_user" type="hidden" value="nousername" readonly />
73
- <?php
74
- else :
75
- $profileInfo = igf_getUserProfileInfo();
76
- $username = empty($profileInfo['username']) ? 'nousername' : $profileInfo['username'];
77
- ?>
78
- <input name="insta_user" type="text" placeholder="myusername" value="<?php echo $username; ?>" readonly /> <span class="description"></span>
79
- <p class="ig-generate-msgs"><?php _e('Please enter Instagram Username.','insta-gallery'); ?></p>
80
- <?php endif; ?>
81
- </td>
82
- </tr>
83
- <tr>
84
- <th scope="row"><?php _e('Pictures Limit','insta-gallery'); ?>:</th>
85
- <td><input name="insta_user-limit" type="number" min="1" max="50"
86
- value="<?php if(!empty($InstaGalleryItem['insta_user-limit'])){echo $InstaGalleryItem['insta_user-limit']; } else {echo '12'; }?>" /> <span
87
- class="description"><?php _e('number of pictures to display','insta-gallery'); ?></span></td>
88
- </tr>
89
- </table>
90
- </td>
91
- </tr>
92
- <tr id="ig-select-tag-wrap" class="ig-tab-content-row <?php if($active_tag) echo 'active';?>">
93
- <td colspan="100%">
94
- <table>
95
- <tr>
96
- <th scope="row"><?php _e('Instagram Tagname','insta-gallery'); ?>:</th>
97
- <td><input name="insta_tag" type="text" placeholder="beautiful"
98
- value="<?php if(!empty($InstaGalleryItem['insta_tag'])){echo $InstaGalleryItem['insta_tag']; }?>" /> <span class="description">e.g. <strong
99
- style="font-size: 120%; color: #e23565;">beautiful</strong><br /> <small>https://www.instagram.com/explore/tags/<strong
100
- style="font-size: 120%; color: #e23565;">beautiful</strong>/
101
- </small>
102
- </span>
103
- <p class="ig-generate-msgs"><?php _e('Please enter Instagram Tagname.','insta-gallery'); ?></p></td>
104
- </tr>
105
- <tr>
106
- <th scope="row"><?php _e('Pictures Limit','insta-gallery'); ?>:</th>
107
- <td><input name="insta_tag-limit" type="number" min="1" max="30"
108
- value="<?php if(!empty($InstaGalleryItem['insta_tag-limit'])){echo $InstaGalleryItem['insta_tag-limit']; } else {echo '12'; }?>" /> <span
109
- class="description"><?php _e('number of pictures to display.','insta-gallery'); ?></span></td>
110
- </tr>
111
- </table>
112
- </td>
113
- </tr>
114
- <tr>
115
- <th scope="row"><?php _e('Show As','insta-gallery'); ?>:</th>
116
- <td>
117
- <ul class="ig-list-buttons">
118
- <li><input type="radio" id="ig_display_type-gallery" name="ig_display_type" value="gallery" <?php if($active_gallery) echo 'checked';?> /><label
119
- for="ig_display_type-gallery"><?php _e('Gallery','insta-gallery'); ?></label>
120
- <div class="check"></div></li>
121
- <li><input type="radio" id="ig_display_type-carousel" name="ig_display_type" value="carousel" <?php if($active_carousel) echo 'checked';?> /><label
122
- for="ig_display_type-carousel"><?php _e('Carousel','insta-gallery'); ?></label>
123
- <div class="check"></div></li>
124
- </ul>
125
- </td>
126
- </tr>
127
- <tr id="ig-section-as-galllery" class="ig-tab-content-row <?php if($active_gallery) echo 'active';?>">
128
- <td colspan="100%">
129
- <p>
130
- <strong><?php _e('Pictures will be displayed as Grid.','insta-gallery'); ?></strong>
131
- </p>
132
- <table>
133
- <tr>
134
- <th scope="row"><?php _e('No. of Grid Columns','insta-gallery'); ?>:</th>
135
- <td><input name="insta_gal-cols" type="number" min="1" max="20"
136
- value="<?php if(!empty($InstaGalleryItem['insta_gal-cols'])){echo $InstaGalleryItem['insta_gal-cols']; } else {echo 3;}?>" /> <span
137
- class="description"><?php _e('number of pictures in a row','insta-gallery'); ?>. </span></td>
138
- <td rowspan="3"><img src="<?php echo INSGALLERY_URL; ?>/assets/media/demo-gallery.jpg" alt="demo gallery" width="500" /></td>
139
- </tr>
140
- <tr>
141
- <th scope="row"><?php _e('Image hover effect','insta-gallery'); ?>:</th>
142
- <td><input name="insta_gal-hover" type="checkbox" value="1"
143
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_gal-hover'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('mouseover animation effect on image','insta-gallery'); ?> </span></td>
144
- </tr>
145
- <tr>
146
- <th scope="row"><?php _e('Space between images','insta-gallery'); ?>:</th>
147
- <td><input name="insta_gal-spacing" type="checkbox" value="1"
148
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_gal-spacing'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('add blank space between images','insta-gallery'); ?> </span></td>
149
- </tr>
150
- </table>
151
- </td>
152
- </tr>
153
- <tr id="ig-section-as-carousel" class="ig-tab-content-row <?php if($active_carousel) echo 'active';?>">
154
- <td colspan="100%">
155
- <p>
156
- <strong><?php _e('Pictures will be displayed as Carousel slider.','insta-gallery'); ?></strong>
157
- </p>
158
- <table>
159
- <tr>
160
- <th scope="row"><?php _e('Slides per view','insta-gallery'); ?>:</th>
161
- <td><input name="insta_car-slidespv" type="number" min="1" max="10"
162
- value="<?php if(!empty($InstaGalleryItem['insta_car-slidespv'])){echo $InstaGalleryItem['insta_car-slidespv']; } else {echo 5;}?>" /> <span
163
- class="description"><?php _e('display number of pictures per slide view.','insta-gallery'); ?> </span></td>
164
- <td rowspan="5"><img src="<?php echo INSGALLERY_URL; ?>/assets/media/demo-carousel.jpg" alt="demo carousel" width="500" /></td>
165
- </tr>
166
- <tr>
167
- <th scope="row"><?php _e('Autoplay','insta-gallery'); ?>:</th>
168
- <td><input name="insta_car-autoplay" type="checkbox" value="1"
169
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_car-autoplay'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('autoplay carousel items.','insta-gallery'); ?> </span></td>
170
- </tr>
171
- <tr>
172
- <th scope="row"><?php _e('Autoplay Interval','insta-gallery'); ?>:</th>
173
- <td><input name="insta_car-autoplay-interval" type="number" min="1000" max="300000" step="100"
174
- value="<?php if(!empty($InstaGalleryItem['insta_car-autoplay-interval'])){echo $InstaGalleryItem['insta_car-autoplay-interval']; } else {echo 3000;}?>" />
175
- <span class="description"><?php _e('moves to next picture after specified time interval.','insta-gallery'); ?> <br />( <span
176
- class="ig-thm-color"><?php _e('Interval is in milliseconds','insta-gallery'); ?>
177
- </span> ) </span></td>
178
- </tr>
179
- <tr>
180
- <th scope="row"><?php _e('Navigation arrows','insta-gallery'); ?>:</th>
181
- <td><input name="insta_car-navarrows" type="checkbox" value="1"
182
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_car-navarrows'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('show prev-next navigation arrows.','insta-gallery'); ?> </span></td>
183
- </tr>
184
- <tr>
185
- <th scope="row"><?php _e('Navigation arrows color','insta-gallery'); ?>:</th>
186
- <td><input id="insta_car-navarrows-color-choose" type="color"
187
- value="<?php echo (!empty($InstaGalleryItem['insta_car-navarrows-color']) ? $InstaGalleryItem['insta_car-navarrows-color'] : '#c32a67'); ?>" />
188
- <input name="insta_car-navarrows-color" type="text" placeholder="#c32a67"
189
- value="<?php echo (!empty($InstaGalleryItem['insta_car-navarrows-color']) ? $InstaGalleryItem['insta_car-navarrows-color'] : ''); ?>" /> <span
190
- class="description"><?php _e('change navigation arrows color here.','insta-gallery'); ?></span></td>
191
- </tr>
192
-
193
-
194
- <!--
195
- <tr>
196
- <th scope="row"><?php _e('Dotted navigation','insta-gallery'); ?>:</th>
197
- <td><input name="insta_car-dots" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_car-dots'])) ? '' : 'checked'; ?> /> <span
198
- class="description"><?php _e('show dotted navigation buttons.','insta-gallery'); ?><br />( <span class="ig-thm-color"><strong><?php
199
- _e('Deprecated: this option will be removed in the future updates.', 'insta-gallery');
200
- ?></strong></span> )</span></td>
201
- </tr>
202
- -->
203
-
204
-
205
- <tr>
206
- <th scope="row"><?php _e('Space between slides','insta-gallery'); ?>:</th>
207
- <td><input name="insta_car-spacing" type="checkbox" value="1"
208
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_car-spacing'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('add blank space between carousel items.','insta-gallery'); ?> </span></td>
209
- </tr>
210
- </table>
211
- </td>
212
- </tr>
213
- <tr>
214
- <th scope="row"><?php _e('Images thumbnail size','insta-gallery'); ?>:</th>
215
- <td><select name="insta_thumb-size">
216
- <option value="standard"><?php _e('Standard','insta-gallery'); ?> (640 x auto)</option>
217
- <option value="medium" <?php echo (isset($InstaGalleryItem['insta_thumb-size']) && ($InstaGalleryItem['insta_thumb-size'] == 'medium')) ? 'selected' : ''; ?>><?php _e('Medium','insta-gallery'); ?> (320 x auto)</option>
218
- <option value="small"
219
- <?php echo (isset($InstaGalleryItem['insta_thumb-size']) && ($InstaGalleryItem['insta_thumb-size'] == 'small')) ? 'selected' : ''; ?>><?php _e('Small','insta-gallery'); ?> (150
220
- x 150)</option>
221
- </select></td>
222
- </tr>
223
- <tr>
224
- <th scope="row"><?php _e('Images hover effect color','insta-gallery'); ?>:</th>
225
- <td><input id="insta_hover-color-choose" type="color"
226
- value="<?php echo (!empty($InstaGalleryItem['insta_hover-color']) ? $InstaGalleryItem['insta_hover-color'] : '#007aff'); ?>" /> <input
227
- name="insta_hover-color" type="text" placeholder="#007aff"
228
- value="<?php echo (!empty($InstaGalleryItem['insta_hover-color']) ? $InstaGalleryItem['insta_hover-color'] : ''); ?>" /> <span
229
- class="description"><?php _e('select color which is displayed when hovered over images.','insta-gallery'); ?><br />( <span class="ig-thm-color"><?php _e('color name should be in Hexadecimal notation. e.g. #dddddd','insta-gallery'); ?>
230
- </span> ) </span></td>
231
- </tr>
232
- <tr>
233
- <th scope="row"><?php _e('Popup images on click','insta-gallery'); ?>:</th>
234
- <td><input name="insta_gal-popup" type="checkbox" value="1"
235
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_gal-popup'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('show popup gallery by clicking on image thumbnail. else it will open Instagram page.','insta-gallery'); ?> <br />(
236
- <span class="ig-thm-color"><?php
237
- _e('uncheck this if it conflicts with other plugins, like: fancybox, prettyphoto, elementor etc.', 'insta-gallery');
238
- ?></span> ) </span></td>
239
- </tr>
240
- <tr hidden>
241
- <th scope="row"><?php _e('Display image caption','insta-gallery'); ?>:</th>
242
- <td><input name="insta_popup-caption" type="checkbox" readonly value="1"
243
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_popup-caption'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('Display caption/tags below images when popup.','insta-gallery'); ?><br />(
244
- <span class="ig-thm-color"><strong><?php
245
- _e('Deprecated: this option will be removed in the future updates.', 'insta-gallery');
246
- ?></strong></span> ) </span></td>
247
- </tr>
248
- <tr>
249
- <th scope="row"><?php _e('Display Likes','insta-gallery'); ?>:</th>
250
- <td><input name="insta_likes" type="checkbox" value="1"
251
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_likes'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('display likes count of images.','insta-gallery'); ?> </span></td>
252
- </tr>
253
- <tr>
254
- <th scope="row"><?php _e('Display Comments','insta-gallery'); ?>:</th>
255
- <td><input name="insta_comments" type="checkbox" value="1"
256
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_comments'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('display comments count of images.','insta-gallery'); ?> </span></td>
257
- </tr>
258
- <tr>
259
- <th scope="row"><?php _e('Display Instagram Link Button','insta-gallery'); ?>:</th>
260
- <td><input name="insta_instalink" type="checkbox" value="1"
261
- <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_instalink'])) ? '' : 'checked'; ?> /> <span class="description"><?php _e('show the button to open Instagram site link','insta-gallery'); ?> </span></td>
262
- </tr>
263
- <tr id="ig-section-igbtn"
264
- class="ig-tab-content-row <?php if(isset($InstaGalleryItem) && !empty($InstaGalleryItem['insta_instalink'])) echo 'active';?>">
265
- <td colspan="100%">
266
- <table>
267
- <tr>
268
- <th scope="row"><?php _e('Instagram Button Text','insta-gallery'); ?>:</th>
269
- <td><input name="insta_instalink-text" type="text" placeholder="view on Instagram"
270
- value="<?php if(!empty($InstaGalleryItem['insta_instalink-text'])){echo $InstaGalleryItem['insta_instalink-text']; }?>" /> <span
271
- class="description"><?php _e('update Instagram button text here.','insta-gallery'); ?></span></td>
272
- </tr>
273
- <tr>
274
- <th scope="row"><?php _e('Button Background Color','insta-gallery'); ?>:</th>
275
- <td><input id="insta_instalink-bgcolor-choose" type="color"
276
- value="<?php echo (!empty($InstaGalleryItem['insta_instalink-bgcolor']) ? $InstaGalleryItem['insta_instalink-bgcolor'] : '#c32a67'); ?>" /> <input
277
- name="insta_instalink-bgcolor" type="text" placeholder="#c32a67"
278
- value="<?php echo (!empty($InstaGalleryItem['insta_instalink-bgcolor']) ? $InstaGalleryItem['insta_instalink-bgcolor'] : ''); ?>" /> <span
279
- class="description"><?php _e('color which is displayed on button background.','insta-gallery'); ?></span></td>
280
- </tr>
281
- <tr>
282
- <th scope="row"><?php _e('Button Hover Color','insta-gallery'); ?>:</th>
283
- <td><input id="insta_instalink-hvrcolor-choose" type="color"
284
- value="<?php echo (!empty($InstaGalleryItem['insta_instalink-hvrcolor']) ? $InstaGalleryItem['insta_instalink-hvrcolor'] : '#da894a'); ?>" />
285
- <input name="insta_instalink-hvrcolor" type="text" placeholder="#da894a"
286
- value="<?php echo (!empty($InstaGalleryItem['insta_instalink-hvrcolor']) ? $InstaGalleryItem['insta_instalink-hvrcolor'] : ''); ?>" /> <span
287
- class="description"><?php _e('color which is displayed when hovered over button.','insta-gallery'); ?></span></td>
288
- </tr>
289
- </table>
290
- </td>
291
- </tr>
292
- </tbody>
293
- </table>
294
- <div>
295
- <button class="button-primary ig-add-update" type="submit">
296
- <?php _e('Update','insta-gallery'); ?>
297
- </button>
298
- <p class="description"><?php _e('update settings and copy/paste generated shortcode in your post/pages or goto Widgets and use Instagram Gallery widget.','insta-gallery'); ?></p>
299
- </div>
300
- <input type="hidden" name="ig-form-update" value="true" />
301
- <input type="hidden" name="ig_nonce" value="<?php echo wp_create_nonce( 'igfreq_nonce_key' ); ?>" />
302
- <?php if(!empty($InstaGalleryItem['ig_item_id'])) {?>
303
- <input type="hidden" name="igitem_id" value="<?php echo $InstaGalleryItem['ig_item_id']; ?>" />
304
- <?php } ?>
305
- </form>
306
- <script>
307
- jQuery(document).ready(function($){
308
- // by username/tag toggle
309
- $('input[name="ig_select_from"]').on('change',function(){
310
- if(this.value == 'username'){
311
- $('#ig-select-tag-wrap').hide(500, function() {
312
- $('#ig-select-username-wrap').show( ).addClass('active');
313
- }).removeClass('active');
314
- }else{
315
- $('#ig-select-username-wrap').hide(500, function() {
316
- $('#ig-select-tag-wrap').show( ).addClass('active');
317
- }).removeClass('active');
318
- }
319
- });
320
-
321
- // gallery, carousel toggle
322
- $('input[name="ig_display_type"]').on('change',function(){
323
-
324
- if(this.value == 'gallery'){
325
- $('#ig-section-as-carousel').hide(500, function() {
326
- $('#ig-section-as-galllery').show( ).addClass('active');
327
- }).removeClass('active');
328
- }else if(this.value == 'carousel'){
329
- $('#ig-section-as-galllery').hide(500, function() {
330
- $('#ig-section-as-carousel').show( ).addClass('active');
331
- }).removeClass('active');
332
- }
333
-
334
- });
335
-
336
- $('#ig-form-update').on('submit',function(ev){
337
- var select_from = $('input[name="ig_select_from"]:checked').val();
338
- var $insta_user = $('input[name="insta_user"]');
339
- var $insta_tag = $('input[name="insta_tag"]');
340
- var valid = true;
341
- if(select_from == 'username'){
342
- if($insta_user.val() == ''){
343
- valid = false;
344
- $('#ig-select-username-wrap').addClass('error');
345
- }else{
346
- if ($insta_user.val().indexOf("instagram.com/") >= 0){
347
- alert('Please enter username only(e.g. myusername), do not enter the complete url.');
348
- $insta_user.focus();
349
- return false;
350
- }
351
- }
352
- }else if(select_from == 'tag'){
353
- if($insta_tag.val() == ''){
354
- valid = false;
355
- $('#ig-select-tag-wrap').addClass('error');
356
- }else{
357
- if ($insta_tag.val().indexOf("instagram.com/") >= 0){
358
- alert('Please enter tagname only(e.g. beautiful), do not enter the complete url.');
359
- $insta_tag.focus();
360
- return false;
361
- }
362
- }
363
- }
364
- if( !valid ){
365
-
366
- setTimeout(function(){$('#ig-select-tag-wrap,#ig-select-username-wrap').removeClass('error');},5000);
367
- $('html, body').animate({
368
- scrollTop: 100
369
- }, 500);
370
- ev.preventDefault();
371
- return false;
372
- }
373
- });
374
-
375
- // gallery color sync
376
- $('#insta_hover-color-choose').on('change',function(){
377
- $('input[name="insta_hover-color"]').val($(this).val());
378
- });
379
- $('input[name="insta_hover-color"]').on('change',function(){
380
- var hvcolor = $(this).val();
381
- if(hvcolor != ''){
382
- var isOk = /^#[0-9A-F]{6}$/i.test(hvcolor);
383
- if(!isOk){
384
- alert('please enter valid color code');
385
- $(this).val('');
386
- return;
387
- }
388
- $('#insta_hover-color-choose').val($(this).val());
389
- }else {
390
- $('#insta_hover-color-choose').val('#007aff');
391
- }
392
- });
393
-
394
- // instagram link button toggle
395
- $('input[name="insta_instalink"]').on('change',function(){
396
- if(this.checked){
397
- $('#ig-section-igbtn').show('slow').addClass('active');
398
- }else{
399
- $('#ig-section-igbtn').hide('slow').removeClass('active');
400
- }
401
- });
402
-
403
- // nav arrows color sync
404
- $('#insta_car-navarrows-color-choose').on('change',function(){
405
- $('input[name="insta_car-navarrows-color"]').val($(this).val());
406
- });
407
- $('input[name="insta_car-navarrows-color"]').on('change',function(){
408
- var hvcolor = $(this).val();
409
- if(hvcolor != ''){
410
- var isOk = /^#[0-9A-F]{6}$/i.test(hvcolor);
411
- if(!isOk){
412
- alert('please enter valid color code');
413
- $(this).val('');
414
- return;
415
- }
416
- $('#insta_car-navarrows-color-choose').val($(this).val());
417
- }else {
418
- $('#insta_car-navarrows-color-choose').val('#c32a67');
419
- }
420
- });
421
-
422
-
423
- // button bgcolor sync
424
- $('#insta_instalink-bgcolor-choose').on('change',function(){
425
- $('input[name="insta_instalink-bgcolor"]').val($(this).val());
426
- });
427
- $('input[name="insta_instalink-bgcolor"]').on('change',function(){
428
- var hvcolor = $(this).val();
429
- if(hvcolor != ''){
430
- var isOk = /^#[0-9A-F]{6}$/i.test(hvcolor);
431
- if(!isOk){
432
- alert('please enter valid color code');
433
- $(this).val('');
434
- return;
435
- }
436
- $('#insta_instalink-bgcolor-choose').val($(this).val());
437
- }else {
438
- $('#insta_instalink-bgcolor-choose').val('#c32a67');
439
- }
440
- });
441
-
442
- // button hover color sync
443
- $('#insta_instalink-hvrcolor-choose').on('change',function(){
444
- $('input[name="insta_instalink-hvrcolor"]').val($(this).val());
445
- });
446
- $('input[name="insta_instalink-hvrcolor"]').on('change',function(){
447
- var hvcolor = $(this).val();
448
- if(hvcolor != ''){
449
- var isOk = /^#[0-9A-F]{6}$/i.test(hvcolor);
450
- if(!isOk){
451
- alert('please enter valid color code');
452
- $(this).val('');
453
- return;
454
- }
455
- $('#insta_instalink-hvrcolor-choose').val($(this).val());
456
- }else {
457
- $('#insta_instalink-hvrcolor-choose').val('#da894a');
458
- }
459
- });
460
- });
461
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/views/list.php DELETED
@@ -1,288 +0,0 @@
1
- <?php
2
- if (! defined('ABSPATH')) {
3
- die();
4
- }
5
-
6
- $InstaGalleryItems = get_option('insta_gallery_items');
7
- $InstaGallerySetting = get_option('insta_gallery_setting');
8
- ?>
9
-
10
- <p>
11
- <a href="<?php echo INSGALLERY_URL_ADMIN_PAGE; ?>&tab=edit" title="<?php _e('Add New Gallery','insta-gallery'); ?>" class="ig-btn"><span
12
- class="dashicons dashicons-plus"></span><?php _e('Add New Gallery','insta-gallery'); ?></a>
13
- </p>
14
-
15
-
16
- <?php if( !empty($InstaGalleryItems) && is_array($InstaGalleryItems) ){ ?>
17
- <div>
18
- <table class="widefat ig-gallery-list">
19
- <thead>
20
- <tr>
21
- <th></th>
22
- <th><?php _e('Gallery Item','insta-gallery'); ?></th>
23
- <th><?php _e('Shortcode','insta-gallery'); ?></th>
24
- <th><?php _e('Action','insta-gallery'); ?></th>
25
- </tr>
26
- </thead>
27
- <tbody>
28
- <?php $i = 1; foreach($InstaGalleryItems as $k => $IGItem){ ?>
29
- <tr>
30
- <td><?php echo $i++; ?></td>
31
- <td>
32
- <?php
33
-
34
- if ($IGItem['ig_select_from'] == 'username') {
35
- echo __('Username', 'insta-gallery') . ' / ' . $IGItem['insta_user'];
36
- } else {
37
- echo __('Tagname', 'insta-gallery') . ' / ' . $IGItem['insta_tag'];
38
- }
39
- ?>
40
- </td>
41
- <td><input type="text" onclick="select()" value='[insta-gallery id="<?php echo $k; ?>"]' readonly /></td>
42
- <td><a href="<?php echo INSGALLERY_URL_ADMIN_PAGE; ?>&tab=edit&ig_item=<?php echo $k; ?>" class="ig-btn"><span class="dashicons dashicons-edit"></span><?php _e('Edit','insta-gallery'); ?> </a>
43
- <a href="<?php echo INSGALLERY_URL_ADMIN_PAGE; ?>&ig_item_delete=<?php echo $k; ?>" class="ig-btn" onclick="return ig_item_delete();"><span
44
- class="dashicons dashicons-trash"></span><?php _e('Delete','insta-gallery'); ?></a></td>
45
- </tr>
46
- <?php } unset($i); ?>
47
- </tbody>
48
- </table>
49
- </div>
50
- <br />
51
- <hr />
52
- <div id="ig_adv-setting-panel">
53
- <p>
54
- <button class="ig_adv-setting-toggle ig-btn">
55
- <span class="dashicons dashicons-plus"></span><span class="dashicons dashicons-minus"></span><?php _e('Additional Setting','insta-gallery'); ?>
56
- </button>
57
- </p>
58
- <div class="ig_adv-setting">
59
- <form method="post">
60
- <table class="widefat">
61
- <tbody>
62
- <tr>
63
- <th><?php _e('Gallery Loader Icon','insta-gallery'); ?>:</th>
64
- <td>
65
- <?php
66
- $mid = '';
67
- $misrc = '';
68
- if (isset($InstaGallerySetting['igs_spinner_image_id'])) {
69
- $mid = $InstaGallerySetting['igs_spinner_image_id'];
70
- $image = wp_get_attachment_image_src($mid);
71
- if ($image) {
72
- $misrc = $image[0];
73
- }
74
- }
75
- ?>
76
- <input type="hidden" name="igs_spinner_image_id" value="<?php echo $mid; ?>" data-misrc="<?php echo $misrc; ?>" />
77
- <button type='button' class="ig-btn" id="igs-spinner_media_manager" /><?php _e('Update Spinner','insta-gallery'); ?></button>
78
- <button type='button' class="ig-btn" id="igs-spinner_reset" /><?php _e('Reset Spinner','insta-gallery'); ?></button> <br /> <span
79
- class="description">
80
- <?php
81
- _e('please select the image from media to replace with default Gallery loader icon.', 'insta-gallery');
82
- ?> </span>
83
-
84
- </td>
85
- <td rowspan="2">
86
- <div class="ig-spinner">
87
- <svg version="1.1" class="ig-spin" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
88
- viewBox="0 0 551.034 551.034" style="enable-background: new 0 0 551.034 551.034;" xml:space="preserve">
89
- <g>
90
- <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72"
91
- gradientTransform="matrix(1 0 0 -1 0 554)">
92
- <stop offset="0" style="stop-color:#E09B3D" />
93
- <stop offset="0.3" style="stop-color:#C74C4D" />
94
- <stop offset="0.6" style="stop-color:#C21975" />
95
- <stop offset="1" style="stop-color:#7024C4" />
96
- </linearGradient>
97
- <path style="fill:url(#SVGID_1_);"
98
- d="M386.878,0H164.156C73.64,0,0,73.64,0,164.156v222.722
99
- c0,90.516,73.64,164.156,164.156,164.156h222.722c90.516,0,164.156-73.64,164.156-164.156V164.156
100
- C551.033,73.64,477.393,0,386.878,0z M495.6,386.878c0,60.045-48.677,108.722-108.722,108.722H164.156
101
- c-60.045,0-108.722-48.677-108.722-108.722V164.156c0-60.046,48.677-108.722,108.722-108.722h222.722
102
- c60.045,0,108.722,48.676,108.722,108.722L495.6,386.878L495.6,386.878z" />
103
- <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72"
104
- gradientTransform="matrix(1 0 0 -1 0 554)">
105
- <stop offset="0" style="stop-color:#E09B3D" />
106
- <stop offset="0.3" style="stop-color:#C74C4D" />
107
- <stop offset="0.6" style="stop-color:#C21975" />
108
- <stop offset="1" style="stop-color:#7024C4" />
109
- </linearGradient>
110
- <path style="fill:url(#SVGID_2_);"
111
- d="M275.517,133C196.933,133,133,196.933,133,275.516s63.933,142.517,142.517,142.517
112
- S418.034,354.1,418.034,275.516S354.101,133,275.517,133z M275.517,362.6c-48.095,0-87.083-38.988-87.083-87.083
113
- s38.989-87.083,87.083-87.083c48.095,0,87.083,38.988,87.083,87.083C362.6,323.611,323.611,362.6,275.517,362.6z" />
114
- <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="418.31" y1="4.57" x2="418.31" y2="549.72"
115
- gradientTransform="matrix(1 0 0 -1 0 554)">
116
- <stop offset="0" style="stop-color:#E09B3D" />
117
- <stop offset="0.3" style="stop-color:#C74C4D" />
118
- <stop offset="0.6" style="stop-color:#C21975" />
119
- <stop offset="1" style="stop-color:#7024C4" />
120
- </linearGradient>
121
- <circle style="fill:url(#SVGID_3_);" cx="418.31" cy="134.07" r="34.15" />
122
- </g>
123
- </svg>
124
- </div>
125
- </td>
126
- </tr>
127
- <tr>
128
- <th><?php _e('Remove everything on uninstall','insta-gallery'); ?>:</th>
129
- <td><input type="checkbox" name="igs_flush" value="1" onclick="ig_validate_flush(this)"
130
- <?php if(!empty($InstaGallerySetting['igs_flush'])) echo 'checked';?> /><span class="description"> <?php _e('check this box to remove all data related to this plugin when removing the plugin.','insta-gallery'); ?> </span></td>
131
- </tr>
132
- </tbody>
133
- <tfoot>
134
- <tr>
135
- <td colspan="3"><button type="submit" class="ig-btn"><?php _e('Update','insta-gallery'); ?></button> <span class="igf-response"></span></td>
136
- </tr>
137
- </tfoot>
138
- </table>
139
- <input type="hidden" name="ig_nonce" value="<?php echo wp_create_nonce( 'igfreq_nonce_key' ); ?>" /> <input type="hidden" name="action"
140
- value="save_igadvs" />
141
- </form>
142
- </div>
143
- </div>
144
- <div class="ig_donation-wrap ig-thm-color">
145
- <p>
146
- <span class="ig_donation_text"><?php _e('Please Donate now to support the Maintainance and Advancement of this plugin.','insta-gallery'); ?>
147
- <br /><?php _e('Thank you so much to each and everyone who has already supported me.','insta-gallery'); ?></span> <a class="ig_donation_btn"
148
- href="https://www.paypal.me/karanpay" target="blank"><?php _e('Donate','insta-gallery'); ?>
149
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/paypal-logo.svg" class="ig-logo" /> </a>
150
- </p>
151
- </div>
152
- <?php } ?>
153
-
154
- <script>
155
- function ig_item_delete(){
156
- var c = confirm('<?php _e('Are you sure want to delete this item?','insta-gallery'); ?>');
157
- if(!c){
158
- return false;
159
- }
160
- }
161
- function ig_change_spinner(link){
162
- if(link){
163
- if(!jQuery('.ig_adv-setting .ig-spinner img').length){
164
- var img = '<img src="'+link+'" class="ig-spin" />';
165
- jQuery('.ig_adv-setting .ig-spinner').append(img);
166
- }else{
167
- jQuery('.ig_adv-setting .ig-spinner img').attr('src',link);
168
- }
169
- jQuery('.ig_adv-setting .ig-spinner .ig-spin').hide();
170
- jQuery('.ig_adv-setting .ig-spinner img').show();
171
- } else {
172
- jQuery('.ig_adv-setting .ig-spinner .ig-spin').show();
173
- jQuery('.ig_adv-setting .ig-spinner img').remove();
174
- }
175
-
176
- }
177
- function ig_validate_flush(ele){
178
- if(ele.checked){
179
- var c = confirm('<?php _e('please make sure every settings will be removed on plugin uninstall.','insta-gallery'); ?>');
180
- if(!c){
181
- ele.checked = false;
182
- }
183
- }
184
- }
185
- jQuery(function($){
186
- var $igs_image_id = jQuery('input[name="igs_spinner_image_id"]');
187
- var $igs_reset = jQuery('#igs-spinner_reset');
188
-
189
- $('.ig_adv-setting input[name="igs-spinner"]').trigger('change');
190
- jQuery('.ig_adv-setting-toggle').on('click',function(){
191
- $(this).toggleClass('active');
192
- $('.ig_adv-setting').slideToggle();
193
- });
194
- $('.ig_adv-setting form').on('submit',function(ev){
195
- ev.preventDefault();
196
- $f = $(this);
197
- var $fresponse = $f.find('.igf-response');
198
- jQuery.ajax({
199
- url : ajaxurl,
200
- type : 'post',
201
- dataType: 'JSON',
202
- data : $f.serialize(),
203
- beforeSend : function()
204
- {
205
- $fresponse.empty();
206
- },
207
- success : function( response ) {
208
- if ((typeof response === 'object') && response.hasOwnProperty('success')) {
209
- $fresponse.html(response.data);
210
- }
211
- }
212
- }).fail(function (jqXHR, textStatus) {
213
- console.log(textStatus);
214
- }).always(function()
215
- {
216
- });
217
- });
218
-
219
- // reset spinner to default
220
- $igs_reset.click(function(){
221
- $igs_image_id.val('');
222
- ig_change_spinner();
223
- jQuery(this).hide();
224
- });
225
-
226
- if($igs_image_id.val() == '')$igs_reset.hide();
227
- if($igs_image_id.data('misrc') != '') ig_change_spinner($igs_image_id.data('misrc'));
228
-
229
- // select media image
230
- jQuery('#igs-spinner_media_manager').click(function(e) {
231
-
232
- e.preventDefault();
233
- var image_frame;
234
- if(image_frame){
235
- image_frame.open();
236
- }
237
- // Define image_frame as wp.media object
238
- image_frame = wp.media({
239
- title: 'Select Media',
240
- multiple : false,
241
- library : {
242
- type : 'image',
243
- }
244
- });
245
-
246
- image_frame.on('close',function() {
247
- // On close, get selections and save to the hidden input
248
- // plus other AJAX stuff to refresh the image preview
249
- var selection = image_frame.state().get('selection');
250
- if(selection.length){
251
- var gallery_ids = new Array();
252
- var i = 0,attachment_url;
253
- selection.each(function(attachment) {
254
- gallery_ids[i] = attachment['id'];
255
- attachment_url = attachment.attributes.url;
256
- i++;
257
- });
258
- var ids = gallery_ids.join(",");
259
- $igs_image_id.val(ids);
260
- ig_change_spinner(attachment_url)
261
- }
262
-
263
- // toggle reset button
264
- if($igs_image_id.val() == ''){
265
- $igs_reset.hide();
266
- }else{
267
- $igs_reset.show();
268
- }
269
-
270
- });
271
-
272
- image_frame.on('open',function() {
273
- // On open, get the id from the hidden input
274
- // and select the appropiate images in the media manager
275
- var selection = image_frame.state().get('selection');
276
- ids = $igs_image_id.val().split(',');
277
- ids.forEach(function(id) {
278
- attachment = wp.media.attachment(id);
279
- attachment.fetch();
280
- selection.add( attachment ? [ attachment ] : [] );
281
- });
282
-
283
- });
284
-
285
- image_frame.open();
286
- });
287
- });
288
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/wp-front.php DELETED
@@ -1,326 +0,0 @@
1
- <?php
2
- if (! defined('ABSPATH')) {
3
- die();
4
- }
5
-
6
- /**
7
- * Instagram Gallery
8
- * WP front page
9
- */
10
-
11
- // registering session
12
- /*
13
- * add_action('init', function(){
14
- * if( !session_id() )
15
- * session_start();
16
- * });
17
- */
18
-
19
- // load template files
20
- function insgal_template_path($template_name)
21
- {
22
- // load from parent/child theme
23
- if (file_exists(trailingslashit(get_stylesheet_directory()) . 'insta-gallery/' . $template_name)) {
24
- return (trailingslashit(get_stylesheet_directory()) . 'insta-gallery/' . $template_name);
25
- }
26
-
27
- // load defaults
28
- if (file_exists(INSGALLERY_PATH . 'templates/' . $template_name)) {
29
- return (INSGALLERY_PATH . 'templates/' . $template_name);
30
- }
31
- }
32
-
33
- // Registering css.
34
- add_action('wp_enqueue_scripts', 'insgal_enqueue_scripts');
35
-
36
- function insgal_enqueue_scripts()
37
- {
38
- if (INSGALLERY_PRODUCTION) {
39
- wp_enqueue_style('insta-gallery', INSGALLERY_URL . '/assets/insta-gallery-min.css', array(), INSGALLERY_VER);
40
- } else {
41
- wp_enqueue_style('insta-gallery', INSGALLERY_URL . '/assets/insta-gallery.css', array(), INSGALLERY_VER);
42
- }
43
-
44
- if (INSGALLERY_PRODUCTION) {
45
- wp_register_script('insta-gallery', INSGALLERY_URL . '/assets/insta-gallery-min.js', array(
46
- 'jquery'
47
- ), INSGALLERY_VER, true);
48
- } else {
49
- wp_register_script('insta-gallery', INSGALLERY_URL . '/assets/insta-gallery.js', array(
50
- 'jquery'
51
- ), INSGALLERY_VER, true);
52
- }
53
-
54
- wp_localize_script('insta-gallery', 'insgalajax', array(
55
- 'ajax_url' => admin_url('admin-ajax.php')
56
- ));
57
-
58
- wp_register_script('swiper', INSGALLERY_URL . '/assets/swiper/swiper.min.js', array(
59
- 'jquery'
60
- ), null, true);
61
-
62
- wp_register_script('magnific-popup', INSGALLERY_URL . '/assets/magnific-popup/jquery.magnific-popup.min.js', array(
63
- 'jquery'
64
- ), null, true);
65
-
66
- // WP 5 FIX
67
- wp_enqueue_script('insta-gallery');
68
- wp_enqueue_script('swiper');
69
- wp_enqueue_script('magnific-popup');
70
- }
71
-
72
- // shortcode added
73
- add_shortcode('insta-gallery', 'insta_gallery');
74
-
75
- // Insta-Gallery shortcode handler
76
- function insta_gallery($atts)
77
- {
78
- if (empty($atts) || ! isset($atts['id'])) {
79
- return;
80
- }
81
- // update/validate attributes
82
- $atts = shortcode_atts(array(
83
- 'id' => 0,
84
- 'ajax' => true
85
- ), $atts);
86
- $atts['ajax'] = filter_var($atts['ajax'], FILTER_VALIDATE_BOOLEAN);
87
-
88
- //disable ajax loading from frontend request
89
- if(isset($_GET['insgal_ajax']) && ($_GET['insgal_ajax'] == 'false')){
90
- $atts['ajax'] = false;
91
- }
92
-
93
- $gid = (int) $atts['id'];
94
- $InstaGalleryItems = get_option('insta_gallery_items');
95
- $InstaGallerySetting = get_option('insta_gallery_setting');
96
- if (! isset($InstaGalleryItems[$gid])) {
97
- return;
98
- }
99
-
100
- $IGItem = $InstaGalleryItems[$gid];
101
-
102
- wp_enqueue_script('insta-gallery');
103
- if ($IGItem['ig_display_type'] == 'gallery') {
104
- wp_enqueue_script('magnific-popup');
105
- } else if ($IGItem['ig_display_type'] == 'carousel') {
106
- wp_enqueue_script('swiper');
107
- wp_enqueue_script('magnific-popup');
108
- }
109
-
110
- $insta_source = ($IGItem['ig_select_from'] == 'username') ? 'user_' . $IGItem['insta_user'] : 'tag_' . $IGItem['insta_tag'];
111
-
112
- $insta_svg = '<svg version="1.1" class="ig-spin" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
113
- viewBox="0 0 551.034 551.034" style="enable-background:new 0 0 551.034 551.034;" xml:space="preserve"><g>
114
- <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72" gradientTransform="matrix(1 0 0 -1 0 554)">
115
- <stop offset="0" style="stop-color:#E09B3D"/><stop offset="0.3" style="stop-color:#C74C4D"/><stop offset="0.6" style="stop-color:#C21975"/><stop offset="1" style="stop-color:#7024C4"/>
116
- </linearGradient>
117
- <path style="fill:url(#SVGID_1_);" d="M386.878,0H164.156C73.64,0,0,73.64,0,164.156v222.722
118
- c0,90.516,73.64,164.156,164.156,164.156h222.722c90.516,0,164.156-73.64,164.156-164.156V164.156
119
- C551.033,73.64,477.393,0,386.878,0z M495.6,386.878c0,60.045-48.677,108.722-108.722,108.722H164.156
120
- c-60.045,0-108.722-48.677-108.722-108.722V164.156c0-60.046,48.677-108.722,108.722-108.722h222.722
121
- c60.045,0,108.722,48.676,108.722,108.722L495.6,386.878L495.6,386.878z"/>
122
- <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72" gradientTransform="matrix(1 0 0 -1 0 554)">
123
- <stop offset="0" style="stop-color:#E09B3D"/><stop offset="0.3" style="stop-color:#C74C4D"/><stop offset="0.6" style="stop-color:#C21975"/><stop offset="1" style="stop-color:#7024C4"/>
124
- </linearGradient>
125
- <path style="fill:url(#SVGID_2_);" d="M275.517,133C196.933,133,133,196.933,133,275.516s63.933,142.517,142.517,142.517
126
- S418.034,354.1,418.034,275.516S354.101,133,275.517,133z M275.517,362.6c-48.095,0-87.083-38.988-87.083-87.083
127
- s38.989-87.083,87.083-87.083c48.095,0,87.083,38.988,87.083,87.083C362.6,323.611,323.611,362.6,275.517,362.6z"/>
128
- <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="418.31" y1="4.57" x2="418.31" y2="549.72" gradientTransform="matrix(1 0 0 -1 0 554)">
129
- <stop offset="0" style="stop-color:#E09B3D"/><stop offset="0.3" style="stop-color:#C74C4D"/><stop offset="0.6" style="stop-color:#C21975"/><stop offset="1" style="stop-color:#7024C4"/>
130
- </linearGradient>
131
- <circle style="fill:url(#SVGID_3_);" cx="418.31" cy="134.07" r="34.15"/>
132
- </g></svg>';
133
-
134
- $results = '';
135
- $results .= '<div class="ig-block ' . ((! $atts['ajax']) ? 'ig-block-loaded' : '') . '" id="ig-block-' . $gid . '" data-insgalid="' . $gid . '" data-source="' . $insta_source . '">';
136
- $results .= '<div class="ig-spinner" ' . ((! $atts['ajax']) ? 'hidden' : '') . '>';
137
- if (! empty($InstaGallerySetting['igs_spinner'])) {
138
- // for backward compatibility only
139
- $results .= '<img src="' . $InstaGallerySetting['igs_spinner'] . '" alt="' . __('Instagram Gallery', 'insta-gallery') . '" class="ig-spin" />';
140
- } else if (! empty($InstaGallerySetting['igs_spinner_image_id'])) {
141
- $mid = $InstaGallerySetting['igs_spinner_image_id'];
142
- $image = wp_get_attachment_image_src($mid);
143
- if ($image) {
144
- $results .= '<img src="' . $image[0] . '" alt="' . __('Instagram Gallery', 'insta-gallery') . '" class="ig-spin" />';
145
- } else {
146
- $results .= $insta_svg;
147
- }
148
- } else {
149
- $results .= $insta_svg;
150
- }
151
- $results .= '</div>';
152
-
153
- // load content with page/shortcode
154
- if (! $atts['ajax']) {
155
- $_REQUEST['insgalid'] = $gid;
156
- $_REQUEST['insgal_ajax'] = $atts['ajax'];
157
- $results .= load_ig_item();
158
- }
159
-
160
- $results .= '</div> <!-- // IG BLOCK -->';
161
- return $results;
162
- }
163
-
164
- // ajax request served
165
- add_action('wp_ajax_nopriv_load_ig_item', 'load_ig_item');
166
- add_action('wp_ajax_load_ig_item', 'load_ig_item');
167
-
168
- function load_ig_item()
169
- {
170
- if (! isset($_REQUEST['insgalid'])) {
171
- return;
172
- }
173
- $gid = (int) $_REQUEST['insgalid'];
174
- $InstaGalleryItems = get_option('insta_gallery_items');
175
- if (! isset($InstaGalleryItems[$gid])) {
176
- return;
177
- }
178
- $IGItem = $InstaGalleryItems[$gid];
179
- $IGItem['gid'] = $gid; // push gallery ID for later use
180
- global $insgalleryIAC,$iispi;
181
-
182
- // validating options
183
- if (empty($IGItem['ig_select_from'])) {
184
- return;
185
- }
186
- // backward compatibility v1.5.11
187
- if(!empty($IGItem['insta_limit'])){
188
- $IGItem['insta_user-limit'] = (int) $IGItem['insta_limit'];
189
- $IGItem['insta_tag-limit'] = (int) $IGItem['insta_limit'];
190
- }else {
191
- $IGItem['insta_user-limit'] = (int) $IGItem['insta_user-limit'];
192
- $IGItem['insta_tag-limit'] = (int) $IGItem['insta_tag-limit'];
193
- }
194
- $IGItem['insta_gal-hover'] = filter_var($IGItem['insta_gal-hover'], FILTER_VALIDATE_BOOLEAN);
195
- $IGItem['insta_gal-spacing'] = filter_var($IGItem['insta_gal-spacing'], FILTER_VALIDATE_BOOLEAN);
196
-
197
- $IGItem['insta_instalink'] = filter_var($IGItem['insta_instalink'], FILTER_VALIDATE_BOOLEAN);
198
- $IGItem['insta_instalink-text'] = empty($IGItem['insta_instalink-text']) ? 'view on Instagram' : $IGItem['insta_instalink-text'];
199
- $IGItem['insta_instalink-bgcolor'] = @$IGItem['insta_instalink-bgcolor'];
200
- $IGItem['insta_instalink-hvrcolor'] = @$IGItem['insta_instalink-hvrcolor'];
201
-
202
- $IGItem['insta_car-autoplay'] = isset($IGItem['insta_car-autoplay']) ? filter_var($IGItem['insta_car-autoplay'], FILTER_VALIDATE_BOOLEAN) : true;
203
- $IGItem['insta_car-navarrows'] = @filter_var($IGItem['insta_car-navarrows'], FILTER_VALIDATE_BOOLEAN);
204
- $IGItem['insta_car-navarrows-color'] = @$IGItem['insta_car-navarrows-color'];
205
- $IGItem['insta_car-dots'] = @filter_var($IGItem['insta_car-dots'], FILTER_VALIDATE_BOOLEAN);
206
- $IGItem['insta_car-spacing'] = @filter_var($IGItem['insta_car-spacing'], FILTER_VALIDATE_BOOLEAN);
207
-
208
- $IGItem['insta_thumb-size'] = empty($IGItem['insta_thumb-size']) ? 'medium' : $IGItem['insta_thumb-size'];
209
- $IGItem['insta_hover-color'] = @$IGItem['insta_hover-color'];
210
- $IGItem['insta_gal-popup'] = filter_var($IGItem['insta_gal-popup'], FILTER_VALIDATE_BOOLEAN);
211
- $IGItem['insta_popup-caption'] = filter_var($IGItem['insta_popup-caption'], FILTER_VALIDATE_BOOLEAN);
212
- $IGItem['insta_likes'] = @filter_var($IGItem['insta_likes'], FILTER_VALIDATE_BOOLEAN);
213
- $IGItem['insta_comments'] = @filter_var($IGItem['insta_comments'], FILTER_VALIDATE_BOOLEAN);
214
-
215
- // continue to results
216
- $results = '';
217
- $instaItems = '';
218
- if ($IGItem['ig_select_from'] == 'username') { // get from username
219
- $instaItems = igf_getUserItems($IGItem);
220
- } else { // continue to tag
221
- $instaItems = igf_getTagItems($IGItem);
222
- }
223
-
224
- if (! empty($instaItems)) {
225
-
226
- $insta_source = ($IGItem['ig_select_from'] == 'username') ? 'user_' . $IGItem['insta_user'] : 'tag_' . $IGItem['insta_tag'];
227
-
228
- $instaUrl = 'https://www.instagram.com/';
229
- $instaItemLimit = 12;
230
- if ($IGItem['ig_select_from'] == 'username') {
231
- $instaUrl .= $IGItem['insta_user'];
232
- if (!empty($IGItem['insta_user-limit'])){
233
- $instaItemLimit = (int)$IGItem['insta_user-limit'];
234
- }
235
- } else {
236
- $instaUrl .= 'explore/tags/' . $IGItem['insta_tag'];
237
- if (!empty($IGItem['insta_tag-limit'])){
238
- $instaItemLimit = (int)$IGItem['insta_tag-limit'];
239
- }
240
- }
241
-
242
-
243
-
244
- if ($IGItem['ig_display_type'] == 'gallery') {
245
- ob_start();
246
- // include (INSGALLERY_PATH . 'templates/gallery.php');
247
- include insgal_template_path('gallery.php');
248
- $results .= ob_get_clean();
249
-
250
- // output dynamic CSS to head
251
- $IGBSelector = '#ig-block-' . $IGItem['gid']; // Gallery block selector
252
- $ig_dstyle = '';
253
- if (! empty($IGItem['insta_hover-color'])) {
254
- $ig_dstyle .= $IGBSelector . ' .ig-item.ighover a:hover:after, ' . $IGBSelector . ' .swiper-slide a:hover:after {background: ' . $IGItem['insta_hover-color'] . ';}';
255
- }
256
- if (! empty($IGItem['insta_instalink-bgcolor'])) {
257
- $ig_dstyle .= $IGBSelector . ' .instagallery-actions .igact-instalink {background: ' . $IGItem['insta_instalink-bgcolor'] . ';}';
258
- }
259
- if (! empty($IGItem['insta_instalink-hvrcolor'])) {
260
- $ig_dstyle .= $IGBSelector . ' .instagallery-actions .igact-instalink:hover {background: ' . $IGItem['insta_instalink-hvrcolor'] . ';}';
261
- }
262
- if (! empty($ig_dstyle)) {
263
- $results .= "<script>jQuery(function(){jQuery('head').append('<style>$ig_dstyle</style>');});</script>";
264
- }
265
- } else if ($IGItem['ig_display_type'] == 'carousel') {
266
- ob_start();
267
- // include (INSGALLERY_PATH . 'templates/carousel.php');
268
- include insgal_template_path('carousel.php');
269
- $results .= ob_get_clean();
270
-
271
- // output dynamic CSS to head
272
- $IGBSelector = '#ig-block-' . $IGItem['gid']; // Gallery block selector
273
- $ig_dstyle = '';
274
- if (! empty($IGItem['insta_car-navarrows-color'])) {
275
- $ig_dstyle .= $IGBSelector . ' .instacarousel .swiper-button-next svg, ' . $IGBSelector . ' .instacarousel .swiper-button-prev svg {fill: ' . $IGItem['insta_car-navarrows-color'] . ';}';
276
- }
277
- if (! empty($IGItem['insta_hover-color'])) {
278
- $ig_dstyle .= $IGBSelector . ' .ig-item.ighover a:hover:after, ' . $IGBSelector . ' .swiper-slide a:hover:after {background: ' . $IGItem['insta_hover-color'] . ';}';
279
- }
280
- if (! empty($IGItem['insta_instalink-bgcolor'])) {
281
- $ig_dstyle .= $IGBSelector . ' .instagallery-actions .igact-instalink {background: ' . $IGItem['insta_instalink-bgcolor'] . ';}';
282
- }
283
- if (! empty($IGItem['insta_instalink-hvrcolor'])) {
284
- $ig_dstyle .= $IGBSelector . ' .instagallery-actions .igact-instalink:hover {background: ' . $IGItem['insta_instalink-hvrcolor'] . ';}';
285
- }
286
- if (! empty($ig_dstyle)) {
287
- $results .= "<script>jQuery(function(){jQuery('head').append('<style>$ig_dstyle</style>');});</script>";
288
- }
289
- } else {
290
- if (current_user_can('administrator')) {
291
- $results .= '<div class="ig-no-items-msg"><p class="ig_front_msg-color">' . __('ERROR: invalid display type, please check gallery settings.', 'insta-gallery') . '</p></div>';
292
- }
293
- }
294
- } else {
295
- if (current_user_can('administrator')) {
296
- $results .= '<div class="ig-no-items-msg"><p class="ig_front_msg-color"><strong>Admin Notice:</strong> unable to get results.</p>';
297
- $results .= '<ul>';
298
- if(($IGItem['ig_select_from'] == 'username') && empty($insgalleryIAC['access_token'])){
299
- $results .= '<li>' . __('please update Instagram Access Token in plugin setting.', 'insta-gallery') . '</li>';
300
- }
301
- $igsMsg = $iispi->getMessage();
302
- if (! empty($igsMsg)) {
303
- $results .= '<li>' . $igsMsg . '</li>';
304
- }
305
- $results .= '</ul></div>';
306
- }
307
- }
308
- // echo $results;
309
- /*
310
- * $result = array(
311
- * 'igsuccess' => true,
312
- * 'result' => $results
313
- * );
314
- * echo json_encode($result);
315
- * die();
316
- */
317
- if (isset($_REQUEST['insgal_ajax']) && ! $_REQUEST['insgal_ajax']) {
318
- return $results;
319
- } else {
320
- wp_send_json_success($results);
321
- }
322
- }
323
-
324
-
325
-
326
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/wp-panel.php DELETED
@@ -1,120 +0,0 @@
1
- <?php
2
- if (! defined('ABSPATH')) {
3
- die();
4
- }
5
- /*
6
- * Instagram Gallery
7
- * WP admin panel plugin page
8
- */
9
-
10
- // current page url
11
- define('INSGALLERY_URL_ADMIN_PAGE', menu_page_url('insta_gallery', false));
12
-
13
- $InstaGalleryItems = get_option('insta_gallery_items');
14
- $InstaGallerySetting = get_option('insta_gallery_setting');
15
-
16
- $ig_page_msgs = array();
17
- // add/update gallery item
18
- if (isset($_POST['ig-form-update']) && isset($_POST['ig_nonce']) && wp_verify_nonce($_POST['ig_nonce'], 'igfreq_nonce_key')) {
19
- // filtering data
20
- $POSTDATA = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
21
- $IGItem = array();
22
- $IGItem['ig_select_from'] = $POSTDATA['ig_select_from'];
23
- $IGItem['insta_user'] = (string) $POSTDATA['insta_user'];
24
- $IGItem['insta_tag'] = (string) $POSTDATA['insta_tag'];
25
- $IGItem['insta_user-limit'] = $POSTDATA['insta_user-limit'];
26
- $IGItem['insta_tag-limit'] = $POSTDATA['insta_tag-limit'];
27
- $IGItem['ig_display_type'] = $POSTDATA['ig_display_type'];
28
- $IGItem['insta_gal-cols'] = $POSTDATA['insta_gal-cols'];
29
- $IGItem['insta_gal-hover'] = @$POSTDATA['insta_gal-hover'];
30
- $IGItem['insta_gal-spacing'] = @$POSTDATA['insta_gal-spacing'];
31
- $IGItem['insta_instalink'] = @$POSTDATA['insta_instalink'];
32
- $IGItem['insta_instalink-text'] = trim(esc_html(@$POSTDATA['insta_instalink-text']));
33
- $IGItem['insta_instalink-bgcolor'] = sanitize_text_field(@$POSTDATA['insta_instalink-bgcolor']);
34
- $IGItem['insta_instalink-hvrcolor'] = sanitize_text_field(@$POSTDATA['insta_instalink-hvrcolor']);
35
- $IGItem['insta_car-slidespv'] = $POSTDATA['insta_car-slidespv'];
36
- $IGItem['insta_car-autoplay'] = isset($POSTDATA['insta_car-autoplay']) ? $POSTDATA['insta_car-autoplay'] : 0;
37
- $IGItem['insta_car-autoplay-interval'] = $POSTDATA['insta_car-autoplay-interval'];
38
- $IGItem['insta_car-navarrows'] = @$POSTDATA['insta_car-navarrows'];
39
- $IGItem['insta_car-navarrows-color'] = sanitize_text_field(@$POSTDATA['insta_car-navarrows-color']);
40
- $IGItem['insta_car-dots'] = @$POSTDATA['insta_car-dots'];
41
- $IGItem['insta_car-spacing'] = @$POSTDATA['insta_car-spacing'];
42
- $IGItem['insta_thumb-size'] = @$POSTDATA['insta_thumb-size'];
43
- $IGItem['insta_hover-color'] = sanitize_text_field(@$POSTDATA['insta_hover-color']);
44
- $IGItem['insta_gal-popup'] = @$POSTDATA['insta_gal-popup'];
45
- $IGItem['insta_popup-caption'] = @$POSTDATA['insta_popup-caption'];
46
- $IGItem['insta_likes'] = @$POSTDATA['insta_likes'];
47
- $IGItem['insta_comments'] = @$POSTDATA['insta_comments'];
48
-
49
- // removing @, # and trimming input
50
- $IGItem['insta_user'] = trim($IGItem['insta_user']);
51
- $IGItem['insta_tag'] = trim($IGItem['insta_tag']);
52
- $IGItem['insta_user'] = str_replace( '@', '', $IGItem['insta_user'] );
53
- $IGItem['insta_user'] = str_replace( '#', '', $IGItem['insta_user'] );
54
- $IGItem['insta_tag'] = str_replace( '@', '', $IGItem['insta_tag'] );
55
- $IGItem['insta_tag'] = str_replace( '#', '', $IGItem['insta_tag'] );
56
-
57
- if (isset($POSTDATA['igitem_id'])) {
58
- $InstaGalleryItems[(int) $POSTDATA['igitem_id']] = $IGItem;
59
- } else {
60
- $InstaGalleryItems[] = $IGItem;
61
- if (isset($InstaGalleryItems[0])) { // for preventing 0 key generation
62
- $InstaGalleryItems[] = $InstaGalleryItems[0];
63
- unset($InstaGalleryItems[0]);
64
- }
65
- }
66
- update_option('insta_gallery_items', $InstaGalleryItems, false);
67
- igf_clearTransients('instagallery_user_feed');
68
-
69
- $ig_page_msgs[] = __('Gallery item updated successfully.', 'insta-gallery');
70
- }
71
-
72
- // delete gallery item
73
- if (isset($_GET['ig_item_delete'])) {
74
- $item_id = (int) $_GET['ig_item_delete'];
75
- if (isset($InstaGalleryItems[$item_id])) {
76
- unset($InstaGalleryItems[$item_id]);
77
- update_option('insta_gallery_items', $InstaGalleryItems, false);
78
- }
79
- $ig_page_msgs[] = __('Gallery item deleted successfully.', 'insta-gallery');
80
- }
81
-
82
-
83
- ?>
84
- <div id="ig-page" class="">
85
- <div class="wrap">
86
- <header class="ig-page-header">
87
- <h3><?php _e('Instagram Gallery','insta-gallery'); ?></h3>
88
- </header>
89
- <hr />
90
- <div class="ig-page-content">
91
- <?php
92
- if (! empty($ig_page_msgs)) {
93
- foreach ($ig_page_msgs as $ig_page_msg) {
94
- echo '<div class="notice updated my-acf-notice is-dismissible ig_page_msg" ><p>' . $ig_page_msg . '</p></div>';
95
- }
96
- }
97
- ?>
98
- <?php
99
- if (isset($_GET['tab']) && ! empty($_GET['tab'])) {
100
- $tab = (string) $_GET['tab'];
101
- switch ($tab) {
102
- case 'edit':
103
- include 'views/edit.php';
104
- break;
105
- case 'documentation':
106
- include 'views/documentation.php';
107
- break;
108
- default:
109
- break;
110
- }
111
- } else {
112
- include 'views/account.php';
113
- include 'views/list.php';
114
- }
115
- ?>
116
- </div>
117
- <hr />
118
- </div>
119
- </div>
120
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/wp-widget.php DELETED
@@ -1,96 +0,0 @@
1
- <?php
2
- if (! defined('ABSPATH')) {
3
- die();
4
- }
5
- /**
6
- * Instagram Gallery
7
- * WP widget
8
- */
9
-
10
- add_action('widgets_init', function () {
11
- register_widget('instagal_widget');
12
- });
13
-
14
- class instagal_widget extends WP_Widget
15
- {
16
-
17
- public function __construct()
18
- {
19
- parent::__construct('instagal_widget', __('Instagram Gallery', 'insta-gallery'), array(
20
- 'classname' => 'instagal-widget',
21
- 'description' => esc_html__('Displays your Instagram Gallery', 'insta-gallery')
22
- ));
23
- }
24
-
25
- public function widget($args, $instance)
26
- {
27
- $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
28
- $instagal_id = empty($instance['instagal_id']) ? '' : $instance['instagal_id'];
29
-
30
- echo $args['before_widget'];
31
-
32
- if (! empty($title)) {
33
- echo $args['before_title'] . wp_kses_post($title) . $args['after_title'];
34
- }
35
-
36
- if (! empty($instagal_id)) {
37
- echo do_shortcode('[insta-gallery id="' . $instagal_id . '"]');
38
- }
39
-
40
- echo $args['after_widget'];
41
- }
42
-
43
- public function form($instance)
44
- {
45
- $instance = wp_parse_args( (array) $instance, array(
46
- 'title' => '',
47
- 'instagal_id' => 0,
48
- ) );
49
-
50
- $title = $instance['title'];
51
- $instagal_id = $instance['instagal_id'];
52
- $InstaGalleryItems = get_option('insta_gallery_items');
53
- ?>
54
- <p>
55
- <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'insta-gallery' ); ?>: <input class="widefat"
56
- id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text"
57
- value="<?php echo esc_attr( $title ); ?>" /></label>
58
- </p>
59
-
60
- <?php if( !empty($InstaGalleryItems) && is_array($InstaGalleryItems) ): ?>
61
- <p>
62
- <label for="<?php echo esc_attr( $this->get_field_id( 'instagal_id' ) ); ?>"><?php esc_html_e( 'Select Instagram Gallery', 'insta-gallery' ); ?>: </label> <select
63
- id="<?php echo esc_attr( $this->get_field_id( 'instagal_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'instagal_id' ) ); ?>" class="widefat">
64
- <?php
65
- foreach ($InstaGalleryItems as $k => $IGItem) {
66
- $label = '';
67
- if ($IGItem['ig_select_from'] == 'username') {
68
- $label = __('Username', 'insta-gallery') . ' / ' . $IGItem['insta_user'];
69
- } else {
70
- $label = __('Tagname', 'insta-gallery') . ' / ' . $IGItem['insta_tag'];
71
- }
72
- ?>
73
- <option value="<?php echo $k; ?>" <?php selected( $k, $instagal_id ) ?>><?php echo $label; ?></option>
74
- <?php } ?>
75
- </select>
76
- </p>
77
- <?php else: ?>
78
- <p style="color: #e23565;">
79
- <?php _e('Please add Gallery item in plugin panel, Then come back and select your Gallery to display.','insta-gallery'); ?>
80
- </p>
81
- <?php endif; ?>
82
- <p style="text-align: center;" >
83
- <a href="options-general.php?page=insta_gallery"><?php _e('Add New Gallery','insta-gallery'); ?></a>
84
- </p>
85
-
86
- <?php
87
- }
88
-
89
- public function update($new_instance, $old_instance)
90
- {
91
- $instance = $old_instance;
92
- $instance['title'] = strip_tags($new_instance['title']);
93
- $instance['instagal_id'] = trim(strip_tags($new_instance['instagal_id']));
94
- return $instance;
95
- }
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/admin-style.css DELETED
@@ -1,349 +0,0 @@
1
- @CHARSET "ISO-8859-1";
2
- .ig-thm-color{
3
- color: #e23565;
4
- }
5
- .ig-page-header .ig-logo {
6
- float: left;
7
- margin-right: 20px;
8
- max-height: 35px;
9
- }
10
-
11
-
12
- .ig-list-buttons {
13
- display: inline-block;
14
- margin: 0px;
15
- }
16
-
17
- .ig-list-buttons li {
18
- display: inline-block;
19
- margin-right: 20px;
20
- margin-bottom: 0px;
21
- vertical-align: middle;
22
- color: #AAAAAA;
23
- position: relative;
24
- }
25
-
26
- .ig-list-buttons input[type=radio] {
27
- position: absolute;
28
- visibility: hidden;
29
- }
30
-
31
- .ig-list-buttons label {
32
- display: block;
33
- position: relative;
34
- font-size: 1.35em;
35
- padding: 10px 5px 10px 50px;
36
- z-index: 9;
37
- cursor: pointer;
38
- -webkit-transition: all 0.25s linear;
39
- transition: all 0.25s linear;
40
- }
41
-
42
- .ig-list-buttons li:hover label {
43
- color: #e23565;
44
- }
45
-
46
- .ig-list-buttons li .check {
47
- display: block;
48
- position: absolute;
49
- border: 5px solid #AAAAAA;
50
- border-radius: 50%;
51
- height: 25px;
52
- width: 25px;
53
- top: 5px;
54
- left: 10px;
55
- z-index: 5;
56
- -webkit-transition: border .25s linear;
57
- transition: border .25s linear;
58
- }
59
-
60
- .ig-list-buttons li:hover .check {
61
- border-color: #e23565;
62
- }
63
-
64
- .ig-list-buttons li .check::before {
65
- display: block;
66
- position: absolute;
67
- content: '';
68
- border-radius: 100%;
69
- height: 15px;
70
- width: 15px;
71
- top: 5px;
72
- left: 5px;
73
- margin: auto;
74
- -webkit-transition: background 0.25s linear;
75
- transition: background 0.25s linear;
76
- }
77
-
78
- .ig-list-buttons input[type=radio]:checked ~ .check {
79
- border-color: #e23565;
80
- }
81
-
82
- .ig-list-buttons input[type=radio]:checked ~ .check::before {
83
- background: #e23565;
84
- }
85
-
86
- .ig-list-buttons input[type=radio]:checked ~ label {
87
- color: #e23565;
88
- }
89
-
90
- .ig-btn {
91
- display: inline-block;
92
- padding: 5px 20px;
93
- background: #972dbe;
94
- cursor: pointer;
95
- color: #fff;
96
- text-transform: uppercase;
97
- text-decoration: none;
98
- -webkit-transition: all .5s;
99
- transition: all .5s;
100
- }
101
-
102
- .ig-btn:hover {
103
- background: #feb547;
104
- color: #fff;
105
- }
106
-
107
- .ig-btn .dashicons {
108
- text-decoration: none;
109
- line-height: normal;
110
- vertical-align: middle;
111
- height: initial;
112
- padding-right: 5px;
113
- }
114
-
115
- .ig-tab-content-row {
116
- display: none;
117
- border: 1px solid #aaaaaa;
118
- }
119
-
120
- .ig-tab-content-row.active {
121
- display: table-row;
122
- }
123
- .ig-gallery-list input[type="text"] {
124
- font-weight: bold;
125
- font-size: 110%;
126
- padding: 3px 10px;
127
- background: #f7f7f7;
128
- color: #72777c;
129
- cursor: copy;
130
- border-color: transparent;
131
- box-shadow: none;
132
- }
133
- .ig-gallery-list input[type="text"]:focus{
134
- border-color: transparent;
135
- box-shadow: none;
136
- }
137
- .ig-generate-msgs {
138
- color: #e23565;
139
- display: none;
140
- }
141
- .ig-tab-content-row.error{
142
- border-color: #e23565;
143
- }
144
- .ig-tab-content-row.error .ig-generate-msgs {
145
- display: block;
146
- }
147
- .ig_page_msg p{
148
- font-size: 20px;
149
- color: #e93b59;
150
- }
151
- .wp-core-ui .button-primary.ig-add-update {
152
- background: #e23565;
153
- font-size: 20px;
154
- padding: 6px 20px;
155
- height: auto;
156
- margin: 15px 0px;
157
- box-shadow: none;
158
- text-shadow: none;
159
- -webkit-transition: all .5s;
160
- transition: all .5s;
161
- border-color: #fff;
162
- text-transform: uppercase;
163
- }
164
-
165
- .wp-core-ui .button-primary.ig-add-update:hover {
166
- background: #feb547;
167
- color: #fff;
168
- }
169
-
170
- .ig-table-edit td {
171
- vertical-align: top;
172
- }
173
-
174
- .ig-table-edit input[type="checkbox"],.ig_adv-setting input[type="checkbox"] {
175
- zoom: 1.5;
176
- }
177
- .ig-table-edit input[type="checkbox"]:checked:before {
178
- color: #e23565;
179
- }
180
- .ig-table-edit input[type="color"] {
181
- vertical-align: top;
182
- padding: 1px 2px;
183
- width: 50px;
184
- height: 26px;
185
- }
186
- .igf-response {
187
- font-size: 16px;
188
- color: #e93b59;
189
- padding: 5px;
190
- }
191
- /* ******** ig account setting ********** */
192
- .ig-account-section {
193
- border: 1px solid #e5e5e5;
194
- box-shadow: 0 1px 1px rgba(0,0,0,.04);
195
- background: #fff;
196
- padding: 10px;
197
- }
198
- .ig-account-section .notice p {
199
- color: #e93b59;
200
- font-size: 14px;
201
- }
202
- .ig-account-cards .ig-account-card {
203
- display: inline-block;
204
- margin: 10px;
205
- border: 1px solid #ddd;
206
- padding: 15px;
207
- -webkit-transition: .3s;
208
- transition: .3s;
209
- flex-basis: 350px;
210
- word-break: break-word;
211
- }
212
- .ig-ac-have-token .ig-account-card:first-child {
213
- flex-basis: auto;
214
- }
215
- .ig-ac-have-token .ig-account-card figure {
216
- text-align: center;
217
- }
218
- .ig-account-cards {
219
- display: flex;
220
- flex-wrap: wrap;
221
- margin: -10px;
222
- }
223
- .ig-account-cards form h4 {
224
- margin-top: 0;
225
- margin-bottom: 10px;
226
- font-size: 18px;
227
- }
228
- .ig-account-cards .ig-account-card:hover {
229
- background: #eee;
230
- }
231
- .ig-account-cards form input[type="text"] {
232
- width: 100%;
233
- }
234
- #ig-remove-token {
235
- display: none;
236
- }
237
-
238
- /* ******** ig docs page ********** */
239
- .ig-doc-header {
240
- background: #fff;
241
- padding: 1px 10px 5px 10px;
242
- border: 1px solid #ddd;
243
- margin-bottom: 10px;
244
- }
245
- .ig-doc-body article {
246
- background: #fff;
247
- padding: 1px 10px 5px 10px;
248
- border: 1px solid #ddd;
249
- margin-bottom: 10px;
250
- -webkit-transition: .3s;
251
- transition: .3s;
252
- }
253
- .ig-doc-body article:hover {
254
- box-shadow: 0 0 11px rgba(33,33,33,.2);
255
- }
256
- input.ig-doc-red-url {
257
- cursor: copy;
258
- min-width: 650px;
259
- color: #e93b59;
260
- }
261
- .ig-doc-body figure img, .ig-doc-figure {
262
- border: 1px solid #e93b59;
263
- box-shadow: 0 3px 10px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.2);
264
- }
265
- #TB_window figure.ig-doc-figure {
266
- margin: auto;
267
- display: inline-block;
268
- }
269
- .ig-doc-body article table th {
270
- text-align: left;
271
- }
272
- .ig-doc-body article table th,.ig-doc-body article table td {
273
- padding: 3px 5px;
274
- border: 1px solid #ddd;
275
- }
276
- .ig-doc-body article table {
277
- border-collapse: collapse;
278
- }
279
-
280
-
281
- /* ******** ig advance setting ********** */
282
- .ig_adv-setting-toggle{
283
- cursor: pointer;
284
- border: 0px;
285
- }
286
- .ig_adv-setting-toggle .dashicons-minus{display: none;}
287
- .ig_adv-setting-toggle.active .dashicons-minus{display: initial;}
288
- .ig_adv-setting-toggle.active .dashicons-plus{display: none;}
289
- .ig_adv-setting{display: none;}
290
- .ig_adv-setting input[type="url"] {
291
- min-width: 75%;
292
- }
293
- .ig_adv-setting .ig-spinner {
294
- position: relative;
295
- padding: 10px 30px;
296
- height:60px;
297
- -webkit-box-sizing: content-box;
298
- -moz-box-sizing: content-box;
299
- box-sizing: content-box;
300
- }
301
- .ig_adv-setting .ig-spinner .ig-spin {
302
- position: absolute;
303
- top: 50%;
304
- left: 50%;
305
- width: 60px;
306
- margin:-30px 0 0 -30px;
307
- -webkit-animation:igspin 4s linear infinite;
308
- -moz-animation:igspin 4s linear infinite;
309
- animation:igspin 4s linear infinite;
310
- }
311
- @-moz-keyframes igspin { 100% { -moz-transform: rotate(360deg); } }
312
- @-webkit-keyframes igspin { 100% { -webkit-transform: rotate(360deg); } }
313
- @keyframes igspin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
314
-
315
- /* ******** paypal btn ********** */
316
- .ig_donation-wrap {
317
- padding: 10px 20px;
318
- background: lightgoldenrodyellow;
319
- margin-top: 35px;
320
- font-weight: bold;
321
- }
322
-
323
- .ig_donation-wrap p {
324
- font-size: 125%;
325
- }
326
- .ig_donation_text {
327
- display: inline-block;
328
- vertical-align: middle;
329
- line-height: normal;
330
- }
331
- .ig_donation_btn {
332
- display: inline-block;
333
- margin-left: 20px;
334
- text-decoration: none;
335
- padding: 6px 20px;
336
- background: #fecb5d;
337
- color: #23282d;
338
- text-transform: uppercase;
339
- box-shadow: 1px 1px 5px #888888;
340
- font: bold 100%/24px sans-serif;
341
- }
342
- .ig_donation_btn:hover{
343
- color: #fff;
344
- background: #972dbe;
345
- }
346
- .ig_donation_btn img {
347
- vertical-align: middle;
348
- height: 24px;
349
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/qligg-admin.css ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @CHARSET "ISO-8859-1";
2
+ .ig-thm-color{
3
+ color: #e23565;
4
+ }
5
+ .ig-page-header .ig-logo {
6
+ float: left;
7
+ margin-right: 20px;
8
+ max-height: 35px;
9
+ }
10
+
11
+
12
+ .ig-list-buttons {
13
+ display: inline-block;
14
+ margin: 0px;
15
+ }
16
+
17
+ .ig-list-buttons li {
18
+ display: inline-block;
19
+ margin-right: 20px;
20
+ margin-bottom: 0px;
21
+ vertical-align: middle;
22
+ color: #AAAAAA;
23
+ position: relative;
24
+ }
25
+
26
+ .ig-list-buttons input[type=radio] {
27
+ position: absolute;
28
+ visibility: hidden;
29
+ }
30
+
31
+ .ig-list-buttons label {
32
+ display: block;
33
+ position: relative;
34
+ font-size: 1.35em;
35
+ padding: 10px 5px 10px 50px;
36
+ z-index: 9;
37
+ cursor: pointer;
38
+ -webkit-transition: all 0.25s linear;
39
+ transition: all 0.25s linear;
40
+ }
41
+
42
+ .ig-list-buttons li:hover label {
43
+ color: #e23565;
44
+ }
45
+
46
+ .ig-list-buttons li .check {
47
+ display: block;
48
+ position: absolute;
49
+ border: 5px solid #AAAAAA;
50
+ border-radius: 50%;
51
+ height: 25px;
52
+ width: 25px;
53
+ top: 5px;
54
+ z-index: 5;
55
+ -webkit-transition: border .25s linear;
56
+ transition: border .25s linear;
57
+ }
58
+
59
+ .ig-list-buttons li:hover .check {
60
+ border-color: #e23565;
61
+ }
62
+
63
+ .ig-list-buttons li .check::before {
64
+ display: block;
65
+ position: absolute;
66
+ content: '';
67
+ border-radius: 100%;
68
+ height: 15px;
69
+ width: 15px;
70
+ top: 5px;
71
+ left: 5px;
72
+ margin: auto;
73
+ -webkit-transition: background 0.25s linear;
74
+ transition: background 0.25s linear;
75
+ }
76
+
77
+ .ig-list-buttons input[type=radio]:checked ~ .check {
78
+ border-color: #e23565;
79
+ }
80
+
81
+ .ig-list-buttons input[type=radio]:checked ~ .check::before {
82
+ background: #e23565;
83
+ }
84
+
85
+ .ig-list-buttons input[type=radio]:checked ~ label {
86
+ color: #e23565;
87
+ }
88
+
89
+ .btn-instagram,
90
+ .btn-instagram:focus {
91
+ display: inline-block;
92
+ height: auto;
93
+ box-shadow: none;
94
+ text-shadow: none;
95
+ border: none;
96
+ text-transform: uppercase;
97
+ cursor: pointer;
98
+ padding: 5px 20px;
99
+ border-radius: 3px;
100
+ -webkit-transition: all .5s;
101
+ transition: all .5s;
102
+ text-decoration: none;
103
+ line-height: 1.5;
104
+ }
105
+
106
+ .btn-instagram {
107
+ background: #972dbe;
108
+ color: #fff;
109
+ }
110
+
111
+ .btn-instagram.secondary:focus,
112
+ .btn-instagram:focus,
113
+ .btn-instagram.secondary:hover,
114
+ .btn-instagram:hover {
115
+ background: #feb547;
116
+ color: #fff;
117
+ }
118
+ .btn-instagram .dashicons {
119
+ text-decoration: none;
120
+ line-height: normal;
121
+ vertical-align: middle;
122
+ height: initial;
123
+ padding-right: 5px;
124
+ }
125
+
126
+ .btn-instagram.secondary {
127
+ background: #e23565;
128
+ }
129
+
130
+ .ig-tab-content-row {
131
+ display: none;
132
+ border-bottom: 1px solid #f1f1f1;
133
+ }
134
+
135
+ .ig-tab-content-row.active {
136
+ display: table-row;
137
+ }
138
+ .ig-gallery-list input[type="text"] {
139
+ font-weight: bold;
140
+ font-size: 110%;
141
+ padding: 3px 10px;
142
+ background: #f7f7f7;
143
+ color: #72777c;
144
+ cursor: copy;
145
+ border-color: transparent;
146
+ box-shadow: none;
147
+ }
148
+ .ig-gallery-list input[type="text"]:focus{
149
+ border-color: transparent;
150
+ box-shadow: none;
151
+ }
152
+ .ig-generate-msgs {
153
+ color: #e23565;
154
+ display: none;
155
+ }
156
+ .ig-tab-content-row.error{
157
+ border-color: #e23565;
158
+ }
159
+ .ig-tab-content-row.error .ig-generate-msgs {
160
+ display: block;
161
+ }
162
+ .ig_page_msg p{
163
+ font-size: 20px;
164
+ color: #e93b59;
165
+ }
166
+
167
+ .ig-table-edit td {
168
+ vertical-align: top;
169
+ }
170
+
171
+ .ig-table-edit input[type="checkbox"],.ig_adv-setting input[type="checkbox"] {
172
+ zoom: 1.5;
173
+ }
174
+ .ig-table-edit input[type="checkbox"]:checked:before {
175
+ color: #e23565;
176
+ }
177
+ .ig-table-edit input[type="color"] {
178
+ vertical-align: top;
179
+ padding: 1px 2px;
180
+ width: 50px;
181
+ height: 26px;
182
+ }
183
+ .igf-response {
184
+ font-size: 16px;
185
+ color: #e93b59;
186
+ padding: 5px;
187
+ }
188
+ /* ******** ig account setting ********** */
189
+ .ig-account-section {
190
+ border: 1px solid #e5e5e5;
191
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
192
+ background: #fff;
193
+ padding: 10px;
194
+ }
195
+ .ig-account-section .notice p {
196
+ color: #e93b59;
197
+ font-size: 14px;
198
+ }
199
+ .ig-account-cards .ig-account-card {
200
+ display: inline-block;
201
+ margin: 10px;
202
+ border: 1px solid #ddd;
203
+ padding: 15px;
204
+ -webkit-transition: .3s;
205
+ transition: .3s;
206
+ flex-basis: 350px;
207
+ word-break: break-word;
208
+ }
209
+ .ig-ac-have-token .ig-account-card:first-child {
210
+ flex-basis: auto;
211
+ }
212
+ .ig-ac-have-token .ig-account-card figure {
213
+ text-align: center;
214
+ border-radius: 5px;
215
+ overflow: hidden;
216
+ }
217
+ .ig-account-cards {
218
+ display: flex;
219
+ flex-wrap: wrap;
220
+ margin: -10px;
221
+ }
222
+ .ig-account-cards form h4 {
223
+ margin-top: 0;
224
+ margin-bottom: 10px;
225
+ font-size: 18px;
226
+ }
227
+ .ig-account-cards .ig-account-card:hover {
228
+ background: #eee;
229
+ }
230
+ .ig-account-cards form input[type="text"] {
231
+ width: 100%;
232
+ }
233
+ /*#ig-remove-token {
234
+ display: none;
235
+ }*/
236
+
237
+ /* ******** ig docs page ********** */
238
+ .ig-doc-header {
239
+ background: #fff;
240
+ padding: 1px 10px 5px 10px;
241
+ border: 1px solid #ddd;
242
+ margin-bottom: 10px;
243
+ }
244
+ .ig-doc-body article {
245
+ background: #fff;
246
+ padding: 1px 10px 5px 10px;
247
+ border: 1px solid #ddd;
248
+ margin-bottom: 10px;
249
+ -webkit-transition: .3s;
250
+ transition: .3s;
251
+ }
252
+ .ig-doc-body article:hover {
253
+ box-shadow: 0 0 11px rgba(33,33,33,.2);
254
+ }
255
+ input.ig-doc-red-url {
256
+ cursor: copy;
257
+ min-width: 650px;
258
+ color: #e93b59;
259
+ }
260
+ .ig-doc-body figure img, .ig-doc-figure {
261
+ border: 1px solid #e93b59;
262
+ box-shadow: 0 3px 10px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.2);
263
+ }
264
+ #TB_window figure.ig-doc-figure {
265
+ margin: auto;
266
+ display: inline-block;
267
+ }
268
+ .ig-doc-body article table th {
269
+ text-align: left;
270
+ }
271
+ .ig-doc-body article table th,.ig-doc-body article table td {
272
+ padding: 3px 5px;
273
+ border: 1px solid #ddd;
274
+ }
275
+ .ig-doc-body article table {
276
+ border-collapse: collapse;
277
+ }
278
+
279
+
280
+ /* ******** ig advance setting ********** */
281
+ .ig_adv-setting-toggle{
282
+ cursor: pointer;
283
+ border: 0px;
284
+ }
285
+ .ig_adv-setting-toggle .dashicons-minus{display: none;}
286
+ .ig_adv-setting-toggle.active .dashicons-minus{display: initial;}
287
+ .ig_adv-setting-toggle.active .dashicons-plus{display: none;}
288
+ .ig_adv-setting{display: none;}
289
+ .ig_adv-setting input[type="url"] {
290
+ min-width: 75%;
291
+ }
292
+ .ig_adv-setting .ig-spinner {
293
+ position: relative;
294
+ padding: 10px 30px;
295
+ height:60px;
296
+ -webkit-box-sizing: content-box;
297
+ -moz-box-sizing: content-box;
298
+ box-sizing: content-box;
299
+ }
300
+ .ig_adv-setting .ig-spinner .ig-spin {
301
+ position: absolute;
302
+ top: 50%;
303
+ left: 50%;
304
+ width: 60px;
305
+ margin:-30px 0 0 -30px;
306
+ -webkit-animation:igspin 4s linear infinite;
307
+ -moz-animation:igspin 4s linear infinite;
308
+ animation:igspin 4s linear infinite;
309
+ }
310
+ @-moz-keyframes igspin { 100% { -moz-transform: rotate(360deg); } }
311
+ @-webkit-keyframes igspin { 100% { -webkit-transform: rotate(360deg); } }
312
+ @keyframes igspin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
313
+
314
+ /* ******** paypal btn ********** */
315
+ .ig_donation-wrap {
316
+ padding: 10px 20px;
317
+ background: lightgoldenrodyellow;
318
+ margin-top: 35px;
319
+ font-weight: bold;
320
+ }
321
+
322
+ .ig_donation-wrap p {
323
+ font-size: 125%;
324
+ }
325
+ .ig_donation_text {
326
+ display: inline-block;
327
+ vertical-align: middle;
328
+ line-height: normal;
329
+ }
330
+ .ig_donation_btn {
331
+ display: inline-block;
332
+ margin-left: 20px;
333
+ text-decoration: none;
334
+ padding: 6px 20px;
335
+ background: #fecb5d;
336
+ color: #23282d;
337
+ text-transform: uppercase;
338
+ box-shadow: 1px 1px 5px #888888;
339
+ font: bold 100%/24px sans-serif;
340
+ }
341
+ .ig_donation_btn:hover{
342
+ color: #fff;
343
+ background: #972dbe;
344
+ }
345
+ .ig_donation_btn img {
346
+ vertical-align: middle;
347
+ height: 24px;
348
+ }
assets/css/qligg-admin.min.css ADDED
@@ -0,0 +1 @@
 
1
+ @CHARSET "ISO-8859-1";.ig-thm-color{color:#e23565}.ig-page-header .ig-logo{float:left;margin-right:20px;max-height:35px}.ig-list-buttons{display:inline-block;margin:0}.ig-list-buttons li{display:inline-block;margin-right:20px;margin-bottom:0;vertical-align:middle;color:#aaa;position:relative}.ig-list-buttons input[type=radio]{position:absolute;visibility:hidden}.ig-list-buttons label{display:block;position:relative;font-size:1.35em;padding:10px 5px 10px 50px;z-index:9;cursor:pointer;-webkit-transition:all .25s linear;transition:all .25s linear}.ig-list-buttons li:hover label{color:#e23565}.ig-list-buttons li .check{display:block;position:absolute;border:5px solid #aaa;border-radius:50%;height:25px;width:25px;top:5px;z-index:5;-webkit-transition:border .25s linear;transition:border .25s linear}.ig-list-buttons li:hover .check{border-color:#e23565}.ig-list-buttons li .check::before{display:block;position:absolute;content:'';border-radius:100%;height:15px;width:15px;top:5px;left:5px;margin:auto;-webkit-transition:background .25s linear;transition:background .25s linear}.ig-list-buttons input[type=radio]:checked ~ .check{border-color:#e23565}.ig-list-buttons input[type=radio]:checked ~ .check::before{background:#e23565}.ig-list-buttons input[type=radio]:checked ~ label{color:#e23565}.btn-instagram,.btn-instagram:focus{display:inline-block;height:auto;box-shadow:none;text-shadow:none;border:0;text-transform:uppercase;cursor:pointer;padding:5px 20px;border-radius:3px;-webkit-transition:all .5s;transition:all .5s;text-decoration:none;line-height:1.5}.btn-instagram{background:#972dbe;color:#fff}.btn-instagram.secondary:focus,.btn-instagram:focus,.btn-instagram.secondary:hover,.btn-instagram:hover{background:#feb547;color:#fff}.btn-instagram .dashicons{text-decoration:none;line-height:normal;vertical-align:middle;height:initial;padding-right:5px}.btn-instagram.secondary{background:#e23565}.ig-tab-content-row{display:none;border-bottom:1px solid #f1f1f1}.ig-tab-content-row.active{display:table-row}.ig-gallery-list input[type="text"]{font-weight:bold;font-size:110%;padding:3px 10px;background:#f7f7f7;color:#72777c;cursor:copy;border-color:transparent;box-shadow:none}.ig-gallery-list input[type="text"]:focus{border-color:transparent;box-shadow:none}.ig-generate-msgs{color:#e23565;display:none}.ig-tab-content-row.error{border-color:#e23565}.ig-tab-content-row.error .ig-generate-msgs{display:block}.ig_page_msg p{font-size:20px;color:#e93b59}.ig-table-edit td{vertical-align:top}.ig-table-edit input[type="checkbox"],.ig_adv-setting input[type="checkbox"]{zoom:1.5}.ig-table-edit input[type="checkbox"]:checked:before{color:#e23565}.ig-table-edit input[type="color"]{vertical-align:top;padding:1px 2px;width:50px;height:26px}.igf-response{font-size:16px;color:#e93b59;padding:5px}.ig-account-section{border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;padding:10px}.ig-account-section .notice p{color:#e93b59;font-size:14px}.ig-account-cards .ig-account-card{display:inline-block;margin:10px;border:1px solid #ddd;padding:15px;-webkit-transition:.3s;transition:.3s;flex-basis:350px;word-break:break-word}.ig-ac-have-token .ig-account-card:first-child{flex-basis:auto}.ig-ac-have-token .ig-account-card figure{text-align:center;border-radius:5px;overflow:hidden}.ig-account-cards{display:flex;flex-wrap:wrap;margin:-10px}.ig-account-cards form h4{margin-top:0;margin-bottom:10px;font-size:18px}.ig-account-cards .ig-account-card:hover{background:#eee}.ig-account-cards form input[type="text"]{width:100%}.ig-doc-header{background:#fff;padding:1px 10px 5px 10px;border:1px solid #ddd;margin-bottom:10px}.ig-doc-body article{background:#fff;padding:1px 10px 5px 10px;border:1px solid #ddd;margin-bottom:10px;-webkit-transition:.3s;transition:.3s}.ig-doc-body article:hover{box-shadow:0 0 11px rgba(33,33,33,.2)}input.ig-doc-red-url{cursor:copy;min-width:650px;color:#e93b59}.ig-doc-body figure img,.ig-doc-figure{border:1px solid #e93b59;box-shadow:0 3px 10px 0 rgba(0,0,0,0.2),0 3px 10px 0 rgba(0,0,0,0.2)}#TB_window figure.ig-doc-figure{margin:auto;display:inline-block}.ig-doc-body article table th{text-align:left}.ig-doc-body article table th,.ig-doc-body article table td{padding:3px 5px;border:1px solid #ddd}.ig-doc-body article table{border-collapse:collapse}.ig_adv-setting-toggle{cursor:pointer;border:0}.ig_adv-setting-toggle .dashicons-minus{display:none}.ig_adv-setting-toggle.active .dashicons-minus{display:initial}.ig_adv-setting-toggle.active .dashicons-plus{display:none}.ig_adv-setting{display:none}.ig_adv-setting input[type="url"]{min-width:75%}.ig_adv-setting .ig-spinner{position:relative;padding:10px 30px;height:60px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.ig_adv-setting .ig-spinner .ig-spin{position:absolute;top:50%;left:50%;width:60px;margin:-30px 0 0 -30px;-webkit-animation:igspin 4s linear infinite;-moz-animation:igspin 4s linear infinite;animation:igspin 4s linear infinite}@-moz-keyframes igspin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes igspin{100%{-webkit-transform:rotate(360deg)}}@keyframes igspin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ig_donation-wrap{padding:10px 20px;background:lightgoldenrodyellow;margin-top:35px;font-weight:bold}.ig_donation-wrap p{font-size:125%}.ig_donation_text{display:inline-block;vertical-align:middle;line-height:normal}.ig_donation_btn{display:inline-block;margin-left:20px;text-decoration:none;padding:6px 20px;background:#fecb5d;color:#23282d;text-transform:uppercase;box-shadow:1px 1px 5px #888;font:bold 100%/24px sans-serif}.ig_donation_btn:hover{color:#fff;background:#972dbe}.ig_donation_btn img{vertical-align:middle;height:24px}
assets/{insta-gallery.css → css/qligg.css} RENAMED
@@ -14,118 +14,120 @@
14
  /* Magnific Popup CSS */
15
  .mfp-bg,.mfp-wrap{position:fixed;left:0;top:0}.mfp-bg,.mfp-container,.mfp-wrap{height:100%;width:100%}.mfp-arrow:after,.mfp-arrow:before,.mfp-container:before,.mfp-figure:after{content:''}.mfp-bg{z-index:1042;overflow:hidden;background:#0b0b0b;opacity:.8}.mfp-wrap{z-index:1043;outline:0!important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-ajax-holder .mfp-content,.mfp-inline-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-arrow,.mfp-close,.mfp-counter,.mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-close,.mfp-preloader a:hover{color:#FFF}.mfp-s-error .mfp-content,.mfp-s-ready .mfp-preloader{display:none}button.mfp-arrow,button.mfp-close{overflow:visible;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}.mfp-figure:after,.mfp-iframe-scaler iframe{box-shadow:0 0 8px rgba(0,0,0,.6);position:absolute;left:0}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;padding:0 0 18px 10px;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:focus,.mfp-close:hover{opacity:1}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-iframe-holder .mfp-close,.mfp-image-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-figure,img.mfp-img{line-height:0}.mfp-arrow{position:absolute;opacity:.65;margin:-55px 0 0;top:50%;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1}.mfp-arrow:after,.mfp-arrow:before{display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-image-holder .mfp-content,img.mfp-img{max-width:100%}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{display:block;top:0;width:100%;height:100%;background:#000}.mfp-figure:after,img.mfp-img{width:auto;height:auto;display:block}img.mfp-img{box-sizing:border-box;padding:40px 0;margin:0 auto}.mfp-figure:after{top:40px;bottom:40px;right:0;z-index:-1;background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}
16
 
17
-
18
  /************************************************
19
  ****************** CUSTOM styling ***************
20
  *************************************************/
21
- /*
22
- * gallery
23
- */
24
  .instagallery-items {
25
- display: block;
26
- overflow: hidden;
27
- display: -ms-flexbox;
28
- display: -webkit-flex;
29
- display: flex;
30
- -ms-flex-align: center;
31
- -webkit-align-items: center;
32
- -webkit-box-align: center;
33
- align-items: center;
34
- -webkit-flex-wrap: wrap;
35
- flex-wrap: wrap;
36
  }
37
  .instagallery-items:after {
38
- display: block;
39
- content: "";
40
- clear: both;
41
  }
42
  .instagallery-items .ig-item {
43
- float: left;
44
- padding: 10px;
45
- box-sizing: border-box;
46
- text-align: center;
47
- vertical-align: middle;
48
  }
49
  .instagallery-items .ig-item.no-spacing {
50
- padding: 0px;
51
  }
52
  .instagallery-items .ig-item a{
53
- display: block;
54
- width: 100%;
55
- position: relative;
56
- text-align: center;
57
- overflow: hidden;
58
  }
59
  .instagallery-items .ig-item.ighover a:after {
60
- content: "";
61
- left: 50%;
62
- top: 50%;
63
- width: 0px;
64
- height: 0px;
65
- position: absolute;
66
- z-index: 8;
67
- -webkit-transition: all .3s ease;
68
- transition: all .3s ease;
69
- opacity: 0;
70
- margin:0;
71
  }
72
  .instagallery-items .ig-item.ighover a:hover:after {
73
- background: #007aff;
74
- width: 100%;
75
- height: 100%;
76
- opacity: 0.5;
77
- left: 0px;
78
- top: 0px;
79
  }
80
  .instagallery-items .ig-item a img{
81
- margin: auto;
82
- max-width: 100%;
83
- -webkit-box-shadow: none;
84
- box-shadow: none;
85
- display: block;
86
  }
87
  .ig-likes-comments {
88
- position: absolute;
89
- top: 45%;
90
- z-index: 9;
91
- width: 100%;
92
- color: #fff;
93
- left: 0px;
94
- -webkit-transition: all .5s ease;
95
- transition: all .5s ease;
96
- opacity: 0;
97
- line-height: 20px;
98
- font-size: 18px;
99
- text-align: center;
100
  }
101
  .ig-likes-comments > span{
102
- padding:0px 5px;
103
  }
104
  .ig-likes-comments span svg {
105
- height: 16px;
106
- width: 16px;
107
- margin-right: 3px;
108
  }
109
  .ig-item a:hover .ig-likes-comments {
110
- opacity: 1;
111
  }
112
  .instagallery-actions {
113
- text-align: center;
114
- margin: 10px 0px;
115
  }
116
  .instagallery-actions .igact-instalink {
117
- line-height: 20px;
118
- font-size: 16px;
119
- background: #c32a67;
120
- color: #fff;
121
- display: inline-block;
122
- padding: 5px 15px;
123
- -webkit-transition: all .3s;
124
- transition: all .3s;
 
 
125
  }
126
  .instagallery-actions .igact-instalink:hover {
127
- background: #da894a;
128
- text-decoration:none;
129
  }
130
 
131
  /*
@@ -133,16 +135,16 @@
133
  */
134
  .instacarousel .swiper-wrapper,
135
  .instacarousel.swiper-container-autoheight .swiper-wrapper {
136
- display: -ms-flexbox;
137
- display: -webkit-flex;
138
- display: flex;
139
- -ms-flex-align: center;
140
- -webkit-align-items: center;
141
- -webkit-box-align: center;
142
- align-items: center;
143
  }
144
  .instacarousel .swiper-slide {
145
- overflow: hidden;
146
  }
147
 
148
  /* Disabled since 1.6.3
@@ -152,144 +154,144 @@
152
  */
153
 
154
  .instacarousel .swiper-slide img {
155
- -webkit-transition: all .3s;
156
- transition: all .3s;
157
- max-width: 100%;
158
- display:block;
159
- margin: auto;
160
  }
161
 
162
  .ic-likes-comments {
163
- position: absolute;
164
- top: -20%;
165
- z-index: 9;
166
- width: 100%;
167
- color: #fff;
168
- left: 0px;
169
- -webkit-transition: all .5s ease;
170
- transition: all .5s ease;
171
- opacity: 0;
172
- line-height: 20px;
173
- font-size: 18px;
174
- text-align: center;
175
  }
176
  .ic-likes-comments > span{
177
- padding:0px 5px;
178
  }
179
  .ic-likes-comments span svg {
180
- height: 16px;
181
- width: 16px;
182
- margin-right: 3px;
183
  }
184
  .instacarousel .swiper-slide a:hover .ic-likes-comments {
185
- opacity: 1;
186
- top: 45%;
187
  }
188
  .instacarousel .swiper-slide a:after {
189
- content: "";
190
- left: 50%;
191
- top: 50%;
192
- width: 0px;
193
- height: 0px;
194
- position: absolute;
195
- z-index: 8;
196
- -webkit-transition: all .5s ease;
197
- transition: all .5s ease;
198
- opacity: 0;
199
  }
200
  .instacarousel .swiper-slide a:hover:after {
201
- background: #007aff;
202
- width: 100%;
203
- height: 100%;
204
- opacity: 0.5;
205
- left: 0px;
206
- top: 0px;
207
  }
208
 
209
 
210
  .instacarousel .swiper-button-prev {
211
- left: 0;
212
  }
213
  .instacarousel .swiper-button-next {
214
- right: 0;
215
  }
216
  .instacarousel .swiper-button-next, .instacarousel .swiper-button-prev{
217
- -webkit-transition: all .3s;
218
- transition: all .3s;
219
- background: none;
220
- top: 0;
221
- height: 100%;
222
- margin-top: 0;
223
- background: transparent;
224
- width: 32px;
225
  }
226
  .instacarousel .swiper-button-next svg,.instacarousel .swiper-button-prev svg{
227
- fill: #e23565;
228
- position: relative;
229
- top: 50%;
230
- -webkit-transform: translateY(-50%);
231
- transform: translateY(-50%);
232
  }
233
  .instacarousel .swiper-button-next:hover,.instacarousel .swiper-button-prev:hover{
234
- background-color: rgba(0, 0, 0, 0.2);
235
  }
236
  .ig-spinner {
237
- position: relative;
238
- padding: 20px;
239
- height:60px;
240
- -webkit-box-sizing: content-box;
241
- -moz-box-sizing: content-box;
242
- box-sizing: content-box;
243
  }
244
  .ig-spin {
245
- position: absolute;
246
- top: 50%;
247
- left: 50%;
248
- width: 60px;
249
- height: 60px;
250
- margin:-30px 0 0 -30px;
251
- -webkit-animation:igspin 4s linear infinite;
252
- -moz-animation:igspin 4s linear infinite;
253
- animation:igspin 4s linear infinite;
254
  }
255
  @-moz-keyframes igspin { 100% { -moz-transform: rotate(360deg); } }
256
  @-webkit-keyframes igspin { 100% { -webkit-transform: rotate(360deg); } }
257
  @keyframes igspin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
258
  .ig_front_msg-color{
259
- color: #e93b59;
260
  }
261
  /* fix for IE browsers */
262
  .instagal-ie-8 .ig-spinner, .instagal-ie-9 .ig-spinner{
263
- display:none;
264
  }
265
  .instagal-ie-8 .ig-item.ighover a:hover:after,.instagal-ie-8 .instacarousel .swiper-slide a:hover:after {
266
- background: none;
267
  }
268
  .instagal-ie-8 .instacarousel .swiper-slide,.instagal-ie-9 .instacarousel .swiper-slide{
269
- max-width:33.333%;
270
- float:left;
271
  }
272
  .instagal-ie-8 .swiper-button-prev,.instagal-ie-8 .swiper-button-next,
273
  .instagal-ie-9 .swiper-button-prev,.instagal-ie-9 .swiper-button-next{
274
- display: none;
275
  }
276
  .igblock-wrap-IElte8 .instacarousel .swiper-slide{
277
- width: 25%;
278
- float: left;
279
  }
280
  .igblock-wrap-IElte8 .instacarousel:after{
281
- clear:both;
282
- display: block;
283
- content:"";
284
  }
285
  /* common styling */
286
  .mfp-figure small svg {
287
- width: 16px;
288
- height: 16px;
289
- fill: #ccc;
290
  }
291
  .mfp-figure small svg:hover{
292
- fill: white;
293
  }
294
 
295
  /*
@@ -297,26 +299,25 @@
297
  */
298
  @media screen and (max-width: 1023px) and (min-width: 768px) {
299
 
300
- .ig-item{
301
- min-width: 33.333%;
302
- padding: 10px;
303
- }
304
 
305
  }
306
  @media screen and (max-width: 767px) {
307
 
308
- .ig-item{
309
- min-width: 33.333%;
310
- padding: 5px;
311
- }
312
 
313
  }
314
  @media screen and (max-width: 480px) {
315
 
316
- .ig-item{
317
- min-width: 50%;
318
- padding: 5px;
319
- }
320
 
321
  }
322
-
14
  /* Magnific Popup CSS */
15
  .mfp-bg,.mfp-wrap{position:fixed;left:0;top:0}.mfp-bg,.mfp-container,.mfp-wrap{height:100%;width:100%}.mfp-arrow:after,.mfp-arrow:before,.mfp-container:before,.mfp-figure:after{content:''}.mfp-bg{z-index:1042;overflow:hidden;background:#0b0b0b;opacity:.8}.mfp-wrap{z-index:1043;outline:0!important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-ajax-holder .mfp-content,.mfp-inline-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-arrow,.mfp-close,.mfp-counter,.mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-close,.mfp-preloader a:hover{color:#FFF}.mfp-s-error .mfp-content,.mfp-s-ready .mfp-preloader{display:none}button.mfp-arrow,button.mfp-close{overflow:visible;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}.mfp-figure:after,.mfp-iframe-scaler iframe{box-shadow:0 0 8px rgba(0,0,0,.6);position:absolute;left:0}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;padding:0 0 18px 10px;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:focus,.mfp-close:hover{opacity:1}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-iframe-holder .mfp-close,.mfp-image-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-figure,img.mfp-img{line-height:0}.mfp-arrow{position:absolute;opacity:.65;margin:-55px 0 0;top:50%;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1}.mfp-arrow:after,.mfp-arrow:before{display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-image-holder .mfp-content,img.mfp-img{max-width:100%}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{display:block;top:0;width:100%;height:100%;background:#000}.mfp-figure:after,img.mfp-img{width:auto;height:auto;display:block}img.mfp-img{box-sizing:border-box;padding:40px 0;margin:0 auto}.mfp-figure:after{top:40px;bottom:40px;right:0;z-index:-1;background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}
16
 
17
+
18
  /************************************************
19
  ****************** CUSTOM styling ***************
20
  *************************************************/
21
+ /*
22
+ * gallery
23
+ */
24
  .instagallery-items {
25
+ display: block;
26
+ overflow: hidden;
27
+ display: -ms-flexbox;
28
+ display: -webkit-flex;
29
+ display: flex;
30
+ -ms-flex-align: center;
31
+ -webkit-align-items: center;
32
+ -webkit-box-align: center;
33
+ align-items: center;
34
+ -webkit-flex-wrap: wrap;
35
+ flex-wrap: wrap;
36
  }
37
  .instagallery-items:after {
38
+ display: block;
39
+ content: "";
40
+ clear: both;
41
  }
42
  .instagallery-items .ig-item {
43
+ float: left;
44
+ padding: 10px;
45
+ box-sizing: border-box;
46
+ text-align: center;
47
+ vertical-align: middle;
48
  }
49
  .instagallery-items .ig-item.no-spacing {
50
+ padding: 0px;
51
  }
52
  .instagallery-items .ig-item a{
53
+ display: block;
54
+ width: 100%;
55
+ position: relative;
56
+ text-align: center;
57
+ overflow: hidden;
58
  }
59
  .instagallery-items .ig-item.ighover a:after {
60
+ content: "";
61
+ left: 50%;
62
+ top: 50%;
63
+ width: 0px;
64
+ height: 0px;
65
+ position: absolute;
66
+ z-index: 8;
67
+ -webkit-transition: all .3s ease;
68
+ transition: all .3s ease;
69
+ opacity: 0;
70
+ margin:0;
71
  }
72
  .instagallery-items .ig-item.ighover a:hover:after {
73
+ background: #007aff;
74
+ width: 100%;
75
+ height: 100%;
76
+ opacity: 0.5;
77
+ left: 0px;
78
+ top: 0px;
79
  }
80
  .instagallery-items .ig-item a img{
81
+ margin: auto;
82
+ max-width: 100%;
83
+ -webkit-box-shadow: none;
84
+ box-shadow: none;
85
+ display: block;
86
  }
87
  .ig-likes-comments {
88
+ position: absolute;
89
+ top: 45%;
90
+ z-index: 9;
91
+ width: 100%;
92
+ color: #fff;
93
+ left: 0px;
94
+ -webkit-transition: all .5s ease;
95
+ transition: all .5s ease;
96
+ opacity: 0;
97
+ line-height: 20px;
98
+ font-size: 18px;
99
+ text-align: center;
100
  }
101
  .ig-likes-comments > span{
102
+ padding:0px 5px;
103
  }
104
  .ig-likes-comments span svg {
105
+ height: 16px;
106
+ width: 16px;
107
+ margin-right: 3px;
108
  }
109
  .ig-item a:hover .ig-likes-comments {
110
+ opacity: 1;
111
  }
112
  .instagallery-actions {
113
+ text-align: center;
114
+ margin: 15px 0px;
115
  }
116
  .instagallery-actions .igact-instalink {
117
+ line-height: 20px;
118
+ font-size: 16px;
119
+ background: #c32a67;
120
+ color: #fff;
121
+ display: inline-block;
122
+ padding: 10px 25px;
123
+ -webkit-transition: all .3s;
124
+ transition: all .3s;
125
+ text-decoration: none!important;
126
+ border-radius: 2px;
127
  }
128
  .instagallery-actions .igact-instalink:hover {
129
+ background: #da894a;
130
+ text-decoration:none;
131
  }
132
 
133
  /*
135
  */
136
  .instacarousel .swiper-wrapper,
137
  .instacarousel.swiper-container-autoheight .swiper-wrapper {
138
+ display: -ms-flexbox;
139
+ display: -webkit-flex;
140
+ display: flex;
141
+ -ms-flex-align: center;
142
+ -webkit-align-items: center;
143
+ -webkit-box-align: center;
144
+ align-items: center;
145
  }
146
  .instacarousel .swiper-slide {
147
+ overflow: hidden;
148
  }
149
 
150
  /* Disabled since 1.6.3
154
  */
155
 
156
  .instacarousel .swiper-slide img {
157
+ -webkit-transition: all .3s;
158
+ transition: all .3s;
159
+ max-width: 100%;
160
+ display:block;
161
+ margin: auto;
162
  }
163
 
164
  .ic-likes-comments {
165
+ position: absolute;
166
+ top: -20%;
167
+ z-index: 9;
168
+ width: 100%;
169
+ color: #fff;
170
+ left: 0px;
171
+ -webkit-transition: all .5s ease;
172
+ transition: all .5s ease;
173
+ opacity: 0;
174
+ line-height: 20px;
175
+ font-size: 18px;
176
+ text-align: center;
177
  }
178
  .ic-likes-comments > span{
179
+ padding:0px 5px;
180
  }
181
  .ic-likes-comments span svg {
182
+ height: 16px;
183
+ width: 16px;
184
+ margin-right: 3px;
185
  }
186
  .instacarousel .swiper-slide a:hover .ic-likes-comments {
187
+ opacity: 1;
188
+ top: 45%;
189
  }
190
  .instacarousel .swiper-slide a:after {
191
+ content: "";
192
+ left: 50%;
193
+ top: 50%;
194
+ width: 0px;
195
+ height: 0px;
196
+ position: absolute;
197
+ z-index: 8;
198
+ -webkit-transition: all .5s ease;
199
+ transition: all .5s ease;
200
+ opacity: 0;
201
  }
202
  .instacarousel .swiper-slide a:hover:after {
203
+ background: #007aff;
204
+ width: 100%;
205
+ height: 100%;
206
+ opacity: 0.5;
207
+ left: 0px;
208
+ top: 0px;
209
  }
210
 
211
 
212
  .instacarousel .swiper-button-prev {
213
+ left: 0;
214
  }
215
  .instacarousel .swiper-button-next {
216
+ right: 0;
217
  }
218
  .instacarousel .swiper-button-next, .instacarousel .swiper-button-prev{
219
+ -webkit-transition: all .3s;
220
+ transition: all .3s;
221
+ background: none;
222
+ top: 0;
223
+ height: 100%;
224
+ margin-top: 0;
225
+ background: transparent;
226
+ width: 32px;
227
  }
228
  .instacarousel .swiper-button-next svg,.instacarousel .swiper-button-prev svg{
229
+ fill: #e23565;
230
+ position: relative;
231
+ top: 50%;
232
+ -webkit-transform: translateY(-50%);
233
+ transform: translateY(-50%);
234
  }
235
  .instacarousel .swiper-button-next:hover,.instacarousel .swiper-button-prev:hover{
236
+ background-color: rgba(0, 0, 0, 0.2);
237
  }
238
  .ig-spinner {
239
+ position: relative;
240
+ padding: 20px;
241
+ height:60px;
242
+ -webkit-box-sizing: content-box;
243
+ -moz-box-sizing: content-box;
244
+ box-sizing: content-box;
245
  }
246
  .ig-spin {
247
+ position: absolute;
248
+ top: 50%;
249
+ left: 50%;
250
+ width: 60px;
251
+ height: 60px;
252
+ margin:-30px 0 0 -30px;
253
+ -webkit-animation:igspin 4s linear infinite;
254
+ -moz-animation:igspin 4s linear infinite;
255
+ animation:igspin 4s linear infinite;
256
  }
257
  @-moz-keyframes igspin { 100% { -moz-transform: rotate(360deg); } }
258
  @-webkit-keyframes igspin { 100% { -webkit-transform: rotate(360deg); } }
259
  @keyframes igspin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
260
  .ig_front_msg-color{
261
+ color: #e93b59;
262
  }
263
  /* fix for IE browsers */
264
  .instagal-ie-8 .ig-spinner, .instagal-ie-9 .ig-spinner{
265
+ display:none;
266
  }
267
  .instagal-ie-8 .ig-item.ighover a:hover:after,.instagal-ie-8 .instacarousel .swiper-slide a:hover:after {
268
+ background: none;
269
  }
270
  .instagal-ie-8 .instacarousel .swiper-slide,.instagal-ie-9 .instacarousel .swiper-slide{
271
+ max-width:33.333%;
272
+ float:left;
273
  }
274
  .instagal-ie-8 .swiper-button-prev,.instagal-ie-8 .swiper-button-next,
275
  .instagal-ie-9 .swiper-button-prev,.instagal-ie-9 .swiper-button-next{
276
+ display: none;
277
  }
278
  .igblock-wrap-IElte8 .instacarousel .swiper-slide{
279
+ width: 25%;
280
+ float: left;
281
  }
282
  .igblock-wrap-IElte8 .instacarousel:after{
283
+ clear:both;
284
+ display: block;
285
+ content:"";
286
  }
287
  /* common styling */
288
  .mfp-figure small svg {
289
+ width: 16px;
290
+ height: 16px;
291
+ fill: #ccc;
292
  }
293
  .mfp-figure small svg:hover{
294
+ fill: white;
295
  }
296
 
297
  /*
299
  */
300
  @media screen and (max-width: 1023px) and (min-width: 768px) {
301
 
302
+ .ig-item{
303
+ min-width: 33.333%;
304
+ padding: 10px;
305
+ }
306
 
307
  }
308
  @media screen and (max-width: 767px) {
309
 
310
+ .ig-item{
311
+ min-width: 33.333%;
312
+ padding: 5px;
313
+ }
314
 
315
  }
316
  @media screen and (max-width: 480px) {
317
 
318
+ .ig-item{
319
+ min-width: 50%;
320
+ padding: 5px;
321
+ }
322
 
323
  }
 
assets/css/qligg.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .swiper-container{margin:0 auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s opacity;-o-transition:.3s opacity;transition:.3s opacity;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:0;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s top,.2s -webkit-transform;transition:.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top;transition:.2s transform,.2s top;transition:.2s transform,.2s top,.2s -webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s left,.2s -webkit-transform;transition:.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left;transition:.2s transform,.2s left;transition:.2s transform,.2s left,.2s -webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s right,.2s -webkit-transform;transition:.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right;transition:.2s transform,.2s right;transition:.2s transform,.2s right,.2s -webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}.mfp-bg,.mfp-wrap{position:fixed;left:0;top:0}.mfp-bg,.mfp-container,.mfp-wrap{height:100%;width:100%}.mfp-arrow:after,.mfp-arrow:before,.mfp-container:before,.mfp-figure:after{content:''}.mfp-bg{z-index:1042;overflow:hidden;background:#0b0b0b;opacity:.8}.mfp-wrap{z-index:1043;outline:0!important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-ajax-holder .mfp-content,.mfp-inline-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-arrow,.mfp-close,.mfp-counter,.mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-close,.mfp-preloader a:hover{color:#FFF}.mfp-s-error .mfp-content,.mfp-s-ready .mfp-preloader{display:none}button.mfp-arrow,button.mfp-close{overflow:visible;cursor:pointer;background:0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}.mfp-figure:after,.mfp-iframe-scaler iframe{box-shadow:0 0 8px rgba(0,0,0,.6);position:absolute;left:0}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;padding:0 0 18px 10px;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:focus,.mfp-close:hover{opacity:1}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-iframe-holder .mfp-close,.mfp-image-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-figure,img.mfp-img{line-height:0}.mfp-arrow{position:absolute;opacity:.65;margin:-55px 0 0;top:50%;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1}.mfp-arrow:after,.mfp-arrow:before{display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3f3f3f}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3f3f3f}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-image-holder .mfp-content,img.mfp-img{max-width:100%}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{display:block;top:0;width:100%;height:100%;background:#000}.mfp-figure:after,img.mfp-img{width:auto;height:auto;display:block}img.mfp-img{box-sizing:border-box;padding:40px 0;margin:0 auto}.mfp-figure:after{top:40px;bottom:40px;right:0;z-index:-1;background:#444}.mfp-figure small{color:#bdbdbd;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#f3f3f3;word-wrap:break-word;padding-right:36px}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0 0;transform-origin:0 0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.instagallery-items{display:block;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-align:center;-webkit-align-items:center;-webkit-box-align:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap}.instagallery-items:after{display:block;content:"";clear:both}.instagallery-items .ig-item{float:left;padding:10px;box-sizing:border-box;text-align:center;vertical-align:middle}.instagallery-items .ig-item.no-spacing{padding:0}.instagallery-items .ig-item a{display:block;width:100%;position:relative;text-align:center;overflow:hidden}.instagallery-items .ig-item.ighover a:after{content:"";left:50%;top:50%;width:0;height:0;position:absolute;z-index:8;-webkit-transition:all .3s ease;transition:all .3s ease;opacity:0;margin:0}.instagallery-items .ig-item.ighover a:hover:after{background:#007aff;width:100%;height:100%;opacity:.5;left:0;top:0}.instagallery-items .ig-item a img{margin:auto;max-width:100%;-webkit-box-shadow:none;box-shadow:none;display:block}.ig-likes-comments{position:absolute;top:45%;z-index:9;width:100%;color:#fff;left:0;-webkit-transition:all .5s ease;transition:all .5s ease;opacity:0;line-height:20px;font-size:18px;text-align:center}.ig-likes-comments>span{padding:0 5px}.ig-likes-comments span svg{height:16px;width:16px;margin-right:3px}.ig-item a:hover .ig-likes-comments{opacity:1}.instagallery-actions{text-align:center;margin:15px 0}.instagallery-actions .igact-instalink{line-height:20px;font-size:16px;background:#c32a67;color:#fff;display:inline-block;padding:10px 25px;-webkit-transition:all .3s;transition:all .3s;text-decoration:none!important;border-radius:2px}.instagallery-actions .igact-instalink:hover{background:#da894a;text-decoration:none}.instacarousel .swiper-wrapper,.instacarousel.swiper-container-autoheight .swiper-wrapper{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-align:center;-webkit-align-items:center;-webkit-box-align:center;align-items:center}.instacarousel .swiper-slide{overflow:hidden}.instacarousel .swiper-slide img{-webkit-transition:all .3s;transition:all .3s;max-width:100%;display:block;margin:auto}.ic-likes-comments{position:absolute;top:-20%;z-index:9;width:100%;color:#fff;left:0;-webkit-transition:all .5s ease;transition:all .5s ease;opacity:0;line-height:20px;font-size:18px;text-align:center}.ic-likes-comments>span{padding:0 5px}.ic-likes-comments span svg{height:16px;width:16px;margin-right:3px}.instacarousel .swiper-slide a:hover .ic-likes-comments{opacity:1;top:45%}.instacarousel .swiper-slide a:after{content:"";left:50%;top:50%;width:0;height:0;position:absolute;z-index:8;-webkit-transition:all .5s ease;transition:all .5s ease;opacity:0}.instacarousel .swiper-slide a:hover:after{background:#007aff;width:100%;height:100%;opacity:.5;left:0;top:0}.instacarousel .swiper-button-prev{left:0}.instacarousel .swiper-button-next{right:0}.instacarousel .swiper-button-next,.instacarousel .swiper-button-prev{-webkit-transition:all .3s;transition:all .3s;background:0;top:0;height:100%;margin-top:0;background:transparent;width:32px}.instacarousel .swiper-button-next svg,.instacarousel .swiper-button-prev svg{fill:#e23565;position:relative;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.instacarousel .swiper-button-next:hover,.instacarousel .swiper-button-prev:hover{background-color:rgba(0,0,0,0.2)}.ig-spinner{position:relative;padding:20px;height:60px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.ig-spin{position:absolute;top:50%;left:50%;width:60px;height:60px;margin:-30px 0 0 -30px;-webkit-animation:igspin 4s linear infinite;-moz-animation:igspin 4s linear infinite;animation:igspin 4s linear infinite}@-moz-keyframes igspin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes igspin{100%{-webkit-transform:rotate(360deg)}}@keyframes igspin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ig_front_msg-color{color:#e93b59}.instagal-ie-8 .ig-spinner,.instagal-ie-9 .ig-spinner{display:none}.instagal-ie-8 .ig-item.ighover a:hover:after,.instagal-ie-8 .instacarousel .swiper-slide a:hover:after{background:0}.instagal-ie-8 .instacarousel .swiper-slide,.instagal-ie-9 .instacarousel .swiper-slide{max-width:33.333%;float:left}.instagal-ie-8 .swiper-button-prev,.instagal-ie-8 .swiper-button-next,.instagal-ie-9 .swiper-button-prev,.instagal-ie-9 .swiper-button-next{display:none}.igblock-wrap-IElte8 .instacarousel .swiper-slide{width:25%;float:left}.igblock-wrap-IElte8 .instacarousel:after{clear:both;display:block;content:""}.mfp-figure small svg{width:16px;height:16px;fill:#ccc}.mfp-figure small svg:hover{fill:white}@media screen and (max-width:1023px) and (min-width:768px){.ig-item{min-width:33.333%;padding:10px}}@media screen and (max-width:767px){.ig-item{min-width:33.333%;padding:5px}}@media screen and (max-width:480px){.ig-item{min-width:50%;padding:5px}}
assets/{media → img}/demo-carousel.jpg RENAMED
File without changes
assets/{media → img}/demo-gallery.jpg RENAMED
File without changes
assets/img/gallery.jpg ADDED
Binary file
assets/{media → img}/ig-hdp-1.png RENAMED
File without changes
assets/{media → img}/ig-hdp-2.jpg RENAMED
File without changes
assets/{media → img}/ig-hdp-3.png RENAMED
File without changes
assets/{media → img}/ig-hdp-4.png RENAMED
File without changes
assets/{media → img}/ig-hdp-5.png RENAMED
File without changes
assets/{media → img}/ig-hdp-6.png RENAMED
File without changes
assets/{media → img}/ig-hdp-7.png RENAMED
File without changes
assets/{media → img}/ig-hdp-p1.png RENAMED
File without changes
assets/img/logo.png ADDED
Binary file
assets/{media → img}/paypal-logo.svg RENAMED
File without changes
assets/img/quadlayers.jpg ADDED
Binary file
assets/insta-gallery-min.css DELETED
@@ -1,3 +0,0 @@
1
- .swiper-container{margin:0 auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s opacity;-o-transition:.3s opacity;transition:.3s opacity;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s top,.2s -webkit-transform;transition:.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top;transition:.2s transform,.2s top;transition:.2s transform,.2s top,.2s -webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s left,.2s -webkit-transform;transition:.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left;transition:.2s transform,.2s left;transition:.2s transform,.2s left,.2s -webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s right,.2s -webkit-transform;transition:.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right;transition:.2s transform,.2s right;transition:.2s transform,.2s right,.2s -webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}
2
- .mfp-bg,.mfp-wrap{position:fixed;left:0;top:0}.mfp-bg,.mfp-container,.mfp-wrap{height:100%;width:100%}.mfp-arrow:after,.mfp-arrow:before,.mfp-container:before,.mfp-figure:after{content:''}.mfp-bg{z-index:1042;overflow:hidden;background:#0b0b0b;opacity:.8}.mfp-wrap{z-index:1043;outline:0!important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-ajax-holder .mfp-content,.mfp-inline-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-arrow,.mfp-close,.mfp-counter,.mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-close,.mfp-preloader a:hover{color:#FFF}.mfp-s-error .mfp-content,.mfp-s-ready .mfp-preloader{display:none}button.mfp-arrow,button.mfp-close{overflow:visible;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}.mfp-figure:after,.mfp-iframe-scaler iframe{box-shadow:0 0 8px rgba(0,0,0,.6);position:absolute;left:0}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;padding:0 0 18px 10px;font-style:normal;font-size:28px;font-family:Arial,Baskerville,monospace}.mfp-close:focus,.mfp-close:hover{opacity:1}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-iframe-holder .mfp-close,.mfp-image-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-figure,img.mfp-img{line-height:0}.mfp-arrow{position:absolute;opacity:.65;margin:-55px 0 0;top:50%;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1}.mfp-arrow:after,.mfp-arrow:before{display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-image-holder .mfp-content,img.mfp-img{max-width:100%}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{display:block;top:0;width:100%;height:100%;background:#000}.mfp-figure:after,img.mfp-img{width:auto;height:auto;display:block}img.mfp-img{box-sizing:border-box;padding:40px 0;margin:0 auto}.mfp-figure:after{top:40px;bottom:40px;right:0;z-index:-1;background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}
3
- .instagallery-items{display:block;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-align:center;-webkit-align-items:center;-webkit-box-align:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap}.instagallery-items:after{display:block;content:"";clear:both}.instagallery-items .ig-item{float:left;padding:10px;box-sizing:border-box;text-align:center;vertical-align:middle}.instagallery-items .ig-item.no-spacing{padding:0}.instagallery-items .ig-item a{display:block;width:100%;position:relative;text-align:center;overflow:hidden}.instagallery-items .ig-item.ighover a:after{content:"";left:50%;top:50%;width:0;height:0;position:absolute;z-index:8;-webkit-transition:all .3s ease;transition:all .3s ease;opacity:0;margin:0}.instagallery-items .ig-item.ighover a:hover:after{background:#007aff;width:100%;height:100%;opacity:.5;left:0;top:0}.instagallery-items .ig-item a img{margin:auto;max-width:100%;-webkit-box-shadow:none;box-shadow:none;display:block}.ig-likes-comments{position:absolute;top:45%;z-index:9;width:100%;color:#fff;left:0;-webkit-transition:all .5s ease;transition:all .5s ease;opacity:0;line-height:20px;font-size:18px;text-align:center}.ig-likes-comments>span{padding:0 5px}.ig-likes-comments span svg{height:16px;width:16px;margin-right:3px}.ig-item a:hover .ig-likes-comments{opacity:1}.instagallery-actions{text-align:center;margin:10px 0}.instagallery-actions .igact-instalink{line-height:20px;font-size:16px;background:#c32a67;color:#fff;display:inline-block;padding:5px 15px;-webkit-transition:all .3s;transition:all .3s}.instagallery-actions .igact-instalink:hover{background:#da894a;text-decoration:none}.instacarousel .swiper-wrapper,.instacarousel.swiper-container-autoheight .swiper-wrapper{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-align:center;-webkit-align-items:center;-webkit-box-align:center;align-items:center}.instacarousel .swiper-slide{overflow:hidden}.instacarousel .swiper-slide img{-webkit-transition:all .3s;transition:all .3s;max-width:100%;display:block;margin:auto}.ic-likes-comments{position:absolute;top:-20%;z-index:9;width:100%;color:#fff;left:0;-webkit-transition:all .5s ease;transition:all .5s ease;opacity:0;line-height:20px;font-size:18px;text-align:center}.ic-likes-comments>span{padding:0 5px}.ic-likes-comments span svg{height:16px;width:16px;margin-right:3px}.instacarousel .swiper-slide a:hover .ic-likes-comments{opacity:1;top:45%}.instacarousel .swiper-slide a:after{content:"";left:50%;top:50%;width:0;height:0;position:absolute;z-index:8;-webkit-transition:all .5s ease;transition:all .5s ease;opacity:0}.instacarousel .swiper-slide a:hover:after{background:#007aff;width:100%;height:100%;opacity:.5;left:0;top:0}.instacarousel .swiper-button-prev{left:0}.instacarousel .swiper-button-next{right:0}.instacarousel .swiper-button-next,.instacarousel .swiper-button-prev{-webkit-transition:all .3s;transition:all .3s;background:none;top:0;height:100%;margin-top:0;background:transparent;width:32px}.instacarousel .swiper-button-next svg,.instacarousel .swiper-button-prev svg{fill:#e23565;position:relative;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.instacarousel .swiper-button-next:hover,.instacarousel .swiper-button-prev:hover{background-color:rgba(0,0,0,.2)}.ig-spinner{position:relative;padding:20px;height:60px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.ig-spin{position:absolute;top:50%;left:50%;width:60px;height:60px;margin:-30px 0 0 -30px;-webkit-animation:igspin 4s linear infinite;-moz-animation:igspin 4s linear infinite;animation:igspin 4s linear infinite}@-moz-keyframes igspin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes igspin{100%{-webkit-transform:rotate(360deg)}}@keyframes igspin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ig_front_msg-color{color:#e93b59}.instagal-ie-8 .ig-spinner,.instagal-ie-9 .ig-spinner{display:none}.instagal-ie-8 .ig-item.ighover a:hover:after,.instagal-ie-8 .instacarousel .swiper-slide a:hover:after{background:none}.instagal-ie-8 .instacarousel .swiper-slide,.instagal-ie-9 .instacarousel .swiper-slide{max-width:33.333%;float:left}.instagal-ie-8 .swiper-button-prev,.instagal-ie-8 .swiper-button-next,.instagal-ie-9 .swiper-button-prev,.instagal-ie-9 .swiper-button-next{display:none}.igblock-wrap-IElte8 .instacarousel .swiper-slide{width:25%;float:left}.igblock-wrap-IElte8 .instacarousel:after{clear:both;display:block;content:""}.mfp-figure small svg{width:16px;height:16px;fill:#ccc}.mfp-figure small svg:hover{fill:white}@media screen and (max-width:1023px) and (min-width:768px){.ig-item{min-width:33.333%;padding:10px}}@media screen and (max-width:767px){.ig-item{min-width:33.333%;padding:5px}}@media screen and (max-width:480px){.ig-item{min-width:50%;padding:5px}}
 
 
 
assets/insta-gallery-min.js DELETED
@@ -1,25 +0,0 @@
1
- (function($){var swiperCounter=0,IGSwipers={};function load_ig_gallery(){$('.ig-block').each(function(){var $e=$(this);if($e.hasClass('ig-block-loaded')){return!0}else{$e.addClass('ig-block-loaded')}
2
- var $spinner=$e.find('.ig-spinner');var insgalid=parseInt($e.data('insgalid'));if(!$spinner.length||isNaN(insgalid)){return}
3
- jQuery.ajax({url:insgalajax.ajax_url,type:'post',dataType:'JSON',data:{action:'load_ig_item',insgalid:insgalid},beforeSend:function(){$spinner.show()},success:function(response){if((typeof response=='undefined')||(response==null)||(response==0))
4
- return;if((typeof response==='object')&&response.success){if(response.data){$e.append(response.data);handle_ig_gallery($e)}}}}).fail(function(jqXHR,textStatus){console.log(textStatus)}).always(function(){$spinner.hide();if($e.find('.instagallery-actions').length){$spinner.prependTo($e.find('.instagallery-actions'))}})})}
5
- function handle_ig_gallery($c){if(!$c.find('[data-igfs]').length){return}
6
- var $igc=$c.find('[data-igfs]');var igfs=$igc.data('igfs');if(igfs.display_type=='gallery'){init_ig_gallery($igc,igfs)}else if(igfs.display_type=='carousel'){init_ig_carousel($igc,igfs)}}
7
- function init_ig_gallery($igc,igfs){var instagalleryImages=$igc.find('.ig-item img.instagallery-image');if(instagalleryImages.length){var totalImages=instagalleryImages.length,imagesLoaded=0,minHeight=0;instagalleryImages.load(function(){imagesLoaded++;if(minHeight==0)
8
- minHeight=jQuery(this).height();if((jQuery(this).width()==jQuery(this).height()))
9
- minHeight=jQuery(this).height();if(imagesLoaded>=totalImages){$igc.find('.ig-item img.instagallery-image').each(function(){var i=jQuery(this);var th=i.height();if(minHeight<th){var m=(th-minHeight)/2;jQuery(this).css('margin-top','-'+m+'px');jQuery(this).css('margin-bottom','-'+m+'px')}})}})}
10
- if(!igfs.popup){return}
11
- $igc.find('.ig-item a').magnificPopup({type:'image',mainClass:'mfp-with-zoom',zoom:{enabled:!0,duration:300,easing:'ease-in-out',opener:function(openerElement){return openerElement.is('img')?openerElement:openerElement.find('img')}},gallery:{enabled:!0},image:{titleSrc:function(item){return item.el.attr('data-title')+'<small><a href="'+item.el.attr('data-iplink')+'" target="blank" title="view on Instagram"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"><path style=" " d="M 5 3 C 3.898438 3 3 3.898438 3 5 L 3 19 C 3 20.101563 3.898438 21 5 21 L 19 21 C 20.101563 21 21 20.101563 21 19 L 21 13 L 19 11 L 19 19 L 5 19 L 5 5 L 13 5 L 11 3 Z M 14 3 L 16.65625 5.65625 L 9.15625 13.15625 L 10.84375 14.84375 L 18.34375 7.34375 L 21 10 L 21 3 Z "/>Link</svg></a></small>'}}})}
12
- function init_ig_carousel($igc,igfs){swiperCounter++;var instacarouselImages=$igc.find('img.instacarousel-image');if(instacarouselImages.length){var totalImages=instacarouselImages.length,imagesLoaded=0,minHeight=0;instacarouselImages.load(function(){imagesLoaded++;if(minHeight==0)
13
- minHeight=jQuery(this).height();if((jQuery(this).width()==jQuery(this).height()))
14
- minHeight=jQuery(this).height();if(imagesLoaded>=totalImages){$igc.find('img.instacarousel-image').each(function(){var i=jQuery(this);var th=i.height();if(minHeight<th){var m=(th-minHeight)/2;jQuery(this).css('margin-top','-'+m+'px');jQuery(this).css('margin-bottom','-'+m+'px')}});IGSwipers[swiperCounter].update()}})}
15
- var soptions={loop:!0,autoHeight:!0,observer:!0,observeParents:!0,};if(igfs.autoplay){var interval=igfs.autoplay_interval?parseInt(igfs.autoplay_interval):3000;soptions.autoplay={delay:interval}}
16
- if(igfs.navarrows){soptions.navigation={nextEl:'.swiper-button-next',prevEl:'.swiper-button-prev',}}
17
- if(igfs.spacing){soptions.spaceBetween=20}
18
- soptions.slidesPerView=igfs.slidespv;soptions.breakpoints={};if(igfs.slidespv>3){soptions.breakpoints[1023]={slidesPerView:3,spaceBetween:20}}
19
- if(igfs.slidespv>2){soptions.breakpoints[767]={slidesPerView:2,spaceBetween:15}}
20
- soptions.breakpoints[420]={slidesPerView:1};IGSwipers[swiperCounter]=new Swiper($igc,soptions);if(igfs.popup){$igc.find('.swiper-slide>a').magnificPopup({type:'image',mainClass:'mfp-with-zoom',zoom:{enabled:!0,duration:300,easing:'ease-in-out',opener:function(openerElement){return openerElement.is('img')?openerElement:openerElement.find('img')}},gallery:{enabled:!0},image:{titleSrc:function(item){return item.el.attr('data-title')+'<small><a href="'+item.el.attr('data-iplink')+'" target="blank" title="view on Instagram"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"><path style=" " d="M 5 3 C 3.898438 3 3 3.898438 3 5 L 3 19 C 3 20.101563 3.898438 21 5 21 L 19 21 C 20.101563 21 21 20.101563 21 19 L 21 13 L 19 11 L 19 19 L 5 19 L 5 5 L 13 5 L 11 3 Z M 14 3 L 16.65625 5.65625 L 9.15625 13.15625 L 10.84375 14.84375 L 18.34375 7.34375 L 21 10 L 21 3 Z "/>Link</svg></a></small>'}}})}}
21
- function ig_lazy_load($igc,igfs){var lazyImages=[].slice.call($igc.find('img.ig-lazy'));var active=!1;var lazyLoadImages=function(){if(active===!1){active=!0;setTimeout(function(){lazyImages.forEach(function(lazyImage){if((lazyImage.getBoundingClientRect().top<=window.innerHeight&&lazyImage.getBoundingClientRect().bottom>=0)&&getComputedStyle(lazyImage).display!=="none"){lazyImage.src=lazyImage.dataset.src;lazyImage.classList.remove("lazy");lazyImages=lazyImages.filter(function(image){return image!==lazyImage});if(lazyImages.length===0){document.removeEventListener("scroll",lazyLoadImages);document.removeEventListener("touchmove",lazyLoadImages);window.removeEventListener("resize",lazyLoadImages);window.removeEventListener("orientationchange",lazyLoadImages)}}});active=!1},200)}};document.addEventListener("scroll",lazyLoadImages);document.addEventListener("touchmove",lazyLoadImages);window.addEventListener("resize",lazyLoadImages);window.addEventListener("orientationchange",lazyLoadImages);lazyLoadImages()}
22
- function insgal_ieTest(){if(navigator.appVersion.indexOf("MSIE 8.")!=-1){document.body.className+=' '+'instagal-ie-8'}
23
- if(navigator.appVersion.indexOf("MSIE 9.")!=-1){document.body.className+=' '+'instagal-ie-9'}}
24
- if($('.ig-block').length){load_ig_gallery()}
25
- jQuery(function($){load_ig_gallery();insgal_ieTest()})})(jQuery)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/qligg-admin.js ADDED
@@ -0,0 +1,473 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+
3
+ $.fn.serializeArrayAll = function () {
4
+ var o = {};
5
+ var a = this.serializeArray();
6
+ $.each(a, function () {
7
+ if (o[this.name] !== undefined) {
8
+ if (!o[this.name].push) {
9
+ o[this.name] = [o[this.name]];
10
+ }
11
+ o[this.name].push(this.value || '');
12
+ } else {
13
+ o[this.name] = this.value || '';
14
+ }
15
+ });
16
+ var $radio = $('input[type=radio],input[type=checkbox]', this);
17
+ $.each($radio, function () {
18
+ if (!o.hasOwnProperty(this.name)) {
19
+ o[this.name] = '';
20
+ }
21
+ });
22
+ return o;
23
+ };
24
+
25
+ $(document).on('ready', function () {
26
+
27
+ // by username/tag toggle
28
+ $('input[name="ig_select_from"]').on('change', function () {
29
+ if (this.value == 'username') {
30
+ $('#ig-select-tag-wrap').hide(500, function () {
31
+ $('#ig-select-username-wrap').show( ).addClass('active');
32
+ }).removeClass('active');
33
+ } else {
34
+ $('#ig-select-username-wrap').hide(500, function () {
35
+ $('#ig-select-tag-wrap').show( ).addClass('active');
36
+ }).removeClass('active');
37
+ }
38
+ });
39
+
40
+ // gallery, carousel toggle
41
+ $('input[name="ig_display_type"]').on('change', function () {
42
+
43
+ if (this.value == 'gallery') {
44
+ $('#ig-section-as-carousel').hide(500, function () {
45
+ $('#ig-section-as-galllery').show( ).addClass('active');
46
+ }).removeClass('active');
47
+ } else if (this.value == 'carousel') {
48
+ $('#ig-section-as-galllery').hide(500, function () {
49
+ $('#ig-section-as-carousel').show( ).addClass('active');
50
+ }).removeClass('active');
51
+ }
52
+
53
+ });
54
+
55
+ // gallery color sync
56
+ $('#insta_hover-color-choose').on('change', function () {
57
+ $('input[name="insta_hover-color"]').val($(this).val());
58
+ });
59
+ $('input[name="insta_hover-color"]').on('change', function () {
60
+ var hvcolor = $(this).val();
61
+ if (hvcolor != '') {
62
+ var isOk = /^#[0-9A-F]{6}$/i.test(hvcolor);
63
+ if (!isOk) {
64
+ alert('please enter valid color code');
65
+ $(this).val('');
66
+ return;
67
+ }
68
+ $('#insta_hover-color-choose').val($(this).val());
69
+ } else {
70
+ $('#insta_hover-color-choose').val('#007aff');
71
+ }
72
+ });
73
+
74
+ // instagram link button toggle
75
+ $('input[name="insta_instalink"]').on('change', function () {
76
+ if (this.checked) {
77
+ $('#ig-section-igbtn').show('slow').addClass('active');
78
+ } else {
79
+ $('#ig-section-igbtn').hide('slow').removeClass('active');
80
+ }
81
+ });
82
+
83
+ // nav arrows color sync
84
+ $('#insta_car-navarrows-color-choose').on('change', function () {
85
+ $('input[name="insta_car-navarrows-color"]').val($(this).val());
86
+ });
87
+ $('input[name="insta_car-navarrows-color"]').on('change', function () {
88
+ var hvcolor = $(this).val();
89
+ if (hvcolor != '') {
90
+ var isOk = /^#[0-9A-F]{6}$/i.test(hvcolor);
91
+ if (!isOk) {
92
+ alert('please enter valid color code');
93
+ $(this).val('');
94
+ return;
95
+ }
96
+ $('#insta_car-navarrows-color-choose').val($(this).val());
97
+ } else {
98
+ $('#insta_car-navarrows-color-choose').val('#c32a67');
99
+ }
100
+ });
101
+
102
+
103
+ // button bgcolor sync
104
+ $('#insta_instalink-bgcolor-choose').on('change', function () {
105
+ $('input[name="insta_instalink-bgcolor"]').val($(this).val());
106
+ });
107
+ $('input[name="insta_instalink-bgcolor"]').on('change', function () {
108
+ var hvcolor = $(this).val();
109
+ if (hvcolor != '') {
110
+ var isOk = /^#[0-9A-F]{6}$/i.test(hvcolor);
111
+ if (!isOk) {
112
+ alert('please enter valid color code');
113
+ $(this).val('');
114
+ return;
115
+ }
116
+ $('#insta_instalink-bgcolor-choose').val($(this).val());
117
+ } else {
118
+ $('#insta_instalink-bgcolor-choose').val('#c32a67');
119
+ }
120
+ });
121
+
122
+ // button hover color sync
123
+ $('#insta_instalink-hvrcolor-choose').on('change', function () {
124
+ $('input[name="insta_instalink-hvrcolor"]').val($(this).val());
125
+ });
126
+ $('input[name="insta_instalink-hvrcolor"]').on('change', function () {
127
+ var hvcolor = $(this).val();
128
+ if (hvcolor != '') {
129
+ var isOk = /^#[0-9A-F]{6}$/i.test(hvcolor);
130
+ if (!isOk) {
131
+ alert('please enter valid color code');
132
+ $(this).val('');
133
+ return;
134
+ }
135
+ $('#insta_instalink-hvrcolor-choose').val($(this).val());
136
+ } else {
137
+ $('#insta_instalink-hvrcolor-choose').val('#da894a');
138
+ }
139
+ });
140
+
141
+ // Spinner
142
+ // -------------------------------------------------------------------------
143
+
144
+ function ig_change_spinner(link) {
145
+ if (link) {
146
+ if (!$('.ig_adv-setting .ig-spinner img').length) {
147
+ var img = '<img src="' + link + '" class="ig-spin" />';
148
+ $('.ig_adv-setting .ig-spinner').append(img);
149
+ } else {
150
+ $('.ig_adv-setting .ig-spinner img').attr('src', link);
151
+ }
152
+ $('.ig_adv-setting .ig-spinner .ig-spin').hide();
153
+ $('.ig_adv-setting .ig-spinner img').show();
154
+ } else {
155
+ $('.ig_adv-setting .ig-spinner .ig-spin').show();
156
+ $('.ig_adv-setting .ig-spinner img').remove();
157
+ }
158
+
159
+ }
160
+
161
+ var $igs_image_id = $('input[name="igs_spinner_image_id"]'),
162
+ $igs_reset = $('#igs-spinner_reset');
163
+
164
+ $('.ig_adv-setting input[name="igs-spinner"]').trigger('change');
165
+
166
+ $('.ig_adv-setting-toggle').on('click', function () {
167
+ $(this).toggleClass('active');
168
+ $('.ig_adv-setting').slideToggle();
169
+ });
170
+
171
+ $('#ig-adv-setting').on('submit', function (e) {
172
+ e.preventDefault();
173
+
174
+ var $form = $(this),
175
+ $spinner = $form.find('.spinner');
176
+
177
+ $.ajax({
178
+ url: ajaxurl,
179
+ type: 'post',
180
+ dataType: 'JSON',
181
+ data: {
182
+ action: 'igara_save_igadvs',
183
+ igs_flush: $form.find('input[name=igs_flush]').is(':checked') || 0,
184
+ igs_spinner_image_id: $form.find('input[name=igs_spinner_image_id]').val(),
185
+ ig_nonce: $form.find('input[name=ig_nonce]').val()
186
+ },
187
+ beforeSend: function () {
188
+ $spinner.addClass('is-active');
189
+ },
190
+ success: function (response) {
191
+ if (response.success) {
192
+ console.log(response.data);
193
+ }
194
+ },
195
+ complete: function () {
196
+ $spinner.removeClass('is-active');
197
+ },
198
+ error: function (jqXHR, textStatus) {
199
+ console.log(textStatus);
200
+ }
201
+ });
202
+ });
203
+
204
+ // reset spinner to default
205
+ $igs_reset.click(function () {
206
+ $igs_image_id.val('');
207
+ ig_change_spinner();
208
+ $(this).hide();
209
+ });
210
+
211
+ if ($igs_image_id.val() == '')
212
+ $igs_reset.hide();
213
+ if ($igs_image_id.data('misrc') != '')
214
+ ig_change_spinner($igs_image_id.data('misrc'));
215
+
216
+ // select media image
217
+ $('#igs-spinner_media_manager').click(function (e) {
218
+ e.preventDefault();
219
+ var image_frame;
220
+
221
+ if (image_frame) {
222
+ image_frame.open();
223
+ }
224
+ // Define image_frame as wp.media object
225
+ image_frame = wp.media({
226
+ title: 'Select Media',
227
+ multiple: false,
228
+ library: {
229
+ type: 'image',
230
+ }
231
+ });
232
+
233
+ image_frame.on('close', function () {
234
+ // On close, get selections and save to the hidden input
235
+ // plus other AJAX stuff to refresh the image preview
236
+ var selection = image_frame.state().get('selection');
237
+
238
+ if (selection.length) {
239
+
240
+ var gallery_ids = new Array();
241
+ var i = 0, attachment_url;
242
+
243
+ selection.each(function (attachment) {
244
+ gallery_ids[i] = attachment['id'];
245
+ attachment_url = attachment.attributes.url;
246
+ i++;
247
+ });
248
+ var ids = gallery_ids.join(",");
249
+ $igs_image_id.val(ids);
250
+ ig_change_spinner(attachment_url)
251
+ }
252
+
253
+ // toggle reset button
254
+ if ($igs_image_id.val() == '') {
255
+ $igs_reset.hide();
256
+ } else {
257
+ $igs_reset.show();
258
+ }
259
+
260
+ });
261
+
262
+ image_frame.on('open', function () {
263
+ // On open, get the id from the hidden input
264
+ // and select the appropiate images in the media manager
265
+ var selection = image_frame.state().get('selection');
266
+ var ids = $igs_image_id.val().split(',');
267
+
268
+ ids.forEach(function (id) {
269
+ attachment = wp.media.attachment(id);
270
+ attachment.fetch();
271
+ selection.add(attachment ? [attachment] : []);
272
+ });
273
+
274
+ });
275
+
276
+ image_frame.open();
277
+ });
278
+
279
+ // Generate token
280
+ // -------------------------------------------------------------------------
281
+ $('#ig-generate-token').on('submit', function (e) {
282
+ e.preventDefault();
283
+
284
+ var $form = $(this),
285
+ $spinner = $form.find('.spinner');
286
+
287
+ $.ajax({
288
+ url: ajaxurl,
289
+ type: 'post',
290
+ data: {
291
+ action: 'igara_generate_token',
292
+ ig_client_id: $form.find('input[name=ig_client_id]').val(),
293
+ ig_client_secret: $form.find('input[name=ig_client_secret]').val(),
294
+ ig_nonce: $form.find('input[name=ig_nonce]').val()
295
+ },
296
+ beforeSend: function () {
297
+ $spinner.addClass('is-active');
298
+ },
299
+ success: function (response) {
300
+ if (response.success) {
301
+ setTimeout(function () {
302
+ window.location.href = response.data;
303
+ }, 300);
304
+ } else {
305
+ alert(response.data);
306
+ }
307
+ },
308
+ complete: function () {
309
+ $spinner.removeClass('is-active');
310
+ },
311
+ error: function (jqXHR, textStatus) {
312
+ console.log(textStatus);
313
+ }
314
+ });
315
+ });
316
+
317
+ // Remove token
318
+ // -------------------------------------------------------------------------
319
+
320
+ $('#ig-remove-token').on('submit', function (e) {
321
+ e.preventDefault();
322
+
323
+ var c = confirm('Are you sure want to delete this Token?');
324
+
325
+ if (!c) {
326
+ return false;
327
+ }
328
+
329
+ var $form = $(this),
330
+ $spinner = $form.find('.spinner');
331
+
332
+ $.ajax({
333
+ url: ajaxurl,
334
+ type: 'post',
335
+ data: {
336
+ action: 'igara_remove_token',
337
+ ig_access_token: $form.find('input[name=ig_access_token]').val(),
338
+ ig_nonce: $form.find('input[name=ig_nonce]').val()
339
+ },
340
+ beforeSend: function () {
341
+ $spinner.addClass('is-active');
342
+ },
343
+ success: function (response) {
344
+ if (response.success) {
345
+ setTimeout(function () {
346
+ window.location.href = window.location.href;
347
+ }, 300);
348
+ } else {
349
+ alert(response.data);
350
+ }
351
+ },
352
+ complete: function () {
353
+ $spinner.removeClass('is-active');
354
+ },
355
+ error: function (jqXHR, textStatus) {
356
+ console.log(textStatus);
357
+ }
358
+ });
359
+
360
+ });
361
+
362
+ // Update token
363
+ // -------------------------------------------------------------------------
364
+
365
+ $('#ig-update-token').on('submit', function (e) {
366
+ e.preventDefault();
367
+
368
+ var $form = $(this),
369
+ $spinner = $form.find('.spinner');
370
+
371
+ $.ajax({
372
+ url: ajaxurl,
373
+ type: 'post',
374
+ data: {
375
+ action: 'igara_update_token',
376
+ ig_access_token: $form.find('input[name=ig_access_token]').val(),
377
+ ig_nonce: $form.find('input[name=ig_nonce]').val()
378
+ },
379
+ beforeSend: function () {
380
+ $spinner.addClass('is-active');
381
+ },
382
+ success: function (response) {
383
+ if (response.success) {
384
+ setTimeout(function () {
385
+ window.location.href = window.location.href;
386
+ }, 300);
387
+ } else {
388
+ alert(response.data);
389
+ }
390
+ },
391
+ complete: function () {
392
+ $spinner.removeClass('is-active');
393
+ },
394
+ error: function (jqXHR, textStatus) {
395
+ console.log(textStatus);
396
+ },
397
+ });
398
+ });
399
+
400
+ $('#ig-update-form').on('submit', function (e) {
401
+ e.preventDefault();
402
+
403
+ var $form = $(this),
404
+ $spinner = $form.find('.spinner');
405
+
406
+ $.ajax({
407
+ url: ajaxurl,
408
+ type: 'post',
409
+ data: $.param($form.serializeArrayAll()) + '&' + $.param({action: 'igara_update_form'}),
410
+ beforeSend: function () {
411
+ $spinner.addClass('is-active');
412
+ },
413
+ success: function (response) {
414
+ if (response.success) {
415
+ setTimeout(function () {
416
+ window.location.href = window.location.href;
417
+ }, 300);
418
+ } else {
419
+ alert(response.data);
420
+ }
421
+ },
422
+ complete: function () {
423
+ $spinner.removeClass('is-active');
424
+ },
425
+ error: function (jqXHR, textStatus) {
426
+ console.log(textStatus);
427
+ },
428
+ });
429
+ });
430
+
431
+ $('.ig-form-item-delete').on('click', function (e) {
432
+ e.preventDefault();
433
+
434
+ var c = confirm('Are you sure want to delete this item?');
435
+
436
+ if (!c) {
437
+ return false;
438
+ }
439
+
440
+ var $item = $(this),
441
+ $tr = $item.closest('tr'),
442
+ $spinner = $tr.find('.spinner');
443
+
444
+ $.ajax({
445
+ url: ajaxurl,
446
+ type: 'post',
447
+ data: {
448
+ action: 'igara_form_item_delete',
449
+ item_id: $item.data('item_id')
450
+ },
451
+ beforeSend: function () {
452
+ $spinner.addClass('is-active');
453
+ },
454
+ success: function (response) {
455
+ if (response.success) {
456
+ $tr.fadeOut();
457
+ } else {
458
+ alert(response.data);
459
+ }
460
+ },
461
+ complete: function () {
462
+ setTimeout(function () {
463
+ $tr.remove();
464
+ }, 600);
465
+ },
466
+ error: function (jqXHR, textStatus) {
467
+ console.log(textStatus);
468
+ },
469
+ });
470
+ });
471
+
472
+ });
473
+ })(jQuery);
assets/js/qligg-admin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(a){a.fn.serializeArrayAll=function(){var d={};var c=this.serializeArray();a.each(c,function(){if(d[this.name]!==undefined){if(!d[this.name].push){d[this.name]=[d[this.name]]}d[this.name].push(this.value||"")}else{d[this.name]=this.value||""}});var b=a("input[type=radio],input[type=checkbox]",this);a.each(b,function(){if(!d.hasOwnProperty(this.name)){d[this.name]=""}});return d};a(document).on("ready",function(){a('input[name="ig_select_from"]').on("change",function(){if(this.value=="username"){a("#ig-select-tag-wrap").hide(500,function(){a("#ig-select-username-wrap").show().addClass("active")}).removeClass("active")}else{a("#ig-select-username-wrap").hide(500,function(){a("#ig-select-tag-wrap").show().addClass("active")}).removeClass("active")}});a('input[name="ig_display_type"]').on("change",function(){if(this.value=="gallery"){a("#ig-section-as-carousel").hide(500,function(){a("#ig-section-as-galllery").show().addClass("active")}).removeClass("active")}else{if(this.value=="carousel"){a("#ig-section-as-galllery").hide(500,function(){a("#ig-section-as-carousel").show().addClass("active")}).removeClass("active")}}});a("#insta_hover-color-choose").on("change",function(){a('input[name="insta_hover-color"]').val(a(this).val())});a('input[name="insta_hover-color"]').on("change",function(){var f=a(this).val();if(f!=""){var e=/^#[0-9A-F]{6}$/i.test(f);if(!e){alert("please enter valid color code");a(this).val("");return}a("#insta_hover-color-choose").val(a(this).val())}else{a("#insta_hover-color-choose").val("#007aff")}});a('input[name="insta_instalink"]').on("change",function(){if(this.checked){a("#ig-section-igbtn").show("slow").addClass("active")}else{a("#ig-section-igbtn").hide("slow").removeClass("active")}});a("#insta_car-navarrows-color-choose").on("change",function(){a('input[name="insta_car-navarrows-color"]').val(a(this).val())});a('input[name="insta_car-navarrows-color"]').on("change",function(){var f=a(this).val();if(f!=""){var e=/^#[0-9A-F]{6}$/i.test(f);if(!e){alert("please enter valid color code");a(this).val("");return}a("#insta_car-navarrows-color-choose").val(a(this).val())}else{a("#insta_car-navarrows-color-choose").val("#c32a67")}});a("#insta_instalink-bgcolor-choose").on("change",function(){a('input[name="insta_instalink-bgcolor"]').val(a(this).val())});a('input[name="insta_instalink-bgcolor"]').on("change",function(){var f=a(this).val();if(f!=""){var e=/^#[0-9A-F]{6}$/i.test(f);if(!e){alert("please enter valid color code");a(this).val("");return}a("#insta_instalink-bgcolor-choose").val(a(this).val())}else{a("#insta_instalink-bgcolor-choose").val("#c32a67")}});a("#insta_instalink-hvrcolor-choose").on("change",function(){a('input[name="insta_instalink-hvrcolor"]').val(a(this).val())});a('input[name="insta_instalink-hvrcolor"]').on("change",function(){var f=a(this).val();if(f!=""){var e=/^#[0-9A-F]{6}$/i.test(f);if(!e){alert("please enter valid color code");a(this).val("");return}a("#insta_instalink-hvrcolor-choose").val(a(this).val())}else{a("#insta_instalink-hvrcolor-choose").val("#da894a")}});function c(f){if(f){if(!a(".ig_adv-setting .ig-spinner img").length){var e='<img src="'+f+'" class="ig-spin" />';a(".ig_adv-setting .ig-spinner").append(e)}else{a(".ig_adv-setting .ig-spinner img").attr("src",f)}a(".ig_adv-setting .ig-spinner .ig-spin").hide();a(".ig_adv-setting .ig-spinner img").show()}else{a(".ig_adv-setting .ig-spinner .ig-spin").show();a(".ig_adv-setting .ig-spinner img").remove()}}var d=a('input[name="igs_spinner_image_id"]'),b=a("#igs-spinner_reset");a('.ig_adv-setting input[name="igs-spinner"]').trigger("change");a(".ig_adv-setting-toggle").on("click",function(){a(this).toggleClass("active");a(".ig_adv-setting").slideToggle()});a("#ig-adv-setting").on("submit",function(h){h.preventDefault();var f=a(this),g=f.find(".spinner");a.ajax({url:ajaxurl,type:"post",dataType:"JSON",data:{action:"igara_save_igadvs",igs_flush:f.find("input[name=igs_flush]").is(":checked")||0,igs_spinner_image_id:f.find("input[name=igs_spinner_image_id]").val(),ig_nonce:f.find("input[name=ig_nonce]").val()},beforeSend:function(){g.addClass("is-active")},success:function(e){if(e.success){console.log(e.data)}},complete:function(){g.removeClass("is-active")},error:function(e,i){console.log(i)}})});b.click(function(){d.val("");c();a(this).hide()});if(d.val()==""){b.hide()}if(d.data("misrc")!=""){c(d.data("misrc"))}a("#igs-spinner_media_manager").click(function(g){g.preventDefault();var f;if(f){f.open()}f=wp.media({title:"Select Media",multiple:false,library:{type:"image",}});f.on("close",function(){var k=f.state().get("selection");if(k.length){var e=new Array();var h=0,l;k.each(function(i){e[h]=i.id;l=i.attributes.url;h++});var j=e.join(",");d.val(j);c(l)}if(d.val()==""){b.hide()}else{b.show()}});f.on("open",function(){var h=f.state().get("selection");var e=d.val().split(",");e.forEach(function(i){attachment=wp.media.attachment(i);attachment.fetch();h.add(attachment?[attachment]:[])})});f.open()});a("#ig-generate-token").on("submit",function(h){h.preventDefault();var f=a(this),g=f.find(".spinner");a.ajax({url:ajaxurl,type:"post",data:{action:"igara_generate_token",ig_client_id:f.find("input[name=ig_client_id]").val(),ig_client_secret:f.find("input[name=ig_client_secret]").val(),ig_nonce:f.find("input[name=ig_nonce]").val()},beforeSend:function(){g.addClass("is-active")},success:function(e){if(e.success){setTimeout(function(){window.location.href=e.data},300)}else{alert(e.data)}},complete:function(){g.removeClass("is-active")},error:function(e,i){console.log(i)}})});a("#ig-remove-token").on("submit",function(h){h.preventDefault();var i=confirm("Are you sure want to delete this Token?");if(!i){return false}var f=a(this),g=f.find(".spinner");a.ajax({url:ajaxurl,type:"post",data:{action:"igara_remove_token",ig_access_token:f.find("input[name=ig_access_token]").val(),ig_nonce:f.find("input[name=ig_nonce]").val()},beforeSend:function(){g.addClass("is-active")},success:function(e){if(e.success){setTimeout(function(){window.location.href=window.location.href},300)}else{alert(e.data)}},complete:function(){g.removeClass("is-active")},error:function(e,j){console.log(j)}})});a("#ig-update-token").on("submit",function(h){h.preventDefault();var f=a(this),g=f.find(".spinner");a.ajax({url:ajaxurl,type:"post",data:{action:"igara_update_token",ig_access_token:f.find("input[name=ig_access_token]").val(),ig_nonce:f.find("input[name=ig_nonce]").val()},beforeSend:function(){g.addClass("is-active")},success:function(e){if(e.success){setTimeout(function(){window.location.href=window.location.href},300)}else{alert(e.data)}},complete:function(){g.removeClass("is-active")},error:function(e,i){console.log(i)},})});a("#ig-update-form").on("submit",function(h){h.preventDefault();var f=a(this),g=f.find(".spinner");a.ajax({url:ajaxurl,type:"post",data:a.param(f.serializeArrayAll())+"&"+a.param({action:"igara_update_form"}),beforeSend:function(){g.addClass("is-active")},success:function(e){if(e.success){setTimeout(function(){window.location.href=window.location.href},300)}else{alert(e.data)}},complete:function(){g.removeClass("is-active")},error:function(e,i){console.log(i)},})});a(".ig-form-item-delete").on("click",function(i){i.preventDefault();var j=confirm("Are you sure want to delete this item?");if(!j){return false}var f=a(this),h=f.closest("tr"),g=h.find(".spinner");a.ajax({url:ajaxurl,type:"post",data:{action:"igara_form_item_delete",item_id:f.data("item_id")},beforeSend:function(){g.addClass("is-active")},success:function(e){if(e.success){h.fadeOut()}else{alert(e.data)}},complete:function(){setTimeout(function(){h.remove()},600)},error:function(e,k){console.log(k)},})})})})(jQuery);
assets/{insta-gallery.js → js/qligg.js} RENAMED
File without changes
assets/js/qligg.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(b){var g=0,c={};function i(){b(".ig-block").each(function(){var j=b(this);if(j.hasClass("ig-block-loaded")){return true}else{j.addClass("ig-block-loaded")}var k=j.find(".ig-spinner");var l=parseInt(j.data("insgalid"));if(!k.length||isNaN(l)){return}jQuery.ajax({url:insgalajax.ajax_url,type:"post",dataType:"JSON",data:{action:"load_ig_item",insgalid:l},beforeSend:function(){k.show()},success:function(m){if((typeof m=="undefined")||(m==null)||(m==0)){return}if((typeof m==="object")&&m.success){if(m.data){j.append(m.data);f(j)}}}}).fail(function(m,n){console.log(n)}).always(function(){k.hide();if(j.find(".instagallery-actions").length){k.prependTo(j.find(".instagallery-actions"))}})})}function f(j){if(!j.find("[data-igfs]").length){return}var k=j.find("[data-igfs]");var l=k.data("igfs");if(l.display_type=="gallery"){h(k,l)}else{if(l.display_type=="carousel"){d(k,l)}}}function h(n,o){var j=n.find(".ig-item img.instagallery-image");if(j.length){var l=j.length,k=0,m=0;j.load(function(){k++;if(m==0){m=jQuery(this).height()}if((jQuery(this).width()==jQuery(this).height())){m=jQuery(this).height()}if(k>=l){n.find(".ig-item img.instagallery-image").each(function(){var q=jQuery(this);var r=q.height();if(m<r){var p=(r-m)/2;jQuery(this).css("margin-top","-"+p+"px");jQuery(this).css("margin-bottom","-"+p+"px")}})}})}if(!o.popup){return}n.find(".ig-item a").magnificPopup({type:"image",mainClass:"mfp-with-zoom",zoom:{enabled:true,duration:300,easing:"ease-in-out",opener:function(p){return p.is("img")?p:p.find("img")}},gallery:{enabled:true},image:{titleSrc:function(p){return p.el.attr("data-title")+'<small><a href="'+p.el.attr("data-iplink")+'" target="blank" title="view on Instagram"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"><path style=" " d="M 5 3 C 3.898438 3 3 3.898438 3 5 L 3 19 C 3 20.101563 3.898438 21 5 21 L 19 21 C 20.101563 21 21 20.101563 21 19 L 21 13 L 19 11 L 19 19 L 5 19 L 5 5 L 13 5 L 11 3 Z M 14 3 L 16.65625 5.65625 L 9.15625 13.15625 L 10.84375 14.84375 L 18.34375 7.34375 L 21 10 L 21 3 Z "/>Link</svg></a></small>'}}})}function d(p,q){g++;var n=p.find("img.instacarousel-image");if(n.length){var m=n.length,l=0,o=0;n.load(function(){l++;if(o==0){o=jQuery(this).height()}if((jQuery(this).width()==jQuery(this).height())){o=jQuery(this).height()}if(l>=m){p.find("img.instacarousel-image").each(function(){var s=jQuery(this);var t=s.height();if(o<t){var r=(t-o)/2;jQuery(this).css("margin-top","-"+r+"px");jQuery(this).css("margin-bottom","-"+r+"px")}});c[g].update()}})}var k={loop:true,autoHeight:true,observer:true,observeParents:true,};if(q.autoplay){var j=q.autoplay_interval?parseInt(q.autoplay_interval):3000;k.autoplay={delay:j}}if(q.navarrows){k.navigation={nextEl:".swiper-button-next",prevEl:".swiper-button-prev",}}if(q.spacing){k.spaceBetween=20}k.slidesPerView=q.slidespv;k.breakpoints={};if(q.slidespv>3){k.breakpoints[1023]={slidesPerView:3,spaceBetween:20}}if(q.slidespv>2){k.breakpoints[767]={slidesPerView:2,spaceBetween:15}}k.breakpoints[420]={slidesPerView:1};c[g]=new Swiper(p,k);if(q.popup){p.find(".swiper-slide>a").magnificPopup({type:"image",mainClass:"mfp-with-zoom",zoom:{enabled:true,duration:300,easing:"ease-in-out",opener:function(r){return r.is("img")?r:r.find("img")}},gallery:{enabled:true},image:{titleSrc:function(r){return r.el.attr("data-title")+'<small><a href="'+r.el.attr("data-iplink")+'" target="blank" title="view on Instagram"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"><path style=" " d="M 5 3 C 3.898438 3 3 3.898438 3 5 L 3 19 C 3 20.101563 3.898438 21 5 21 L 19 21 C 20.101563 21 21 20.101563 21 19 L 21 13 L 19 11 L 19 19 L 5 19 L 5 5 L 13 5 L 11 3 Z M 14 3 L 16.65625 5.65625 L 9.15625 13.15625 L 10.84375 14.84375 L 18.34375 7.34375 L 21 10 L 21 3 Z "/>Link</svg></a></small>'}}})}}function a(k,n){var m=[].slice.call(k.find("img.ig-lazy"));var l=false;var j=function(){if(l===false){l=true;setTimeout(function(){m.forEach(function(o){if((o.getBoundingClientRect().top<=window.innerHeight&&o.getBoundingClientRect().bottom>=0)&&getComputedStyle(o).display!=="none"){o.src=o.dataset.src;o.classList.remove("lazy");m=m.filter(function(p){return p!==o});if(m.length===0){document.removeEventListener("scroll",j);document.removeEventListener("touchmove",j);window.removeEventListener("resize",j);window.removeEventListener("orientationchange",j)}}});l=false},200)}};document.addEventListener("scroll",j);document.addEventListener("touchmove",j);window.addEventListener("resize",j);window.addEventListener("orientationchange",j);j()}function e(){if(navigator.appVersion.indexOf("MSIE 8.")!=-1){document.body.className+=" instagal-ie-8"}if(navigator.appVersion.indexOf("MSIE 9.")!=-1){document.body.className+=" instagal-ie-9"}}if(b(".ig-block").length){i()}jQuery(function(j){i();e()})})(jQuery);
includes/AJAX.php ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if (!class_exists('QLIGG_AJAX')) {
7
+
8
+ class QLIGG_AJAX {
9
+
10
+ protected static $instance;
11
+
12
+ function admin_init() {
13
+
14
+ global $qligg, $qligg_api;
15
+
16
+ if (current_user_can('administrator') && isset($_REQUEST['igigresponse']) && isset($_REQUEST['code'])) {
17
+
18
+ if (empty($qligg['code']) || ($qligg['code'] !== $_REQUEST['code'])) {
19
+
20
+ if ($code = filter_var($_REQUEST['code'], FILTER_SANITIZE_STRING)) {
21
+
22
+ $url = admin_url('admin.php?page=qligg_token&igigresponse=1');
23
+
24
+ if ($token = $qligg_api->get_access_token($qligg['client_id'], $qligg['client_secret'], $url, $code)) {
25
+
26
+ $qligg['code'] = $code;
27
+ $qligg['access_token'] = $token;
28
+
29
+ qligg_save_options();
30
+ qligg_clear_transients();
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+
37
+ function save_igadvs() {
38
+
39
+ if (!empty($_REQUEST) && check_admin_referer('igara_save_igadvs', 'ig_nonce')) {
40
+
41
+ $igs_flush = isset($_REQUEST['igs_flush']) && $_REQUEST['igs_flush'] ? true : false;
42
+ $igs_spinner_image_id = isset($_REQUEST['igs_spinner_image_id']) ? absint($_REQUEST['igs_spinner_image_id']) : '';
43
+
44
+ $insta_gallery_setting = array(
45
+ 'igs_flush' => $igs_flush,
46
+ 'igs_spinner_image_id' => $igs_spinner_image_id
47
+ );
48
+
49
+ update_option('insta_gallery_setting', $insta_gallery_setting, false);
50
+
51
+ wp_send_json_success(__('Settings updated successfully', 'insta-gallery'));
52
+ }
53
+
54
+ wp_send_json_error(__('Invalid Request', 'insta-gallery'));
55
+ }
56
+
57
+ function generate_token() {
58
+
59
+ global $qligg, $qligg_api;
60
+
61
+ if (!empty($_REQUEST) && check_admin_referer('igara_generate_token', 'ig_nonce')) {
62
+
63
+ if (empty($_REQUEST['ig_client_id'])) {
64
+ wp_send_json_error(__('Please enter valid Client ID', 'insta-gallery'));
65
+ }
66
+ if (empty($_REQUEST['ig_client_secret'])) {
67
+ wp_send_json_error(__('Please enter valid Client Secret', 'insta-gallery'));
68
+ }
69
+
70
+ $ig_client_id = filter_var($_REQUEST['ig_client_id'], FILTER_SANITIZE_STRING);
71
+
72
+ $ig_client_secret = filter_var($_REQUEST['ig_client_secret'], FILTER_SANITIZE_STRING);
73
+
74
+ $qligg['client_id'] = $ig_client_id;
75
+ $qligg['client_secret'] = $ig_client_secret;
76
+
77
+ qligg_save_options();
78
+
79
+ wp_send_json_success($qligg_api->get_access_code($ig_client_id));
80
+ }
81
+
82
+ wp_send_json_error(__('Invalid Request', 'insta-gallery'));
83
+ }
84
+
85
+ function remove_token() {
86
+
87
+ global $qligg;
88
+
89
+ if (!empty($_REQUEST) && check_admin_referer('igara_remove_token', 'ig_nonce')) {
90
+
91
+ $qligg['access_token'] = '';
92
+ $qligg['client_secret'] = '';
93
+
94
+ qligg_save_options();
95
+
96
+ wp_send_json_success(__('Token removed successfully', 'insta-gallery'));
97
+ }
98
+
99
+ wp_send_json_error(__('Invalid Request', 'insta-gallery'));
100
+ }
101
+
102
+ function update_token() {
103
+
104
+ global $qligg, $qligg_api;
105
+
106
+ if (!empty($_REQUEST) && check_admin_referer('igara_update_token', 'ig_nonce')) {
107
+
108
+ $ig_access_token = filter_var($_REQUEST['ig_access_token'], FILTER_SANITIZE_STRING);
109
+
110
+ if (!$qligg_api->validate_token($ig_access_token)) {
111
+ wp_send_json_error($qligg_api->get_message());
112
+ }
113
+
114
+ $qligg['access_token'] = $ig_access_token;
115
+
116
+ qligg_save_options();
117
+
118
+ qligg_clear_transients();
119
+
120
+ wp_send_json_success(__('Token removed successfully', 'insta-gallery'));
121
+ }
122
+
123
+ wp_send_json_error(__('Invalid Request', 'insta-gallery'));
124
+ }
125
+
126
+ function update_form() {
127
+
128
+ global $qligg, $qligg_api;
129
+
130
+ if (!empty($_REQUEST) && check_admin_referer('igara_update_form', 'ig_nonce')) {
131
+
132
+ $item_id = isset($_REQUEST['item_id']) ? absint($_REQUEST['item_id']) : 0;
133
+
134
+ if (empty($item_type = $_REQUEST['ig_select_from'])) {
135
+ wp_send_json_error(__('Select gallery item type', 'insta-gallery'));
136
+ }
137
+ if ($item_type == 'username' && empty($_REQUEST['insta_user'])) {
138
+ wp_send_json_error(__('Username is empty', 'insta-gallery'));
139
+ }
140
+ if ($item_type == 'tag' && empty($_REQUEST['insta_tag'])) {
141
+ wp_send_json_error(__('Tag is empty', 'insta-gallery'));
142
+ }
143
+
144
+ $instagram_item = array();
145
+
146
+ $instagram_item['ig_select_from'] = $_REQUEST['ig_select_from'];
147
+ $instagram_item['insta_user'] = $_REQUEST['insta_user'];
148
+ $instagram_item['insta_tag'] = $_REQUEST['insta_tag'];
149
+ $instagram_item['insta_user-limit'] = $_REQUEST['insta_user-limit'];
150
+ $instagram_item['insta_tag-limit'] = $_REQUEST['insta_tag-limit'];
151
+ $instagram_item['ig_display_type'] = $_REQUEST['ig_display_type'];
152
+ $instagram_item['insta_gal-cols'] = $_REQUEST['insta_gal-cols'];
153
+ $instagram_item['insta_gal-hover'] = @$_REQUEST['insta_gal-hover'];
154
+ $instagram_item['insta_gal-spacing'] = @$_REQUEST['insta_gal-spacing'];
155
+ $instagram_item['insta_instalink'] = @$_REQUEST['insta_instalink'];
156
+ $instagram_item['insta_instalink-text'] = trim(esc_html(@$_REQUEST['insta_instalink-text']));
157
+ $instagram_item['insta_instalink-bgcolor'] = sanitize_text_field(@$_REQUEST['insta_instalink-bgcolor']);
158
+ $instagram_item['insta_instalink-hvrcolor'] = sanitize_text_field(@$_REQUEST['insta_instalink-hvrcolor']);
159
+ $instagram_item['insta_car-slidespv'] = $_REQUEST['insta_car-slidespv'];
160
+ $instagram_item['insta_car-autoplay'] = isset($_REQUEST['insta_car-autoplay']) ? $_REQUEST['insta_car-autoplay'] : 0;
161
+ $instagram_item['insta_car-autoplay-interval'] = $_REQUEST['insta_car-autoplay-interval'];
162
+ $instagram_item['insta_car-navarrows'] = @$_REQUEST['insta_car-navarrows'];
163
+ $instagram_item['insta_car-navarrows-color'] = sanitize_text_field(@$_REQUEST['insta_car-navarrows-color']);
164
+ $instagram_item['insta_car-dots'] = @$_REQUEST['insta_car-dots'];
165
+ $instagram_item['insta_car-spacing'] = @$_REQUEST['insta_car-spacing'];
166
+ $instagram_item['insta_thumb-size'] = @$_REQUEST['insta_thumb-size'];
167
+ $instagram_item['insta_hover-color'] = sanitize_text_field(@$_REQUEST['insta_hover-color']);
168
+ $instagram_item['insta_gal-popup'] = @$_REQUEST['insta_gal-popup'];
169
+ $instagram_item['insta_popup-caption'] = @$_REQUEST['insta_popup-caption'];
170
+ $instagram_item['insta_likes'] = @$_REQUEST['insta_likes'];
171
+ $instagram_item['insta_comments'] = @$_REQUEST['insta_comments'];
172
+
173
+ // removing @, # and trimming input
174
+ // ---------------------------------------------------------------------
175
+ $instagram_item['insta_user'] = trim($instagram_item['insta_user']);
176
+ $instagram_item['insta_tag'] = trim($instagram_item['insta_tag']);
177
+ $instagram_item['insta_user'] = str_replace('@', '', $instagram_item['insta_user']);
178
+ $instagram_item['insta_user'] = str_replace('#', '', $instagram_item['insta_user']);
179
+ $instagram_item['insta_tag'] = str_replace('@', '', $instagram_item['insta_tag']);
180
+ $instagram_item['insta_tag'] = str_replace('#', '', $instagram_item['insta_tag']);
181
+
182
+ $instagram_items = get_option('insta_gallery_items', array());
183
+
184
+ if ($item_id > 0) {
185
+ $instagram_items[$item_id] = $instagram_item;
186
+ } else {
187
+ $instagram_items[] = $instagram_item;
188
+ if (isset($instagram_items[0])) {
189
+ $instagram_items[] = $instagram_items[0];
190
+ unset($instagram_items[0]);
191
+ }
192
+ }
193
+
194
+ update_option('insta_gallery_items', $instagram_items);
195
+
196
+ qligg_clear_transients('instagallery_user_feed');
197
+
198
+ wp_send_json_success(__('Gallery item updated successfully', 'insta-gallery'));
199
+ }
200
+
201
+ wp_send_json_error(__('Invalid Request', 'insta-gallery'));
202
+ }
203
+
204
+ function form_item_delete() {
205
+
206
+ if (isset($_REQUEST['item_id'])) {
207
+
208
+ $instagram_items = get_option('insta_gallery_items');
209
+
210
+ $item_id = absint($_REQUEST['item_id']);
211
+
212
+ if (isset($instagram_items[$item_id])) {
213
+
214
+ unset($instagram_items[$item_id]);
215
+
216
+ update_option('insta_gallery_items', $instagram_items, false);
217
+ }
218
+
219
+ wp_send_json_success(__('Gallery item deleted successfully.', 'insta-gallery'));
220
+ }
221
+
222
+ wp_send_json_error(__('Invalid Request', 'insta-gallery'));
223
+ }
224
+
225
+ function init() {
226
+ // Settings
227
+ add_action('wp_ajax_igara_save_igadvs', array($this, 'save_igadvs'));
228
+
229
+ // Token
230
+ // -----------------------------------------------------------------------
231
+ add_action('wp_ajax_igara_update_token', array($this, 'update_token'));
232
+ add_action('wp_ajax_igara_generate_token', array($this, 'generate_token'));
233
+ add_action('wp_ajax_igara_remove_token', array($this, 'remove_token'));
234
+
235
+ // Settings
236
+ // -----------------------------------------------------------------------
237
+ add_action('wp_ajax_igara_update_form', array($this, 'update_form'));
238
+ add_action('wp_ajax_igara_form_item_delete', array($this, 'form_item_delete'));
239
+
240
+
241
+ add_action('admin_init', array($this, 'admin_init'));
242
+ }
243
+
244
+ public static function instance() {
245
+ if (!isset(self::$instance)) {
246
+ self::$instance = new self();
247
+ self::$instance->init();
248
+ }
249
+ return self::$instance;
250
+ }
251
+
252
+ }
253
+
254
+ QLIGG_AJAX::instance();
255
+ }
includes/API.php ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH'))
4
+ exit;
5
+
6
+ class QLIGG_API {
7
+
8
+ protected $instagram;
9
+ public $message;
10
+ private $limit = 50;
11
+ private $api_url = 'https://api.instagram.com/v1/users/self';
12
+ private $token_url = 'https://api.instagram.com/oauth';
13
+
14
+ // API generate code generation url
15
+ // ---------------------------------------------------------------------------
16
+ public function get_access_code($client_id = null) {
17
+
18
+ $args = array(
19
+ 'client_id' => $client_id,
20
+ 'response_type' => 'code',
21
+ 'scope' => 'public_content',
22
+ 'redirect_uri' => urlencode(admin_url('admin.php?page=qligg_token&igigresponse=1'))
23
+ );
24
+
25
+ return add_query_arg($args, "{$this->token_url}/authorize/");
26
+ }
27
+
28
+ // API call to get access token using authorization code
29
+ // ---------------------------------------------------------------------------
30
+ public function get_access_token($client_id, $client_secret, $redirect_uri, $code) {
31
+
32
+ $args = array(
33
+ 'body' => array(
34
+ 'client_id' => $client_id,
35
+ 'client_secret' => $client_secret,
36
+ 'redirect_uri' => $redirect_uri,
37
+ 'code' => $code,
38
+ 'grant_type' => 'authorization_code',
39
+ 'scope' => 'public_content'
40
+ ));
41
+
42
+ $response = $this->validate_response(wp_remote_post("{$this->token_url}/access_token", $args));
43
+
44
+ if (isset($response['access_token'])) {
45
+ return $response['access_token'];
46
+ }
47
+
48
+ return false;
49
+ }
50
+
51
+ // API call to get user profile information using access token
52
+ // ---------------------------------------------------------------------------
53
+ public function get_user_profile_info($access_token) {
54
+
55
+ $args = array(
56
+ 'access_token' => $access_token
57
+ );
58
+
59
+ $response = $this->remote_get($this->api_url, $args);
60
+
61
+ if (empty($response)) {
62
+ return false;
63
+ }
64
+
65
+ if (isset($response['meta']['code']) && ($response['meta']['code'] != 200) && isset($response['meta']['error_message'])) {
66
+ $this->message = $response['meta']['error_message'];
67
+
68
+ //error_log($this->message);
69
+ return false;
70
+ }
71
+
72
+ return isset($response['data']) ? $response['data'] : false;
73
+ }
74
+
75
+ // API call to check if access token is valid
76
+ // ---------------------------------------------------------------------------
77
+ public function validate_token($access_token) {
78
+
79
+ $args = array(
80
+ 'access_token' => $access_token
81
+ );
82
+
83
+ $response = $this->remote_get($this->api_url, $args);
84
+
85
+ if (isset($response['meta']['code']) && ($response['meta']['code'] != 200) && isset($response['meta']['error_message'])) {
86
+
87
+ $this->message = $response['meta']['error_message'];
88
+
89
+ return false;
90
+ }
91
+
92
+ return true;
93
+ }
94
+
95
+ // API call to get user feed using access token
96
+ // ---------------------------------------------------------------------------
97
+ public function get_user_media($access_token, $count = 30) {
98
+
99
+ $args = array(
100
+ 'access_token' => $access_token,
101
+ 'count' => $count
102
+ );
103
+
104
+ $url = add_query_arg($args, trailingslashit("{$this->api_url}/media/recent/"));
105
+
106
+ $response = $this->remote_get($url);
107
+
108
+ if (empty($response)) {
109
+ return false;
110
+ }
111
+
112
+ if (isset($response['meta']['code']) && ($response['meta']['code'] != 200) && isset($response['meta']['error_message'])) {
113
+ $this->message = $response['meta']['error_message'];
114
+ return false;
115
+ }
116
+
117
+ if (!isset($response['data'])) {
118
+ return false;
119
+ }
120
+
121
+ return $this->setup_user_media($response['data']);
122
+ }
123
+
124
+ protected function setup_user_media($data) {
125
+
126
+ $instagram_items = array();
127
+
128
+ if (is_array($data) && !empty($data)) {
129
+ foreach ($data as $id => $item) {
130
+ $instagram_items[] = array(
131
+ 'img_standard' => $item['images']['standard_resolution']['url'],
132
+ 'img_low' => $item['images']['low_resolution']['url'],
133
+ 'img_thumb' => $item['images']['thumbnail']['url'],
134
+ 'likes' => $item['likes']['count'],
135
+ 'comments' => $item['comments']['count'],
136
+ 'caption' => '',
137
+ 'code' => '',
138
+ 'link' => $item['link'],
139
+ 'type' => $item['type'],
140
+ 'owner_id' => ''
141
+ );
142
+ }
143
+ }
144
+
145
+ return $instagram_items;
146
+ }
147
+
148
+ // Tag name and return items list array
149
+ // ---------------------------------------------------------------------------
150
+ public function get_tag_items($tag = null) {
151
+
152
+ if ($tag) {
153
+
154
+ $tag = urlencode((string) $tag);
155
+
156
+ $url = "https://www.instagram.com/explore/tags/{$tag}/?__a=1";
157
+
158
+ $args = array(
159
+ '__a' => 1
160
+ );
161
+
162
+ $response = $this->remote_get($url, $args);
163
+
164
+ $tag_items = array();
165
+
166
+ // API updated on Jan 03 17
167
+ // -----------------------------------------------------------------------
168
+ if (isset($response['graphql']['hashtag']['edge_hashtag_to_media']['edges'])) {
169
+
170
+ $instagram_items = $response['graphql']['hashtag']['edge_hashtag_to_media']['edges'];
171
+
172
+ if (count($instagram_items)) {
173
+
174
+ $instagram_items = array_slice($instagram_items, 0, $this->limit);
175
+
176
+
177
+ foreach ($instagram_items as $res) {
178
+
179
+ // Its to check if this API have required variables
180
+ // -----------------------------------------------------------------
181
+
182
+ if (!isset($res['node']['display_url'])) {
183
+ continue;
184
+ }
185
+
186
+ $type = 'image';
187
+
188
+ if (isset($res['node']['is_video']) && (true === $res['node']['is_video'])) {
189
+ $type = 'video';
190
+ }
191
+
192
+ $caption = isset($res['node']['edge_media_to_caption']['edges'][0]['node']['text']) ? htmlspecialchars($res['node']['edge_media_to_caption']['edges'][0]['node']['text']) : '';
193
+
194
+ $tag_items[] = array(
195
+ 'img_standard' => $res['node']['display_url'],
196
+ 'img_low' => $res['node']['thumbnail_src'],
197
+ 'img_thumb' => $res['node']['thumbnail_resources'][0]['src'],
198
+ 'likes' => $res['node']['edge_liked_by']['count'],
199
+ 'comments' => $res['node']['edge_media_to_comment']['count'],
200
+ 'caption' => $caption,
201
+ 'code' => $res['node']['shortcode'],
202
+ 'type' => $type,
203
+ 'owner_id' => $res['node']['owner']['id']
204
+ );
205
+ }
206
+ }
207
+ }
208
+
209
+ return $tag_items;
210
+ }
211
+
212
+ $this->message = __('Please provide a valid #tag', 'insta-gallery');
213
+ }
214
+
215
+ function validate_response($json = null) {
216
+
217
+ if (!($response = json_decode(wp_remote_retrieve_body($json), true)) || 200 !== wp_remote_retrieve_response_code($json)) {
218
+
219
+ if (isset($response['meta']['error_message'])) {
220
+ $this->message = $response['meta']['error_message'];
221
+ return array(
222
+ 'error' => 1,
223
+ 'message' => $this->message
224
+ );
225
+ }
226
+
227
+ if (isset($response['error_message'])) {
228
+ $this->message = $response['error_message'];
229
+ return array(
230
+ 'error' => 1,
231
+ 'message' => $this->message
232
+ );
233
+ }
234
+
235
+ if (is_wp_error($json)) {
236
+ $response = array(
237
+ 'error' => 1,
238
+ 'message' => $json->get_error_message()
239
+ );
240
+ } else {
241
+ $response = array(
242
+ 'error' => 1,
243
+ 'message' => __('Unknow error occurred, please try again', 'insta-gallery')
244
+ );
245
+ }
246
+ }
247
+
248
+ return $response;
249
+ }
250
+
251
+ public function remote_get($url = null, $args = array()) {
252
+
253
+ $url = add_query_arg($args, trailingslashit($url));
254
+
255
+ $response = $this->validate_response(wp_remote_get($url, array('timeout' => 29)));
256
+
257
+ return $response;
258
+ }
259
+
260
+ // Return message
261
+ // ---------------------------------------------------------------------------
262
+ public function get_message() {
263
+ return $this->message;
264
+ }
265
+
266
+ }
includes/defaults.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if (!class_exists('QLIGG_Options')) {
7
+
8
+ class QLIGG_Options {
9
+
10
+ protected static $instance;
11
+ //public $defaults;
12
+
13
+ /*function defaults() {
14
+ $this->defaults = array(
15
+ );
16
+
17
+ return $this->defaults;
18
+ }*/
19
+
20
+ function options() {
21
+
22
+ global $qligg;
23
+
24
+ //$options = get_option(QLIGG_DOMAIN);
25
+ //$qligg = $this->wp_parse_args($options, $this->defaults());
26
+
27
+ $option = get_option('insta_gallery_iac');
28
+
29
+ if ($option && is_array($option)) {
30
+ $qligg = array_map(function ($value) {
31
+ return base64_decode($value);
32
+ }, $option);
33
+ }
34
+ }
35
+
36
+ /* function wp_parse_args(&$a, $b) {
37
+ $a = (array) $a;
38
+ $b = (array) $b;
39
+ $result = $b;
40
+ foreach ($a as $k => &$v) {
41
+ if (is_array($v) && isset($result[$k])) {
42
+ $result[$k] = $this->wp_parse_args($v, $result[$k]);
43
+ } else {
44
+ $result[$k] = $v;
45
+ }
46
+ }
47
+ return $result;
48
+ } */
49
+
50
+ function init() {
51
+ add_action('init', array($this, 'options'));
52
+ }
53
+
54
+ public static function instance() {
55
+ if (!isset(self::$instance)) {
56
+ self::$instance = new self();
57
+ //self::$instance->defaults();
58
+ self::$instance->init();
59
+ }
60
+ return self::$instance;
61
+ }
62
+
63
+ }
64
+
65
+ QLIGG_Options::instance();
66
+ }
includes/frontend.php ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if (!class_exists('QLIGG_Frontend')) {
7
+
8
+ class QLIGG_Frontend {
9
+
10
+ protected static $instance;
11
+
12
+ function add_frontend_js() {
13
+
14
+ wp_enqueue_style('insta-gallery', plugins_url('/assets/css/qligg.min.css', QLIGG_PLUGIN_FILE), null, QLIGG_PLUGIN_VERSION);
15
+ wp_enqueue_script('insta-gallery', plugins_url('/assets/js/qligg.min.js', QLIGG_PLUGIN_FILE), array('jquery'), QLIGG_PLUGIN_VERSION, true);
16
+ wp_localize_script('insta-gallery', 'insgalajax', array(
17
+ 'ajax_url' => admin_url('admin-ajax.php')
18
+ ));
19
+
20
+ wp_enqueue_script('swiper', plugins_url('/assets/swiper/swiper.min.js', QLIGG_PLUGIN_FILE), array('jquery'), null, true);
21
+
22
+ wp_enqueue_script('magnific-popup', plugins_url('/assets/magnific-popup/jquery.magnific-popup.min.js', QLIGG_PLUGIN_FILE), array('jquery'), null, true);
23
+
24
+ // WP 5 FIX
25
+ //wp_enqueue_script('insta-gallery');
26
+ //wp_enqueue_script('swiper');
27
+ //wp_enqueue_script('magnific-popup');
28
+ }
29
+
30
+ function load_ig_item() {
31
+ if (!isset($_REQUEST['insgalid'])) {
32
+ return;
33
+ }
34
+ $gid = (int) $_REQUEST['insgalid'];
35
+ $InstaGalleryItems = get_option('insta_gallery_items');
36
+ if (!isset($InstaGalleryItems[$gid])) {
37
+ return;
38
+ }
39
+ $IGItem = $InstaGalleryItems[$gid];
40
+ $IGItem['gid'] = $gid; // push gallery ID for later use
41
+ global $qligg, $qligg_api;
42
+
43
+ // validating options
44
+ if (empty($IGItem['ig_select_from'])) {
45
+ return;
46
+ }
47
+ // backward compatibility v1.5.11
48
+ if (!empty($IGItem['insta_limit'])) {
49
+ $IGItem['insta_user-limit'] = (int) $IGItem['insta_limit'];
50
+ $IGItem['insta_tag-limit'] = (int) $IGItem['insta_limit'];
51
+ } else {
52
+ $IGItem['insta_user-limit'] = (int) $IGItem['insta_user-limit'];
53
+ $IGItem['insta_tag-limit'] = (int) $IGItem['insta_tag-limit'];
54
+ }
55
+ $IGItem['insta_gal-hover'] = filter_var($IGItem['insta_gal-hover'], FILTER_VALIDATE_BOOLEAN);
56
+ $IGItem['insta_gal-spacing'] = filter_var($IGItem['insta_gal-spacing'], FILTER_VALIDATE_BOOLEAN);
57
+
58
+ $IGItem['insta_instalink'] = filter_var($IGItem['insta_instalink'], FILTER_VALIDATE_BOOLEAN);
59
+ $IGItem['insta_instalink-text'] = empty($IGItem['insta_instalink-text']) ? __('View on Instagram', 'insta-gallery') : $IGItem['insta_instalink-text'];
60
+ $IGItem['insta_instalink-bgcolor'] = @$IGItem['insta_instalink-bgcolor'];
61
+ $IGItem['insta_instalink-hvrcolor'] = @$IGItem['insta_instalink-hvrcolor'];
62
+
63
+ $IGItem['insta_car-autoplay'] = isset($IGItem['insta_car-autoplay']) ? filter_var($IGItem['insta_car-autoplay'], FILTER_VALIDATE_BOOLEAN) : true;
64
+ $IGItem['insta_car-navarrows'] = @filter_var($IGItem['insta_car-navarrows'], FILTER_VALIDATE_BOOLEAN);
65
+ $IGItem['insta_car-navarrows-color'] = @$IGItem['insta_car-navarrows-color'];
66
+ $IGItem['insta_car-dots'] = @filter_var($IGItem['insta_car-dots'], FILTER_VALIDATE_BOOLEAN);
67
+ $IGItem['insta_car-spacing'] = @filter_var($IGItem['insta_car-spacing'], FILTER_VALIDATE_BOOLEAN);
68
+
69
+ $IGItem['insta_thumb-size'] = empty($IGItem['insta_thumb-size']) ? 'medium' : $IGItem['insta_thumb-size'];
70
+ $IGItem['insta_hover-color'] = @$IGItem['insta_hover-color'];
71
+ $IGItem['insta_gal-popup'] = filter_var($IGItem['insta_gal-popup'], FILTER_VALIDATE_BOOLEAN);
72
+ $IGItem['insta_popup-caption'] = filter_var($IGItem['insta_popup-caption'], FILTER_VALIDATE_BOOLEAN);
73
+ $IGItem['insta_likes'] = @filter_var($IGItem['insta_likes'], FILTER_VALIDATE_BOOLEAN);
74
+ $IGItem['insta_comments'] = @filter_var($IGItem['insta_comments'], FILTER_VALIDATE_BOOLEAN);
75
+
76
+ // continue to results
77
+ $results = '';
78
+ $instaItems = '';
79
+ if ($IGItem['ig_select_from'] == 'username') { // get from username
80
+ $instaItems = qligg_get_user_items($IGItem);
81
+ } else { // continue to tag
82
+ $instaItems = qligg_get_tag_items($IGItem);
83
+ }
84
+
85
+ if (!empty($instaItems)) {
86
+
87
+ $insta_source = ($IGItem['ig_select_from'] == 'username') ? 'user_' . $IGItem['insta_user'] : 'tag_' . $IGItem['insta_tag'];
88
+
89
+ $instaUrl = 'https://www.instagram.com/';
90
+ $instaItemLimit = 12;
91
+ if ($IGItem['ig_select_from'] == 'username') {
92
+ $instaUrl .= $IGItem['insta_user'];
93
+ if (!empty($IGItem['insta_user-limit'])) {
94
+ $instaItemLimit = (int) $IGItem['insta_user-limit'];
95
+ }
96
+ } else {
97
+ $instaUrl .= 'explore/tags/' . $IGItem['insta_tag'];
98
+ if (!empty($IGItem['insta_tag-limit'])) {
99
+ $instaItemLimit = (int) $IGItem['insta_tag-limit'];
100
+ }
101
+ }
102
+
103
+
104
+
105
+ if ($IGItem['ig_display_type'] == 'gallery') {
106
+ ob_start();
107
+ // include (QLIGG_PLUGIN_DIR . 'templates/gallery.php');
108
+ include $this->template_path('gallery.php');
109
+ $results .= ob_get_clean();
110
+
111
+ // output dynamic CSS to head
112
+ $IGBSelector = '#ig-block-' . $IGItem['gid']; // Gallery block selector
113
+ $ig_dstyle = '';
114
+ if (!empty($IGItem['insta_hover-color'])) {
115
+ $ig_dstyle .= $IGBSelector . ' .ig-item.ighover a:hover:after, ' . $IGBSelector . ' .swiper-slide a:hover:after {background: ' . $IGItem['insta_hover-color'] . ';}';
116
+ }
117
+ if (!empty($IGItem['insta_instalink-bgcolor'])) {
118
+ $ig_dstyle .= $IGBSelector . ' .instagallery-actions .igact-instalink {background: ' . $IGItem['insta_instalink-bgcolor'] . ';}';
119
+ }
120
+ if (!empty($IGItem['insta_instalink-hvrcolor'])) {
121
+ $ig_dstyle .= $IGBSelector . ' .instagallery-actions .igact-instalink:hover {background: ' . $IGItem['insta_instalink-hvrcolor'] . ';}';
122
+ }
123
+ if (!empty($ig_dstyle)) {
124
+ $results .= "<script>jQuery(function(){jQuery('head').append('<style>$ig_dstyle</style>');});</script>";
125
+ }
126
+ } else if ($IGItem['ig_display_type'] == 'carousel') {
127
+ ob_start();
128
+ // include (QLIGG_PLUGIN_DIR . 'templates/carousel.php');
129
+ include $this->template_path('carousel.php');
130
+ $results .= ob_get_clean();
131
+
132
+ // output dynamic CSS to head
133
+ $IGBSelector = '#ig-block-' . $IGItem['gid']; // Gallery block selector
134
+ $ig_dstyle = '';
135
+ if (!empty($IGItem['insta_car-navarrows-color'])) {
136
+ $ig_dstyle .= $IGBSelector . ' .instacarousel .swiper-button-next svg, ' . $IGBSelector . ' .instacarousel .swiper-button-prev svg {fill: ' . $IGItem['insta_car-navarrows-color'] . ';}';
137
+ }
138
+ if (!empty($IGItem['insta_hover-color'])) {
139
+ $ig_dstyle .= $IGBSelector . ' .ig-item.ighover a:hover:after, ' . $IGBSelector . ' .swiper-slide a:hover:after {background: ' . $IGItem['insta_hover-color'] . ';}';
140
+ }
141
+ if (!empty($IGItem['insta_instalink-bgcolor'])) {
142
+ $ig_dstyle .= $IGBSelector . ' .instagallery-actions .igact-instalink {background: ' . $IGItem['insta_instalink-bgcolor'] . ';}';
143
+ }
144
+ if (!empty($IGItem['insta_instalink-hvrcolor'])) {
145
+ $ig_dstyle .= $IGBSelector . ' .instagallery-actions .igact-instalink:hover {background: ' . $IGItem['insta_instalink-hvrcolor'] . ';}';
146
+ }
147
+ if (!empty($ig_dstyle)) {
148
+ $results .= "<script>jQuery(function(){jQuery('head').append('<style>$ig_dstyle</style>');});</script>";
149
+ }
150
+ } else {
151
+ if (current_user_can('administrator')) {
152
+ $results .= '<div class="ig-no-items-msg"><p class="ig_front_msg-color">' . __('ERROR: invalid display type, please check gallery settings.', 'insta-gallery') . '</p></div>';
153
+ }
154
+ }
155
+ } else {
156
+ if (current_user_can('administrator')) {
157
+ $results .= '<div class="ig-no-items-msg"><p class="ig_front_msg-color"><strong>Admin Notice:</strong> unable to get results.</p>';
158
+ $results .= '<ul>';
159
+ if (($IGItem['ig_select_from'] == 'username') && empty($qligg['access_token'])) {
160
+ $results .= '<li>' . __('please update Instagram Access Token in plugin setting.', 'insta-gallery') . '</li>';
161
+ }
162
+ $igsMsg = $qligg_api->get_message();
163
+ if (!empty($igsMsg)) {
164
+ $results .= '<li>' . $igsMsg . '</li>';
165
+ }
166
+ $results .= '</ul></div>';
167
+ }
168
+ }
169
+ // echo $results;
170
+ /*
171
+ * $result = array(
172
+ * 'igsuccess' => true,
173
+ * 'result' => $results
174
+ * );
175
+ * echo json_encode($result);
176
+ * die();
177
+ */
178
+ if (isset($_REQUEST['insgal_ajax']) && !$_REQUEST['insgal_ajax']) {
179
+ return $results;
180
+ } else {
181
+ wp_send_json_success($results);
182
+ }
183
+ }
184
+
185
+ function do_shortcode($atts, $content = null) {
186
+ if (empty($atts) || !isset($atts['id'])) {
187
+ return;
188
+ }
189
+ // update/validate attributes
190
+ $atts = shortcode_atts(array(
191
+ 'id' => 0,
192
+ 'ajax' => true
193
+ ), $atts);
194
+ $atts['ajax'] = filter_var($atts['ajax'], FILTER_VALIDATE_BOOLEAN);
195
+
196
+ //disable ajax loading from frontend request
197
+ if (isset($_GET['insgal_ajax']) && ($_GET['insgal_ajax'] == 'false')) {
198
+ $atts['ajax'] = false;
199
+ }
200
+
201
+ $gid = (int) $atts['id'];
202
+ $InstaGalleryItems = get_option('insta_gallery_items');
203
+ $InstaGallerySetting = get_option('insta_gallery_setting');
204
+ if (!isset($InstaGalleryItems[$gid])) {
205
+ return;
206
+ }
207
+
208
+ $IGItem = $InstaGalleryItems[$gid];
209
+
210
+ wp_enqueue_script('insta-gallery');
211
+ if ($IGItem['ig_display_type'] == 'gallery') {
212
+ wp_enqueue_script('magnific-popup');
213
+ } else if ($IGItem['ig_display_type'] == 'carousel') {
214
+ wp_enqueue_script('swiper');
215
+ wp_enqueue_script('magnific-popup');
216
+ }
217
+
218
+ $insta_source = ($IGItem['ig_select_from'] == 'username') ? 'user_' . $IGItem['insta_user'] : 'tag_' . $IGItem['insta_tag'];
219
+
220
+ $insta_svg = '<svg version="1.1" class="ig-spin" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
221
+ viewBox="0 0 551.034 551.034" style="enable-background:new 0 0 551.034 551.034;" xml:space="preserve"><g>
222
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72" gradientTransform="matrix(1 0 0 -1 0 554)">
223
+ <stop offset="0" style="stop-color:#E09B3D"/><stop offset="0.3" style="stop-color:#C74C4D"/><stop offset="0.6" style="stop-color:#C21975"/><stop offset="1" style="stop-color:#7024C4"/>
224
+ </linearGradient>
225
+ <path style="fill:url(#SVGID_1_);" d="M386.878,0H164.156C73.64,0,0,73.64,0,164.156v222.722
226
+ c0,90.516,73.64,164.156,164.156,164.156h222.722c90.516,0,164.156-73.64,164.156-164.156V164.156
227
+ C551.033,73.64,477.393,0,386.878,0z M495.6,386.878c0,60.045-48.677,108.722-108.722,108.722H164.156
228
+ c-60.045,0-108.722-48.677-108.722-108.722V164.156c0-60.046,48.677-108.722,108.722-108.722h222.722
229
+ c60.045,0,108.722,48.676,108.722,108.722L495.6,386.878L495.6,386.878z"/>
230
+ <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72" gradientTransform="matrix(1 0 0 -1 0 554)">
231
+ <stop offset="0" style="stop-color:#E09B3D"/><stop offset="0.3" style="stop-color:#C74C4D"/><stop offset="0.6" style="stop-color:#C21975"/><stop offset="1" style="stop-color:#7024C4"/>
232
+ </linearGradient>
233
+ <path style="fill:url(#SVGID_2_);" d="M275.517,133C196.933,133,133,196.933,133,275.516s63.933,142.517,142.517,142.517
234
+ S418.034,354.1,418.034,275.516S354.101,133,275.517,133z M275.517,362.6c-48.095,0-87.083-38.988-87.083-87.083
235
+ s38.989-87.083,87.083-87.083c48.095,0,87.083,38.988,87.083,87.083C362.6,323.611,323.611,362.6,275.517,362.6z"/>
236
+ <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="418.31" y1="4.57" x2="418.31" y2="549.72" gradientTransform="matrix(1 0 0 -1 0 554)">
237
+ <stop offset="0" style="stop-color:#E09B3D"/><stop offset="0.3" style="stop-color:#C74C4D"/><stop offset="0.6" style="stop-color:#C21975"/><stop offset="1" style="stop-color:#7024C4"/>
238
+ </linearGradient>
239
+ <circle style="fill:url(#SVGID_3_);" cx="418.31" cy="134.07" r="34.15"/>
240
+ </g></svg>';
241
+
242
+ $results = '';
243
+ $results .= '<div class="ig-block ' . ((!$atts['ajax']) ? 'ig-block-loaded' : '') . '" id="ig-block-' . $gid . '" data-insgalid="' . $gid . '" data-source="' . $insta_source . '">';
244
+ $results .= '<div class="ig-spinner" ' . ((!$atts['ajax']) ? 'hidden' : '') . '>';
245
+ if (!empty($InstaGallerySetting['igs_spinner'])) {
246
+ // for backward compatibility only
247
+ $results .= '<img src="' . $InstaGallerySetting['igs_spinner'] . '" alt="' . __('Instagram Gallery', 'insta-gallery') . '" class="ig-spin" />';
248
+ } else if (!empty($InstaGallerySetting['igs_spinner_image_id'])) {
249
+ $mid = $InstaGallerySetting['igs_spinner_image_id'];
250
+ $image = wp_get_attachment_image_src($mid);
251
+ if ($image) {
252
+ $results .= '<img src="' . $image[0] . '" alt="' . __('Instagram Gallery', 'insta-gallery') . '" class="ig-spin" />';
253
+ } else {
254
+ $results .= $insta_svg;
255
+ }
256
+ } else {
257
+ $results .= $insta_svg;
258
+ }
259
+ $results .= '</div>';
260
+
261
+ // load content with page/shortcode
262
+ if (!$atts['ajax']) {
263
+ $_REQUEST['insgalid'] = $gid;
264
+ $_REQUEST['insgal_ajax'] = $atts['ajax'];
265
+ $results .= $this->load_ig_item();
266
+ }
267
+
268
+ $results .= '</div> <!-- // IG BLOCK -->';
269
+ return $results;
270
+ }
271
+
272
+ function template_path($template_name) {
273
+
274
+ if (file_exists(trailingslashit(get_stylesheet_directory()) . 'insta-gallery/' . $template_name)) {
275
+ return (trailingslashit(get_stylesheet_directory()) . 'insta-gallery/' . $template_name);
276
+ }
277
+
278
+ if (file_exists(QLIGG_PLUGIN_DIR . 'templates/' . $template_name)) {
279
+ return (QLIGG_PLUGIN_DIR . 'templates/' . $template_name);
280
+ }
281
+ }
282
+
283
+ function init() {
284
+ add_action('wp_ajax_nopriv_load_ig_item', array($this, 'load_ig_item'));
285
+ add_action('wp_ajax_load_ig_item', array($this, 'load_ig_item'));
286
+ add_action('wp_enqueue_scripts', array($this, 'add_frontend_js'));
287
+ add_shortcode('insta-gallery', array($this, 'do_shortcode'));
288
+ }
289
+
290
+ public static function instance() {
291
+ if (!isset(self::$instance)) {
292
+ self::$instance = new self();
293
+ self::$instance->init();
294
+ }
295
+ return self::$instance;
296
+ }
297
+
298
+ }
299
+
300
+ QLIGG_Frontend::instance();
301
+ }
includes/pages/documentation.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH'))
3
+ exit;
4
+ ?>
5
+ <header class="ig-doc-header">
6
+ <h3>
7
+ How to Get Instagram API Credentials: <a href="#TB_inline?&width=920&height=600&inlineId=ig-ahcreds" class="thickbox" style="font-size: 75%;">(i
8
+ already have API credentials)</a>
9
+ </h3>
10
+ <p>
11
+ To fetch Instagram feed you have to pass <strong>access token</strong> to Instagram. And access token can be generated using Instagram API (which
12
+ need to register an Application). So please register Instagram Gallery plugin to access feed, which requires authentication. <strong><a
13
+ href="https://www.instagram.com/developer/" title="Instagram Developer Documentation" target="_blank" rel="noreferrer nofollow noopener">Read More</a></strong>
14
+ </p>
15
+ <p>
16
+ Please follow the below steps carefully to get API Credentials. Let’s go!<br />
17
+ </p>
18
+ </header>
19
+ <div class="notice notice-info is-dismissible">
20
+ <p>if you are facing any issue while generating access token, then you can take help from <a href="https://www.google.co.in/search?q=how+to+generate+instagram+access+token&amp;ie=UTF-8&amp;oe=UTF-8" title="Google search for Instagram access token" target="_blank" rel="noreferrer nofollow noopener">Internet</a>. there are lots of videos and articles available there.
21
+ <br />e.g. you can generate token from the below sites and can add generated token in the plugin setting.<br />
22
+ https://instagram.pixelunion.net/<br />
23
+ https://webkul.com/blog/create-instagram-access-token/<br />
24
+ https://instagram.themeruby.com/</p>
25
+ </div>
26
+ <div id="ig-ahcreds" style="display: none;">
27
+ <h4>
28
+ if you already have API credentials and already registerd an Application, but <strong>access token</strong> is not generated,<br /> then you can use
29
+ same credentials by following the simple steps below:
30
+ </h4>
31
+ <ol>
32
+ <li>Login to <a href="https://www.instagram.com/developer/" target="_blank" rel="noreferrer nofollow noopener">Instagram developer web page</a></li>
33
+ <li>go to <strong>Manage Clients</strong> section.
34
+ </li>
35
+ <li>click <strong>Manage</strong> button within specific client.
36
+ </li>
37
+ <li>click <strong>Security</strong> tab within the opened client.
38
+ </li>
39
+ <li>and add the below <strong>redirect URI</strong> within the <strong>Valid redirect URIs:</strong> field.
40
+ </li>
41
+ </ol>
42
+ <p>
43
+ <label ><strong>Redirect URI</strong>: <input type="url" onclick="select();document.execCommand('copy');alert('copied');" title="click to copy" value="<?php echo admin_url('admin.php?page=qligg_token&igigresponse=1'); ?>"
44
+ class="ig-doc-red-url" readonly /></label>
45
+ </p>
46
+ <hr />
47
+ <figure class="ig-doc-figure">
48
+ <img src="<?php echo plugins_url('/assets/img/ig-hdp-p1.png', QLIGG_PLUGIN_FILE); ?>" />
49
+ </figure>
50
+ </div>
51
+ <div class="ig-doc-body">
52
+ <article>
53
+ <h3>
54
+ <span>Step 1:</span> Sign in Instargam as a developer.
55
+ </h3>
56
+ <p>
57
+ You have to register as a developer in Instagram to receive <b>Client ID</b> and <b>Client Secret</b>. That’s why please follow the link to the <a
58
+ href="https://www.instagram.com/developer/" target="_blank" rel="noreferrer nofollow noopener">Instagram developer web page</a> and Login to your
59
+ account.
60
+ </p>
61
+ <figure>
62
+ <img src="<?php echo plugins_url('/assets/img/ig-hdp-1.png', QLIGG_PLUGIN_FILE); ?>" />
63
+ </figure>
64
+ <p>
65
+ After login click on <strong>Register Your Application</strong> button to continue.
66
+ </p>
67
+ <figure>
68
+ <img src="<?php echo plugins_url('/assets/img/ig-hdp-2.jpg', QLIGG_PLUGIN_FILE); ?>" />
69
+ </figure>
70
+ </article>
71
+ <article>
72
+ <h3>
73
+ <span>Step 2:</span> Fill in the Developer Signup Details.
74
+ </h3>
75
+ <p>Instagram demands to be registered as a developer from everyone, who wants to display Instagram feed on his website. After you log in the next
76
+ window will appear.</p>
77
+ <p>Fill-up all the fields on the web page:</p>
78
+ <table>
79
+ <tr>
80
+ <th>Your website:</th>
81
+ <td>the URL of your website.</td>
82
+ </tr>
83
+ <tr>
84
+ <th>Phone number:</th>
85
+ <td>your phone number.</td>
86
+ </tr>
87
+ <tr>
88
+ <th>What do you want to build with API?</th>
89
+ <td>any short description.</td>
90
+ </tr>
91
+ </table>
92
+ <figure>
93
+ <img src="<?php echo plugins_url('/assets/img/ig-hdp-3.png', QLIGG_PLUGIN_FILE); ?>" />
94
+ </figure>
95
+ </article>
96
+ <article>
97
+ <h3>
98
+ <span>Step 3:</span> Register your Application.
99
+ </h3>
100
+ <p>After Developer signup, Now you can register your Application.</p>
101
+ <figure>
102
+ <img src="<?php echo plugins_url('/assets/img/ig-hdp-4.png', QLIGG_PLUGIN_FILE); ?>" />
103
+ </figure>
104
+ <h3>Register New Client ID</h3>
105
+ <p>Check the fields on the web page:</p>
106
+ <table>
107
+ <tr>
108
+ <th>Application name</th>
109
+ <td>choose any appropriate name, which fits Instagram requirements.</td>
110
+ </tr>
111
+ <tr>
112
+ <th>Description</th>
113
+ <td>any short description.</td>
114
+ </tr>
115
+ <tr>
116
+ <th>Company Name</th>
117
+ <td>company/website name.</td>
118
+ </tr>
119
+ <tr>
120
+ <th>Website URL</th>
121
+ <td>your website url e.g. <strong><?php echo home_url(); ?></strong></td>
122
+ </tr>
123
+ <tr>
124
+ <th>Valid redirect URIs</th>
125
+ <td>have to be <input type="url" onclick="select();document.execCommand('copy');alert('copied');" title="click to copy"
126
+ value="<?php echo admin_url('admin.php?page=qligg&igigresponse=1'); ?>" class="ig-doc-red-url" readonly /><br /> <strong
127
+ style="color: #e93b59; font-size: 15px; line-height: normal; font-style: italic;">(note that you should set the redirect link exactly the same
128
+ displayed here.)</strong></td>
129
+ </tr>
130
+ <tr>
131
+ <th>Privacy Policy URL</th>
132
+ <td>your website url e.g. <strong><?php echo home_url(); ?></strong></td>
133
+ </tr>
134
+ <tr>
135
+ <th>Contact email</th>
136
+ <td>your email address.</td>
137
+ </tr>
138
+ </table>
139
+ <p>In the "Security" tab, leave the default settings ("Disable implicit OAuth" should be checked & "Enforce signed requests" should be unchecked).</p>
140
+
141
+ <figure>
142
+ <img src="<?php echo plugins_url('/assets/img/ig-hdp-5.png', QLIGG_PLUGIN_FILE); ?>" />
143
+ </figure>
144
+ <p>Now confirm the filled details and proceed to the next page. Here you can see Instagram Client ID and Client Secret.</p>
145
+ <figure>
146
+ <img src="<?php echo plugins_url('/assets/img/ig-hdp-6.png', QLIGG_PLUGIN_FILE); ?>" />
147
+ </figure>
148
+ <p>Copy the crendentials and go back to your Instagram Gallery plugin setting page and enter the generated crendentials to get Access Token.</p>
149
+ <figure>
150
+ <img src="<?php echo plugins_url('/assets/img/ig-hdp-7.png', QLIGG_PLUGIN_FILE); ?>" />
151
+ </figure>
152
+ </article>
153
+ </div>
154
+ <footer> </footer>
includes/pages/token.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH'))
3
+ exit;
4
+
5
+ if (isset($_GET['code']) && isset($_GET['igigresponse'])) {
6
+ if ($message = $qligg_api->get_message()) {
7
+ ?>
8
+ <script>
9
+ (function ($) {
10
+ alert("<?php echo esc_html($message); ?>");
11
+ })(jQuery);
12
+ </script>
13
+ <?php
14
+ }
15
+ }
16
+ ?>
17
+ <div class="ig-account-section">
18
+ <?php if (empty($qligg['access_token'])): ?>
19
+ <?php
20
+ $ig_client_id = isset($qligg['client_id']) ? trim($qligg['client_id']) : '';
21
+ $ig_client_secret = isset($qligg['client_secret']) ? trim($qligg['client_secret']) : '';
22
+ ?>
23
+ <div class="ig-account-cards">
24
+ <form method="post" class="ig-account-card" id="ig-generate-token">
25
+ <h4><?php _e('Generate new access token', 'insta-gallery'); ?></h4>
26
+ <p class="field-item">
27
+ <input name="ig_client_id" type="text" maxlength="200" placeholder="<?php _e('Instagram Client ID', 'insta-gallery'); ?>" value="<?php echo esc_attr($ig_client_id); ?>" required />
28
+ </p>
29
+ <p class="field-item">
30
+ <input name="ig_client_secret" type="text" maxlength="200" placeholder="<?php _e('Instagram Client Secret', 'insta-gallery'); ?>" value="<?php echo esc_html($ig_client_secret); ?>" required />
31
+ </p>
32
+ <span class="spinner"></span>
33
+ <button type="submit" class="btn-instagram secondary"><?php _e('Generate Token', 'insta-gallery'); ?></button>
34
+ <a href="<?php echo admin_url('admin.php?page=qligg_documentation'); ?>" class="btn-instagram"><?php _e('Instructions', 'insta-gallery'); ?></a>
35
+ <?php wp_nonce_field('igara_generate_token', 'ig_nonce'); ?>
36
+ </form>
37
+ <form method="post" class="ig-account-card" id="ig-update-token">
38
+ <h4><?php _e('Already have access token?', 'insta-gallery'); ?></h4>
39
+ <p class="field-item">
40
+ <input name="ig_access_token" type="text" maxlength="200" placeholder="<?php _e('Enter a valid Access Token', 'insta-gallery'); ?>" required />
41
+ </p>
42
+ <span class="spinner"></span>
43
+ <button type="submit" class="btn-instagram secondary"><?php _e('Update Token', 'insta-gallery'); ?></button>
44
+ <?php wp_nonce_field('igara_update_token', 'ig_nonce'); ?>
45
+ </form>
46
+ </div>
47
+ <?php else: ?>
48
+ <div class="ig-account-cards ig-ac-have-token">
49
+ <?php
50
+ $token = filter_var($qligg['access_token'], FILTER_SANITIZE_STRING);
51
+ $profile_info = qligg_get_user_profile_info();
52
+ ?>
53
+ <?php if ($profile_info): ?>
54
+ <div class="ig-account-card">
55
+ <figure>
56
+ <img src="<?php echo esc_url($profile_info['profile_picture']); ?>" width="150" />
57
+ <figcaption>
58
+ <?php echo esc_html($profile_info['full_name']); ?>
59
+ </figcaption>
60
+ </figure>
61
+ </div>
62
+ <?php endif; ?>
63
+ <form method="post" class="ig-account-card" id="ig-remove-token">
64
+ <p class="field-item">
65
+ <h4><?php _e('Active access token', 'insta-gallery'); ?></h4>
66
+ <input name="ig_access_token" type="text" maxlength="200" value="<?php echo esc_attr($token); ?>" readonly />
67
+ </p>
68
+ <span class="spinner"></span>
69
+ <button type="submit" class="btn-instagram"><?php _e('Remove Token', 'insta-gallery'); ?></button>
70
+ <?php wp_nonce_field('igara_remove_token', 'ig_nonce'); ?>
71
+ <p>
72
+ <?php _e('This will remove access token and client secret', 'insta-gallery'); ?>
73
+ </p>
74
+ </form>
75
+ </div>
76
+ <?php endif;
77
+ ?>
78
+ </div>
79
+ <div class="ig_donation-wrap ig-thm-color">
80
+ <p>
81
+ <span class="ig_donation_text"><?php _e('Please Donate now to support the Maintainance and Advancement of this plugin.', 'insta-gallery'); ?>
82
+ <br />
83
+ <?php _e('Thank you so much to each and everyone who has already supported me.', 'insta-gallery'); ?>
84
+ </span>
85
+ <a class="ig_donation_btn" href="https://www.paypal.me/karanpay" target="_blank">
86
+ <img src="<?php echo plugins_url('/assets/img/paypal-logo.svg', QLIGG_PLUGIN_FILE); ?>" class="ig-logo" />
87
+ </a>
88
+ </p>
89
+ </div>
includes/pages/views/edit.php ADDED
@@ -0,0 +1,358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH'))
3
+ exit;
4
+
5
+ $instagram_item = array(
6
+ 'ig_select_from' => 'username',
7
+ 'insta_user' => 'calzado.store',
8
+ 'insta_tag' => '',
9
+ 'insta_user-limit' => '12',
10
+ 'insta_tag-limit' => '12',
11
+ 'ig_display_type' => 'carousel',
12
+ 'insta_gal-cols' => '3',
13
+ 'insta_gal-hover' => '',
14
+ 'insta_gal-spacing' => '',
15
+ 'insta_instalink' => '1',
16
+ 'insta_instalink-text' => '',
17
+ 'insta_instalink-bgcolor' => '',
18
+ 'insta_instalink-hvrcolor' => '',
19
+ 'insta_car-slidespv' => '5',
20
+ 'insta_car-autoplay' => '1',
21
+ 'insta_car-autoplay-interval' => '3000',
22
+ 'insta_car-navarrows' => '1',
23
+ 'insta_car-navarrows-color' => '',
24
+ 'insta_car-dots' => null,
25
+ 'insta_car-spacing' => '1',
26
+ 'insta_thumb-size' => 'standard',
27
+ 'insta_hover-color' => '',
28
+ 'insta_gal-popup' => '1',
29
+ 'insta_popup-caption' => '',
30
+ 'insta_likes' => '1',
31
+ 'insta_comments' => '1',
32
+ 'ig_item_id' => '0'
33
+ );
34
+
35
+ if (isset($_GET['item_id'])) {
36
+
37
+ $ig_item_id = absint($_GET['item_id']);
38
+
39
+ if (count($instagram_items)) {
40
+ if (isset($instagram_items[$ig_item_id])) {
41
+ $instagram_item = $instagram_items[$ig_item_id];
42
+ $instagram_item['ig_item_id'] = $ig_item_id;
43
+ }
44
+ }
45
+ }
46
+ ?>
47
+ <form method="post" id="ig-update-form">
48
+ <table class="widefat form-table ig-table-edit">
49
+ <tbody>
50
+ <tr>
51
+ <td colspan="2">
52
+ <ul class="ig-list-buttons">
53
+ <li>
54
+ <input type="radio" id="ig_select_from-username" name="ig_select_from" value="username" <?php checked('username', $instagram_item['ig_select_from']); ?> />
55
+ <label for="ig_select_from-username"><?php _e('User', 'insta-gallery'); ?></label>
56
+ <div class="check"></div>
57
+ </li>
58
+ <li>
59
+ <input type="radio" id="ig_select_from-tag" name="ig_select_from" value="tag" <?php checked('tag', $instagram_item['ig_select_from']); ?> />
60
+ <label for="ig_select_from-tag"><?php _e('Tag', 'insta-gallery'); ?></label>
61
+ <div class="check"></div>
62
+ </li>
63
+ </ul>
64
+ <p class="description">
65
+ <?php _e('Please select option to display pictures from Instagram @username or #tag', 'insta-gallery'); ?>
66
+ </p>
67
+ </td>
68
+ </tr>
69
+ <tr id="ig-select-username-wrap" class="ig-tab-content-row <?php if ($instagram_item['ig_select_from'] == 'username') echo 'active'; ?>">
70
+ <td colspan="100%">
71
+ <table>
72
+ <tr>
73
+ <th scope="row"><?php _e('User', 'insta-gallery'); ?></th>
74
+ <td>
75
+ <?php if (empty($qligg['access_token'])): ?>
76
+ <p class="ig-thm-color">
77
+ <strong><?php _e('No Instagram account connected. please connect an account with the website to access Instagram media', 'insta-gallery'); ?></strong></strong>
78
+ </p>
79
+ <input name="insta_user" type="hidden" value="nousername" readonly />
80
+ <?php
81
+ else :
82
+ $profile_info = qligg_get_user_profile_info();
83
+ $username = empty($profile_info['username']) ? 'nousername' : $profile_info['username'];
84
+ ?>
85
+ <input name="insta_user" type="text" placeholder="myusername" value="<?php echo esc_attr($username); ?>" readonly />
86
+ <p class="ig-generate-msgs"><?php _e('Please enter Instagram username', 'insta-gallery'); ?></p>
87
+ <?php endif; ?>
88
+ </td>
89
+ </tr>
90
+ <tr>
91
+ <th scope="row"><?php _e('Limit', 'insta-gallery'); ?></th>
92
+ <td><input name="insta_user-limit" type="number" min="1" max="50" value="<?php echo!empty($instagram_item['insta_user-limit']) ? $instagram_item['insta_user-limit'] : '12'; ?>" />
93
+ <p class="description"><?php _e('Number of pictures to display', 'insta-gallery'); ?></span>
94
+ </td>
95
+ </tr>
96
+ </table>
97
+ </td>
98
+ </tr>
99
+ <tr id="ig-select-tag-wrap" class="ig-tab-content-row <?php if ($instagram_item['ig_select_from'] == 'tag') echo 'active'; ?>">
100
+ <td colspan="100%">
101
+ <table>
102
+ <tr>
103
+ <th scope="row"><?php _e('Tag', 'insta-gallery'); ?></th>
104
+ <td>
105
+ <input name="insta_tag" type="text" placeholder="beautiful" value="<?php echo!empty($instagram_item['insta_tag']) ? $instagram_item['insta_tag'] : ''; ?>" />
106
+ <p class="description">
107
+ https://www.instagram.com/explore/tags/beautiful
108
+ </p>
109
+ <p class="ig-generate-msgs"><?php _e('Please enter Instagram tag', 'insta-gallery'); ?></p>
110
+ </td>
111
+ </tr>
112
+ <tr>
113
+ <th scope="row"><?php _e('Limit', 'insta-gallery'); ?></th>
114
+ <td>
115
+ <input name="insta_tag-limit" type="number" min="1" max="30" value="<?php echo!empty($instagram_item['insta_tag-limit']) ? $instagram_item['insta_tag-limit'] : '12'; ?>" />
116
+ <p class="description">
117
+ <?php _e('Number of pictures to display', 'insta-gallery'); ?>
118
+ </p>
119
+ </td>
120
+ </tr>
121
+ </table>
122
+ </td>
123
+ </tr>
124
+ <tr>
125
+ <td colspan="2">
126
+ <ul class="ig-list-buttons">
127
+ <li>
128
+ <input type="radio" id="ig_display_type-gallery" name="ig_display_type" value="gallery" <?php checked('gallery', $instagram_item['ig_display_type']); ?> />
129
+ <label for="ig_display_type-gallery"><?php _e('Gallery', 'insta-gallery'); ?></label>
130
+ <div class="check"></div>
131
+ </li>
132
+ <li>
133
+ <input type="radio" id="ig_display_type-carousel" name="ig_display_type" value="carousel" <?php checked('carousel', $instagram_item['ig_display_type']); ?> />
134
+ <label for="ig_display_type-carousel"><?php _e('Carousel', 'insta-gallery'); ?></label>
135
+ <div class="check"></div>
136
+ </li>
137
+ </ul>
138
+ </td>
139
+ </tr>
140
+ <tr id="ig-section-as-galllery" class="ig-tab-content-row <?php if ($instagram_item['ig_display_type'] == 'gallery') echo 'active'; ?>">
141
+ <td colspan="100%">
142
+ <table>
143
+ <tr>
144
+ <th scope="row"><?php _e('Columns', 'insta-gallery'); ?></th>
145
+ <td>
146
+ <input name="insta_gal-cols" type="number" min="1" max="20" value="<?php echo!empty($instagram_item['insta_gal-cols']) ? $instagram_item['insta_gal-cols'] : '3'; ?>" />
147
+ <p class="description">
148
+ <?php _e('Number of pictures in a row', 'insta-gallery'); ?>
149
+ </p>
150
+ </td>
151
+ <td rowspan="3"><img src="<?php echo plugins_url('/assets/img/demo-gallery.jpg', QLIGG_PLUGIN_FILE); ?>" width="500" /></td>
152
+ </tr>
153
+ <tr>
154
+ <th scope="row"><?php _e('Image hover effect', 'insta-gallery'); ?></th>
155
+ <td>
156
+ <input name="insta_gal-hover" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_gal-hover'])) ? '' : 'checked'; ?> />
157
+ <p class="description">
158
+ <?php _e('Image mouseover effect', 'insta-gallery'); ?>
159
+ </p>
160
+ </td>
161
+ </tr>
162
+ <tr>
163
+ <th scope="row"><?php _e('Space between images', 'insta-gallery'); ?></th>
164
+ <td>
165
+ <input name="insta_gal-spacing" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_gal-spacing'])) ? '' : 'checked'; ?> />
166
+ <p class="description">
167
+ <?php _e('Add blank space between images', 'insta-gallery'); ?>
168
+ </p>
169
+ </td>
170
+ </tr>
171
+ </table>
172
+ </td>
173
+ </tr>
174
+ <tr id="ig-section-as-carousel" class="ig-tab-content-row <?php if ($instagram_item['ig_display_type'] == 'carousel') echo 'active'; ?>">
175
+ <td colspan="100%">
176
+ <table>
177
+ <tr>
178
+ <th scope="row"><?php _e('Slides per view', 'insta-gallery'); ?></th>
179
+ <td>
180
+ <input name="insta_car-slidespv" type="number" min="1" max="10" value="<?php echo!empty($instagram_item['insta_car-slidespv']) ? $instagram_item['insta_car-slidespv'] : '5'; ?>" />
181
+ <p class="description"><?php _e('Number of pictures per slide', 'insta-gallery'); ?></p>
182
+ </td>
183
+ <td rowspan="5"><img src="<?php echo plugins_url('/assets/img/demo-carousel.jpg', QLIGG_PLUGIN_FILE); ?>" alt="demo carousel" width="500" /></td>
184
+ </tr>
185
+ <tr>
186
+ <th scope="row"><?php _e('Autoplay', 'insta-gallery'); ?></th>
187
+ <td>
188
+ <input name="insta_car-autoplay" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_car-autoplay'])) ? '' : 'checked'; ?> />
189
+ <p class="description"><?php _e('autoplay carousel items', 'insta-gallery'); ?></p>
190
+ </td>
191
+ </tr>
192
+ <tr>
193
+ <th scope="row"><?php _e('Autoplay Interval', 'insta-gallery'); ?></th>
194
+ <td>
195
+ <input name="insta_car-autoplay-interval" type="number" min="1000" max="300000" step="100" value="<?php echo (!empty($instagram_item['insta_car-autoplay-interval'])) ? $instagram_item['insta_car-autoplay-interval'] : '3000'; ?>" />
196
+ <p class="description">
197
+ <?php _e('Moves to next picture after specified time interval', 'insta-gallery'); ?></p>
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <th scope="row"><?php _e('Navigation arrows', 'insta-gallery'); ?></th>
202
+ <td>
203
+ <input name="insta_car-navarrows" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_car-navarrows'])) ? '' : 'checked'; ?> />
204
+ <p class="description"><?php _e('Display prev-next navigation arrows', 'insta-gallery'); ?></p>
205
+ </td>
206
+ </tr>
207
+ <tr>
208
+ <th scope="row"><?php _e('Navigation arrows color', 'insta-gallery'); ?></th>
209
+ <td>
210
+ <input id="insta_car-navarrows-color-choose" type="color" value="<?php echo (!empty($instagram_item['insta_car-navarrows-color']) ? $instagram_item['insta_car-navarrows-color'] : '#c32a67'); ?>" />
211
+ <input name="insta_car-navarrows-color" type="text" placeholder="#c32a67" value="<?php echo (!empty($instagram_item['insta_car-navarrows-color']) ? $instagram_item['insta_car-navarrows-color'] : ''); ?>" />
212
+ <p class="description"><?php _e('change navigation arrows color here', 'insta-gallery'); ?></p>
213
+ </td>
214
+ </tr>
215
+ <!--
216
+ <tr>
217
+ <th scope="row"><?php _e('Dotted navigation', 'insta-gallery'); ?></th>
218
+ <td><input name="insta_car-dots" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_car-dots'])) ? '' : 'checked'; ?> /> <span
219
+ class="description"><?php _e('Display dotted navigation buttons', 'insta-gallery'); ?><br />( <span class="ig-thm-color"><strong><?php
220
+ _e('Deprecated: this option will be removed in the future updates', 'insta-gallery');
221
+ ?></strong></span> )</span></td>
222
+ </tr>
223
+ -->
224
+ <tr>
225
+ <th scope="row"><?php _e('Space between slides', 'insta-gallery'); ?></th>
226
+ <td><input name="insta_car-spacing" type="checkbox" value="1"
227
+ <?php echo (isset($instagram_item) && empty($instagram_item['insta_car-spacing'])) ? '' : 'checked'; ?> /> <p class="description"><?php _e('add blank space between carousel items', 'insta-gallery'); ?> </span></td>
228
+ </tr>
229
+ </table>
230
+ </td>
231
+ </tr>
232
+ <tr class="ig-tab-content-row active">
233
+ <td colspan="100%">
234
+ <table>
235
+ <tr>
236
+ <th scope="row"><?php _e('Images thumbnail size', 'insta-gallery'); ?></th>
237
+ <td>
238
+ <select name="insta_thumb-size">
239
+ <option value="standard"><?php _e('Standard', 'insta-gallery'); ?> (640 x auto)</option>
240
+ <option value="medium" <?php echo (isset($instagram_item['insta_thumb-size']) && ($instagram_item['insta_thumb-size'] == 'medium')) ? 'selected' : ''; ?>><?php _e('Medium', 'insta-gallery'); ?> (320 x auto)</option>
241
+ <option value="small" <?php echo (isset($instagram_item['insta_thumb-size']) && ($instagram_item['insta_thumb-size'] == 'small')) ? 'selected' : ''; ?>><?php _e('Small', 'insta-gallery'); ?> (150 x 150)</option>
242
+ </select>
243
+ </td>
244
+ </tr>
245
+ <tr>
246
+ <th scope="row"><?php _e('Images hover effect color', 'insta-gallery'); ?></th>
247
+ <td><input id="insta_hover-color-choose" type="color" value="<?php echo (!empty($instagram_item['insta_hover-color']) ? $instagram_item['insta_hover-color'] : '#007aff'); ?>" />
248
+ <input name="insta_hover-color" type="text" placeholder="#007aff" value="<?php echo (!empty($instagram_item['insta_hover-color']) ? $instagram_item['insta_hover-color'] : ''); ?>" />
249
+ <p class="description">
250
+ <?php _e('Color which is displayed when hovered over images', 'insta-gallery'); ?>
251
+ </p>
252
+ </td>
253
+ </tr>
254
+ <tr>
255
+ <th scope="row"><?php _e('Popup images on click', 'insta-gallery'); ?></th>
256
+ <td><input name="insta_gal-popup" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_gal-popup'])) ? '' : 'checked'; ?> />
257
+ <p class="description">
258
+ <?php _e('Display popup gallery by clicking on image thumbnail. else it will open Instagram page', 'insta-gallery'); ?>
259
+ </p>
260
+ </td>
261
+ </tr>
262
+ <tr hidden>
263
+ <th scope="row"><?php _e('Display image caption', 'insta-gallery'); ?></th>
264
+ <td>
265
+ <input name="insta_popup-caption" type="checkbox" readonly value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_popup-caption'])) ? '' : 'checked'; ?> /> <p class="description"><?php _e('Display caption/tags below images when popup', 'insta-gallery'); ?><br />(
266
+ <span class="ig-thm-color">
267
+ <?php _e('Deprecated: this option will be removed in the future updates', 'insta-gallery'); ?>
268
+ </span>
269
+ </td>
270
+ </tr>
271
+ <tr>
272
+ <th scope="row"><?php _e('Display likes', 'insta-gallery'); ?></th>
273
+ <td>
274
+ <input name="insta_likes" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_likes'])) ? '' : 'checked'; ?> />
275
+ <p class="description">
276
+ <?php _e('Display likes count of images', 'insta-gallery'); ?>
277
+ </p>
278
+ </td>
279
+ </tr>
280
+ <tr>
281
+ <th scope="row"><?php _e('Display comments', 'insta-gallery'); ?></th>
282
+ <td>
283
+ <input name="insta_comments" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_comments'])) ? '' : 'checked'; ?> />
284
+ <p class="description">
285
+ <?php _e('Display comments count of images', 'insta-gallery'); ?>
286
+ </p>
287
+ </td>
288
+ </tr>
289
+ </table>
290
+ </td>
291
+ </tr>
292
+ <tr class="ig-tab-content-row active">
293
+ <td colspan="100%">
294
+ <table>
295
+ <tr>
296
+ <th scope="row"><?php _e('Instagram button', 'insta-gallery'); ?></th>
297
+ <td>
298
+ <input name="insta_instalink" type="checkbox" value="1" <?php echo (isset($instagram_item) && empty($instagram_item['insta_instalink'])) ? '' : 'checked'; ?> />
299
+ <p class="description">
300
+ <?php _e('Display the button to open Instagram site link', 'insta-gallery'); ?>
301
+ </p>
302
+ </td>
303
+ </tr>
304
+
305
+ </table>
306
+ </td>
307
+ </tr>
308
+ <tr id="ig-section-igbtn" class="ig-tab-content-row <?php if (isset($instagram_item) && !empty($instagram_item['insta_instalink'])) echo 'active'; ?>">
309
+ <td colspan="100%">
310
+ <table>
311
+ <tr>
312
+ <th scope="row"><?php _e('Instagram button text', 'insta-gallery'); ?></th>
313
+ <td>
314
+ <input name="insta_instalink-text" type="text" placeholder="Instagram" value="<?php echo (!empty($instagram_item['insta_instalink-text'])) ? $instagram_item['insta_instalink-text'] : ''; ?>" />
315
+ <p class="description">
316
+ <?php _e('Instagram button text here', 'insta-gallery'); ?>
317
+ </p>
318
+ </td>
319
+ </tr>
320
+ <tr>
321
+ <th scope="row"><?php _e('Instagram button background', 'insta-gallery'); ?></th>
322
+ <td>
323
+ <input id="insta_instalink-bgcolor-choose" type="color" value="<?php echo (!empty($instagram_item['insta_instalink-bgcolor']) ? $instagram_item['insta_instalink-bgcolor'] : '#c32a67'); ?>" />
324
+ <input name="insta_instalink-bgcolor" type="text" placeholder="#c32a67" value="<?php echo (!empty($instagram_item['insta_instalink-bgcolor']) ? $instagram_item['insta_instalink-bgcolor'] : ''); ?>" />
325
+ <p class="description"><?php _e('Color which is displayed on button background', 'insta-gallery'); ?></p>
326
+ </td>
327
+ </tr>
328
+ <tr>
329
+ <th scope="row"><?php _e('Instagram button hover color', 'insta-gallery'); ?></th>
330
+ <td>
331
+ <input id="insta_instalink-hvrcolor-choose" type="color" value="<?php echo (!empty($instagram_item['insta_instalink-hvrcolor']) ? $instagram_item['insta_instalink-hvrcolor'] : '#da894a'); ?>" />
332
+ <input name="insta_instalink-hvrcolor" type="text" placeholder="#da894a" value="<?php echo (!empty($instagram_item['insta_instalink-hvrcolor']) ? $instagram_item['insta_instalink-hvrcolor'] : ''); ?>" />
333
+ <p class="description"><?php _e('Color which is displayed when hovered over button', 'insta-gallery'); ?></p>
334
+ </td>
335
+ </tr>
336
+ </table>
337
+ </td>
338
+ </tr>
339
+ </tbody>
340
+ </table>
341
+ <?php //if (count($instagram_item['ig_item_id'])) : ?>
342
+ <input type="hidden" name="item_id" value="<?php echo esc_attr($instagram_item['ig_item_id']); ?>" />
343
+ <?php //endif; ?>
344
+ <?php wp_nonce_field('igara_update_form', 'ig_nonce'); ?>
345
+ <p>
346
+ <span class="spinner"></span>
347
+ <button type="submit" class="btn-instagram secondary"><?php _e('Update', 'insta-gallery'); ?></button>
348
+ <span class="description">
349
+ <?php _e('Update settings and copy/paste generated shortcode in your post/pages or go to Widgets and use Instagram Gallery widget', 'insta-gallery'); ?>
350
+ </span>
351
+ </p>
352
+ </form>
353
+ <hr/>
354
+ <p>
355
+ <a class="btn-instagram" href="<?php echo admin_url('admin.php?page=qligg_feeds'); ?>" title="<?php _e('View Galleries List', 'insta-gallery'); ?>">
356
+ <i class="dashicons dashicons-arrow-left-alt"></i><?php _e('Back to List', 'insta-gallery'); ?>
357
+ </a>
358
+ </p>
includes/pages/views/list.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH'))
3
+ exit;
4
+ ?>
5
+ <p>
6
+ <a class="btn-instagram" href="<?php echo admin_url('admin.php?page=qligg_feeds&tab=edit'); ?>" title="<?php _e('Add New Gallery', 'insta-gallery'); ?>">
7
+ <span class="dashicons dashicons-plus"></span>
8
+ <?php _e('Add New Gallery', 'insta-gallery'); ?>
9
+ </a>
10
+ </p>
11
+ <?php if (count($instagram_items)) : ?>
12
+ <table class="widefat ig-gallery-list">
13
+ <thead>
14
+ <tr>
15
+ <th>#</th>
16
+ <th><?php _e('Gallery', 'insta-gallery'); ?></th>
17
+ <th><?php _e('Shortcode', 'insta-gallery'); ?></th>
18
+ <th><?php _e('Action', 'insta-gallery'); ?></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <?php
23
+ $i = 1;
24
+ foreach ($instagram_items as $k => $instagram_item) {
25
+ ?>
26
+ <tr>
27
+ <td><?php echo esc_attr($i++); ?></td>
28
+ <td>
29
+ <?php
30
+ if ($instagram_item['ig_select_from'] == 'username') {
31
+ echo __('User', 'insta-gallery') . ' / @' . $instagram_item['insta_user'];
32
+ } else {
33
+ echo __('Tag', 'insta-gallery') . ' / #' . $instagram_item['insta_tag'];
34
+ }
35
+ ?>
36
+ </td>
37
+ <td>
38
+ <input type="text" onclick="select()" value='[insta-gallery id="<?php echo esc_attr($k); ?>"]' readonly />
39
+ </td>
40
+ <td>
41
+ <a href="<?php echo admin_url("admin.php?page=qligg_feeds&tab=edit&item_id={$k}"); ?>" class="btn-instagram">
42
+ <span class="dashicons dashicons-edit"></span><?php _e('Edit', 'insta-gallery'); ?>
43
+ </a>
44
+ <a href="#" data-item_id="<?php echo esc_attr($k); ?>" class="btn-instagram ig-form-item-delete">
45
+ <span class="dashicons dashicons-trash"></span><?php _e('Delete', 'insta-gallery'); ?>
46
+ </a>
47
+ <span class="spinner"></span>
48
+ </td>
49
+ </tr>
50
+ <?php } unset($i); ?>
51
+ </tbody>
52
+ </table>
53
+ <?php endif; ?>
includes/pages/views/spinner.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH'))
3
+ exit;
4
+ ?>
5
+
6
+ <hr/>
7
+ <div id="ig_adv-setting-panel">
8
+ <p>
9
+ <button class="ig_adv-setting-toggle btn-instagram">
10
+ <span class="dashicons dashicons-plus"></span>
11
+ <span class="dashicons dashicons-minus"></span><?php _e('Additional Setting', 'insta-gallery'); ?>
12
+ </button>
13
+ </p>
14
+ <div class="ig_adv-setting">
15
+ <form id="ig-adv-setting" method="post">
16
+ <table class="widefat">
17
+ <tbody>
18
+ <tr>
19
+ <th><?php _e('Gallery loader icon', 'insta-gallery'); ?>:</th>
20
+ <td>
21
+ <?php
22
+ $mid = '';
23
+ $misrc = '';
24
+ if (isset($instagram_settings['igs_spinner_image_id'])) {
25
+ $mid = $instagram_settings['igs_spinner_image_id'];
26
+ $image = wp_get_attachment_image_src($mid);
27
+ if ($image) {
28
+ $misrc = $image[0];
29
+ }
30
+ }
31
+ ?>
32
+ <input type="hidden" name="igs_spinner_image_id" value="<?php echo esc_attr($mid); ?>" data-misrc="<?php echo esc_attr($misrc); ?>" />
33
+ <a class="btn-instagram" id="igs-spinner_media_manager" /><?php _e('Upload', 'insta-gallery'); ?></a>
34
+ <a class="btn-instagram" id="igs-spinner_reset" /><?php _e('Reset Spinner', 'insta-gallery'); ?></a>
35
+ <p class="description">
36
+ <?php _e('Please select the image from media to replace with default Gallery loader icon.', 'insta-gallery'); ?>
37
+ </p>
38
+ </td>
39
+ <td rowspan="2">
40
+ <div class="ig-spinner">
41
+ <svg version="1.1" class="ig-spin" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
42
+ viewBox="0 0 551.034 551.034" style="enable-background: new 0 0 551.034 551.034;" xml:space="preserve">
43
+ <g>
44
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72"
45
+ gradientTransform="matrix(1 0 0 -1 0 554)">
46
+ <stop offset="0" style="stop-color:#E09B3D" />
47
+ <stop offset="0.3" style="stop-color:#C74C4D" />
48
+ <stop offset="0.6" style="stop-color:#C21975" />
49
+ <stop offset="1" style="stop-color:#7024C4" />
50
+ </linearGradient>
51
+ <path style="fill:url(#SVGID_1_);"
52
+ d="M386.878,0H164.156C73.64,0,0,73.64,0,164.156v222.722
53
+ c0,90.516,73.64,164.156,164.156,164.156h222.722c90.516,0,164.156-73.64,164.156-164.156V164.156
54
+ C551.033,73.64,477.393,0,386.878,0z M495.6,386.878c0,60.045-48.677,108.722-108.722,108.722H164.156
55
+ c-60.045,0-108.722-48.677-108.722-108.722V164.156c0-60.046,48.677-108.722,108.722-108.722h222.722
56
+ c60.045,0,108.722,48.676,108.722,108.722L495.6,386.878L495.6,386.878z" />
57
+ <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72"
58
+ gradientTransform="matrix(1 0 0 -1 0 554)">
59
+ <stop offset="0" style="stop-color:#E09B3D" />
60
+ <stop offset="0.3" style="stop-color:#C74C4D" />
61
+ <stop offset="0.6" style="stop-color:#C21975" />
62
+ <stop offset="1" style="stop-color:#7024C4" />
63
+ </linearGradient>
64
+ <path style="fill:url(#SVGID_2_);"
65
+ d="M275.517,133C196.933,133,133,196.933,133,275.516s63.933,142.517,142.517,142.517
66
+ S418.034,354.1,418.034,275.516S354.101,133,275.517,133z M275.517,362.6c-48.095,0-87.083-38.988-87.083-87.083
67
+ s38.989-87.083,87.083-87.083c48.095,0,87.083,38.988,87.083,87.083C362.6,323.611,323.611,362.6,275.517,362.6z" />
68
+ <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="418.31" y1="4.57" x2="418.31" y2="549.72"
69
+ gradientTransform="matrix(1 0 0 -1 0 554)">
70
+ <stop offset="0" style="stop-color:#E09B3D" />
71
+ <stop offset="0.3" style="stop-color:#C74C4D" />
72
+ <stop offset="0.6" style="stop-color:#C21975" />
73
+ <stop offset="1" style="stop-color:#7024C4" />
74
+ </linearGradient>
75
+ <circle style="fill:url(#SVGID_3_);" cx="418.31" cy="134.07" r="34.15" />
76
+ </g>
77
+ </svg>
78
+ </div>
79
+ </td>
80
+ </tr>
81
+ <tr>
82
+ <th><?php _e('Remove everything on uninstall', 'insta-gallery'); ?>:</th>
83
+ <td>
84
+ <input type="checkbox" name="igs_flush" value="1" onclick="ig_validate_flush(this)" <?php if (!empty($instagram_settings['igs_flush'])) echo 'checked'; ?> />
85
+ <span class="description">
86
+ <?php _e('Check this box to remove all data related to this plugin when removing the plugin.', 'insta-gallery'); ?>
87
+ </span>
88
+ </td>
89
+ </tr>
90
+ </tbody>
91
+ <tfoot>
92
+ <tr>
93
+ <td colspan="3">
94
+ <span class="spinner"></span>
95
+ <button type="submit" class="btn-instagram secondary"><?php _e('Update', 'insta-gallery'); ?></button>
96
+ </td>
97
+ </tr>
98
+ </tfoot>
99
+ </table>
100
+ <?php wp_nonce_field('igara_save_igadvs', 'ig_nonce'); ?>
101
+ </form>
102
+ </div>
103
+ </div>
104
+ <script>
105
+ function ig_validate_flush(ele) {
106
+ if (ele.checked) {
107
+ var c = confirm('<?php _e('please make sure every settings will be removed on plugin uninstall.', 'insta-gallery'); ?>');
108
+ if (!c) {
109
+ ele.checked = false;
110
+ }
111
+ }
112
+ }
113
+ </script>
includes/pages/welcome.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH'))
3
+ exit;
4
+ ?>
5
+ <div class="two-col">
6
+ <div class="col" style="min-width: 60%;">
7
+ <div class="qligg-welcome-header">
8
+ <h1><?php echo QLIGG_PLUGIN_NAME; ?> <span style="font-size: 24px;color: #555;">v<?php echo QLIGG_PLUGIN_VERSION; ?></span></h1>
9
+ <div class="about-text">
10
+ <?php esc_html_e('Hello we\'re QuadLayers! We\'ve recently acquired this plugin and this is the first update. We will do our absolute best to support it and fix all the issues.', 'insta-gallery'); ?>
11
+ </div>
12
+ </div>
13
+ <hr/>
14
+ <div class="feature-section one-col is-wide wp-clearfix">
15
+ <h3><?php esc_html_e('Community', 'insta-gallery'); ?></h3>
16
+ <p>
17
+ <?php esc_html_e('If you want to get in touch with other Instagram Gallery users or be aware of our promotional discounts join our community now.', 'insta-gallery'); ?>
18
+ </p>
19
+ <a style="background-color: #ffffff;color: #626262;text-decoration: none;padding: 10px 30px;border-radius: 30px;margin: 10px 0 0 0;display: inline-block;" target="_blank" href="<?php echo QLIGG_GROUP_URL; ?>"><?php esc_html_e('Join us', 'insta-gallery'); ?></a>
20
+ </div>
21
+ <!--<div class="feature-section one-col is-wide wp-clearfix">
22
+ <h3><?php esc_html_e('Demo', 'insta-gallery'); ?></h3>
23
+ <p>
24
+ <?php esc_html_e('Thank you for choosing our Instagram Gallery plugin for WordPress! Here you can see our demo and a description about the features we offer in the premium version.', 'insta-gallery'); ?>
25
+ </p>
26
+ <a style="background-color: #006cff;color: #ffffff;text-decoration: none;padding: 10px 30px;border-radius: 30px;margin: 10px 0 0 0;display: inline-block;" target="_blank" href="<?php echo QLIGG_DEMO_URL; ?>"><?php esc_html_e('View demo', 'insta-gallery'); ?></a>
27
+ </div>-->
28
+ <div class="feature-section one-col is-wide wp-clearfix">
29
+ <h3><?php esc_html_e('Support', 'insta-gallery'); ?></h3>
30
+ <p>
31
+ <?php esc_html_e('If you have any doubt or you find any issue don\'t hesitate to contact us through our ticket system or join our community to meet other Instagram Gallery users.', 'insta-gallery'); ?>
32
+ </p>
33
+ <a style="background-color: #006cff;color: #ffffff;text-decoration: none;padding: 10px 30px;border-radius: 30px;margin: 10px 0 0 0;display: inline-block;" target="_blank" href="<?php echo QLIGG_SUPPORT_URL; ?>"><?php esc_html_e('Submit ticket', 'insta-gallery'); ?></a>
34
+ </div>
35
+ </div>
36
+ <div class="col" style="max-width: 33%;min-width: 33%;">
37
+ <img src="<?php echo plugins_url('/assets/img/gallery.jpg', QLIGG_PLUGIN_FILE); ?>">
38
+ </div>
39
+ </div>
includes/settings.php ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH'))
3
+ exit;
4
+
5
+ if (!class_exists('QLIGG_Settings')) {
6
+
7
+ class QLIGG_Settings {
8
+
9
+ protected static $instance;
10
+
11
+ function ajax_dismiss_notice() {
12
+
13
+ if ($notice_id = ( isset($_POST['notice_id']) ) ? sanitize_key($_POST['notice_id']) : '') {
14
+
15
+ update_user_meta(get_current_user_id(), $notice_id, true);
16
+
17
+ wp_send_json($notice_id);
18
+ }
19
+
20
+ wp_die();
21
+ }
22
+
23
+ function add_action_links($links) {
24
+
25
+ $links[] = '<a target="_blank" href="' . QLIGG_PURCHASE_URL . '">' . esc_html__('Premium', 'insta-gallery') . '</a>';
26
+
27
+ $links[] = '<a href="' . admin_url('admin.php?page=qligg') . '">' . esc_html__('Settings', 'insta-gallery') . '</a>';
28
+
29
+ return $links;
30
+ }
31
+
32
+ function settings_header() {
33
+
34
+ global $submenu;
35
+
36
+ if (isset($submenu[QLIGG_DOMAIN])) {
37
+ $welcome_menu_items = $submenu[QLIGG_DOMAIN];
38
+ }
39
+
40
+ if (is_array($welcome_menu_items)) {
41
+ ?>
42
+ <div class="wrap about-wrap full-width-layout qlwrap">
43
+
44
+ <h1><?php esc_html_e('Instagram Gallery', 'insta-gallery'); ?></h1>
45
+
46
+ <p class="about-text"><?php esc_html_e('Thanks for using Instagram Gallery! We will do our best to offer you the best and improved experience.', 'insta-gallery'); ?></p>
47
+
48
+ <p class="about-text">
49
+ <?php printf('<a href="%s" target="_blank">%s</a>', QLIGG_DEMO_URL, esc_html__('Check out our demo', 'insta-gallery')); ?></a>
50
+ </p>
51
+
52
+ <?php printf('<a href="%s" target="_blank"><div style="
53
+ background: #006bff url(%s) no-repeat;
54
+ background-position: top center;
55
+ background-size: 130px 130px;
56
+ color: #fff;
57
+ font-size: 14px;
58
+ text-align: center;
59
+ font-weight: 600;
60
+ margin: 5px 0 0;
61
+ padding-top: 120px;
62
+ height: 40px;
63
+ display: inline-block;
64
+ width: 140px;
65
+ position: absolute;
66
+ top: 0;
67
+ right: 0;
68
+ " class="ql-badge">%s</div></a>', 'https://quadlayers.com/?utm_source=qligg_admin', plugins_url('/assets/img/quadlayers.jpg', QLIGG_PLUGIN_FILE), esc_html__('QuadLayers', 'insta-gallery')); ?>
69
+
70
+ </div>
71
+ <div class="wrap about-wrap full-width-layout qlwrap">
72
+ <h2 class="nav-tab-wrapper">
73
+ <?php
74
+ foreach ($welcome_menu_items as $welcome_menu_item) {
75
+ if (strpos($welcome_menu_item[2], '.php') !== false)
76
+ continue;
77
+ ?>
78
+ <a href="<?php echo admin_url('admin.php?page=' . esc_attr($welcome_menu_item[2])); ?>" class="nav-tab<?php echo (isset($_GET['page']) && $_GET['page'] == $welcome_menu_item[2]) ? ' nav-tab-active' : ''; ?>"><?php echo esc_html($welcome_menu_item[0]); ?></a>
79
+ <?php
80
+ }
81
+ ?>
82
+ </h2>
83
+ </div>
84
+ <?php
85
+ }
86
+ }
87
+
88
+ function settings_welcome() {
89
+
90
+ global $qligg;
91
+ ?>
92
+ <?php $this->settings_header(); ?>
93
+ <div class="wrap about-wrap full-width-layout">
94
+ <?php include_once('pages/welcome.php'); ?>
95
+ </div>
96
+ <?php
97
+ }
98
+
99
+ function settings_documentation() {
100
+
101
+ global $qligg;
102
+ ?>
103
+ <?php $this->settings_header(); ?>
104
+ <div class="wrap about-wrap full-width-layout">
105
+ <?php include_once('pages/documentation.php'); ?>
106
+ </div>
107
+ <?php
108
+ }
109
+
110
+ function settings_token() {
111
+
112
+ global $qligg, $qligg_api;
113
+ ?>
114
+ <?php $this->settings_header(); ?>
115
+ <div class="wrap about-wrap full-width-layout">
116
+ <?php include_once('pages/token.php'); ?>
117
+ </div>
118
+ <?php
119
+ }
120
+
121
+ function settings_feeds() {
122
+ global $qligg;
123
+ $instagram_items = get_option('insta_gallery_items', array());
124
+ $instagram_settings = get_option('insta_gallery_setting', array());
125
+ ?>
126
+ <?php $this->settings_header(); ?>
127
+ <div class="wrap about-wrap full-width-layout">
128
+ <?php include_once('pages/views/list.php'); ?>
129
+ <?php
130
+ if (isset($_GET['tab']) && $_GET['tab'] == 'edit') {
131
+ include_once('pages/views/edit.php');
132
+ }
133
+ ?>
134
+ <?php include_once('pages/views/spinner.php'); ?>
135
+ </div>
136
+ <?php
137
+ }
138
+
139
+ function add_menu() {
140
+ add_menu_page(QLIGG_PLUGIN_NAME, QLIGG_PLUGIN_NAME, 'manage_options', QLIGG_DOMAIN, array($this, 'settings_welcome'), 'dashicons-camera');
141
+ add_submenu_page(QLIGG_DOMAIN, __('Welcome', 'insta-gallery'), esc_html__('Welcome', 'insta-gallery'), 'manage_options', QLIGG_DOMAIN, array($this, 'settings_welcome'));
142
+ add_submenu_page(QLIGG_DOMAIN, __('Token', 'insta-gallery'), esc_html__('Token', 'insta-gallery'), 'edit_posts', QLIGG_DOMAIN . '_token', array($this, 'settings_token'));
143
+ add_submenu_page(QLIGG_DOMAIN, __('Gallery', 'insta-gallery'), esc_html__('Gallery', 'insta-gallery'), 'edit_posts', QLIGG_DOMAIN . '_feeds', array($this, 'settings_feeds'));
144
+ add_submenu_page(QLIGG_DOMAIN, __('Documentation', 'insta-gallery'), esc_html__('Documentation', 'insta-gallery'), 'edit_posts', QLIGG_DOMAIN . '_documentation', array($this, 'settings_documentation'));
145
+ }
146
+
147
+ function add_admin_js($hook) {
148
+ if (isset($_GET['page']) && strpos($_GET['page'], QLIGG_DOMAIN) !== false) {
149
+ wp_enqueue_style('qligg-admin', plugins_url('/assets/css/qligg-admin.min.css', QLIGG_PLUGIN_FILE), null, QLIGG_PLUGIN_VERSION, 'all');
150
+ wp_enqueue_script('qligg-admin', plugins_url('/assets/js/qligg-admin.min.js', QLIGG_PLUGIN_FILE), array('jquery'), QLIGG_PLUGIN_VERSION);
151
+
152
+ wp_enqueue_media();
153
+ }
154
+ }
155
+
156
+ function init() {
157
+ //add_action('wp_ajax_qligg_dismiss_notice', array($this, 'ajax_dismiss_notice'));
158
+ //add_action('admin_notices', array($this, 'add_notices'));
159
+ add_action('admin_enqueue_scripts', array($this, 'add_admin_js'));
160
+ add_action('admin_menu', array($this, 'add_menu'));
161
+ add_filter('plugin_action_links_' . plugin_basename(QLIGG_PLUGIN_FILE), array($this, 'add_action_links'));
162
+ }
163
+
164
+ public static function instance() {
165
+ if (!isset(self::$instance)) {
166
+ self::$instance = new self();
167
+ self::$instance->init();
168
+ }
169
+ return self::$instance;
170
+ }
171
+
172
+ }
173
+
174
+ QLIGG_Settings::instance();
175
+ }
includes/utis.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH'))
4
+ exit;
5
+
6
+ global $qligg, $qligg_api;
7
+
8
+ // Save account info
9
+ // -----------------------------------------------------------------------------
10
+ function qligg_save_options() {
11
+ global $qligg;
12
+ $option = $qligg;
13
+ $option = array_map(function ($value) {
14
+ return base64_encode($value);
15
+ }, $option);
16
+ update_option('insta_gallery_iac', $option, false);
17
+ }
18
+
19
+ // clear old cache
20
+ function qligg_clear_transients($tk = false) {
21
+ if ($tk) {
22
+ delete_transient($tk);
23
+ } else {
24
+ delete_transient('instagallery_user_profile_info');
25
+ delete_transient('instagallery_user_feed');
26
+ }
27
+ }
28
+
29
+ // Return profile info
30
+ // -----------------------------------------------------------------------------
31
+ function qligg_get_user_profile_info() {
32
+
33
+ global $qligg, $qligg_api;
34
+
35
+ if (!$profile_info = get_transient('instagallery_user_profile_info')) {
36
+ if ($profile_info = $qligg_api->get_user_profile_info($qligg['access_token'])) {
37
+ set_transient('instagallery_user_profile_info', $profile_info, HOUR_IN_SECONDS);
38
+ }
39
+ }
40
+
41
+ return $profile_info;
42
+ }
43
+
44
+ // Get user feed
45
+ // -----------------------------------------------------------------------------
46
+ function qligg_get_user_items($item = array()) {
47
+
48
+ global $qligg, $qligg_api;
49
+
50
+ $instagram_items = '';
51
+
52
+ $limit = isset($item['insta_user-limit']) ? absint($item['insta_user-limit']) : 12;
53
+
54
+ if (empty($qligg['access_token'])) {
55
+ return '';
56
+ }
57
+
58
+ $tk = 'instagallery_user_feed'; // transient key
59
+
60
+ $tkart = $tk . '_artimeout'; // transient key admin request timeout
61
+
62
+ if (!QLIGG_PRODUCTION || (current_user_can('administrator') && (false === get_transient($tkart)))) {
63
+
64
+ $instagram_items = $qligg_api->get_user_media($qligg['access_token'], $limit);
65
+
66
+ if (!empty($instagram_items)) {
67
+ set_transient($tk, $instagram_items, 2 * HOUR_IN_SECONDS);
68
+ set_transient($tkart, true, 5 * MINUTE_IN_SECONDS);
69
+ }
70
+
71
+ } else {
72
+ // Get any existing copy of our transient data
73
+ if (false === ($instagram_items = get_transient($tk))) {
74
+
75
+ $instagram_items = $qligg_api->get_user_media($qligg['access_token'], $limit);
76
+
77
+ if (!empty($instagram_items)) {
78
+ set_transient($tk, $instagram_items, 2 * HOUR_IN_SECONDS);
79
+ }
80
+ }
81
+ }
82
+
83
+ return $instagram_items;
84
+ }
85
+
86
+ // Get tag items
87
+ // -----------------------------------------------------------------------------
88
+ function qligg_get_tag_items($item) {
89
+ global $qligg_api;
90
+
91
+ $instagram_items = '';
92
+
93
+ if (empty($item['insta_tag'])) {
94
+ return '';
95
+ }
96
+
97
+ $tk = 'instagallery_tag_' . $item['insta_tag']; // transient key
98
+
99
+ $tkart = $tk . '_artimeout'; // transient key admin request timeout
100
+
101
+ if (!QLIGG_PRODUCTION || (current_user_can('administrator') && (false === get_transient($tkart)))) {
102
+
103
+ $instagram_items = $qligg_api->get_tag_items($item['insta_tag']);
104
+
105
+ if (!empty($instagram_items)) {
106
+ set_transient($tk, $instagram_items, 2 * HOUR_IN_SECONDS);
107
+ set_transient($tkart, true, 5 * MINUTE_IN_SECONDS);
108
+ }
109
+ } else {
110
+ // Get any existing copy of our transient data
111
+ if (false === ($instagram_items = get_transient($tk))) {
112
+ $instagram_items = $qligg_api->get_tag_items($item['insta_tag']);
113
+ if (!empty($instagram_items)) {
114
+ set_transient($tk, $instagram_items, 2 * HOUR_IN_SECONDS);
115
+ }
116
+ }
117
+ }
118
+
119
+ return $instagram_items;
120
+ }
includes/widget.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH'))
3
+ exit;
4
+
5
+ class QLIGG_Widget extends WP_Widget {
6
+
7
+ public function __construct() {
8
+ parent::__construct('QLIGG_Widget', __('Instagram Gallery', 'insta-gallery'), array(
9
+ 'classname' => 'instagal-widget',
10
+ 'description' => esc_html__('Displays your Instagram Gallery', 'insta-gallery')
11
+ ));
12
+ }
13
+
14
+ public function widget($args, $instance) {
15
+ $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
16
+ $instagal_id = empty($instance['instagal_id']) ? '' : $instance['instagal_id'];
17
+
18
+ echo $args['before_widget'];
19
+
20
+ if (!empty($title)) {
21
+ echo $args['before_title'] . wp_kses_post($title) . $args['after_title'];
22
+ }
23
+
24
+ if (!empty($instagal_id)) {
25
+ echo do_shortcode('[insta-gallery id="' . $instagal_id . '"]');
26
+ }
27
+
28
+ echo $args['after_widget'];
29
+ }
30
+
31
+ public function form($instance) {
32
+ $instance = wp_parse_args((array) $instance, array(
33
+ 'title' => '',
34
+ 'instagal_id' => 0,
35
+ ));
36
+
37
+ $title = $instance['title'];
38
+ $instagal_id = $instance['instagal_id'];
39
+ $InstaGalleryItems = get_option('insta_gallery_items');
40
+ ?>
41
+ <p>
42
+ <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title', 'insta-gallery'); ?>: <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label>
43
+ </p>
44
+ <?php if (!empty($InstaGalleryItems) && is_array($InstaGalleryItems)): ?>
45
+ <p>
46
+ <label for="<?php echo esc_attr($this->get_field_id('instagal_id')); ?>"><?php esc_html_e('Select Instagram Gallery', 'insta-gallery'); ?>: </label> <select
47
+ id="<?php echo esc_attr($this->get_field_id('instagal_id')); ?>" name="<?php echo esc_attr($this->get_field_name('instagal_id')); ?>" class="widefat">
48
+ <?php
49
+ foreach ($InstaGalleryItems as $k => $IGItem) {
50
+ $label = '';
51
+ if ($IGItem['ig_select_from'] == 'username') {
52
+ $label = __('Username', 'insta-gallery') . ' / ' . $IGItem['insta_user'];
53
+ } else {
54
+ $label = __('Tagname', 'insta-gallery') . ' / ' . $IGItem['insta_tag'];
55
+ }
56
+ ?>
57
+ <option value="<?php echo $k; ?>" <?php selected($k, $instagal_id) ?>><?php echo $label; ?></option>
58
+ <?php } ?>
59
+ </select>
60
+ </p>
61
+ <?php else: ?>
62
+ <p style="color: #e23565;">
63
+ <?php _e('Please add Gallery item in plugin panel, Then come back and select your Gallery to display.', 'insta-gallery'); ?>
64
+ </p>
65
+ <?php endif; ?>
66
+ <p style="text-align: center;" >
67
+ <a href="<?php echo admin_url('admin.php?page=qligg'); ?>"><?php _e('Add New Gallery', 'insta-gallery'); ?></a>
68
+ </p>
69
+ <?php
70
+ }
71
+
72
+ public function update($new_instance, $old_instance) {
73
+ $instance = $old_instance;
74
+ $instance['title'] = strip_tags($new_instance['title']);
75
+ $instance['instagal_id'] = trim(strip_tags($new_instance['instagal_id']));
76
+ return $instance;
77
+ }
78
+
79
+ }
insta-gallery.php CHANGED
@@ -1,268 +1,119 @@
1
  <?php
 
2
  /*
3
- * Plugin Name: Instagram Gallery
4
- * Description: Display pictures gallery on the website from Instagram account.
5
- * Author: Karan Singh
6
- * Author URI: https://www.karansingh.ml/
7
  * Requires at least: 3.8
8
  * Requires PHP: 5.3
9
  * Tested up to: 5.1
10
  * Text Domain: insta-gallery
11
  * Domain Path: /languages/
12
- * Version: 2.1.8
13
  */
14
 
15
- /*
16
- * ****** ****** ***** ****** ***** ******
17
- * min CSS/JS, update ENV, Testing
18
- * ****** TODO: ****
19
- *
20
- *
21
- */
22
- if (! defined('ABSPATH')) {
23
- exit(); // Exit if accessed directly.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
 
26
- // global constants
27
- define('INSGALLERY_VER', '2.1.8');
28
- define('INSGALLERY_PRODUCTION', true);
29
 
30
- define('INSGALLERY_PATH', plugin_dir_path(__FILE__));
31
- define('INSGALLERY_URL', plugins_url('', __FILE__));
32
- define('INSGALLERY_PLUGIN_DIR', plugin_basename(dirname(__FILE__)));
33
 
34
- class INSGALLERY
35
- {
36
 
37
- public function __construct()
38
- {
39
- register_activation_hook(__FILE__, array(
40
- $this,
41
- 'activate'
42
- ));
43
- register_deactivation_hook(__FILE__, array(
44
- $this,
45
- 'deactivate'
46
- ));
47
-
48
- if (is_admin()) {
49
- add_action('admin_menu', array(
50
- $this,
51
- 'loadMenus'
52
- ));
53
- // add setting link
54
- add_filter('plugin_action_links', array(
55
- $this,
56
- 'insgal_add_action_plugin'
57
- ), 10, 5);
58
-
59
- // save ig adv. setting
60
- add_action('wp_ajax_save_igadvs', array(
61
- $this,
62
- 'save_igadvs'
63
- ));
64
-
65
- // update ig token
66
- add_action('wp_ajax_igara_update_token', array(
67
- $this,
68
- 'update_token'
69
- ));
70
-
71
- // generate ig token
72
- add_action('wp_ajax_igara_generate_token', array(
73
- $this,
74
- 'generate_token'
75
- ));
76
-
77
- // remove ig token
78
- add_action('wp_ajax_igara_remove_token', array(
79
- $this,
80
- 'remove_token'
81
- ));
82
-
83
- // remove ig token
84
- add_action('admin_init', array(
85
- $this,
86
- 'admin_init'
87
- ));
88
- }
89
-
90
- add_action('admin_enqueue_scripts', array(
91
- $this,
92
- 'load_admin_scripts'
93
- ));
94
-
95
- include_once (INSGALLERY_PATH . 'app/inc/utis.php');
96
- include_once (INSGALLERY_PATH . 'app/wp-front.php');
97
- include_once (INSGALLERY_PATH . 'app/wp-widget.php');
98
-
99
- // load Translations
100
- add_action('plugins_loaded', array(
101
- $this,
102
- 'load_translations_instagal'
103
- ));
104
  }
105
 
106
- public function activate()
107
- {}
108
-
109
- public function deactivate()
110
- {}
111
-
112
- function save_igadvs()
113
- {
114
- if (! isset($_POST['ig_nonce']) || ! wp_verify_nonce($_POST['ig_nonce'], 'igfreq_nonce_key')) {
115
- wp_send_json_error('Invalid Request.');
116
- }
117
- $igs_spinner_image_id = '';
118
- $igs_flush = (isset($_POST['igs_flush']) && $_POST['igs_flush']) ? true : false;
119
- if (! empty($_POST['igs_spinner_image_id'])) {
120
- $igs_spinner_image_id = (int) $_POST['igs_spinner_image_id'];
121
- }
122
- $insta_gallery_setting = array(
123
- 'igs_flush' => $igs_flush,
124
- 'igs_spinner_image_id' => $igs_spinner_image_id
125
- );
126
- update_option('insta_gallery_setting', $insta_gallery_setting, false);
127
-
128
- wp_send_json_success(__('settings updated successfully', 'insta-gallery'));
129
  }
130
 
131
- function update_token()
132
- {
133
- if (! isset($_POST['ig_nonce']) || ! wp_verify_nonce($_POST['ig_nonce'], 'igfreq_nonce_key')) {
134
- wp_send_json_error('Invalid Request.');
135
- }
136
- if (empty($_POST['ig_access_token'])) {
137
- wp_send_json_error('please enter valid Access Token.');
138
- }
139
- $ig_access_token = filter_var($_POST['ig_access_token'], FILTER_SANITIZE_STRING);
140
- if (! $ig_access_token) {
141
- wp_send_json_error('please enter valid Access Token.');
142
- }
143
- global $insgalleryIAC, $iispi;
144
-
145
- $valid = $iispi->isTokenValid($ig_access_token);
146
- if ($valid !== true) {
147
- wp_send_json_error($valid);
148
- }
149
-
150
- $insgalleryIAC['access_token'] = $ig_access_token;
151
- igf_saveIAC();
152
-
153
- igf_clearTransients();
154
-
155
- wp_send_json_success(__('Token updated successfully', 'insta-gallery'));
156
  }
157
 
158
- function generate_token()
159
- {
160
- if (! isset($_POST['ig_nonce']) || ! wp_verify_nonce($_POST['ig_nonce'], 'igfreq_nonce_key')) {
161
- wp_send_json_error('Invalid Request.');
162
- }
163
- if (empty($_POST['ig_client_id'])) {
164
- wp_send_json_error('please enter valid Client ID.');
165
- }
166
- if (empty($_POST['ig_client_secret'])) {
167
- wp_send_json_error('please enter valid Client Secret.');
168
- }
169
- $ig_client_id = filter_var($_POST['ig_client_id'], FILTER_SANITIZE_STRING);
170
- $ig_client_secret = filter_var($_POST['ig_client_secret'], FILTER_SANITIZE_STRING);
171
- if (! $ig_client_id || ! $ig_client_secret) {
172
- wp_send_json_error('please enter valid details.');
173
- }
174
- global $insgalleryIAC;
175
- $insgalleryIAC['client_id'] = $ig_client_id;
176
- $insgalleryIAC['client_secret'] = $ig_client_secret;
177
- igf_saveIAC();
178
- $link = igf_getCodegURL();
179
-
180
- wp_send_json_success($link);
181
- }
182
 
183
- function remove_token()
184
- {
185
- if (! isset($_POST['ig_nonce']) || ! wp_verify_nonce($_POST['ig_nonce'], 'igfreq_nonce_key')) {
186
- wp_send_json_error('Invalid Request.');
187
- }
188
- global $insgalleryIAC;
189
- $insgalleryIAC['access_token'] = '';
190
- $insgalleryIAC['client_secret'] = '';
191
- igf_saveIAC();
192
-
193
- wp_send_json_success(__('Token removed successfully', 'insta-gallery'));
194
- }
195
 
196
- function admin_init()
197
- {
198
- if (current_user_can('administrator') && isset($_REQUEST['igigresponse'])) {
199
- if (! empty($_REQUEST['code'])) {
200
- $code = filter_var($_REQUEST['code'], FILTER_SANITIZE_STRING);
201
- if ($code) {
202
- global $insgalleryIAC, $iispi;
203
- $red_uri = igf_getIGRedURI();
204
- $token = $iispi->getAccessToken($insgalleryIAC['client_id'], $insgalleryIAC['client_secret'], $red_uri, $code);
205
- if ($token) {
206
- $insgalleryIAC['code'] = $code;
207
- $insgalleryIAC['access_token'] = $token;
208
- igf_saveIAC();
209
- igf_clearTransients();
210
- }
211
- }
212
- }
213
- }
214
- }
215
 
216
- function load_translations_instagal()
217
- {
218
- load_plugin_textdomain('insta-gallery', false, INSGALLERY_PLUGIN_DIR . '/languages/');
219
  }
220
 
221
- function load_admin_scripts($hook)
222
- {
223
- // Load only on plugin page
224
- if ($hook != 'settings_page_insta_gallery') {
225
- return;
226
- }
227
- wp_enqueue_style('insta-gallery-admin', INSGALLERY_URL . '/assets/admin-style.css', array(), INSGALLERY_VER);
228
-
229
- // Enqueue WordPress media scripts
230
- wp_enqueue_media();
231
  }
232
 
233
- function loadMenus()
234
- {
235
- add_options_page(__('Instagram Gallery', 'insta-gallery'), __('Instagram Gallery', 'insta-gallery'), 'manage_options', 'insta_gallery', array(
236
- $this,
237
- 'loadPanel'
238
- ));
239
- // add_menu_page();
240
  }
241
 
242
- function loadPanel()
243
- {
244
- if(!current_user_can('administrator')){
245
- return;
246
- }
247
- require_once (INSGALLERY_PATH . 'app/wp-panel.php');
248
  }
249
 
250
- function insgal_add_action_plugin($actions, $plugin_file)
251
- {
252
- static $plugin;
253
-
254
- if (! isset($plugin))
255
- $plugin = plugin_basename(__FILE__);
256
- if ($plugin == $plugin_file) {
257
-
258
- $settings = array(
259
- 'settings' => '<a href="options-general.php?page=insta_gallery">' . __('Settings', 'insta-gallery') . '</a>'
260
- );
261
-
262
- $actions = array_merge($settings, $actions);
263
- }
264
-
265
- return $actions;
266
  }
267
- }
268
- new INSGALLERY();
 
 
 
1
  <?php
2
+
3
  /*
4
+ * Plugin Name: Instagram Feed Gallery
5
+ * Description: Display beautifull and responsive galleries on your website from your Instagram feed account.
6
+ * Author: QuadLayers
7
+ * Author URI: https://www.quadlayers.com
8
  * Requires at least: 3.8
9
  * Requires PHP: 5.3
10
  * Tested up to: 5.1
11
  * Text Domain: insta-gallery
12
  * Domain Path: /languages/
13
+ * Version: 2.2.3
14
  */
15
 
16
+ if (!defined('ABSPATH'))
17
+ exit;
18
+
19
+ if (!defined('QLIGG_PLUGIN_NAME')) {
20
+ define('QLIGG_PLUGIN_NAME', 'Instagram Gallery');
21
+ }
22
+ if (!defined('QLIGG_PLUGIN_VERSION')) {
23
+ define('QLIGG_PLUGIN_VERSION', '2.2.3');
24
+ }
25
+ if (!defined('QLIGG_PLUGIN_FILE')) {
26
+ define('QLIGG_PLUGIN_FILE', __FILE__);
27
+ }
28
+ if (!defined('QLIGG_PLUGIN_DIR')) {
29
+ define('QLIGG_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR);
30
+ }
31
+ if (!defined('QLIGG_DOMAIN')) {
32
+ define('QLIGG_DOMAIN', 'qligg');
33
+ }
34
+ if (!defined('QLIGG_WORDPRESS_URL')) {
35
+ define('QLIGG_WORDPRESS_URL', 'https://wordpress.org/plugins/insta-gallery/');
36
+ }
37
+ if (!defined('QLIGG_REVIEW_URL')) {
38
+ define('QLIGG_REVIEW_URL', 'https://wordpress.org/support/plugin/insta-gallery/reviews/?filter=5#new-post');
39
+ }
40
+ if (!defined('QLIGG_DEMO_URL')) {
41
+ define('QLIGG_DEMO_URL', 'https://quadlayers.com/portfolio/wordpress-instagram-feed/?utm_source=qligg_admin');
42
+ }
43
+ if (!defined('QLIGG_PURCHASE_URL')) {
44
+ define('QLIGG_PURCHASE_URL', QLIGG_DEMO_URL);
45
+ }
46
+ if (!defined('QLIGG_SUPPORT_URL')) {
47
+ define('QLIGG_SUPPORT_URL', 'https://quadlayers.com/account/support/?utm_source=qligg_admin');
48
+ }
49
+ if (!defined('QLIGG_GROUP_URL')) {
50
+ define('QLIGG_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
51
+ }
52
+ if (!defined('QLIGG_PRODUCTION')) {
53
+ define('QLIGG_PRODUCTION', true);
54
  }
55
 
56
+ if (!class_exists('QLIGG')) {
 
 
57
 
58
+ class QLIGG {
 
 
59
 
60
+ protected static $instance;
 
61
 
62
+ public function activate() {
63
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
+ public function deactivate() {
67
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
 
70
+ function register_widget() {
71
+ register_widget('QLIGG_Widget');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
+ function api() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
+ global $qligg_api;
 
 
 
 
 
 
 
 
 
 
 
77
 
78
+ if (!class_exists('QLIGG_API')) {
79
+
80
+ include_once ('includes/API.php');
81
+ include_once ('includes/AJAX.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
+ $qligg_api = new QLIGG_API();
84
+ }
 
85
  }
86
 
87
+ function includes() {
88
+ include_once ('includes/utis.php');
89
+ include_once ('includes/widget.php');
90
+ include_once ('includes/defaults.php');
91
+ include_once ('includes/settings.php');
92
+ include_once ('includes/frontend.php');
 
 
 
 
93
  }
94
 
95
+ function i18n() {
96
+ load_plugin_textdomain('insta-gallery', false, QLIGG_PLUGIN_DIR . '/languages/');
 
 
 
 
 
97
  }
98
 
99
+ function init() {
100
+ //register_activation_hook(__FILE__, array($this, 'activate'));
101
+ //register_deactivation_hook(__FILE__, array($this, 'deactivate'));
102
+ add_action('widgets_init', array($this, 'register_widget'));
103
+ add_action('plugins_loaded', array($this, 'i18n'));
 
104
  }
105
 
106
+ public static function instance() {
107
+ if (!isset(self::$instance)) {
108
+ self::$instance = new self();
109
+ self::$instance->api();
110
+ self::$instance->includes();
111
+ self::$instance->init();
112
+ }
113
+ return self::$instance;
 
 
 
 
 
 
 
 
114
  }
115
+
116
+ }
117
+
118
+ QLIGG::instance();
119
+ }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Instagram Gallery ===
2
- Contributors: buntisoft, sktei007
3
  Tags: instagram, instagram feed, instagram widget, gallery widget, pictures, carousel slider, image gallery, image slider, instagram gallery, instagram pictures
4
  Requires at least: 3.8.0
5
  Requires PHP: 5.3
6
  Tested up to: 5.1
7
- Stable tag: 2.1.8
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://www.paypal.me/karanpay
@@ -70,6 +70,16 @@ this error visible sometimes in PHP 7+ installations due to the missing CURL ext
70
  5. Gallery Widget
71
 
72
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
73
  = 2.1.8 =
74
  * Fixed: double popup issue with elementor plugin
75
  * swiper library updated
@@ -241,6 +251,9 @@ this error visible sometimes in PHP 7+ installations due to the missing CURL ext
241
 
242
 
243
  == Upgrade Notice ==
 
 
 
244
  = 2.1.8 =
245
  double popup issue solved while using elementor plugin
246
 
1
+ === Instagram Feed Gallery ===
2
+ Contributors: quadlayers
3
  Tags: instagram, instagram feed, instagram widget, gallery widget, pictures, carousel slider, image gallery, image slider, instagram gallery, instagram pictures
4
  Requires at least: 3.8.0
5
  Requires PHP: 5.3
6
  Tested up to: 5.1
7
+ Stable tag: 2.1.9
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://www.paypal.me/karanpay
70
  5. Gallery Widget
71
 
72
  == Changelog ==
73
+
74
+ = 2.2.1 =
75
+ * uninstall improvement
76
+
77
+ = 2.2.0 =
78
+ * author change
79
+
80
+ = 2.1.9 =
81
+ * minor code changes
82
+
83
  = 2.1.8 =
84
  * Fixed: double popup issue with elementor plugin
85
  * swiper library updated
251
 
252
 
253
  == Upgrade Notice ==
254
+ = 2.1.9 =
255
+ minor code changes
256
+
257
  = 2.1.8 =
258
  double popup issue solved while using elementor plugin
259
 
uninstall.php CHANGED
@@ -1,15 +1,14 @@
1
  <?php
2
 
3
- if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
4
- exit();
5
  }
6
- // remove all settings related to the plugin
7
- function insgal_delete_plugin() {
8
- $InstaGallerySetting = get_option('insta_gallery_setting');
9
- if(!empty($InstaGallerySetting['igs_flush'])){
10
- delete_option( 'insta_gallery_setting' );
11
- delete_option( 'insta_gallery_items' );
12
- delete_option( 'insta_gallery_iac' );
13
- }
14
  }
15
- insgal_delete_plugin();
1
  <?php
2
 
3
+ if (!defined('WP_UNINSTALL_PLUGIN')) {
4
+ die(-1);
5
  }
6
+
7
+ if (!is_multisite()) {
8
+ $qligg = get_option('insta_gallery_setting');
9
+ if (!empty($$qligg['igs_flush'])) {
10
+ delete_option('insta_gallery_setting');
11
+ delete_option('insta_gallery_items');
12
+ delete_option('insta_gallery_iac');
13
+ }
14
  }