Custom Contact Forms - Version 6.9.1

Version Description

Download this release

Release Info

Developer tlovett1
Plugin Icon 128x128 Custom Contact Forms
Version 6.9.1
Comparing to
See all releases

Code changes from version 6.9.0 to 6.9.1

bin/production-ready.sh ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+
3
+ echo "Are you sure you want to do this? Uncommitted work could be lost. [y/n]"
4
+ read input_variable
5
+
6
+ if [ "$input_variable" == "y" ]; then
7
+ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
8
+
9
+ cd "$DIR/../"
10
+
11
+ rm bin/install-wp-tests.sh > /dev/null 2>&1
12
+
13
+ rm -rf bower_components > /dev/null 2>&1
14
+ rm -rf node_modules > /dev/null 2>&1
15
+ rm -rf scss > /dev/null 2>&1
16
+ rm -rf tests > /dev/null 2>&1
17
+ rm -rf .sass-cache > /dev/null 2>&1
18
+ rm -rf vendor/wp-api/wp-api/.git > /dev/null 2>&1
19
+
20
+ rm .travis.yml > /dev/null 2>&1
21
+ rm Gruntfile.js > /dev/null 2>&1
22
+ rm Dockunit.json > /dev/null 2>&1
23
+ rm phpunit.xml > /dev/null 2>&1
24
+ rm .jshintrc > /dev/null 2>&1
25
+
26
+ bower install --production > /dev/null 2>&1
27
+
28
+ echo "Done! Custom Contact Forms is cleaned up and production ready."
29
+ fi
build/css/admin.css CHANGED
@@ -16,4 +16,11 @@
16
  cursor: pointer;
17
  -webkit-font-smoothing: antialiased; }
18
 
 
 
 
 
 
 
 
19
  /*# sourceMappingURL=admin.css.map */
16
  cursor: pointer;
17
  -webkit-font-smoothing: antialiased; }
18
 
19
+ .ccf-hosting-offer ul {
20
+ list-style-type: disc;
21
+ margin-left: 30px; }
22
+
23
+ .ccf-hosting-offer input[type="text"] {
24
+ margin-right: 20px; }
25
+
26
  /*# sourceMappingURL=admin.css.map */
build/css/admin.css.map CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "version": 3,
3
- "mappings": ";AAAA,UASC;EARA,WAAW,EAAE,MAAM;EACnB,GAAG,EAAC,2BAA2B;EAC/B,GAAG,EAAC,mNAA8D;EAIlE,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAIlB,0CAAsB;EACrB,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,GAAG;EACZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,OAAO;EACf,sBAAsB,EAAE,WAAW",
4
  "sources": ["../../scss/admin.scss"],
5
  "names": [],
6
  "file": "admin.css"
1
  {
2
  "version": 3,
3
+ "mappings": ";AAAA,UASC;EARA,WAAW,EAAE,MAAM;EACnB,GAAG,EAAC,2BAA2B;EAC/B,GAAG,EAAC,mNAA8D;EAIlE,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAIlB,0CAAsB;EACrB,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,GAAG;EACZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,OAAO;EACf,sBAAsB,EAAE,WAAW;;AAQrC,qBAAsB;EACrB,eAAe,EAAE,IAAI;EACrB,WAAW,EAAE,IAAI;;AAGlB,qCAAsC;EACrC,YAAY,EAAE,IAAI",
4
  "sources": ["../../scss/admin.scss"],
5
  "names": [],
6
  "file": "admin.css"
build/css/admin.min.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";@font-face{font-family:menu;src:url(../../fonts/menu.eot);src:url(../../fonts/menu.eot?#iefix) format("embedded-opentype"),url(../../fonts/menu.woff) format("woff"),url(../../fonts/menu.ttf) format("truetype"),url(../../fonts/menu.svg#form-manager) format("svg");font-weight:400;font-style:normal}#menu-posts-ccf_form .wp-menu-image:before{font-family:menu;content:"";speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}
1
+ @charset "UTF-8";@font-face{font-family:menu;src:url(../../fonts/menu.eot);src:url(../../fonts/menu.eot?#iefix) format("embedded-opentype"),url(../../fonts/menu.woff) format("woff"),url(../../fonts/menu.ttf) format("truetype"),url(../../fonts/menu.svg#form-manager) format("svg");font-weight:400;font-style:normal}#menu-posts-ccf_form .wp-menu-image:before{font-family:menu;content:"";speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-hosting-offer ul{list-style-type:disc;margin-left:30px}.ccf-hosting-offer input[type=text]{margin-right:20px}
classes/class-ccf-ads.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CCF_Ads {
4
+
5
+ /**
6
+ * Setup ads
7
+ *
8
+ * @since 6.9.1
9
+ */
10
+ public function setup() {
11
+ add_action( 'admin_notices', array( $this, 'ad_nag' ) );
12
+ add_action( 'init', array( $this, 'hide_ads' ) );
13
+ }
14
+
15
+ public function hide_ads() {
16
+ if ( ! empty( $_POST['ccf_hide_ads'] ) ) {
17
+ update_option( 'ccf_hide_ads', true );
18
+ } elseif ( ! empty( $_POST['ccf_hosting_signup'] ) && ! empty( $_POST['email'] ) ) {
19
+
20
+ $payload = array(
21
+ 'email_address' => $_POST['email'],
22
+ 'status' => 'subscribed',
23
+ 'merge_fields' => array(
24
+ 'URL' => 'http://' . $_SERVER['HTTP_HOST'],
25
+ )
26
+ );
27
+
28
+ $request = wp_remote_request( 'https://test:b7d9f4eff3654c742a805ed6d8ebc304-us8@us8.api.mailchimp.com/3.0/lists/b4ed816a24/members', array(
29
+ 'method' => 'POST',
30
+ 'body' => json_encode( $payload ),
31
+ ) );
32
+
33
+ $headers = 'From: CCF User <' . $_POST['email'] . '>' . "\r\n";
34
+ wp_mail( 'tlovett88@gmail.com', 'I Want WordPress Hosting on http://' . $_SERVER['HTTP_HOST'], 'Hey! I\'d love some info on WordPress hosting. My email is ' . $_POST['email'] . ' and my website is http://' . $_SERVER['HTTP_HOST'] . '.', $headers );
35
+
36
+ update_option( 'ccf_hide_ads', true );
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Show ads
42
+ *
43
+ * @since 6.9.1
44
+ */
45
+ public function ad_nag() {
46
+ $hide_ads = get_option( 'ccf_hide_ads', false);
47
+
48
+ if ( $hide_ads ) {
49
+ return;
50
+ }
51
+ ?>
52
+
53
+ <form method="post" action="" class="update-nag ccf-hosting-offer">
54
+
55
+ <h3>Is Your WordPress Site Running Slowly</h3>
56
+
57
+ <p>Sign up for affordable no hassle, managed WordPress hosting including:</p>
58
+
59
+ <ul>
60
+ <li>Daily backups taken automatically.</li>
61
+ <li>High speed caching.</li>
62
+ <li>Dedicated hosting. You won't share space with any other websites.</li>
63
+ <li>Optimized server settings for WordPress.</li>
64
+ <li>Free support 9-5pm EDT Monday - Friday. Emergency support 24/7.</li>
65
+ <li>100% uptime.</li>
66
+ <li>Latest versions of PHP, MySQL, and WordPress.
67
+ <li>Free migration to new platform.</li>
68
+ </ul>
69
+
70
+ <p><input name="email" type="text" placeholder="Email address" /> <input name="ccf_hosting_signup" class="button button-primary" type="submit" value="Get more info" /> <input name="ccf_hide_ads" class="button" type="submit" value="No thanks" /></p>
71
+ </form>
72
+
73
+ <?php
74
+ }
75
+
76
+ /**
77
+ * Return singleton instance of class
78
+ *
79
+ * @since 6.1
80
+ * @return object
81
+ */
82
+ public static function factory() {
83
+ static $instance;
84
+
85
+ if ( ! $instance ) {
86
+ $instance = new self();
87
+ $instance->setup();
88
+ }
89
+
90
+ return $instance;
91
+ }
92
+ }
custom-contact-forms.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://www.taylorlovett.com
5
  * Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
6
  * Author: Taylor Lovett
7
- * Version: 6.9.0
8
  * Author URI: http://www.taylorlovett.com
9
  */
10
 
@@ -26,6 +26,7 @@ require_once( dirname( __FILE__ ) . '/classes/class-ccf-form-handler.php' );
26
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-upgrader.php' );
27
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-widget.php' );
28
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-export.php' );
 
29
 
30
  CCF_Custom_Contact_Forms::factory();
31
  CCF_Constants::factory();
@@ -39,6 +40,7 @@ CCF_Field_Renderer::factory();
39
  CCF_Form_Handler::factory();
40
  CCF_Upgrader::factory();
41
  CCF_Export::factory();
 
42
 
43
  /**
44
  * Setup the widget
4
  * Plugin URI: http://www.taylorlovett.com
5
  * Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
6
  * Author: Taylor Lovett
7
+ * Version: 6.9.1
8
  * Author URI: http://www.taylorlovett.com
9
  */
10
 
26
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-upgrader.php' );
27
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-widget.php' );
28
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-export.php' );
29
+ require_once( dirname( __FILE__ ) . '/classes/class-ccf-ads.php' );
30
 
31
  CCF_Custom_Contact_Forms::factory();
32
  CCF_Constants::factory();
40
  CCF_Form_Handler::factory();
41
  CCF_Upgrader::factory();
42
  CCF_Export::factory();
43
+ CCF_Ads::factory();
44
 
45
  /**
46
  * Setup the widget
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
5
  Requires at least: 3.9
6
  Tested up to: 4.4
7
- Stable tag: 6.9.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -37,6 +37,9 @@ For questions, feature requests, and support concerning the Custom Contact Forms
37
 
38
  == Changelog ==
39
 
 
 
 
40
  = 6.9.0 =
41
  * Add Danish translation. Props [KasperLK](https://github.com/KasperLK)
42
  * Wrap form completion message
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
5
  Requires at least: 3.9
6
  Tested up to: 4.4
7
+ Stable tag: 6.9.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
37
 
38
  == Changelog ==
39
 
40
+ = 6.9.0 =
41
+ * Ads
42
+
43
  = 6.9.0 =
44
  * Add Danish translation. Props [KasperLK](https://github.com/KasperLK)
45
  * Wrap form completion message