PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.1
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.1
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/class-frontend-form.php +6 -29 1.6.241.6.1 View file →
@@ -38,9 +38,9 @@
38 38 ob_start();
39 39
40 40 $form = weforms()->form->get( $id );
41 41
42 - if ( !$form->id || 'wpuf_contact_form' !== $form->data->post_type ) {
42 + if ( !$form->id ) {
43 43 return $this->show_error( __( 'The form couldn\'t be found.', 'weforms' ) );
44 44 }
45 45
46 46 $is_open = $form->is_submission_open();
@@ -66,11 +66,9 @@
66 66 $form_settings = $form->get_settings();
67 67 $show_credit = weforms_get_settings( 'credit', false );
68 68 $formid = 'weforms-' . $form->id;
69 69 $use_theme_css = isset( $form_settings['use_theme_css'] ) ? $form_settings['use_theme_css'] : 'wpuf-style';
70 - // if ( $use_theme_css === $form_settings['use_theme_css'] ) {
71 - // wp_dequeue_style( 'weforms-css' );
72 - // }
70 +
73 71 if ( isset( $atts['modal'] ) && 'true' == $atts['modal'] ) {
74 72 wp_enqueue_script( 'weforms-modal-js', WEFORMS_ASSET_URI . '/modal/jquery.modal.js', [ 'jquery', 'weforms-form' ], false, false );
75 73 wp_enqueue_style( 'weforms_modal_styles', WEFORMS_ASSET_URI . '/modal/jquery.modal.css' );
76 74
@@ -94,25 +92,8 @@
94 92 ";
95 93 wp_add_inline_script( 'wpuf-form', $script );
96 94 ?>
97 95
98 -
99 - <?php if ( isset( $_GET['success_message'] ) ) : ?>
100 - <?php
101 - $return_to_form = remove_query_arg(
102 - array(
103 - 'form_id',
104 - 'form_page',
105 - 'success_message',
106 - )
107 - );
108 - ?>
109 - <div class="wpuf-success">
110 - <?php echo wp_kses_post( $_GET['success_message'] ); ?>
111 - <br>
112 - <a href="<?php echo esc_url( $return_to_form ) ?>"><?php esc_html_e( 'Return to form', 'weforms' ); ?></a>
113 - </div>
114 - <?php else: ?>
115 96 <form class="wpuf-form-add <?php echo esc_attr( $formid ); ?> <?php echo esc_attr( $modal_class ); ?> <?php echo
116 97 esc_attr( $use_theme_css ); ?>" action="" method="post" <?php echo esc_attr( $modal_style ); ?> id="<?php echo
117 98 esc_attr($modal_id); ?>">
118 99
@@ -139,9 +120,9 @@
139 120 do_action( 'weforms_form_fields_bottom', $form, $form_fields ); ?>
140 121 </ul>
141 122
142 123 </form>
143 - <?php endif; ?>
124 +
144 125 <?php
145 126 if ( isset( $atts['modal'] ) && 'true' == esc_attr( $atts['modal'] ) ) {
146 127 if ( isset( $atts['link'] ) ) {
147 128 printf( wp_kses_post( '<p><a href="#modal-form" rel="modal:open">%s</a></p>', $atts['link'] ) );
@@ -191,15 +172,11 @@
191 172 <?php } ?>
192 173
193 174 <?php do_action( 'weforms_submit_btn', $form_id, $form_settings ); ?>
194 175
195 - <?php if ( 'wpuf-style' == $form_settings['use_theme_css'] ) : ?>
196 - <input type="submit" class="weforms_submit_btn wpuf_submit_<?php echo esc_attr( $form_id ); ?>" name="submit" value="<?php echo
197 - esc_attr( $form_settings['submit_text'] ); ?>" />
198 - <?php else : ?>
199 - <input type="submit" class="button button-primary wpuf_submit_<?php echo esc_attr( $form_id ); ?>" name="submit" value="<?php echo
200 - esc_attr( $form_settings['submit_text'] ); ?>" />
201 - <?php endif; ?>
176 + <input type="submit" class="weforms_submit_btn wpuf_submit_<?php echo esc_attr( $form_id ); ?>" name="submit" value="<?php echo
177 + esc_attr( $form_settings['submit_text'] ); ?>" />
178 +
202 179 </li>
203 180 <?php
204 181 }
205 182 }