Photo Gallery by WD – Responsive Photo Gallery - Version 1.3.54

Version Description

  • Changed: Show notification to install Backup WD plugin only on plugin pages.
Download this release

Release Info

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

Code changes from version 1.3.53 to 1.3.54

css/wd_bp_install.css DELETED
@@ -1,46 +0,0 @@
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 DELETED
Binary file
js/wd_bp_install.js DELETED
@@ -1,12 +0,0 @@
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.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
@@ -15,6 +15,8 @@ define('WD_BWG_URL', plugins_url(plugin_basename(dirname(__FILE__))));
15
  define('WD_BWG_NAME', plugin_basename(dirname(__FILE__)));
16
  define('WD_BWG_PRO', false);
17
  define('WD_BWG_VERSION', get_option('wd_bwg_version'));
 
 
18
  $wd_bwg_inline_stiles = FALSE;
19
 
20
  function bwg_use_home_url() {
@@ -1705,7 +1707,7 @@ function bwg_activate() {
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,11 +1723,6 @@ function bwg_activate() {
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,7 +1759,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
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);
@@ -2607,58 +2604,89 @@ function bwg_overview() {
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
  }
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.54
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
15
  define('WD_BWG_NAME', plugin_basename(dirname(__FILE__)));
16
  define('WD_BWG_PRO', false);
17
  define('WD_BWG_VERSION', get_option('wd_bwg_version'));
18
+ define('WD_BWG_PREFIX', 'bwg');
19
+ define('WD_BWG_NICENAME', __( 'Photo Gallery', WD_BWG_PREFIX ));
20
  $wd_bwg_inline_stiles = FALSE;
21
 
22
  function bwg_use_home_url() {
1707
  }
1708
 
1709
  $version = get_option('wd_bwg_version');
1710
+ $new_version = '1.3.54';
1711
  if ($version && version_compare($version, $new_version, '<')) {
1712
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1713
  bwg_update($version);
1723
  add_option("wd_bwg_version", $new_version, '', 'no');
1724
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
1725
  }
 
 
 
 
 
1726
  }
1727
 
1728
  function bwg_global_activate($networkwide) {
1759
 
1760
  function bwg_update_hook() {
1761
  $version = get_option('wd_bwg_version');
1762
+ $new_version = '1.3.54';
1763
  if ($version && version_compare($version, $new_version, '<')) {
1764
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1765
  bwg_update($version);
2604
  }
2605
  add_action('init', 'bwg_overview', 9);
2606
 
2607
+ /**
2608
+ * Show notice to install backup plugin
2609
+ */
2610
+ function bwg_bp_install_notice() {
2611
+ // Remove old notice.
2612
+ if ( get_option('wds_bk_notice_status') !== FALSE ) {
2613
+ update_option('wds_bk_notice_status', '1', 'no');
2614
  }
2615
+
2616
+ // Show notice only on plugin pages.
2617
+ if ( !isset($_GET['page']) || strpos(esc_html($_GET['page']), '_bwg') === FALSE ) {
2618
+ return '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2619
  }
2620
 
2621
+ $meta_value = get_option('wd_bk_notice_status');
2622
+ if ( $meta_value === '' || $meta_value === FALSE ) {
2623
+ ob_start();
2624
+ $prefix = WD_BWG_PREFIX;
2625
+ $nicename = WD_BWG_NICENAME;
2626
+ $url = WD_BWG_URL;
2627
+ $dismiss_url = add_query_arg(array( 'action' => 'wd_bp_dismiss' ), admin_url('admin-ajax.php'));
2628
+ $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd'));
2629
+ ?>
2630
+ <div class="notice notice-info" id="wd_bp_notice_cont">
2631
+ <p>
2632
+ <img id="wd_bp_logo_notice" src="<?php echo $url . '/images/logo.png'; ?>" />
2633
+ <?php echo sprintf(__("%s advises: Install brand new FREE %s plugin to keep your images and website safe.", $prefix), $nicename, '<a href="https://wordpress.org/plugins/backup-wd/" title="' . __("More details", $prefix) . '" target="_blank">' . __("Backup WD", $prefix) . '</a>'); ?>
2634
+ <a class="button button-primary" href="<?php echo $install_url; ?>">
2635
+ <span onclick="jQuery.post('<?php echo $dismiss_url; ?>');"><?php _e("Install", $prefix); ?></span>
2636
+ </a>
2637
+ </p>
2638
+ <button type="button" class="wd_bp_notice_dissmiss notice-dismiss" onclick="jQuery('#wd_bp_notice_cont').hide(); jQuery.post('<?php echo $dismiss_url; ?>');"><span class="screen-reader-text"></span></button>
2639
+ </div>
2640
+ <style>
2641
+ @media only screen and (max-width: 500px) {
2642
+ body #wd_backup_logo {
2643
+ max-width: 100%;
2644
+ }
2645
+ body #wd_bp_notice_cont p {
2646
+ padding-right: 25px !important;
2647
+ }
2648
+ }
2649
+ #wd_bp_logo_notice {
2650
+ width: 40px;
2651
+ float: left;
2652
+ margin-right: 10px;
2653
+ }
2654
+ #wd_bp_notice_cont {
2655
+ position: relative;
2656
+ }
2657
+ #wd_bp_notice_cont a {
2658
+ margin: 0 5px;
2659
+ }
2660
+ #wd_bp_notice_cont .dashicons-dismiss:before {
2661
+ content: "\f153";
2662
+ background: 0 0;
2663
+ color: #72777c;
2664
+ display: block;
2665
+ font: 400 16px/20px dashicons;
2666
+ speak: none;
2667
+ height: 20px;
2668
+ text-align: center;
2669
+ width: 20px;
2670
+ -webkit-font-smoothing: antialiased;
2671
+ -moz-osx-font-smoothing: grayscale;
2672
+ }
2673
+ .wd_bp_notice_dissmiss {
2674
+ margin-top: 5px;
2675
+ }
2676
+ </style>
2677
+ <?php
2678
+ echo ob_get_clean();
2679
  }
2680
+ }
2681
 
2682
+ if ( !is_dir(plugin_dir_path(__DIR__) . 'backup-wd') ) {
2683
+ add_action('admin_notices', 'bwg_bp_install_notice');
2684
+ }
2685
+
2686
+ if ( !function_exists('wd_bps_install_notice_status') ) {
2687
+ // Add usermeta to db.
2688
+ function wd_bps_install_notice_status() {
2689
+ update_option('wd_bk_notice_status', '1', 'no');
2690
  }
2691
+ add_action('wp_ajax_wd_bp_dismiss', 'wd_bps_install_notice_status');
2692
  }
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.53
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -187,6 +187,9 @@ To enable the feature of adding Media Library images, go to Photo Gallery > Opti
187
 
188
  == Changelog ==
189
 
 
 
 
190
  = 1.3.53 =
191
  * Added: Show notice to install Backup WD plugin.
192
 
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.54
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
187
 
188
  == Changelog ==
189
 
190
+ = 1.3.54 =
191
+ * Changed: Show notification to install Backup WD plugin only on plugin pages.
192
+
193
  = 1.3.53 =
194
  * Added: Show notice to install Backup WD plugin.
195