Photo Gallery by WD – Responsive Photo Gallery - Version 1.3.53

Version Description

  • Added: Show notice to install Backup WD plugin.
Download this release

Release Info

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

Code changes from version 1.3.52 to 1.3.53

admin/models/BWGModelUninstall_bwg.php CHANGED
@@ -1,23 +1,8 @@
1
  <?php
2
 
3
  class BWGModelUninstall_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
  public function __construct() {
17
  }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
  public function delete_db_tables() {
22
  global $wpdb;
23
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_album");
@@ -66,13 +51,4 @@ class BWGModelUninstall_bwg {
66
  wp_delete_post($post->ID, TRUE);
67
  }
68
  }
69
- ////////////////////////////////////////////////////////////////////////////////////////
70
- // Getters & Setters //
71
- ////////////////////////////////////////////////////////////////////////////////////////
72
- ////////////////////////////////////////////////////////////////////////////////////////
73
- // Private Methods //
74
- ////////////////////////////////////////////////////////////////////////////////////////
75
- ////////////////////////////////////////////////////////////////////////////////////////
76
- // Listeners //
77
- ////////////////////////////////////////////////////////////////////////////////////////
78
  }
1
  <?php
2
 
3
  class BWGModelUninstall_bwg {
 
 
 
 
 
 
 
 
 
 
 
 
4
  public function __construct() {
5
  }
 
 
 
6
  public function delete_db_tables() {
7
  global $wpdb;
8
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_album");
51
  wp_delete_post($post->ID, TRUE);
52
  }
53
  }
 
 
 
 
 
 
 
 
 
54
  }
css/wd_bp_install.css ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @media only screen and (max-width: 500px) {
2
+ body #wd_backup_logo {
3
+ max-width: 100%;
4
+ }
5
+ body #wd_bp_notice_cont p {
6
+ padding-right: 25px !important;
7
+ }
8
+ }
9
+
10
+ #wd_bp_logo_notice {
11
+ width: 40px;
12
+ float: left;
13
+ margin-right: 10px;
14
+ }
15
+
16
+ #wd_bp_notice_cont {
17
+ position: relative;
18
+ }
19
+
20
+ .wds_backup_install p {
21
+ padding-top: 0px;
22
+ margin-top: 0px;
23
+ }
24
+
25
+ #wd_bp_notice_cont a {
26
+ margin: 0 5px;
27
+ }
28
+
29
+ #wd_bp_notice_cont .dashicons-dismiss:before {
30
+ content: "\f153";
31
+ background: 0 0;
32
+ color: #72777c;
33
+ display: block;
34
+ font: 400 16px/20px dashicons;
35
+ speak: none;
36
+ height: 20px;
37
+ text-align: center;
38
+ width: 20px;
39
+ -webkit-font-smoothing: antialiased;
40
+ -moz-osx-font-smoothing: grayscale;
41
+ }
42
+
43
+ .wd_bp_notice_dissmiss {
44
+ margin-top: 5px;
45
+ }
46
+
images/backup_logo.png ADDED
Binary file
images/logo.png ADDED
Binary file
js/wd_bp_install.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function () {
2
+ /*Ajax hide notice forever */
3
+ jQuery(".wd_bp_notice_dissmiss").on("click", function () {
4
+ jQuery("#wd_bp_notice_cont").hide();
5
+ jQuery.post(wd_bp_url);
6
+ })
7
+ });
8
+
9
+ // Set option status 1 - never show again during install btn click in notice
10
+ function wd_bp_notice_install() {
11
+ jQuery.post(wd_bp_url);
12
+ }
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * 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.
7
- * Version: 1.3.52
8
  * Author: Photo Gallery Team
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -1703,8 +1703,9 @@ function bwg_activate() {
1703
  'default_theme' => 0
1704
  ));
1705
  }
 
1706
  $version = get_option('wd_bwg_version');
1707
- $new_version = '1.3.52';
1708
  if ($version && version_compare($version, $new_version, '<')) {
1709
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1710
  bwg_update($version);
@@ -1720,6 +1721,11 @@ function bwg_activate() {
1720
  add_option("wd_bwg_version", $new_version, '', 'no');
1721
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
1722
  }
 
 
 
 
 
1723
  }
1724
 
1725
  function bwg_global_activate($networkwide) {
@@ -1756,7 +1762,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
1756
 
1757
  function bwg_update_hook() {
1758
  $version = get_option('wd_bwg_version');
1759
- $new_version = '1.3.52';
1760
  if ($version && version_compare($version, $new_version, '<')) {
1761
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1762
  bwg_update($version);
@@ -2600,3 +2606,59 @@ function bwg_overview() {
2600
  }
2601
  }
2602
  add_action('init', 'bwg_overview', 9);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * 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.
7
+ * Version: 1.3.53
8
  * Author: Photo Gallery Team
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
1703
  'default_theme' => 0
1704
  ));
1705
  }
1706
+
1707
  $version = get_option('wd_bwg_version');
1708
+ $new_version = '1.3.53';
1709
  if ($version && version_compare($version, $new_version, '<')) {
1710
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1711
  bwg_update($version);
1721
  add_option("wd_bwg_version", $new_version, '', 'no');
1722
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
1723
  }
1724
+
1725
+ // Check if notice or popup already exist for other plugins
1726
+ if( get_option('wds_bk_notice_status') === false ) {
1727
+ add_option('wds_bk_notice_status', '');
1728
+ }
1729
  }
1730
 
1731
  function bwg_global_activate($networkwide) {
1762
 
1763
  function bwg_update_hook() {
1764
  $version = get_option('wd_bwg_version');
1765
+ $new_version = '1.3.53';
1766
  if ($version && version_compare($version, $new_version, '<')) {
1767
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1768
  bwg_update($version);
2606
  }
2607
  }
2608
  add_action('init', 'bwg_overview', 9);
2609
+
2610
+ if (!function_exists('wd_bp_install_notice')) {
2611
+ $wd_bp_plugin_url = WD_BWG_URL;
2612
+ function wd_bp_script_style() {
2613
+ global $wd_bp_plugin_url;
2614
+ wp_enqueue_script('wd_bck_install', $wd_bp_plugin_url . '/js/wd_bp_install.js', array('jquery'));
2615
+ wp_enqueue_style('wd_bck_install', $wd_bp_plugin_url . '/css/wd_bp_install.css');
2616
+ }
2617
+ add_action('admin_enqueue_scripts', 'wd_bp_script_style');
2618
+
2619
+ /**
2620
+ * Show notice to install backup plugin
2621
+ */
2622
+ function wd_bp_install_notice() {
2623
+ global $wd_bp_plugin_url;
2624
+ $prefix = 'bwg_back';
2625
+ $meta_value = get_option('wds_bk_notice_status');
2626
+ if ($meta_value === '' || $meta_value === false) {
2627
+ ob_start();
2628
+ ?>
2629
+ <div class="notice notice-info" id="wd_bp_notice_cont">
2630
+ <p>
2631
+ <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/images/logo.png'; ?>">
2632
+ <?php _e("Hey! Install brand new FREE", $prefix) ?>
2633
+ <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
2634
+ target="_blank"><?php _e("Backup WD", $prefix) ?></a>
2635
+ <?php _e("plugin to keep your images and website safe.", $prefix) ?>
2636
+ <a class="button button-primary"
2637
+ href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd')); ?>">
2638
+ <span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
2639
+ </a>
2640
+ </p>
2641
+ <button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span class="screen-reader-text"></span>
2642
+ </button>
2643
+ </div>
2644
+ <script>wd_bp_url = '<?php echo add_query_arg(array('action' => 'wd_bp_dismiss',), admin_url('admin-ajax.php')); ?>'</script>
2645
+ <?php
2646
+ echo ob_get_clean();
2647
+ }
2648
+ }
2649
+
2650
+ if (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
2651
+ add_action('admin_notices', 'wd_bp_install_notice');
2652
+ }
2653
+
2654
+ /**
2655
+ * Add usermeta to db
2656
+ *
2657
+ * empty: notice,
2658
+ * 1 : never show again
2659
+ */
2660
+ function wd_bp_install_notice_status() {
2661
+ update_option('wds_bk_notice_status', '1', 'no');
2662
+ }
2663
+ add_action('wp_ajax_wd_bp_dismiss', 'wd_bp_install_notice_status');
2664
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  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
5
  Requires at least: 3.4
6
  Tested up to: 4.8
7
- Stable tag: 1.3.52
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -78,8 +78,7 @@ If you think you found a bug in Photo Gallery or have any problem/question conce
78
  * Unlimited quantity of photos in gallery
79
  * Possibility of adding unlimited quantity of galleries/albums
80
  * Detailed three-column visual shortcode for adding created gallery/galleries and album/albums into the posts and pages.
81
- * Detailed (Extended) album and compact album view
82
- * Possibility of changing the roles of who can edit the galleries/albums/images (Author/All Users)
83
  * Chances to provide details for images (tags, captions)
84
  * Thumbnail editing tools (Crop, rotate and flip)
85
  * Possibility of changing the amount of images displayed in a single row of an album/gallery
@@ -123,7 +122,7 @@ Upgrade to [WordPress Photo Gallery Pro](https://web-dorado.com/products/wordpre
123
  * Dynamic Photo Gallery Tag Cloud widget with image tag cloud and text tag cloud options.
124
  * Possibility to include both videos and images within a single simple gallery.
125
  * Add ons support.
126
-
127
 
128
 
129
  == Installation ==
@@ -188,6 +187,9 @@ To enable the feature of adding Media Library images, go to Photo Gallery > Opti
188
 
189
  == Changelog ==
190
 
 
 
 
191
  = 1.3.52 =
192
  * Fixed: Bug on old versions of PHP
193
 
4
  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
5
  Requires at least: 3.4
6
  Tested up to: 4.8
7
+ Stable tag: 1.3.53
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
78
  * Unlimited quantity of photos in gallery
79
  * Possibility of adding unlimited quantity of galleries/albums
80
  * Detailed three-column visual shortcode for adding created gallery/galleries and album/albums into the posts and pages.
81
+ * Detailed (Extended) album and compact album view
 
82
  * Chances to provide details for images (tags, captions)
83
  * Thumbnail editing tools (Crop, rotate and flip)
84
  * Possibility of changing the amount of images displayed in a single row of an album/gallery
122
  * Dynamic Photo Gallery Tag Cloud widget with image tag cloud and text tag cloud options.
123
  * Possibility to include both videos and images within a single simple gallery.
124
  * Add ons support.
125
+ * Possibility of changing the roles of who can edit the galleries/albums/images (Author/All Users)
126
 
127
 
128
  == Installation ==
187
 
188
  == Changelog ==
189
 
190
+ = 1.3.53 =
191
+ * Added: Show notice to install Backup WD plugin.
192
+
193
  = 1.3.52 =
194
  * Fixed: Bug on old versions of PHP
195
 
update/bwg_update.php CHANGED
@@ -376,6 +376,5 @@ function bwg_update($version) {
376
  $bwg_options_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
377
  add_option('wd_bwg_options', json_encode($bwg_options_row), '', 'no');
378
  }
379
- return;
380
  }
381
- ?>
376
  $bwg_options_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
377
  add_option('wd_bwg_options', json_encode($bwg_options_row), '', 'no');
378
  }
379
+ return;
380
  }