Contact Form Builder – a plugin for creating contact and feedback forms - Version 1.0.64

Version Description

  • Changed: Deactivation popup.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Contact Form Builder – a plugin for creating contact and feedback forms
Version 1.0.64
Comparing to
See all releases

Code changes from version 1.0.63 to 1.0.64

admin/models/CFMModelUninstall_cfm.php CHANGED
@@ -28,6 +28,7 @@ class CFMModelUninstall_cfm {
28
  delete_option("wd_contact_form_maker_version");
29
  delete_option("cfm_export_delimiter");
30
  delete_option("cfm_settings");
 
31
  }
32
  ////////////////////////////////////////////////////////////////////////////////////////
33
  // Getters & Setters //
28
  delete_option("wd_contact_form_maker_version");
29
  delete_option("cfm_export_delimiter");
30
  delete_option("cfm_settings");
31
+ delete_option("fmc_subscribe_done");
32
  }
33
  ////////////////////////////////////////////////////////////////////////////////////////
34
  // Getters & Setters //
admin/views/CFMViewBlocked_ips_cfm.php CHANGED
@@ -32,18 +32,6 @@ class CFMViewBlocked_ips_cfm {
32
  $ids_string = '';
33
  ?>
34
  <div id="fm_blocked_ips_message" style="width: 99%; display: none;"></div>
35
- <div class="fm-user-manual">
36
- <?php echo __("This section allows you to block IPs.", "contact_form_maker"); ?>
37
- <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-6.html"><?php echo __("Read More in User Manual","contact_form_maker"); ?></a>
38
- </div>
39
- <div class="fm-upgrade-pro">
40
- <a target="_blank" href="http://web-dorado.com/files/fromContactFormBuilder.php">
41
- <div class="fm-upgrade-img">
42
- UPGRADE TO PRO VERSION
43
- <span></span>
44
- </div>
45
- </a>
46
- </div>
47
  <div class="fm-clear"></div>
48
  <form onkeypress="spider_doNothing(event)" class="wrap" id="blocked_ips" method="post" action="admin.php?page=blocked_ips_cfm" style="width:99%;">
49
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
32
  $ids_string = '';
33
  ?>
34
  <div id="fm_blocked_ips_message" style="width: 99%; display: none;"></div>
 
 
 
 
 
 
 
 
 
 
 
 
35
  <div class="fm-clear"></div>
36
  <form onkeypress="spider_doNothing(event)" class="wrap" id="blocked_ips" method="post" action="admin.php?page=blocked_ips_cfm" style="width:99%;">
37
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
admin/views/CFMViewGoptions_cfm.php CHANGED
@@ -27,11 +27,6 @@ class CFMViewGoptions_cfm {
27
  $private_key = isset($cfm_settings['private_key']) ? $cfm_settings['private_key'] : '';
28
  $map_key = isset($cfm_settings['map_key']) ? $cfm_settings['map_key'] : '';
29
  ?>
30
- <div class="fm-user-manual">
31
- <?php echo __("This section allows you to edit forms", "contact_form_maker"); ?>.
32
- <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-2.html"><?php echo __("Read More in User Manual","contact_form_maker"); ?></a>
33
- <p><?php echo __("There is no possibility of adding new form fields, whereas you can edit, enable/disable the current fields included in each form","contact_form_maker"); ?>.</p>
34
- </div>
35
  <div class="fm-clear"></div>
36
  <form class="wrap" method="post" action="admin.php?page=goptions_cfm" style="width:99%;">
37
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
27
  $private_key = isset($cfm_settings['private_key']) ? $cfm_settings['private_key'] : '';
28
  $map_key = isset($cfm_settings['map_key']) ? $cfm_settings['map_key'] : '';
29
  ?>
 
 
 
 
 
30
  <div class="fm-clear"></div>
31
  <form class="wrap" method="post" action="admin.php?page=goptions_cfm" style="width:99%;">
32
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
admin/views/CFMViewManage_cfm.php CHANGED
@@ -34,18 +34,8 @@ class CFMViewManage_cfm {
34
  $header_title = __('Forms', 'contact_form_maker');
35
  ?>
36
  <div class="fm-user-manual">
37
- <?php echo __("This section allows you to edit forms", "contact_form_maker"); ?>.
38
- <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-2.html"><?php echo __("Read More in User Manual","contact_form_maker"); ?></a>
39
  <p><?php echo __("There is no possibility of adding new form fields, whereas you can edit, enable/disable the current fields included in each form","contact_form_maker"); ?>.</p>
40
  </div>
41
- <div class="fm-upgrade-pro">
42
- <a target="_blank" href="http://web-dorado.com/files/fromContactFormBuilder.php">
43
- <div class="fm-upgrade-img">
44
- UPGRADE TO PRO VERSION
45
- <span></span>
46
- </div>
47
- </a>
48
- </div>
49
  <div class="fm-clear"></div>
50
  <form onkeypress="spider_doNothing(event)" class="wrap cfm_form" id="manage_form" method="post" action="admin.php?page=manage_cfm" >
51
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
@@ -414,18 +404,6 @@ class CFMViewManage_cfm {
414
  }
415
  }
416
  </script>
417
- <div class="fm-user-manual">
418
- <?php echo __("This section allows you to enable/disable fields in your form", "contact_form_maker"); ?>.
419
- <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-4.html"><?php echo __("Read More in User Manual", "contact_form_maker"); ?></a>
420
- </div>
421
- <div class="fm-upgrade-pro">
422
- <a target="_blank" href="http://web-dorado.com/files/fromContactFormBuilder.php">
423
- <div class="fm-upgrade-img">
424
- UPGRADE TO PRO VERSION
425
- <span></span>
426
- </div>
427
- </a>
428
- </div>
429
  <div class="fm-clear"></div>
430
  <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_cfm">
431
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
@@ -934,18 +912,6 @@ class CFMViewManage_cfm {
934
  }
935
  }
936
  </script>
937
- <div style="font-size: 14px; font-weight: bold;">
938
- <?php echo __("This section allows you to edit form options", "contact_form_maker"); ?>.
939
- <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-3.html"><?php echo __("Read More in User Manual", "contact_form_maker"); ?></a>
940
- </div>
941
- <div class="fm-upgrade-pro">
942
- <a target="_blank" href="http://web-dorado.com/files/fromContactFormBuilder.php">
943
- <div class="fm-upgrade-img">
944
- UPGRADE TO PRO VERSION
945
- <span></span>
946
- </div>
947
- </a>
948
- </div>
949
  <div class="fm-clear"></div>
950
  <form class="wrap" method="post" action="admin.php?page=manage_cfm" style="width: 99%;" name="adminForm" id="adminForm">
951
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
34
  $header_title = __('Forms', 'contact_form_maker');
35
  ?>
36
  <div class="fm-user-manual">
 
 
37
  <p><?php echo __("There is no possibility of adding new form fields, whereas you can edit, enable/disable the current fields included in each form","contact_form_maker"); ?>.</p>
38
  </div>
 
 
 
 
 
 
 
 
39
  <div class="fm-clear"></div>
40
  <form onkeypress="spider_doNothing(event)" class="wrap cfm_form" id="manage_form" method="post" action="admin.php?page=manage_cfm" >
41
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
404
  }
405
  }
406
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
407
  <div class="fm-clear"></div>
408
  <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_cfm">
409
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
912
  }
913
  }
914
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
915
  <div class="fm-clear"></div>
916
  <form class="wrap" method="post" action="admin.php?page=manage_cfm" style="width: 99%;" name="adminForm" id="adminForm">
917
  <?php wp_nonce_field('nonce_cfm', 'nonce_cfm'); ?>
admin/views/CFMViewSubmissions_cfm.php CHANGED
@@ -25,19 +25,8 @@ class CFMViewSubmissions_cfm {
25
  public function display($form_id) {
26
  ?>
27
  <div class="fm-user-manual">
28
- <br />
29
- <?php echo __("This section allows you to view form submissions.", "contact_form_maker"); ?>
30
- <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-7.html"><?php echo __("Read More in User Manual","contact_form_maker"); ?></a><br /><br />
31
  <span style="color: #FF0000;"><?php echo __("This feature is disabled for the non-commercial version.","contact_form_maker"); ?></span>
32
  </div>
33
- <div class="fm-upgrade-pro">
34
- <a target="_blank" href="http://web-dorado.com/files/fromContactFormBuilder.php">
35
- <div class="fm-upgrade-img">
36
- <?php echo __("UPGRADE TO PRO VERSION","contact_form_maker"); ?>
37
- <span></span>
38
- </div>
39
- </a>
40
- </div>
41
  <div style="clear:both;">
42
  <img style="max-width: 100%;" src="<?php echo WD_CFM_URL . '/images/screenshots/sub.png'; ?>" />
43
  </div>
25
  public function display($form_id) {
26
  ?>
27
  <div class="fm-user-manual">
 
 
 
28
  <span style="color: #FF0000;"><?php echo __("This feature is disabled for the non-commercial version.","contact_form_maker"); ?></span>
29
  </div>
 
 
 
 
 
 
 
 
30
  <div style="clear:both;">
31
  <img style="max-width: 100%;" src="<?php echo WD_CFM_URL . '/images/screenshots/sub.png'; ?>" />
32
  </div>
admin/views/CFMViewThemes_cfm.php CHANGED
@@ -25,20 +25,10 @@ class CFMViewThemes_cfm {
25
  public function display() {
26
  ?>
27
  <div class="fm-user-manual">
28
- <?php echo __("This section allows you to edit form themes", "contact_form_maker"); ?>.
29
- <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-contact-form-builder-guide-2.html"><?php echo __("Read More in User Manual", "contact_form_maker"); ?></a><br /><br />
30
  <span style="color: #FF0000;"><?php echo __("This feature is disabled for the non-commercial version.","contact_form_maker"); ?></span><br /><br />
31
  <?php echo __("Here are some examples standard templates included in the commercial version.","contact_form_maker"); ?>
32
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://wpdemo.web-dorado.com/contact-form-builder"><?php echo __("Demo", "contact_form_maker"); ?></a>
33
  </div>
34
- <div class="fm-upgrade-pro">
35
- <a target="_blank" href="http://web-dorado.com/files/fromContactFormBuilder.php">
36
- <div class="fm-upgrade-img">
37
- <?php echo __("UPGRADE TO PRO VERSION", "contact_form_maker"); ?>
38
- <span></span>
39
- </div>
40
- </a>
41
- </div>
42
  <div style="clear: both; float: left; width: 99%;">
43
  <img style="max-width: 50%;float: left;" src="<?php echo WD_CFM_URL . '/images/screenshots/form2.png'; ?>" />
44
  <img style="max-width: 50%;float: left;" src="<?php echo WD_CFM_URL . '/images/screenshots/form1.png'; ?>" />
25
  public function display() {
26
  ?>
27
  <div class="fm-user-manual">
 
 
28
  <span style="color: #FF0000;"><?php echo __("This feature is disabled for the non-commercial version.","contact_form_maker"); ?></span><br /><br />
29
  <?php echo __("Here are some examples standard templates included in the commercial version.","contact_form_maker"); ?>
30
  <a style="color: blue; text-decoration: none;" target="_blank" href="http://wpdemo.web-dorado.com/contact-form-builder"><?php echo __("Demo", "contact_form_maker"); ?></a>
31
  </div>
 
 
 
 
 
 
 
 
32
  <div style="clear: both; float: left; width: 99%;">
33
  <img style="max-width: 50%;float: left;" src="<?php echo WD_CFM_URL . '/images/screenshots/form2.png'; ?>" />
34
  <img style="max-width: 50%;float: left;" src="<?php echo WD_CFM_URL . '/images/screenshots/form1.png'; ?>" />
contact-form-builder.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: Contact Form Builder
4
  * Plugin URI: https://web-dorado.com/products/wordpress-contact-form-builder.html
5
  * Description: Contact Form Builder is an advanced plugin to add contact forms into your website. It comes along with multiple default templates which can be customized.
6
- * Version: 1.0.63
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
11
  define('WD_CFM_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
12
  define('WD_CFM_URL', plugins_url(plugin_basename(dirname(__FILE__))));
13
- define('WD_CFM_VERSION', '1.0.63');
14
  define('WD_CFM_PREFIX', 'cfm');
15
  define('WD_CFM_NICENAME', __( 'Contact Form Builder', WD_CFM_PREFIX ));
16
 
@@ -819,3 +819,170 @@ function cfm_add_plugin_meta_links($meta_fields, $file) {
819
  return $meta_fields;
820
  }
821
  add_filter("plugin_row_meta", 'cfm_add_plugin_meta_links', 10, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Plugin Name: Contact Form Builder
4
  * Plugin URI: https://web-dorado.com/products/wordpress-contact-form-builder.html
5
  * Description: Contact Form Builder is an advanced plugin to add contact forms into your website. It comes along with multiple default templates which can be customized.
6
+ * Version: 1.0.64
7
  * Author: WebDorado
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
11
  define('WD_CFM_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
12
  define('WD_CFM_URL', plugins_url(plugin_basename(dirname(__FILE__))));
13
+ define('WD_CFM_VERSION', '1.0.64');
14
  define('WD_CFM_PREFIX', 'cfm');
15
  define('WD_CFM_NICENAME', __( 'Contact Form Builder', WD_CFM_PREFIX ));
16
 
819
  return $meta_fields;
820
  }
821
  add_filter("plugin_row_meta", 'cfm_add_plugin_meta_links', 10, 2);
822
+
823
+ function cfm_topic() {
824
+ $page = isset($_GET['page']) ? $_GET['page'] : '';
825
+ $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
826
+ $user_guide_link = 'https://wordpress.org/plugins/contact-form-builder/';
827
+ $support_forum_link = 'https://wordpress.org/support/plugin/contact-form-builder';
828
+ $pro_icon = WD_CFM_URL . '/images/wd_logo.png';
829
+ $pro_link = 'http://web-dorado.com/files/fromContactFormBuilder.php';
830
+ $support_icon = WD_CFM_URL . '/images/support.png';
831
+ $prefix = WD_CFM_PREFIX;
832
+ $is_free = TRUE;
833
+ switch ($page) {
834
+ case 'blocked_ips_cfm': {
835
+ $help_text = 'block IPs';
836
+ $user_guide_link .= 'blocking-ips.html';
837
+ break;
838
+ }
839
+ case 'goptions_cfm': {
840
+ $help_text = 'edit form settings';
841
+ $user_guide_link .= '';
842
+ break;
843
+ }
844
+ case 'licensing_cfm': {
845
+ $help_text = '';
846
+ $user_guide_link .= '';
847
+ break;
848
+ }
849
+ case 'manage_cfm': {
850
+ switch ($task) {
851
+ case 'edit':
852
+ case 'edit_old': {
853
+ $help_text = 'add fields to your form';
854
+ $user_guide_link .= 'description-of-form-fields.html';
855
+ break;
856
+ }
857
+ case 'form_options':
858
+ case 'form_options_old': {
859
+ $help_text = 'edit form options';
860
+ $user_guide_link .= 'configuring-form-options.html';
861
+ break;
862
+ }
863
+ default: {
864
+ $help_text = 'create, edit forms';
865
+ $user_guide_link .= 'creating-form.html';
866
+ }
867
+ }
868
+ break;
869
+ }
870
+ case 'submissions_cfm': {
871
+ $help_text = 'view and manage form submissions';
872
+ $user_guide_link .= 'managing-submissions.html';
873
+ break;
874
+ }
875
+ case 'themes_cfm': {
876
+ $help_text = 'create, edit form themes';
877
+ $user_guide_link .= '';
878
+ break;
879
+ }
880
+ default: {
881
+ return '';
882
+ }
883
+ }
884
+ ob_start();
885
+ ?>
886
+ <style>
887
+ .wd_topic {
888
+ background-color: #ffffff;
889
+ border: none;
890
+ box-sizing: border-box;
891
+ clear: both;
892
+ color: #6e7990;
893
+ font-size: 14px;
894
+ font-weight: bold;
895
+ line-height: 44px;
896
+ margin: 0;
897
+ padding: 0 0 0 15px;
898
+ vertical-align: middle;
899
+ width: 98%;
900
+ }
901
+ .wd_topic .wd_help_topic {
902
+ float: left;
903
+ }
904
+ .wd_topic .wd_help_topic a {
905
+ color: #0073aa;
906
+ }
907
+ .wd_topic .wd_help_topic a:hover {
908
+ color: #00A0D2;
909
+ }
910
+ .wd_topic .wd_support {
911
+ float: right;
912
+ margin: 0 10px;
913
+ }
914
+ .wd_topic .wd_support img {
915
+ vertical-align: middle;
916
+ }
917
+ .wd_topic .wd_support a {
918
+ text-decoration: none;
919
+ color: #6E7990;
920
+ }
921
+ .wd_topic .wd_pro {
922
+ float: right;
923
+ padding: 0;
924
+ }
925
+ .wd_topic .wd_pro a {
926
+ border: none;
927
+ box-shadow: none !important;
928
+ text-decoration: none;
929
+ }
930
+ .wd_topic .wd_pro img {
931
+ border: none;
932
+ display: inline-block;
933
+ vertical-align: middle;
934
+ }
935
+ .wd_topic .wd_pro a,
936
+ .wd_topic .wd_pro a:active,
937
+ .wd_topic .wd_pro a:visited,
938
+ .wd_topic .wd_pro a:hover {
939
+ background-color: #D8D8D8;
940
+ color: #175c8b;
941
+ display: inline-block;
942
+ font-size: 11px;
943
+ font-weight: bold;
944
+ padding: 0 10px;
945
+ vertical-align: middle;
946
+ }
947
+ </style>
948
+ <div class="update-nag wd_topic">
949
+ <?php
950
+ if ($help_text) {
951
+ ?>
952
+ <span class="wd_help_topic">
953
+ <?php echo sprintf(__('This section allows you to %s.', $prefix), $help_text); ?>
954
+ <a target="_blank" href="<?php echo $user_guide_link; ?>">
955
+ <?php _e('Read More in User Manual', $prefix); ?>
956
+ </a>
957
+ </span>
958
+ <?php
959
+ }
960
+ if ($is_free) {
961
+ $text = strtoupper(__('Upgrade to paid version', $prefix));
962
+ ?>
963
+ <div class="wd_pro">
964
+ <a target="_blank" href="<?php echo $pro_link; ?>">
965
+ <img alt="web-dorado.com" title="<?php echo $text; ?>" src="<?php echo $pro_icon; ?>" />
966
+ <span><?php echo $text; ?></span>
967
+ </a>
968
+ </div>
969
+ <?php
970
+ }
971
+ if (TRUE) {
972
+ ?>
973
+ <span class="wd_support">
974
+ <a target="_blank" href="<?php echo $support_forum_link; ?>">
975
+ <img src="<?php echo $support_icon; ?>" />
976
+ <?php _e('Support Forum', $prefix); ?>
977
+ </a>
978
+ </span>
979
+ <?php
980
+ }
981
+ ?>
982
+ </div>
983
+ <?php
984
+ echo ob_get_clean();
985
+ }
986
+
987
+ add_action('admin_notices', 'cfm_topic', 11);
988
+
images/support.png ADDED
Binary file
images/wd_logo.png CHANGED
Binary file
readme.txt CHANGED
@@ -1,10 +1,9 @@
1
  === Contact Form Builder - a plugin for creating contact forms and feedback forms ===
2
  Contributors: webdorado
3
- Donate link: http://web-dorado.com/products/wordpress-contact-form-builder.html
4
  Tags: contact form, contact forms, contact, feedback, form manager, captcha, custom form, email, form, form builder, forms, survey
5
  Requires at least: 3.4
6
  Tested up to: 4.9
7
- Stable tag: 1.0.63
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -50,8 +49,8 @@ Features of [WordPress Contact Form Builder](http://web-dorado.com/products/word
50
  * Possibility of sending the copy of the submitted data to the user.
51
  * Google ReCaptcha and simple captcha support for avoiding spam.
52
  * Possibility to change the form layout using the corresponding section.
53
- * Preview possibility for each form at the Manager Section.
54
  * Possibility to create required fields.
 
55
  * Support for displaying custom text after hitting submit button, as well as redirection to a custom page or url.
56
 
57
  Upgrade to [WordPress Contact Form Builder Pro](http://web-dorado.com/products/wordpress-contact-form-builder.html) to add features:
@@ -139,6 +138,9 @@ After downloading the ZIP file,
139
 
140
  == Changelog ==
141
 
 
 
 
142
  = 1.0.63 =
143
  * Added: Support forum and Review links.
144
 
1
  === Contact Form Builder - a plugin for creating contact forms and feedback forms ===
2
  Contributors: webdorado
 
3
  Tags: contact form, contact forms, contact, feedback, form manager, captcha, custom form, email, form, form builder, forms, survey
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
+ Stable tag: 1.0.64
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
49
  * Possibility of sending the copy of the submitted data to the user.
50
  * Google ReCaptcha and simple captcha support for avoiding spam.
51
  * Possibility to change the form layout using the corresponding section.
 
52
  * Possibility to create required fields.
53
+ * Preview possibility for each form at the Manager Section.
54
  * Support for displaying custom text after hitting submit button, as well as redirection to a custom page or url.
55
 
56
  Upgrade to [WordPress Contact Form Builder Pro](http://web-dorado.com/products/wordpress-contact-form-builder.html) to add features:
138
 
139
  == Changelog ==
140
 
141
+ = 1.0.64 =
142
+ * Changed: Deactivation popup.
143
+
144
  = 1.0.63 =
145
  * Added: Support forum and Review links.
146
 
wd/README.md CHANGED
@@ -1,4 +1,5 @@
1
- Version: 1.0.9
 
2
 
3
 
4
  Usage:
1
+ Version: 1.0.13
2
+
3
 
4
 
5
  Usage:
wd/assets/css/deactivate_popup.css CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  .wd-opacity{
2
  position: fixed;
3
  top: 0px;
@@ -83,4 +87,4 @@
83
  bottom: 0;
84
  margin: auto;
85
  z-index: 63;
86
- }
1
+ .wd-bwg-reasons:nth-child(3) {
2
+ display: none;
3
+ }
4
+
5
  .wd-opacity{
6
  position: fixed;
7
  top: 0px;
87
  bottom: 0;
88
  margin: auto;
89
  z-index: 63;
90
+ }
wd/assets/css/overview.css CHANGED
@@ -451,5 +451,12 @@ a:focus{
451
  font-size: 16px;
452
  }
453
 
 
 
 
 
454
 
455
-
 
 
 
451
  font-size: 16px;
452
  }
453
 
454
+ .wd-start-using-button .button{
455
+ margin-left: 7px;
456
+ margin-top: 7px;
457
+ }
458
 
459
+ .wd-start-using-button{
460
+ margin-right:10px;
461
+ float: right;
462
+ }
wd/assets/img/cfm_main_plugin.png ADDED
Binary file
wd/assets/js/deactivate_popup.js CHANGED
@@ -95,6 +95,7 @@ function wdReady(prefix){
95
  });
96
 
97
  }
 
98
  ////////////////////////////////////////////////////////////////////////////////////////
99
  // Getters & Setters //
100
  ////////////////////////////////////////////////////////////////////////////////////////
95
  });
96
 
97
  }
98
+
99
  ////////////////////////////////////////////////////////////////////////////////////////
100
  // Getters & Setters //
101
  ////////////////////////////////////////////////////////////////////////////////////////
wd/assets/js/overview.js CHANGED
@@ -12,7 +12,7 @@
12
  ////////////////////////////////////////////////////////////////////////////////////////
13
  jQuery(document).ready(function () {
14
  jQuery(".overview_content > div:not(#welcome)").hide();
15
- jQuery(".overview_tabs li a:not(.not_tab)").click(function(){
16
  jQuery(".overview_tabs li a").removeClass("overview_tab_active");
17
  jQuery(this).addClass("overview_tab_active");
18
  jQuery(".overview_content > div").hide();
@@ -31,7 +31,7 @@ jQuery(document).ready(function () {
31
  // jQuery("body").append('<style>.stars-' + rate.toString() + ':after{width:' + rate + '%;}</style>');
32
  // });
33
 
34
- jQuery("#wd-copy").click(function(){
35
  var selector = document.querySelector('#wd-site-deatils-textarea');
36
  selector.select();
37
  document.execCommand('copy');
12
  ////////////////////////////////////////////////////////////////////////////////////////
13
  jQuery(document).ready(function () {
14
  jQuery(".overview_content > div:not(#welcome)").hide();
15
+ jQuery(".overview_tabs li a:not(.not_tab)").on("click", function(){
16
  jQuery(".overview_tabs li a").removeClass("overview_tab_active");
17
  jQuery(this).addClass("overview_tab_active");
18
  jQuery(".overview_content > div").hide();
31
  // jQuery("body").append('<style>.stars-' + rate.toString() + ':after{width:' + rate + '%;}</style>');
32
  // });
33
 
34
+ jQuery("#wd-copy").on("click", function(){
35
  var selector = document.querySelector('#wd-site-deatils-textarea');
36
  selector.select();
37
  document.execCommand('copy');
wd/assets/js/subsribe.js CHANGED
@@ -10,13 +10,13 @@
10
  ////////////////////////////////////////////////////////////////////////////////////////
11
  // Constructor & Destructor //
12
  ////////////////////////////////////////////////////////////////////////////////////////
13
- jQuery(document).ready(function () {
14
- jQuery(".permissions").click(function(){
15
  jQuery(".list").toggle();
16
  return false;
17
  });
18
 
19
- jQuery(".allow_and_continue").click(function(){
20
  jQuery(this).css("opacity", "0.5");
21
  jQuery(".wd_loader").css("visibility", "visible");
22
  });
10
  ////////////////////////////////////////////////////////////////////////////////////////
11
  // Constructor & Destructor //
12
  ////////////////////////////////////////////////////////////////////////////////////////
13
+ jQuery(document).on("ready", function () {
14
+ jQuery(".permissions").on("click", function(){
15
  jQuery(".list").toggle();
16
  return false;
17
  });
18
 
19
+ jQuery(".allow_and_continue").on("click", function(){
20
  jQuery(this).css("opacity", "0.5");
21
  jQuery(".wd_loader").css("visibility", "visible");
22
  });
wd/includes/api.php CHANGED
@@ -55,7 +55,7 @@
55
  public function get_hash(){
56
  $response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
57
 
58
- $response_body = isset($response["body"]) ? json_decode($response["body"], true) : null;
59
 
60
  if(is_array($response_body)){
61
  $hash = $response_body["body"]["hash"];
55
  public function get_hash(){
56
  $response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
57
 
58
+ $response_body = ( !is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
59
 
60
  if(is_array($response_body)){
61
  $hash = $response_body["body"]["hash"];
wd/includes/deactivate.php CHANGED
@@ -76,7 +76,18 @@
76
  });
77
  </script>
78
  <?php
79
- require ( $wd_options->wd_dir_templates . '/display_deactivation_popup.php' );
 
 
 
 
 
 
 
 
 
 
 
80
  }
81
 
82
 
@@ -129,8 +140,8 @@
129
  'cookies' => array()
130
  )
131
  );
132
-
133
- $response_body = isset( $response["body"] ) ? json_decode( $response["body"], true ) : null;
134
  if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
135
 
136
  }
76
  });
77
  </script>
78
  <?php
79
+
80
+ $deactivate_url =
81
+ add_query_arg(
82
+ array(
83
+ 'action' => 'deactivate',
84
+ 'plugin' => plugin_basename( $wd_options->plugin_main_file ),
85
+ '_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
86
+ ),
87
+ admin_url( 'plugins.php' )
88
+ );
89
+
90
+ require ( $wd_options->wd_dir_templates . '/display_deactivation_popup.php' );
91
  }
92
 
93
 
140
  'cookies' => array()
141
  )
142
  );
143
+
144
+ $response_body = (!is_wp_error($response) && isset( $response["body"] )) ? json_decode( $response["body"], true ) : null;
145
  if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
146
 
147
  }
wd/includes/notices.php CHANGED
@@ -1,96 +1,96 @@
1
  <?php
2
- if ( !defined( 'ABSPATH' ) ) {
3
- exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- class DoradoWebNotices {
7
-
8
- protected $promo_link = '';
9
-
10
- public $config;
11
- public $notice_spam = 0;
12
- public $notice_spam_max = 2;
13
-
14
- // Basic actions to run
15
- public function __construct( $config = array() ) {
16
- $this->config = $config;
17
- // Runs the admin notice ignore function incase a dismiss button has been clicked
18
- add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
19
- // Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
20
- add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
21
- add_action( 'admin_notices', array( $this, 'wd_admin_notices' ) );
22
  }
 
 
23
 
24
- // Checks to ensure notices aren't disabled and the user has the correct permissions.
25
- public function wd_admin_notice() {
26
- $wd_options = $this->config;
27
- $settings = get_option($wd_options->prefix . '_admin_notice');
28
- if ( !isset( $settings['disable_admin_notices'] ) || ( isset( $settings['disable_admin_notices'] ) && $settings['disable_admin_notices'] == 0 ) ) {
29
- if ( current_user_can( 'manage_options' ) ) {
30
- return true;
31
- }
32
- }
33
  return false;
34
  }
35
-
36
- // Primary notice function that can be called from an outside function sending necessary variables
37
- public function admin_notice( $admin_notices ) {
38
- $wd_options = $this->config;
39
- // Check options
40
- if ( !$this->wd_admin_notice() ) {
41
  return false;
42
  }
43
- foreach ( $admin_notices as $slug => $admin_notice ) {
44
- // Call for spam protection
45
- if ( $this->anti_notice_spam() ) {
 
46
  return false;
47
  }
 
48
 
49
- // Check for proper page to display on
50
- if (isset( $admin_notices[$slug]['pages']) && is_array( $admin_notices[$slug]['pages'])) {
51
- if ( !$this->admin_notice_pages( $admin_notices[$slug]['pages'] ) ) {
52
- return false;
53
- }
54
- }
55
 
56
- // Check for required fields
57
- if ( !$this->required_fields( $admin_notices[$slug] ) ) {
58
-
59
- // Get the current date then set start date to either passed value or current date value and add interval
60
- $current_date = current_time( "n/j/Y" );
61
- $start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
62
- $start = date( "n/j/Y", strtotime( $start ) );
63
- $date_array = explode( '/', $start );
64
- $interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
65
-
66
- $date_array[1] += $interval;
67
- $start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
68
-
69
- // This is the main notices storage option
70
- $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
71
- // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
72
- if ( !array_key_exists( $slug, $admin_notices_option ) ) {
73
- $admin_notices_option[$slug]['start'] = $start;
74
- $admin_notices_option[$slug]['int'] = $interval;
75
- update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
76
- }
77
 
78
- // Sanity check to ensure we have accurate information
79
- // New date information will not overwrite old date information
80
- $admin_display_check = ( isset( $admin_notices_option[$slug]['dismissed'] ) ? $admin_notices_option[$slug]['dismissed'] : 0 );
81
- $admin_display_start = ( isset( $admin_notices_option[$slug]['start'] ) ? $admin_notices_option[$slug]['start'] : $start );
82
- $admin_display_interval = ( isset($admin_notices_option[$slug]['int'] ) ? $admin_notices_option[$slug]['int'] : $interval );
83
- $admin_display_msg = ( isset($admin_notices[$slug]['msg'] ) ? $admin_notices[$slug]['msg'] : '' );
84
- $admin_display_title = ( isset($admin_notices[$slug]['title'] ) ? $admin_notices[$slug]['title'] : '' );
85
- $admin_display_link = ( isset( $admin_notices[$slug]['link'] ) ? $admin_notices[$slug]['link'] : '' );
86
- $output_css = false;
87
-
88
- // Ensure the notice hasn't been hidden and that the current date is after the start date
89
- if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date ) ) {
90
-
91
- // Get remaining query string
92
- $query_str = ( isset( $admin_notices[$slug]['later_link'] ) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg( $wd_options->prefix . '_admin_notice_ignore', $slug ) ) );
93
- if ( strpos($slug, 'promo' ) === FALSE ) {
 
 
 
 
 
 
 
 
 
 
 
 
94
  // Admin notice display output
95
  echo '<div class="update-nag wd-admin-notice">
96
  <div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
@@ -99,8 +99,8 @@
99
  <ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
100
  <a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
101
  </div>';
102
- }
103
- else {
104
  echo '<div class="admin-notice-promo">';
105
  echo $admin_display_msg;
106
  echo '<ul class="notice-body-promo blue">
@@ -108,116 +108,116 @@
108
  </ul>';
109
  echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss close-promo"></a>';
110
  echo '</div>';
111
- }
112
- $this->notice_spam += 1;
113
- $output_css = true;
114
- }
115
- if ( $output_css ) {
116
- wp_enqueue_style( $wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version" ) );
117
  }
 
 
 
 
 
118
  }
119
  }
120
  }
 
121
 
122
- // Spam protection check
123
- public function anti_notice_spam() {
124
- if ( $this->notice_spam >= $this->notice_spam_max ) {
125
- return true;
126
- }
127
- return false;
128
  }
 
 
129
 
130
- // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
131
- public function admin_notice_ignore() {
132
- $wd_options = $this->config;
133
- // If user clicks to ignore the notice, update the option to not show it again
134
- if ( isset( $_GET[$wd_options->prefix . '_admin_notice_ignore'] ) ) {
135
- $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
136
- $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
137
- update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
138
- $query_str = remove_query_arg( $wd_options->prefix . '_admin_notice_ignore' );
139
- wp_redirect( $query_str );
140
- exit;
141
- }
142
  }
 
143
 
144
- // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
145
- public function admin_notice_temp_ignore() {
146
- $wd_options = $this->config;
147
- // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
148
- if ( isset( $_GET[$wd_options->prefix . '_admin_notice_temp_ignore'] ) ) {
149
- $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
150
- $current_date = current_time( "n/j/Y" );
151
- $date_array = explode( '/', $current_date );
152
- $interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
153
- $date_array[1] += $interval;
154
- $new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
155
-
156
- $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
157
- $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
158
- update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
159
- $query_str = remove_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ) );
160
- wp_redirect( $query_str );
161
- exit;
162
- }
163
  }
 
164
 
165
- public function admin_notice_pages($pages) {
166
- $wd_options = $this->config;
167
- foreach ( $pages as $key => $page ) {
168
- if (is_array($page)) {
169
- if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1] ) {
170
- return true;
171
- }
172
- }
173
- else {
174
- if ( $page == 'all' ) {
175
- return true;
176
- }
177
- if ( get_current_screen()->id === $page ) {
178
- return true;
179
- }
180
- if ( isset($_GET['page']) && $_GET['page'] == $page ) {
181
- return true;
182
- }
183
  }
184
- return false;
185
  }
186
- }
187
-
188
- // Required fields check
189
- public function required_fields( $fields ) {
190
- if ( !isset( $fields['msg'] ) || ( isset($fields['msg'] ) && empty( $fields['msg'] ) ) ) {
191
- return true;
192
- }
193
- if ( !isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
194
- return true;
 
195
  }
196
  return false;
197
  }
 
198
 
199
- // Special parameters function that is to be used in any extension of this class
200
- public function special_parameters($admin_notices) {
201
- // Intentionally left blank
 
 
 
 
202
  }
 
 
203
 
204
- public function wd_admin_notices() {
205
- $wd_options = $this->config;
206
- $two_week_review_ignore = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'two_week_review' ) );
207
- $two_week_review_temp = add_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14 ) );
208
- $promo_close = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo' ) );
209
 
210
- $notices['two_week_review'] = array(
211
- 'title' => __('Leave A Review?', $wd_options->prefix),
212
- 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
213
- 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/view/plugin-reviews/' . $wd_options->plugin_wordpress_slug . '?filter=5" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
 
 
 
 
 
 
214
  <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
215
  <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
216
  <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
217
- 'later_link' => $two_week_review_temp,
218
- 'int' => 14
219
- );
220
-
221
- $this->admin_notice($notices);
222
- }
223
  }
 
1
  <?php
2
+ if ( !defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ class DoradoWebNotices {
7
+
8
+ protected $promo_link = '';
9
+
10
+ public $config;
11
+ public $notice_spam = 0;
12
+ public $notice_spam_max = 2;
13
+
14
+ // Basic actions to run
15
+ public function __construct( $config = array() ) {
16
+ $this->config = $config;
17
+ // Runs the admin notice ignore function incase a dismiss button has been clicked
18
+ add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
19
+ // Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
20
+ add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
21
+ add_action( 'admin_notices', array( $this, 'wd_admin_notices' ) );
22
  }
23
 
24
+ // Checks to ensure notices aren't disabled and the user has the correct permissions.
25
+ public function wd_admin_notice() {
26
+ $wd_options = $this->config;
27
+ $settings = get_option($wd_options->prefix . '_admin_notice');
28
+ if ( !isset( $settings['disable_admin_notices'] ) || ( isset( $settings['disable_admin_notices'] ) && $settings['disable_admin_notices'] == 0 ) ) {
29
+ if ( current_user_can( 'manage_options' ) ) {
30
+ return true;
31
+ }
 
 
 
 
 
 
 
 
32
  }
33
+ return false;
34
+ }
35
 
36
+ // Primary notice function that can be called from an outside function sending necessary variables
37
+ public function admin_notice( $admin_notices ) {
38
+ $wd_options = $this->config;
39
+ // Check options
40
+ if ( !$this->wd_admin_notice() ) {
 
 
 
 
41
  return false;
42
  }
43
+ foreach ( $admin_notices as $slug => $admin_notice ) {
44
+ // Call for spam protection
45
+ if ( $this->anti_notice_spam() ) {
 
 
 
46
  return false;
47
  }
48
+
49
+ // Check for proper page to display on
50
+ if (isset( $admin_notices[$slug]['pages']) && is_array( $admin_notices[$slug]['pages'])) {
51
+ if ( !$this->admin_notice_pages( $admin_notices[$slug]['pages'] ) ) {
52
  return false;
53
  }
54
+ }
55
 
56
+ // Check for required fields
57
+ if ( !$this->required_fields( $admin_notices[$slug] ) ) {
 
 
 
 
58
 
59
+ // Get the current date then set start date to either passed value or current date value and add interval
60
+ $current_date = current_time( "n/j/Y" );
61
+ $start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
62
+ $start = date( "n/j/Y", strtotime( $start ) );
63
+ $date_array = explode( '/', $start );
64
+ $interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
+ $date_array[1] += $interval;
67
+ $start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
68
+
69
+ // This is the main notices storage option
70
+ $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
71
+ // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
72
+ if ( !array_key_exists( $slug, $admin_notices_option ) ) {
73
+ $admin_notices_option[$slug]['start'] = $start;
74
+ $admin_notices_option[$slug]['int'] = $interval;
75
+ update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
76
+ }
77
+
78
+ // Sanity check to ensure we have accurate information
79
+ // New date information will not overwrite old date information
80
+ $admin_display_check = ( isset( $admin_notices_option[$slug]['dismissed'] ) ? $admin_notices_option[$slug]['dismissed'] : 0 );
81
+ $admin_display_start = ( isset( $admin_notices_option[$slug]['start'] ) ? $admin_notices_option[$slug]['start'] : $start );
82
+ $admin_display_interval = ( isset($admin_notices_option[$slug]['int'] ) ? $admin_notices_option[$slug]['int'] : $interval );
83
+ $admin_display_msg = ( isset($admin_notices[$slug]['msg'] ) ? $admin_notices[$slug]['msg'] : '' );
84
+ $admin_display_title = ( isset($admin_notices[$slug]['title'] ) ? $admin_notices[$slug]['title'] : '' );
85
+ $admin_display_link = ( isset( $admin_notices[$slug]['link'] ) ? $admin_notices[$slug]['link'] : '' );
86
+ $output_css = false;
87
+
88
+ // Ensure the notice hasn't been hidden and that the current date is after the start date
89
+ if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date ) ) {
90
+
91
+ // Get remaining query string
92
+ $query_str = ( isset( $admin_notices[$slug]['later_link'] ) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg( $wd_options->prefix . '_admin_notice_ignore', $slug ) ) );
93
+ if ( strpos($slug, 'promo' ) === FALSE ) {
94
  // Admin notice display output
95
  echo '<div class="update-nag wd-admin-notice">
96
  <div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
99
  <ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
100
  <a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
101
  </div>';
102
+ }
103
+ else {
104
  echo '<div class="admin-notice-promo">';
105
  echo $admin_display_msg;
106
  echo '<ul class="notice-body-promo blue">
108
  </ul>';
109
  echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss close-promo"></a>';
110
  echo '</div>';
 
 
 
 
 
 
111
  }
112
+ $this->notice_spam += 1;
113
+ $output_css = true;
114
+ }
115
+ if ( $output_css ) {
116
+ wp_enqueue_style( $wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version" ) );
117
  }
118
  }
119
  }
120
+ }
121
 
122
+ // Spam protection check
123
+ public function anti_notice_spam() {
124
+ if ( $this->notice_spam >= $this->notice_spam_max ) {
125
+ return true;
 
 
126
  }
127
+ return false;
128
+ }
129
 
130
+ // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
131
+ public function admin_notice_ignore() {
132
+ $wd_options = $this->config;
133
+ // If user clicks to ignore the notice, update the option to not show it again
134
+ if ( isset( $_GET[$wd_options->prefix . '_admin_notice_ignore'] ) ) {
135
+ $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
136
+ $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
137
+ update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
138
+ $query_str = remove_query_arg( $wd_options->prefix . '_admin_notice_ignore' );
139
+ wp_redirect( $query_str );
140
+ exit;
 
141
  }
142
+ }
143
 
144
+ // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
145
+ public function admin_notice_temp_ignore() {
146
+ $wd_options = $this->config;
147
+ // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
148
+ if ( isset( $_GET[$wd_options->prefix . '_admin_notice_temp_ignore'] ) ) {
149
+ $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
150
+ $current_date = current_time( "n/j/Y" );
151
+ $date_array = explode( '/', $current_date );
152
+ $interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
153
+ $date_array[1] += $interval;
154
+ $new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
155
+
156
+ $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
157
+ $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
158
+ update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
159
+ $query_str = remove_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ) );
160
+ wp_redirect( $query_str );
161
+ exit;
 
162
  }
163
+ }
164
 
165
+ public function admin_notice_pages($pages) {
166
+ $wd_options = $this->config;
167
+ foreach ( $pages as $key => $page ) {
168
+ if (is_array($page)) {
169
+ if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1] ) {
170
+ return true;
 
 
 
 
 
 
 
 
 
 
 
 
171
  }
 
172
  }
173
+ else {
174
+ if ( $page == 'all' ) {
175
+ return true;
176
+ }
177
+ if ( get_current_screen()->id === $page ) {
178
+ return true;
179
+ }
180
+ if ( isset($_GET['page']) && $_GET['page'] == $page ) {
181
+ return true;
182
+ }
183
  }
184
  return false;
185
  }
186
+ }
187
 
188
+ // Required fields check
189
+ public function required_fields( $fields ) {
190
+ if ( !isset( $fields['msg'] ) || ( isset($fields['msg'] ) && empty( $fields['msg'] ) ) ) {
191
+ return true;
192
+ }
193
+ if ( !isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
194
+ return true;
195
  }
196
+ return false;
197
+ }
198
 
199
+ // Special parameters function that is to be used in any extension of this class
200
+ public function special_parameters($admin_notices) {
201
+ // Intentionally left blank
202
+ }
 
203
 
204
+ public function wd_admin_notices() {
205
+ $wd_options = $this->config;
206
+ $two_week_review_ignore = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'two_week_review' ) );
207
+ $two_week_review_temp = add_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14 ) );
208
+ $promo_close = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo' ) );
209
+
210
+ $notices['two_week_review'] = array(
211
+ 'title' => __('Leave A Review?', $wd_options->prefix),
212
+ 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
213
+ 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug . '/reviews?filter=5&rate=5#new-post" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
214
  <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
215
  <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
216
  <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
217
+ 'later_link' => $two_week_review_temp,
218
+ 'int' => 14
219
+ );
220
+
221
+ $this->admin_notice($notices);
 
222
  }
223
+ }
wd/includes/overview.php CHANGED
@@ -58,6 +58,14 @@
58
  public function display_overview_page(){
59
  $wd_options = $this->config;
60
  $tabs = $this->tabs;
 
 
 
 
 
 
 
 
61
  require_once( $wd_options->wd_dir_templates . "/display_overview.php" );
62
  }
63
  public function wd_overview_welcome(){
@@ -120,7 +128,8 @@
120
  unset($plugins[$wd_options->plugin_wordpress_slug]) ;
121
 
122
  // foreach ( $plugins as $wp_slug => &$plugin ){
123
- // $wp_data = $this->remote_get($wp_slug);
 
124
  // $plugin["downloaded"] = $wp_data["downloaded"];
125
  // $plugin["rating"] = $wp_data["rating"];
126
  // }
@@ -167,13 +176,6 @@
167
  if ( empty( $sql_mode ) )
168
  $sql_mode = __( 'Not set', $wd_options->prefix );
169
  $server_info["SQL Mode"] = $sql_mode;
170
-
171
- // Get PHP Safe Mode
172
- if( ini_get( 'safe_mode' ) )
173
- $safe_mode = __( 'On', $wd_options->prefix );
174
- else
175
- $safe_mode = __( 'Off', $wd_options->prefix );
176
- $server_info["PHP Safe Mode"] = $safe_mode;
177
 
178
  // Get PHP allow_url_fopen
179
  if( ini_get( 'allow_url_fopen' ) )
58
  public function display_overview_page(){
59
  $wd_options = $this->config;
60
  $tabs = $this->tabs;
61
+ $start_using_url = "";
62
+ if(!empty($this->config->custom_post)) {
63
+ if (strpos($this->config->custom_post, 'post_type', 0) !== false) {
64
+ $start_using_url = admin_url($this->config->custom_post);
65
+ } else {
66
+ $start_using_url = menu_page_url($this->config->custom_post, false);
67
+ }
68
+ }
69
  require_once( $wd_options->wd_dir_templates . "/display_overview.php" );
70
  }
71
  public function wd_overview_welcome(){
128
  unset($plugins[$wd_options->plugin_wordpress_slug]) ;
129
 
130
  // foreach ( $plugins as $wp_slug => &$plugin ){
131
+ // $wp_data = $this->
132
+ //remote_get($wp_slug);
133
  // $plugin["downloaded"] = $wp_data["downloaded"];
134
  // $plugin["rating"] = $wp_data["rating"];
135
  // }
176
  if ( empty( $sql_mode ) )
177
  $sql_mode = __( 'Not set', $wd_options->prefix );
178
  $server_info["SQL Mode"] = $sql_mode;
 
 
 
 
 
 
 
179
 
180
  // Get PHP allow_url_fopen
181
  if( ini_get( 'allow_url_fopen' ) )
wd/includes/subscribe.php CHANGED
@@ -108,7 +108,7 @@
108
  )
109
  );
110
 
111
- $response_body = isset( $response["body"] ) ? json_decode( $response["body"], true ) : null;
112
 
113
  if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
114
 
108
  )
109
  );
110
 
111
+ $response_body = (!is_wp_error($response) && isset( $response["body"] )) ? json_decode( $response["body"], true ) : null;
112
 
113
  if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
114
 
wd/templates/display_deactivation_popup.php CHANGED
@@ -1,28 +1,27 @@
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 serve you better", $wd_options->prefix ); ?>:
9
- </div>
10
-
11
- <div class="wd-deactivate-popup-body">
12
- <?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
13
- <div class="wd-<?php echo $wd_options->prefix; ?>-reasons">
14
- <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" >
15
- <label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"];?></label>
16
- </div>
17
- <?php } ?>
18
- <div class="<?php echo $wd_options->prefix; ?>_additional_details_wrap"></div>
19
- </div>
20
- <div class="wd-btns">
21
- <a href="#" data-val="1" class="button button-secondary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Deactivate" , $wd_options->prefix ); ?></a>
22
- <a href="#" data-val="2" class="button button-secondary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-submit-and-deactivate" style="display:none;"><?php _e( "Submit and deactivate" , $wd_options->prefix ); ?></a>
23
- <a href="#" class="button button-primary wd-<?php echo $wd_options->prefix; ?>-cancel"><?php _e( "Cancel" , $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'); ?>
27
- </form>
28
- </div>
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 serve you better (Optional)", $wd_options->prefix ); ?>:
9
  </div>
10
+
11
+ <div class="wd-deactivate-popup-body">
12
+ <?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
13
+ <div class="wd-<?php echo $wd_options->prefix; ?>-reasons">
14
+ <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" >
15
+ <label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"];?></label>
16
+ </div>
17
+ <?php } ?>
18
+ <div class="<?php echo $wd_options->prefix; ?>_additional_details_wrap"></div>
19
+ </div>
20
+ <div class="wd-btns">
21
+ <a href="<?php echo $deactivate_url; ?>" data-val="1" class="button button-primary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Skip and Deactivate" , $wd_options->prefix ); ?></a>
22
+ <a href="<?php echo $deactivate_url; ?>" data-val="2" class="button button-primary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-submit-and-deactivate" style="display:none;"><?php _e( "Submit and Deactivate" , $wd_options->prefix ); ?></a>
23
+ </div>
24
+ <input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="" >
25
+ <?php wp_nonce_field( $wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
26
+ </form>
27
+ </div>
 
 
 
 
 
wd/templates/display_overview.php CHANGED
@@ -1,33 +1,43 @@
1
  <div class="overview_welcome">
2
- <div class="wd-cell wd-valign-middle">
3
- <a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"><img src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>"></a>
4
- </div>
5
- <div class="wd-cell wd-valign-middle">
6
- <h2><?php echo sprintf( __( "Welcome to %s", $wd_options->prefix ), $wd_options->plugin_title ); ?></h2>
7
- <div class="overview_welcome_text">
8
- <div><?php echo sprintf( __( "CONGRATS! You've successfully installed %s WordPress plugin.", $wd_options->prefix ), $wd_options->plugin_title ) ; ?></div>
9
- <div><?php echo $wd_options->description ; ?></div>
10
- </div>
11
- </div>
 
 
 
 
 
 
 
 
12
  </div>
13
  <div class="overview_wrap">
14
- <ul class="overview_tabs">
15
- <?php
16
- foreach ( $tabs as $tab_key => $tab ) {
17
- $href = $tab['view'] !== false ? "#" . $tab_key : $tab_key;
18
- $target = $tab['view'] == false ? 'target="_blank" class="not_tab"' : '';
19
- $overview_tab_active_class = $tab_key == 'welcome' ? 'class="overview_tab_active"' : ''
20
- ?>
21
- <li class=""><a href="<?php echo $href; ?>" <?php echo $overview_tab_active_class; ?> <?php echo $target; ?>><?php echo esc_html( $tab['name'] ); ?></a></li>
22
- <?php } ?>
23
- </ul>
24
- <div class="overview_content">
25
- <?php
26
- foreach ( $tabs as $tab_key => $tab ) {
27
- if( $tab['view'] !== false ){
28
- echo call_user_func( $tab['view'] );
29
- }
30
- }
31
- ?>
32
- </div>
 
 
33
  </div>
1
  <div class="overview_welcome">
2
+ <div class="wd-cell wd-valign-middle">
3
+ <a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"><img
4
+ src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>"></a>
5
+ </div>
6
+ <div class="wd-cell wd-valign-middle">
7
+
8
+ <h2><?php echo sprintf(__("Welcome to %s", $wd_options->prefix), $wd_options->plugin_title); ?> <?php if (!empty($start_using_url)) { ?>
9
+ <div class="wd-start-using-button">
10
+ <a href="<?php echo $start_using_url; ?>" class="button button-primary button-large">Start using</a>
11
+ </div>
12
+ <?php } ?></h2>
13
+
14
+ <div class="overview_welcome_text">
15
+
16
+ <div><?php echo sprintf(__("CONGRATS! You've successfully installed %s WordPress plugin.", $wd_options->prefix), $wd_options->plugin_title); ?></div>
17
+ <div><?php echo $wd_options->description; ?></div>
18
+ </div>
19
+ </div>
20
  </div>
21
  <div class="overview_wrap">
22
+ <ul class="overview_tabs">
23
+ <?php
24
+ foreach ($tabs as $tab_key => $tab) {
25
+ $href = $tab['view'] !== false ? "#" . $tab_key : $tab_key;
26
+ $target = $tab['view'] == false ? 'target="_blank" class="not_tab"' : '';
27
+ $overview_tab_active_class = $tab_key == 'welcome' ? 'class="overview_tab_active"' : ''
28
+ ?>
29
+ <li class=""><a
30
+ href="<?php echo $href; ?>" <?php echo $overview_tab_active_class; ?> <?php echo $target; ?>><?php echo esc_html($tab['name']); ?></a>
31
+ </li>
32
+ <?php } ?>
33
+ </ul>
34
+ <div class="overview_content">
35
+ <?php
36
+ foreach ($tabs as $tab_key => $tab) {
37
+ if ($tab['view'] !== false) {
38
+ echo call_user_func($tab['view']);
39
+ }
40
+ }
41
+ ?>
42
+ </div>
43
  </div>
wd/templates/display_overview_deals.php CHANGED
@@ -31,13 +31,6 @@
31
  <div class="deal_desc">
32
  <p><?php echo $plugin["content"]; ?></p>
33
  <div class="deal_desc_footer">
34
- <!--<div class="downloads">
35
- <div class="rating" data-rating="<?php echo $plugin["rating"]; ?>"></div>
36
- <div class="spans">
37
- <span><?php _e( "Downloads", $wd_options->prefix ); ?></span>
38
- <span><?php echo number_format($plugin["downloaded"], 0); ?></span>
39
- </div>
40
- </div>-->
41
  <div class="download_btn">
42
  <a href="<?php echo $plugin["href"]; ?>" target="_blank" ><?php _e( "Download", $wd_options->prefix ); ?></a>
43
  </div>
31
  <div class="deal_desc">
32
  <p><?php echo $plugin["content"]; ?></p>
33
  <div class="deal_desc_footer">
 
 
 
 
 
 
 
34
  <div class="download_btn">
35
  <a href="<?php echo $plugin["href"]; ?>" target="_blank" ><?php _e( "Download", $wd_options->prefix ); ?></a>
36
  </div>
wd/wd.php CHANGED
@@ -17,7 +17,7 @@
17
  public $overview_instance;
18
  public $subscribe_instance;
19
  public $config;
20
- private $version = "1.0.2";
21
 
22
  ////////////////////////////////////////////////////////////////////////////////////////
23
  // Constructor & Destructor //
@@ -125,7 +125,17 @@
125
 
126
  public function change_deactivation_link ( $links ) {
127
  $wd_options = $this->config;
128
- $links["deactivate"] = '<a href="#" class="' . $wd_options->prefix . '_deactivate_link">Deactivate</a>';
 
 
 
 
 
 
 
 
 
 
129
  return $links;
130
  }
131
 
17
  public $overview_instance;
18
  public $subscribe_instance;
19
  public $config;
20
+ private $version = "1.0.13";
21
 
22
  ////////////////////////////////////////////////////////////////////////////////////////
23
  // Constructor & Destructor //
125
 
126
  public function change_deactivation_link ( $links ) {
127
  $wd_options = $this->config;
128
+ $deactivate_url =
129
+ add_query_arg(
130
+ array(
131
+ 'action' => 'deactivate',
132
+ 'plugin' => plugin_basename( $wd_options->plugin_main_file ),
133
+ '_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
134
+ ),
135
+ admin_url( 'plugins.php' )
136
+ );
137
+
138
+ $links["deactivate"] = '<a href="'.$deactivate_url.'" class="' . $wd_options->prefix . '_deactivate_link">Deactivate</a>';
139
  return $links;
140
  }
141