MW WP Form - Version 1.2.5

Version Description

  • Added :
  • Added : mwform_error_message_html
  • Added : mwform_error_message_wrapper
  • Buf fix : DB Notice
Download this release

Release Info

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

Code changes from version 1.2.4 to 1.2.5

mw-wp-form.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://2inc.org/manual-mw-wp-form/
5
  * Description: MW WP Form can create mail form with a confirmation screen.
6
- * Version: 1.2.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: December 23, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://2inc.org/manual-mw-wp-form/
5
  * Description: MW WP Form can create mail form with a confirmation screen.
6
+ * Version: 1.2.5
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: December 24, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
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.8.0
7
- Stable tag: 1.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -47,6 +47,12 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
47
 
48
  == Changelog ==
49
 
 
 
 
 
 
 
50
  = 1.2.4 =
51
  * Bug fix : メールアドレスバリデーションのバグを修正
52
 
4
  Tags: plugin, form, confirm, preview, shortcode
5
  Requires at least: 3.4
6
  Tested up to: 3.8.0
7
+ Stable tag: 1.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
47
 
48
  == Changelog ==
49
 
50
+ = 1.2.5 =
51
+ * Added : 管理者宛メールの複数人送信をサポート
52
+ * Added : mwform_error_message_html
53
+ * Added : mwform_error_message_wrapper
54
+ * Buf fix : DB保存データ一覧表示画面 Noticeエラー
55
+
56
  = 1.2.4 =
57
  * Bug fix : メールアドレスバリデーションのバグを修正
58
 
system/mw_form_field.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW Form Field
4
  * URI: http://2inc.org
5
  * Description: フォームフィールドの抽象クラス
6
- * Version: 1.3.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : December 14, 2012
10
- * Modified: December 22, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
@@ -102,19 +102,29 @@ abstract class mw_form_field {
102
 
103
  /**
104
  * getError
105
- * @param String フォーム項目名
106
- * @return String エラーHTML
107
  */
108
  protected function getError( $key ) {
109
  $_ret = '';
110
  if ( is_array( $this->Error->getError( $key ) ) ) {
 
 
111
  foreach ( $this->Error->getError( $key ) as $rule => $error ) {
112
- $_ret .= sprintf( '<span class="error">%s</span>',
113
- esc_html( apply_filters( 'mwform_error_message_' . $this->key, $error, $key, $rule ) )
 
 
 
 
 
 
 
114
  );
 
115
  }
116
  }
117
- return $_ret;
118
  }
119
 
120
  /**
3
  * Name: MW Form Field
4
  * URI: http://2inc.org
5
  * Description: フォームフィールドの抽象クラス
6
+ * Version: 1.3.5
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : December 14, 2012
10
+ * Modified: December 26, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
102
 
103
  /**
104
  * getError
105
+ * @param string $key name属性
106
+ * @return string エラーHTML
107
  */
108
  protected function getError( $key ) {
109
  $_ret = '';
110
  if ( is_array( $this->Error->getError( $key ) ) ) {
111
+ $start_tag = '<span class="error">';
112
+ $end_tag = '</span>';
113
  foreach ( $this->Error->getError( $key ) as $rule => $error ) {
114
+ $error = apply_filters( 'mwform_error_message_' . $this->key, $error, $key, $rule );
115
+ $error_html = apply_filters( 'mwform_error_message_html',
116
+ $start_tag . esc_html( $error ) . $end_tag,
117
+ $error,
118
+ $start_tag,
119
+ $end_tag,
120
+ $this->key,
121
+ $key,
122
+ $rule
123
  );
124
+ $_ret .= $error_html;
125
  }
126
  }
127
+ return apply_filters( 'mwform_error_message_wrapper', $_ret, $this->key );
128
  }
129
 
130
  /**
system/mw_mail.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW Mail
4
  * URI: http://2inc.org
5
  * Description: メールクラス
6
- * Version: 1.3.3
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: July 20, 2012
10
- * Modified: December 2, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
@@ -49,13 +49,15 @@ class MW_Mail {
49
  add_filter( 'wp_mail_from_name', array( $this, 'set_mail_from_name' ) );
50
  $to = explode( ',', $this->to );
51
  if ( isset( $to[0] ) ) {
52
- $to = trim( $to[0] );
53
- $header = '';
54
- wp_mail( $to, $subject, $body, $header, $this->attachments );
55
- remove_action( 'phpmailer_init', array( $this, 'set_return_path' ) );
56
- remove_filter( 'wp_mail_from', array( $this, 'set_mail_from' ) );
57
- remove_filter( 'wp_mail_from_name', array( $this, 'set_mail_from_name' ) );
58
  }
 
 
 
59
  }
60
  public function set_mail_from( $email ) {
61
  return $this->from;
3
  * Name: MW Mail
4
  * URI: http://2inc.org
5
  * Description: メールクラス
6
+ * Version: 1.3.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: July 20, 2012
10
+ * Modified: December 24, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
49
  add_filter( 'wp_mail_from_name', array( $this, 'set_mail_from_name' ) );
50
  $to = explode( ',', $this->to );
51
  if ( isset( $to[0] ) ) {
52
+ foreach ( $to as $value ) {
53
+ $value = trim( $value );
54
+ $header = '';
55
+ wp_mail( $value, $subject, $body, $header, $this->attachments );
56
+ }
 
57
  }
58
+ remove_action( 'phpmailer_init', array( $this, 'set_return_path' ) );
59
+ remove_filter( 'wp_mail_from', array( $this, 'set_mail_from' ) );
60
+ remove_filter( 'wp_mail_from_name', array( $this, 'set_mail_from_name' ) );
61
  }
62
  public function set_mail_from( $email ) {
63
  return $this->from;
system/mw_wp_form_contact_data_page.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW WP Form Contact Data Page
4
  * URI: http://2inc.org
5
  * Description: DB保存データを扱うクラス
6
- * Version: 1.0.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : October 10, 2013
10
- * Modified: December 20, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
@@ -267,7 +267,7 @@ class MW_WP_Form_Contact_Data_Page {
267
  if ( is_array( $_upload_file_keys ) ) {
268
  $upload_file_keys = $_upload_file_keys;
269
  } else {
270
- $upload_file_keys = get_post_custom_values( '_' . MWF_Config::UPLOAD_FILE_KEYS, $post->ID );
271
  }
272
 
273
  if ( $column == 'post_date' ) {
@@ -276,7 +276,7 @@ class MW_WP_Form_Contact_Data_Page {
276
  }
277
  elseif ( !empty( $post_custom_keys ) && is_array( $post_custom_keys ) && in_array( $column, $post_custom_keys ) ) {
278
  $post_meta = get_post_meta( $post_id, $column, true );
279
- if ( in_array( $column, $upload_file_keys ) ) {
280
  echo '<a href="' . admin_url( '/post.php?post=' ) . $post_meta . '&action=edit">' . $post_meta . '</a>';
281
  } elseif ( $post_meta ) {
282
  echo esc_html( $post_meta );
3
  * Name: MW WP Form Contact Data Page
4
  * URI: http://2inc.org
5
  * Description: DB保存データを扱うクラス
6
+ * Version: 1.0.5
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : October 10, 2013
10
+ * Modified: December 26, 2013
11
  * License: GPL2
12
  *
13
  * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
267
  if ( is_array( $_upload_file_keys ) ) {
268
  $upload_file_keys = $_upload_file_keys;
269
  } else {
270
+ $upload_file_keys = get_post_custom_values( '_' . MWF_Config::UPLOAD_FILE_KEYS, $post_id );
271
  }
272
 
273
  if ( $column == 'post_date' ) {
276
  }
277
  elseif ( !empty( $post_custom_keys ) && is_array( $post_custom_keys ) && in_array( $column, $post_custom_keys ) ) {
278
  $post_meta = get_post_meta( $post_id, $column, true );
279
+ if ( is_array( $upload_file_keys ) && in_array( $column, $upload_file_keys ) ) {
280
  echo '<a href="' . admin_url( '/post.php?post=' ) . $post_meta . '&action=edit">' . $post_meta . '</a>';
281
  } elseif ( $post_meta ) {
282
  echo esc_html( $post_meta );