Version Description
- Fixed: UTF-8 text for Email subject and Email from name.
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.12.17 |
Comparing to | |
See all releases |
Code changes from version 1.12.16 to 1.12.17
- form-maker.php +3 -3
- framework/WDW_FM_Library.php +164 -159
- frontend/models/form_maker.php +2 -2
- readme.txt +7 -3
form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
-
* Version: 1.12.
|
7 |
* Author: WebDorado Form Builder Team
|
8 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -89,8 +89,8 @@ final class WDFM {
|
|
89 |
$this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
|
90 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
91 |
$this->main_file = plugin_basename(__FILE__);
|
92 |
-
$this->plugin_version = '1.12.
|
93 |
-
$this->db_version = '2.12.
|
94 |
$this->menu_slug = 'manage_fm';
|
95 |
$this->prefix = 'form_maker';
|
96 |
$this->css_prefix = 'fm_';
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
+
* Version: 1.12.17
|
7 |
* Author: WebDorado Form Builder Team
|
8 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
89 |
$this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
|
90 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
91 |
$this->main_file = plugin_basename(__FILE__);
|
92 |
+
$this->plugin_version = '1.12.17';
|
93 |
+
$this->db_version = '2.12.17';
|
94 |
$this->menu_slug = 'manage_fm';
|
95 |
$this->prefix = 'form_maker';
|
96 |
$this->css_prefix = 'fm_';
|
framework/WDW_FM_Library.php
CHANGED
@@ -127,7 +127,7 @@ class WDW_FM_Library {
|
|
127 |
break;
|
128 |
default: {
|
129 |
$message = '';
|
130 |
-
|
131 |
}
|
132 |
}
|
133 |
}
|
@@ -143,7 +143,7 @@ class WDW_FM_Library {
|
|
143 |
}
|
144 |
|
145 |
return $message;
|
146 |
-
}
|
147 |
|
148 |
/**
|
149 |
* Generate message.
|
@@ -161,7 +161,7 @@ class WDW_FM_Library {
|
|
161 |
}
|
162 |
return $message;
|
163 |
}
|
164 |
-
|
165 |
public static function fm_container($theme_id, $form_body) {
|
166 |
return '<div class="fm-form-container fm-theme' . $theme_id . '">' . $form_body . '</div>';
|
167 |
}
|
@@ -179,7 +179,7 @@ class WDW_FM_Library {
|
|
179 |
* @return string
|
180 |
*/
|
181 |
public static function ordering($id, $orderby, $order, $text, $page_url, $additional_class = '') {
|
182 |
-
$class = array(
|
183 |
($orderby == $id ? 'sorted': 'sortable'),
|
184 |
$order,
|
185 |
$additional_class,
|
@@ -202,31 +202,31 @@ class WDW_FM_Library {
|
|
202 |
public static function search($search_by, $search_value, $form_id) {
|
203 |
?>
|
204 |
<div class="alignleft actions" style="clear:both;">
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
<?php
|
231 |
}
|
232 |
|
@@ -243,13 +243,13 @@ class WDW_FM_Library {
|
|
243 |
<div class="alignleft actions" >
|
244 |
<label for="search_select_value" style="font-size:14px; width:50px; display:inline-block;"><?php echo $search_by; ?>:</label>
|
245 |
<select id="search_select_value" name="search_select_value" onchange="fm_search_select();" style="float: none; width: 150px;">
|
246 |
-
|
247 |
foreach ($playlists as $id => $playlist) {
|
248 |
?>
|
249 |
<option value="<?php echo $id; ?>" <?php echo (($search_select_value == $id) ? 'selected="selected"' : ''); ?>><?php echo $playlist; ?></option>
|
250 |
<?php
|
251 |
}
|
252 |
-
|
253 |
</select>
|
254 |
</div>
|
255 |
</div>
|
@@ -273,7 +273,7 @@ class WDW_FM_Library {
|
|
273 |
?>
|
274 |
<script type="text/javascript">
|
275 |
var items_county = <?php echo $items_county; ?>;
|
276 |
-
function fm_page(x, y) {
|
277 |
switch (y) {
|
278 |
case 1:
|
279 |
if (x >= items_county) {
|
@@ -300,8 +300,8 @@ class WDW_FM_Library {
|
|
300 |
default:
|
301 |
document.getElementById('page_number').value = 1;
|
302 |
}
|
303 |
-
|
304 |
-
|
305 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
306 |
}
|
307 |
|
@@ -309,12 +309,12 @@ class WDW_FM_Library {
|
|
309 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
310 |
if (key_code == 13) { /*Enter keycode*/
|
311 |
if (jQuery('#current_page').val() >= items_county) {
|
312 |
-
|
313 |
}
|
314 |
else {
|
315 |
-
|
316 |
}
|
317 |
-
|
318 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
319 |
}
|
320 |
return true;
|
@@ -330,22 +330,22 @@ class WDW_FM_Library {
|
|
330 |
</span>
|
331 |
<?php
|
332 |
if ($count_items > $items_per_page) {
|
333 |
-
|
334 |
-
|
|
|
|
|
|
|
|
|
|
|
335 |
$next_page = "next-page";
|
336 |
$last_page = "last-page";
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
$first_page = "first-page ";
|
345 |
-
$prev_page = "prev-page";
|
346 |
-
$next_page = "next-page disabled";
|
347 |
-
$last_page = "last-page disabled";
|
348 |
-
}
|
349 |
?>
|
350 |
<span class="pagination-links">
|
351 |
<a class="<?php echo $first_page; ?>" title="Go to the first page" href="javascript:fm_page(<?php echo $page_number; ?>,-2);">«</a>
|
@@ -353,7 +353,7 @@ class WDW_FM_Library {
|
|
353 |
<span class="paging-input">
|
354 |
<span class="total-pages">
|
355 |
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
|
356 |
-
</span> of
|
357 |
<span class="total-pages">
|
358 |
<?php echo $items_county; ?>
|
359 |
</span>
|
@@ -361,8 +361,8 @@ class WDW_FM_Library {
|
|
361 |
<a class="<?php echo $next_page ?>" title="Go to the next page" href="javascript:fm_page(<?php echo $page_number; ?>,1);">›</a>
|
362 |
<a class="<?php echo $last_page ?>" title="Go to the last page" href="javascript:fm_page(<?php echo $page_number; ?>,2);">»</a>
|
363 |
<?php
|
364 |
-
|
365 |
-
|
366 |
</span>
|
367 |
</div>
|
368 |
<input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
|
@@ -443,20 +443,20 @@ class WDW_FM_Library {
|
|
443 |
}
|
444 |
fm_ajax_save('<?php echo $form_id; ?>');
|
445 |
}
|
446 |
-
function check_enter_key(e) {
|
447 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
448 |
if (key_code == 13) { /*Enter keycode*/
|
449 |
if (jQuery('#current_page').val() >= items_county) {
|
450 |
-
|
451 |
}
|
452 |
else {
|
453 |
-
|
454 |
}
|
455 |
-
|
456 |
fm_ajax_save('<?php echo $form_id; ?>');
|
457 |
return false;
|
458 |
}
|
459 |
-
|
460 |
}
|
461 |
</script>
|
462 |
<div id="tablenav-pages" class="tablenav-pages">
|
@@ -469,22 +469,22 @@ class WDW_FM_Library {
|
|
469 |
</span>
|
470 |
<?php
|
471 |
if ($count_items > $limit) {
|
472 |
-
|
473 |
-
|
|
|
|
|
|
|
|
|
|
|
474 |
$next_page = "next-page";
|
475 |
$last_page = "last-page";
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
$first_page = "first-page ";
|
484 |
-
$prev_page = "prev-page";
|
485 |
-
$next_page = "next-page disabled";
|
486 |
-
$last_page = "last-page disabled";
|
487 |
-
}
|
488 |
?>
|
489 |
<span class="pagination-links">
|
490 |
<a class="<?php echo $first_page; ?>" title="Go to the first page" onclick="fm_page(<?php echo $page_number; ?>,-2)">«</a>
|
@@ -492,7 +492,7 @@ class WDW_FM_Library {
|
|
492 |
<span class="paging-input">
|
493 |
<span class="total-pages">
|
494 |
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
|
495 |
-
</span> of
|
496 |
<span class="total-pages">
|
497 |
<?php echo $items_county; ?>
|
498 |
</span>
|
@@ -500,8 +500,8 @@ class WDW_FM_Library {
|
|
500 |
<a class="<?php echo $next_page ?>" title="Go to the next page" onclick="fm_page(<?php echo $page_number; ?>,1)">›</a>
|
501 |
<a class="<?php echo $last_page ?>" title="Go to the last page" onclick="fm_page(<?php echo $page_number; ?>,2)">»</a>
|
502 |
<?php
|
503 |
-
|
504 |
-
|
505 |
</span>
|
506 |
</div>
|
507 |
<input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
|
@@ -520,9 +520,9 @@ class WDW_FM_Library {
|
|
520 |
}
|
521 |
|
522 |
public static function get_google_fonts() {
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
|
527 |
public static function cleanData( &$str ) {
|
528 |
$str = preg_replace("/\t/", "\\t", $str);
|
@@ -1389,7 +1389,7 @@ class WDW_FM_Library {
|
|
1389 |
}
|
1390 |
if ( $blur ) {
|
1391 |
$condition_js .= '
|
1392 |
-
jQuery("' . substr($blur, 0, -2) . '").blur(function() {
|
1393 |
if(' . $if . ')
|
1394 |
jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display . ';
|
1395 |
else
|
@@ -1832,7 +1832,7 @@ class WDW_FM_Library {
|
|
1832 |
else {
|
1833 |
if(jQuery("#wdform_' . $id1 . '_state' . $form_id . '").prop("tagName") == "SELECT") {
|
1834 |
jQuery("#wdform_' . $id1 . '_state' . $form_id . '").parent().append("<input type=\"text\" id=\"wdform_' . $id1 . '_state' . $form_id . '\" name=\"wdform_' . ($id1 + 3) . '_state' . $form_id . '\" value=\"' . (isset($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id])) : "") . '\" style=\"width: 100%;\" ' . $param['attributes'] . '><label class=\"mini_label\">' . $w_mini_labels[3] . '</label>");
|
1835 |
-
jQuery("#wdform_' . $id1 . '_state' . $form_id . '").parent().children("select:first, label:first").remove();
|
1836 |
}
|
1837 |
}
|
1838 |
});';
|
@@ -2257,7 +2257,7 @@ class WDW_FM_Library {
|
|
2257 |
}
|
2258 |
$date_format= str_replace('%', '', $param['w_format']);
|
2259 |
|
2260 |
-
$onsubmit_js .= '
|
2261 |
jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_date_format' . $form_id . '\" value=\"' . $date_format . '\" />").appendTo("#form' . $form_id . '");';
|
2262 |
break;
|
2263 |
}
|
@@ -2371,8 +2371,8 @@ class WDW_FM_Library {
|
|
2371 |
return [ invalid_dates_finish.indexOf(string_days) == -1 ' . $w_hide_sunday . $w_hide_monday . $w_hide_tuesday . $w_hide_wednesday . $w_hide_thursday . $w_hide_friday . $w_hide_saturday . '];
|
2372 |
}
|
2373 |
});
|
2374 |
-
var default_date;
|
2375 |
-
var date_value = jQuery("#wdform_' . $id1 . '_element' . $form_id . '").val();
|
2376 |
(date_value != "") ? default_date = date_value : default_date = "' . $default_date . '";
|
2377 |
var format_date = "' . $param['w_format'] . '";
|
2378 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '").datepicker("option", "dateFormat", format_date);
|
@@ -2383,7 +2383,6 @@ class WDW_FM_Library {
|
|
2383 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '").datepicker("setDate", default_date);
|
2384 |
}
|
2385 |
else {
|
2386 |
-
|
2387 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '").datepicker("setDate", default_date);
|
2388 |
}';
|
2389 |
break;
|
@@ -2508,9 +2507,9 @@ class WDW_FM_Library {
|
|
2508 |
return [ invalid_dates_finish.indexOf(string_days) == -1 ' . $w_hide_sunday . $w_hide_monday . $w_hide_tuesday . $w_hide_wednesday . $w_hide_thursday . $w_hide_friday . $w_hide_saturday . '];
|
2509 |
}
|
2510 |
});
|
2511 |
-
var default_date_start;
|
2512 |
-
var date_start_value = jQuery("#wdform_' . $id1 . '_element' . $form_id . '0").val();
|
2513 |
-
(date_start_value != "") ? default_date_start = date_start_value : default_date_start = "' . $param['w_default_date_start'] . '";
|
2514 |
var format_date = "' . $param['w_format'] . '";
|
2515 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '").datepicker("option", "dateFormat", format_date);
|
2516 |
if(default_date_start =="today") {
|
@@ -2532,8 +2531,8 @@ class WDW_FM_Library {
|
|
2532 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '1").datepicker("option", "minDate", default_date_start);
|
2533 |
}
|
2534 |
var default_date_end;
|
2535 |
-
var date_end_value = jQuery("#wdform_' . $id1 . '_element' . $form_id . '1").val();
|
2536 |
-
(date_end_value != "") ? default_date_end = date_end_value : default_date_end = "' . $param['w_default_date_end'] . '";
|
2537 |
var format_date = "' . $param['w_format'] . '";
|
2538 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '0").datepicker("option", "dateFormat", format_date);
|
2539 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '1").datepicker("option", "dateFormat", format_date);
|
@@ -3338,7 +3337,7 @@ class WDW_FM_Library {
|
|
3338 |
jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '")[0].spin = null;
|
3339 |
spinner = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner();
|
3340 |
if ("' . $param['w_field_value'] . '" == "null") { spinner.spinner("value", ""); }
|
3341 |
-
jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ min: "' . $param['w_field_min_value'] . '"});
|
3342 |
jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ max: "' . $param['w_field_max_value'] . '"});
|
3343 |
jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: "' . $param['w_field_step'] . '"});';
|
3344 |
if ( $required ) {
|
@@ -3542,7 +3541,7 @@ class WDW_FM_Library {
|
|
3542 |
}
|
3543 |
}
|
3544 |
$onsubmit_js .= '
|
3545 |
-
var disabled_fields = "";
|
3546 |
jQuery("#form' . $form_id . ' div[wdid]").each(function() {
|
3547 |
if(jQuery(this).css("display") == "none") {
|
3548 |
disabled_fields += jQuery(this).attr("wdid");
|
@@ -3686,7 +3685,7 @@ class WDW_FM_Library {
|
|
3686 |
}
|
3687 |
foreach ( $label_id as $key => $label ) {
|
3688 |
if ( in_array($label, $labels) && $label_type[$key] != 'type_arithmetic_captcha'
|
3689 |
-
|
3690 |
array_push($sorted_labels, $label_order[$key]);
|
3691 |
array_push($sorted_labels_id, $label);
|
3692 |
array_push($label_titles, stripslashes($label_order_original[$key]));
|
@@ -3891,7 +3890,7 @@ class WDW_FM_Library {
|
|
3891 |
|
3892 |
return $params;
|
3893 |
}
|
3894 |
-
|
3895 |
/**
|
3896 |
* No items.
|
3897 |
*
|
@@ -3903,58 +3902,58 @@ class WDW_FM_Library {
|
|
3903 |
$title = ($title != '') ? strtolower($title) : 'items';
|
3904 |
ob_start();
|
3905 |
?><tr class="no-items">
|
3906 |
-
|
3907 |
</tr><?php
|
3908 |
return ob_get_clean();
|
3909 |
}
|
3910 |
|
3911 |
-
|
3912 |
* Get current page url.
|
3913 |
*
|
3914 |
* @return string
|
3915 |
*/
|
3916 |
-
|
3917 |
-
|
3918 |
-
|
3919 |
-
|
3920 |
-
|
3921 |
-
|
3922 |
* Get all addons.
|
3923 |
*
|
3924 |
* @return array $addons
|
3925 |
*/
|
3926 |
-
|
3927 |
-
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
|
3933 |
-
|
3934 |
-
|
3935 |
-
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
3939 |
-
|
3940 |
-
|
3941 |
-
|
3942 |
-
|
3943 |
|
3944 |
/**
|
3945 |
* Deactivate all addons.
|
3946 |
*
|
3947 |
* @return bool $addon
|
3948 |
*/
|
3949 |
-
|
3950 |
-
|
3951 |
-
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
3955 |
-
|
3956 |
-
|
3957 |
-
|
3958 |
|
3959 |
/**
|
3960 |
* Get countries list.
|
@@ -4251,13 +4250,13 @@ class WDW_FM_Library {
|
|
4251 |
})';
|
4252 |
}
|
4253 |
|
4254 |
-
|
4255 |
* Forbidden template.
|
4256 |
*
|
4257 |
* @return string
|
4258 |
*/
|
4259 |
-
|
4260 |
-
|
4261 |
<html>
|
4262 |
<head>
|
4263 |
<title>403 Forbidden</title>
|
@@ -4266,7 +4265,7 @@ class WDW_FM_Library {
|
|
4266 |
<p>Directory access is forbidden.</p>
|
4267 |
</body>
|
4268 |
</html>';
|
4269 |
-
|
4270 |
|
4271 |
/**
|
4272 |
* Sanitize parameters and send email.
|
@@ -4279,48 +4278,54 @@ class WDW_FM_Library {
|
|
4279 |
*
|
4280 |
* @return bool
|
4281 |
*/
|
4282 |
-
|
4283 |
-
|
4284 |
$recipient = explode(',', $recipient);
|
4285 |
$recipient = array_map('trim', $recipient);
|
4286 |
if ( empty($recipient) ) {
|
4287 |
return FALSE;
|
4288 |
}
|
4289 |
|
|
|
|
|
4290 |
$subject = html_entity_decode($subject, ENT_QUOTES);
|
4291 |
$subject = stripslashes($subject);
|
|
|
4292 |
|
4293 |
$message = stripslashes($message);
|
4294 |
|
4295 |
$headers = array();
|
4296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4297 |
if ( isset($header_arr['from']) && $header_arr['from'] ) {
|
4298 |
$from = $header_arr['from'];
|
4299 |
$from = trim($from);
|
4300 |
$from = trim($from, ',');
|
4301 |
-
//
|
4302 |
-
|
4303 |
-
|
4304 |
-
|
4305 |
-
$from_name = stripslashes($from_name);
|
4306 |
-
// $from_str .= "'" . $from_name . "' ";
|
4307 |
-
self::$email_from_name = $from_name;
|
4308 |
-
add_filter('wp_mail_from_name', array('WDW_FM_Library', 'mail_from_name'));
|
4309 |
-
}
|
4310 |
-
// $from_str .= "<" . $from . ">";
|
4311 |
-
// $headers[] = $from_str;
|
4312 |
self::$email_from = $from;
|
4313 |
add_filter('wp_mail_from', array('WDW_FM_Library', 'mail_from'));
|
4314 |
}
|
4315 |
|
4316 |
if ( isset($header_arr['content_type']) && $header_arr['content_type'] ) {
|
4317 |
-
// $headers[] = "Content-Type: " . $header_arr['content_type'];
|
4318 |
self::$email_content_type = $header_arr['content_type'];
|
4319 |
add_filter('wp_mail_content_type', array('WDW_FM_Library', 'mail_content_type'));
|
4320 |
}
|
4321 |
|
4322 |
if ( isset($header_arr['charset']) && $header_arr['charset'] ) {
|
4323 |
-
// $headers[] = $header_arr['charset'];
|
4324 |
self::$email_charset = $header_arr['charset'];
|
4325 |
add_filter('wp_mail_charset', array('WDW_FM_Library', 'mail_charset'));
|
4326 |
}
|
@@ -4359,7 +4364,7 @@ class WDW_FM_Library {
|
|
4359 |
public static $email_charset;
|
4360 |
public static $email_from;
|
4361 |
public static $email_from_name;
|
4362 |
-
|
4363 |
return self::$email_content_type;
|
4364 |
}
|
4365 |
public static function mail_charset() {
|
@@ -4372,7 +4377,7 @@ class WDW_FM_Library {
|
|
4372 |
return self::$email_from_name;
|
4373 |
}
|
4374 |
}
|
4375 |
-
|
4376 |
/*
|
4377 |
* Rre.
|
4378 |
*
|
@@ -4382,14 +4387,14 @@ class WDW_FM_Library {
|
|
4382 |
* @return string $data
|
4383 |
*/
|
4384 |
if (!function_exists('pre')) {
|
4385 |
-
|
4386 |
-
|
4387 |
-
|
4388 |
-
|
4389 |
-
|
4390 |
-
|
4391 |
-
|
4392 |
-
|
4393 |
-
|
4394 |
-
|
4395 |
}
|
127 |
break;
|
128 |
default: {
|
129 |
$message = '';
|
130 |
+
break;
|
131 |
}
|
132 |
}
|
133 |
}
|
143 |
}
|
144 |
|
145 |
return $message;
|
146 |
+
}
|
147 |
|
148 |
/**
|
149 |
* Generate message.
|
161 |
}
|
162 |
return $message;
|
163 |
}
|
164 |
+
|
165 |
public static function fm_container($theme_id, $form_body) {
|
166 |
return '<div class="fm-form-container fm-theme' . $theme_id . '">' . $form_body . '</div>';
|
167 |
}
|
179 |
* @return string
|
180 |
*/
|
181 |
public static function ordering($id, $orderby, $order, $text, $page_url, $additional_class = '') {
|
182 |
+
$class = array(
|
183 |
($orderby == $id ? 'sorted': 'sortable'),
|
184 |
$order,
|
185 |
$additional_class,
|
202 |
public static function search($search_by, $search_value, $form_id) {
|
203 |
?>
|
204 |
<div class="alignleft actions" style="clear:both;">
|
205 |
+
<script>
|
206 |
+
function fm_search() {
|
207 |
+
document.getElementById("page_number").value = "1";
|
208 |
+
document.getElementById("search_or_not").value = "search";
|
209 |
+
document.getElementById("<?php echo $form_id; ?>").submit();
|
210 |
+
}
|
211 |
+
function fm_reset() {
|
212 |
+
if (document.getElementById("search_value")) {
|
213 |
+
document.getElementById("search_value").value = "";
|
214 |
+
}
|
215 |
+
if (document.getElementById("search_select_value")) {
|
216 |
+
document.getElementById("search_select_value").value = 0;
|
217 |
+
}
|
218 |
+
document.getElementById("<?php echo $form_id; ?>").submit();
|
219 |
+
}
|
220 |
+
</script>
|
221 |
+
<div class="fm-search">
|
222 |
+
<label for="search_value"><?php echo $search_by; ?>:</label>
|
223 |
+
<input type="text" id="search_value" name="search_value" value="<?php echo esc_html($search_value); ?>"/>
|
224 |
+
<button class="fm-icon search-icon" onclick="fm_search()">
|
225 |
+
</button>
|
226 |
+
<button class="fm-icon reset-icon" onclick="fm_reset()">
|
227 |
+
</button>
|
228 |
+
</div>
|
229 |
+
</div>
|
230 |
<?php
|
231 |
}
|
232 |
|
243 |
<div class="alignleft actions" >
|
244 |
<label for="search_select_value" style="font-size:14px; width:50px; display:inline-block;"><?php echo $search_by; ?>:</label>
|
245 |
<select id="search_select_value" name="search_select_value" onchange="fm_search_select();" style="float: none; width: 150px;">
|
246 |
+
<?php
|
247 |
foreach ($playlists as $id => $playlist) {
|
248 |
?>
|
249 |
<option value="<?php echo $id; ?>" <?php echo (($search_select_value == $id) ? 'selected="selected"' : ''); ?>><?php echo $playlist; ?></option>
|
250 |
<?php
|
251 |
}
|
252 |
+
?>
|
253 |
</select>
|
254 |
</div>
|
255 |
</div>
|
273 |
?>
|
274 |
<script type="text/javascript">
|
275 |
var items_county = <?php echo $items_county; ?>;
|
276 |
+
function fm_page(x, y) {
|
277 |
switch (y) {
|
278 |
case 1:
|
279 |
if (x >= items_county) {
|
300 |
default:
|
301 |
document.getElementById('page_number').value = 1;
|
302 |
}
|
303 |
+
|
304 |
+
jQuery('#pagination_clicked').val('1');
|
305 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
306 |
}
|
307 |
|
309 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
310 |
if (key_code == 13) { /*Enter keycode*/
|
311 |
if (jQuery('#current_page').val() >= items_county) {
|
312 |
+
document.getElementById('page_number').value = items_county;
|
313 |
}
|
314 |
else {
|
315 |
+
document.getElementById('page_number').value = jQuery('#current_page').val();
|
316 |
}
|
317 |
+
jQuery('#pagination_clicked').val('1');
|
318 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
319 |
}
|
320 |
return true;
|
330 |
</span>
|
331 |
<?php
|
332 |
if ($count_items > $items_per_page) {
|
333 |
+
$first_page = "first-page";
|
334 |
+
$prev_page = "prev-page";
|
335 |
+
$next_page = "next-page";
|
336 |
+
$last_page = "last-page";
|
337 |
+
if ($page_number == 1) {
|
338 |
+
$first_page = "first-page disabled";
|
339 |
+
$prev_page = "prev-page disabled";
|
340 |
$next_page = "next-page";
|
341 |
$last_page = "last-page";
|
342 |
+
}
|
343 |
+
if ($page_number >= $items_county) {
|
344 |
+
$first_page = "first-page ";
|
345 |
+
$prev_page = "prev-page";
|
346 |
+
$next_page = "next-page disabled";
|
347 |
+
$last_page = "last-page disabled";
|
348 |
+
}
|
|
|
|
|
|
|
|
|
|
|
349 |
?>
|
350 |
<span class="pagination-links">
|
351 |
<a class="<?php echo $first_page; ?>" title="Go to the first page" href="javascript:fm_page(<?php echo $page_number; ?>,-2);">«</a>
|
353 |
<span class="paging-input">
|
354 |
<span class="total-pages">
|
355 |
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
|
356 |
+
</span> of
|
357 |
<span class="total-pages">
|
358 |
<?php echo $items_county; ?>
|
359 |
</span>
|
361 |
<a class="<?php echo $next_page ?>" title="Go to the next page" href="javascript:fm_page(<?php echo $page_number; ?>,1);">›</a>
|
362 |
<a class="<?php echo $last_page ?>" title="Go to the last page" href="javascript:fm_page(<?php echo $page_number; ?>,2);">»</a>
|
363 |
<?php
|
364 |
+
}
|
365 |
+
?>
|
366 |
</span>
|
367 |
</div>
|
368 |
<input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
|
443 |
}
|
444 |
fm_ajax_save('<?php echo $form_id; ?>');
|
445 |
}
|
446 |
+
function check_enter_key(e) {
|
447 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
448 |
if (key_code == 13) { /*Enter keycode*/
|
449 |
if (jQuery('#current_page').val() >= items_county) {
|
450 |
+
document.getElementById('page_number').value = items_county;
|
451 |
}
|
452 |
else {
|
453 |
+
document.getElementById('page_number').value = jQuery('#current_page').val();
|
454 |
}
|
455 |
+
|
456 |
fm_ajax_save('<?php echo $form_id; ?>');
|
457 |
return false;
|
458 |
}
|
459 |
+
return true;
|
460 |
}
|
461 |
</script>
|
462 |
<div id="tablenav-pages" class="tablenav-pages">
|
469 |
</span>
|
470 |
<?php
|
471 |
if ($count_items > $limit) {
|
472 |
+
$first_page = "first-page";
|
473 |
+
$prev_page = "prev-page";
|
474 |
+
$next_page = "next-page";
|
475 |
+
$last_page = "last-page";
|
476 |
+
if ($page_number == 1) {
|
477 |
+
$first_page = "first-page disabled";
|
478 |
+
$prev_page = "prev-page disabled";
|
479 |
$next_page = "next-page";
|
480 |
$last_page = "last-page";
|
481 |
+
}
|
482 |
+
if ($page_number >= $items_county) {
|
483 |
+
$first_page = "first-page ";
|
484 |
+
$prev_page = "prev-page";
|
485 |
+
$next_page = "next-page disabled";
|
486 |
+
$last_page = "last-page disabled";
|
487 |
+
}
|
|
|
|
|
|
|
|
|
|
|
488 |
?>
|
489 |
<span class="pagination-links">
|
490 |
<a class="<?php echo $first_page; ?>" title="Go to the first page" onclick="fm_page(<?php echo $page_number; ?>,-2)">«</a>
|
492 |
<span class="paging-input">
|
493 |
<span class="total-pages">
|
494 |
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
|
495 |
+
</span> of
|
496 |
<span class="total-pages">
|
497 |
<?php echo $items_county; ?>
|
498 |
</span>
|
500 |
<a class="<?php echo $next_page ?>" title="Go to the next page" onclick="fm_page(<?php echo $page_number; ?>,1)">›</a>
|
501 |
<a class="<?php echo $last_page ?>" title="Go to the last page" onclick="fm_page(<?php echo $page_number; ?>,2)">»</a>
|
502 |
<?php
|
503 |
+
}
|
504 |
+
?>
|
505 |
</span>
|
506 |
</div>
|
507 |
<input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
|
520 |
}
|
521 |
|
522 |
public static function get_google_fonts() {
|
523 |
+
$google_fonts = array( 'Open Sans' => 'Open Sans', 'Oswald' => 'Oswald', 'Droid Sans' => 'Droid Sans', 'Lato' => 'Lato', 'Open Sans Condensed' => 'Open Sans Condensed', 'PT Sans' => 'PT Sans', 'Ubuntu' => 'Ubuntu', 'PT Sans Narrow' => 'PT Sans Narrow', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Roboto Condensed' => 'Roboto Condensed', 'Source Sans Pro' => 'Source Sans Pro', 'Nunito' => 'Nunito', 'Francois One' => 'Francois One', 'Roboto' => 'Roboto', 'Raleway' => 'Raleway', 'Arimo' => 'Arimo', 'Cuprum' => 'Cuprum', 'Play' => 'Play', 'Dosis' => 'Dosis', 'Abel' => 'Abel', 'Droid Serif' => 'Droid Serif', 'Arvo' => 'Arvo', 'Lora' => 'Lora', 'Rokkitt' => 'Rokkitt', 'PT Serif' => 'PT Serif', 'Bitter' => 'Bitter', 'Merriweather' => 'Merriweather', 'Vollkorn' => 'Vollkorn', 'Cantata One' => 'Cantata One', 'Kreon' => 'Kreon', 'Josefin Slab' => 'Josefin Slab', 'Playfair Display' => 'Playfair Display', 'Bree Serif' => 'Bree Serif', 'Crimson Text' => 'Crimson Text', 'Old Standard TT' => 'Old Standard TT', 'Sanchez' => 'Sanchez', 'Crete Round' => 'Crete Round', 'Cardo' => 'Cardo', 'Noticia Text' => 'Noticia Text', 'Judson' => 'Judson', 'Lobster' => 'Lobster', 'Unkempt' => 'Unkempt', 'Changa One' => 'Changa One', 'Special Elite' => 'Special Elite', 'Chewy' => 'Chewy', 'Comfortaa' => 'Comfortaa', 'Boogaloo' => 'Boogaloo', 'Fredoka One' => 'Fredoka One', 'Luckiest Guy' => 'Luckiest Guy', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Lobster Two' => 'Lobster Two', 'Righteous' => 'Righteous', 'Squada One' => 'Squada One', 'Black Ops One' => 'Black Ops One', 'Happy Monkey' => 'Happy Monkey', 'Passion One' => 'Passion One', 'Nova Square' => 'Nova Square', 'Metamorphous' => 'Metamorphous', 'Poiret One' => 'Poiret One', 'Bevan' => 'Bevan', 'Shadows Into Light' => 'Shadows Into Light', 'The Girl Next Door' => 'The Girl Next Door', 'Coming Soon' => 'Coming Soon', 'Dancing Script' => 'Dancing Script', 'Pacifico' => 'Pacifico', 'Crafty Girls' => 'Crafty Girls', 'Calligraffitti' => 'Calligraffitti', 'Rock Salt' => 'Rock Salt', 'Amatic SC' => 'Amatic SC', 'Leckerli One' => 'Leckerli One', 'Tangerine' => 'Tangerine', 'Reenie Beanie' => 'Reenie Beanie', 'Satisfy' => 'Satisfy', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Permanent Marker' => 'Permanent Marker', 'Covered By Your Grace' => 'Covered By Your Grace', 'Walter Turncoat' => 'Walter Turncoat', 'Patrick Hand' => 'Patrick Hand', 'Schoolbell' => 'Schoolbell', 'Indie Flower' => 'Indie Flower' );
|
524 |
+
return $google_fonts;
|
525 |
+
}
|
526 |
|
527 |
public static function cleanData( &$str ) {
|
528 |
$str = preg_replace("/\t/", "\\t", $str);
|
1389 |
}
|
1390 |
if ( $blur ) {
|
1391 |
$condition_js .= '
|
1392 |
+
jQuery("' . substr($blur, 0, -2) . '").blur(function() {
|
1393 |
if(' . $if . ')
|
1394 |
jQuery("#form' . $form_id . ' div[wdid=' . $field_label[$k] . ']").' . $display . ';
|
1395 |
else
|
1832 |
else {
|
1833 |
if(jQuery("#wdform_' . $id1 . '_state' . $form_id . '").prop("tagName") == "SELECT") {
|
1834 |
jQuery("#wdform_' . $id1 . '_state' . $form_id . '").parent().append("<input type=\"text\" id=\"wdform_' . $id1 . '_state' . $form_id . '\" name=\"wdform_' . ($id1 + 3) . '_state' . $form_id . '\" value=\"' . (isset($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . ($id1 + 3) . '_state' . $form_id])) : "") . '\" style=\"width: 100%;\" ' . $param['attributes'] . '><label class=\"mini_label\">' . $w_mini_labels[3] . '</label>");
|
1835 |
+
jQuery("#wdform_' . $id1 . '_state' . $form_id . '").parent().children("select:first, label:first").remove();
|
1836 |
}
|
1837 |
}
|
1838 |
});';
|
2257 |
}
|
2258 |
$date_format= str_replace('%', '', $param['w_format']);
|
2259 |
|
2260 |
+
$onsubmit_js .= '
|
2261 |
jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_date_format' . $form_id . '\" value=\"' . $date_format . '\" />").appendTo("#form' . $form_id . '");';
|
2262 |
break;
|
2263 |
}
|
2371 |
return [ invalid_dates_finish.indexOf(string_days) == -1 ' . $w_hide_sunday . $w_hide_monday . $w_hide_tuesday . $w_hide_wednesday . $w_hide_thursday . $w_hide_friday . $w_hide_saturday . '];
|
2372 |
}
|
2373 |
});
|
2374 |
+
var default_date;
|
2375 |
+
var date_value = jQuery("#wdform_' . $id1 . '_element' . $form_id . '").val();
|
2376 |
(date_value != "") ? default_date = date_value : default_date = "' . $default_date . '";
|
2377 |
var format_date = "' . $param['w_format'] . '";
|
2378 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '").datepicker("option", "dateFormat", format_date);
|
2383 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '").datepicker("setDate", default_date);
|
2384 |
}
|
2385 |
else {
|
|
|
2386 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '").datepicker("setDate", default_date);
|
2387 |
}';
|
2388 |
break;
|
2507 |
return [ invalid_dates_finish.indexOf(string_days) == -1 ' . $w_hide_sunday . $w_hide_monday . $w_hide_tuesday . $w_hide_wednesday . $w_hide_thursday . $w_hide_friday . $w_hide_saturday . '];
|
2508 |
}
|
2509 |
});
|
2510 |
+
var default_date_start;
|
2511 |
+
var date_start_value = jQuery("#wdform_' . $id1 . '_element' . $form_id . '0").val();
|
2512 |
+
(date_start_value != "") ? default_date_start = date_start_value : default_date_start = "' . $param['w_default_date_start'] . '";
|
2513 |
var format_date = "' . $param['w_format'] . '";
|
2514 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '").datepicker("option", "dateFormat", format_date);
|
2515 |
if(default_date_start =="today") {
|
2531 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '1").datepicker("option", "minDate", default_date_start);
|
2532 |
}
|
2533 |
var default_date_end;
|
2534 |
+
var date_end_value = jQuery("#wdform_' . $id1 . '_element' . $form_id . '1").val();
|
2535 |
+
(date_end_value != "") ? default_date_end = date_end_value : default_date_end = "' . $param['w_default_date_end'] . '";
|
2536 |
var format_date = "' . $param['w_format'] . '";
|
2537 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '0").datepicker("option", "dateFormat", format_date);
|
2538 |
jQuery("#wdform_' . $id1 . '_element' . $form_id . '1").datepicker("option", "dateFormat", format_date);
|
3337 |
jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '")[0].spin = null;
|
3338 |
spinner = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner();
|
3339 |
if ("' . $param['w_field_value'] . '" == "null") { spinner.spinner("value", ""); }
|
3340 |
+
jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ min: "' . $param['w_field_min_value'] . '"});
|
3341 |
jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ max: "' . $param['w_field_max_value'] . '"});
|
3342 |
jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: "' . $param['w_field_step'] . '"});';
|
3343 |
if ( $required ) {
|
3541 |
}
|
3542 |
}
|
3543 |
$onsubmit_js .= '
|
3544 |
+
var disabled_fields = "";
|
3545 |
jQuery("#form' . $form_id . ' div[wdid]").each(function() {
|
3546 |
if(jQuery(this).css("display") == "none") {
|
3547 |
disabled_fields += jQuery(this).attr("wdid");
|
3685 |
}
|
3686 |
foreach ( $label_id as $key => $label ) {
|
3687 |
if ( in_array($label, $labels) && $label_type[$key] != 'type_arithmetic_captcha'
|
3688 |
+
&& in_array($label, $labels) && $label_type[$key] != 'type_stripe' ) {
|
3689 |
array_push($sorted_labels, $label_order[$key]);
|
3690 |
array_push($sorted_labels_id, $label);
|
3691 |
array_push($label_titles, stripslashes($label_order_original[$key]));
|
3890 |
|
3891 |
return $params;
|
3892 |
}
|
3893 |
+
|
3894 |
/**
|
3895 |
* No items.
|
3896 |
*
|
3902 |
$title = ($title != '') ? strtolower($title) : 'items';
|
3903 |
ob_start();
|
3904 |
?><tr class="no-items">
|
3905 |
+
<td class="colspanchange" colspan="0"><?php echo sprintf(__('No %s found.', WDFM()->prefix), $title); ?></td>
|
3906 |
</tr><?php
|
3907 |
return ob_get_clean();
|
3908 |
}
|
3909 |
|
3910 |
+
/**
|
3911 |
* Get current page url.
|
3912 |
*
|
3913 |
* @return string
|
3914 |
*/
|
3915 |
+
public static function get_current_page_url() {
|
3916 |
+
global $wp;
|
3917 |
+
return add_query_arg( $_SERVER['QUERY_STRING'], '', home_url( $wp->request ) );
|
3918 |
+
}
|
3919 |
+
|
3920 |
+
/**
|
3921 |
* Get all addons.
|
3922 |
*
|
3923 |
* @return array $addons
|
3924 |
*/
|
3925 |
+
public static function get_all_addons_path() {
|
3926 |
+
$addons = array(
|
3927 |
+
'form-maker-export-import/fm_exp_imp.php',
|
3928 |
+
'form-maker-save-progress/fm_save.php',
|
3929 |
+
'form-maker-conditional-emails/fm_conditional_emails.php',
|
3930 |
+
'form-maker-pushover/fm_pushover.php',
|
3931 |
+
'form-maker-mailchimp/fm_mailchimp.php',
|
3932 |
+
'form-maker-reg/fm_reg.php',
|
3933 |
+
'form-maker-post-generation/fm_post_generation.php',
|
3934 |
+
'form-maker-dropbox-integration/fm_dropbox_integration.php',
|
3935 |
+
'form-maker-gdrive-integration/fm_gdrive_integration.php',
|
3936 |
+
'form-maker-pdf-integration/fm_pdf_integration.php',
|
3937 |
+
'form-maker-stripe/fm_stripe.php',
|
3938 |
+
'form-maker-calculator/fm_calculator.php'
|
3939 |
+
);
|
3940 |
+
return $addons;
|
3941 |
+
}
|
3942 |
|
3943 |
/**
|
3944 |
* Deactivate all addons.
|
3945 |
*
|
3946 |
* @return bool $addon
|
3947 |
*/
|
3948 |
+
public static function deactivate_all_addons() {
|
3949 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
3950 |
+
$addons = WDW_FM_Library::get_all_addons_path();
|
3951 |
+
foreach ( $addons as $addon ) {
|
3952 |
+
if( is_plugin_active( $addon ) ) {
|
3953 |
+
deactivate_plugins( $addon );
|
3954 |
+
}
|
3955 |
+
}
|
3956 |
+
}
|
3957 |
|
3958 |
/**
|
3959 |
* Get countries list.
|
4250 |
})';
|
4251 |
}
|
4252 |
|
4253 |
+
/**
|
4254 |
* Forbidden template.
|
4255 |
*
|
4256 |
* @return string
|
4257 |
*/
|
4258 |
+
public static function forbidden_template() {
|
4259 |
+
return '<!DOCTYPE html>
|
4260 |
<html>
|
4261 |
<head>
|
4262 |
<title>403 Forbidden</title>
|
4265 |
<p>Directory access is forbidden.</p>
|
4266 |
</body>
|
4267 |
</html>';
|
4268 |
+
}
|
4269 |
|
4270 |
/**
|
4271 |
* Sanitize parameters and send email.
|
4278 |
*
|
4279 |
* @return bool
|
4280 |
*/
|
4281 |
+
public static function mail($recipient, $subject, $message = '', $header_arr = array(), $attachment = array()) {
|
4282 |
+
$recipient = trim($recipient, ',');
|
4283 |
$recipient = explode(',', $recipient);
|
4284 |
$recipient = array_map('trim', $recipient);
|
4285 |
if ( empty($recipient) ) {
|
4286 |
return FALSE;
|
4287 |
}
|
4288 |
|
4289 |
+
mb_internal_encoding('UTF-8');
|
4290 |
+
|
4291 |
$subject = html_entity_decode($subject, ENT_QUOTES);
|
4292 |
$subject = stripslashes($subject);
|
4293 |
+
$subject = mb_encode_mimeheader($subject, 'UTF-8', 'Q');
|
4294 |
|
4295 |
$message = stripslashes($message);
|
4296 |
|
4297 |
$headers = array();
|
4298 |
|
4299 |
+
if ( isset($header_arr['from_name']) && $header_arr['from_name'] ) {
|
4300 |
+
$from_name = $header_arr['from_name'];
|
4301 |
+
$from_name = html_entity_decode($from_name, ENT_QUOTES);
|
4302 |
+
$from_name = stripslashes($from_name);
|
4303 |
+
$from_name = mb_encode_mimeheader($from_name, 'UTF-8', 'Q');
|
4304 |
+
// $from_str .= "'" . $from_name . "' ";
|
4305 |
+
self::$email_from_name = $from_name;
|
4306 |
+
add_filter('wp_mail_from_name', array('WDW_FM_Library', 'mail_from_name'));
|
4307 |
+
}
|
4308 |
+
|
4309 |
if ( isset($header_arr['from']) && $header_arr['from'] ) {
|
4310 |
$from = $header_arr['from'];
|
4311 |
$from = trim($from);
|
4312 |
$from = trim($from, ',');
|
4313 |
+
// $from_str = "From: ";
|
4314 |
+
|
4315 |
+
// $from_str .= "<" . $from . ">";
|
4316 |
+
// $headers[] = $from_str;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4317 |
self::$email_from = $from;
|
4318 |
add_filter('wp_mail_from', array('WDW_FM_Library', 'mail_from'));
|
4319 |
}
|
4320 |
|
4321 |
if ( isset($header_arr['content_type']) && $header_arr['content_type'] ) {
|
4322 |
+
// $headers[] = "Content-Type: " . $header_arr['content_type'];
|
4323 |
self::$email_content_type = $header_arr['content_type'];
|
4324 |
add_filter('wp_mail_content_type', array('WDW_FM_Library', 'mail_content_type'));
|
4325 |
}
|
4326 |
|
4327 |
if ( isset($header_arr['charset']) && $header_arr['charset'] ) {
|
4328 |
+
// $headers[] = $header_arr['charset'];
|
4329 |
self::$email_charset = $header_arr['charset'];
|
4330 |
add_filter('wp_mail_charset', array('WDW_FM_Library', 'mail_charset'));
|
4331 |
}
|
4364 |
public static $email_charset;
|
4365 |
public static $email_from;
|
4366 |
public static $email_from_name;
|
4367 |
+
public static function mail_content_type() {
|
4368 |
return self::$email_content_type;
|
4369 |
}
|
4370 |
public static function mail_charset() {
|
4377 |
return self::$email_from_name;
|
4378 |
}
|
4379 |
}
|
4380 |
+
|
4381 |
/*
|
4382 |
* Rre.
|
4383 |
*
|
4387 |
* @return string $data
|
4388 |
*/
|
4389 |
if (!function_exists('pre')) {
|
4390 |
+
function pre($data = false, $e = false)
|
4391 |
+
{
|
4392 |
+
$bt = debug_backtrace();
|
4393 |
+
$caller = array_shift($bt);
|
4394 |
+
print "<pre><xmp>";
|
4395 |
+
print_r($data);
|
4396 |
+
print "\r\n Called in : " . $caller['file'] . ", At line:" . $caller['line'];
|
4397 |
+
echo "</xmp></pre>\n";
|
4398 |
+
if ($e) { exit; }
|
4399 |
+
}
|
4400 |
}
|
frontend/models/form_maker.php
CHANGED
@@ -3061,8 +3061,8 @@ class FMModelForm_maker {
|
|
3061 |
|
3062 |
if ( $row->mail_from_user != '' ) {
|
3063 |
$header_arr['from'] = $row->mail_from_user;
|
3064 |
-
$header_arr['from_name'] = $fromname;
|
3065 |
}
|
|
|
3066 |
$header_arr['content_type'] = $content_type;
|
3067 |
$header_arr['charset'] = 'charset=UTF-8';
|
3068 |
$header_arr['reply_to'] = $row->reply_to_user;
|
@@ -3200,8 +3200,8 @@ class FMModelForm_maker {
|
|
3200 |
}
|
3201 |
if ( $row->from_mail ) {
|
3202 |
$header_arr['from'] = isset($_POST['wdform_' . $row->from_mail . "_element" . $id]) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : $row->from_mail;
|
3203 |
-
$header_arr['from_name'] = $fromname;
|
3204 |
}
|
|
|
3205 |
$header_arr['content_type'] = $content_type;
|
3206 |
$header_arr['charset'] = 'charset=UTF-8';
|
3207 |
$header_arr['reply_to'] = isset($_POST['wdform_' . $row->reply_to . "_element" . $id]) ? $_POST['wdform_' . $row->reply_to . "_element" . $id] : $row->reply_to;
|
3061 |
|
3062 |
if ( $row->mail_from_user != '' ) {
|
3063 |
$header_arr['from'] = $row->mail_from_user;
|
|
|
3064 |
}
|
3065 |
+
$header_arr['from_name'] = $fromname;
|
3066 |
$header_arr['content_type'] = $content_type;
|
3067 |
$header_arr['charset'] = 'charset=UTF-8';
|
3068 |
$header_arr['reply_to'] = $row->reply_to_user;
|
3200 |
}
|
3201 |
if ( $row->from_mail ) {
|
3202 |
$header_arr['from'] = isset($_POST['wdform_' . $row->from_mail . "_element" . $id]) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : $row->from_mail;
|
|
|
3203 |
}
|
3204 |
+
$header_arr['from_name'] = $fromname;
|
3205 |
$header_arr['content_type'] = $content_type;
|
3206 |
$header_arr['charset'] = 'charset=UTF-8';
|
3207 |
$header_arr['reply_to'] = isset($_POST['wdform_' . $row->reply_to . "_element" . $id]) ? $_POST['wdform_' . $row->reply_to . "_element" . $id] : $row->reply_to;
|
readme.txt
CHANGED
@@ -3,11 +3,11 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
|
|
3 |
Tags: form, form builder, contact form, custom form, feedback, contact, contact forms, captcha, email, form manager, forms, survey
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 1.12.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
-
Form Maker is a
|
11 |
|
12 |
== Description ==
|
13 |
|
@@ -31,7 +31,7 @@ Form Maker is a power-packed yet user-friendly form builder plugin. With an intu
|
|
31 |
* **Better communication between your visitors and you -** Contact forms serve as a communication tool between you and your site visitors, and make it easy to get/receive orders, requests, and inquiries. If you offer memberships, courses or trainings on your website, forms are an easy way to order, apply or register online.
|
32 |
* **Valuable User/Customer Feedback** - You are what your user/customer thinks of you! Handy forms to put together surveys and questionnaires and get feedback from your users/customers.
|
33 |
* **One plugin, different purposes** - Whether you want to have a single form on the contact page, or multiple forms on different pages on your website, that's absolutely doable with this form builder plugin. You can create unlimited number of different forms and display them using one of the available display options.
|
34 |
-
* **Save time
|
35 |
* **Add to the overall website design -** A well designed form can contribute to your website's overall look and feel. Custom style your forms and have them match with your website design.
|
36 |
* **Improve accessibility -** Plugin provides four different form display options, which make your forms easily accessible. Whether you want to embed the form into a post or a page, or have it follow the visitors as they scroll up and down, you have the option to do that.
|
37 |
* **Awesome Support -** The team behind this form builder plugin provides timely and effective support to all its users. We keep standards high and response time low.
|
@@ -102,6 +102,7 @@ With conditional fields option you can set to hide/show specific fields on the f
|
|
102 |
* Front-End Submissions
|
103 |
|
104 |
|
|
|
105 |
== Installation ==
|
106 |
|
107 |
After downloading the ZIP file,
|
@@ -250,6 +251,9 @@ Form Maker uses modern verification methods, such as ReCaptcha and invisible ReC
|
|
250 |
|
251 |
== Changelog ==
|
252 |
|
|
|
|
|
|
|
253 |
= 1.12.16 =
|
254 |
* Improved: Email functionality.
|
255 |
* Fixed: Multiple choice and single choice with long labels.
|
3 |
Tags: form, form builder, contact form, custom form, feedback, contact, contact forms, captcha, email, form manager, forms, survey
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 1.12.17
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
+
Form Maker is a user-friendly form builder plugin that allows to create forms for any purpose, from a simple contact form to a multi page survey
|
11 |
|
12 |
== Description ==
|
13 |
|
31 |
* **Better communication between your visitors and you -** Contact forms serve as a communication tool between you and your site visitors, and make it easy to get/receive orders, requests, and inquiries. If you offer memberships, courses or trainings on your website, forms are an easy way to order, apply or register online.
|
32 |
* **Valuable User/Customer Feedback** - You are what your user/customer thinks of you! Handy forms to put together surveys and questionnaires and get feedback from your users/customers.
|
33 |
* **One plugin, different purposes** - Whether you want to have a single form on the contact page, or multiple forms on different pages on your website, that's absolutely doable with this form builder plugin. You can create unlimited number of different forms and display them using one of the available display options.
|
34 |
+
* **Save time -** Plugin uses an intuitive drag and drop interface, which makes it easy to create forms and add/remove fields to/from the forms.
|
35 |
* **Add to the overall website design -** A well designed form can contribute to your website's overall look and feel. Custom style your forms and have them match with your website design.
|
36 |
* **Improve accessibility -** Plugin provides four different form display options, which make your forms easily accessible. Whether you want to embed the form into a post or a page, or have it follow the visitors as they scroll up and down, you have the option to do that.
|
37 |
* **Awesome Support -** The team behind this form builder plugin provides timely and effective support to all its users. We keep standards high and response time low.
|
102 |
* Front-End Submissions
|
103 |
|
104 |
|
105 |
+
|
106 |
== Installation ==
|
107 |
|
108 |
After downloading the ZIP file,
|
251 |
|
252 |
== Changelog ==
|
253 |
|
254 |
+
= 1.12.17 =
|
255 |
+
* Fixed: UTF-8 text for Email subject and Email from name.
|
256 |
+
|
257 |
= 1.12.16 =
|
258 |
* Improved: Email functionality.
|
259 |
* Fixed: Multiple choice and single choice with long labels.
|