MW WP Form - Version 1.0.2

Version Description

  • Bug fix:
  • Bug fix: URL + URL
Download this release

Release Info

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

Code changes from version 1.0.1 to 1.0.2

Files changed (2) hide show
  1. mw-wp-form.php +8 -4
  2. readme.txt +5 -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.0.1
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: September 25, 2012
10
- * Modified: October 16, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
@@ -200,6 +200,7 @@ class mw_wp_form {
200
  */
201
  public function main() {
202
  global $post;
 
203
  if ( empty( $post->ID ) ) return;
204
 
205
  // URL設定を取得
@@ -715,7 +716,10 @@ class mw_wp_form {
715
  // url引数が無効の場合、URL設定 で ?post_id が使われている場合はそれが使用される
716
  // url引数が有効の場合は URL設定 で ?post_id が使われていても $_GET['post_id'] で上書きされる
717
  $query_string = array_merge( $_GET, $query_string );
718
- if ( !empty( $this->options_by_formkey['querystring'] ) && MWF_Functions::is_numeric( $_GET['post_id'] ) ) {
 
 
 
719
  $query_string['post_id'] = $_GET['post_id'];
720
  }
721
  if ( !empty( $query_string ) )
@@ -827,7 +831,7 @@ class mw_wp_form {
827
  public function get_post_property( $matches ) {
828
  if ( isset( $this->options_by_formkey['querystring'] ) )
829
  $querystring = $this->options_by_formkey['querystring'];
830
- if ( !empty( $querystring ) && MWF_Functions::is_numeric( $_GET['post_id'] ) ) {
831
  $_post = get_post( $_GET['post_id'] );
832
  if ( empty( $_post->ID ) )
833
  return $matches[0];
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.0.2
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: September 25, 2012
10
+ * Modified: October 19, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
200
  */
201
  public function main() {
202
  global $post;
203
+ if ( !is_singular() ) return;
204
  if ( empty( $post->ID ) ) return;
205
 
206
  // URL設定を取得
716
  // url引数が無効の場合、URL設定 で ?post_id が使われている場合はそれが使用される
717
  // url引数が有効の場合は URL設定 で ?post_id が使われていても $_GET['post_id'] で上書きされる
718
  $query_string = array_merge( $_GET, $query_string );
719
+ if ( !empty( $this->options_by_formkey['querystring'] )
720
+ && isset( $_GET['post_id'] )
721
+ && MWF_Functions::is_numeric( $_GET['post_id'] ) ) {
722
+
723
  $query_string['post_id'] = $_GET['post_id'];
724
  }
725
  if ( !empty( $query_string ) )
831
  public function get_post_property( $matches ) {
832
  if ( isset( $this->options_by_formkey['querystring'] ) )
833
  $querystring = $this->options_by_formkey['querystring'];
834
+ if ( !empty( $querystring ) && isset( $_GET['post_id'] ) && MWF_Functions::is_numeric( $_GET['post_id'] ) ) {
835
  $_post = get_post( $_GET['post_id'] );
836
  if ( empty( $_post->ID ) )
837
  return $matches[0];
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview
5
  Requires at least: 3.4
6
  Tested up to: 3.5
7
- Stable tag: 1.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -37,6 +37,10 @@ http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
37
 
38
  == Changelog ==
39
 
 
 
 
 
40
  = 1.0.1 =
41
  * Bug fix: DBに保存しないときに添付ファイルが送られてこない
42
 
4
  Tags: plugin, form, confirm, preview
5
  Requires at least: 3.4
6
  Tested up to: 3.5
7
+ Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
37
 
38
  == Changelog ==
39
 
40
+ = 1.0.2 =
41
+ * Bug fix: シングルページのみ実行可能に変更(検索結果ページ等でリダイレクトしてしまうため)
42
+ * Bug fix: URL引数有効 + 同一URL時にリダイレクトループが発生してしまうバグを修正
43
+
44
  = 1.0.1 =
45
  * Bug fix: DBに保存しないときに添付ファイルが送られてこない
46