Version Description
- Fixed a bug that memo is not saved.
- The select element can be used in tag generator dialog box.
- You can set original tag group in tag generator.
- Add filter hook mwform_tag_generator_labels.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 4.2.0 |
Comparing to | |
See all releases |
Code changes from version 4.1.2 to 4.2.0
- classes/abstract/class.form-field.php +9 -3
- classes/form-fields/class.error.php +1 -1
- classes/form-fields/class.zip.php +1 -1
- classes/models/class.contact-data-setting.php +4 -2
- js/admin.js +1 -1
- mw-wp-form.php +2 -2
- readme.txt +9 -2
- templates/admin/tag-generator.php +29 -18
classes/abstract/class.form-field.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Abstract Form Field
|
4 |
-
* Version : 2.
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : https://2inc.org
|
7 |
* Created : December 14, 2012
|
8 |
-
* Modified :
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
@@ -67,7 +67,8 @@ abstract class MW_WP_Form_Abstract_Form_Field {
|
|
67 |
public function __construct() {
|
68 |
$this->_set_names();
|
69 |
$this->_set_defaults();
|
70 |
-
add_filter( 'mwform_form_fields'
|
|
|
71 |
}
|
72 |
|
73 |
/**
|
@@ -311,6 +312,11 @@ abstract class MW_WP_Form_Abstract_Form_Field {
|
|
311 |
return array_merge( $form_fields, array( $this->shortcode_name => $this ) );
|
312 |
}
|
313 |
|
|
|
|
|
|
|
|
|
|
|
314 |
/**
|
315 |
* Return display name
|
316 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Abstract Form Field
|
4 |
+
* Version : 2.1.0
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : https://2inc.org
|
7 |
* Created : December 14, 2012
|
8 |
+
* Modified : October 25, 2019
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
67 |
public function __construct() {
|
68 |
$this->_set_names();
|
69 |
$this->_set_defaults();
|
70 |
+
add_filter( 'mwform_form_fields', array( $this, '_mwform_form_fields' ) );
|
71 |
+
add_filter( 'mwform_tag_generator_group', array( $this, '_mwform_tag_generator_group' ) );
|
72 |
}
|
73 |
|
74 |
/**
|
312 |
return array_merge( $form_fields, array( $this->shortcode_name => $this ) );
|
313 |
}
|
314 |
|
315 |
+
public function _mwform_tag_generator_group( $group ) {
|
316 |
+
$group[ $this->type ] = $this->type;
|
317 |
+
return $group;
|
318 |
+
}
|
319 |
+
|
320 |
/**
|
321 |
* Return display name
|
322 |
*
|
classes/form-fields/class.error.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Name : MW WP Form Field
|
4 |
* Version : 2.0.0
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : https://2inc.org
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Name : MW WP Form Field Error
|
4 |
* Version : 2.0.0
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : https://2inc.org
|
classes/form-fields/class.zip.php
CHANGED
@@ -104,7 +104,7 @@ class MW_WP_Form_Field_Zip extends MW_WP_Form_Abstract_Form_Field {
|
|
104 |
<p>
|
105 |
<strong>name</strong>
|
106 |
<?php $name = $this->get_value_for_generator( 'name', $options ); ?>
|
107 |
-
<input type="text" name="name" value="<?php echo esc_attr( $name ); ?>"
|
108 |
</p>
|
109 |
<p>
|
110 |
<strong>class</strong>
|
104 |
<p>
|
105 |
<strong>name</strong>
|
106 |
<?php $name = $this->get_value_for_generator( 'name', $options ); ?>
|
107 |
+
<input type="text" name="name" value="<?php echo esc_attr( $name ); ?>" />
|
108 |
</p>
|
109 |
<p>
|
110 |
<strong>class</strong>
|
classes/models/class.contact-data-setting.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Contact Data Setting
|
4 |
-
* Version : 2.0.
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : https://2inc.org
|
7 |
* Created : January 1, 2015
|
8 |
-
* Modified :
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
@@ -161,6 +161,8 @@ class MW_WP_Form_Contact_Data_Setting {
|
|
161 |
}
|
162 |
} elseif ( 'admin_mail_to' === $key ) {
|
163 |
$this->$key = $value;
|
|
|
|
|
164 |
}
|
165 |
}
|
166 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Name : MW WP Form Contact Data Setting
|
4 |
+
* Version : 2.0.1
|
5 |
* Author : Takashi Kitajima
|
6 |
* Author URI : https://2inc.org
|
7 |
* Created : January 1, 2015
|
8 |
+
* Modified : October 25, 2019
|
9 |
* License : GPLv2 or later
|
10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
*/
|
161 |
}
|
162 |
} elseif ( 'admin_mail_to' === $key ) {
|
163 |
$this->$key = $value;
|
164 |
+
} elseif ( 'memo' === $key ) {
|
165 |
+
$this->$key = $value;
|
166 |
}
|
167 |
}
|
168 |
|
js/admin.js
CHANGED
@@ -17,7 +17,7 @@ jQuery( function( $ ) {
|
|
17 |
var shortcode_name = dialog_id.replace( 'dialog-', '' );
|
18 |
var element_content = null;
|
19 |
|
20 |
-
$( '#' + dialog_id + ':first' ).find( 'input, textarea' ).each( function( i, e ) {
|
21 |
var val;
|
22 |
var name = $( e ).attr( 'name' );
|
23 |
|
17 |
var shortcode_name = dialog_id.replace( 'dialog-', '' );
|
18 |
var element_content = null;
|
19 |
|
20 |
+
$( '#' + dialog_id + ':first' ).find( 'input, textarea, select' ).each( function( i, e ) {
|
21 |
var val;
|
22 |
var name = $( e ).attr( 'name' );
|
23 |
|
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.
|
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.2.0
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: https://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: October 25, 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: 5.2.
|
7 |
-
Stable tag: 4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -48,6 +48,7 @@ Source: https://developers.google.com/chart/
|
|
48 |
* [Takashi Nojima](https://github.com/nojimage)
|
49 |
* [herikutu](https://github.com/herikutu)
|
50 |
* [tsucharoku](https://github.com/tsucharoku)
|
|
|
51 |
|
52 |
== Installation ==
|
53 |
|
@@ -72,6 +73,12 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
= 4.1.2 =
|
76 |
* Fixed a bug that tracking number was displayed +1 on the complete screen.
|
77 |
|
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.2.4
|
7 |
+
Stable tag: 4.2.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
48 |
* [Takashi Nojima](https://github.com/nojimage)
|
49 |
* [herikutu](https://github.com/herikutu)
|
50 |
* [tsucharoku](https://github.com/tsucharoku)
|
51 |
+
* [t-hamano](https://github.com/t-hamano)
|
52 |
|
53 |
== Installation ==
|
54 |
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 4.2.0 =
|
77 |
+
* Fixed a bug that memo is not saved.
|
78 |
+
* The select element can be used in tag generator dialog box.
|
79 |
+
* You can set original tag group in tag generator.
|
80 |
+
* Add filter hook mwform_tag_generator_labels.
|
81 |
+
|
82 |
= 4.1.2 =
|
83 |
* Fixed a bug that tracking number was displayed +1 on the complete screen.
|
84 |
|
templates/admin/tag-generator.php
CHANGED
@@ -1,27 +1,38 @@
|
|
1 |
<?php
|
2 |
do_action( 'mwform_tag_generator_dialog' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
?>
|
4 |
<div class="add-mwform-btn">
|
5 |
<select>
|
6 |
<option value=""><?php echo esc_html_e( 'Select this.', 'mw-wp-form' ); ?></option>
|
7 |
-
|
8 |
-
<?php
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
<optgroup label="<?php echo esc_attr_e( 'Button fields (input)', 'mw-wp-form' ); ?>">
|
17 |
-
<?php do_action( 'mwform_tag_generator_input_button_option' ); ?>
|
18 |
-
</optgroup>
|
19 |
-
<optgroup label="<?php echo esc_attr_e( 'Error fields', 'mw-wp-form' ); ?>">
|
20 |
-
<?php do_action( 'mwform_tag_generator_error_option' ); ?>
|
21 |
-
</optgroup>
|
22 |
-
<optgroup label="<?php echo esc_attr_e( 'Other fields', 'mw-wp-form' ); ?>">
|
23 |
-
<?php do_action( 'mwform_tag_generator_option' ); ?>
|
24 |
-
</optgroup>
|
25 |
</select>
|
26 |
<span class="button"><?php esc_html_e( 'Add form tag', 'mw-wp-form' ); ?></span>
|
27 |
</div>
|
1 |
<?php
|
2 |
do_action( 'mwform_tag_generator_dialog' );
|
3 |
+
|
4 |
+
$types = array(
|
5 |
+
'input' => 'input',
|
6 |
+
'select' => 'select',
|
7 |
+
'button' => 'button',
|
8 |
+
'input_button' => 'input_button',
|
9 |
+
'error' => 'error',
|
10 |
+
'other' => 'other',
|
11 |
+
);
|
12 |
+
$group = apply_filters( 'mwform_tag_generator_group', $types );
|
13 |
+
|
14 |
+
$labels = array(
|
15 |
+
'input' => __( 'Input fields', 'mw-wp-form' ),
|
16 |
+
'select' => __( 'Select fields', 'mw-wp-form' ),
|
17 |
+
'button' => __( 'Button fields (button)', 'mw-wp-form' ),
|
18 |
+
'input_button' => __( 'Button fields (input)', 'mw-wp-form' ),
|
19 |
+
'error' => __( 'Error fields', 'mw-wp-form' ),
|
20 |
+
'other' => __( 'Other fields', 'mw-wp-form' ),
|
21 |
+
);
|
22 |
+
$labels = apply_filters( 'mwform_tag_generator_labels', $labels );
|
23 |
?>
|
24 |
<div class="add-mwform-btn">
|
25 |
<select>
|
26 |
<option value=""><?php echo esc_html_e( 'Select this.', 'mw-wp-form' ); ?></option>
|
27 |
+
<?php foreach ( $group as $type ) : ?>
|
28 |
+
<?php
|
29 |
+
$label = isset( $labels[ $type ] ) ? $labels[ $type ] : $type;
|
30 |
+
$tag = 'other' === $type ? 'mwform_tag_generator_option' : 'mwform_tag_generator_' . $type . '_option';
|
31 |
+
?>
|
32 |
+
<optgroup label="<?php echo esc_attr( $label ); ?>">
|
33 |
+
<?php do_action( $tag ); ?>
|
34 |
+
</optgroup>
|
35 |
+
<?php endforeach; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
</select>
|
37 |
<span class="button"><?php esc_html_e( 'Add form tag', 'mw-wp-form' ); ?></span>
|
38 |
</div>
|