Contact Form Email - Version 1.2.43

Version Description

  • New admin notices
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Contact Form Email
Version 1.2.43
Comparing to
See all releases

Code changes from version 1.2.42 to 1.2.43

Files changed (4) hide show
  1. README.txt +5 -2
  2. bannerdk.php +111 -0
  3. form-to-email.php +4 -1
  4. images/form-builder-th.png +0 -0
README.txt CHANGED
@@ -448,6 +448,9 @@ When you click a field already added into the contact form builder area, you can
448
 
449
  == Changelog ==
450
 
 
 
 
451
  = 1.2.42 =
452
  * Update to avoid issues with ASP extensions
453
 
@@ -881,5 +884,5 @@ When you click a field already added into the contact form builder area, you can
881
 
882
  == Upgrade Notice ==
883
 
884
- = 1.2.42 =
885
- * Update to avoid issues with ASP extensions
448
 
449
  == Changelog ==
450
 
451
+ = 1.2.43 =
452
+ * New admin notices
453
+
454
  = 1.2.42 =
455
  * Update to avoid issues with ASP extensions
456
 
884
 
885
  == Upgrade Notice ==
886
 
887
+ = 1.2.43 =
888
+ * New admin notices
bannerdk.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $codepeople_cftedk_banner_plugins;
3
+ if(empty($codepeople_cftedk_banner_plugins)) $codepeople_cftedk_banner_plugins = array();
4
+ if(!function_exists( 'codepeople_add_promotecftedk_banner' ))
5
+ {
6
+ function codepeople_add_promotecftedk_banner($wp_admin_bar)
7
+ {
8
+ global $codepeople_cftedk_banner_plugins;
9
+
10
+ if( empty($codepeople_cftedk_banner_plugins) || !is_admin() ) return;
11
+
12
+ // Take action over the banner
13
+ if(isset($_POST['codepeople_cftedk_banner_nonce']) && wp_verify_nonce($_POST['codepeople_cftedk_banner_nonce'], __FILE__))
14
+ {
15
+ if(
16
+ !empty($_POST['codepeople_cftedk_banner_plugin']) &&
17
+ !empty($codepeople_cftedk_banner_plugins[$_POST['codepeople_cftedk_banner_plugin']])
18
+ )
19
+ {
20
+ set_transient( 'codepeople_cftedk_banner_'.$_POST['codepeople_cftedk_banner_plugin'], -1, 0);
21
+ if(
22
+ !empty($_POST['codepeople_cftedk_banner_action']) &&
23
+ $_POST['codepeople_cftedk_banner_action'] == 'set-review' &&
24
+ !empty($codepeople_cftedk_banner_plugins[$_POST['codepeople_cftedk_banner_plugin']]['plugin_url'])
25
+ )
26
+ {
27
+ print '<script>document.location.href="'.esc_js($codepeople_cftedk_banner_plugins[$_POST['codepeople_cftedk_banner_plugin']]['plugin_url']).'";</script>';
28
+ }
29
+ }
30
+ }
31
+
32
+ $minimum_days = 86400*1; // 1 days after review
33
+ $now = time();
34
+
35
+ foreach($codepeople_cftedk_banner_plugins as $plugin_slug => $plugin_data )
36
+ {
37
+
38
+ $valuePromo = get_transient( 'codepeople_promote_banner_'.$plugin_slug );
39
+ if( $valuePromo === false || $valuePromo > 0) // display only after review answer
40
+ {
41
+ return;
42
+ }
43
+
44
+ $value = get_transient( 'codepeople_cftedk_banner_'.$plugin_slug );
45
+ if( $value === false )
46
+ {
47
+ $value = $now;
48
+ set_transient( 'codepeople_cftedk_banner_'.$plugin_slug, $value, 0 );
49
+ }
50
+
51
+ if($minimum_days <= abs($now-$value) && 0<$value)
52
+ {
53
+ ?>
54
+ <style>
55
+ #codepeople-cftedkreview-banner{width:calc( 100% - 20px );width:-webkit-calc( 100% - 20px );width:-moz-calc( 100% - 20px );width:-o-calc( 100% - 20px );margin-top:5px;border:10px solid #008a15;background:#FFF;display:table;}
56
+ #codepeople-cftedkreview-banner form{float:left; padding:0 5px;}
57
+ #codepeople-cftedkreview-banner .codepeople-cftedkreview-banner-picture{width:120px;padding:10px 10px 10px 10px;float:left;text-align:center;}
58
+ #codepeople-cftedkreview-banner .codepeople-cftedkreview-banner-content{float: left;padding:10px;width: calc( 100% - 160px );width: -webkit-calc( 100% - 160px );width: -moz-calc( 100% - 160px );width: -o-calc( 100% - 160px );}
59
+ #codepeople-cftedkreview-banner .codepeople-cftedkreview-banner-buttons{padding-top:20px;}
60
+ #codepeople-cftedkreview-banner .no-thank-button,
61
+ #codepeople-cftedkreview-banner .main-button{height: 28px;border-width:1px;border-style:solid;border-radius:5px;text-decoration: none;}
62
+ #codepeople-cftedkreview-banner .main-button{background: #00ba15;border-color: #009a15 #008a15 #008a15;-webkit-box-shadow: 0 1px 0 #006799;box-shadow: 0 1px 0 #006799;color: #fff;text-decoration: none;text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799;}
63
+ #codepeople-cftedkreview-banner .no-thank-button {color: #555;border-color: #cccccc;background: #f7f7f7;-webkit-box-shadow: 0 1px 0 #cccccc;box-shadow: 0 1px 0 #cccccc;vertical-align: top;}
64
+ #codepeople-cftedkreview-banner .main-button:hover,#codepeople-cftedkreview-banner .main-button:focus{background: #00be15;border-color: #008a15;color: #fff;}
65
+ #codepeople-cftedkreview-banner .no-thank-button:hover,
66
+ #codepeople-cftedkreview-banner .no-thank-button:focus{background: #fafafa;border-color: #999;color: #23282d;}
67
+ @media screen AND (max-width:760px)
68
+ {
69
+ #codepeople-cftedkreview-banner{position:relative;top:50px;}
70
+ #codepeople-cftedkreview-banner .codepeople-cftedkreview-banner-picture{display:none;}
71
+ #codepeople-cftedkreview-banner .codepeople-cftedkreview-banner-content{width:calc( 100% - 20px );width:-webkit-calc( 100% - 20px );width:-moz-calc( 100% - 20px );width:-o-calc( 100% - 20px );}
72
+ }
73
+ </style>
74
+ <div id="codepeople-cftedkreview-banner">
75
+ <div class="codepeople-cftedkreview-banner-picture">
76
+ <img alt="" src="<?php echo plugins_url('', __FILE__); ?>/images/form-builder-th.png" style="width:120px;border:1px dotted black;padding:1px;">
77
+ </div>
78
+ <div class="codepeople-cftedkreview-banner-content">
79
+ <div class="codepeople-cftedkreview-banner-text">
80
+ <p><strong>Want to upgrade to a full featured version of the <span style="color:#1582AB;font-weight:bold;">"<?php print $plugin_data[ 'plugin_name' ]; ?>"</span> plugin with a huge discount?</strong>
81
+ </p><p>With the commercial versions you get a fully functional Visual Form Builder, premium support service and a lot more of features.
82
+ </p><p>For a limited time you have this <strong>personal invitation</strong> to
83
+ upgrade to any of the commercial versions with a <span style="color:#1582AB;font-weight:bold;">25% discount</span>. Thank you!</p>
84
+ </div>
85
+ <div class="codepeople-cftedkreview-banner-buttons">
86
+ <form method="post" target="_blank">
87
+ <button class="main-button" onclick="jQuery(this).closest('[id=\'codepeople-cftedkreview-banner\']').hide();">Yes, Upgrade with a 25% Discount</button>
88
+ <input type="hidden" name="codepeople_cftedk_banner_plugin" value="<?php echo esc_attr($plugin_slug); ?>" />
89
+ <input type="hidden" name="codepeople_cftedk_banner_action" value="set-review" />
90
+ <input type="hidden" name="codepeople_cftedk_banner_nonce" value="<?php echo wp_create_nonce(__FILE__); ?>" />
91
+ </form>
92
+ <form method="post">
93
+ <button class="no-thank-button">No Thanks, don't want to see this message again.</button>
94
+ <input type="hidden" name="codepeople_cftedk_banner_plugin" value="<?php echo esc_attr($plugin_slug); ?>" />
95
+ <input type="hidden" name="codepeople_cftedk_banner_action" value="not-thanks" />
96
+ <input type="hidden" name="codepeople_cftedk_banner_nonce" value="<?php echo wp_create_nonce(__FILE__); ?>" />
97
+ </form>
98
+ <div style="clear:both;display:block;"></div>
99
+ </div>
100
+ <div style="clear:both;"></div>
101
+ </div>
102
+ <div style="clear:both;"></div>
103
+ </div>
104
+ <?php
105
+ return;
106
+ }
107
+ }
108
+ }
109
+ add_action( 'admin_bar_menu', 'codepeople_add_promotecftedk_banner' );
110
+ } // End codepeople_promote_banner block
111
+ ?>
form-to-email.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Contact Form Email
4
  Plugin URI: https://form2email.dwbooster.com/download
5
  Description: Contact form that sends the data to email and also to a database list and CSV file.
6
- Version: 1.2.42
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
@@ -81,5 +81,8 @@ if ( is_admin() ) {
81
  $codepeople_promote_banner_plugins[ 'contact-form-to-email' ] = array( 'plugin_name' => 'Contact Form Email', 'plugin_url' => 'https://wordpress.org/support/plugin/contact-form-to-email/reviews/#new-post');
82
  require_once 'banner.php';
83
 
 
 
 
84
 
85
  ?>
3
  Plugin Name: Contact Form Email
4
  Plugin URI: https://form2email.dwbooster.com/download
5
  Description: Contact form that sends the data to email and also to a database list and CSV file.
6
+ Version: 1.2.43
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
81
  $codepeople_promote_banner_plugins[ 'contact-form-to-email' ] = array( 'plugin_name' => 'Contact Form Email', 'plugin_url' => 'https://wordpress.org/support/plugin/contact-form-to-email/reviews/#new-post');
82
  require_once 'banner.php';
83
 
84
+ $codepeople_cftedk_banner_plugins[ 'contact-form-to-email' ] = array( 'plugin_name' => 'Contact Form Email', 'plugin_url' => 'https://form2email.dwbooster.com/download?dk='.md5(date("Y-m-d")."locomp25"));
85
+ require_once 'bannerdk.php';
86
+
87
 
88
  ?>
images/form-builder-th.png ADDED
Binary file