Instagram Gallery - Version 2.1.8

Version Description

  • Fixed: double popup issue with elementor plugin
  • swiper library updated
  • minor text changes
Download this release

Release Info

Developer buntisoft
Plugin Icon 128x128 Instagram Gallery
Version 2.1.8
Comparing to
See all releases

Code changes from version 1.6.6 to 2.1.8

app/Libra/InstagramSpider.php DELETED
@@ -1,257 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Instagram Spider [MOD : WP - Insta Gallery]
5
- * @author Karan Singh
6
- * @version 1.4.1
7
- * @depends RUSpider
8
- * @description script to get instagram media by using Username and Tag-name. added WP (wp_remote_request) to run in WP.
9
- */
10
-
11
- // loading dependencies
12
- class InstagramSpider
13
- {
14
-
15
- protected $instagram;
16
-
17
- // handle raw result from server, for further processing in your app
18
- public $instagramResult;
19
-
20
- public $messages;
21
-
22
- private $resultsLimit;
23
-
24
- public function __construct()
25
- {
26
- $this->instagram = 'https://www.instagram.com/';
27
- $this->messages = array();
28
- $this->resultsLimit = 50; // limit to 50 only
29
- }
30
-
31
- /**
32
- * takes username and return items list array
33
- *
34
- * @param string $username
35
- * @return array|false
36
- */
37
- public function getUserItems($username = '')
38
- {
39
- $username = urlencode((string) $username); // non-english string support
40
- if (empty($username)) {
41
- $this->messages[] = 'Please provide a valid username';
42
- return false;
43
- }
44
-
45
- $items = array();
46
-
47
- // $inURL = $this->instagram . $username . '/media/';
48
- // $inURL = $this->instagram . $username . '/?__a=1';
49
- $inURL = 'https://apinsta.herokuapp.com/u/' . $username; // CLOSED
50
- // For next 12 images, use ID of the last item (maxId = media.nodes[11].id) in the max_id param: /{USER_NAME}/?__a=1&max_id={maxId}
51
- /*
52
- $instaRes = $this->igSpider($inURL);
53
- $instaRes = @json_decode($instaRes);
54
-
55
- if (isset($instaRes->graphql->user->edge_owner_to_timeline_media->edges)) {
56
- $instaItems = $instaRes->graphql->user->edge_owner_to_timeline_media->edges;
57
- if (! empty($instaItems) && is_array($instaItems)) {
58
- $instaItems = array_slice($instaItems, 0, $this->resultsLimit);
59
- foreach ($instaItems as $res) {
60
- // its to check if this API have required variables
61
- if (! isset($res->node->display_url)) {
62
- continue;
63
- }
64
-
65
- $type = 'image';
66
- if (isset($res->node->is_video) && (true === $res->node->is_video)) {
67
- $type = 'video';
68
- }
69
- $caption = isset($res->node->edge_media_to_caption->edges[0]->node->text) ? htmlspecialchars($res->node->edge_media_to_caption->edges[0]->node->text) : '';
70
- $items[] = array(
71
- 'img_standard' => $res->node->display_url,
72
- 'img_low' => $res->node->thumbnail_src,
73
- 'img_thumb' => $res->node->thumbnail_resources[0]->src,
74
- 'likes' => $res->node->edge_liked_by->count,
75
- 'comments' => $res->node->edge_media_to_comment->count,
76
- 'caption' => '', // $caption
77
- 'code' => $res->node->shortcode,
78
- 'type' => $type,
79
- 'owner_id' => $res->node->owner->id
80
- );
81
- }
82
- }
83
- }
84
- */
85
-
86
- // if empty, continus with the HTML API
87
- if (empty($items)) {
88
- $inURL = $this->instagram . $username . '/';
89
- $items = $this->getFromHtmlAPI($inURL);
90
- }
91
-
92
- return empty($items) ? false : $items;
93
- }
94
-
95
- /**
96
- * takes #Tag name and return items list array
97
- *
98
- * @param string $tag
99
- * @param boolean get top posts (10 posts)
100
- * @return array|false
101
- */
102
- public function getTagItems($tag = '', $getTopItems = false)
103
- {
104
- $tag = urlencode((string) $tag);
105
- if (empty($tag)) {
106
- $this->messages[] = 'Please provide a valid # tag';
107
- return false;
108
- }
109
- $inURL = $this->instagram . 'explore/tags/' . $tag . '/?__a=1';
110
- $instaRes = $this->igSpider($inURL);
111
- $instaRes = json_decode($instaRes);
112
-
113
- $items = array();
114
- // continue to next API : API updated on Jan 03 17
115
- if (isset($instaRes->graphql->hashtag->edge_hashtag_to_media->edges)) {
116
- $instaItems = $instaRes->graphql->hashtag->edge_hashtag_to_media->edges;
117
-
118
- // get top posts
119
- if ($getTopItems && isset($instaRes->graphql->hashtag->edge_hashtag_to_top_posts->edges)) {
120
- $instaItems = $instaRes->graphql->hashtag->edge_hashtag_to_top_posts->edges;
121
- }
122
-
123
- if (! empty($instaItems) && is_array($instaItems)) {
124
- $instaItems = array_slice($instaItems, 0, $this->resultsLimit);
125
- foreach ($instaItems as $res) {
126
- // its to check if this API have required variables
127
- if (! isset($res->node->display_url)) {
128
- continue;
129
- }
130
- $type = 'image';
131
- if (isset($res->node->is_video) && (true === $res->node->is_video)) {
132
- $type = 'video';
133
- }
134
- $caption = isset($res->node->edge_media_to_caption->edges[0]->node->text) ? htmlspecialchars($res->node->edge_media_to_caption->edges[0]->node->text) : '';
135
- $items[] = array(
136
- 'img_standard' => $res->node->display_url,
137
- 'img_low' => $res->node->thumbnail_src,
138
- 'img_thumb' => $res->node->thumbnail_resources[0]->src,
139
- 'likes' => $res->node->edge_liked_by->count,
140
- 'comments' => $res->node->edge_media_to_comment->count,
141
- 'caption' => '', // $caption
142
- 'code' => $res->node->shortcode,
143
- 'type' => $type,
144
- 'owner_id' => $res->node->owner->id
145
- );
146
- }
147
- }
148
- }
149
-
150
- // if empty, continus with the HTML API
151
- if (empty($items)) {
152
- $inURL = $this->instagram . 'explore/tags/' . $tag . '/';
153
- $items = $this->getFromHtmlAPI($inURL);
154
- }
155
-
156
- return empty($items) ? false : $items;
157
- }
158
-
159
- /**
160
- * takes page URL and return items list array
161
- *
162
- * @param
163
- * string url
164
- * @return array
165
- */
166
- protected function getFromHtmlAPI($inURL = '')
167
- {
168
- $instaRes = $this->igSpider($inURL);
169
-
170
- $items = array();
171
-
172
- if (! empty($instaRes)) {
173
- $insta_json = explode('window._sharedData = ', $instaRes);
174
- $insta_json = explode(';</script>', $insta_json[1]);
175
- $instaArray = json_decode($insta_json[0], true);
176
-
177
- $nodes = array();
178
- if (isset($instaArray['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'])) {
179
- $nodes = $instaArray['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'];
180
- } else if (isset($instaArray['entry_data']['TagPage'][0]['graphql']['hashtag']['edge_hashtag_to_media']['edges'])) {
181
- $nodes = $instaArray['entry_data']['TagPage'][0]['graphql']['hashtag']['edge_hashtag_to_media']['edges'];
182
- }
183
- if (! empty($nodes) && is_array($nodes)) {
184
- $nodes = array_slice($nodes, 0, $this->resultsLimit);
185
- foreach ($nodes as $node) {
186
- // its to check if this API have required variables
187
- if (! isset($node['node']['display_url'])) {
188
- continue;
189
- }
190
- $node = $node['node'];
191
-
192
- $type = 'image';
193
- if (isset($node['is_video']) && (true === $node['is_video'])) {
194
- $type = 'video';
195
- }
196
- $caption = (! empty($node['caption'])) ? $node['caption'] : '';
197
- $items[] = array(
198
- 'img_standard' => $node['display_url'],
199
- 'img_low' => $node['thumbnail_src'],
200
- 'img_thumb' => $node['thumbnail_resources'][0]['src'],
201
- 'likes' => $node['edge_liked_by']['count'],
202
- 'comments' => $node['edge_media_to_comment']['count'],
203
- 'caption' => '', // $caption
204
- 'code' => $node['shortcode'],
205
- 'type' => $type,
206
- 'owner_id' => $node['owner']['id']
207
- );
208
- }
209
- }
210
- }
211
-
212
- return empty($items) ? false : $items;
213
- }
214
-
215
- /**
216
- * takes URL string and return URL content
217
- *
218
- * @param string $url
219
- * @return string|boolean
220
- */
221
- public function igSpider($url = '')
222
- {
223
- if (empty($url) || (! filter_var($url, FILTER_VALIDATE_URL))) {
224
- $this->messages[] = 'Please provide a Valid URL';
225
- return false;
226
- }
227
- $instaItems = '';
228
-
229
- // get results if script executed in WP
230
- if (function_exists('wp_remote_request')) {
231
- $result = wp_remote_request($url);
232
- if (is_wp_error($result)) {
233
- $this->messages[] = 'WP Error: ' . implode(', ', $result->get_error_messages());
234
- } else {
235
- if (200 !== wp_remote_retrieve_response_code($result)) {
236
- $this->messages[] = 'Invalid response from Instagram.';
237
- } else {
238
- if (! empty($result['body'])) {
239
- $instaItems = $result['body'];
240
- }
241
- }
242
- }
243
- } else {
244
- $this->messages[] = 'Error: running outside WP.';
245
- }
246
-
247
- $this->instagramResult = $instaItems;
248
- return $instaItems;
249
- }
250
-
251
- // return messages array
252
- public function getMessages()
253
- {
254
- return array_unique($this->messages);
255
- }
256
- }
257
-
app/inc/IGIASpi.php ADDED
@@ -0,0 +1,251 @@
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 ADDED
@@ -0,0 +1,144 @@
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 ADDED
@@ -0,0 +1,250 @@
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 ADDED
@@ -0,0 +1,145 @@
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 CHANGED
@@ -2,7 +2,7 @@
2
if (! defined('ABSPATH')) {
3
die();
4
}
5
-
6
$InstaGalleryItem = null;
7
if (isset($_GET['ig_item']) && ! empty($_GET['ig_item'])) {
8
$ig_item_id = (int) $_GET['ig_item'];
@@ -33,7 +33,8 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
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 class="dashicons dashicons-arrow-left-alt"></span><?php _e('Back to List','insta-gallery'); ?></a>
37
</p>
38
39
<!-- Fix: Exifography plugin drag-n-drop rows issue -->
@@ -49,9 +50,10 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
49
<td>
50
<ul class="ig-list-buttons">
51
<li><input type="radio" id="ig_select_from-username" name="ig_select_from" value="username" <?php if($active_username) echo 'checked';?> /><label
52
- for="ig_select_from-username"><?php _e('Username','insta-gallery'); ?></label>
53
<div class="check"></div></li>
54
- <li><input type="radio" id="ig_select_from-tag" name="ig_select_from" value="tag" <?php if($active_tag) echo 'checked';?> /> <label for="ig_select_from-tag"><?php _e('Tagname','insta-gallery'); ?></label>
55
<div class="check"></div></li>
56
</ul> <span class="description"> (<?php _e('Please select option to display pictures from Instagram Username OR # Tag.','insta-gallery'); ?>)</span>
57
@@ -62,17 +64,27 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
62
<table>
63
<tr>
64
<th scope="row"><?php _e('Instagram Username','insta-gallery'); ?>:</th>
65
- <td><input name="insta_user" type="text" placeholder="myusername" value="<?php if(!empty($InstaGalleryItem['insta_user'])){echo $InstaGalleryItem['insta_user']; }?>" /> <span
66
- class="description">e.g. <strong class="ig-thm-color" style="font-size: 130%;">myusername</strong><br /> <small>https://www.instagram.com/<strong class="ig-thm-color"
67
- style="font-size: 130%;">myusername</strong>/
68
- </small>
69
- </span>
70
- <p class="ig-generate-msgs"><?php _e('Please enter Instagram Username.','insta-gallery'); ?></p></td>
71
</tr>
72
<tr>
73
<th scope="row"><?php _e('Pictures Limit','insta-gallery'); ?>:</th>
74
<td><input name="insta_user-limit" type="number" min="1" max="50"
75
- value="<?php if(!empty($InstaGalleryItem['insta_user-limit'])){echo $InstaGalleryItem['insta_user-limit']; } else {echo '12'; }?>" /> <span class="description"><?php _e('number of pictures to display (max: 12)','insta-gallery'); ?></span></td>
76
</tr>
77
</table>
78
</td>
@@ -82,25 +94,19 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
82
<table>
83
<tr>
84
<th scope="row"><?php _e('Instagram Tagname','insta-gallery'); ?>:</th>
85
- <td><input name="insta_tag" type="text" placeholder="beautiful" value="<?php if(!empty($InstaGalleryItem['insta_tag'])){echo $InstaGalleryItem['insta_tag']; }?>" /> <span
86
- class="description">e.g. <strong style="font-size: 120%; color: #e23565;">beautiful</strong><br /> <small>https://www.instagram.com/explore/tags/<strong
87
style="font-size: 120%; color: #e23565;">beautiful</strong>/
88
</small>
89
</span>
90
<p class="ig-generate-msgs"><?php _e('Please enter Instagram Tagname.','insta-gallery'); ?></p></td>
91
</tr>
92
- <tr class="igs_experimental">
93
- <th scope="row"><?php _e('Display only from my account','insta-gallery'); ?>:<br />(<span class="ig-thm-color"><?php _e('experimental','insta-gallery');?></span>)</th>
94
- <td><input name="insta_tag-userid" type="number" placeholder="<?php _e('enter User ID here','insta-gallery'); ?>"
95
- value="<?php if(!empty($InstaGalleryItem['insta_tag-userid'])){echo $InstaGalleryItem['insta_tag-userid']; }?>" /> <span class="description">Please enter Instagram User ID to display tagged images only from your account. <?php printf(__('Get your User ID from %sHERE%s', 'insta-gallery'), '<a target="blank" rel="noreferrer nofollow" href="https://codeofaninja.com/tools/find-instagram-user-id">', '</a>'); ?> </span>
96
- <br /> <span class="ig-thm-color">do not enter User ID, if you are not sure about this option OR have zero results.<br /> Because this filter will display nothing if you
97
- are using very common Tagname OR Tagname have lot of images from other user\'s account.
98
- </span></td>
99
- </tr>
100
<tr>
101
<th scope="row"><?php _e('Pictures Limit','insta-gallery'); ?>:</th>
102
<td><input name="insta_tag-limit" type="number" min="1" max="30"
103
- value="<?php if(!empty($InstaGalleryItem['insta_tag-limit'])){echo $InstaGalleryItem['insta_tag-limit']; } else {echo '12'; }?>" /> <span class="description"><?php _e('number of pictures to display.','insta-gallery'); ?></span></td>
104
</tr>
105
</table>
106
</td>
@@ -109,7 +115,8 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
109
<th scope="row"><?php _e('Show As','insta-gallery'); ?>:</th>
110
<td>
111
<ul class="ig-list-buttons">
112
- <li><input type="radio" id="ig_display_type-gallery" name="ig_display_type" value="gallery" <?php if($active_gallery) echo 'checked';?> /><label for="ig_display_type-gallery"><?php _e('Gallery','insta-gallery'); ?></label>
113
<div class="check"></div></li>
114
<li><input type="radio" id="ig_display_type-carousel" name="ig_display_type" value="carousel" <?php if($active_carousel) echo 'checked';?> /><label
115
for="ig_display_type-carousel"><?php _e('Carousel','insta-gallery'); ?></label>
@@ -126,18 +133,19 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
126
<tr>
127
<th scope="row"><?php _e('No. of Grid Columns','insta-gallery'); ?>:</th>
128
<td><input name="insta_gal-cols" type="number" min="1" max="20"
129
- value="<?php if(!empty($InstaGalleryItem['insta_gal-cols'])){echo $InstaGalleryItem['insta_gal-cols']; } else {echo 3;}?>" /> <span class="description"><?php _e('number of pictures in a row','insta-gallery'); ?>. </span></td>
130
<td rowspan="3"><img src="<?php echo INSGALLERY_URL; ?>/assets/media/demo-gallery.jpg" alt="demo gallery" width="500" /></td>
131
</tr>
132
<tr>
133
<th scope="row"><?php _e('Image hover effect','insta-gallery'); ?>:</th>
134
- <td><input name="insta_gal-hover" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_gal-hover'])) ? '' : 'checked'; ?> /> <span
135
- class="description"><?php _e('mouseover animation effect on image','insta-gallery'); ?> </span></td>
136
</tr>
137
<tr>
138
<th scope="row"><?php _e('Space between images','insta-gallery'); ?>:</th>
139
- <td><input name="insta_gal-spacing" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_gal-spacing'])) ? '' : 'checked'; ?> />
140
- <span class="description"><?php _e('add blank space between images','insta-gallery'); ?> </span></td>
141
</tr>
142
</table>
143
</td>
@@ -151,35 +159,38 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
151
<tr>
152
<th scope="row"><?php _e('Slides per view','insta-gallery'); ?>:</th>
153
<td><input name="insta_car-slidespv" type="number" min="1" max="10"
154
- value="<?php if(!empty($InstaGalleryItem['insta_car-slidespv'])){echo $InstaGalleryItem['insta_car-slidespv']; } else {echo 5;}?>" /> <span class="description"><?php _e('display number of pictures per slide view.','insta-gallery'); ?> </span></td>
155
<td rowspan="5"><img src="<?php echo INSGALLERY_URL; ?>/assets/media/demo-carousel.jpg" alt="demo carousel" width="500" /></td>
156
</tr>
157
<tr>
158
<th scope="row"><?php _e('Autoplay','insta-gallery'); ?>:</th>
159
- <td><input name="insta_car-autoplay" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_car-autoplay'])) ? '' : 'checked'; ?> />
160
- <span class="description"><?php _e('autoplay carousel items.','insta-gallery'); ?> </span></td>
161
</tr>
162
<tr>
163
<th scope="row"><?php _e('Autoplay Interval','insta-gallery'); ?>:</th>
164
<td><input name="insta_car-autoplay-interval" type="number" min="1000" max="300000" step="100"
165
- value="<?php if(!empty($InstaGalleryItem['insta_car-autoplay-interval'])){echo $InstaGalleryItem['insta_car-autoplay-interval']; } else {echo 3000;}?>" /> <span class="description"><?php _e('moves to next picture after specified time interval.','insta-gallery'); ?> <br />(
166
- <span class="ig-thm-color"><?php _e('Interval is in milliseconds','insta-gallery'); ?>
167
</span> ) </span></td>
168
</tr>
169
<tr>
170
<th scope="row"><?php _e('Navigation arrows','insta-gallery'); ?>:</th>
171
- <td><input name="insta_car-navarrows" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_car-navarrows'])) ? '' : 'checked'; ?> />
172
- <span class="description"><?php _e('show prev-next navigation arrows.','insta-gallery'); ?> </span></td>
173
</tr>
174
<tr>
175
<th scope="row"><?php _e('Navigation arrows color','insta-gallery'); ?>:</th>
176
<td><input id="insta_car-navarrows-color-choose" type="color"
177
- value="<?php echo (!empty($InstaGalleryItem['insta_car-navarrows-color']) ? $InstaGalleryItem['insta_car-navarrows-color'] : '#c32a67'); ?>" /> <input
178
- name="insta_car-navarrows-color" type="text" placeholder="#c32a67"
179
- value="<?php echo (!empty($InstaGalleryItem['insta_car-navarrows-color']) ? $InstaGalleryItem['insta_car-navarrows-color'] : ''); ?>" /> <span class="description"><?php _e('change navigation arrows color here.','insta-gallery'); ?></span></td>
180
</tr>
181
-
182
-
183
<!--
184
<tr>
185
<th scope="row"><?php _e('Dotted navigation','insta-gallery'); ?>:</th>
@@ -189,12 +200,12 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
189
?></strong></span> )</span></td>
190
</tr>
191
-->
192
-
193
-
194
<tr>
195
<th scope="row"><?php _e('Space between slides','insta-gallery'); ?>:</th>
196
- <td><input name="insta_car-spacing" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_car-spacing'])) ? '' : 'checked'; ?> />
197
- <span class="description"><?php _e('add blank space between carousel items.','insta-gallery'); ?> </span></td>
198
</tr>
199
</table>
200
</td>
@@ -202,24 +213,28 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
202
<tr>
203
<th scope="row"><?php _e('Images thumbnail size','insta-gallery'); ?>:</th>
204
<td><select name="insta_thumb-size">
205
- <option value="medium"><?php _e('Medium','insta-gallery'); ?>(640,320 x auto)</option>
206
- <option value="small" <?php echo (isset($InstaGalleryItem['insta_thumb-size']) && ($InstaGalleryItem['insta_thumb-size'] == 'small')) ? 'selected' : ''; ?>><?php _e('Small','insta-gallery'); ?>(150
207
x 150)</option>
208
</select></td>
209
</tr>
210
<tr>
211
<th scope="row"><?php _e('Images hover effect color','insta-gallery'); ?>:</th>
212
<td><input id="insta_hover-color-choose" type="color"
213
- value="<?php echo (!empty($InstaGalleryItem['insta_hover-color']) ? $InstaGalleryItem['insta_hover-color'] : '#007aff'); ?>" /> <input name="insta_hover-color" type="text"
214
- placeholder="#007aff" value="<?php echo (!empty($InstaGalleryItem['insta_hover-color']) ? $InstaGalleryItem['insta_hover-color'] : ''); ?>" /> <span class="description"><?php _e('select color which is displayed when hovered over images.','insta-gallery'); ?><br />(
215
- <span class="ig-thm-color"><?php _e('color name should be in Hexadecimal notation. e.g. #dddddd','insta-gallery'); ?>
216
</span> ) </span></td>
217
</tr>
218
<tr>
219
<th scope="row"><?php _e('Popup images on click','insta-gallery'); ?>:</th>
220
- <td><input name="insta_gal-popup" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_gal-popup'])) ? '' : 'checked'; ?> /> <span
221
- class="description"><?php _e('show popup gallery by clicking on image thumbnail. else it will open Instagram page.','insta-gallery'); ?> <br />( <span class="ig-thm-color"><?php
222
- _e('uncheck this if it conflicts with other plugins, like: fancybox, prettyphoto etc.', 'insta-gallery');
223
?></span> ) </span></td>
224
</tr>
225
<tr hidden>
@@ -232,40 +247,44 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
232
</tr>
233
<tr>
234
<th scope="row"><?php _e('Display Likes','insta-gallery'); ?>:</th>
235
- <td><input name="insta_likes" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_likes'])) ? '' : 'checked'; ?> /> <span
236
- class="description"><?php _e('display likes count of images.','insta-gallery'); ?> </span></td>
237
</tr>
238
<tr>
239
<th scope="row"><?php _e('Display Comments','insta-gallery'); ?>:</th>
240
- <td><input name="insta_comments" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_comments'])) ? '' : 'checked'; ?> /> <span
241
- class="description"><?php _e('display comments count of images.','insta-gallery'); ?> </span></td>
242
</tr>
243
<tr>
244
<th scope="row"><?php _e('Display Instagram Link Button','insta-gallery'); ?>:</th>
245
- <td><input name="insta_instalink" type="checkbox" value="1" <?php echo (isset($InstaGalleryItem) && empty($InstaGalleryItem['insta_instalink'])) ? '' : 'checked'; ?> /> <span
246
- class="description"><?php _e('show the button to open Instagram site link','insta-gallery'); ?> </span></td>
247
</tr>
248
- <tr id="ig-section-igbtn" class="ig-tab-content-row <?php if(isset($InstaGalleryItem) && !empty($InstaGalleryItem['insta_instalink'])) echo 'active';?>">
249
<td colspan="100%">
250
<table>
251
<tr>
252
<th scope="row"><?php _e('Instagram Button Text','insta-gallery'); ?>:</th>
253
<td><input name="insta_instalink-text" type="text" placeholder="view on Instagram"
254
- value="<?php if(!empty($InstaGalleryItem['insta_instalink-text'])){echo $InstaGalleryItem['insta_instalink-text']; }?>" /> <span class="description"><?php _e('update Instagram button text here.','insta-gallery'); ?></span></td>
255
</tr>
256
<tr>
257
<th scope="row"><?php _e('Button Background Color','insta-gallery'); ?>:</th>
258
<td><input id="insta_instalink-bgcolor-choose" type="color"
259
value="<?php echo (!empty($InstaGalleryItem['insta_instalink-bgcolor']) ? $InstaGalleryItem['insta_instalink-bgcolor'] : '#c32a67'); ?>" /> <input
260
name="insta_instalink-bgcolor" type="text" placeholder="#c32a67"
261
- value="<?php echo (!empty($InstaGalleryItem['insta_instalink-bgcolor']) ? $InstaGalleryItem['insta_instalink-bgcolor'] : ''); ?>" /> <span class="description"><?php _e('color which is displayed on button background.','insta-gallery'); ?></span></td>
262
</tr>
263
<tr>
264
<th scope="row"><?php _e('Button Hover Color','insta-gallery'); ?>:</th>
265
<td><input id="insta_instalink-hvrcolor-choose" type="color"
266
- value="<?php echo (!empty($InstaGalleryItem['insta_instalink-hvrcolor']) ? $InstaGalleryItem['insta_instalink-hvrcolor'] : '#da894a'); ?>" /> <input
267
- name="insta_instalink-hvrcolor" type="text" placeholder="#da894a"
268
- value="<?php echo (!empty($InstaGalleryItem['insta_instalink-hvrcolor']) ? $InstaGalleryItem['insta_instalink-hvrcolor'] : ''); ?>" /> <span class="description"><?php _e('color which is displayed when hovered over button.','insta-gallery'); ?></span></td>
269
</tr>
270
</table>
271
</td>
@@ -279,6 +298,7 @@ if (isset($InstaGalleryItem['ig_display_type'])) {
279
<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>
280
</div>
281
<input type="hidden" name="ig-form-update" value="true" />
282
<?php if(!empty($InstaGalleryItem['ig_item_id'])) {?>
283
<input type="hidden" name="igitem_id" value="<?php echo $InstaGalleryItem['ig_item_id']; ?>" />
284
<?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'];
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 -->
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
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>
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>
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>
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>
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>
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>
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>
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>
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 } ?>
app/views/list.php CHANGED
@@ -8,7 +8,8 @@ $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 class="dashicons dashicons-plus"></span><?php _e('Add New Gallery','insta-gallery'); ?></a>
12
</p>
13
14
@@ -37,9 +38,10 @@ $InstaGallerySetting = get_option('insta_gallery_setting');
37
}
38
?>
39
</td>
40
- <td><input type="text" onclick="select()" value='[insta-gallery id="<?php echo $k; ?>"]' readonly /> </td>
41
<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>
42
- <a href="<?php echo INSGALLERY_URL_ADMIN_PAGE; ?>&ig_item_delete=<?php echo $k; ?>" class="ig-btn" onclick="return ig_item_delete();"><span class="dashicons dashicons-trash"></span><?php _e('Delete','insta-gallery'); ?></a></td>
43
</tr>
44
<?php } unset($i); ?>
45
</tbody>
@@ -73,8 +75,8 @@ $InstaGallerySetting = get_option('insta_gallery_setting');
73
?>
74
<input type="hidden" name="igs_spinner_image_id" value="<?php echo $mid; ?>" data-misrc="<?php echo $misrc; ?>" />
75
<button type='button' class="ig-btn" id="igs-spinner_media_manager" /><?php _e('Update Spinner','insta-gallery'); ?></button>
76
- <button type='button' class="ig-btn" id="igs-spinner_reset" /><?php _e('Reset Spinner','insta-gallery'); ?></button> <br />
77
- <span class="description">
78
<?php
79
_e('please select the image from media to replace with default Gallery loader icon.', 'insta-gallery');
80
?> </span>
@@ -82,8 +84,8 @@ $InstaGallerySetting = get_option('insta_gallery_setting');
82
</td>
83
<td rowspan="2">
84
<div class="ig-spinner">
85
- <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" viewBox="0 0 551.034 551.034"
86
- style="enable-background: new 0 0 551.034 551.034;" xml:space="preserve">
87
<g>
88
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="275.517" y1="4.57" x2="275.517" y2="549.72"
89
gradientTransform="matrix(1 0 0 -1 0 554)">
@@ -124,29 +126,26 @@ $InstaGallerySetting = get_option('insta_gallery_setting');
124
</tr>
125
<tr>
126
<th><?php _e('Remove everything on uninstall','insta-gallery'); ?>:</th>
127
- <td><input type="checkbox" name="igs_flush" value="1" onclick="ig_validate_flush(this)" <?php if(!empty($InstaGallerySetting['igs_flush'])) echo 'checked';?> /><span
128
- class="description"> <?php _e('check this box to remove all data related to this plugin when removing the plugin.','insta-gallery'); ?> </span></td>
129
- </tr>
130
- <tr>
131
- <th><?php _e('Developer Mode','insta-gallery'); ?>:</th>
132
- <td><input type="checkbox" name="igs_dev_mode" value="1" <?php if(!empty($InstaGallerySetting['igs_dev_mode'])) echo 'checked';?> /><span
133
- class="description"> <?php _e('check this box to enable experimental features of the plugin.','insta-gallery'); ?> </span></td>
134
</tr>
135
</tbody>
136
<tfoot>
137
<tr>
138
- <td colspan="3"><button type="submit" class="ig-btn"><?php _e('Update','insta-gallery'); ?></button> <span class="ig_adv-setting-fmsg"></span></td>
139
</tr>
140
</tfoot>
141
</table>
142
- <input type="hidden" name="igadvs_nonce" value="<?php echo wp_create_nonce( 'igadvs_nonce_key' ); ?>" /> <input type="hidden" name="action" value="save_igadvs" />
143
</form>
144
</div>
145
</div>
146
<div class="ig_donation-wrap ig-thm-color">
147
- <p><span class="ig_donation_text"><?php _e('Please Donate now to support the Maintainance and Advancement of this plugin.','insta-gallery'); ?>
148
- <br /><?php _e('Thank you so much to each and everyone who has already supported me.','insta-gallery'); ?></span>
149
- <a class="ig_donation_btn" href="https://www.paypal.me/karanpay" target="blank"><?php _e('Donate','insta-gallery'); ?>
150
<img src="<?php echo INSGALLERY_URL; ?>/assets/media/paypal-logo.svg" class="ig-logo" /> </a>
151
</p>
152
</div>
@@ -195,20 +194,19 @@ jQuery(function($){
195
$('.ig_adv-setting form').on('submit',function(ev){
196
ev.preventDefault();
197
$f = $(this);
198
jQuery.ajax({
199
url : ajaxurl,
200
type : 'post',
201
dataType: 'JSON',
202
data : $f.serialize(),
203
beforeSend : function()
204
- {
205
},
206
success : function( response ) {
207
if ((typeof response === 'object') && response.hasOwnProperty('success')) {
208
- $('.ig_adv-setting-fmsg').html(response.data);
209
- setTimeout(function(){
210
- $('.ig_adv-setting-fmsg').empty();
211
- },2000);
212
}
213
}
214
}).fail(function (jqXHR, textStatus) {
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
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>
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>
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)">
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>
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) {
app/wp-front.php CHANGED
@@ -15,7 +15,7 @@ if (! defined('ABSPATH')) {
15
* session_start();
16
* });
17
*/
18
-
19
// load template files
20
function insgal_template_path($template_name)
21
{
@@ -68,7 +68,6 @@ function insgal_enqueue_scripts()
68
wp_enqueue_script('swiper');
69
wp_enqueue_script('magnific-popup');
70
}
71
- include_once (INSGALLERY_PATH . 'app/Libra/InstagramSpider.php');
72
73
// shortcode added
74
add_shortcode('insta-gallery', 'insta_gallery');
@@ -178,7 +177,7 @@ function load_ig_item()
178
}
179
$IGItem = $InstaGalleryItems[$gid];
180
$IGItem['gid'] = $gid; // push gallery ID for later use
181
- $igs = new InstagramSpider();
182
183
// validating options
184
if (empty($IGItem['ig_select_from'])) {
@@ -192,7 +191,6 @@ function load_ig_item()
192
$IGItem['insta_user-limit'] = (int) $IGItem['insta_user-limit'];
193
$IGItem['insta_tag-limit'] = (int) $IGItem['insta_tag-limit'];
194
}
195
- $IGItem['insta_tag-userid'] = filter_var($IGItem['insta_tag-userid'], FILTER_VALIDATE_INT);
196
$IGItem['insta_gal-hover'] = filter_var($IGItem['insta_gal-hover'], FILTER_VALIDATE_BOOLEAN);
197
$IGItem['insta_gal-spacing'] = filter_var($IGItem['insta_gal-spacing'], FILTER_VALIDATE_BOOLEAN);
198
@@ -218,70 +216,9 @@ function load_ig_item()
218
$results = '';
219
$instaItems = '';
220
if ($IGItem['ig_select_from'] == 'username') { // get from username
221
- if (! empty($IGItem['insta_user'])) { // valid Instagram Username
222
- $tk = 'instagallery_user_' . $IGItem['insta_user']; // transient key
223
- $tkart = $tk . '_artimeout'; // transient key admin request timeout
224
- if (current_user_can('administrator') && (false === get_transient($tkart))) {
225
-
226
- $instaItems = $igs->getUserItems($IGItem['insta_user']);
227
- if (! empty($instaItems)) {
228
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
229
- set_transient($tkart, true, 5 * MINUTE_IN_SECONDS);
230
- }
231
- } else {
232
- // Get any existing copy of our transient data
233
- if (false === ($instaItems = get_transient($tk))) {
234
- $instaItems = $igs->getUserItems($IGItem['insta_user']);
235
- if (! empty($instaItems)) {
236
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
237
- }
238
- }
239
- }
240
-
241
- // retry again if no results
242
- if (empty($instaItems)) {
243
- $instaItems = $igs->getUserItems($IGItem['insta_user']);
244
- if (! empty($instaItems)) {
245
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
246
- }
247
- }
248
- }
249
} else { // continue to tag
250
- if (! empty($IGItem['insta_tag'])) { // valid Instagram Tag;
251
- $tk = 'instagallery_tag_' . $IGItem['insta_tag']; // transient key
252
- $tkart = $tk . '_artimeout'; // transient key admin request timeout
253
- if (current_user_can('administrator') && (false === get_transient($tkart))) {
254
- $instaItems = $igs->getTagItems($IGItem['insta_tag'],$IGItem['insta_tag-userid']);
255
- if (! empty($instaItems)) {
256
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
257
- set_transient($tkart, true, 5 * MINUTE_IN_SECONDS);
258
- }
259
- } else {
260
- // Get any existing copy of our transient data
261
- if (false === ($instaItems = get_transient($tk))) {
262
- $instaItems = $igs->getTagItems($IGItem['insta_tag'],$IGItem['insta_tag-userid']);
263
- if (! empty($instaItems)) {
264
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
265
- }
266
- }
267
- }
268
- // retry again if no results
269
- if (empty($instaItems)) {
270
- $instaItems = $igs->getTagItems($IGItem['insta_tag'],$IGItem['insta_tag-userid']);
271
- if (! empty($instaItems)) {
272
- set_transient($tk, $instaItems, 2 * HOUR_IN_SECONDS);
273
- }
274
- }
275
- // filter by user ID
276
- if (! empty($IGItem['insta_tag-userid'])) {
277
- foreach ($instaItems as $k => $item) {
278
- if(!empty($item['owner_id']) && ($item['owner_id'] != $IGItem['insta_tag-userid'])){
279
- unset($instaItems[$k]);
280
- }
281
- }
282
- $instaItems = array_values($instaItems);
283
- }
284
- }
285
}
286
287
if (! empty($instaItems)) {
@@ -356,15 +293,14 @@ function load_ig_item()
356
}
357
} else {
358
if (current_user_can('administrator')) {
359
- $results .= '<div class="ig-no-items-msg"><p class="ig_front_msg-color"><strong>Admin Notice:</strong> unable to get results. possible reasons:</p>';
360
$results .= '<ul>';
361
- $results .= '<li>' . __('Instagram account may be private or inavalid username/tagname.', 'insta-gallery') . '</li>';
362
- $results .= '<li>' . __('network or server side issue.', 'insta-gallery') . '</li>';
363
- $igsMsgs = $igs->getMessages();
364
- if (! empty($igsMsgs)) {
365
- foreach ($igsMsgs as $igsMsg) {
366
- $results .= '<li>' . $igsMsg . '</li>';
367
- }
368
}
369
$results .= '</ul></div>';
370
}
15
* session_start();
16
* });
17
*/
18
+
19
// load template files
20
function insgal_template_path($template_name)
21
{
68
wp_enqueue_script('swiper');
69
wp_enqueue_script('magnific-popup');
70
}
71
72
// shortcode added
73
add_shortcode('insta-gallery', 'insta_gallery');
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'])) {
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
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)) {
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
}
app/wp-panel.php CHANGED
@@ -15,14 +15,13 @@ $InstaGallerySetting = get_option('insta_gallery_setting');
15
16
$ig_page_msgs = array();
17
// add/update gallery item
18
- if (isset($_POST['ig-form-update'])) {
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_tag-userid'] = (int) $POSTDATA['insta_tag-userid'];
26
$IGItem['insta_user-limit'] = $POSTDATA['insta_user-limit'];
27
$IGItem['insta_tag-limit'] = $POSTDATA['insta_tag-limit'];
28
$IGItem['ig_display_type'] = $POSTDATA['ig_display_type'];
@@ -65,6 +64,8 @@ if (isset($_POST['ig-form-update'])) {
65
}
66
}
67
update_option('insta_gallery_items', $InstaGalleryItems, false);
68
$ig_page_msgs[] = __('Gallery item updated successfully.', 'insta-gallery');
69
}
70
@@ -80,12 +81,10 @@ if (isset($_GET['ig_item_delete'])) {
80
81
82
?>
83
- <div id="ig-page" class="<?php if(empty($InstaGallerySetting['igs_dev_mode'])){echo 'no-igs_experiments';}?>">
84
<div class="wrap">
85
<header class="ig-page-header">
86
- <img src="<?php echo INSGALLERY_URL; ?>/assets/media/icon-128x128.jpg" class="ig-logo" />
87
<h3><?php _e('Instagram Gallery','insta-gallery'); ?></h3>
88
- <p><?php _e('easy way to display Instagram pictures on the website.','insta-gallery'); ?></p>
89
</header>
90
<hr />
91
<div class="ig-page-content">
@@ -96,17 +95,21 @@ if (! empty($ig_page_msgs)) {
96
}
97
}
98
?>
99
- <?php
100
if (isset($_GET['tab']) && ! empty($_GET['tab'])) {
101
$tab = (string) $_GET['tab'];
102
switch ($tab) {
103
case 'edit':
104
include 'views/edit.php';
105
break;
106
default:
107
break;
108
}
109
} else {
110
include 'views/list.php';
111
}
112
?>
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'];
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
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">
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
?>
assets/admin-style.css CHANGED
@@ -5,7 +5,7 @@
5
.ig-page-header .ig-logo {
6
float: left;
7
margin-right: 20px;
8
- max-height: 55px;
9
}
10
11
@@ -183,6 +183,101 @@
183
width: 50px;
184
height: 26px;
185
}
186
/* ******** ig advance setting ********** */
187
.ig_adv-setting-toggle{
188
cursor: pointer;
@@ -192,11 +287,6 @@
192
.ig_adv-setting-toggle.active .dashicons-minus{display: initial;}
193
.ig_adv-setting-toggle.active .dashicons-plus{display: none;}
194
.ig_adv-setting{display: none;}
195
- .ig_adv-setting-fmsg {
196
- font-size: 20px;
197
- color: #e93b59;
198
- padding: 5px 10px;
199
- }
200
.ig_adv-setting input[type="url"] {
201
min-width: 75%;
202
}
@@ -222,10 +312,6 @@
222
@-webkit-keyframes igspin { 100% { -webkit-transform: rotate(360deg); } }
223
@keyframes igspin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
224
225
- .no-igs_experiments .igs_experimental{
226
- display: none;
227
- }
228
-
229
/* ******** paypal btn ********** */
230
.ig_donation-wrap {
231
padding: 10px 20px;
5
.ig-page-header .ig-logo {
6
float: left;
7
margin-right: 20px;
8
+ max-height: 35px;
9
}
10
11
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;
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
}
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;
assets/insta-gallery-min.css CHANGED
@@ -1,3 +1,3 @@
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}.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{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}}
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