Photo Gallery by WD – Responsive Photo Gallery - Version 1.5.6

Version Description

  • Fixed: Page scroll doesn't work after closing the lightbox on Edge browser.
  • Fixed: Ampersand in images keyword.
  • Fixed: Multiple galleries in one page in Elementor preview.
  • Fixed: Save image added date to gallery as image date instead of last modified date.
  • Fixed: If you click on the small icon from the WooCommerce product editor to insert shortcode, it shows popup header twice.
  • Fixed: Remove download button for embedded images.
  • Added: Add multiple images to gallery on mobile.
  • Added: Comments pagination under the table.
  • Added: Date column in comments.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.5.6
Comparing to
See all releases

Code changes from version 1.5.5 to 1.5.6

addons/addons.php CHANGED
@@ -9,13 +9,13 @@ function bwg_addons_display() {
9
  'icon' => '',
10
  'image' => BWG()->plugin_url . '/addons/images/ecommerce.png',
11
  ),
12
- 'photo-gallery-facebook' => array(
13
  'name' => __('Photo Gallery Facebook', BWG()->prefix),
14
  'url' => 'https://10web.io/plugins/wordpress-photo-gallery/',
15
  'description' => __('Photo Gallery Facebook is an add-on, which helps to display Facebook photos and videos within Photo Gallery plugin. You can create Facebook-only galleries, embed individual images and videos or include Facebook albums within mixed type albums.', BWG()->prefix),
16
  'icon' => '',
17
  'image' => BWG()->plugin_url . '/addons/images/facebook.png',
18
- ),
19
  'ngitopg' => array(
20
  'name' => __('NextGen Gallery Import to Photo Gallery', BWG()->prefix),
21
  'url' => 'https://10web.io/plugins/wordpress-photo-gallery/',
9
  'icon' => '',
10
  'image' => BWG()->plugin_url . '/addons/images/ecommerce.png',
11
  ),
12
+ /* 'photo-gallery-facebook' => array(
13
  'name' => __('Photo Gallery Facebook', BWG()->prefix),
14
  'url' => 'https://10web.io/plugins/wordpress-photo-gallery/',
15
  'description' => __('Photo Gallery Facebook is an add-on, which helps to display Facebook photos and videos within Photo Gallery plugin. You can create Facebook-only galleries, embed individual images and videos or include Facebook albums within mixed type albums.', BWG()->prefix),
16
  'icon' => '',
17
  'image' => BWG()->plugin_url . '/addons/images/facebook.png',
18
+ ),*/
19
  'ngitopg' => array(
20
  'name' => __('NextGen Gallery Import to Photo Gallery', BWG()->prefix),
21
  'url' => 'https://10web.io/plugins/wordpress-photo-gallery/',
admin/controllers/Uninstall.php CHANGED
@@ -18,6 +18,18 @@ class UninstallController_bwg {
18
  private $page;
19
 
20
  public function __construct() {
 
 
 
 
 
 
 
 
 
 
 
 
21
  $this->model = new UninstallModel_bwg();
22
  $this->view = new UninstallView_bwg();
23
 
18
  private $page;
19
 
20
  public function __construct() {
21
+ if ( !BWG()->is_pro ) {
22
+ global $bwg_options;
23
+ if ( !class_exists("TenWebLibConfig") ) {
24
+ $plugin_dir = apply_filters('tenweb_free_users_lib_path', array('version' => '1.1.1', 'path' => BWG()->plugin_dir));
25
+ include_once($plugin_dir['path'] . "/wd/config.php");
26
+ }
27
+ $config = new TenWebLibConfig();
28
+ $config->set_options($bwg_options);
29
+ $deactivate_reasons = new TenWebLibDeactivate($config);
30
+ $deactivate_reasons->submit_and_deactivate();
31
+ }
32
+
33
  $this->model = new UninstallModel_bwg();
34
  $this->view = new UninstallView_bwg();
35
 
admin/controllers/elementorWidget.php CHANGED
@@ -34,7 +34,7 @@ class BWGElementor extends \Elementor\Widget_Base {
34
  * @return array Widget categories.
35
  */
36
  public function get_categories() {
37
- return [ 'basic' ];
38
  }
39
 
40
  /**
34
  * @return array Widget categories.
35
  */
36
  public function get_categories() {
37
+ return [ 'tenweb-widgets' ];
38
  }
39
 
40
  /**
admin/models/Galleries.php CHANGED
@@ -1001,7 +1001,6 @@ class GalleriesModel_bwg {
1001
  'redirect_url' => $redirecturl
1002
  ), $where);
1003
  $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `alt`="' . $title . '", `description`="' . $desc . '", `redirect_url`="' . $redirecturl . '"' . $where);
1004
-
1005
  $message = 2;
1006
  if ( $updated !== FALSE ) {
1007
  $message = 25;
1001
  'redirect_url' => $redirecturl
1002
  ), $where);
1003
  $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `alt`="' . $title . '", `description`="' . $desc . '", `redirect_url`="' . $redirecturl . '"' . $where);
 
1004
  $message = 2;
1005
  if ( $updated !== FALSE ) {
1006
  $message = 25;
admin/views/AdminView.php CHANGED
@@ -99,7 +99,7 @@ class AdminView_bwg {
99
  ?>
100
  </h1>
101
  <?php
102
- if ($how_to_button) {
103
  require BWG()->plugin_dir . '/framework/howto/howto.php';
104
  }
105
  ?>
@@ -211,8 +211,7 @@ class AdminView_bwg {
211
  * @return string
212
  */
213
  protected function pagination($page_url, $total, $items_per_page = 20) {
214
- $paged = intval(abs(WDWLibrary::get('paged', 1)));
215
- $page_number = $paged < 0 ? 1 : $paged;
216
  $search = WDWLibrary::get('s', '');
217
  $orderby = WDWLibrary::get('orderby', '');
218
  $order = WDWLibrary::get('order', '');
99
  ?>
100
  </h1>
101
  <?php
102
+ if ( $how_to_button ) {
103
  require BWG()->plugin_dir . '/framework/howto/howto.php';
104
  }
105
  ?>
211
  * @return string
212
  */
213
  protected function pagination($page_url, $total, $items_per_page = 20) {
214
+ $page_number = WDWLibrary::get('paged', 1) < 0 ? 1 : WDWLibrary::get('paged', 1);
 
215
  $search = WDWLibrary::get('s', '');
216
  $orderby = WDWLibrary::get('orderby', '');
217
  $order = WDWLibrary::get('order', '');
admin/views/Galleries.php CHANGED
@@ -320,9 +320,12 @@ class GalleriesView_bwg extends AdminView_bwg {
320
  <option value="instagram" <?php echo(($params['gallery_type'] == 'instagram') ? 'selected="selected"' : ''); ?>>
321
  <?php _e('Instagram only', BWG()->prefix); ?>
322
  </option>
 
 
323
  <option value="facebook" <?php echo(($params['gallery_type'] == 'facebook') ? 'selected="selected"' : ''); ?>>
324
  <?php _e('Facebook', BWG()->prefix); ?>
325
  </option>
 
326
  </select>
327
  <input type="text" id="gallery_type_old" name="gallery_type_old" value="<?php echo $row->gallery_type; ?>" style='display:none;' />
328
  <?php if ( empty($params['rows'][0]) ) { ?>
@@ -509,13 +512,6 @@ class GalleriesView_bwg extends AdminView_bwg {
509
  </div>
510
  <!-- Edit from bulk block -->
511
  <div id="add_desc" class="opacity_image_desc bwg_image_desc">
512
- <div class="edit_cont_buttons">
513
- <input class="button button-primary button-large" type="button" onclick="spider_set_input_value('ajax_task', 'image_edit');
514
- spider_ajax_save('bwg_gallery');
515
- jQuery('.opacity_image_desc').hide();
516
- return false;" value="<?php _e('Update', BWG()->prefix); ?>" />
517
- <input class="button button-secondary button-large" type="button" onclick="jQuery('.opacity_image_desc').hide(); return false;" value="<?php echo __('Cancel', BWG()->prefix); ?>" />
518
- </div>
519
  <div>
520
  <span class="bwg_popup_label">
521
  <?php _e('Alt/Title: ', BWG()->prefix); ?>
@@ -534,6 +530,14 @@ class GalleriesView_bwg extends AdminView_bwg {
534
  </span>
535
  <textarea class="bwg_popup_input" type="text" id="desc" name="desc"></textarea>
536
  </div>
 
 
 
 
 
 
 
 
537
  </div>
538
  <div class="ajax-msg wd-hide">
539
  <?php
@@ -667,7 +671,7 @@ class GalleriesView_bwg extends AdminView_bwg {
667
  <?php echo $row->filename; ?>
668
  <i class="wd-info dashicons dashicons-info" data-id="wd-info-<?php echo $row->id; ?>"></i>
669
  <div id="wd-info-<?php echo $row->id; ?>" class="wd-hide">
670
- <p><?php echo __("Date modified", BWG()->prefix) . ': ' . ($temp ? $row->date : date("d F Y, H:i", strtotime($row->date))); ?></p>
671
  <p><?php echo __("Resolution", BWG()->prefix) . ': ' . $row->resolution; ?></p>
672
  <p><?php echo __("Size", BWG()->prefix) . ': ' . $row->size; ?></p>
673
  <p><?php echo __("Type", BWG()->prefix) . ': ' . $row->filetype; ?></p>
320
  <option value="instagram" <?php echo(($params['gallery_type'] == 'instagram') ? 'selected="selected"' : ''); ?>>
321
  <?php _e('Instagram only', BWG()->prefix); ?>
322
  </option>
323
+ <?php
324
+ if ( has_action('init_display_facebook_gallery_options_bwg') && $current_id != 0 ) { ?>
325
  <option value="facebook" <?php echo(($params['gallery_type'] == 'facebook') ? 'selected="selected"' : ''); ?>>
326
  <?php _e('Facebook', BWG()->prefix); ?>
327
  </option>
328
+ <?php } ?>
329
  </select>
330
  <input type="text" id="gallery_type_old" name="gallery_type_old" value="<?php echo $row->gallery_type; ?>" style='display:none;' />
331
  <?php if ( empty($params['rows'][0]) ) { ?>
512
  </div>
513
  <!-- Edit from bulk block -->
514
  <div id="add_desc" class="opacity_image_desc bwg_image_desc">
 
 
 
 
 
 
 
515
  <div>
516
  <span class="bwg_popup_label">
517
  <?php _e('Alt/Title: ', BWG()->prefix); ?>
530
  </span>
531
  <textarea class="bwg_popup_input" type="text" id="desc" name="desc"></textarea>
532
  </div>
533
+ <br>
534
+ <div class="edit_cont_buttons">
535
+ <input class="button button-primary button-large" type="button" onclick="spider_set_input_value('ajax_task', 'image_edit');
536
+ spider_ajax_save('bwg_gallery');
537
+ jQuery('.opacity_image_desc').hide();
538
+ return false;" value="<?php _e('Update', BWG()->prefix); ?>" />
539
+ <input class="button button-secondary button-large" type="button" onclick="jQuery('.opacity_image_desc').hide(); return false;" value="<?php echo __('Cancel', BWG()->prefix); ?>" />
540
+ </div>
541
  </div>
542
  <div class="ajax-msg wd-hide">
543
  <?php
671
  <?php echo $row->filename; ?>
672
  <i class="wd-info dashicons dashicons-info" data-id="wd-info-<?php echo $row->id; ?>"></i>
673
  <div id="wd-info-<?php echo $row->id; ?>" class="wd-hide">
674
+ <p><?php echo __("Date", BWG()->prefix) . ': ' . ($temp ? $row->date : date("d F Y, H:i", strtotime($row->date))); ?></p>
675
  <p><?php echo __("Resolution", BWG()->prefix) . ': ' . $row->resolution; ?></p>
676
  <p><?php echo __("Size", BWG()->prefix) . ': ' . $row->size; ?></p>
677
  <p><?php echo __("Type", BWG()->prefix) . ': ' . $row->filetype; ?></p>
admin/views/Options.php CHANGED
@@ -514,20 +514,16 @@ class OptionsView_bwg extends AdminView_bwg {
514
  </div>
515
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
516
  </div>
 
517
  <div class="wd-box-content wd-width-50">
518
  <div class="wd-box-title">
519
  <strong><?php _e('Facebook', BWG()->prefix); ?></strong>
520
  </div>
521
  <?php
522
- if ( has_action('init_display_facebook_options_bwg') ) {
523
  do_action('init_display_facebook_options_bwg', $row );
524
- }
525
- else {
526
- $link = '<a href="https://10web.io/plugins/wordpress-photo-gallery/" target="_blank">' . __('Photo Gallery Facebook Integration', BWG()->prefix) . '</a>';
527
- echo '<div class="error inline"><p>' . sprintf(__("Please install %s add-on to use this feature.", BWG()->prefix), $link) . '</p></div>';
528
- }
529
  ?>
530
  </div>
 
531
  </div>
532
  </div>
533
  </div>
@@ -1029,6 +1025,7 @@ class OptionsView_bwg extends AdminView_bwg {
1029
 
1030
  public static function gallery_options($row) {
1031
  $effects = self::get_effects();
 
1032
  ?>
1033
  <div id="thumbnails_options" class="gallery_options wd-box-content wd-width-100 bwg-flex-wrap">
1034
  <div class="wd-box-content wd-width-33">
@@ -1203,11 +1200,16 @@ class OptionsView_bwg extends AdminView_bwg {
1203
  <div class="wd-group">
1204
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
1205
  <div class="bwg-flex">
1206
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="gallery_download" id="gallery_download_1" value="1" <?php if ($row->gallery_download) echo 'checked="checked"'; ?> /><label for="gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
1207
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="gallery_download" id="gallery_download_0" value="0" <?php if (!$row->gallery_download) echo 'checked="checked"'; ?> /><label for="gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
1208
  </div>
1209
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
1210
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
1211
  </div>
1212
  </div>
1213
  <?php
@@ -1427,11 +1429,16 @@ class OptionsView_bwg extends AdminView_bwg {
1427
  <div class="wd-group">
1428
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
1429
  <div class="bwg-flex">
1430
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="masonry_gallery_download" id="masonry_gallery_download_1" value="1" <?php if ($row->masonry_gallery_download) echo 'checked="checked"'; ?> /><label for="masonry_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
1431
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="masonry_gallery_download" id="masonry_gallery_download_0" value="0" <?php if (!$row->masonry_gallery_download) echo 'checked="checked"'; ?> /><label for="masonry_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
1432
  </div>
1433
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
1434
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
1435
  </div>
1436
  </div>
1437
  <?php
@@ -1646,12 +1653,17 @@ class OptionsView_bwg extends AdminView_bwg {
1646
  <div class="wd-group">
1647
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
1648
  <div class="bwg-flex">
1649
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="mosaic_gallery_download" id="mosaic_gallery_download_1" value="1" <?php if ($row->mosaic_gallery_download) echo 'checked="checked"'; ?> /><label for="mosaic_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
1650
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="mosaic_gallery_download" id="mosaic_gallery_download_0" value="0" <?php if (!$row->mosaic_gallery_download) echo 'checked="checked"'; ?> /><label for="mosaic_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
1651
  </div>
1652
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
1653
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
1654
- </div>
 
 
 
 
 
1655
  </div>
1656
  <?php
1657
  if (function_exists('BWGEC')) {
@@ -1916,11 +1928,16 @@ class OptionsView_bwg extends AdminView_bwg {
1916
  <div class="wd-group">
1917
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
1918
  <div class="bwg-flex">
1919
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="slideshow_gallery_download" id="slideshow_gallery_download_1" value="1" <?php if ($row->slideshow_gallery_download) echo 'checked="checked"'; ?> /><label for="slideshow_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
1920
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="slideshow_gallery_download" id="slideshow_gallery_download_0" value="0" <?php if (!$row->slideshow_gallery_download) echo 'checked="checked"'; ?> /><label for="slideshow_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
1921
  </div>
1922
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
1923
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
1924
  </div>
1925
  </div>
1926
  </div>
@@ -2053,11 +2070,16 @@ class OptionsView_bwg extends AdminView_bwg {
2053
  <div class="wd-group">
2054
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2055
  <div class="bwg-flex">
2056
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="image_browser_gallery_download" id="image_browser_gallery_download_1" value="1" <?php if ($row->image_browser_gallery_download) echo 'checked="checked"'; ?> /><label for="image_browser_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2057
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="image_browser_gallery_download" id="image_browser_gallery_download_0" value="0" <?php if (!$row->image_browser_gallery_download) echo 'checked="checked"'; ?> /><label for="image_browser_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2058
  </div>
2059
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2060
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
2061
  </div>
2062
  </div>
2063
  </div>
@@ -2229,11 +2251,16 @@ class OptionsView_bwg extends AdminView_bwg {
2229
  <div class="wd-group">
2230
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2231
  <div class="bwg-flex">
2232
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="blog_style_gallery_download" id="blog_style_gallery_download_1" value="1" <?php if ($row->blog_style_gallery_download) echo 'checked="checked"'; ?> /><label for="blog_style_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2233
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="blog_style_gallery_download" id="blog_style_gallery_download_0" value="0" <?php if (!$row->blog_style_gallery_download) echo 'checked="checked"'; ?> /><label for="blog_style_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2234
  </div>
2235
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2236
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
2237
  </div>
2238
  </div>
2239
  </div>
@@ -2378,11 +2405,16 @@ class OptionsView_bwg extends AdminView_bwg {
2378
  <div class="wd-group">
2379
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2380
  <div class="bwg-flex">
2381
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="carousel_gallery_download" id="carousel_gallery_download_1" value="1" <?php if ($row->carousel_gallery_download) echo 'checked="checked"'; ?> /><label for="carousel_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2382
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="carousel_gallery_download" id="carousel_gallery_download_0" value="0" <?php if (!$row->carousel_gallery_download) echo 'checked="checked"'; ?> /><label for="carousel_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2383
  </div>
2384
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2385
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
2386
  </div>
2387
  </div>
2388
  </div>
@@ -2391,6 +2423,7 @@ class OptionsView_bwg extends AdminView_bwg {
2391
  }
2392
 
2393
  public static function gallery_group_options($row) {
 
2394
  ?>
2395
  <div id="album_compact_preview_options" class="album_options wd-box-content wd-width-100 bwg-flex-wrap">
2396
  <div class="wd-box-content wd-width-33">
@@ -2639,11 +2672,16 @@ class OptionsView_bwg extends AdminView_bwg {
2639
  <div class="wd-group">
2640
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2641
  <div class="bwg-flex">
2642
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_gallery_download" id="album_gallery_download_1" value="1" <?php if ($row->album_gallery_download) echo 'checked="checked"'; ?> /><label for="album_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2643
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_gallery_download" id="album_gallery_download_0" value="0" <?php if (!$row->album_gallery_download) echo 'checked="checked"'; ?> /><label for="album_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2644
  </div>
2645
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2646
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
2647
  </div>
2648
  </div>
2649
  <?php
@@ -2845,11 +2883,16 @@ class OptionsView_bwg extends AdminView_bwg {
2845
  <div class="wd-group">
2846
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2847
  <div class="bwg-flex">
2848
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_masonry_gallery_download" id="album_masonry_gallery_download_1" value="1" <?php if ($row->album_masonry_gallery_download) echo 'checked="checked"'; ?> /><label for="album_masonry_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2849
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_masonry_gallery_download" id="album_masonry_gallery_download_0" value="0" <?php if (!$row->album_masonry_gallery_download) echo 'checked="checked"'; ?> /><label for="album_masonry_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2850
  </div>
2851
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2852
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
2853
  </div>
2854
  </div>
2855
  <?php
@@ -3116,11 +3159,16 @@ class OptionsView_bwg extends AdminView_bwg {
3116
  <div class="wd-group">
3117
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
3118
  <div class="bwg-flex">
3119
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_extended_gallery_download" id="album_extended_gallery_download_1" value="1" <?php if ($row->album_extended_gallery_download) echo 'checked="checked"'; ?> /><label for="album_extended_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
3120
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_extended_gallery_download" id="album_extended_gallery_download_0" value="0" <?php if (!$row->album_extended_gallery_download) echo 'checked="checked"'; ?> /><label for="album_extended_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
3121
  </div>
3122
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
3123
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
 
 
 
 
 
3124
  </div>
3125
  </div>
3126
  <?php
514
  </div>
515
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
516
  </div>
517
+ <?php if ( has_action('init_display_facebook_options_bwg') ) { ?>
518
  <div class="wd-box-content wd-width-50">
519
  <div class="wd-box-title">
520
  <strong><?php _e('Facebook', BWG()->prefix); ?></strong>
521
  </div>
522
  <?php
 
523
  do_action('init_display_facebook_options_bwg', $row );
 
 
 
 
 
524
  ?>
525
  </div>
526
+ <?php } ?>
527
  </div>
528
  </div>
529
  </div>
1025
 
1026
  public static function gallery_options($row) {
1027
  $effects = self::get_effects();
1028
+ $zipArchiveClass = ( class_exists('ZipArchive') ) ? TRUE : FALSE;
1029
  ?>
1030
  <div id="thumbnails_options" class="gallery_options wd-box-content wd-width-100 bwg-flex-wrap">
1031
  <div class="wd-box-content wd-width-33">
1200
  <div class="wd-group">
1201
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
1202
  <div class="bwg-flex">
1203
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="gallery_download" id="gallery_download_1" value="1" <?php if ($row->gallery_download) echo 'checked="checked"'; ?> /><label for="gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
1204
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="gallery_download" id="gallery_download_0" value="0" <?php if (!$row->gallery_download) echo 'checked="checked"'; ?> /><label for="gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
1205
  </div>
1206
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
1207
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
1208
+ <?php
1209
+ if ( !$zipArchiveClass) {
1210
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
1211
+ }
1212
+ ?>
1213
  </div>
1214
  </div>
1215
  <?php
1429
  <div class="wd-group">
1430
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
1431
  <div class="bwg-flex">
1432
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="masonry_gallery_download" id="masonry_gallery_download_1" value="1" <?php if ($row->masonry_gallery_download) echo 'checked="checked"'; ?> /><label for="masonry_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
1433
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="masonry_gallery_download" id="masonry_gallery_download_0" value="0" <?php if (!$row->masonry_gallery_download) echo 'checked="checked"'; ?> /><label for="masonry_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
1434
  </div>
1435
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
1436
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
1437
+ <?php
1438
+ if ( !$zipArchiveClass) {
1439
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
1440
+ }
1441
+ ?>
1442
  </div>
1443
  </div>
1444
  <?php
1653
  <div class="wd-group">
1654
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
1655
  <div class="bwg-flex">
1656
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="mosaic_gallery_download" id="mosaic_gallery_download_1" value="1" <?php if ($row->mosaic_gallery_download) echo 'checked="checked"'; ?> /><label for="mosaic_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
1657
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="mosaic_gallery_download" id="mosaic_gallery_download_0" value="0" <?php if (!$row->mosaic_gallery_download) echo 'checked="checked"'; ?> /><label for="mosaic_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
1658
  </div>
1659
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
1660
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
1661
+ <?php
1662
+ if ( !$zipArchiveClass) {
1663
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
1664
+ }
1665
+ ?>
1666
+ </div>
1667
  </div>
1668
  <?php
1669
  if (function_exists('BWGEC')) {
1928
  <div class="wd-group">
1929
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
1930
  <div class="bwg-flex">
1931
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="slideshow_gallery_download" id="slideshow_gallery_download_1" value="1" <?php if ($row->slideshow_gallery_download) echo 'checked="checked"'; ?> /><label for="slideshow_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
1932
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="slideshow_gallery_download" id="slideshow_gallery_download_0" value="0" <?php if (!$row->slideshow_gallery_download) echo 'checked="checked"'; ?> /><label for="slideshow_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
1933
  </div>
1934
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
1935
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
1936
+ <?php
1937
+ if ( !$zipArchiveClass) {
1938
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
1939
+ }
1940
+ ?>
1941
  </div>
1942
  </div>
1943
  </div>
2070
  <div class="wd-group">
2071
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2072
  <div class="bwg-flex">
2073
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="image_browser_gallery_download" id="image_browser_gallery_download_1" value="1" <?php if ($row->image_browser_gallery_download) echo 'checked="checked"'; ?> /><label for="image_browser_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2074
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="image_browser_gallery_download" id="image_browser_gallery_download_0" value="0" <?php if (!$row->image_browser_gallery_download) echo 'checked="checked"'; ?> /><label for="image_browser_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2075
  </div>
2076
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2077
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
2078
+ <?php
2079
+ if ( !$zipArchiveClass) {
2080
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
2081
+ }
2082
+ ?>
2083
  </div>
2084
  </div>
2085
  </div>
2251
  <div class="wd-group">
2252
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2253
  <div class="bwg-flex">
2254
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="blog_style_gallery_download" id="blog_style_gallery_download_1" value="1" <?php if ($row->blog_style_gallery_download) echo 'checked="checked"'; ?> /><label for="blog_style_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2255
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="blog_style_gallery_download" id="blog_style_gallery_download_0" value="0" <?php if (!$row->blog_style_gallery_download) echo 'checked="checked"'; ?> /><label for="blog_style_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2256
  </div>
2257
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2258
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
2259
+ <?php
2260
+ if ( !$zipArchiveClass) {
2261
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
2262
+ }
2263
+ ?>
2264
  </div>
2265
  </div>
2266
  </div>
2405
  <div class="wd-group">
2406
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2407
  <div class="bwg-flex">
2408
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="carousel_gallery_download" id="carousel_gallery_download_1" value="1" <?php if ($row->carousel_gallery_download) echo 'checked="checked"'; ?> /><label for="carousel_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2409
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="carousel_gallery_download" id="carousel_gallery_download_0" value="0" <?php if (!$row->carousel_gallery_download) echo 'checked="checked"'; ?> /><label for="carousel_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2410
  </div>
2411
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2412
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
2413
+ <?php
2414
+ if ( !$zipArchiveClass) {
2415
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
2416
+ }
2417
+ ?>
2418
  </div>
2419
  </div>
2420
  </div>
2423
  }
2424
 
2425
  public static function gallery_group_options($row) {
2426
+ $zipArchiveClass = ( class_exists('ZipArchive') ) ? TRUE : FALSE;
2427
  ?>
2428
  <div id="album_compact_preview_options" class="album_options wd-box-content wd-width-100 bwg-flex-wrap">
2429
  <div class="wd-box-content wd-width-33">
2672
  <div class="wd-group">
2673
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2674
  <div class="bwg-flex">
2675
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="album_gallery_download" id="album_gallery_download_1" value="1" <?php if ($row->album_gallery_download) echo 'checked="checked"'; ?> /><label for="album_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2676
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="album_gallery_download" id="album_gallery_download_0" value="0" <?php if (!$row->album_gallery_download) echo 'checked="checked"'; ?> /><label for="album_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2677
  </div>
2678
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2679
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
2680
+ <?php
2681
+ if ( !$zipArchiveClass) {
2682
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
2683
+ }
2684
+ ?>
2685
  </div>
2686
  </div>
2687
  <?php
2883
  <div class="wd-group">
2884
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
2885
  <div class="bwg-flex">
2886
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="album_masonry_gallery_download" id="album_masonry_gallery_download_1" value="1" <?php if ($row->album_masonry_gallery_download) echo 'checked="checked"'; ?> /><label for="album_masonry_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
2887
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="album_masonry_gallery_download" id="album_masonry_gallery_download_0" value="0" <?php if (!$row->album_masonry_gallery_download) echo 'checked="checked"'; ?> /><label for="album_masonry_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
2888
  </div>
2889
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
2890
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
2891
+ <?php
2892
+ if ( !$zipArchiveClass) {
2893
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
2894
+ }
2895
+ ?>
2896
  </div>
2897
  </div>
2898
  <?php
3159
  <div class="wd-group">
3160
  <label class="wd-label"><?php _e('Enable bulk download button', BWG()->prefix); ?></label>
3161
  <div class="bwg-flex">
3162
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="album_extended_gallery_download" id="album_extended_gallery_download_1" value="1" <?php if ($row->album_extended_gallery_download) echo 'checked="checked"'; ?> /><label for="album_extended_gallery_download_1" class="wd-radio-label"><?php _e('Yes', BWG()->prefix); ?></label>
3163
+ <input <?php echo ( !$zipArchiveClass ) ? 'disabled="disabled"' : ( ( BWG()->is_pro ) ? '' : 'disabled="disabled"' ); ?> type="radio" name="album_extended_gallery_download" id="album_extended_gallery_download_0" value="0" <?php if (!$row->album_extended_gallery_download) echo 'checked="checked"'; ?> /><label for="album_extended_gallery_download_0" class="wd-radio-label"><?php _e('No', BWG()->prefix); ?></label>
3164
  </div>
3165
  <p class="description"><?php _e('Activate this setting to let users download all images of your gallery with a click.', BWG()->prefix); ?></p>
3166
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
3167
+ <?php
3168
+ if ( !$zipArchiveClass) {
3169
+ echo WDWLibrary::message_id(0, __('Photo Gallery Export will not work correctly, as ZipArchive PHP extension is disabled on your website. Please contact your hosting provider and ask them to enable it.', 'pgi'),'error');
3170
+ }
3171
+ ?>
3172
  </div>
3173
  </div>
3174
  <?php
admin/views/Widget.php CHANGED
@@ -77,10 +77,9 @@ class WidgetView_bwg {
77
  $params['compuct_album_enable_page'] = 0;
78
  }
79
  $controller = new $controller_class($view);
80
- global $bwg;
81
  $pairs = WDWLibrary::get_shortcode_option_params( $params );
82
  $controller->execute($pairs, 1, $bwg);
83
- $bwg++;
84
  // After widget.
85
  echo $after_widget;
86
  }
77
  $params['compuct_album_enable_page'] = 0;
78
  }
79
  $controller = new $controller_class($view);
80
+ $bwg = WDWLibrary::unique_number();
81
  $pairs = WDWLibrary::get_shortcode_option_params( $params );
82
  $controller->execute($pairs, 1, $bwg);
 
83
  // After widget.
84
  echo $after_widget;
85
  }
admin/views/WidgetSlideshow.php CHANGED
@@ -34,7 +34,7 @@ class WidgetSlideshowView_bwg {
34
  $controller_class = 'BWGControllerSite';
35
  $view = 'Slideshow';
36
  $controller = new $controller_class($view);
37
- global $bwg;
38
  $params = array (
39
  'from' => 'widget',
40
  'gallery_type' => 'slideshow',
@@ -51,7 +51,6 @@ class WidgetSlideshowView_bwg {
51
  );
52
  $pairs = WDWLibrary::get_shortcode_option_params( $params );
53
  $controller->execute($pairs, 1, $bwg);
54
- $bwg++;
55
  // After widget.
56
  echo $after_widget;
57
  }
34
  $controller_class = 'BWGControllerSite';
35
  $view = 'Slideshow';
36
  $controller = new $controller_class($view);
37
+ $bwg = WDWLibrary::unique_number();
38
  $params = array (
39
  'from' => 'widget',
40
  'gallery_type' => 'slideshow',
51
  );
52
  $pairs = WDWLibrary::get_shortcode_option_params( $params );
53
  $controller->execute($pairs, 1, $bwg);
 
54
  // After widget.
55
  echo $after_widget;
56
  }
css/bwg_frontend.css CHANGED
@@ -613,6 +613,10 @@ div[id^="bwg_container"] .bwg-border-box * {
613
  display: inline-block;
614
  }
615
 
 
 
 
 
616
  .bwg_thumbnail.bwg_container .search_line {
617
  min-height: 50px;
618
  -webkit-box-shadow: 0px 5px 7px -5px rgba(0,0,0,0.16);
613
  display: inline-block;
614
  }
615
 
616
+ #bwg_download.hidden {
617
+ display: none;
618
+ }
619
+
620
  .bwg_thumbnail.bwg_container .search_line {
621
  min-height: 50px;
622
  -webkit-box-shadow: 0px 5px 7px -5px rgba(0,0,0,0.16);
filemanager/js/default.js CHANGED
@@ -484,9 +484,10 @@ function onFileMOut(event, obj) {
484
  }
485
 
486
  function onFileClick(event, obj) {
 
487
  jQuery(".explorer_item").removeClass("explorer_item_select");
488
  var objName = jQuery(obj).attr("name");
489
- if (event.ctrlKey == true || event.metaKey == true) {
490
  if (all_files_selected === true) {
491
  if (filesSelected.indexOf(objName) == -1) {
492
  var index = no_selected_files.indexOf(objName);
@@ -505,6 +506,7 @@ function onFileClick(event, obj) {
505
  else {
506
  filesSelected.splice(filesSelected.indexOf(objName), 1);
507
  jQuery(obj).removeClass("explorer_item_select");
 
508
  }
509
  }
510
  else if (event.shiftKey == true) {
484
  }
485
 
486
  function onFileClick(event, obj) {
487
+ var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
488
  jQuery(".explorer_item").removeClass("explorer_item_select");
489
  var objName = jQuery(obj).attr("name");
490
+ if (event.ctrlKey == true || event.metaKey == true || isMobile) {
491
  if (all_files_selected === true) {
492
  if (filesSelected.indexOf(objName) == -1) {
493
  var index = no_selected_files.indexOf(objName);
506
  else {
507
  filesSelected.splice(filesSelected.indexOf(objName), 1);
508
  jQuery(obj).removeClass("explorer_item_select");
509
+ jQuery(obj).removeClass("explorer_item_hover");
510
  }
511
  }
512
  else if (event.shiftKey == true) {
filemanager/model.php CHANGED
@@ -121,7 +121,7 @@ class FilemanagerModel {
121
  // $file_size_mb = (int)($file_size_kb / 1024);
122
  // $file['size'] = $file_size_kb < 1024 ? (string)$file_size_kb . 'KB' : (string)$file_size_mb . 'MB';
123
  $file['size'] = $file_size_kb . ' KB';
124
- $file['date_modified'] = date('d F Y, H:i', filemtime($parent_dir . '/' . $file_name));
125
  $image_info = getimagesize(htmlspecialchars_decode($parent_dir . '/' . $file_name, ENT_COMPAT | ENT_QUOTES));
126
  $file['resolution'] = $this->is_img($file['type']) ? $image_info[0] . ' x ' . $image_info[1] . ' px' : '';
127
  $exif = WDWLibrary::read_image_metadata( $parent_dir . '/.original/' . $file_name );
121
  // $file_size_mb = (int)($file_size_kb / 1024);
122
  // $file['size'] = $file_size_kb < 1024 ? (string)$file_size_kb . 'KB' : (string)$file_size_mb . 'MB';
123
  $file['size'] = $file_size_kb . ' KB';
124
+ $file['date_modified'] = date('d F Y, H:i' );
125
  $image_info = getimagesize(htmlspecialchars_decode($parent_dir . '/' . $file_name, ENT_COMPAT | ENT_QUOTES));
126
  $file['resolution'] = $this->is_img($file['type']) ? $image_info[0] . ' x ' . $image_info[1] . ' px' : '';
127
  $exif = WDWLibrary::read_image_metadata( $parent_dir . '/.original/' . $file_name );
filemanager/view.php CHANGED
@@ -96,7 +96,7 @@ class FilemanagerView {
96
  break;
97
  }
98
  $i = 0;
99
- ?>
100
  <form id="adminForm" name="adminForm" action="" method="post" class="wp-core-ui">
101
  <?php wp_nonce_field( '', 'bwg_nonce' ); ?>
102
  <div id="wrapper">
96
  break;
97
  }
98
  $i = 0;
99
+ ?>
100
  <form id="adminForm" name="adminForm" action="" method="post" class="wp-core-ui">
101
  <?php wp_nonce_field( '', 'bwg_nonce' ); ?>
102
  <div id="wrapper">
framework/BWGOptions.php CHANGED
@@ -290,7 +290,7 @@ class WD_BWG_Options {
290
  public $watermark_width = 90;
291
  public $watermark_height = 90;
292
  public $watermark_url = '';
293
- public $watermark_text = '10web.io';
294
  public $watermark_link = 'https://10web.io/';
295
  public $watermark_font_size = 20;
296
  public $watermark_font = 'segoe ui';
@@ -301,7 +301,7 @@ class WD_BWG_Options {
301
  public $built_in_watermark_position = 'middle-center';
302
  public $built_in_watermark_size = 15;
303
  public $built_in_watermark_url = '';
304
- public $built_in_watermark_text = '10web.io';
305
  public $built_in_watermark_font_size = 20;
306
  public $built_in_watermark_font = 'arial';
307
  public $built_in_watermark_color = 'FFFFFF';
290
  public $watermark_width = 90;
291
  public $watermark_height = 90;
292
  public $watermark_url = '';
293
+ public $watermark_text = '10Web.io';
294
  public $watermark_link = 'https://10web.io/';
295
  public $watermark_font_size = 20;
296
  public $watermark_font = 'segoe ui';
301
  public $built_in_watermark_position = 'middle-center';
302
  public $built_in_watermark_size = 15;
303
  public $built_in_watermark_url = '';
304
+ public $built_in_watermark_text = '10Web.io';
305
  public $built_in_watermark_font_size = 20;
306
  public $built_in_watermark_font = 'arial';
307
  public $built_in_watermark_color = 'FFFFFF';
framework/WDWLibrary.php CHANGED
@@ -1318,7 +1318,7 @@ class WDWLibrary {
1318
  if ( !$limit ) {
1319
  $limitstart = ' LIMIT 50 OFFSET ' . $limit;
1320
  }
1321
- $where = (($gallery_id) ? ' `gallery_id`=' . $gallery_id . ($image_id ? ' AND `id`=' . $image_id : '') : 1);
1322
  $search = WDWLibrary::get( 's', '' );
1323
  if ( $search ) {
1324
  $where .= ' AND `filename` LIKE "%' . $search . '%"';
@@ -2578,27 +2578,31 @@ class WDWLibrary {
2578
  ?>
2579
  <div class="bwg-topbar bwg-topbar-links">
2580
  <div class="bwg-topbar-links-container">
2581
- <?php if ( $show_guide_link ) { ?>
2582
- <a href="<?php echo $user_guide_link; ?>" target="_blank">
2583
- <div class="bwg-topbar-links-item">
2584
- <?php _e('User guide', BWG()->prefix); ?>
2585
- </div>
2586
- </a>
2587
  <?php
2588
- }
2589
- if (!BWG()->is_pro) {
2590
  if ( $show_guide_link ) {
2591
  ?>
 
 
 
 
 
 
 
 
 
 
2592
  <span class="bwg-topbar-separator"></span>
2593
- <?php } ?>
2594
- <a href="<?php echo $support_forum_link; ?>" target="_blank">
2595
- <div class="bwg-topbar-links-item">
2596
- <?php _e('Support Forum', BWG()->prefix); ?>
2597
- </div>
2598
- </a>
2599
- <?php
2600
- }
2601
- ?>
 
 
2602
  </div>
2603
  </div>
2604
  </div>
@@ -2757,7 +2761,16 @@ class WDWLibrary {
2757
  }
2758
 
2759
  public static function unique_number() {
2760
- return mt_rand();
 
 
 
 
 
 
 
 
 
2761
  }
2762
 
2763
  public static function error_message_ids() {
1318
  if ( !$limit ) {
1319
  $limitstart = ' LIMIT 50 OFFSET ' . $limit;
1320
  }
1321
+ $where = (($gallery_id) ? ' `gallery_id`=' . $gallery_id . ($image_id && !$limit ? ' AND `id`=' . $image_id : '') : 1);
1322
  $search = WDWLibrary::get( 's', '' );
1323
  if ( $search ) {
1324
  $where .= ' AND `filename` LIKE "%' . $search . '%"';
2578
  ?>
2579
  <div class="bwg-topbar bwg-topbar-links">
2580
  <div class="bwg-topbar-links-container">
 
 
 
 
 
 
2581
  <?php
 
 
2582
  if ( $show_guide_link ) {
2583
  ?>
2584
+ <a href="<?php echo $user_guide_link; ?>" target="_blank">
2585
+ <div class="bwg-topbar-links-item">
2586
+ <?php _e('User guide', BWG()->prefix); ?>
2587
+ </div>
2588
+ </a>
2589
+ <?php
2590
+ }
2591
+ if (!BWG()->is_pro) {
2592
+ if ( $show_guide_link ) {
2593
+ ?>
2594
  <span class="bwg-topbar-separator"></span>
2595
+ <?php
2596
+ }
2597
+ ?>
2598
+ <a href="<?php echo $support_forum_link; ?>" target="_blank">
2599
+ <div class="bwg-topbar-links-item">
2600
+ <?php _e('Support Forum', BWG()->prefix); ?>
2601
+ </div>
2602
+ </a>
2603
+ <?php
2604
+ }
2605
+ ?>
2606
  </div>
2607
  </div>
2608
  </div>
2761
  }
2762
 
2763
  public static function unique_number() {
2764
+ $use_random_number = ( WDWLibrary::elementor_is_active() ) ? TRUE : FALSE;
2765
+ if ($use_random_number) {
2766
+ return mt_rand();
2767
+ }
2768
+ else {
2769
+ global $bwg;
2770
+ $bwg_unique = $bwg;
2771
+ $bwg++;
2772
+ return $bwg_unique;
2773
+ }
2774
  }
2775
 
2776
  public static function error_message_ids() {
frontend/controllers/BWGControllerGalleryBox.php CHANGED
@@ -114,7 +114,7 @@ class BWGControllerGalleryBox {
114
  'mail' => $email,
115
  'comment' => $comment,
116
  'url' => '',
117
- 'date' => date('Y-m-d H:i'),
118
  'published' => $published,
119
  ), array(
120
  '%d',
114
  'mail' => $email,
115
  'comment' => $comment,
116
  'url' => '',
117
+ 'date' => date('Y-m-d H:i:s'),
118
  'published' => $published,
119
  ), array(
120
  '%d',
frontend/controllers/controller.php CHANGED
@@ -223,6 +223,9 @@ class BWGControllerSite {
223
  if (!isset($theme_row->album_masonry_gal_title_align)) {
224
  $theme_row->album_masonry_gal_title_align = 'center';
225
  }
 
 
 
226
  }
227
  /* Extended album.*/
228
  {
@@ -352,6 +355,11 @@ class BWGControllerSite {
352
  $params['items_col_num'] = $params['masonry_album_column_number'];
353
  $params['image_column_number'] = $params['masonry_album_image_column_number'];
354
  }
 
 
 
 
 
355
 
356
  $params['album_gallery_div_class'] = 'bwg_album_thumbnails_' . $bwg;
357
  $params['load_more_image_count'] = $params['images_per_page'];
@@ -401,7 +409,6 @@ class BWGControllerSite {
401
  }
402
  elseif ( isset($params['masonry_album_thumb_width']) ) {
403
  $params['thumb_width'] = $params['masonry_album_image_thumb_width'];
404
- $params['image_title'] = $params['masonry_album_image_title'];
405
  $params['image_column_number'] = $params['masonry_album_image_column_number'];
406
  $params['images_per_page'] = $params['masonry_album_images_per_page'];
407
  $params['play_icon'] = BWG()->options->masonry_play_icon;
223
  if (!isset($theme_row->album_masonry_gal_title_align)) {
224
  $theme_row->album_masonry_gal_title_align = 'center';
225
  }
226
+ if (!isset($theme_row->album_masonry_container_margin)) {
227
+ $theme_row->album_masonry_container_margin = 1;
228
+ }
229
  }
230
  /* Extended album.*/
231
  {
355
  $params['items_col_num'] = $params['masonry_album_column_number'];
356
  $params['image_column_number'] = $params['masonry_album_image_column_number'];
357
  }
358
+ else {
359
+ $params['image_enable_page'] = $params['compuct_album_enable_page'];
360
+ $params['images_per_page'] = $params['compuct_albums_per_page'];
361
+ $params['items_col_num'] = $params['compuct_album_column_number'];
362
+ }
363
 
364
  $params['album_gallery_div_class'] = 'bwg_album_thumbnails_' . $bwg;
365
  $params['load_more_image_count'] = $params['images_per_page'];
409
  }
410
  elseif ( isset($params['masonry_album_thumb_width']) ) {
411
  $params['thumb_width'] = $params['masonry_album_image_thumb_width'];
 
412
  $params['image_column_number'] = $params['masonry_album_image_column_number'];
413
  $params['images_per_page'] = $params['masonry_album_images_per_page'];
414
  $params['play_icon'] = BWG()->options->masonry_play_icon;
js/bwg.js CHANGED
@@ -436,7 +436,7 @@ function spider_form_submit(event, form_id) {
436
  /* Check if required field is empty. */
437
  function spider_check_required(id, name) {
438
  if (jQuery('#' + id).val() == '') {
439
- alert(name + '* ' + bwg_objectL10B.bwg_field_required);
440
  jQuery('#' + id).attr('style', 'border-color: #FF0000;');
441
  jQuery('#' + id).focus();
442
  jQuery('html, body').animate({
@@ -760,14 +760,14 @@ function bwg_add_tag(image_id, tagIds, titles) {
760
  if (jQuery("#check_" + ids_array[i]).attr('checked') == 'checked' || flag) {
761
  image_id = ids_array[i];
762
  var tag_ids = document.getElementById('tags_' + image_id).value;
763
- var tags_array = tag_ids.split(',');
764
  var counter = 0;
765
  for (i = 0; i < tagIds.length; i++) {
766
  if (tags_array.indexOf(tagIds[i]) == -1) { /* To prevent add same tag multiple times. */
767
  tag_ids = tag_ids + tagIds[i] + ',';
768
  var html = jQuery("#" + image_id + "_tag_temptagid").clone().html();
769
  /* Remove white spaces from keywords to set as id and remove prefix.*/
770
- var id = tagIds[i].replace(/\s+/g, '_').replace('bwg_', '');
771
  html = html.replace(/temptagid/g, id)
772
  .replace(/temptagname/g, titles[i]);
773
  jQuery("#tags_div_" + image_id).append("<div class='tag_div' id='" + image_id + "_tag_" + id + "'>");
436
  /* Check if required field is empty. */
437
  function spider_check_required(id, name) {
438
  if (jQuery('#' + id).val() == '') {
439
+ alert(name + ' ' + bwg_objectL10B.bwg_field_required);
440
  jQuery('#' + id).attr('style', 'border-color: #FF0000;');
441
  jQuery('#' + id).focus();
442
  jQuery('html, body').animate({
760
  if (jQuery("#check_" + ids_array[i]).attr('checked') == 'checked' || flag) {
761
  image_id = ids_array[i];
762
  var tag_ids = document.getElementById('tags_' + image_id).value;
763
+ tags_array = tag_ids.split(',');
764
  var counter = 0;
765
  for (i = 0; i < tagIds.length; i++) {
766
  if (tags_array.indexOf(tagIds[i]) == -1) { /* To prevent add same tag multiple times. */
767
  tag_ids = tag_ids + tagIds[i] + ',';
768
  var html = jQuery("#" + image_id + "_tag_temptagid").clone().html();
769
  /* Remove white spaces from keywords to set as id and remove prefix.*/
770
+ var id = tagIds[i].replace(/\s+/g, '_').replace('bwg_', '').replace(/&amp;/g, "").replace(/&/g, "");
771
  html = html.replace(/temptagid/g, id)
772
  .replace(/temptagname/g, titles[i]);
773
  jQuery("#tags_div_" + image_id).append("<div class='tag_div' id='" + image_id + "_tag_" + id + "'>");
js/bwg_editor_button.js CHANGED
@@ -23,7 +23,7 @@ function bwg_shortcode_ready() {
23
  width_window = jQuery(window).width() + 17;
24
  height_window = jQuery(window).height();
25
  ed.addCommand('mcebwg_mce', function () {
26
- if ( jQuery(".bwg-shortcode-btn:visible").length ) {
27
  jQuery('.bwg-shortcode-btn:visible').trigger('click');
28
  return;
29
  }
23
  width_window = jQuery(window).width() + 17;
24
  height_window = jQuery(window).height();
25
  ed.addCommand('mcebwg_mce', function () {
26
+ if ( jQuery(".bwg-shortcode-btn:visible").length == 1 ) {
27
  jQuery('.bwg-shortcode-btn:visible').trigger('click');
28
  return;
29
  }
js/bwg_gallery_box.js CHANGED
@@ -107,13 +107,13 @@ function spider_destroypopup(duration) {
107
  jQuery(".bwg_spider_popup_loading").css({display: "none"});
108
  jQuery(".spider_popup_overlay").css({display: "none"});
109
  jQuery(document).off("keydown");
110
- if (bwg_overflow_initial_value) {
111
  jQuery("html").css("overflow", bwg_overflow_initial_value);
112
  }
113
- if (bwg_overflow_x_initial_value) {
114
  jQuery("html").css("overflow-x", bwg_overflow_x_initial_value);
115
  }
116
- if (bwg_overflow_y_initial_value) {
117
  jQuery("html").css("overflow-y", bwg_overflow_y_initial_value);
118
  }
119
  }, 20);
@@ -245,12 +245,8 @@ function spider_rate_ajax_save(form_id) {
245
  url: jQuery('#' + form_id).attr('action'),
246
  data: post_data,
247
  success: function (data) {
248
- if ( jQuery("#bwg_popup_image").attr("image_id") == post_data["image_id"] ) {
249
- var str = jQuery(data).find('#' + form_id).html();
250
- jQuery('#' + form_id).html(str);
251
- }
252
- jQuery("#bwg_star").show();
253
- jQuery("#bwg_rated").hide();
254
  },
255
  beforeSend: function(){
256
  },
@@ -282,7 +278,7 @@ function spider_form_submit(event, form_id) {
282
  /* Check if required field is empty. */
283
  function spider_check_required(id, name) {
284
  if (jQuery('#' + id).val() == '') {
285
- alert(name + '* ' + bwg_objectL10n.bwg_field_required);
286
  jQuery('#' + id).attr('style', 'border-color: #FF0000;');
287
  jQuery('#' + id).focus();
288
  return true;
@@ -578,6 +574,7 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
578
  /* Increase image hit counter.*/
579
  spider_set_input_value('rate_ajax_task', 'save_hit_count');
580
 
 
581
  jQuery(".bwg_image_hits span").html(++data[key]["hit_count"]);
582
  /* Change image id.*/
583
  jQuery("#bwg_popup_image").attr('image_id', data[key]["id"]);
107
  jQuery(".bwg_spider_popup_loading").css({display: "none"});
108
  jQuery(".spider_popup_overlay").css({display: "none"});
109
  jQuery(document).off("keydown");
110
+ if ( bwg_overflow_initial_value !== false ) {
111
  jQuery("html").css("overflow", bwg_overflow_initial_value);
112
  }
113
+ if ( bwg_overflow_x_initial_value !== false ) {
114
  jQuery("html").css("overflow-x", bwg_overflow_x_initial_value);
115
  }
116
+ if ( bwg_overflow_y_initial_value !== false ) {
117
  jQuery("html").css("overflow-y", bwg_overflow_y_initial_value);
118
  }
119
  }, 20);
245
  url: jQuery('#' + form_id).attr('action'),
246
  data: post_data,
247
  success: function (data) {
248
+ var str = jQuery(data).find('#' + form_id).html();
249
+ jQuery('#' + form_id).html(str);
 
 
 
 
250
  },
251
  beforeSend: function(){
252
  },
278
  /* Check if required field is empty. */
279
  function spider_check_required(id, name) {
280
  if (jQuery('#' + id).val() == '') {
281
+ alert(name + ' ' + bwg_objectL10n.bwg_field_required);
282
  jQuery('#' + id).attr('style', 'border-color: #FF0000;');
283
  jQuery('#' + id).focus();
284
  return true;
574
  /* Increase image hit counter.*/
575
  spider_set_input_value('rate_ajax_task', 'save_hit_count');
576
 
577
+ spider_rate_ajax_save('bwg_rate_form');
578
  jQuery(".bwg_image_hits span").html(++data[key]["hit_count"]);
579
  /* Change image id.*/
580
  jQuery("#bwg_popup_image").attr('image_id', data[key]["id"]);
js/jquery.ui.touch-punch.min.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery UI Touch Punch 0.2.3
3
+ *
4
+ * Copyright 2011–2014, Dave Furfero
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ *
7
+ * Depends:
8
+ * jquery.ui.widget.js
9
+ * jquery.ui.mouse.js
10
+ */
11
+ !function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
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.5
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/pricing/
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.5';
85
- $this->db_version = '1.5.5';
86
  $this->prefix = 'bwg';
87
  $this->nicename = __('Photo Gallery', $this->prefix);
88
 
@@ -102,6 +102,7 @@ final class BWG {
102
  * Add actions.
103
  */
104
  private function add_actions() {
 
105
  add_action('init', array($this, 'init'), 9);
106
  add_action('admin_menu', array( $this, 'admin_menu' ) );
107
 
@@ -207,7 +208,7 @@ final class BWG {
207
 
208
  add_action('admin_notices', array($this, 'admin_notices'));
209
 
210
- // Privacy policy.
211
  add_action( 'admin_init', array($this, 'add_privacy_policy_content') );
212
  // Prevent adding shortcode conflict with some builders.
213
 
@@ -215,14 +216,31 @@ final class BWG {
215
 
216
  // Register widget for Elementor builder.
217
  add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widgets'));
 
 
218
  }
219
 
 
 
 
220
  public function register_elementor_widgets() {
221
  if ( defined('ELEMENTOR_PATH') && class_exists('Elementor\Widget_Base') ) {
222
  require_once ($this->plugin_dir . '/admin/controllers/elementorWidget.php');
223
  }
224
  }
225
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  public function register_block_editor_assets($assets) {
227
  $version = '2.0.0';
228
  $js_path = $this->plugin_url . '/js/tw-gb/block.js';
@@ -581,15 +599,6 @@ final class BWG {
581
 
582
  if ( !$this->is_pro ) {
583
  wp_register_style($this->prefix . '_licensing', $this->plugin_url . '/css/bwg_licensing.css', $required_styles, $this->plugin_version);
584
- wp_register_style($this->prefix . '_deactivate-css', $this->plugin_url . '/wd/assets/css/deactivate_popup.css', $required_styles, $this->plugin_version);
585
- wp_register_script($this->prefix . '-deactivate-popup', $this->plugin_url . '/wd/assets/js/deactivate_popup.js', $required_scripts, $this->plugin_version, true);
586
- $admin_data = wp_get_current_user();
587
- wp_localize_script( $this->prefix . '-deactivate-popup', 'fmWDDeactivateVars', array(
588
- "prefix" => $this->prefix,
589
- "deactivate_class" => $this->prefix . '_deactivate_link',
590
- "email" => $admin_data->data->user_email,
591
- "plugin_wd_url" => "https://10web.io/plugins/wordpress-photo-gallery/",
592
- ));
593
  }
594
 
595
  // Roboto font for top bar.
@@ -689,9 +698,8 @@ final class BWG {
689
  $controller->execute($params, 1, WDWLibrary::get('bwg', 0));
690
  }
691
  else {
692
- global $bwg;
693
  $controller->execute($params, 1, $bwg);
694
- $bwg++;
695
  }
696
 
697
  return;
@@ -1321,13 +1329,28 @@ final class BWG {
1321
  load_plugin_textdomain($this->prefix, FALSE, basename(dirname(__FILE__)) . '/languages/backend');
1322
  }
1323
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1324
  /**
1325
  * Overview.
1326
  */
1327
  public function overview() {
1328
  if (is_admin() && !isset($_REQUEST['ajax'])) {
1329
- if (!class_exists("TenWeb")) {
1330
- require_once(BWG()->plugin_dir . '/wd/start.php');
 
1331
  }
1332
  global $bwg_options;
1333
  $bwg_options = array(
@@ -1561,7 +1584,7 @@ final class BWG {
1561
  "display_overview" => false,
1562
  );
1563
 
1564
- ten_web_init($bwg_options);
1565
  }
1566
  }
1567
 
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.6
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/pricing/
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.6';
85
+ $this->db_version = '1.5.6';
86
  $this->prefix = 'bwg';
87
  $this->nicename = __('Photo Gallery', $this->prefix);
88
 
102
  * Add actions.
103
  */
104
  private function add_actions() {
105
+ add_action('init', array($this, 'init_free_users_lib'), 8);
106
  add_action('init', array($this, 'init'), 9);
107
  add_action('admin_menu', array( $this, 'admin_menu' ) );
108
 
208
 
209
  add_action('admin_notices', array($this, 'admin_notices'));
210
 
211
+ // Privacy policy.
212
  add_action( 'admin_init', array($this, 'add_privacy_policy_content') );
213
  // Prevent adding shortcode conflict with some builders.
214
 
216
 
217
  // Register widget for Elementor builder.
218
  add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widgets'));
219
+ // Register 10Web category for Elementor widget if 10Web builder doesn't installed.
220
+ add_action('elementor/elements/categories_registered', array($this, 'register_widget_category'), 1, 1);
221
  }
222
 
223
+ /**
224
+ * Register widget for Elementor builder.
225
+ */
226
  public function register_elementor_widgets() {
227
  if ( defined('ELEMENTOR_PATH') && class_exists('Elementor\Widget_Base') ) {
228
  require_once ($this->plugin_dir . '/admin/controllers/elementorWidget.php');
229
  }
230
  }
231
 
232
+ /**
233
+ * Register 10Web category for Elementor widget if 10Web builder doesn't installed.
234
+ *
235
+ * @param $elements_manager
236
+ */
237
+ public function register_widget_category( $elements_manager ) {
238
+ $elements_manager->add_category('tenweb-widgets', array(
239
+ 'title' => __('10WEB', 'tenweb-builder'),
240
+ 'icon' => 'fa fa-plug',
241
+ ));
242
+ }
243
+
244
  public function register_block_editor_assets($assets) {
245
  $version = '2.0.0';
246
  $js_path = $this->plugin_url . '/js/tw-gb/block.js';
599
 
600
  if ( !$this->is_pro ) {
601
  wp_register_style($this->prefix . '_licensing', $this->plugin_url . '/css/bwg_licensing.css', $required_styles, $this->plugin_version);
 
 
 
 
 
 
 
 
 
602
  }
603
 
604
  // Roboto font for top bar.
698
  $controller->execute($params, 1, WDWLibrary::get('bwg', 0));
699
  }
700
  else {
701
+ $bwg = WDWLibrary::unique_number();
702
  $controller->execute($params, 1, $bwg);
 
703
  }
704
 
705
  return;
1329
  load_plugin_textdomain($this->prefix, FALSE, basename(dirname(__FILE__)) . '/languages/backend');
1330
  }
1331
 
1332
+ public function init_free_users_lib() {
1333
+ add_filter('tenweb_free_users_lib_path', array($this, 'tenweb_lib_path'));
1334
+ }
1335
+
1336
+ public function tenweb_lib_path($path) {
1337
+ // The version of WD Lib
1338
+ $version = '1.1.1';
1339
+ if (!isset($path['version']) || version_compare($path['version'], $version) === -1) {
1340
+ $path['version'] = $version;
1341
+ $path['path'] = $this->plugin_dir;
1342
+ }
1343
+ return $path;
1344
+ }
1345
+
1346
  /**
1347
  * Overview.
1348
  */
1349
  public function overview() {
1350
  if (is_admin() && !isset($_REQUEST['ajax'])) {
1351
+ if (!class_exists("TenWebLib")) {
1352
+ $plugin_dir = apply_filters('tenweb_free_users_lib_path', array('version' => '1.1.1', 'path' => $this->plugin_dir));
1353
+ require_once($plugin_dir['path'] . '/wd/start.php');
1354
  }
1355
  global $bwg_options;
1356
  $bwg_options = array(
1584
  "display_overview" => false,
1585
  );
1586
 
1587
+ ten_web_lib_init($bwg_options);
1588
  }
1589
  }
1590
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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: 4.9
6
- Stable tag: 1.5.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -279,6 +279,17 @@ Choose whether to display random or the first/last specific number of images.
279
 
280
  == Changelog ==
281
 
 
 
 
 
 
 
 
 
 
 
 
282
  = 1.5.5 =
283
  * Added: How to use button to galleries and gallery groups pages.
284
  * Added: Use uploaded image meta tags.
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: 4.9
6
+ Stable tag: 1.5.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
279
 
280
  == Changelog ==
281
 
282
+ = 1.5.6 =
283
+ * Fixed: Page scroll doesn't work after closing the lightbox on Edge browser.
284
+ * Fixed: Ampersand in images keyword.
285
+ * Fixed: Multiple galleries in one page in Elementor preview.
286
+ * Fixed: Save image added date to gallery as image date instead of last modified date.
287
+ * Fixed: If you click on the small icon from the WooCommerce product editor to insert shortcode, it shows popup header twice.
288
+ * Fixed: Remove download button for embedded images.
289
+ * Added: Add multiple images to gallery on mobile.
290
+ * Added: Comments pagination under the table.
291
+ * Added: Date column in comments.
292
+
293
  = 1.5.5 =
294
  * Added: How to use button to galleries and gallery groups pages.
295
  * Added: Use uploaded image meta tags.
wd/README.md CHANGED
@@ -5,10 +5,26 @@ Version: 1.0.13
5
  Usage:
6
 
7
  Copy and paste wd library into your plugin folder.
8
- In your plugin main file check if library main TenWeb class doesn't exist, include it
9
- if( !class_exists("TenWeb") ){
10
- require_once(PATH_TO_YOUR_PLUGIN_DIR . '/wd/start.php');
11
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  Then call dorado_web_init($options) function.
14
  $options = array (
5
  Usage:
6
 
7
  Copy and paste wd library into your plugin folder.
8
+ add_action('init', array($this, 'init_free_users_lib'), 8);
9
+ public function init_free_users_lib() {
10
+ add_filter('tenweb_free_users_lib_path', array($this, 'tenweb_lib_path'));
11
+ }
12
+
13
+ public function tenweb_lib_path($path) {
14
+ // The version of WD Lib
15
+ $version = '1.1.0';
16
+ if (!isset($path['version']) || version_compare($path['version'], $version) === -1) {
17
+ $path['version'] = $version;
18
+ $path['path'] = $this->plugin_dir;
19
+ }
20
+ return $path;
21
+ }
22
+
23
+ In your plugin main file check if library main TenWebLib class doesn't exist, include it
24
+ if (!class_exists("TenWebLib")) {
25
+ $plugin_dir = apply_filters('tenweb_free_users_lib_path', array('version' => '1.1.0', 'path' => $this->plugin_dir));
26
+ require_once($plugin_dir['path'] . '/wd/start.php');
27
+ }
28
 
29
  Then call dorado_web_init($options) function.
30
  $options = array (
wd/assets/css/deactivate_popup.css CHANGED
@@ -1,8 +1,4 @@
1
- .wd-bwg-reasons:nth-child(3) {
2
- display: none;
3
- }
4
-
5
- .wd-opacity{
6
  position: fixed;
7
  top: 0px;
8
  bottom: 0px;
@@ -14,7 +10,7 @@
14
  display: none;
15
  }
16
 
17
- .wd-deactivate-popup{
18
  position: fixed;
19
  top: 0px;
20
  bottom: 0px;
@@ -30,24 +26,24 @@
30
  }
31
 
32
 
33
- .wd-deactivate-popup-header{
34
  border-bottom: 1px solid #ccc;
35
  padding: 18px 40px;
36
  font-size: 16px;
37
  background: rgba(221, 221, 221, 0.14);
38
  }
39
- .wd-deactivate-popup-body{
40
  padding: 20px 40px;
41
  border-bottom: 1px solid #ccc;
42
  }
43
- .wd-deactivate-popup-body input[type=text]{
44
  width: 220px;
45
  }
46
- .wd-deactivate-popup-body textarea{
47
  width: 100%;
48
  }
49
 
50
- .wd-btns{
51
  position: absolute;
52
  bottom: 19px;
53
  right: 19px
@@ -57,27 +53,23 @@
57
  margin-top: 20px;
58
  }
59
 
60
- .wd-additional-active{
61
  background: rgba(204, 204, 204, 0.18);
62
  padding: 15px;
63
  margin: 14px 0px 5px;
64
  }
65
- .wd-popup-active1{
66
  height: 583px !important;
67
  }
68
 
69
- .wd-popup-active2{
70
  height: 426px !important
71
  }
72
 
73
- .wd-popup-active3{
74
- height: 479px !important
75
- }
76
-
77
- .wd-popup-active4{
78
  height: 340px !important
79
  }
80
- .wd-deactivate-popup-opacity{
81
  width: 100%;
82
  height: 100%;
83
  background: #D9D9D9;
@@ -87,7 +79,7 @@
87
  display: none;
88
  }
89
 
90
- .wd-deactivate-popup-opacity .wd-img-loader{
91
  position: absolute;
92
  top: 0;
93
  left: 0;
@@ -97,7 +89,7 @@
97
  z-index: 63;
98
  }
99
 
100
- .wd-deactivate-popup-close-btn{
101
  background-image: url(img/close.svg);
102
  background-repeat: no-repeat;
103
  background-size: 16px;
1
+ .tenweb-opacity{
 
 
 
 
2
  position: fixed;
3
  top: 0px;
4
  bottom: 0px;
10
  display: none;
11
  }
12
 
13
+ .tenweb-deactivate-popup{
14
  position: fixed;
15
  top: 0px;
16
  bottom: 0px;
26
  }
27
 
28
 
29
+ .tenweb-deactivate-popup-header{
30
  border-bottom: 1px solid #ccc;
31
  padding: 18px 40px;
32
  font-size: 16px;
33
  background: rgba(221, 221, 221, 0.14);
34
  }
35
+ .tenweb-deactivate-popup-body{
36
  padding: 20px 40px;
37
  border-bottom: 1px solid #ccc;
38
  }
39
+ .tenweb-deactivate-popup-body input[type=text]{
40
  width: 220px;
41
  }
42
+ .tenweb-deactivate-popup-body textarea{
43
  width: 100%;
44
  }
45
 
46
+ .tenweb-btns{
47
  position: absolute;
48
  bottom: 19px;
49
  right: 19px
53
  margin-top: 20px;
54
  }
55
 
56
+ .tenweb-additional-active{
57
  background: rgba(204, 204, 204, 0.18);
58
  padding: 15px;
59
  margin: 14px 0px 5px;
60
  }
61
+ .tenweb-popup-active1{
62
  height: 583px !important;
63
  }
64
 
65
+ .tenweb-popup-active2{
66
  height: 426px !important
67
  }
68
 
69
+ .tenweb-popup-active4{
 
 
 
 
70
  height: 340px !important
71
  }
72
+ .tenweb-deactivate-popup-opacity{
73
  width: 100%;
74
  height: 100%;
75
  background: #D9D9D9;
79
  display: none;
80
  }
81
 
82
+ .tenweb-deactivate-popup-opacity .tenweb-img-loader{
83
  position: absolute;
84
  top: 0;
85
  left: 0;
89
  z-index: 63;
90
  }
91
 
92
+ .tenweb-deactivate-popup-close-btn{
93
  background-image: url(img/close.svg);
94
  background-repeat: no-repeat;
95
  background-size: 16px;
wd/assets/js/deactivate_popup.js CHANGED
@@ -19,17 +19,17 @@ var btnVal = 3;
19
  ////////////////////////////////////////////////////////////////////////////////////////
20
  // Public Methods //
21
  ////////////////////////////////////////////////////////////////////////////////////////
22
- function wdReady( prefix ) {
23
 
24
  var agree_with_pp = false;
25
  reset_popup();
26
  jQuery( document ).on( "click", "." + window[prefix + "WDDeactivateVars"].deactivate_class, function () {
27
  agree_with_pp = false;
28
- if ( !jQuery( '#wd-' + prefix + '-submit-and-deactivate' ).hasClass( 'button-primary-disabled' ) ) {
29
- jQuery( '#wd-' + prefix + '-submit-and-deactivate' ).addClass( 'button-primary-disabled' )
30
  }
31
- jQuery( ".wd-" + prefix + "-opacity" ).show();
32
- jQuery( ".wd-" + prefix + "-deactivate-popup" ).show();
33
  if ( jQuery( this ).attr( "data-uninstall" ) == "1" ) {
34
  btnVal = 2;
35
  }
@@ -41,35 +41,27 @@ function wdReady( prefix ) {
41
  var disabled_class = ( agree_with_pp === false ) ? "button-primary-disabled" : "";
42
 
43
  jQuery( "." + prefix + "_additional_details_wrap" ).html( "" );
44
- jQuery( ".wd-" + prefix + "-deactivate-popup" ).removeClass( "wd-popup-active1 wd-popup-active2 wd-popup-active3 wd-popup-active4" );
45
  if ( jQuery( this ).val() == "reason_plugin_is_hard_to_use_technical_problems" ) {
46
 
47
- additionalInfo = '<div class="wd-additional-active"><div><strong>Please describe your issue.</strong></div><br>' +
48
  '<textarea name="' + prefix + '_additional_details" rows = "4"></textarea><br>' +
49
  '<div>Our support will contact <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"> shortly.</div>' +
50
- '<br><div><button class="button button-primary ' + disabled_class + ' wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit support ticket</button></div></div>';
51
  jQuery( "." + prefix + "_additional_details_wrap" ).append( additionalInfo );
52
- jQuery( ".wd-" + prefix + "-deactivate-popup" ).addClass( "wd-popup-active1" );
53
 
54
  }
55
  else if ( jQuery( this ).val() == "reason_free_version_limited" ) {
56
- additionalInfo = '<div class="wd-additional-active">' +
57
  '<div><strong>We believe our premium version will fit your needs.</strong></div>' +
58
  '<div><a href="' + window[prefix + "WDDeactivateVars"].plugin_wd_url + '" target="_blank">Try with 30 day money back guarantee.</a></div>';
59
 
60
  jQuery( "." + prefix + "_additional_details_wrap" ).append( additionalInfo );
61
- jQuery( ".wd-" + prefix + "-deactivate-popup" ).addClass( "wd-popup-active2" );
62
  }
63
- else if ( jQuery( this ).val() == "reason_premium_expensive" ) {
64
- additionalInfo = '<div class="wd-additional-active">' +
65
- '<div><strong>We have a special offer for you.</strong></div>' +
66
- '<div>Submit this form to get the offer to <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"></div>' +
67
- '<br><div><button class="button button-primary ' + disabled_class + ' wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit</button></div></div>';
68
-
69
- jQuery( "." + prefix + "_additional_details_wrap" ).append( additionalInfo );
70
- jQuery( ".wd-" + prefix + "-deactivate-popup" ).addClass( "wd-popup-active3" );
71
- } else {
72
- jQuery( ".wd-" + prefix + "-deactivate-popup" ).addClass( "wd-popup-active4" );
73
  }
74
 
75
  var checked = ( agree_with_pp === true ) ? "checked" : "";
@@ -80,28 +72,28 @@ function wdReady( prefix ) {
80
  "</div>";
81
  jQuery( "." + prefix + "_additional_details_wrap" ).prepend( agree_checkbox );
82
 
83
- jQuery( "#wd-" + prefix + "-submit-and-deactivate" ).show();
84
  } );
85
  jQuery( document ).on( "keyup", "[name=" + prefix + "_additional_details]", function () {
86
  if ( jQuery( this ).val().trim() || jQuery( "[name=" + prefix + "_reasons]:checked" ).length > 0 ) {
87
- jQuery( "#wd-" + prefix + "-submit-and-deactivate" ).show();
88
  }
89
  else {
90
- jQuery( "#wd-" + prefix + "-submit-and-deactivate" ).hide();
91
  }
92
  } );
93
 
94
  jQuery( document ).on( "change", "[name=" + prefix + "_agree_with_pp]", function () {
95
  if ( jQuery( this ).prop( 'checked' ) ) {
96
- jQuery( ".wd-" + prefix + "-deactivate" ).removeClass( 'button-primary-disabled' );
97
  agree_with_pp = true;
98
  } else {
99
- jQuery( ".wd-" + prefix + "-deactivate" ).addClass( 'button-primary-disabled' );
100
  agree_with_pp = false;
101
  }
102
  } );
103
 
104
- jQuery( document ).on( "click", ".wd-" + prefix + "-deactivate", function ( e ) {
105
  var data_val = jQuery( this ).data( 'val' );
106
  var checkbox = jQuery( "#" + prefix + "_agree_with_pp" );
107
 
@@ -109,18 +101,18 @@ function wdReady( prefix ) {
109
  return false;
110
  }
111
 
112
- jQuery( ".wd-deactivate-popup-opacity-" + prefix ).show();
113
- if ( jQuery( this ).hasClass( "wd-clicked" ) == false ) {
114
- jQuery( this ).addClass( "wd-clicked" );
115
  jQuery( "[name=" + prefix + "_submit_and_deactivate]" ).val( jQuery( this ).attr( "data-val" ) );
116
  jQuery( "#" + prefix + "_deactivate_form" ).submit();
117
  }
118
  return false;
119
  } );
120
 
121
- jQuery( document ).on( "click", ".wd-" + prefix + "-cancel, .wd-opacity, .wd-deactivate-popup-close-btn", function () {
122
- jQuery( ".wd-" + prefix + "-opacity" ).hide();
123
- jQuery( ".wd-" + prefix + "-deactivate-popup" ).hide();
124
  reset_popup();
125
 
126
  return false;
@@ -128,9 +120,9 @@ function wdReady( prefix ) {
128
 
129
  function reset_popup() {
130
  jQuery( "." + prefix + "_additional_details_wrap" ).html( "" );
131
- jQuery( ".wd-" + prefix + "-deactivate-popup" ).removeClass( "wd-popup-active1 wd-popup-active2 wd-popup-active3 wd-popup-active4" );
132
 
133
- jQuery( "#wd-" + prefix + "-submit-and-deactivate" ).hide();
134
  jQuery( '#' + prefix + '_deactivate_form input[name="' + prefix + '_reasons' + '"]' ).prop( 'checked', false );
135
  }
136
 
19
  ////////////////////////////////////////////////////////////////////////////////////////
20
  // Public Methods //
21
  ////////////////////////////////////////////////////////////////////////////////////////
22
+ function tenwebReady( prefix ) {
23
 
24
  var agree_with_pp = false;
25
  reset_popup();
26
  jQuery( document ).on( "click", "." + window[prefix + "WDDeactivateVars"].deactivate_class, function () {
27
  agree_with_pp = false;
28
+ if ( !jQuery( '#tenweb-' + prefix + '-submit-and-deactivate' ).hasClass( 'button-primary-disabled' ) ) {
29
+ jQuery( '#tenweb-' + prefix + '-submit-and-deactivate' ).addClass( 'button-primary-disabled' )
30
  }
31
+ jQuery( ".tenweb-" + prefix + "-opacity" ).show();
32
+ jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).show();
33
  if ( jQuery( this ).attr( "data-uninstall" ) == "1" ) {
34
  btnVal = 2;
35
  }
41
  var disabled_class = ( agree_with_pp === false ) ? "button-primary-disabled" : "";
42
 
43
  jQuery( "." + prefix + "_additional_details_wrap" ).html( "" );
44
+ jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).removeClass( "tenweb-popup-active1 tenweb-popup-active2 tenweb-popup-active4" );
45
  if ( jQuery( this ).val() == "reason_plugin_is_hard_to_use_technical_problems" ) {
46
 
47
+ additionalInfo = '<div class="tenweb-additional-active"><div><strong>Please describe your issue.</strong></div><br>' +
48
  '<textarea name="' + prefix + '_additional_details" rows = "4"></textarea><br>' +
49
  '<div>Our support will contact <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"> shortly.</div>' +
50
+ '<br><div><button class="button button-primary ' + disabled_class + ' tenweb-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit support ticket</button></div></div>';
51
  jQuery( "." + prefix + "_additional_details_wrap" ).append( additionalInfo );
52
+ jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).addClass( "tenweb-popup-active1" );
53
 
54
  }
55
  else if ( jQuery( this ).val() == "reason_free_version_limited" ) {
56
+ additionalInfo = '<div class="tenweb-additional-active">' +
57
  '<div><strong>We believe our premium version will fit your needs.</strong></div>' +
58
  '<div><a href="' + window[prefix + "WDDeactivateVars"].plugin_wd_url + '" target="_blank">Try with 30 day money back guarantee.</a></div>';
59
 
60
  jQuery( "." + prefix + "_additional_details_wrap" ).append( additionalInfo );
61
+ jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).addClass( "tenweb-popup-active2" );
62
  }
63
+ else {
64
+ jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).addClass( "tenweb-popup-active4" );
 
 
 
 
 
 
 
 
65
  }
66
 
67
  var checked = ( agree_with_pp === true ) ? "checked" : "";
72
  "</div>";
73
  jQuery( "." + prefix + "_additional_details_wrap" ).prepend( agree_checkbox );
74
 
75
+ jQuery( "#tenweb-" + prefix + "-submit-and-deactivate" ).show();
76
  } );
77
  jQuery( document ).on( "keyup", "[name=" + prefix + "_additional_details]", function () {
78
  if ( jQuery( this ).val().trim() || jQuery( "[name=" + prefix + "_reasons]:checked" ).length > 0 ) {
79
+ jQuery( "#tenweb-" + prefix + "-submit-and-deactivate" ).show();
80
  }
81
  else {
82
+ jQuery( "#tenweb-" + prefix + "-submit-and-deactivate" ).hide();
83
  }
84
  } );
85
 
86
  jQuery( document ).on( "change", "[name=" + prefix + "_agree_with_pp]", function () {
87
  if ( jQuery( this ).prop( 'checked' ) ) {
88
+ jQuery( ".tenweb-" + prefix + "-deactivate" ).removeClass( 'button-primary-disabled' );
89
  agree_with_pp = true;
90
  } else {
91
+ jQuery( ".tenweb-" + prefix + "-deactivate" ).addClass( 'button-primary-disabled' );
92
  agree_with_pp = false;
93
  }
94
  } );
95
 
96
+ jQuery( document ).on( "click", ".tenweb-" + prefix + "-deactivate", function ( e ) {
97
  var data_val = jQuery( this ).data( 'val' );
98
  var checkbox = jQuery( "#" + prefix + "_agree_with_pp" );
99
 
101
  return false;
102
  }
103
 
104
+ jQuery( ".tenweb-deactivate-popup-opacity-" + prefix ).show();
105
+ if ( jQuery( this ).hasClass( "tenweb-clicked" ) == false ) {
106
+ jQuery( this ).addClass( "tenweb-clicked" );
107
  jQuery( "[name=" + prefix + "_submit_and_deactivate]" ).val( jQuery( this ).attr( "data-val" ) );
108
  jQuery( "#" + prefix + "_deactivate_form" ).submit();
109
  }
110
  return false;
111
  } );
112
 
113
+ jQuery( document ).on( "click", ".tenweb-" + prefix + "-cancel, .tenweb-opacity, .tenweb-deactivate-popup-close-btn", function () {
114
+ jQuery( ".tenweb-" + prefix + "-opacity" ).hide();
115
+ jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).hide();
116
  reset_popup();
117
 
118
  return false;
120
 
121
  function reset_popup() {
122
  jQuery( "." + prefix + "_additional_details_wrap" ).html( "" );
123
+ jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).removeClass( "tenweb-popup-active1 tenweb-popup-active2 tenweb-popup-active4" );
124
 
125
+ jQuery( "#tenweb-" + prefix + "-submit-and-deactivate" ).hide();
126
  jQuery( '#' + prefix + '_deactivate_form input[name="' + prefix + '_reasons' + '"]' ).prop( 'checked', false );
127
  }
128
 
wd/config.php CHANGED
@@ -3,7 +3,7 @@
3
  exit;
4
  }
5
 
6
- class TenWebConfig {
7
  public static $instance;
8
 
9
  public $prefix = null;
3
  exit;
4
  }
5
 
6
+ class TenWebLibConfig {
7
  public static $instance;
8
 
9
  public $prefix = null;
wd/includes/api.php CHANGED
@@ -3,7 +3,7 @@
3
  exit;
4
  }
5
 
6
- class TenWebApi{
7
  ////////////////////////////////////////////////////////////////////////////////////////
8
  // Events //
9
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -31,7 +31,7 @@
31
 
32
 
33
  public function get_remote_data( $id ) {
34
- $remote_data_path = TEN_WEB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
35
  $request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
36
 
37
  if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
3
  exit;
4
  }
5
 
6
+ class TenWebLibApi{
7
  ////////////////////////////////////////////////////////////////////////////////////////
8
  // Events //
9
  ////////////////////////////////////////////////////////////////////////////////////////
31
 
32
 
33
  public function get_remote_data( $id ) {
34
+ $remote_data_path = TEN_WEB_LIB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
35
  $request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
36
 
37
  if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
wd/includes/deactivate.php CHANGED
@@ -3,7 +3,7 @@ if (!defined('ABSPATH')) {
3
  exit;
4
  }
5
 
6
- class TenWebDeactivate
7
  {
8
  ////////////////////////////////////////////////////////////////////////////////////////
9
  // Events //
@@ -41,14 +41,10 @@ class TenWebDeactivate
41
  'text' => __('Free version is limited', $wd_options->prefix),
42
  ),
43
  3 => array(
44
- 'id' => self::REASON_PRO_EXPENSIVE,
45
- 'text' => __('Premium is expensive', $wd_options->prefix),
46
- ),
47
- 4 => array(
48
  'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
49
  'text' => __('Upgrading to paid version', $wd_options->prefix),
50
  ),
51
- 5 => array(
52
  'id' => self::REASON_TEMPORARY_DEACTIVATION,
53
  'text' => __('Temporary deactivation', $wd_options->prefix),
54
  ),
@@ -58,8 +54,9 @@ class TenWebDeactivate
58
  add_action('admin_init', array($this, 'submit_and_deactivate'));
59
 
60
 
61
- add_action('admin_enqueue_scripts', array($this, 'scripts'));
62
-
 
63
 
64
  }
65
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -73,7 +70,7 @@ class TenWebDeactivate
73
  ?>
74
  <script>
75
  jQuery(document).ready(function () {
76
- wdReady("<?php echo $wd_options->prefix; ?>");
77
  });
78
  </script>
79
  <?php
@@ -95,11 +92,11 @@ class TenWebDeactivate
95
  public function scripts()
96
  {
97
  $wd_options = $this->config;
98
- wp_enqueue_style('wd-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version"));
99
- wp_enqueue_script('wd-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version"));
100
 
101
  $admin_data = wp_get_current_user();
102
- wp_localize_script('wd-deactivate-popup', $wd_options->prefix . 'WDDeactivateVars', array(
103
  "prefix" => $wd_options->prefix,
104
  "deactivate_class" => $wd_options->prefix . '_deactivate_link',
105
  "email" => $admin_data->data->user_email,
@@ -115,7 +112,7 @@ class TenWebDeactivate
115
  if (isset($_POST[$wd_options->prefix . "_submit_and_deactivate"])) {
116
 
117
  if ($_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 3) {
118
- //$api = new TenWebApi( $wd_options );
119
 
120
  $data = array();
121
 
@@ -131,7 +128,7 @@ class TenWebDeactivate
131
 
132
  $data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
133
 
134
- $response = wp_remote_post(TEN_WEB_DEACTIVATION_URL, array(
135
  'method' => 'POST',
136
  'timeout' => 45,
137
  'redirection' => 5,
3
  exit;
4
  }
5
 
6
+ class TenWebLibDeactivate
7
  {
8
  ////////////////////////////////////////////////////////////////////////////////////////
9
  // Events //
41
  'text' => __('Free version is limited', $wd_options->prefix),
42
  ),
43
  3 => array(
 
 
 
 
44
  'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
45
  'text' => __('Upgrading to paid version', $wd_options->prefix),
46
  ),
47
+ 4 => array(
48
  'id' => self::REASON_TEMPORARY_DEACTIVATION,
49
  'text' => __('Temporary deactivation', $wd_options->prefix),
50
  ),
54
  add_action('admin_init', array($this, 'submit_and_deactivate'));
55
 
56
 
57
+ // add_action('admin_enqueue_scripts', array($this, 'scripts'));
58
+ // Just enqueue styles/scripts and they will be in the footer.
59
+ $this->scripts();
60
 
61
  }
62
  ////////////////////////////////////////////////////////////////////////////////////////
70
  ?>
71
  <script>
72
  jQuery(document).ready(function () {
73
+ tenwebReady("<?php echo $wd_options->prefix; ?>");
74
  });
75
  </script>
76
  <?php
92
  public function scripts()
93
  {
94
  $wd_options = $this->config;
95
+ wp_enqueue_style('tenweb-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version"));
96
+ wp_enqueue_script('tenweb-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version"));
97
 
98
  $admin_data = wp_get_current_user();
99
+ wp_localize_script('tenweb-deactivate-popup', $wd_options->prefix . 'WDDeactivateVars', array(
100
  "prefix" => $wd_options->prefix,
101
  "deactivate_class" => $wd_options->prefix . '_deactivate_link',
102
  "email" => $admin_data->data->user_email,
112
  if (isset($_POST[$wd_options->prefix . "_submit_and_deactivate"])) {
113
 
114
  if ($_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 3) {
115
+ //$api = new TenWebLibApi( $wd_options );
116
 
117
  $data = array();
118
 
128
 
129
  $data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
130
 
131
+ $response = wp_remote_post(TEN_WEB_LIB_DEACTIVATION_URL, array(
132
  'method' => 'POST',
133
  'timeout' => 45,
134
  'redirection' => 5,
wd/includes/notices.php CHANGED
@@ -3,7 +3,7 @@ if ( !defined( 'ABSPATH' ) ) {
3
  exit;
4
  }
5
 
6
- class TenWebNotices {
7
 
8
  protected $promo_link = '';
9
 
3
  exit;
4
  }
5
 
6
+ class TenWebLibNotices {
7
 
8
  protected $promo_link = '';
9
 
wd/includes/overview.php CHANGED
@@ -3,7 +3,7 @@
3
  exit;
4
  }
5
 
6
- class TenWebOverview{
7
  ////////////////////////////////////////////////////////////////////////////////////////
8
  // Events //
9
  ////////////////////////////////////////////////////////////////////////////////////////
3
  exit;
4
  }
5
 
6
+ class TenWebLibOverview{
7
  ////////////////////////////////////////////////////////////////////////////////////////
8
  // Events //
9
  ////////////////////////////////////////////////////////////////////////////////////////
wd/includes/subscribe.php CHANGED
@@ -3,7 +3,7 @@ if (!defined('ABSPATH')) {
3
  exit;
4
  }
5
 
6
- class TenWebSubscribe
7
  {
8
  // //////////////////////////////////////////////////////////////////////////////////////
9
  // Events //
@@ -54,7 +54,7 @@ class TenWebSubscribe
54
  if (isset($_GET[$wd_options->prefix . "_sub_action"])) {
55
 
56
  if ($_GET[$wd_options->prefix . "_sub_action"] == "allow") {
57
- //$api = new TenWebApi($wd_options);
58
  $all_plugins = array();
59
  $plugins = get_plugins();
60
  foreach ($plugins as $slug => $data) {
@@ -83,7 +83,7 @@ class TenWebSubscribe
83
  $data["all_plugins"] = json_encode($all_plugins);
84
 
85
 
86
- $response = wp_remote_post(TEN_WEB_SUBSCRIBE_URL, array(
87
  'method' => 'POST',
88
  'timeout' => 45,
89
  'redirection' => 5,
3
  exit;
4
  }
5
 
6
+ class TenWebLibSubscribe
7
  {
8
  // //////////////////////////////////////////////////////////////////////////////////////
9
  // Events //
54
  if (isset($_GET[$wd_options->prefix . "_sub_action"])) {
55
 
56
  if ($_GET[$wd_options->prefix . "_sub_action"] == "allow") {
57
+ //$api = new TenWebLibApi($wd_options);
58
  $all_plugins = array();
59
  $plugins = get_plugins();
60
  foreach ($plugins as $slug => $data) {
83
  $data["all_plugins"] = json_encode($all_plugins);
84
 
85
 
86
+ $response = wp_remote_post(TEN_WEB_LIB_SUBSCRIBE_URL, array(
87
  'method' => 'POST',
88
  'timeout' => 45,
89
  'redirection' => 5,
wd/start.php CHANGED
@@ -2,9 +2,9 @@
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  }
5
- define( 'TEN_WEB_API_PLUGIN_DATA_PATH', 'https://api.web-dorado.com/v2/_id_/plugindata' );
6
- define( 'TEN_WEB_SUBSCRIBE_URL', 'https://core.10web.io/api/wp-subscribe' );
7
- define( 'TEN_WEB_DEACTIVATION_URL', 'https://core.10web.io/api/deactivation_reasons' );
8
 
9
  require_once dirname( __FILE__ ) . '/config.php';
10
 
@@ -28,12 +28,12 @@
28
  * custom_post;
29
  */
30
 
31
- function ten_web_init( $options ) {
32
 
33
  // load files
34
  require_once dirname( __FILE__ ) . '/wd.php';
35
 
36
- $wd = new TenWeb();
37
  $wd->wd_init( $options );
38
 
39
  }
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit;
4
  }
5
+ define( 'TEN_WEB_LIB_API_PLUGIN_DATA_PATH', 'https://api.web-dorado.com/v2/_id_/plugindata' );
6
+ define( 'TEN_WEB_LIB_SUBSCRIBE_URL', 'https://core.10web.io/api/wp-subscribe' );
7
+ define( 'TEN_WEB_LIB_DEACTIVATION_URL', 'https://core.10web.io/api/deactivation_reasons' );
8
 
9
  require_once dirname( __FILE__ ) . '/config.php';
10
 
28
  * custom_post;
29
  */
30
 
31
+ function ten_web_lib_init( $options ) {
32
 
33
  // load files
34
  require_once dirname( __FILE__ ) . '/wd.php';
35
 
36
+ $wd = new TenWebLib();
37
  $wd->wd_init( $options );
38
 
39
  }
wd/templates/display_deactivation_popup.php CHANGED
@@ -1,26 +1,26 @@
1
- <div class="wd-opacity wd-<?php echo $wd_options->prefix; ?>-opacity"></div>
2
- <div class="wd-deactivate-popup wd-<?php echo $wd_options->prefix; ?>-deactivate-popup">
3
- <div class="wd-deactivate-popup-opacity wd-deactivate-popup-opacity-<?php echo $wd_options->prefix; ?>">
4
- <img src="<?php echo $wd_options->wd_url_img . '/spinner.gif'; ?>" class="wd-img-loader" >
5
  </div>
6
  <form method="post" id="<?php echo $wd_options->prefix; ?>_deactivate_form">
7
- <div class="wd-deactivate-popup-header">
8
  <?php _e( "Please let us know why you are deactivating. Your answer will help us to provide you support or sometimes offer discounts. (Optional)", $wd_options->prefix ); ?>:
9
- <span class="wd-deactivate-popup-close-btn"></span>
10
  </div>
11
 
12
- <div class="wd-deactivate-popup-body">
13
  <?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
14
- <div class="wd-<?php echo $wd_options->prefix; ?>-reasons">
15
  <input type="radio" value="<?php echo $deactivate_reason["id"];?>" id="<?php echo $wd_options->prefix . "-" .$deactivate_reason["id"]; ?>" name="<?php echo $wd_options->prefix; ?>_reasons" >
16
  <label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"];?></label>
17
  </div>
18
  <?php } ?>
19
  <div class="<?php echo $wd_options->prefix; ?>_additional_details_wrap"></div>
20
  </div>
21
- <div class="wd-btns">
22
- <a href="<?php echo $deactivate_url; ?>" data-val="1" class="button button-secondary button-close" id="wd-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Skip and Deactivate" , $wd_options->prefix ); ?></a>
23
- <a href="<?php echo $deactivate_url; ?>" data-val="2" class="button button-primary button-primary-disabled button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-submit-and-deactivate"><?php _e( "Submit and Deactivate" , $wd_options->prefix ); ?></a>
24
  </div>
25
  <input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="" >
26
  <?php wp_nonce_field( $wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
1
+ <div class="tenweb-opacity tenweb-<?php echo $wd_options->prefix; ?>-opacity"></div>
2
+ <div class="tenweb-deactivate-popup tenweb-<?php echo $wd_options->prefix; ?>-deactivate-popup">
3
+ <div class="tenweb-deactivate-popup-opacity tenweb-deactivate-popup-opacity-<?php echo $wd_options->prefix; ?>">
4
+ <img src="<?php echo $wd_options->wd_url_img . '/spinner.gif'; ?>" class="tenweb-img-loader" >
5
  </div>
6
  <form method="post" id="<?php echo $wd_options->prefix; ?>_deactivate_form">
7
+ <div class="tenweb-deactivate-popup-header">
8
  <?php _e( "Please let us know why you are deactivating. Your answer will help us to provide you support or sometimes offer discounts. (Optional)", $wd_options->prefix ); ?>:
9
+ <span class="tenweb-deactivate-popup-close-btn"></span>
10
  </div>
11
 
12
+ <div class="tenweb-deactivate-popup-body">
13
  <?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
14
+ <div class="tenweb-<?php echo $wd_options->prefix; ?>-reasons">
15
  <input type="radio" value="<?php echo $deactivate_reason["id"];?>" id="<?php echo $wd_options->prefix . "-" .$deactivate_reason["id"]; ?>" name="<?php echo $wd_options->prefix; ?>_reasons" >
16
  <label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"];?></label>
17
  </div>
18
  <?php } ?>
19
  <div class="<?php echo $wd_options->prefix; ?>_additional_details_wrap"></div>
20
  </div>
21
+ <div class="tenweb-btns">
22
+ <a href="<?php echo $deactivate_url; ?>" data-val="1" class="button button-secondary button-close" id="tenweb-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Skip and Deactivate" , $wd_options->prefix ); ?></a>
23
+ <a href="<?php echo $deactivate_url; ?>" data-val="2" class="button button-primary button-primary-disabled button-close tenweb-<?php echo $wd_options->prefix; ?>-deactivate" id="tenweb-<?php echo $wd_options->prefix; ?>-submit-and-deactivate"><?php _e( "Submit and Deactivate" , $wd_options->prefix ); ?></a>
24
  </div>
25
  <input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="" >
26
  <?php wp_nonce_field( $wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
wd/templates/display_subscribe.php CHANGED
@@ -3,7 +3,7 @@
3
  <div class="texts">
4
  <div class="hi_there"></div>
5
  <h2><?php _e( "Hi there!", $wd_options->prefix ); ?></h2>
6
- <h5><?php _e( "Allow 10web to collect some usage data", $wd_options->prefix ); ?></h5>
7
  <p>
8
  <?php echo sprintf( __( "This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix ), $wd_options->plugin_title ); ?>
9
  </p>
3
  <div class="texts">
4
  <div class="hi_there"></div>
5
  <h2><?php _e( "Hi there!", $wd_options->prefix ); ?></h2>
6
+ <h5><?php _e( "Allow 10Web to collect some usage data", $wd_options->prefix ); ?></h5>
7
  <p>
8
  <?php echo sprintf( __( "This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix ), $wd_options->plugin_title ); ?>
9
  </p>
wd/wd.php CHANGED
@@ -3,7 +3,7 @@
3
  exit;
4
  }
5
 
6
- class TenWeb {
7
  ////////////////////////////////////////////////////////////////////////////////////////
8
  // Events //
9
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -17,7 +17,7 @@
17
  public $overview_instance;
18
  public $subscribe_instance;
19
  public $config;
20
- private $version = "1.0.13";
21
 
22
  ////////////////////////////////////////////////////////////////////////////////////////
23
  // Constructor & Destructor //
@@ -37,10 +37,10 @@
37
  if(!is_array($options)){
38
  return false;
39
  }
40
- $config = new TenWebConfig();
41
  $config->set_options( $options );
42
  $this->config = $config;
43
- if( !class_exists("TenWebApi") ){
44
  $this->wd_includes();
45
  }
46
 
@@ -52,7 +52,7 @@
52
  // Create overview menu page
53
  public function wd_overview_menu_page() {
54
  $wd_options = $this->config;
55
-
56
  $capability = $wd_options->menu_capability ? $wd_options->menu_capability : "manage_options";
57
  if( get_option( $wd_options->prefix . "_subscribe_done" ) == 1 || $wd_options->subscribe === false ){
58
  $parent_slug = $wd_options->custom_post;
@@ -61,7 +61,7 @@
61
 
62
  $subscribe_page = add_menu_page( $wd_options->plugin_menu_title, $wd_options->plugin_menu_title, "manage_options", $wd_options->prefix . '_subscribe' , array( $this, 'display_subscribew_page' ), $wd_options->plugin_menu_icon, $wd_options->menu_position );
63
 
64
- $subscribe_instance = new TenWebSubscribe($this->config);
65
  $this->subscribe_instance = $subscribe_instance;
66
  add_action( 'admin_print_styles-' . $subscribe_page, array( $subscribe_instance, 'subscribe_styles' ) );
67
  add_action( 'admin_print_scripts-' . $subscribe_page, array( $subscribe_instance, 'subscribe_scripts' ) );
@@ -76,7 +76,7 @@
76
  $overview_page = add_submenu_page( $parent_slug, __( 'Premium', $wd_options->prefix ), '<span style="color:#4481ea;">' . $title . '</span>', $capability, 'overview_' . $wd_options->prefix, array( $this, 'display_overview_page' ) );
77
 
78
 
79
- $overview_instance = new TenWebOverview( $this->config );
80
  $this->overview_instance = $overview_instance;
81
  add_action( 'admin_print_styles-' . $overview_page, array( $overview_instance, 'overview_styles' ) );
82
  add_action( 'admin_print_scripts-' . $overview_page, array( $overview_instance, 'overview_scripts' ) );
@@ -111,11 +111,11 @@
111
  $current_url = $_SERVER['REQUEST_URI'];
112
  if( $wd_options->deactivate === true ){
113
  if(strpos( $current_url, "plugins.php" ) !== false ){
114
- new TenWebDeactivate( $this->config );
115
  }
116
  }
117
 
118
- new TenWebNotices( $this->config );
119
 
120
  }
121
 
3
  exit;
4
  }
5
 
6
+ class TenWebLib {
7
  ////////////////////////////////////////////////////////////////////////////////////////
8
  // Events //
9
  ////////////////////////////////////////////////////////////////////////////////////////
17
  public $overview_instance;
18
  public $subscribe_instance;
19
  public $config;
20
+ private $version = "1.1.1";
21
 
22
  ////////////////////////////////////////////////////////////////////////////////////////
23
  // Constructor & Destructor //
37
  if(!is_array($options)){
38
  return false;
39
  }
40
+ $config = new TenWebLibConfig();
41
  $config->set_options( $options );
42
  $this->config = $config;
43
+ if( !class_exists("TenWebLibApi") ){
44
  $this->wd_includes();
45
  }
46
 
52
  // Create overview menu page
53
  public function wd_overview_menu_page() {
54
  $wd_options = $this->config;
55
+
56
  $capability = $wd_options->menu_capability ? $wd_options->menu_capability : "manage_options";
57
  if( get_option( $wd_options->prefix . "_subscribe_done" ) == 1 || $wd_options->subscribe === false ){
58
  $parent_slug = $wd_options->custom_post;
61
 
62
  $subscribe_page = add_menu_page( $wd_options->plugin_menu_title, $wd_options->plugin_menu_title, "manage_options", $wd_options->prefix . '_subscribe' , array( $this, 'display_subscribew_page' ), $wd_options->plugin_menu_icon, $wd_options->menu_position );
63
 
64
+ $subscribe_instance = new TenWebLibSubscribe($this->config);
65
  $this->subscribe_instance = $subscribe_instance;
66
  add_action( 'admin_print_styles-' . $subscribe_page, array( $subscribe_instance, 'subscribe_styles' ) );
67
  add_action( 'admin_print_scripts-' . $subscribe_page, array( $subscribe_instance, 'subscribe_scripts' ) );
76
  $overview_page = add_submenu_page( $parent_slug, __( 'Premium', $wd_options->prefix ), '<span style="color:#4481ea;">' . $title . '</span>', $capability, 'overview_' . $wd_options->prefix, array( $this, 'display_overview_page' ) );
77
 
78
 
79
+ $overview_instance = new TenWebLibOverview( $this->config );
80
  $this->overview_instance = $overview_instance;
81
  add_action( 'admin_print_styles-' . $overview_page, array( $overview_instance, 'overview_styles' ) );
82
  add_action( 'admin_print_scripts-' . $overview_page, array( $overview_instance, 'overview_scripts' ) );
111
  $current_url = $_SERVER['REQUEST_URI'];
112
  if( $wd_options->deactivate === true ){
113
  if(strpos( $current_url, "plugins.php" ) !== false ){
114
+ new TenWebLibDeactivate( $this->config );
115
  }
116
  }
117
 
118
+ new TenWebLibNotices( $this->config );
119
 
120
  }
121