Version Description
- Fix form page bug
Download this release
Release Info
Developer | tlovett1 |
Plugin | Custom Contact Forms |
Version | 6.1.3 |
Comparing to | |
See all releases |
Code changes from version 6.1.2 to 6.1.3
- classes/class-ccf-api.php +20 -0
- classes/class-ccf-form-handler.php +8 -6
- classes/class-ccf-form-renderer.php +1 -0
- classes/class-ccf-upgrader.php +1 -1
- custom-contact-forms.php +1 -1
- readme.txt +4 -1
classes/class-ccf-api.php
CHANGED
@@ -326,6 +326,16 @@ class CCF_API extends WP_JSON_Posts {
|
|
326 |
unset( $data['author'] );
|
327 |
}
|
328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
$result = $this->insert_post( $data );
|
330 |
if ( $result instanceof WP_Error ) {
|
331 |
return $result;
|
@@ -582,6 +592,16 @@ class CCF_API extends WP_JSON_Posts {
|
|
582 |
unset( $data['author'] );
|
583 |
}
|
584 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
$result = $this->insert_post( $data );
|
586 |
if ( $result instanceof WP_Error ) {
|
587 |
return $result;
|
326 |
unset( $data['author'] );
|
327 |
}
|
328 |
|
329 |
+
// @todo: remove hack. Needed for broken API
|
330 |
+
if ( isset( $data['date'] ) ) {
|
331 |
+
unset( $data['date'] );
|
332 |
+
}
|
333 |
+
|
334 |
+
// @todo: remove hack. Needed for broken API
|
335 |
+
if ( isset( $data['date_gmt'] ) ) {
|
336 |
+
unset( $data['date_gmt'] );
|
337 |
+
}
|
338 |
+
|
339 |
$result = $this->insert_post( $data );
|
340 |
if ( $result instanceof WP_Error ) {
|
341 |
return $result;
|
592 |
unset( $data['author'] );
|
593 |
}
|
594 |
|
595 |
+
// @todo: remove hack. Needed for broken API
|
596 |
+
if ( isset( $data['date'] ) ) {
|
597 |
+
unset( $data['date'] );
|
598 |
+
}
|
599 |
+
|
600 |
+
// @todo: remove hack. Needed for broken API
|
601 |
+
if ( isset( $data['date_gmt'] ) ) {
|
602 |
+
unset( $data['date_gmt'] );
|
603 |
+
}
|
604 |
+
|
605 |
$result = $this->insert_post( $data );
|
606 |
if ( $result instanceof WP_Error ) {
|
607 |
return $result;
|
classes/class-ccf-form-handler.php
CHANGED
@@ -563,12 +563,14 @@ class CCF_Form_Handler {
|
|
563 |
<?php
|
564 |
}
|
565 |
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
|
|
|
|
572 |
|
573 |
$message .= ob_get_clean();
|
574 |
|
563 |
<?php
|
564 |
}
|
565 |
|
566 |
+
if ( ! empty( $_POST['form_page'] ) ) {
|
567 |
+
?>
|
568 |
+
<div>
|
569 |
+
<?php esc_html_e( 'Form submitted from', 'custom-contact-forms' ); ?>:
|
570 |
+
<?php echo esc_url( $_POST['form_page'] ); ?>
|
571 |
+
</div>
|
572 |
+
<?php
|
573 |
+
}
|
574 |
|
575 |
$message .= ob_get_clean();
|
576 |
|
classes/class-ccf-form-renderer.php
CHANGED
@@ -158,6 +158,7 @@ class CCF_Form_Renderer {
|
|
158 |
</div>
|
159 |
|
160 |
<input type="hidden" name="form_id" value="<?php echo (int) $form_id; ?>">
|
|
|
161 |
<input type="text" name="my_information" style="display: none;">
|
162 |
<input type="hidden" name="ccf_form" value="1">
|
163 |
<input type="hidden" name="form_nonce" value="<?php echo wp_create_nonce( 'ccf_form' ); ?>">
|
158 |
</div>
|
159 |
|
160 |
<input type="hidden" name="form_id" value="<?php echo (int) $form_id; ?>">
|
161 |
+
<input type="hidden" name="form_page" value="<?php echo esc_url( untrailingslashit( site_url() ) . $_SERVER['REQUEST_URI'] ); ?>">
|
162 |
<input type="text" name="my_information" style="display: none;">
|
163 |
<input type="hidden" name="ccf_form" value="1">
|
164 |
<input type="hidden" name="form_nonce" value="<?php echo wp_create_nonce( 'ccf_form' ); ?>">
|
classes/class-ccf-upgrader.php
CHANGED
@@ -34,7 +34,7 @@ class CCF_Upgrader {
|
|
34 |
?>
|
35 |
<div class="update-nag">
|
36 |
<p>
|
37 |
-
<?php esc_html_e( 'Did you just upgrade to a post 6.0 version of Custom Contact Forms? If so, you might need to upgrade your database to use your old forms.', 'custom-contact-forms' ); ?>
|
38 |
<a href="<?php echo esc_url( admin_url( '?ccf_upgrade=1&nonce=' . $nonce ) ); ?>" class="button"><?php esc_html_e( 'Upgrade', 'custom-contact-forms' ); ?></a>
|
39 |
<a href="<?php echo esc_url( admin_url( '?ccf_upgrade=0&nonce=' . $nonce ) ); ?>" class="button"><?php esc_html_e( 'Dismiss', 'custom-contact-forms' ); ?></a>
|
40 |
</p>
|
34 |
?>
|
35 |
<div class="update-nag">
|
36 |
<p>
|
37 |
+
<?php esc_html_e( 'Did you just upgrade to a post 6.0 version of Custom Contact Forms? If so, you might need to upgrade your database to use your old forms. Please backup your database before running the upgrade.', 'custom-contact-forms' ); ?>
|
38 |
<a href="<?php echo esc_url( admin_url( '?ccf_upgrade=1&nonce=' . $nonce ) ); ?>" class="button"><?php esc_html_e( 'Upgrade', 'custom-contact-forms' ); ?></a>
|
39 |
<a href="<?php echo esc_url( admin_url( '?ccf_upgrade=0&nonce=' . $nonce ) ); ?>" class="button"><?php esc_html_e( 'Dismiss', 'custom-contact-forms' ); ?></a>
|
40 |
</p>
|
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.1.
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
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.1.3
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.taylorlovett.com
|
|
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.1
|
7 |
-
Stable tag: 6.1.
|
8 |
|
9 |
Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
10 |
|
@@ -33,6 +33,9 @@ For questions, feature requests, and support concerning the Custom Contact Forms
|
|
33 |
|
34 |
= Changelog ==
|
35 |
|
|
|
|
|
|
|
36 |
= 6.1.2 =
|
37 |
* Force JSON url to obey current protocol
|
38 |
* Enqueue scripts earlier
|
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.1
|
7 |
+
Stable tag: 6.1.3
|
8 |
|
9 |
Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
10 |
|
33 |
|
34 |
= Changelog ==
|
35 |
|
36 |
+
= 6.1.3 =
|
37 |
+
* Fix form page bug
|
38 |
+
|
39 |
= 6.1.2 =
|
40 |
* Force JSON url to obey current protocol
|
41 |
* Enqueue scripts earlier
|