WD Google Maps – Google Maps builder Plugin - Version 1.0.47

Version Description

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

Release Info

Developer webdorado
Plugin Icon 128x128 WD Google Maps – Google Maps builder Plugin
Version 1.0.47
Comparing to
See all releases

Code changes from version 1.0.46 to 1.0.47

Files changed (4) hide show
  1. .gitignore +0 -2
  2. gmwd_admin_class.php +2 -4
  3. readme.txt +5 -2
  4. wd-google-maps.php +55 -47
.gitignore DELETED
@@ -1,2 +0,0 @@
1
- # Created by .ignore support plugin (hsz.mobi)
2
- .idea/*
 
 
gmwd_admin_class.php CHANGED
@@ -11,7 +11,7 @@ class GMWDAdmin{
11
  // Variables //
12
  ////////////////////////////////////////////////////////////////////////////////////////
13
  protected static $instance = null;
14
- private static $version = '1.0.46';
15
  ////////////////////////////////////////////////////////////////////////////////////////
16
  // Constructor & Destructor //
17
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -84,9 +84,7 @@ class GMWDAdmin{
84
 
85
  require_once GMWD_DIR . "/update/gmwd_update.php";
86
  gmwd_update();
87
- if( get_option('wds_bk_notice_status') === false ) {
88
- add_option('wds_bk_notice_status', '');
89
- }
90
  }
91
 
92
 
11
  // Variables //
12
  ////////////////////////////////////////////////////////////////////////////////////////
13
  protected static $instance = null;
14
+ private static $version = '1.0.47';
15
  ////////////////////////////////////////////////////////////////////////////////////////
16
  // Constructor & Destructor //
17
  ////////////////////////////////////////////////////////////////////////////////////////
84
 
85
  require_once GMWD_DIR . "/update/gmwd_update.php";
86
  gmwd_update();
87
+
 
 
88
  }
89
 
90
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webdorado, wdsupport
3
  Donate link: https://web-dorado.com/products/wordpress-google-maps-plugin.html
4
  Tags: google map, google maps, map, map markers, maps, directions, google map plugin, google maps plugin, map plugin, map widget, wp google map, wp google maps, google map widget, google map shortcode, wp map, google maps directions, google maps builder, google places, google places api, google maps api, google places reviews, contact page map, custom google map, loaction by address, location, map direction, map styles, polygons, simple google map, gmap, google map embed, best google maps, custom google maps
5
  Requires at least: 3.4
6
- Tested up to: 4.8
7
- Stable tag: 1.0.46
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -117,6 +117,9 @@ After downloading the ZIP file of the Google Maps WD plugin,
117
 
118
  == Changelog ==
119
 
 
 
 
120
  = 1.0.46 =
121
  * Added: Notice to install Backup WD plugin
122
 
3
  Donate link: https://web-dorado.com/products/wordpress-google-maps-plugin.html
4
  Tags: google map, google maps, map, map markers, maps, directions, google map plugin, google maps plugin, map plugin, map widget, wp google map, wp google maps, google map widget, google map shortcode, wp map, google maps directions, google maps builder, google places, google places api, google maps api, google places reviews, contact page map, custom google map, loaction by address, location, map direction, map styles, polygons, simple google map, gmap, google map embed, best google maps, custom google maps
5
  Requires at least: 3.4
6
+ Tested up to: 4.9
7
+ Stable tag: 1.0.47
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
117
 
118
  == Changelog ==
119
 
120
+ = 1.0.47 =
121
+ * Changed: Show notification to install Backup WD plugin only on plugin pages.
122
+
123
  = 1.0.46 =
124
  * Added: Notice to install Backup WD plugin
125
 
wd-google-maps.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Google Maps WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-google-maps-plugin.html
6
  * Description: Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
7
- * Version: 1.0.46
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -53,58 +53,66 @@ function gmwd_map($shortcode_id, $map_id ){
53
  }
54
  require_once( GMWD_DIR. '/widgets.php' );
55
 
56
- if (!function_exists('wd_bp_install_notice')) {
57
- function wd_bp_script_style() {
58
- wp_enqueue_script('wd_bck_install', GMWD_URL . '/js/wd_bp_install.js', array('jquery'));
59
- wp_enqueue_style('wd_bck_install', GMWD_URL . '/css/wd_bp_install.css');
 
 
 
 
 
 
 
 
60
  }
61
- add_action('admin_enqueue_scripts', 'wd_bp_script_style');
62
-
63
- /**
64
- * Show notice to install backup plugin
65
- */
66
- function wd_bp_install_notice() {
67
- $prefix = "gmwd";
68
- $meta_value = get_option('wds_bk_notice_status');
69
- if ($meta_value === '' || $meta_value === false) {
70
- ob_start();
71
- ?>
72
- <div class="notice notice-info" id="wd_bp_notice_cont">
73
- <p>
74
- <img id="wd_bp_logo_notice" src="<?php echo GMWD_URL . '/images/logo.png'; ?>">
75
- <?php _e("Hey! Install brand new FREE", $prefix) ?>
76
- <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
77
- target="_blank"><?php _e("Backup WD", $prefix) ?></a>
78
- <?php _e("plugin to keep your images and website safe.", $prefix) ?>
79
- <a class="button button-primary"
80
- href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd')); ?>">
81
- <span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
82
- </a>
83
- </p>
84
- <button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span class="screen-reader-text"></span>
85
- </button>
86
- </div>
87
- <script>wd_bp_url = '<?php echo add_query_arg(array('action' => 'wd_bp_dismiss',), admin_url('admin-ajax.php')); ?>'</script>
88
- <?php
89
- echo ob_get_clean();
90
- }
91
  }
92
 
93
- if (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
94
- add_action('admin_notices', 'wd_bp_install_notice');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
- /**
98
- * Add usermeta to db
99
- *
100
- * empty: notice,
101
- * 1 : never show again
102
- */
103
- function wd_bp_install_notice_status() {
104
- update_option('wds_bk_notice_status', '1', 'no');
105
- }
106
- add_action('wp_ajax_wd_bp_dismiss', 'wd_bp_install_notice_status');
107
  }
 
 
108
 
109
 
110
  function wd_gmwd_init(){
4
  * Plugin Name: Google Maps WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-google-maps-plugin.html
6
  * Description: Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
7
+ * Version: 1.0.47
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
53
  }
54
  require_once( GMWD_DIR. '/widgets.php' );
55
 
56
+ function gmwd_bp_script_style() {
57
+ wp_enqueue_script('wd_bck_install', GMWD_URL . '/js/wd_bp_install.js', array('jquery'));
58
+ wp_enqueue_style('wd_bck_install', GMWD_URL . '/css/wd_bp_install.css');
59
+ }
60
+ add_action('admin_enqueue_scripts', 'gmwd_bp_script_style');
61
+
62
+ /**
63
+ * Show notice to install backup plugin
64
+ */
65
+ function gnwd_bp_install_notice() {
66
+ if ( get_option('wds_bk_notice_status') !== FALSE ) {
67
+ update_option('wds_bk_notice_status', '1', 'no');
68
  }
69
+ if ( !isset($_GET['page']) || strpos(esc_html($_GET['page']), '_gmwd') === FALSE ) {
70
+ return '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
+ $prefix = "gmwd";
74
+ $meta_value = get_option('wd_bk_notice_status');
75
+ if ($meta_value === '' || $meta_value === false) {
76
+ ob_start();
77
+ ?>
78
+ <div class="notice notice-info" id="wd_bp_notice_cont">
79
+ <p>
80
+ <img id="wd_bp_logo_notice" src="<?php echo GMWD_URL . '/images/logo.png'; ?>">
81
+ <?php _e("Google Maps advises: Install brand new FREE", $prefix) ?>
82
+ <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
83
+ target="_blank"><?php _e("Backup WD", $prefix) ?></a>
84
+ <?php _e("plugin to keep your data and website safe.", $prefix) ?>
85
+ <a class="button button-primary"
86
+ href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd')); ?>">
87
+ <span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
88
+ </a>
89
+ </p>
90
+ <button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span class="screen-reader-text"></span>
91
+ </button>
92
+ </div>
93
+ <script>wd_bp_url = '<?php echo add_query_arg(array('action' => 'wd_bp_dismiss',), admin_url('admin-ajax.php')); ?>'</script>
94
+ <?php
95
+ echo ob_get_clean();
96
  }
97
+ }
98
+
99
+ if (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
100
+ add_action('admin_notices', 'gnwd_bp_install_notice');
101
+ }
102
+
103
+ /**
104
+ * Add usermeta to db
105
+ *
106
+ * empty: notice,
107
+ * 1 : never show again
108
+ */
109
+ function gmwd_bp_install_notice_status() {
110
+
111
+ update_option('wd_bk_notice_status', '1', 'no');
112
 
 
 
 
 
 
 
 
 
 
 
113
  }
114
+ add_action('wp_ajax_wd_bp_dismiss', 'gmwd_bp_install_notice_status');
115
+
116
 
117
 
118
  function wd_gmwd_init(){