Photo Gallery by WD – Responsive Photo Gallery - Version 1.5.22

Version Description

  • Changed: Banner to install image optimizer plugin.
Download this release

Release Info

Developer 10web
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.5.22
Comparing to
See all releases

Code changes from version 1.5.20 to 1.5.22

admin/views/LibSubscribe.php CHANGED
@@ -1,9 +1,11 @@
1
- <?php $admin_data = wp_get_current_user();
 
2
 
3
  $user_first_name = get_user_meta($admin_data->ID, "first_name", true);
4
  $user_last_name = get_user_meta($admin_data->ID, "last_name", true);
5
 
6
  $name = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
 
7
  ?>
8
  <script>
9
  jQuery(document).on("ready", function () {
@@ -59,11 +61,27 @@ $name = $user_first_name || $user_last_name ? $user_first_name . " " . $user_las
59
  </p>
60
  <div class="form_desc"><?php _e( "Submitting this form you agree that 10Web stores your name, email, and site URL. We won’t share your info with third parties. We are GDPR compliant.", BWG()->prefix ); ?></div>
61
  <div id="form_buttons">
62
- <input type="hidden" name="<?php echo BWG()->prefix; ?>_sub_action" value="allow">
63
- <input type="button" id="tenweb_subscribe_submit" value="RECEIVE EBOOK">
 
64
  <a href="<?php echo "admin.php?page=" . BWG()->prefix . "_subscribe&" . BWG()->prefix . "_sub_action=skip" ;?>" class="skip more" ><?php _e( "Skip", BWG()->prefix ); ?></a>
65
  </div>
66
  </form>
67
  </div>
68
  </div>
69
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $admin_data = wp_get_current_user();
3
 
4
  $user_first_name = get_user_meta($admin_data->ID, "first_name", true);
5
  $user_last_name = get_user_meta($admin_data->ID, "last_name", true);
6
 
7
  $name = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
8
+ $bwg_subscribe = get_option("bwg_subscribe_email");
9
  ?>
10
  <script>
11
  jQuery(document).on("ready", function () {
61
  </p>
62
  <div class="form_desc"><?php _e( "Submitting this form you agree that 10Web stores your name, email, and site URL. We won’t share your info with third parties. We are GDPR compliant.", BWG()->prefix ); ?></div>
63
  <div id="form_buttons">
64
+ <input type="hidden" name="<?php echo BWG()->prefix; ?>_sub_action" value="allow" />
65
+ <input type="hidden" name="page" value="bwg_subscribe" />
66
+ <input type="button" id="tenweb_subscribe_submit" value="RECEIVE EBOOK" />
67
  <a href="<?php echo "admin.php?page=" . BWG()->prefix . "_subscribe&" . BWG()->prefix . "_sub_action=skip" ;?>" class="skip more" ><?php _e( "Skip", BWG()->prefix ); ?></a>
68
  </div>
69
  </form>
70
  </div>
71
  </div>
72
  </div>
73
+ <?php if ($bwg_subscribe !== false && isset($_GET["bwg_sub_action"]) && $_GET["bwg_sub_action"] == "allow") : ?>
74
+ <div id="tenweb_subscribe_popup" class="subscribed">
75
+ <div class="subscribe_popup_content">
76
+ <div class="subscribe_email"><?php echo $bwg_subscribe; ?></div>
77
+ <h3>We've just sent you the eBook!</h3>
78
+ <p class="bold">If you are a Gmail user check:</p>
79
+ <p>Primary, Promotions, Social, Updates or Forums.</p>
80
+ <img src="<?php echo BWG()->plugin_url; ?>/images/subscribe/popup_img.png">
81
+ <p class="bold">Warning: also check your spam or junk!</p>
82
+ <p><b>1.</b> Select the message and click Not Spam.</p>
83
+ <p><b>2.</b> Recheck all inbox tabs.</p>
84
+ <a href="<?php echo admin_url('admin.php?page=galleries_bwg'); ?>" class="got_it">GOT IT</a>
85
+ </div>
86
+ </div>
87
+ <?php endif; ?>
css/bwg_subscribe.css CHANGED
@@ -10,6 +10,7 @@
10
  background-size: contain;
11
  position: relative;
12
  }
 
13
  #tenweb_new_subscribe:before{
14
  content:"";
15
  background-image: url(../images/subscribe/square.svg);
@@ -20,6 +21,10 @@
20
  height: 100%;
21
  opacity: 0.4;
22
  }
 
 
 
 
23
  #tenweb_new_subscribe .tenweb_subscribe_container{
24
  background-image: url(../images/subscribe/book.png);
25
  background-repeat: no-repeat;
@@ -154,6 +159,109 @@
154
  #tenweb_new_subscribe #tenweb_form .error input[type="text"]{
155
  border-color: #e95e5b;
156
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  @media screen and (min-width: 1840px){
158
  #tenweb_new_subscribe .tenweb_subscribe_container{
159
  background-size: 970px;
@@ -350,4 +458,22 @@
350
  #tenweb_new_subscribe #tenweb_form {
351
  font-size: 12px;
352
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
  }
10
  background-size: contain;
11
  position: relative;
12
  }
13
+ #tenweb_subscribe_popup .subscribe_popup_content:before,
14
  #tenweb_new_subscribe:before{
15
  content:"";
16
  background-image: url(../images/subscribe/square.svg);
21
  height: 100%;
22
  opacity: 0.4;
23
  }
24
+ #tenweb_subscribe_popup .subscribe_popup_content:before{
25
+ content:"";
26
+ z-index: -1;
27
+ }
28
  #tenweb_new_subscribe .tenweb_subscribe_container{
29
  background-image: url(../images/subscribe/book.png);
30
  background-repeat: no-repeat;
159
  #tenweb_new_subscribe #tenweb_form .error input[type="text"]{
160
  border-color: #e95e5b;
161
  }
162
+
163
+ #tenweb_subscribe_popup{
164
+ display: none;
165
+ width: 100%;
166
+ height: 100%;
167
+ background: rgba(50, 58, 69, 0.5);
168
+ position: fixed;
169
+ left: 0;
170
+ top: 0;
171
+ z-index: 9999999;
172
+ }
173
+ #tenweb_subscribe_popup.subscribed{
174
+ display: block !important;
175
+ }
176
+ #tenweb_subscribe_popup .subscribe_popup_content{
177
+ padding: 70px 40px 30px;
178
+ -webkit-box-sizing: border-box;
179
+ -moz-box-sizing: border-box;
180
+ box-sizing: border-box;
181
+ max-width: 98%;
182
+ -webkit-transform: translateY(-50%) translateX(-50%);
183
+ -moz-transform: translateY(-50%) translateX(-50%);
184
+ transform: translateY(-50%) translateX(-50%);
185
+ position: absolute;
186
+ left: 50%;
187
+ top: 50%;
188
+ overflow: hidden;
189
+ margin: 0 auto;
190
+ background: #ffffff;
191
+ width: 595px;
192
+ border-radius: 20px;
193
+ color:#333B46;
194
+ text-align: center;
195
+ }
196
+ #tenweb_subscribe_popup .subscribe_popup_content h3{
197
+ color:#333B46;
198
+ }
199
+ #tenweb_subscribe_popup .subscribe_popup_content p{
200
+ font-size: 15px;
201
+ line-height: 24px;
202
+ margin: 0 0 7px 0;
203
+ }
204
+ #tenweb_subscribe_popup .subscribe_popup_content p.bold{
205
+ margin: 0 0 10px 0;
206
+ }
207
+ #tenweb_subscribe_popup .subscribe_popup_content img{
208
+ margin: 21px 0 13px;
209
+ max-width: 100%;
210
+ }
211
+ #tenweb_subscribe_popup .subscribe_popup_content p.bold,
212
+ #tenweb_subscribe_popup .subscribe_popup_content p b,
213
+ #tenweb_subscribe_popup .subscribe_popup_content h3{
214
+ font-weight: 800;
215
+ text-align: left;
216
+ }
217
+ #tenweb_subscribe_popup .subscribe_popup_content p{
218
+ text-align: left;
219
+ }
220
+ #tenweb_subscribe_popup .subscribe_popup_content h3{
221
+ font-size: 20px;
222
+ line-height: 27px;
223
+ margin: 0 0 35px;
224
+ text-align: center;
225
+ }
226
+ #tenweb_subscribe_popup .subscribe_popup_content .subscribe_email {
227
+ font-size: 15px;
228
+ line-height: 20px;
229
+ padding: 12px 0 10px;
230
+ display: inline-block;
231
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
232
+ border-radius: 32px;
233
+ background: #ffffff;
234
+ margin: 0 auto 15px;
235
+ font-weight: 800;
236
+ position: relative;
237
+ max-width: 100%;
238
+ width: 320px;
239
+ }
240
+ #tenweb_subscribe_popup .subscribe_popup_content .subscribe_email:before {
241
+ content: "";
242
+ background: url(../images/subscribe/mail.svg);
243
+ background-size: contain;
244
+ width: 48px;
245
+ height: 48px;
246
+ position: absolute;
247
+ left: 50%;
248
+ margin-left: -24px;
249
+ top: -40px;
250
+ }
251
+ #tenweb_subscribe_popup .subscribe_popup_content a.got_it {
252
+ font-size: 16px;
253
+ line-height: 22px;
254
+ color: #ffffff;
255
+ background: #F8C332;
256
+ display: inline-block;
257
+ width: 160px;
258
+ padding: 9px 0;
259
+ border-radius: 23px;
260
+ text-decoration: none;
261
+ margin-top: 23px;
262
+ }
263
+
264
+
265
  @media screen and (min-width: 1840px){
266
  #tenweb_new_subscribe .tenweb_subscribe_container{
267
  background-size: 970px;
458
  #tenweb_new_subscribe #tenweb_form {
459
  font-size: 12px;
460
  }
461
+
462
+ #tenweb_subscribe_popup .subscribe_popup_content {
463
+ padding: 50px 20px 30px;
464
+ }
465
+ #tenweb_subscribe_popup .subscribe_popup_content h3 {
466
+ font-size: 17px;
467
+ margin: 0 0 25px;
468
+ }
469
+ #tenweb_subscribe_popup .subscribe_popup_content .subscribe_email:before {
470
+ content: "";
471
+ width: 40px;
472
+ height: 40px;
473
+ margin-left: -24px;
474
+ top: -33px;
475
+ }
476
+ #tenweb_subscribe_popup .subscribe_popup_content p {
477
+ font-size: 14px;
478
+ }
479
  }
css/bwg_tables.css CHANGED
@@ -2234,6 +2234,6 @@ li.tabs {
2234
  cursor: pointer;
2235
  }
2236
 
2237
- #wpbody-content>div:not(.wrap), .wrap .notice:not(.wd-notice) {
2238
  display: none;
2239
  }
2234
  cursor: pointer;
2235
  }
2236
 
2237
+ #wpbody-content>div:not(.wrap):not(#screen-meta-links), .wrap .notice:not(.wd-notice) {
2238
  display: none;
2239
  }
framework/WDWLibrary.php CHANGED
@@ -2788,12 +2788,12 @@ class WDWLibrary {
2788
 
2789
  public static function twbb_install_button($v) {
2790
  $prefix = BWG()->prefix;
2791
- $slug = '10web-manager';
2792
  $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $slug), 'install-plugin_' . $slug));
2793
- $activation_url = na_action_link($slug . '/10web-manager.php', 'activate');
2794
- $tenweb_url = admin_url('admin.php?page=tenweb_menu');
2795
  $dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
2796
- $activate = WDWLibrary::is_plugin_installed($slug) && !is_plugin_active('10web-manager/manager.php') ? TRUE : FALSE;
2797
  ?>
2798
  <a class="button<?php echo($v == 2 ? ' button-primary' : ''); ?> tenweb_activaion"
2799
  id="<?php echo $activate ? 'activate_now' : 'install_now'; ?>"
2788
 
2789
  public static function twbb_install_button($v) {
2790
  $prefix = BWG()->prefix;
2791
+ $slug = 'image-optimizer-wd';
2792
  $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $slug), 'install-plugin_' . $slug));
2793
+ $activation_url = na_action_link($slug . '/io-wd.php', 'activate');
2794
+ $tenweb_url = admin_url('admin.php?page=iowd_settings');
2795
  $dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
2796
+ $activate = WDWLibrary::is_plugin_installed($slug) && !is_plugin_active('image-optimizer-wd/io-wd.php') ? TRUE : FALSE;
2797
  ?>
2798
  <a class="button<?php echo($v == 2 ? ' button-primary' : ''); ?> tenweb_activaion"
2799
  id="<?php echo $activate ? 'activate_now' : 'install_now'; ?>"
images/subscribe/mail.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="47.972" height="48" viewBox="0 0 47.972 48"><defs><style>.a{fill:url(#a);}.b{fill:#9b7c27;}.c{fill:#f2f2f2;}.d{fill:#cdd6e0;}</style><linearGradient id="a" x1="-0.069" y1="0.098" x2="-1.52" y2="1.509" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#f8c332"/><stop offset="1" stop-color="#7c6219"/></linearGradient></defs><g transform="translate(0)"><path class="a" d="M48.232,204.29a2.033,2.033,0,0,1-.6,1.5,2.167,2.167,0,0,1-1.4.5H2.26a2.389,2.389,0,0,1-1.4-.5,2.032,2.032,0,0,1-.6-1.5V175.02H48.232Z" transform="translate(-0.261 -158.287)"/><path class="b" d="M48.232,16.733l-6.8,4.895L25.546,33.016a2.25,2.25,0,0,1-2.7,0L7.057,21.628l-6.8-4.895,6.8-4.895L21.848,1.249l1.1-.8a2.25,2.25,0,0,1,2.7,0l1.1.8,7.1,5.095,3.5,2.5,4.1,3Z" transform="translate(-0.261 0)"/><path class="c" d="M105.693,19.255V33.44L89.8,44.828a2.25,2.25,0,0,1-2.7,0L71.314,33.44V15.059a2,2,0,0,1,2-2H99.4Z" transform="translate(-64.518 -11.812)"/><path class="d" d="M365.974,17.656a1.578,1.578,0,0,0,1.6,1.6h4.6l-6.2-6.194v4.6Z" transform="translate(-330.995 -11.812)"/></g></svg>
images/subscribe/popup_img.png ADDED
Binary file
photo-gallery.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/
5
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
6
- * Version: 1.5.20
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/plugins/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -81,8 +81,8 @@ final class BWG {
81
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
82
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
83
  $this->main_file = plugin_basename(__FILE__);
84
- $this->plugin_version = '1.5.20';
85
- $this->db_version = '1.5.20';
86
  $this->prefix = 'bwg';
87
  $this->nicename = __('Photo Gallery', $this->prefix);
88
 
@@ -1951,7 +1951,6 @@ function wdpg_tenweb_install_notice() {
1951
  #wpbody-content #v2_tenweb_notice_cont {
1952
  display: flex;
1953
  flex-wrap: wrap;
1954
- width: calc(100% - 25px);
1955
  background: #fff;
1956
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
1957
  position: relative;
@@ -2118,13 +2117,11 @@ function wdpg_tenweb_install_notice() {
2118
  #wpbody-content #v2_tenweb_notice_cont {
2119
  height: auto;
2120
  min-height: auto;
2121
- width: calc(100% - 20px);
2122
  }
2123
 
2124
  #v2_tenweb_notice_cont {
2125
  height: auto;
2126
  padding: 5px;
2127
- width: calc(100% - 35px);
2128
  }
2129
 
2130
  .v2_logo {
@@ -2160,7 +2157,7 @@ function wdpg_tenweb_install_notice() {
2160
  }
2161
  }
2162
  </style>
2163
- <div id="v2_tenweb_notice_cont" class="wd-admin-notice">
2164
  <div class="v2_logo">
2165
  <img id="wd_tenweb_logo_notice" src="<?php echo $url . '/images/tenweb/Photo-Gallery-logo.svg'; ?>" />
2166
  </div>
@@ -2185,7 +2182,7 @@ if ( !function_exists('is_plugin_active') ) {
2185
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
2186
  }
2187
 
2188
- if ( !is_plugin_active( '10web-manager/10web-manager.php' ) && !BWG()->is_pro ) {
2189
  add_action('admin_notices', 'wdpg_tenweb_install_notice');
2190
  }
2191
 
@@ -2201,15 +2198,15 @@ if ( !function_exists('wd_tenwebps_install_notice_status') ) {
2201
  function check_tenweb_status() {
2202
  $status_install = 0;
2203
  $status_active = 0;
2204
- if ( WDWLibrary::is_plugin_installed('10web-manager') ) {
2205
  $status_install = 1;
2206
  }
2207
  else {
2208
- if ( is_plugin_active('10web-manager/10web-manager.php') ) {
2209
  $status_active = 1;
2210
  }
2211
  }
2212
- if ( WDWLibrary::is_plugin_installed('10web-manager') ) {
2213
  $old_opt_array = array();
2214
  $new_opt_array = array( 'photo-gallery' => 101 ); // core_id
2215
  $key = 'tenweb_manager_installed';
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/
5
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
6
+ * Version: 1.5.22
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/plugins/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
81
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
82
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
83
  $this->main_file = plugin_basename(__FILE__);
84
+ $this->plugin_version = '1.5.22';
85
+ $this->db_version = '1.5.22';
86
  $this->prefix = 'bwg';
87
  $this->nicename = __('Photo Gallery', $this->prefix);
88
 
1951
  #wpbody-content #v2_tenweb_notice_cont {
1952
  display: flex;
1953
  flex-wrap: wrap;
 
1954
  background: #fff;
1955
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
1956
  position: relative;
2117
  #wpbody-content #v2_tenweb_notice_cont {
2118
  height: auto;
2119
  min-height: auto;
 
2120
  }
2121
 
2122
  #v2_tenweb_notice_cont {
2123
  height: auto;
2124
  padding: 5px;
 
2125
  }
2126
 
2127
  .v2_logo {
2157
  }
2158
  }
2159
  </style>
2160
+ <div id="v2_tenweb_notice_cont" class="notice wd-notice">
2161
  <div class="v2_logo">
2162
  <img id="wd_tenweb_logo_notice" src="<?php echo $url . '/images/tenweb/Photo-Gallery-logo.svg'; ?>" />
2163
  </div>
2182
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
2183
  }
2184
 
2185
+ if ( !is_plugin_active( 'image-optimizer-wd/io-wd.php' ) && !BWG()->is_pro ) {
2186
  add_action('admin_notices', 'wdpg_tenweb_install_notice');
2187
  }
2188
 
2198
  function check_tenweb_status() {
2199
  $status_install = 0;
2200
  $status_active = 0;
2201
+ if ( WDWLibrary::is_plugin_installed('image-optimizer-wd') ) {
2202
  $status_install = 1;
2203
  }
2204
  else {
2205
+ if ( is_plugin_active('image-optimizer-wd/io-wd.php') ) {
2206
  $status_active = 1;
2207
  }
2208
  }
2209
+ if ( WDWLibrary::is_plugin_installed('image-optimizer-wd') ) {
2210
  $old_opt_array = array();
2211
  $new_opt_array = array( 'photo-gallery' => 101 ); // core_id
2212
  $key = 'tenweb_manager_installed';
readme.txt CHANGED
@@ -2,12 +2,12 @@
2
  Contributors: webdorado,wdsupport,photogallerysupport,10web
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 3.4
5
- Tested up to: 5.1
6
- Stable tag: 1.5.20
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Photo Gallery is the leading plugin for building beautiful mobile-friendly galleries in a few minutes.
11
 
12
  == Description ==
13
 
@@ -307,6 +307,13 @@ Choose whether to display random or the first/last specific number of images.
307
 
308
  == Changelog ==
309
 
 
 
 
 
 
 
 
310
  = 1.5.20 =
311
  * Added: "Get Free Ebook" page on activation.
312
  * Updated: jQuery upload library.
2
  Contributors: webdorado,wdsupport,photogallerysupport,10web
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 3.4
5
+ Tested up to: 5.2
6
+ Stable tag: 1.5.22
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ Photo Gallery is a powerful gallery plugin with a list of advanced options for creating stunning image galleries. Add the responsive plugin with cool gallery views.
11
 
12
  == Description ==
13
 
307
 
308
  == Changelog ==
309
 
310
+ = 1.5.22 =
311
+ * Changed: Banner to install image optimizer plugin.
312
+
313
+ = 1.5.21 =
314
+ * Added: Ebook delivery confirmation and instructions popup.
315
+ * Fixed: Screen options.
316
+
317
  = 1.5.20 =
318
  * Added: "Get Free Ebook" page on activation.
319
  * Updated: jQuery upload library.
wd/includes/subscribe.php CHANGED
@@ -98,8 +98,12 @@ class TenWebNewLibSubscribe
98
 
99
  $response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
100
 
101
- if (is_array($response_body) && $response_body["body"]["msg"] == "ok") {
102
-
 
 
 
 
103
  }
104
 
105
  }
@@ -108,8 +112,9 @@ class TenWebNewLibSubscribe
108
  } else {
109
  add_option($wd_options->prefix . "_subscribe_done", "1", '', 'no');
110
  }
111
-
112
- wp_safe_redirect($wd_options->after_subscribe);
 
113
  }
114
 
115
  }
98
 
99
  $response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
100
 
101
+ if (is_array($response_body) && $response_body["status"] == "ok") {
102
+ if (get_option($wd_options->prefix . "_subscribe_email") !== false) {
103
+ update_option($wd_options->prefix . "_subscribe_email", $data["email"]);
104
+ } else {
105
+ add_option($wd_options->prefix . "_subscribe_email", $data["email"], '', 'no');
106
+ }
107
  }
108
 
109
  }
112
  } else {
113
  add_option($wd_options->prefix . "_subscribe_done", "1", '', 'no');
114
  }
115
+ if ($_GET[$wd_options->prefix . "_sub_action"] == "skip") {
116
+ wp_safe_redirect($wd_options->after_subscribe);
117
+ }
118
  }
119
 
120
  }