Metform Elementor Contact Form Builder – Flexible and Design-Friendly Contact Form builder plugin for WordPress - Version 1.5.3

Version Description

Metform 1.3.0-beta1 is a major update. We have reconstructed the widgets with react and huge optimization for future proof. If you faced any issue please contact our support team from here https://wpmet.com/support-ticket

Download this release

Release Info

Developer ataurr
Plugin Icon 128x128 Metform Elementor Contact Form Builder – Flexible and Design-Friendly Contact Form builder plugin for WordPress
Version 1.5.3
Comparing to
See all releases

Code changes from version 1.5.2 to 1.5.3

Files changed (5) hide show
  1. base/shortcode.php +21 -28
  2. languages/metform.pot +2 -2
  3. metform.php +1 -1
  4. plugin.php +3 -3
  5. readme.txt +4 -1
base/shortcode.php CHANGED
@@ -12,7 +12,7 @@ class Shortcode
12
 
13
  public function __construct()
14
  {
15
- add_shortcode('metform', [$this, 'render_shortcode']);
16
  add_shortcode('mf_thankyou', [$this, 'render_thank_you_page']);
17
  add_shortcode('mf_first_name', [$this, 'render_first_name']);
18
  add_shortcode('mf_last_name', [$this, 'render_last_name']);
@@ -21,9 +21,18 @@ class Shortcode
21
  add_shortcode('mf',[$this,'render_mf_field']);
22
  }
23
 
 
 
 
 
 
 
 
24
 
25
- public function render_shortcode($atts)
26
  {
 
 
27
  $attributes = shortcode_atts(array(
28
  'form_id' => 'test',
29
  ), $atts);
@@ -38,15 +47,7 @@ class Shortcode
38
  }
39
  global $post;
40
 
41
- /**
42
- *
43
- * =============================
44
- * Atts for thank you page start
45
- * =============================
46
- *
47
- */
48
-
49
-
50
 
51
  $a = shortcode_atts(array(
52
  'fname' => '',
@@ -57,8 +58,6 @@ class Shortcode
57
  $page_id = $settings['mf_thank_you_page'];
58
  $post_id = $_GET['id'];
59
 
60
- error_log($post_id);
61
-
62
  $postMeta = get_post_meta(
63
  $post_id,
64
  'metform_entries__form_data',
@@ -87,22 +86,12 @@ class Shortcode
87
  }
88
 
89
  return $msg;
90
-
91
-
92
- /**
93
- *
94
- *
95
- * ===================================
96
- * Atts for thank you page ends here :D
97
- * ====================================
98
- *
99
- */
100
-
101
-
102
 
103
  }
104
 
105
  public function render_mf_field($atts){
 
 
106
  $a = shortcode_atts(array(
107
  'field' => ''
108
  ),$atts);
@@ -118,13 +107,11 @@ class Shortcode
118
  )[$a['field']];
119
 
120
  return $field;
121
-
122
-
123
-
124
  }
125
 
126
  public function render_first_name($atts)
127
  {
 
128
 
129
  $post_id = $_GET['id'];
130
  $first_name = get_post_meta(
@@ -137,6 +124,8 @@ class Shortcode
137
 
138
  public function render_last_name($atts)
139
  {
 
 
140
  $post_id = $_GET['id'];
141
  $last_name = get_post_meta(
142
  $post_id,
@@ -148,6 +137,8 @@ class Shortcode
148
 
149
  public function render_payment_status($atts)
150
  {
 
 
151
  $post_id = $_GET['id'];
152
  $payment_status = get_post_meta(
153
  $post_id,
@@ -159,6 +150,8 @@ class Shortcode
159
 
160
  public function render_transaction_id($atts)
161
  {
 
 
162
  $post_id = $_GET['id'];
163
  $tnx_id = get_post_meta(
164
  $post_id,
12
 
13
  public function __construct()
14
  {
15
+ add_shortcode('metform', [$this, 'render_form']);
16
  add_shortcode('mf_thankyou', [$this, 'render_thank_you_page']);
17
  add_shortcode('mf_first_name', [$this, 'render_first_name']);
18
  add_shortcode('mf_last_name', [$this, 'render_last_name']);
21
  add_shortcode('mf',[$this,'render_mf_field']);
22
  }
23
 
24
+ public function enqueue_form_assets(){
25
+ wp_enqueue_style('metform-ui');
26
+ wp_enqueue_style('metform-style');
27
+ wp_enqueue_script('htm');
28
+ wp_enqueue_script('metform-app');
29
+ }
30
+
31
 
32
+ public function render_form($atts)
33
  {
34
+ $this->enqueue_form_assets();
35
+
36
  $attributes = shortcode_atts(array(
37
  'form_id' => 'test',
38
  ), $atts);
47
  }
48
  global $post;
49
 
50
+ $this->enqueue_form_assets();
 
 
 
 
 
 
 
 
51
 
52
  $a = shortcode_atts(array(
53
  'fname' => '',
58
  $page_id = $settings['mf_thank_you_page'];
59
  $post_id = $_GET['id'];
60
 
 
 
61
  $postMeta = get_post_meta(
62
  $post_id,
63
  'metform_entries__form_data',
86
  }
87
 
88
  return $msg;
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
  }
91
 
92
  public function render_mf_field($atts){
93
+ $this->enqueue_form_assets();
94
+
95
  $a = shortcode_atts(array(
96
  'field' => ''
97
  ),$atts);
107
  )[$a['field']];
108
 
109
  return $field;
 
 
 
110
  }
111
 
112
  public function render_first_name($atts)
113
  {
114
+ $this->enqueue_form_assets();
115
 
116
  $post_id = $_GET['id'];
117
  $first_name = get_post_meta(
124
 
125
  public function render_last_name($atts)
126
  {
127
+ $this->enqueue_form_assets();
128
+
129
  $post_id = $_GET['id'];
130
  $last_name = get_post_meta(
131
  $post_id,
137
 
138
  public function render_payment_status($atts)
139
  {
140
+ $this->enqueue_form_assets();
141
+
142
  $post_id = $_GET['id'];
143
  $payment_status = get_post_meta(
144
  $post_id,
150
 
151
  public function render_transaction_id($atts)
152
  {
153
+ $this->enqueue_form_assets();
154
+
155
  $post_id = $_GET['id'];
156
  $tnx_id = get_post_meta(
157
  $post_id,
languages/metform.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MetForm 1.5.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/metform\n"
7
- "POT-Creation-Date: 2021-08-02 12:04:57+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MetForm 1.5.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/metform\n"
7
+ "POT-Creation-Date: 2021-08-16 09:00:40+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
metform.php CHANGED
@@ -5,7 +5,7 @@ defined( 'ABSPATH' ) || exit;
5
  * Plugin Name: MetForm
6
  * Plugin URI: http://products.wpmet.com/metform/
7
  * Description: Most flexible and design friendly form builder for Elementor
8
- * Version: 1.5.2
9
  * Author: Wpmet
10
  * Author URI: https://wpmet.com
11
  * Text Domain: metform
5
  * Plugin Name: MetForm
6
  * Plugin URI: http://products.wpmet.com/metform/
7
  * Description: Most flexible and design friendly form builder for Elementor
8
+ * Version: 1.5.3
9
  * Author: Wpmet
10
  * Author URI: https://wpmet.com
11
  * Text Domain: metform
plugin.php CHANGED
@@ -20,7 +20,7 @@ final class Plugin
20
 
21
  public function version()
22
  {
23
- return '1.5.2';
24
  }
25
 
26
  public function package_type()
@@ -229,7 +229,7 @@ final class Plugin
229
  function js_css_public()
230
  {
231
  $this->global_settings = \MetForm\Core\Admin\Base::instance()->get_settings_option();
232
- $is_edit_mode = ('metform-form' === get_post_type());
233
 
234
  wp_register_style('metform-ui', $this->public_url() . 'assets/css/metform-ui.css', false, $this->version());
235
 
@@ -270,7 +270,7 @@ final class Plugin
270
  // ends pro feature
271
 
272
 
273
- if($is_edit_mode){
274
  wp_enqueue_style('metform-ui');
275
  wp_enqueue_style('metform-style');
276
  wp_enqueue_script('htm');
20
 
21
  public function version()
22
  {
23
+ return '1.5.3';
24
  }
25
 
26
  public function package_type()
229
  function js_css_public()
230
  {
231
  $this->global_settings = \MetForm\Core\Admin\Base::instance()->get_settings_option();
232
+ $is_form_cpt = ('metform-form' === get_post_type());
233
 
234
  wp_register_style('metform-ui', $this->public_url() . 'assets/css/metform-ui.css', false, $this->version());
235
 
270
  // ends pro feature
271
 
272
 
273
+ if($is_form_cpt){
274
  wp_enqueue_style('metform-ui');
275
  wp_enqueue_style('metform-style');
276
  wp_enqueue_script('htm');
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: ataurr, wpmet, emranio, atiqsu, easin55474, enamulhoquemohon, ashr
3
  Tags: Form builder, Elementor form builder, contact form, custom form, forms, drag & drop form builder
4
  Requires at least: 4.8
5
  Tested up to: 5.8
6
- Stable tag: 1.5.2
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -227,6 +227,9 @@ Connect with Gmail, Slack, Mailchimp, and many more.
227
 
228
 
229
  == Changelog ==
 
 
 
230
  Version 1.5.2
231
  Removed: Summary widget’s react library warning
232
  Fixed : Performance issue
3
  Tags: Form builder, Elementor form builder, contact form, custom form, forms, drag & drop form builder
4
  Requires at least: 4.8
5
  Tested up to: 5.8
6
+ Stable tag: 1.5.3
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
227
 
228
 
229
  == Changelog ==
230
+ Version 1.5.3
231
+ Fixed: Shortcode was not working.
232
+
233
  Version 1.5.2
234
  Removed: Summary widget’s react library warning
235
  Fixed : Performance issue