Event Calendar WD – Responsive Event Calendar plugin - Version 1.1.5

Version Description

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

Release Info

Developer webdorado
Plugin Icon 128x128 Event Calendar WD – Responsive Event Calendar plugin
Version 1.1.5
Comparing to
See all releases

Code changes from version 1.1.4 to 1.1.5

Files changed (3) hide show
  1. ecwd.php +2 -56
  2. ecwd_admin_class.php +60 -1
  3. readme.txt +4 -1
ecwd.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Event Calendar WD
4
  * Plugin URI: https://web-dorado.com/products/wordpress-event-calendar-wd.html
5
  * Description: Event Calendar WD is an easy event management and planning tool with advanced features.
6
- * Version: 1.1.4
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -24,7 +24,7 @@ if (!defined('ECWD_URL')) {
24
  }
25
 
26
  if (!defined('ECWD_VERSION')) {
27
- define('ECWD_VERSION', "1.1.4");
28
  }
29
 
30
  if (!defined('ECWD_PLUGIN_MAIN_FILE')) {
@@ -47,59 +47,5 @@ if (is_admin()) {
47
  add_action('plugins_loaded', array('ECWD_Admin', 'get_instance'));
48
  add_action('init', array('ECWD_Admin', 'ecwd_freemius'), 9);
49
  }
50
- if (!function_exists('wd_bp_install_notice')) {
51
- $wd_bp_plugin_url = ECWD_URL;
52
- function wd_bp_script_style() {
53
- global $wd_bp_plugin_url;
54
- wp_enqueue_script('wd_bck_install', $wd_bp_plugin_url . '/js/wd_bp_install.js', array('jquery'));
55
- wp_enqueue_style('wd_bck_install', $wd_bp_plugin_url . '/css/wd_bp_install.css');
56
- }
57
- add_action('admin_enqueue_scripts', 'wd_bp_script_style');
58
 
59
- /**
60
- * Show notice to install backup plugin
61
- */
62
- function wd_bp_install_notice() {
63
- global $wd_bp_plugin_url;
64
- $prefix = 'ecwd';
65
- $meta_value = get_option('ecwd_bk_notice_status');
66
- if ($meta_value === '' || $meta_value === false) {
67
- ob_start();
68
- ?>
69
- <div class="notice notice-info" id="wd_bp_notice_cont">
70
- <p>
71
- <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/assets/logo.png'; ?>">
72
- <?php _e("Hey! Install brand new FREE", $prefix) ?>
73
- <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
74
- target="_blank"><?php _e("Backup WD", $prefix) ?></a>
75
- <?php _e("plugin to keep your images and website safe.", $prefix) ?>
76
- <a class="button button-primary"
77
- href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd')); ?>">
78
- <span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
79
- </a>
80
- </p>
81
- <button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span class="screen-reader-text"></span>
82
- </button>
83
- </div>
84
- <script>wd_bp_url = '<?php echo add_query_arg(array('action' => 'wd_bp_dismiss',), admin_url('admin-ajax.php')); ?>'</script>
85
- <?php
86
- echo ob_get_clean();
87
- }
88
- }
89
-
90
- if (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
91
- add_action('admin_notices', 'wd_bp_install_notice');
92
- }
93
-
94
- /**
95
- * Add usermeta to db
96
- *
97
- * empty: notice,
98
- * 1 : never show again
99
- */
100
- function wd_bp_install_notice_status() {
101
- update_option('ecwd_bk_notice_status', '1', 'no');
102
- }
103
- add_action('wp_ajax_wd_bp_dismiss', 'wd_bp_install_notice_status');
104
- }
105
 
3
  * Plugin Name: Event Calendar WD
4
  * Plugin URI: https://web-dorado.com/products/wordpress-event-calendar-wd.html
5
  * Description: Event Calendar WD is an easy event management and planning tool with advanced features.
6
+ * Version: 1.1.5
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
24
  }
25
 
26
  if (!defined('ECWD_VERSION')) {
27
+ define('ECWD_VERSION', "1.1.5");
28
  }
29
 
30
  if (!defined('ECWD_PLUGIN_MAIN_FILE')) {
47
  add_action('plugins_loaded', array('ECWD_Admin', 'get_instance'));
48
  add_action('init', array('ECWD_Admin', 'ecwd_freemius'), 9);
49
  }
 
 
 
 
 
 
 
 
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
ecwd_admin_class.php CHANGED
@@ -46,10 +46,69 @@ class ECWD_Admin {
46
  add_action('admin_notices', array($this, 'ecwd_admin_notices'));
47
  add_action('admin_notices', array($this, 'ecwd_helper_bar'), 10000);
48
  add_filter('parent_file', array($this, 'ecwd_submenu_parent_file'));
 
 
 
 
 
 
 
49
  add_filter('default_hidden_meta_boxes', array($this, 'default_hidden_meta_boxes'),2,2);
50
  }
51
 
52
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  public function default_hidden_meta_boxes($hidden, $screen) {
54
  if ($screen->id == 'ecwd_calendar') {
55
  if (!in_array('postcustom',$hidden)) {
46
  add_action('admin_notices', array($this, 'ecwd_admin_notices'));
47
  add_action('admin_notices', array($this, 'ecwd_helper_bar'), 10000);
48
  add_filter('parent_file', array($this, 'ecwd_submenu_parent_file'));
49
+
50
+ $meta_value = get_option('wd_bk_notice_status');
51
+ if ((!function_exists('wd_bp_install_notice')) && (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) && ($meta_value === '' || $meta_value === false)) {
52
+ add_action('admin_notices', array($this, 'wd_bp_install_notice'));
53
+ add_action('admin_enqueue_scripts', array($this, 'wd_bp_script_style'));
54
+ add_action('wp_ajax_wd_bp_dismiss', array($this, 'wd_bp_install_notice_status'));
55
+ }
56
  add_filter('default_hidden_meta_boxes', array($this, 'default_hidden_meta_boxes'),2,2);
57
  }
58
 
59
+ public function wd_bp_install_notice(){
60
+ $get_current = get_current_screen();
61
+ $current_screen_id = array(
62
+ 'edit-ecwd_event',
63
+ 'ecwd_event',
64
+ 'edit-ecwd_event_category',
65
+ 'edit-ecwd_event_tag',
66
+ 'edit-ecwd_organizer',
67
+ 'edit-ecwd_venue',
68
+ 'edit-ecwd_calendar',
69
+ 'edit-ecwd_theme',
70
+ 'ecwd_event_page_ecwd_general_settings',
71
+ 'ecwd_event_page_overview_ecwd',
72
+ 'ecwd_event_page_ecwd_updates',
73
+ 'ecwd_event_page_ecwd_licensing',
74
+ 'toplevel_page_ecwd_addons',
75
+ 'toplevel_page_ecwd_themes',
76
+ );
77
+ if(in_array($get_current->id, $current_screen_id)){
78
+ $wd_bp_plugin_url = ECWD_URL;
79
+ $prefix = 'ecwd';
80
+ $meta_value = get_option('wd_bk_notice_status');
81
+ if ($meta_value === '' || $meta_value === false) {
82
+ ob_start();
83
+ ?>
84
+ <div class="notice notice-info" id="wd_bp_notice_cont">
85
+ <p>
86
+ <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/assets/logo.png'; ?>">
87
+ <?php _e("Event Calendar WD advises: Install brand new FREE", $prefix) ?>
88
+ <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
89
+ target="_blank"><?php _e("Backup WD", $prefix) ?></a>
90
+ <?php _e("plugin to keep your data and website safe.", $prefix) ?>
91
+ <a class="button button-primary"
92
+ href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd')); ?>">
93
+ <span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
94
+ </a>
95
+ </p>
96
+ <button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span class="screen-reader-text"></span>
97
+ </button>
98
+ </div>
99
+ <script>wd_bp_url = '<?php echo add_query_arg(array('action' => 'wd_bp_dismiss',), admin_url('admin-ajax.php')); ?>'</script>
100
+ <?php
101
+ echo ob_get_clean();
102
+ }
103
+ }
104
+ }
105
+ public function wd_bp_script_style() {
106
+ wp_enqueue_script('wd_bck_install', ECWD_URL . '/js/wd_bp_install.js', array('jquery'));
107
+ wp_enqueue_style('wd_bck_install', ECWD_URL . '/css/wd_bp_install.css');
108
+ }
109
+ public function wd_bp_install_notice_status() {
110
+ update_option('wd_bk_notice_status', '1', 'no');
111
+ }
112
  public function default_hidden_meta_boxes($hidden, $screen) {
113
  if ($screen->id == 'ecwd_calendar') {
114
  if (!in_array('postcustom',$hidden)) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-event-calendar-wd.html
4
  Tags: calendar, date, event, event calendar, events, events calendar, meeting, organizer, recurring, reservation, responsive, schedule
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
- Stable tag: 1.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -247,6 +247,9 @@ After downloading the ZIP file of the Event Calendar WD plugin,
247
 
248
  == Changelog ==
249
 
 
 
 
250
  = 1.1.4 =
251
  * Changed: Introducing Backup WD plugin
252
 
4
  Tags: calendar, date, event, event calendar, events, events calendar, meeting, organizer, recurring, reservation, responsive, schedule
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
+ Stable tag: 1.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
247
 
248
  == Changelog ==
249
 
250
+ = 1.1.5 =
251
+ * Changed: Show notification to install Backup WD plugin only on plugin pages.
252
+
253
  = 1.1.4 =
254
  * Changed: Introducing Backup WD plugin
255