Version Description
- Add filter hook mwform_send_nocache_header.
- Fix MWF_Functions::_return_deprecated_message() error.
- Fix bug that mwform_value_mw-wp-form-xxx filter not applyed to radio and checkbox.
- Fix bug that nocache_header not applyed.
- Add the echo attribute to mwform_custom_mail_tag.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 4.0.5 |
Comparing to | |
See all releases |
Code changes from version 4.0.4 to 4.0.5
- classes/abstract/class.form-field.php +1 -1
- classes/controllers/class.main.php +28 -61
- classes/form-fields/class.checkbox.php +1 -1
- classes/form-fields/class.custom-mail-tag.php +20 -8
- classes/form-fields/class.datepicker.php +1 -1
- classes/form-fields/class.email.php +1 -1
- classes/form-fields/class.file.php +1 -1
- classes/form-fields/class.image.php +1 -1
- classes/form-fields/class.monthpicker.php +1 -1
- classes/form-fields/class.number.php +1 -1
- classes/form-fields/class.password.php +1 -1
- classes/form-fields/class.radio.php +1 -1
- classes/form-fields/class.range.php +1 -1
- classes/form-fields/class.select.php +1 -1
- classes/form-fields/class.tel.php +1 -1
- classes/form-fields/class.text.php +1 -1
- classes/form-fields/class.textarea.php +1 -1
- classes/form-fields/class.url.php +1 -1
- classes/form-fields/class.zip.php +1 -1
- classes/functions.php +1 -1
- mw-wp-form.php +2 -2
- readme.txt +9 -2
classes/abstract/class.form-field.php
CHANGED
@@ -181,7 +181,7 @@ abstract class MW_WP_Form_Abstract_Form_Field {
|
|
181 |
public function _input_page( $atts, $element_content = null ) {
|
182 |
$this->element_content = $element_content;
|
183 |
|
184 |
-
if (
|
185 |
$atts['value'] = apply_filters(
|
186 |
'mwform_value_' . $this->form_key,
|
187 |
$this->defaults['value'],
|
181 |
public function _input_page( $atts, $element_content = null ) {
|
182 |
$this->element_content = $element_content;
|
183 |
|
184 |
+
if ( array_key_exists( 'value', $this->defaults ) && isset( $atts['name'] ) && ! isset( $atts['value'] ) ) {
|
185 |
$atts['value'] = apply_filters(
|
186 |
'mwform_value_' . $this->form_key,
|
187 |
$this->defaults['value'],
|
classes/controllers/class.main.php
CHANGED
@@ -27,7 +27,7 @@ class MW_WP_Form_Main_Controller {
|
|
27 |
protected $Validation;
|
28 |
|
29 |
public function __construct() {
|
30 |
-
add_filter( 'nocache_headers', array( $this, '_nocache_headers' ) );
|
31 |
add_filter( 'nginxchampuru_caching_headers', array( $this, '_nginxchampuru_caching_headers' ) );
|
32 |
|
33 |
add_action( 'parse_request' , array( $this, '_remove_query_vars_from_post' ) );
|
@@ -64,35 +64,13 @@ class MW_WP_Form_Main_Controller {
|
|
64 |
}
|
65 |
}
|
66 |
|
67 |
-
/**
|
68 |
-
* Proxy cache measures
|
69 |
-
*
|
70 |
-
* @todo NOT WORKING
|
71 |
-
*/
|
72 |
-
public function _send_headers() {
|
73 |
-
if ( ! empty( $_POST ) && ! empty( $_POST[ MWF_Config::NAME . '-form-id' ] ) ) {
|
74 |
-
nocache_headers();
|
75 |
-
$form_id = $_POST[ MWF_Config::NAME . '-form-id' ];
|
76 |
-
$form_key = MWF_Functions::get_form_key_from_form_id( $form_id );
|
77 |
-
$this->_set_transient_for_nocache_headers( $form_key );
|
78 |
-
} else {
|
79 |
-
$transient = $this->_get_transient_for_nocache_headers();
|
80 |
-
if ( $transient ) {
|
81 |
-
nocache_headers();
|
82 |
-
}
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
/**
|
87 |
* Cache control for Nginx Cache Controller plugin
|
88 |
*
|
89 |
* @todo NOT WORKING
|
90 |
*/
|
91 |
public function _nginxchampuru_caching_headers( $headers ) {
|
92 |
-
$
|
93 |
-
if ( $transient ) {
|
94 |
-
$headers = $this->_nocache_headers( $headers );
|
95 |
-
}
|
96 |
return $headers;
|
97 |
}
|
98 |
|
@@ -108,6 +86,28 @@ class MW_WP_Form_Main_Controller {
|
|
108 |
return $headers;
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
/**
|
112 |
* Main process for form displaying
|
113 |
*/
|
@@ -253,6 +253,7 @@ class MW_WP_Form_Main_Controller {
|
|
253 |
$is_admin_mail_sended = $Mail_Service->send_admin_mail();
|
254 |
|
255 |
if ( ! $is_admin_mail_sended ) {
|
|
|
256 |
return false;
|
257 |
}
|
258 |
|
@@ -268,6 +269,9 @@ class MW_WP_Form_Main_Controller {
|
|
268 |
|
269 |
if ( $automatic_reply_email && ! $is_invalid_mail_address ) {
|
270 |
$is_reply_mail_sended = $Mail_Service->send_reply_mail();
|
|
|
|
|
|
|
271 |
}
|
272 |
}
|
273 |
|
@@ -352,41 +356,4 @@ class MW_WP_Form_Main_Controller {
|
|
352 |
$this->Data->push_uploaded_file_keys( $uploaded_files );
|
353 |
$this->Data->regenerate_upload_file_keys();
|
354 |
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* Return transient name of nocache headers
|
358 |
-
*
|
359 |
-
* @return string
|
360 |
-
*/
|
361 |
-
protected function _get_transient_name_for_nocache_headers() {
|
362 |
-
$url = $_SERVER['REQUEST_URI'];
|
363 |
-
$hash = base64_encode( pack( 'H*', sha1( $url ) ) );
|
364 |
-
return 'mwform_keyurl_' . $hash;
|
365 |
-
}
|
366 |
-
|
367 |
-
/**
|
368 |
-
* Set transient for nocache headers
|
369 |
-
*
|
370 |
-
* @param string $form_key
|
371 |
-
* @return void
|
372 |
-
*/
|
373 |
-
protected function _set_transient_for_nocache_headers( $form_key ) {
|
374 |
-
$transient_name = $this->_get_transient_name_for_nocache_headers();
|
375 |
-
$transient = get_transient( $transient_name );
|
376 |
-
if ( ! $transient ) {
|
377 |
-
$transient = array();
|
378 |
-
}
|
379 |
-
$transient[] = $form_key;
|
380 |
-
set_transient( $transient_name, $transient, 1 );
|
381 |
-
}
|
382 |
-
|
383 |
-
/**
|
384 |
-
* Return transient for nocache headers
|
385 |
-
*
|
386 |
-
* @return array
|
387 |
-
*/
|
388 |
-
protected function _get_transient_for_nocache_headers() {
|
389 |
-
$transient_name = $this->_get_transient_name_for_nocache_headers();
|
390 |
-
return get_transient( $transient_name );
|
391 |
-
}
|
392 |
}
|
27 |
protected $Validation;
|
28 |
|
29 |
public function __construct() {
|
30 |
+
add_filter( 'nocache_headers', array( $this, '_nocache_headers' ), 1 );
|
31 |
add_filter( 'nginxchampuru_caching_headers', array( $this, '_nginxchampuru_caching_headers' ) );
|
32 |
|
33 |
add_action( 'parse_request' , array( $this, '_remove_query_vars_from_post' ) );
|
64 |
}
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
/**
|
68 |
* Cache control for Nginx Cache Controller plugin
|
69 |
*
|
70 |
* @todo NOT WORKING
|
71 |
*/
|
72 |
public function _nginxchampuru_caching_headers( $headers ) {
|
73 |
+
$headers = $this->_nocache_headers( $headers );
|
|
|
|
|
|
|
74 |
return $headers;
|
75 |
}
|
76 |
|
86 |
return $headers;
|
87 |
}
|
88 |
|
89 |
+
/**
|
90 |
+
* Proxy cache measures
|
91 |
+
*
|
92 |
+
* @todo NOT WORKING
|
93 |
+
*/
|
94 |
+
public function _send_headers() {
|
95 |
+
$nocache = false;
|
96 |
+
|
97 |
+
$post = get_post();
|
98 |
+
if ( $post ) {
|
99 |
+
if ( preg_match( '|\[mwform_formkey [^\]]+?\]|ms', $post->post_content ) ) {
|
100 |
+
$nocache = true;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
$nocache = apply_filters( 'mwform_send_nocache_header', $nocache );
|
105 |
+
|
106 |
+
if ( $nocache ) {
|
107 |
+
nocache_headers();
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
/**
|
112 |
* Main process for form displaying
|
113 |
*/
|
253 |
$is_admin_mail_sended = $Mail_Service->send_admin_mail();
|
254 |
|
255 |
if ( ! $is_admin_mail_sended ) {
|
256 |
+
error_log( 'Failed to send admin mail.' );
|
257 |
return false;
|
258 |
}
|
259 |
|
269 |
|
270 |
if ( $automatic_reply_email && ! $is_invalid_mail_address ) {
|
271 |
$is_reply_mail_sended = $Mail_Service->send_reply_mail();
|
272 |
+
if ( ! $is_reply_mail_sended ) {
|
273 |
+
error_log( 'Failed to send auto reply mail.' );
|
274 |
+
}
|
275 |
}
|
276 |
}
|
277 |
|
356 |
$this->Data->push_uploaded_file_keys( $uploaded_files );
|
357 |
$this->Data->regenerate_upload_file_keys();
|
358 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
}
|
classes/form-fields/class.checkbox.php
CHANGED
@@ -160,7 +160,7 @@ class MW_WP_Form_Field_Checkbox extends MW_WP_Form_Abstract_Form_Field {
|
|
160 |
<label><input type="checkbox" name="vertically" value="true" <?php checked( 'true', $vertically ); ?> /> <?php esc_html_e( 'Arranged vertically.', 'mw-wp-form' ); ?></label>
|
161 |
</p>
|
162 |
<p>
|
163 |
-
<strong><?php esc_html_e( '
|
164 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
165 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
166 |
</p>
|
160 |
<label><input type="checkbox" name="vertically" value="true" <?php checked( 'true', $vertically ); ?> /> <?php esc_html_e( 'Arranged vertically.', 'mw-wp-form' ); ?></label>
|
161 |
</p>
|
162 |
<p>
|
163 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
164 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
165 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
166 |
</p>
|
classes/form-fields/class.custom-mail-tag.php
CHANGED
@@ -41,6 +41,7 @@ class MW_WP_Form_Field_Custom_Mail_Tag extends MW_WP_Form_Abstract_Form_Field {
|
|
41 |
'name' => '',
|
42 |
'id' => null,
|
43 |
'class' => null,
|
|
|
44 |
);
|
45 |
}
|
46 |
|
@@ -52,10 +53,13 @@ class MW_WP_Form_Field_Custom_Mail_Tag extends MW_WP_Form_Abstract_Form_Field {
|
|
52 |
* @return string HTML
|
53 |
*/
|
54 |
protected function input_page() {
|
55 |
-
$_ret =
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
59 |
$_ret .= $this->Form->hidden( MWF_Config::CUSTOM_MAIL_TAG_KEYS . '[]', $this->atts['name'] );
|
60 |
if ( 'false' !== $this->atts['show_error'] ) {
|
61 |
$_ret .= $this->get_error( $this->atts['name'] );
|
@@ -71,10 +75,13 @@ class MW_WP_Form_Field_Custom_Mail_Tag extends MW_WP_Form_Abstract_Form_Field {
|
|
71 |
* @return string HTML
|
72 |
*/
|
73 |
protected function confirm_page() {
|
74 |
-
$_ret =
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
78 |
$_ret .= $this->Form->hidden( MWF_Config::CUSTOM_MAIL_TAG_KEYS . '[]', $this->atts['name'] );
|
79 |
return $_ret;
|
80 |
}
|
@@ -103,6 +110,11 @@ class MW_WP_Form_Field_Custom_Mail_Tag extends MW_WP_Form_Abstract_Form_Field {
|
|
103 |
<?php $class = $this->get_value_for_generator( 'class', $options ); ?>
|
104 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
105 |
</p>
|
|
|
|
|
|
|
|
|
|
|
106 |
<?php
|
107 |
}
|
108 |
|
41 |
'name' => '',
|
42 |
'id' => null,
|
43 |
'class' => null,
|
44 |
+
'echo' => 'true',
|
45 |
);
|
46 |
}
|
47 |
|
53 |
* @return string HTML
|
54 |
*/
|
55 |
protected function input_page() {
|
56 |
+
$_ret = '';
|
57 |
+
if ( 'true' === $this->atts['echo'] ) {
|
58 |
+
$_ret .= $this->custom_mail_tag_field( $this->atts['name'], array(
|
59 |
+
'id' => $this->atts['id'],
|
60 |
+
'class' => $this->atts['class'],
|
61 |
+
) );
|
62 |
+
}
|
63 |
$_ret .= $this->Form->hidden( MWF_Config::CUSTOM_MAIL_TAG_KEYS . '[]', $this->atts['name'] );
|
64 |
if ( 'false' !== $this->atts['show_error'] ) {
|
65 |
$_ret .= $this->get_error( $this->atts['name'] );
|
75 |
* @return string HTML
|
76 |
*/
|
77 |
protected function confirm_page() {
|
78 |
+
$_ret = '';
|
79 |
+
if ( 'true' === $this->atts['echo'] ) {
|
80 |
+
$_ret .= $this->custom_mail_tag_field( $this->atts['name'], array(
|
81 |
+
'id' => $this->atts['id'],
|
82 |
+
'class' => $this->atts['class'],
|
83 |
+
) );
|
84 |
+
}
|
85 |
$_ret .= $this->Form->hidden( MWF_Config::CUSTOM_MAIL_TAG_KEYS . '[]', $this->atts['name'] );
|
86 |
return $_ret;
|
87 |
}
|
110 |
<?php $class = $this->get_value_for_generator( 'class', $options ); ?>
|
111 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
112 |
</p>
|
113 |
+
<p>
|
114 |
+
<strong><?php esc_html_e( 'Display', 'mw-wp-form' ); ?></strong>
|
115 |
+
<?php $echo = $this->get_value_for_generator( 'echo', $options ); ?>
|
116 |
+
<input type="checkbox" name="echo" value="false" <?php checked( 'false', $echo ); ?> /> <?php esc_html_e( 'Don\'t display.', 'mw-wp-form' ); ?>
|
117 |
+
</p>
|
118 |
<?php
|
119 |
}
|
120 |
|
classes/form-fields/class.datepicker.php
CHANGED
@@ -169,7 +169,7 @@ class MW_WP_Form_Field_Datepicker extends MW_WP_Form_Abstract_Form_Field {
|
|
169 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
170 |
</p>
|
171 |
<p>
|
172 |
-
<strong><?php esc_html_e( '
|
173 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
174 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
175 |
</p>
|
169 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
170 |
</p>
|
171 |
<p>
|
172 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
173 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
174 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
175 |
</p>
|
classes/form-fields/class.email.php
CHANGED
@@ -141,7 +141,7 @@ class MW_WP_Form_Field_Email extends MW_WP_Form_Abstract_Form_Field {
|
|
141 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
142 |
</p>
|
143 |
<p>
|
144 |
-
<strong><?php esc_html_e( '
|
145 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
146 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
147 |
</p>
|
141 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
142 |
</p>
|
143 |
<p>
|
144 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
145 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
146 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
147 |
</p>
|
classes/form-fields/class.file.php
CHANGED
@@ -127,7 +127,7 @@ class MW_WP_Form_Field_File extends MW_WP_Form_Abstract_Form_Field {
|
|
127 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
128 |
</p>
|
129 |
<p>
|
130 |
-
<strong><?php esc_html_e( '
|
131 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
132 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
133 |
</p>
|
127 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
128 |
</p>
|
129 |
<p>
|
130 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
131 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
132 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
133 |
</p>
|
classes/form-fields/class.image.php
CHANGED
@@ -130,7 +130,7 @@ class MW_WP_Form_Field_Image extends MW_WP_Form_Abstract_Form_Field {
|
|
130 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
131 |
</p>
|
132 |
<p>
|
133 |
-
<strong><?php esc_html_e( '
|
134 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
135 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
136 |
</p>
|
130 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
131 |
</p>
|
132 |
<p>
|
133 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
134 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
135 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
136 |
</p>
|
classes/form-fields/class.monthpicker.php
CHANGED
@@ -180,7 +180,7 @@ class MW_WP_Form_Field_Monthpicker extends MW_WP_Form_Abstract_Form_Field {
|
|
180 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
181 |
</p>
|
182 |
<p>
|
183 |
-
<strong><?php esc_html_e( '
|
184 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
185 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
186 |
</p>
|
180 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
181 |
</p>
|
182 |
<p>
|
183 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
184 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
185 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
186 |
</p>
|
classes/form-fields/class.number.php
CHANGED
@@ -137,7 +137,7 @@ class MW_WP_Form_Field_Number extends MW_WP_Form_Abstract_Form_Field {
|
|
137 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
138 |
</p>
|
139 |
<p>
|
140 |
-
<strong><?php esc_html_e( '
|
141 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
142 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
143 |
</p>
|
137 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
138 |
</p>
|
139 |
<p>
|
140 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
141 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
142 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
143 |
</p>
|
classes/form-fields/class.password.php
CHANGED
@@ -133,7 +133,7 @@ class MW_WP_Form_Field_Password extends MW_WP_Form_Abstract_Form_Field {
|
|
133 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
134 |
</p>
|
135 |
<p>
|
136 |
-
<strong><?php esc_html_e( '
|
137 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
138 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
139 |
</p>
|
133 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
134 |
</p>
|
135 |
<p>
|
136 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
137 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
138 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
139 |
</p>
|
classes/form-fields/class.radio.php
CHANGED
@@ -151,7 +151,7 @@ class MW_WP_Form_Field_Radio extends MW_WP_Form_Abstract_Form_Field {
|
|
151 |
<label><input type="checkbox" name="vertically" value="true" <?php checked( 'true', $vertically ); ?> /> <?php esc_html_e( 'Arranged vertically.', 'mw-wp-form' ); ?></label>
|
152 |
</p>
|
153 |
<p>
|
154 |
-
<strong><?php esc_html_e( '
|
155 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
156 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
157 |
</p>
|
151 |
<label><input type="checkbox" name="vertically" value="true" <?php checked( 'true', $vertically ); ?> /> <?php esc_html_e( 'Arranged vertically.', 'mw-wp-form' ); ?></label>
|
152 |
</p>
|
153 |
<p>
|
154 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
155 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
156 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
157 |
</p>
|
classes/form-fields/class.range.php
CHANGED
@@ -130,7 +130,7 @@ class MW_WP_Form_Field_Range extends MW_WP_Form_Abstract_Form_Field {
|
|
130 |
<input type="text" name="step" value="<?php echo esc_attr( $step ); ?>" />
|
131 |
</p>
|
132 |
<p>
|
133 |
-
<strong><?php esc_html_e( '
|
134 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
135 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
136 |
</p>
|
130 |
<input type="text" name="step" value="<?php echo esc_attr( $step ); ?>" />
|
131 |
</p>
|
132 |
<p>
|
133 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
134 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
135 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
136 |
</p>
|
classes/form-fields/class.select.php
CHANGED
@@ -142,7 +142,7 @@ class MW_WP_Form_Field_Select extends MW_WP_Form_Abstract_Form_Field {
|
|
142 |
<input type="text" name="value" value="<?php echo esc_attr( $value ); ?>" />
|
143 |
</p>
|
144 |
<p>
|
145 |
-
<strong><?php esc_html_e( '
|
146 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
147 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
148 |
</p>
|
142 |
<input type="text" name="value" value="<?php echo esc_attr( $value ); ?>" />
|
143 |
</p>
|
144 |
<p>
|
145 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
146 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
147 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
148 |
</p>
|
classes/form-fields/class.tel.php
CHANGED
@@ -113,7 +113,7 @@ class MW_WP_Form_Field_Tel extends MW_WP_Form_Abstract_Form_Field {
|
|
113 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
114 |
</p>
|
115 |
<p>
|
116 |
-
<strong><?php esc_html_e( '
|
117 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
118 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
119 |
</p>
|
113 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
114 |
</p>
|
115 |
<p>
|
116 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
117 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
118 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
119 |
</p>
|
classes/form-fields/class.text.php
CHANGED
@@ -141,7 +141,7 @@ class MW_WP_Form_Field_Text extends MW_WP_Form_Abstract_Form_Field {
|
|
141 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
142 |
</p>
|
143 |
<p>
|
144 |
-
<strong><?php esc_html_e( '
|
145 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
146 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
147 |
</p>
|
141 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
142 |
</p>
|
143 |
<p>
|
144 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
145 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
146 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
147 |
</p>
|
classes/form-fields/class.textarea.php
CHANGED
@@ -135,7 +135,7 @@ class MW_WP_Form_Field_Textarea extends MW_WP_Form_Abstract_Form_Field {
|
|
135 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
136 |
</p>
|
137 |
<p>
|
138 |
-
<strong><?php esc_html_e( '
|
139 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
140 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
141 |
</p>
|
135 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
136 |
</p>
|
137 |
<p>
|
138 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
139 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
140 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
141 |
</p>
|
classes/form-fields/class.url.php
CHANGED
@@ -141,7 +141,7 @@ class MW_WP_Form_Field_Url extends MW_WP_Form_Abstract_Form_Field {
|
|
141 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
142 |
</p>
|
143 |
<p>
|
144 |
-
<strong><?php esc_html_e( '
|
145 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
146 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
147 |
</p>
|
141 |
<input type="text" name="placeholder" value="<?php echo esc_attr( $placeholder ); ?>" />
|
142 |
</p>
|
143 |
<p>
|
144 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
145 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
146 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
147 |
</p>
|
classes/form-fields/class.zip.php
CHANGED
@@ -112,7 +112,7 @@ class MW_WP_Form_Field_Zip extends MW_WP_Form_Abstract_Form_Field {
|
|
112 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
113 |
</p>
|
114 |
<p>
|
115 |
-
<strong><?php esc_html_e( '
|
116 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
117 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
118 |
</p>
|
112 |
<input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
|
113 |
</p>
|
114 |
<p>
|
115 |
+
<strong><?php esc_html_e( 'Display error', 'mw-wp-form' ); ?></strong>
|
116 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
117 |
<label><input type="checkbox" name="show_error" value="false" <?php checked( 'false', $show_error ); ?> /> <?php esc_html_e( 'Don\'t display error.', 'mw-wp-form' ); ?></label>
|
118 |
</p>
|
classes/functions.php
CHANGED
@@ -148,7 +148,7 @@ class MWF_Functions {
|
|
148 |
unset( $mwform_deprecated_message );
|
149 |
echo $content;
|
150 |
}
|
151 |
-
|
152 |
global $mwform_deprecated_message;
|
153 |
$content = $mwform_deprecated_message . $content;
|
154 |
unset( $mwform_deprecated_message );
|
148 |
unset( $mwform_deprecated_message );
|
149 |
echo $content;
|
150 |
}
|
151 |
+
public static function _return_deprecated_message( $content = '' ) {
|
152 |
global $mwform_deprecated_message;
|
153 |
$content = $mwform_deprecated_message . $content;
|
154 |
unset( $mwform_deprecated_message );
|
mw-wp-form.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin Name: MW WP Form
|
4 |
* Plugin URI: https://plugins.2inc.org/mw-wp-form/
|
5 |
* Description: MW WP Form is shortcode base contact form plugin. This plugin have many features. For example you can use many validation rules, inquiry data saving, and chart aggregation using saved inquiry data.
|
6 |
-
* Version: 4.0.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: https://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
-
* Modified:
|
11 |
* Text Domain: mw-wp-form
|
12 |
* License: GPLv2 or later
|
13 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
3 |
* Plugin Name: MW WP Form
|
4 |
* Plugin URI: https://plugins.2inc.org/mw-wp-form/
|
5 |
* Description: MW WP Form is shortcode base contact form plugin. This plugin have many features. For example you can use many validation rules, inquiry data saving, and chart aggregation using saved inquiry data.
|
6 |
+
* Version: 4.0.5
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: https://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: December 13, 2019
|
11 |
* Text Domain: mw-wp-form
|
12 |
* License: GPLv2 or later
|
13 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: inc2734, ryu263, tomothumb, nanniku, mt8.biz, NExt-Season, kuck1u,
|
|
3 |
Donate link: https://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
|
4 |
Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 4.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -71,6 +71,13 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
= 4.0.4 =
|
75 |
* PHP 5.3, 5.2.4 support
|
76 |
|
3 |
Donate link: https://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
|
4 |
Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.0.1
|
7 |
+
Stable tag: 4.0.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 4.0.5 =
|
75 |
+
* Add filter hook mwform_send_nocache_header.
|
76 |
+
* Fix MWF_Functions::_return_deprecated_message() error.
|
77 |
+
* Fix bug that mwform_value_mw-wp-form-xxx filter not applyed to radio and checkbox.
|
78 |
+
* Fix bug that nocache_header not applyed.
|
79 |
+
* Add the echo attribute to mwform_custom_mail_tag.
|
80 |
+
|
81 |
= 4.0.4 =
|
82 |
* PHP 5.3, 5.2.4 support
|
83 |
|