MW WP Form - Version 0.5.5

Version Description

  • Added tag to show login user meta. {user_id}, {user_login}, {user_email}, {user_url}, {user_registered}, {display_name}
Download this release

Release Info

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

Code changes from version 0.5 to 0.5.5

Files changed (2) hide show
  1. mw-wp-form.php +26 -3
  2. readme.txt +5 -1
mw-wp-form.php CHANGED
@@ -3,16 +3,16 @@
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
5
  * Description: Plug-in which can create mail form using short code. E-mail sending and validation can be specified at functions.php.
6
- * Version: 0.5
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: September 25, 2012
10
- * Modified: December 14, 2012
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
14
  *
15
- * Copyright 2012 Takashi Kitajima (email : inc@2inc.org)
16
  *
17
  * This program is free software; you can redistribute it and/or modify
18
  * it under the terms of the GNU General Public License, version 2, as
@@ -260,6 +260,29 @@ class mw_wp_form {
260
 
261
  if ( $this->viewFlg == 'input' || $this->viewFlg == 'preview' ) {
262
  $this->Error = $this->Validation->Error();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  return
264
  '<div id="mw_wp_form_' . $atts['key'] . '" class="mw_wp_form">' .
265
  $this->Form->start() .
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
5
  * Description: Plug-in which can create mail form using short code. E-mail sending and validation can be specified at functions.php.
6
+ * Version: 0.5.5
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created: September 25, 2012
10
+ * Modified: February 12, 2013
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
14
  *
15
+ * Copyright 2013 Takashi Kitajima (email : inc@2inc.org)
16
  *
17
  * This program is free software; you can redistribute it and/or modify
18
  * it under the terms of the GNU General Public License, version 2, as
260
 
261
  if ( $this->viewFlg == 'input' || $this->viewFlg == 'preview' ) {
262
  $this->Error = $this->Validation->Error();
263
+
264
+ $user = wp_get_current_user();
265
+ $search = array(
266
+ '{user_id}',
267
+ '{user_login}',
268
+ '{user_email}',
269
+ '{user_url}',
270
+ '{user_registered}',
271
+ '{display_name}',
272
+ );
273
+ if ( !empty( $user ) ) {
274
+ $content = str_replace( $search, array(
275
+ $user->get( 'ID' ),
276
+ $user->get( 'user_login' ),
277
+ $user->get( 'user_email' ),
278
+ $user->get( 'user_url' ),
279
+ $user->get( 'user_registered' ),
280
+ $user->get( 'display_name' ),
281
+ ), $content );
282
+ } else {
283
+ $content = str_replace( $search, '', $content );
284
+ }
285
+
286
  return
287
  '<div id="mw_wp_form_' . $atts['key'] . '" class="mw_wp_form">' .
288
  $this->Form->start() .
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: plugin, form, confirm, preview
5
  Requires at least: 3.4
6
  Tested up to: 3.5
7
- Stable tag: 0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -24,5 +24,9 @@ http://2inc.org/blog/category/products/wordpress_plugins/mw-wp-form/
24
 
25
  == Changelog ==
26
 
 
 
 
 
27
  = 0.5 =
28
  * Initial release.
4
  Tags: plugin, form, confirm, preview
5
  Requires at least: 3.4
6
  Tested up to: 3.5
7
+ Stable tag: 0.5.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
24
 
25
  == Changelog ==
26
 
27
+ = 0.5.5 =
28
+ * Added tag to show login user meta.
29
+ {user_id}, {user_login}, {user_email}, {user_url}, {user_registered}, {display_name}
30
+
31
  = 0.5 =
32
  * Initial release.