WD Instagram Feed – Instagram Gallery - Version 1.3.16

Version Description

Fixed: First time authorization.

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Instagram Feed – Instagram Gallery
Version 1.3.16
Comparing to
See all releases

Code changes from version 1.3.15 to 1.3.16

admin/controllers/WDIControllerUninstall_wdi.php CHANGED
@@ -11,7 +11,7 @@ class WDIControllerUninstall_wdi{
11
  include_once (WDI_DIR . "/wd/config.php");
12
  }
13
 
14
- if(!class_exists("TenWebDeactivate")) {
15
  include_once(WDI_DIR . "/wd/includes/deactivate.php");
16
  }
17
  $config = new TenWebLibConfig();
@@ -109,6 +109,7 @@ class WDIControllerUninstall_wdi{
109
  delete_option('wdi_sample_feed_post_id');
110
  delete_option('wdi_sample_feed_post_url');
111
  delete_option('wdi_first_user_username');
 
112
 
113
 
114
  $default_option=array();
11
  include_once (WDI_DIR . "/wd/config.php");
12
  }
13
 
14
+ if(!class_exists("TenWebLibDeactivate")) {
15
  include_once(WDI_DIR . "/wd/includes/deactivate.php");
16
  }
17
  $config = new TenWebLibConfig();
109
  delete_option('wdi_sample_feed_post_id');
110
  delete_option('wdi_sample_feed_post_url');
111
  delete_option('wdi_first_user_username');
112
+ delete_option('tenweb_notice_status');
113
 
114
 
115
  $default_option=array();
banner_class.php ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class TWBanner {
4
+ public $menu_postfix = ''; // To display on only current plugin pages.
5
+ public $prefix = ''; // Current plugin prefix.
6
+ public $logo = ''; // Current plugin logo relative URL.
7
+ public $plugin_slug = ''; // Current plugin slug.
8
+ public $plugin_url = ''; // Current plugin URL.
9
+ public $plugin_id = ''; // Current plugin id.
10
+ public $text = ''; // Banner text.
11
+ public $slug = ''; // Plugin slug to be installed.
12
+ public $mu_plugin_slug = ''; // Must use plugin slug.
13
+ public $base_php = ''; // Plugin base php filename to be installed.
14
+ public $page_url = ''; // Redirect to URL after activating the plugin.
15
+ public $status_install = 0; // Is plugin installed.
16
+ public $status_active = 0; // Is plugin active.
17
+
18
+ /**
19
+ * TW_Banner_Class constructor.
20
+ *
21
+ * @param $opt_banner_param
22
+ */
23
+ public function __construct( $opt_banner_param ) {
24
+ $this->menu_postfix = $opt_banner_param["menu_postfix"];
25
+ $this->prefix = $opt_banner_param["prefix"];
26
+ $this->logo = $opt_banner_param["logo"];
27
+ $this->plugin_slug = $opt_banner_param['plugin_slug'];
28
+ $this->plugin_url = $opt_banner_param["plugin_url"];
29
+ $this->plugin_id = $opt_banner_param['plugin_id'];
30
+ $this->text = $opt_banner_param['text'];
31
+ $this->slug = $opt_banner_param['slug'];
32
+ $this->mu_plugin_slug = $opt_banner_param['mu_plugin_slug'];
33
+ $this->base_php = $opt_banner_param['base_php'];
34
+ $this->page_url = $opt_banner_param['page_url'];
35
+ $this->init();
36
+ }
37
+
38
+ /**
39
+ * Add actions.
40
+ */
41
+ public function init() {
42
+ add_action('wp_ajax_wd_tenweb_dismiss', array( $this, 'dismiss' ));
43
+ add_action('wp_ajax_tenweb_status', array( $this, 'change_status' ));
44
+
45
+ // Check the page to show banner.
46
+ if ( ( !isset($_GET['page']) || ( preg_match("/^$this->menu_postfix/", esc_html( $_GET['page'] )) === 0 && preg_match("/$this->menu_postfix$/", esc_html( $_GET['page'] )) === 0 )) || ( isset($_GET['task']) && !strpos(esc_html($_GET['task']), 'edit') === TRUE && !(strpos(esc_html($_GET['task']), 'display') > -1)) ) {
47
+
48
+ return;
49
+ }
50
+
51
+ if ( $this->is_plugin_mu($this->mu_plugin_slug) ) {
52
+ $this->status_install = 1;
53
+ $this->status_active = 1;
54
+ }
55
+ else {
56
+ $this->upgrade_install_status();
57
+ }
58
+ if ( !$this->status_active ) {
59
+ add_action('admin_notices', array( $this, 'tenweb_install_notice' ));
60
+ }
61
+ }
62
+
63
+ /**
64
+ * Check plugin install status.
65
+ */
66
+ public function upgrade_install_status() {
67
+ if ( !function_exists('is_plugin_active') ) {
68
+ include_once(ABSPATH . 'wp-admin/includes/plugin.php');
69
+ }
70
+ if ( $this->is_plugin_installed($this->slug) ) {
71
+ $this->status_install = 1;
72
+ if ( is_plugin_active($this->slug . '/' . $this->base_php) ) {
73
+ $this->status_active = 1;
74
+ }
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Save status.
80
+ */
81
+ public function dismiss() {
82
+ update_option('tenweb_notice_status', '1', 'no');
83
+ }
84
+
85
+ /**
86
+ * Plugin install/activate status.
87
+ *
88
+ * @return string
89
+ */
90
+ public function tenweb_install_notice() {
91
+ // Remove old notice.
92
+ if ( get_option('tenweb_notice_status') !== FALSE ) {
93
+ update_option('tenweb_notice_status', '1', 'no');
94
+ }
95
+ $meta_value = get_option('tenweb_notice_status');
96
+ if ( $meta_value === '' || $meta_value === FALSE ) {
97
+ ob_start();
98
+ $dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
99
+ $verify_url = add_query_arg(array( 'action' => 'tenweb_status' ), admin_url('admin-ajax.php'));
100
+ ?>
101
+ <style>
102
+ .hide {
103
+ display: none !important;
104
+ }
105
+ #verifyUrl {
106
+ display: none;
107
+ }
108
+ #loading {
109
+ position: absolute;
110
+ right: 20px;
111
+ top: 50%;
112
+ transform: translateY(-50%);
113
+ margin: 0px;
114
+ background: url("<?php echo $this->plugin_url . '/images/spinner.gif'; ?>") no-repeat;
115
+ background-size: 20px 20px;
116
+ filter: alpha(opacity=70);
117
+ }
118
+ #wd_tenweb_logo_notice {
119
+ height: 32px;
120
+ float: left;
121
+ }
122
+ .error_install,
123
+ .error_activate {
124
+ color: red;
125
+ font-size: 10px;
126
+ }
127
+ #wpbody-content #v2_tenweb_notice_cont {
128
+ display: none;
129
+ flex-wrap: wrap;
130
+ background: #fff;
131
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
132
+ position: relative;
133
+ margin-left: 0px;
134
+ padding: 5px 0;
135
+ overflow: hidden;
136
+ border-left: 4px solid #0073AA;
137
+ font-family: Open Sans, sans-serif;
138
+ height: 40px;
139
+ min-height: 40px;
140
+ box-sizing: initial;
141
+ }
142
+ .v2_logo {
143
+ display: flex;
144
+ flex-direction: column;
145
+ justify-content: center;
146
+ height: inherit;
147
+ }
148
+ #v2_tenweb_notice_cont {
149
+ height: 50px;
150
+ padding: 0px;
151
+ }
152
+ .v2_content {
153
+ flex-grow: 1;
154
+ height: inherit;
155
+ margin-left: 25px;
156
+ }
157
+ .v2_content p {
158
+ margin: 0px;
159
+ padding: 0px;
160
+ }
161
+ .v2_content p > span {
162
+ font-size: 16px;
163
+ color: #333B46;
164
+ font-weight: 600;
165
+ line-height: 40px;
166
+ margin: 0;
167
+ }
168
+ #wd_tenweb_logo_notice {
169
+ margin-left: 25px;
170
+ height: 30px;
171
+ line-height: 100%;
172
+ }
173
+ .v2_button {
174
+ display: flex;
175
+ margin-right: 30px;
176
+ flex-direction: column;
177
+ justify-content: center;
178
+ }
179
+ .v2_button #install_now, #activate_now {
180
+ width: 112px;
181
+ height: 32px;
182
+ line-height: 30px;
183
+ font-size: 14px;
184
+ text-align: center;
185
+ padding: 0;
186
+ }
187
+ #v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
188
+ top: 3px;
189
+ right: 3px;
190
+ padding: 0px;
191
+ }
192
+ .v2_button .button {
193
+ position: relative;
194
+ }
195
+ .v2_button .button #loading {
196
+ position: absolute;
197
+ right: 10px;
198
+ top: 50%;
199
+ transform: translateY(-50%);
200
+ margin: 0px;
201
+ background-size: 12px 12px;
202
+ filter: alpha(opacity=70);
203
+ width: 12px;
204
+ height: 12px;
205
+ }
206
+ @media only screen and (max-width: 1200px) and (min-width: 821px) {
207
+ #wpbody-content #v2_tenweb_notice_cont {
208
+ height: 50px;
209
+ min-height: 50px;
210
+ }
211
+ #v2_tenweb_notice_cont {
212
+ height: 60px;
213
+ }
214
+ .v2_content {
215
+ margin-left: 25px;
216
+ }
217
+ .v2_content p {
218
+ font-size: 14px;
219
+ color: #333B46;
220
+ font-weight: 600;
221
+ line-height: 20px;
222
+ margin-top: 5px;
223
+ }
224
+ .v2_content p span {
225
+ display: block;
226
+ }
227
+ #wd_tenweb_logo_notice {
228
+ margin-left: 25px;
229
+ height: 30px;
230
+ line-height: 100%;
231
+ }
232
+ .v2_button {
233
+ display: flex;
234
+ margin-right: 30px;
235
+ flex-direction: column;
236
+ justify-content: center;
237
+ }
238
+ .v2_button #install_now {
239
+ width: 112px;
240
+ height: 32px;
241
+ line-height: 30px;
242
+ font-size: 14px;
243
+ text-align: center;
244
+ padding: 0;
245
+ }
246
+ #v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
247
+ top: 3px;
248
+ right: 3px;
249
+ }
250
+ }
251
+ @media only screen and (max-width: 820px) and (min-width: 781px) {
252
+ #wpbody-content #v2_tenweb_notice_cont {
253
+ height: 50px;
254
+ min-height: 50px;
255
+ }
256
+ #v2_tenweb_notice_cont {
257
+ height: 60px;
258
+ }
259
+ .v2_content {
260
+ margin-left: 25px;
261
+ }
262
+ .v2_content p {
263
+ font-size: 13px;
264
+ color: #333B46;
265
+ font-weight: 600;
266
+ line-height: 20px;
267
+ margin-top: 5px;
268
+ }
269
+ .v2_content p span {
270
+ display: block;
271
+ }
272
+ }
273
+ @media only screen and (max-width: 780px) {
274
+ #wpbody-content #v2_tenweb_notice_cont {
275
+ height: auto;
276
+ min-height: auto;
277
+ }
278
+ #v2_tenweb_notice_cont {
279
+ height: auto;
280
+ padding: 5px;
281
+ }
282
+ .v2_logo {
283
+ display: block;
284
+ height: auto;
285
+ width: 100%;
286
+ margin-top: 5px;
287
+ }
288
+ .v2_content {
289
+ display: block;
290
+ margin-left: 9px;
291
+ margin-top: 10px;
292
+ width: calc(100% - 10px);
293
+ }
294
+ .v2_content p {
295
+ line-height: unset;
296
+ font-size: 15px;
297
+ line-height: 25px;
298
+ }
299
+ .v2_content p span {
300
+ display: block;
301
+ }
302
+ #wd_tenweb_logo_notice {
303
+ margin-left: 9px;
304
+ }
305
+ .v2_button {
306
+ margin-left: 9px;
307
+ margin-top: 10px;
308
+ margin-bottom: 5px;
309
+ }
310
+ }
311
+ </style>
312
+ <script type="text/javascript">
313
+ jQuery(document).ready(function () {
314
+ jQuery('#v2_tenweb_notice_cont').css('display', 'flex');
315
+ });
316
+ </script>
317
+ <div id="v2_tenweb_notice_cont" class="notice wd-notice">
318
+ <div class="v2_logo">
319
+ <img id="wd_tenweb_logo_notice" src="<?php echo $this->plugin_url . $this->logo; ?>" />
320
+ </div>
321
+ <div class="v2_content">
322
+ <p>
323
+ <?php echo $this->text ?>
324
+ </p>
325
+ </div>
326
+ <div class="v2_button">
327
+ <?php $this->tw_install_button(2); ?>
328
+ </div>
329
+ <button type="button" class="wd_tenweb_notice_dissmiss notice-dismiss" onclick="jQuery('#v2_tenweb_notice_cont').attr('style', 'display: none !important;'); jQuery.post('<?php echo $dismiss_url; ?>');">
330
+ <span class="screen-reader-text"></span></button>
331
+ <div id="verifyUrl" data-url="<?php echo $verify_url; ?>"></div>
332
+ </div>
333
+ <?php
334
+ echo ob_get_clean();
335
+ }
336
+ }
337
+
338
+ /**
339
+ * Change status.
340
+ */
341
+ public function change_status() {
342
+ $this->upgrade_install_status();
343
+ if ( $this->status_install ) {
344
+ $old_opt_array = array();
345
+ $new_opt_array = array( $this->plugin_slug => $this->plugin_id );
346
+ $key = 'tenweb_manager_installed';
347
+ $option = get_option($key);
348
+ if ( !empty($option) ) {
349
+ $old_opt_array = (array) json_decode($option);
350
+ }
351
+ $array_installed = array_merge($new_opt_array, $old_opt_array);
352
+ update_option($key, json_encode($array_installed));
353
+ }
354
+ $jsondata = array( 'status_install' => $this->status_install, 'status_active' => $this->status_active );
355
+ echo json_encode($jsondata);
356
+ exit;
357
+ }
358
+
359
+ /**
360
+ * Install/activate button.
361
+ *
362
+ * @param $v
363
+ */
364
+ public function tw_install_button( $v ) {
365
+ $prefix = $this->prefix;
366
+ $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $this->slug), 'install-plugin_' . $this->slug));
367
+ $activation_url = $this->na_action_link($this->slug . '/' . $this->base_php, 'activate');
368
+ $tenweb_url = $this->page_url;
369
+ $dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
370
+ $activate = $this->status_install && !$this->status_active ? TRUE : FALSE;
371
+ ?>
372
+ <a class="button<?php echo($v == 2 ? ' button-primary' : ''); ?> tenweb_activaion"
373
+ id="<?php echo $activate ? 'activate_now' : 'install_now'; ?>"
374
+ data-activation="<?php _e("Activation", $prefix); ?>"
375
+ data-tenweb-url="<?php echo $tenweb_url; ?>"
376
+ data-install-url="<?php echo $install_url; ?>"
377
+ data-activate-url="<?php echo $activation_url; ?>">
378
+ <span class="tenweb_activaion_text"><?php echo $activate ? __("Activate", $prefix) : __("Install", $prefix); ?></span>
379
+ <span class="spinner" id="loading"></span>
380
+ </a>
381
+ <span class="hide <?php echo $activate ? 'error_activate' : 'error_install tenweb_active'; ?> ">
382
+ <?php echo $activate ? __("Activation failed, please try again.", $prefix) : __("Installation failed, please try again.", $prefix); ?>
383
+ </span>
384
+ <script>
385
+ var url = jQuery(".tenweb_activaion").attr("data-install-url");
386
+ var activate_url = jQuery(".tenweb_activaion").attr("data-activate-url");
387
+
388
+ function install_tenweb_plugin() {
389
+ jQuery("#loading").addClass('is-active');
390
+ jQuery(this).prop('disable', true);
391
+ jQuery.ajax({
392
+ method: "POST",
393
+ url: url,
394
+ }).done(function () {
395
+ /* Check if plugin installed.*/
396
+ jQuery.ajax({
397
+ type: 'POST',
398
+ dataType: 'json',
399
+ url: jQuery("#verifyUrl").attr('data-url'),
400
+ error: function () {
401
+ jQuery("#loading").removeClass('is-active');
402
+ jQuery(".error_install").show();
403
+ },
404
+ success: function (response) {
405
+ if (response.status_install == 1) {
406
+ jQuery('#install_now .tenweb_activaion_text').text(jQuery("#install_now").data("activation"));
407
+ activate_tenweb_plugin();
408
+ }
409
+ else {
410
+ jQuery("#loading").removeClass('is-active');
411
+ jQuery(".error_install").removeClass('hide');
412
+ }
413
+ }
414
+ });
415
+ }).fail(function () {
416
+ jQuery("#loading").removeClass('is-active');
417
+ jQuery(".error_install").removeClass('hide');
418
+ });
419
+ }
420
+
421
+ function activate_tenweb_plugin() {
422
+ jQuery("#activate_now #loading").addClass('is-active');
423
+ jQuery.ajax({
424
+ method: "POST",
425
+ url: activate_url,
426
+ }).done(function () {
427
+ jQuery("#loading").removeClass('is-active');
428
+ var data_tenweb_url = '';
429
+ /* Check if plugin installed.*/
430
+ jQuery.ajax({
431
+ type: 'POST',
432
+ dataType: 'json',
433
+ url: jQuery("#verifyUrl").attr('data-url'),
434
+ error: function () {
435
+ jQuery("#loading").removeClass('is-active');
436
+ jQuery(".error_activate").removeClass('hide');
437
+ },
438
+ success: function (response) {
439
+ if (response.status_active == 1) {
440
+ //jQuery('#install_now').addClass('hide');
441
+ data_tenweb_url = jQuery('.tenweb_activaion').attr('data-tenweb-url');
442
+ jQuery.post('<?php echo $dismiss_url; ?>');
443
+ }
444
+ else {
445
+ jQuery("#loading").removeClass('is-active');
446
+ jQuery(".error_activate").removeClass('hide');
447
+ }
448
+ },
449
+ complete: function () {
450
+ if (data_tenweb_url != '') {
451
+ window.location.href = data_tenweb_url;
452
+ }
453
+ }
454
+ });
455
+ }).fail(function () {
456
+ jQuery("#loading").removeClass('is-active');
457
+ });
458
+ }
459
+
460
+ jQuery("#install_now").on("click", function () {
461
+ install_tenweb_plugin();
462
+ });
463
+ jQuery("#activate_now").on("click", function () {
464
+ activate_tenweb_plugin();
465
+ });
466
+ </script>
467
+ <?php
468
+ }
469
+
470
+ /**
471
+ * Check if plugin is installed.
472
+ *
473
+ * @param $plugin_slug
474
+ *
475
+ * @return bool
476
+ */
477
+ public function is_plugin_installed( $plugin_slug ) {
478
+ if ( is_dir(WP_PLUGIN_DIR . '/' . $plugin_slug) ) {
479
+ return TRUE;
480
+ }
481
+
482
+ return FALSE;
483
+ }
484
+
485
+ /**
486
+ * Check if plugin is must used.
487
+ *
488
+ * @param $plugin_slug
489
+ *
490
+ * @return bool
491
+ */
492
+ public function is_plugin_mu( $plugin_slug ) {
493
+ if ( $plugin_slug != '' ) {
494
+ if ( is_dir(WPMU_PLUGIN_DIR . '/' . $plugin_slug) ) {
495
+ return TRUE;
496
+ }
497
+ }
498
+
499
+ return FALSE;
500
+ }
501
+
502
+ public function na_action_link( $plugin, $action = 'activate' ) {
503
+ if ( strpos($plugin, '/') ) {
504
+ $plugin = str_replace('\/', '%2F', $plugin);
505
+ }
506
+ $url = sprintf(admin_url('plugins.php?action=' . $action . '&plugin=%s&plugin_status=all&paged=1&s'), $plugin);
507
+ $_REQUEST['plugin'] = $plugin;
508
+ $url = wp_nonce_url($url, $action . '-plugin_' . $plugin);
509
+
510
+ return $url;
511
+ }
512
+ }
changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 1.3.15 =
2
  Added: Banner to install 10Web manager.
3
 
@@ -7,7 +10,7 @@ Fixed: Conditional filters for hashtags.
7
 
8
  = 1.3.13 =
9
  New: Option to get hashtag top media
10
- Improved: Notices during Facebook login
11
  Fixed: Occasional JS error on front end
12
 
13
  = 1.3.12 =
1
+ = 1.3.16 =
2
+ Fixed: First time authorization.
3
+
4
  = 1.3.15 =
5
  Added: Banner to install 10Web manager.
6
 
10
 
11
  = 1.3.13 =
12
  New: Option to get hashtag top media
13
+ Improved: Notices during Facebook Log in
14
  Fixed: Occasional JS error on front end
15
 
16
  = 1.3.12 =
css/wdi_backend.css CHANGED
@@ -1804,8 +1804,3 @@ body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){
1804
  #wpbody-content>div:not(.wrap):not(.wd_topic), .wrap .notice:not(.wd-notice), .notice:not(.wd-notice) {
1805
  display: none;
1806
  }
1807
-
1808
- #wpbody-content .wrap #v2_tenweb_notice_cont {
1809
- display: flex;
1810
- }
1811
-
1804
  #wpbody-content>div:not(.wrap):not(.wd_topic), .wrap .notice:not(.wd-notice), .notice:not(.wd-notice) {
1805
  display: none;
1806
  }
 
 
 
 
 
framework/WDILibrary.php CHANGED
@@ -1,28 +1,9 @@
1
  <?php
2
-
3
  class WDILibrary {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
  public function __construct() {
17
  }
18
 
19
-
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- // Public Methods //
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
- // Getters & Setters //
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
  public static function get($key, $default_value = '') {
27
  if (isset($_GET[$key])) {
28
  $value = $_GET[$key];
@@ -1115,7 +1096,7 @@ class WDILibrary {
1115
  }
1116
 
1117
  public static function add_auth_button($text = ""){
1118
- $new_url = urlencode(admin_url('admin.php?page=wdi_settings')) . '&response_type=token';
1119
  ?>
1120
  <a onclick="document.cookie = 'wdi_autofill=true'" class="wdi_sign_in_button"
1121
  href="https://api.instagram.com/oauth/authorize/?client_id=54da896cf80343ecb0e356ac5479d9ec&scope=basic+public_content&redirect_uri=http://api.web-dorado.com/instagram/?return_url=<?php echo $new_url; ?>">
@@ -1186,146 +1167,4 @@ class WDILibrary {
1186
 
1187
  return false;
1188
  }
1189
-
1190
- /**
1191
- * Is plugin active.
1192
- *
1193
- * @param $plugin_name
1194
- *
1195
- * @return bool
1196
- */
1197
- public static function is_plugin_installed($plugin_name) {
1198
- if ( is_dir(WP_PLUGIN_DIR . '/' . $plugin_name . '/') ) {
1199
- return TRUE;
1200
- }
1201
-
1202
- return FALSE;
1203
- }
1204
-
1205
- /**
1206
- * Get activation or deactivation link of a plugin
1207
- *
1208
- * @author Nazmul Ahsan <mail@nazmulahsan.me>
1209
- *
1210
- * @param string $plugin plugin file name
1211
- * @param string $action action to perform. activate or deactivate
1212
- *
1213
- * @return string $url action url
1214
- */
1215
- public static function na_action_link( $plugin, $action = 'activate' ) {
1216
- if ( strpos($plugin, '/') ) {
1217
- $plugin = str_replace('\/', '%2F', $plugin);
1218
- }
1219
- $url = sprintf(admin_url('plugins.php?action=' . $action . '&plugin=%s&plugin_status=all&paged=1&s'), $plugin);
1220
- $_REQUEST['plugin'] = $plugin;
1221
- $url = wp_nonce_url($url, $action . '-plugin_' . $plugin);
1222
-
1223
- return $url;
1224
- }
1225
-
1226
- public static function twbb_install_button($v) {
1227
- $prefix = WD_WDI_PREFIX;
1228
- $slug = '10web-manager';
1229
- $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $slug), 'install-plugin_' . $slug));
1230
- $activation_url = self::na_action_link($slug . '/10web-manager.php', 'activate');
1231
- $tenweb_url = admin_url('admin.php?page=tenweb_menu');
1232
- $dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
1233
- $activate = self::is_plugin_installed($slug) && !is_plugin_active('10web-manager/manager.php') ? TRUE : FALSE;
1234
- ?>
1235
- <a class="button<?php echo($v == 2 ? ' button-primary' : ''); ?> tenweb_activaion"
1236
- id="<?php echo $activate ? 'activate_now' : 'install_now'; ?>"
1237
- data-activation="<?php _e("Activation", $prefix); ?>"
1238
- data-tenweb-url="<?php echo $tenweb_url; ?>"
1239
- data-install-url="<?php echo $install_url; ?>"
1240
- data-activate-url="<?php echo $activation_url; ?>">
1241
- <span class="tenweb_activaion_text"><?php echo $activate ? __("Activate", $prefix) : __("Install", $prefix); ?></span>
1242
- <span class="spinner" id="loading"></span>
1243
- </a>
1244
- <span class="hide <?php echo $activate ? 'error_activate' : 'error_install tenweb_active'; ?> ">
1245
- <?php echo $activate ? __("Activation failed, please try again.", $prefix) : __("Installation failed, please try again.", $prefix); ?>
1246
- </span>
1247
- <script>
1248
- var url = jQuery(".tenweb_activaion").attr("data-install-url");
1249
- var activate_url = jQuery(".tenweb_activaion").attr("data-activate-url");
1250
-
1251
- function install_tenweb_plugin() {
1252
- jQuery("#loading").addClass('is-active');
1253
- jQuery(this).prop('disable', true);
1254
- jQuery.ajax({
1255
- method: "POST",
1256
- url: url,
1257
- }).done(function () {
1258
- /* Check if plugin installed.*/
1259
- jQuery.ajax({
1260
- type: 'POST',
1261
- dataType: 'json',
1262
- url: jQuery("#verifyUrl").attr('data-url'),
1263
- error: function () {
1264
- jQuery("#loading").removeClass('is-active');
1265
- jQuery(".error_install").show();
1266
- },
1267
- success: function (response) {
1268
- if (response.status_install == 1) {
1269
- jQuery('#install_now .tenweb_activaion_text').text(jQuery("#install_now").data("activation"));
1270
- activate_tenweb_plugin();
1271
- }
1272
- else {
1273
- jQuery("#loading").removeClass('is-active');
1274
- jQuery(".error_install").removeClass('hide');
1275
- }
1276
- }
1277
- });
1278
- }).fail(function () {
1279
- jQuery("#loading").removeClass('is-active');
1280
- jQuery(".error_install").removeClass('hide');
1281
- });
1282
- }
1283
- function activate_tenweb_plugin() {
1284
- jQuery("#activate_now #loading").addClass('is-active');
1285
- jQuery.ajax({
1286
- method: "POST",
1287
- url: activate_url,
1288
- }).done(function () {
1289
- jQuery("#loading").removeClass('is-active');
1290
- var data_tenweb_url = '';
1291
- /* Check if plugin installed.*/
1292
- jQuery.ajax({
1293
- type: 'POST',
1294
- dataType: 'json',
1295
- url: jQuery("#verifyUrl").attr('data-url'),
1296
- error: function () {
1297
- jQuery("#loading").removeClass('is-active');
1298
- jQuery(".error_activate").removeClass('hide');
1299
- },
1300
- success: function (response) {
1301
- if (response.status_active == 0) {
1302
- //jQuery('#install_now').addClass('hide');
1303
- data_tenweb_url = jQuery('.tenweb_activaion').attr('data-tenweb-url');
1304
- jQuery.post('<?php echo $dismiss_url; ?>');
1305
- }
1306
- else {
1307
- jQuery("#loading").removeClass('is-active');
1308
- jQuery(".error_activate").removeClass('hide');
1309
- }
1310
- },
1311
- complete: function () {
1312
- if (data_tenweb_url != '') {
1313
- window.location.href = data_tenweb_url;
1314
- }
1315
- }
1316
- });
1317
- }).fail(function () {
1318
- jQuery("#loading").removeClass('is-active');
1319
- });
1320
- }
1321
- jQuery("#install_now").on("click", function () {
1322
- install_tenweb_plugin();
1323
- });
1324
- jQuery("#activate_now").on("click", function () {
1325
- activate_tenweb_plugin();
1326
- });
1327
- </script>
1328
-
1329
- <?php
1330
- }
1331
  }
1
  <?php
 
2
  class WDILibrary {
3
+
 
 
 
 
 
 
 
 
 
 
 
4
  public function __construct() {
5
  }
6
 
 
 
 
 
 
 
 
7
  public static function get($key, $default_value = '') {
8
  if (isset($_GET[$key])) {
9
  $value = $_GET[$key];
1096
  }
1097
 
1098
  public static function add_auth_button($text = ""){
1099
+ $new_url = urlencode(admin_url('admin.php?page=wdi_settings')) . '&response_type=token&state='. admin_url('admin.php?wdi_settings');
1100
  ?>
1101
  <a onclick="document.cookie = 'wdi_autofill=true'" class="wdi_sign_in_button"
1102
  href="https://api.instagram.com/oauth/authorize/?client_id=54da896cf80343ecb0e356ac5479d9ec&scope=basic+public_content&redirect_uri=http://api.web-dorado.com/instagram/?return_url=<?php echo $new_url; ?>">
1167
 
1168
  return false;
1169
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1170
  }
images/spinner.gif ADDED
Binary file
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 5.2
7
- Stable tag: 1.3.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -506,6 +506,9 @@ Please make sure you don't have any important information before you proceed.
506
 
507
  == Changelog ==
508
 
 
 
 
509
  = 1.3.15 =
510
  Added: Banner to install 10Web manager.
511
 
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 5.2
7
+ Stable tag: 1.3.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
506
 
507
  == Changelog ==
508
 
509
+ = 1.3.16 =
510
+ Fixed: First time authorization.
511
+
512
  = 1.3.15 =
513
  Added: Banner to install 10Web manager.
514
 
wd-instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Instagram Feed by 10Web
4
  Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/
5
  Description: Instagram Feed by 10Web is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
- Version: 1.3.15
7
  Author: 10Web
8
  Author URI: https://10Web.io
9
  License: GPLv2 or later
@@ -20,7 +20,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
20
  //define("wdi",'wdi');
21
  define('WDI_FEED_TABLE','wdi_feeds');
22
  define('WDI_THEME_TABLE','wdi_themes');
23
- define('WDI_VERSION','1.3.15');
24
  define('WD_WDI_PREFIX', 'wdi' );
25
  define('WDI_IS_PRO', false );
26
  $wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
@@ -1044,327 +1044,25 @@ function wdi_elementor(){
1044
  }
1045
  }
1046
 
1047
-
1048
  /**
1049
- * Show 10Web manager plugin install or activate banner.
1050
- *
1051
- * @return string
1052
  */
1053
- function wdi_tenweb_install_notice() {
1054
- if ( ( !isset($_GET['page']) || strpos(esc_html($_GET['page']), 'wdi_') === FALSE ) ) {
1055
- return '';
1056
- }
1057
-
1058
- // Remove old notice.
1059
- if ( get_option('tenweb_notice_status') !== FALSE ) {
1060
- update_option('tenweb_notice_status', '1', 'no');
1061
- }
1062
-
1063
- $meta_value = get_option('tenweb_notice_status');
1064
- if ( $meta_value === '' || $meta_value === FALSE ) {
1065
- require_once(WDI_DIR . '/framework/WDILibrary.php');
1066
- ob_start();
1067
- $prefix = WD_WDI_PREFIX;
1068
- $url = WDI_URL;
1069
- $dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
1070
- $verify_url = add_query_arg( array ('action' => 'wdi_tenweb_status'), admin_url('admin-ajax.php'));
1071
- ?>
1072
- <style>
1073
- .hide {
1074
- display: none !important;
1075
- }
1076
- #verifyUrl {
1077
- display: none
1078
- }
1079
- #loading {
1080
- position: absolute;
1081
- right: 20px;
1082
- top: 50%;
1083
- transform: translateY(-50%);
1084
- margin: 0px;
1085
- background: url("<?php echo $url . '/images/ajax_loader.png'; ?>") no-repeat;
1086
- background-size: 20px 20px;
1087
- filter: alpha(opacity=70);
1088
- }
1089
- #wd_tenweb_logo_notice {
1090
- height: 32px;
1091
- float: left;
1092
- }
1093
- .error_install, .error_activate {
1094
- color: red;
1095
- font-size: 10px;
1096
- }
1097
- /* -------------------Version 2 styles------------------ */
1098
- #wpbody-content #v2_tenweb_notice_cont {
1099
- display: none;
1100
- flex-wrap: wrap;
1101
- background: #fff;
1102
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
1103
- position: relative;
1104
- padding: 5px 0;
1105
- overflow: hidden;
1106
- border-left: 4px solid #0073AA;
1107
- font-family: Open Sans, sans-serif;
1108
- height: 40px;
1109
- min-height: 40px;
1110
- }
1111
- .v2_logo {
1112
- display: flex;
1113
- flex-direction: column;
1114
- justify-content: center;
1115
- height: inherit;
1116
- }
1117
-
1118
- #v2_tenweb_notice_cont {
1119
- height: 50px;
1120
- padding: 0px;
1121
- }
1122
-
1123
- .v2_content {
1124
- flex-grow: 1;
1125
- height: inherit;
1126
- margin-left: 34px;
1127
- }
1128
-
1129
- .v2_content p {
1130
- font-size: 16px;
1131
- color: #333B46;
1132
- font-weight: 600;
1133
- line-height: 40px;
1134
- margin: 0;
1135
- }
1136
- #wd_tenweb_logo_notice {
1137
- margin-left: 35px;
1138
- height: 30px;
1139
- line-height: 100%;
1140
- }
1141
-
1142
- .v2_button {
1143
- display: flex;
1144
- margin-right: 30px;
1145
- flex-direction: column;
1146
- justify-content: center;
1147
- }
1148
-
1149
- .v2_button #install_now, #activate_now {
1150
- width: 112px;
1151
- height: 32px;
1152
- line-height: 30px;
1153
- font-size: 14px;
1154
- text-align: center;
1155
- padding: 0;
1156
- }
1157
-
1158
- #v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
1159
- top: 3px;
1160
- right: 3px;
1161
- padding: 0px;
1162
- }
1163
-
1164
- .v2_button .button {
1165
- position: relative;
1166
- }
1167
-
1168
- .v2_button .button #loading {
1169
- position: absolute;
1170
- right: 10px;
1171
- top: 50%;
1172
- transform: translateY(-50%);
1173
- margin: 0px;
1174
- background-size: 12px 12px;
1175
- filter: alpha(opacity=70);
1176
- width: 12px;
1177
- height: 12px;
1178
- }
1179
-
1180
- @media only screen and (max-width: 1200px) and (min-width: 821px) {
1181
- #wpbody-content #v2_tenweb_notice_cont {
1182
- height: 50px;
1183
- min-height: 50px;
1184
- }
1185
-
1186
- #v2_tenweb_notice_cont {
1187
- height: 60px;
1188
- }
1189
-
1190
- .v2_content {
1191
- margin-left: 25px;
1192
- }
1193
- .v2_content p {
1194
- font-size: 14px;
1195
- color: #333B46;
1196
- font-weight: 600;
1197
- line-height: 20px;
1198
- margin-top: 5px;
1199
- }
1200
- .v2_content p span {
1201
- display: block;
1202
- }
1203
-
1204
- #wd_tenweb_logo_notice {
1205
- margin-left: 25px;
1206
- height: 30px;
1207
- line-height: 100%;
1208
- }
1209
-
1210
- .v2_button {
1211
- display: flex;
1212
- margin-right: 30px;
1213
- flex-direction: column;
1214
- justify-content: center;
1215
- }
1216
-
1217
- .v2_button #install_now {
1218
- width: 112px;
1219
- height: 32px;
1220
- line-height: 30px;
1221
- font-size: 14px;
1222
- text-align: center;
1223
- padding: 0;
1224
- }
1225
-
1226
- #v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
1227
- top: 3px;
1228
- right: 3px;
1229
- }
1230
- }
1231
-
1232
- @media only screen and (max-width: 820px) and (min-width: 781px) {
1233
-
1234
- #wpbody-content #v2_tenweb_notice_cont {
1235
- height: 50px;
1236
- min-height: 50px;
1237
- }
1238
-
1239
- #v2_tenweb_notice_cont {
1240
- height: 60px;
1241
- }
1242
-
1243
- .v2_content {
1244
- margin-left: 25px;
1245
- }
1246
-
1247
- .v2_content p {
1248
- font-size: 13px;
1249
- color: #333B46;
1250
- font-weight: 600;
1251
- line-height: 20px;
1252
- margin-top: 5px;
1253
- }
1254
-
1255
- .v2_content p span {
1256
- display: block;
1257
- }
1258
-
1259
- }
1260
-
1261
- @media only screen and (max-width: 780px) {
1262
-
1263
- #wpbody-content #v2_tenweb_notice_cont {
1264
- height: auto;
1265
- min-height: auto;
1266
- }
1267
-
1268
- #v2_tenweb_notice_cont {
1269
- height: auto;
1270
- padding: 5px;
1271
- }
1272
-
1273
- .v2_logo {
1274
- display: block;
1275
- height: auto;
1276
- width: 100%;
1277
- margin-top: 5px;
1278
- }
1279
-
1280
- .v2_content {
1281
- display: block;
1282
- margin-left: 9px;
1283
- margin-top: 10px;
1284
- width: calc(100% - 10px);
1285
- }
1286
-
1287
- .v2_content p {
1288
- line-height: unset;
1289
- font-size: 15px;
1290
- line-height: 25px;
1291
- }
1292
- .v2_content p span{
1293
- display: block
1294
- }
1295
- #wd_tenweb_logo_notice {
1296
- margin-left: 9px;
1297
- }
1298
-
1299
- .v2_button {
1300
- margin-left: 9px;
1301
- margin-top: 10px;
1302
- margin-bottom: 5px;
1303
- }
1304
- }
1305
- </style>
1306
- <div id="v2_tenweb_notice_cont" class="notice wd-notice">
1307
- <div class="v2_logo">
1308
- <img id="wd_tenweb_logo_notice" src="<?php echo $url . '/images/instagram_logo.png'; ?>" />
1309
- </div>
1310
- <div class="v2_content">
1311
- <p>
1312
- <?php echo sprintf(__('%s10Web Instagram Feed advises:%s %sUse Image Optimizer service to optimize your images quickly and easily.%s', $prefix), '<span>','</span>', '<span>','</span>'); ?>
1313
- </p>
1314
- </div>
1315
- <div class="v2_button">
1316
- <?php WDILibrary::twbb_install_button(2); ?>
1317
- </div>
1318
- <button type="button" class="wd_tenweb_notice_dissmiss notice-dismiss" onclick="jQuery('#v2_tenweb_notice_cont').attr('style', 'display: none !important;'); jQuery.post('<?php echo $dismiss_url; ?>');"><span class="screen-reader-text"></span></button>
1319
- <div id="verifyUrl" data-url="<?php echo $verify_url; ?>"></div>
1320
- </div>
1321
- <?php
1322
-
1323
- echo ob_get_clean();
1324
- }
1325
- }
1326
-
1327
- if ( !function_exists('is_plugin_active') ) {
1328
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1329
- }
1330
-
1331
- if ( !is_plugin_active( '10web-manager/10web-manager.php' ) ) {
1332
- add_action('admin_notices', 'wdi_tenweb_install_notice');
1333
  }
1334
-
1335
- if ( !function_exists('wd_tenwebps_install_notice_status') ) {
1336
- // Add usermeta to DB.
1337
- function wd_tenwebps_install_notice_status() {
1338
- update_option('tenweb_notice_status', '1', 'no');
1339
- }
1340
- add_action('wp_ajax_wd_tenweb_dismiss', 'wd_tenwebps_install_notice_status');
1341
- }
1342
- // Check status 10web manager install
1343
- function wdi_check_tenweb_status() {
1344
- require_once(WDI_DIR . '/framework/WDILibrary.php');
1345
- $status_install = 0;
1346
- $status_active = 0;
1347
- if ( WDILibrary::is_plugin_installed('10web-manager') ) {
1348
- $status_install = 1;
1349
- }
1350
- else {
1351
- if ( is_plugin_active('10web-manager/10web-manager.php') ) {
1352
- $status_active = 1;
1353
- }
1354
- }
1355
- if ( WDILibrary::is_plugin_installed('10web-manager') ) {
1356
- $old_opt_array = array();
1357
- $new_opt_array = array( 'wd-instagram-feed' => 43 ); // core_id
1358
- $key = 'tenweb_manager_installed';
1359
- $option = get_option($key);
1360
- if ( !empty($option) ) {
1361
- $old_opt_array = (array) json_decode($option);
1362
- }
1363
- $array_installed = array_merge($new_opt_array, $old_opt_array);
1364
- update_option($key, json_encode($array_installed));
1365
- }
1366
- $jsondata = array( 'status_install' => $status_install, 'status_active' => $status_active );
1367
- echo json_encode($jsondata);
1368
- exit;
1369
- }
1370
- add_action('wp_ajax_wdi_tenweb_status', 'wdi_check_tenweb_status');
3
  Plugin Name: Instagram Feed by 10Web
4
  Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/
5
  Description: Instagram Feed by 10Web is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
+ Version: 1.3.16
7
  Author: 10Web
8
  Author URI: https://10Web.io
9
  License: GPLv2 or later
20
  //define("wdi",'wdi');
21
  define('WDI_FEED_TABLE','wdi_feeds');
22
  define('WDI_THEME_TABLE','wdi_themes');
23
+ define('WDI_VERSION','1.3.16');
24
  define('WD_WDI_PREFIX', 'wdi' );
25
  define('WDI_IS_PRO', false );
26
  $wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
1044
  }
1045
  }
1046
 
 
1047
  /**
1048
+ * Show 10Web plugin's install/activate banner.
 
 
1049
  */
1050
+ if ( !class_exists ( 'TWBanner' ) ) {
1051
+ require_once( WDI_DIR . '/banner_class.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1052
  }
1053
+ if ( !WDI_IS_PRO ) {
1054
+ $tw_banner_params = array(
1055
+ 'menu_postfix' => WD_WDI_PREFIX . '_', // To display on only current plugin pages.
1056
+ 'prefix' => WD_WDI_PREFIX, // Current plugin prefix.
1057
+ 'logo' => '/images/insta_2.svg', // Current plugin logo relative URL.
1058
+ 'plugin_slug' => 'wd-instagram-feed', // Current plugin slug.
1059
+ 'plugin_url' => WDI_URL, // Current plugin URL.
1060
+ 'plugin_id' => 43, // Current plugin id.
1061
+ 'text' => sprintf(__("%s Instagram Feed advises:%s %sUse Image Optimizer service to optimize your images quickly and easily.%s", WD_WDI_PREFIX), '<span>','</span>', '<span>','</span>'), // Banner text.
1062
+ 'slug' => '10web-manager', // Plugin slug to be installed.
1063
+ 'mu_plugin_slug' => '10web-manager', // Must use plugin slug.
1064
+ 'base_php' => '10web-manager.php', // Plugin base php filename to be installed.
1065
+ 'page_url' => admin_url('admin.php?page=tenweb_menu'), // Redirect to URL after activating the plugin.
1066
+ );
1067
+ new TWBanner($tw_banner_params);
1068
+ }