MW WP Form - Version 1.1.4

Version Description

  • Changed : do_shortcode()
  • Bug fix :
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin MW WP Form
Version 1.1.4
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.4

Files changed (4) hide show
  1. mw-wp-form.php +12 -6
  2. readme.txt +8 -3
  3. system/mw_form.php +2 -7
  4. system/mw_validation.php +1 -1
mw-wp-form.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
5
  * Description: MW WP Form can create mail form with a confirmation screen.
6
- * Version: 1.1.3
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: November 26, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
@@ -205,12 +205,18 @@ class mw_wp_form {
205
 
206
  // URL設定を取得
207
  add_shortcode( 'mwform', array( $this, '_meta_mwform' ) );
208
- do_shortcode( $post->post_content );
209
- remove_shortcode( 'mwform' );
210
-
211
  // formkeyでのフォーム生成の場合はそれをもとに設定を取得
212
  add_shortcode( 'mwform_formkey', array( $this, '_meta_mwform_formkey' ) );
213
- do_shortcode( $post->post_content );
 
 
 
 
 
 
 
 
 
214
  remove_shortcode( 'mwform_formkey' );
215
 
216
  // フォームが定義されていない場合は終了
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
5
  * Description: MW WP Form can create mail form with a confirmation screen.
6
+ * Version: 1.1.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: November 28, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
205
 
206
  // URL設定を取得
207
  add_shortcode( 'mwform', array( $this, '_meta_mwform' ) );
 
 
 
208
  // formkeyでのフォーム生成の場合はそれをもとに設定を取得
209
  add_shortcode( 'mwform_formkey', array( $this, '_meta_mwform_formkey' ) );
210
+ preg_match_all( '/' . get_shortcode_regex() . '/s', $post->post_content, $matches, PREG_SET_ORDER );
211
+ if ( !empty( $matches ) ) {
212
+ foreach ( $matches as $shortcode ) {
213
+ if ( in_array( $shortcode[2], array( 'mwform', 'mwform_formkey' ) ) ) {
214
+ do_shortcode( $shortcode[0] );
215
+ break;
216
+ }
217
+ }
218
+ }
219
+ remove_shortcode( 'mwform' );
220
  remove_shortcode( 'mwform_formkey' );
221
 
222
  // フォームが定義されていない場合は終了
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview, shortcode
5
  Requires at least: 3.4
6
  Tested up to: 3.6.1
7
- Stable tag: 1.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -37,13 +37,18 @@ http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
37
 
38
  == Changelog ==
39
 
 
 
 
 
40
  = 1.1.3 =
41
  * Deprecated: div.mw_wp_form_previewは次回のバージョンアップで削除予定(div.mw_wp_form_confirmに置換)
42
  * Deprecated: MW_Form::previewPage()は次回のバージョンアップで削除予定(MW_Form::confirmPage()に置換)
43
  * Deprecated: [mwform_submitButton]の引数preview_valueは次回のバージョンアップで削除予定(confirm_valueに置換)
44
  * Deprecated: [mwform]の引数previewは次回のバージョンアップで削除予定(confirmに置換)
45
- * Cahged : MW_Form::isPreview() -> MW_Form::isConfirm()
46
- * Cahged : MW_Form::getPreviewButtonName() -> MW_Form::getConfirmButtonName()
 
47
  * Added : mwform_default_content フィルターフック
48
  * Added : mwform_default_postdata フィルターフック
49
 
4
  Tags: plugin, form, confirm, preview, shortcode
5
  Requires at least: 3.4
6
  Tested up to: 3.6.1
7
+ Stable tag: 1.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
37
 
38
  == Changelog ==
39
 
40
+ = 1.1.4 =
41
+ * Changed : 設定を読み込むため際、無駄な do_shortcode() が行われないように修正
42
+ * Bug fix : チェックボックスの値が送信されないバグ修正
43
+
44
  = 1.1.3 =
45
  * Deprecated: div.mw_wp_form_previewは次回のバージョンアップで削除予定(div.mw_wp_form_confirmに置換)
46
  * Deprecated: MW_Form::previewPage()は次回のバージョンアップで削除予定(MW_Form::confirmPage()に置換)
47
  * Deprecated: [mwform_submitButton]の引数preview_valueは次回のバージョンアップで削除予定(confirm_valueに置換)
48
  * Deprecated: [mwform]の引数previewは次回のバージョンアップで削除予定(confirmに置換)
49
+ * Deprecated: [mwform_previewButton]は次回のバージョンアップで削除予定([mwform_confirmButton]に置換)
50
+ * Changed : MW_Form::isPreview() -> MW_Form::isConfirm()
51
+ * Changed : MW_Form::getPreviewButtonName() -> MW_Form::getConfirmButtonName()
52
  * Added : mwform_default_content フィルターフック
53
  * Added : mwform_default_postdata フィルターフック
54
 
system/mw_form.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW Form
4
  * URI: http://2inc.org
5
  * Description: フォームクラス
6
- * Version: 1.3.6
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: November 26, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
@@ -55,11 +55,6 @@ class MW_Form {
55
  if ( $this->isInput() && empty( $_POST ) && !$this->Session->getValue( $this->tokenName ) ) {
56
  $this->Session->save( array( $this->tokenName => $this->token ) );
57
  }
58
- // 戻る、確認画面へのポスト、完了画面へのポストでないときはデータを破棄
59
- if ( !( isset( $this->data[$this->backButton] ) || $this->isConfirm() || $this->isComplete() ) ) {
60
- // フォームオブジェクト再生成
61
- $this->data = array();
62
- }
63
  }
64
 
65
  /**
3
  * Name: MW Form
4
  * URI: http://2inc.org
5
  * Description: フォームクラス
6
+ * Version: 1.3.7
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: December 2, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
55
  if ( $this->isInput() && empty( $_POST ) && !$this->Session->getValue( $this->tokenName ) ) {
56
  $this->Session->save( array( $this->tokenName => $this->token ) );
57
  }
 
 
 
 
 
58
  }
59
 
60
  /**
system/mw_validation.php CHANGED
@@ -555,7 +555,7 @@ class MW_Validation {
555
  public function setRule( $key, $rule, Array $options = array() ) {
556
  $rules = array(
557
  'rule' => $rule,
558
- 'options' =>$options
559
  );
560
  $this->validate[$key][] = $rules;
561
  return $this;
555
  public function setRule( $key, $rule, Array $options = array() ) {
556
  $rules = array(
557
  'rule' => $rule,
558
+ 'options' => $options
559
  );
560
  $this->validate[$key][] = $rules;
561
  return $this;