PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.21
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.21
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 +28 -5 1.6.21.6.21 View file →
@@ -66,9 +66,11 @@
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 -
70 + // if ( $use_theme_css === $form_settings['use_theme_css'] ) {
71 + // wp_dequeue_style( 'weforms-css' );
72 + // }
71 73 if ( isset( $atts['modal'] ) && 'true' == $atts['modal'] ) {
72 74 wp_enqueue_script( 'weforms-modal-js', WEFORMS_ASSET_URI . '/modal/jquery.modal.js', [ 'jquery', 'weforms-form' ], false, false );
73 75 wp_enqueue_style( 'weforms_modal_styles', WEFORMS_ASSET_URI . '/modal/jquery.modal.css' );
74 76
@@ -92,8 +94,25 @@
92 94 ";
93 95 wp_add_inline_script( 'wpuf-form', $script );
94 96 ?>
95 97
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: ?>
96 115 <form class="wpuf-form-add <?php echo esc_attr( $formid ); ?> <?php echo esc_attr( $modal_class ); ?> <?php echo
97 116 esc_attr( $use_theme_css ); ?>" action="" method="post" <?php echo esc_attr( $modal_style ); ?> id="<?php echo
98 117 esc_attr($modal_id); ?>">
99 118
@@ -120,9 +139,9 @@
120 139 do_action( 'weforms_form_fields_bottom', $form, $form_fields ); ?>
121 140 </ul>
122 141
123 142 </form>
124 -
143 + <?php endif; ?>
125 144 <?php
126 145 if ( isset( $atts['modal'] ) && 'true' == esc_attr( $atts['modal'] ) ) {
127 146 if ( isset( $atts['link'] ) ) {
128 147 printf( wp_kses_post( '<p><a href="#modal-form" rel="modal:open">%s</a></p>', $atts['link'] ) );
@@ -172,11 +191,15 @@
172 191 <?php } ?>
173 192
174 193 <?php do_action( 'weforms_submit_btn', $form_id, $form_settings ); ?>
175 194
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 -
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; ?>
179 202 </li>
180 203 <?php
181 204 }
182 205 }