Version Description
Added: Global Options
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.8.17 |
Comparing to | |
See all releases |
Code changes from version 1.8.16 to 1.8.17
- admin/controllers/FMControllerGoptions_fm.php +69 -0
- admin/models/FMModelGoptions_fm.php +30 -0
- admin/models/FMModelUninstall_fm.php +1 -0
- admin/views/FMViewGenerete_csv.php +4 -2
- admin/views/FMViewGoptions_fm.php +93 -0
- css/style.css +4 -1
- form-maker.php +22 -5
- frontend/models/FMModelForm_maker.php +2 -1
- frontend/views/FMViewForm_maker.php +2 -1
- js/formmaker_div_free.js +16 -73
- readme.txt +4 -1
admin/controllers/FMControllerGoptions_fm.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMControllerGoptions_fm {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$task = WDW_FM_Library::get('task');
|
23 |
+
$id = (int)WDW_FM_Library::get('current_id', 0);
|
24 |
+
$message = WDW_FM_Library::get('message');
|
25 |
+
echo WDW_FM_Library::message_id($message);
|
26 |
+
if (method_exists($this, $task)) {
|
27 |
+
check_admin_referer('nonce_fm', 'nonce_fm');
|
28 |
+
$this->$task($id);
|
29 |
+
}
|
30 |
+
else {
|
31 |
+
$this->display();
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
public function display() {
|
36 |
+
require_once WD_FM_DIR . "/admin/models/FMModelGoptions_fm.php";
|
37 |
+
$model = new FMModelGoptions_fm();
|
38 |
+
|
39 |
+
require_once WD_FM_DIR . "/admin/views/FMViewGoptions_fm.php";
|
40 |
+
$view = new FMViewGoptions_fm($model);
|
41 |
+
$view->display();
|
42 |
+
}
|
43 |
+
|
44 |
+
public function save() {
|
45 |
+
$message = $this->save_db();
|
46 |
+
$page = WDW_FM_Library::get('page');
|
47 |
+
WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
48 |
+
}
|
49 |
+
|
50 |
+
public function save_db() {
|
51 |
+
global $wpdb;
|
52 |
+
$public_key = (isset($_POST['public_key']) ? esc_html(stripslashes( $_POST['public_key'])) : '');
|
53 |
+
$private_key = (isset($_POST['private_key']) ? esc_html(stripslashes( $_POST['private_key'])) : '');
|
54 |
+
$csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter']!='' ? esc_html(stripslashes( $_POST['csv_delimiter'])) : ',');
|
55 |
+
update_option('fm_settings', array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => $csv_delimiter));
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
61 |
+
// Getters & Setters //
|
62 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
63 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
+
// Private Methods //
|
65 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
+
// Listeners //
|
68 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
69 |
+
}
|
admin/models/FMModelGoptions_fm.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMModelGoptions_fm {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
// Getters & Setters //
|
23 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
// Private Methods //
|
26 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
27 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
+
// Listeners //
|
29 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
+
}
|
admin/models/FMModelUninstall_fm.php
CHANGED
@@ -40,6 +40,7 @@ class FMModelUninstall_fm {
|
|
40 |
delete_option('formmaker_cureent_version');
|
41 |
delete_option('fm_emailverification');
|
42 |
delete_option('form_maker_pro_active');
|
|
|
43 |
}
|
44 |
}
|
45 |
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
delete_option('formmaker_cureent_version');
|
41 |
delete_option('fm_emailverification');
|
42 |
delete_option('form_maker_pro_active');
|
43 |
+
delete_option('fm_settings');
|
44 |
}
|
45 |
}
|
46 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/views/FMViewGenerete_csv.php
CHANGED
@@ -23,6 +23,8 @@ class FMViewGenerete_csv {
|
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display() {
|
|
|
|
|
26 |
$form_id = (int)$_REQUEST['form_id'];
|
27 |
$params = $this->model->get_data();
|
28 |
$limitstart = (int)$_REQUEST['limitstart'];
|
@@ -56,11 +58,11 @@ class FMViewGenerete_csv {
|
|
56 |
|
57 |
$output = fopen($tempfile, "a");
|
58 |
if($limitstart == 0) {
|
59 |
-
fputcsv($output, str_replace('PAYPAL_', '', $keys_array));
|
60 |
}
|
61 |
|
62 |
foreach ($data as $record) {
|
63 |
-
fputcsv($output, $record);
|
64 |
}
|
65 |
fclose($output);
|
66 |
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display() {
|
26 |
+
$fm_settings = get_option('fm_settings');
|
27 |
+
$csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
|
28 |
$form_id = (int)$_REQUEST['form_id'];
|
29 |
$params = $this->model->get_data();
|
30 |
$limitstart = (int)$_REQUEST['limitstart'];
|
58 |
|
59 |
$output = fopen($tempfile, "a");
|
60 |
if($limitstart == 0) {
|
61 |
+
fputcsv($output, str_replace('PAYPAL_', '', $keys_array), $csv_delimiter);
|
62 |
}
|
63 |
|
64 |
foreach ($data as $record) {
|
65 |
+
fputcsv($output, $record, $csv_delimiter);
|
66 |
}
|
67 |
fclose($output);
|
68 |
|
admin/views/FMViewGoptions_fm.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class FMViewGoptions_fm {
|
3 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
4 |
+
// Events //
|
5 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
// Constants //
|
8 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
// Variables //
|
11 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
12 |
+
private $model;
|
13 |
+
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
public function __construct($model) {
|
18 |
+
$this->model = $model;
|
19 |
+
}
|
20 |
+
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
// Public Methods //
|
23 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
public function display() {
|
25 |
+
$fm_settings = get_option('fm_settings');
|
26 |
+
$public_key = isset($fm_settings['public_key']) ? $fm_settings['public_key'] : '';
|
27 |
+
$private_key = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
|
28 |
+
$csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
|
29 |
+
?>
|
30 |
+
<div class="fm-user-manual">
|
31 |
+
This section allows you to edit form settings.
|
32 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
33 |
+
</div>
|
34 |
+
<div class="fm-clear"></div>
|
35 |
+
<form class="wrap" method="post" action="admin.php?page=goptions_fm" style="width:99%;">
|
36 |
+
<?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
|
37 |
+
<div class="fm-page-header">
|
38 |
+
<div class="fm-page-title">
|
39 |
+
Form Settings
|
40 |
+
</div>
|
41 |
+
<div class="fm-page-actions">
|
42 |
+
<button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Title')) {return false;}; fm_set_input_value('task', 'save');">
|
43 |
+
<span></span>
|
44 |
+
Save
|
45 |
+
</button>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
<table style="clear:both;">
|
50 |
+
<tbody>
|
51 |
+
<tr>
|
52 |
+
<td>
|
53 |
+
<label for="public_key">Recaptcha Public Key:</label>
|
54 |
+
</td>
|
55 |
+
<td>
|
56 |
+
<input type="text" id="public_key" name="public_key" value="<?php echo $public_key; ?>" style="width:250px;" />
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
<tr>
|
60 |
+
<td>
|
61 |
+
<label for="private_key">Recaptcha Private Key:</label>
|
62 |
+
</td>
|
63 |
+
<td>
|
64 |
+
<input type="text" id="private_key" name="private_key" value="<?php echo $private_key; ?>" style="width:250px;" />
|
65 |
+
</td>
|
66 |
+
</tr>
|
67 |
+
<tr>
|
68 |
+
<td>
|
69 |
+
<label for="csv_delimiter">CSV Delimiter:</label>
|
70 |
+
</td>
|
71 |
+
<td>
|
72 |
+
<input type="text" id="csv_delimiter" name="csv_delimiter" value="<?php echo $csv_delimiter; ?>" style="width:50px;" />
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
</tbody>
|
76 |
+
</table>
|
77 |
+
<input type="hidden" id="task" name="task" value=""/>
|
78 |
+
</form>
|
79 |
+
<?php
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
85 |
+
// Getters & Setters //
|
86 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
87 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
88 |
+
// Private Methods //
|
89 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
90 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
91 |
+
// Listeners //
|
92 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
93 |
+
}
|
css/style.css
CHANGED
@@ -131,7 +131,10 @@ textarea[readonly] {
|
|
131 |
font-weight:bold;
|
132 |
font-size: 13px;
|
133 |
text-decoration:underline
|
134 |
-
|
|
|
|
|
|
|
135 |
}
|
136 |
|
137 |
.fm-editable-label {
|
131 |
font-weight:bold;
|
132 |
font-size: 13px;
|
133 |
text-decoration:underline
|
134 |
+
}
|
135 |
+
|
136 |
+
.fm-field-recaptcha-label:hover, .fm-field-recaptcha-label:active, .fm-field-recaptcha-label:visited{
|
137 |
+
color:#BA0D0D !important;
|
138 |
}
|
139 |
|
140 |
.fm-editable-label {
|
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.8.
|
7 |
* Author: WebDorado
|
8 |
* Author URI: https://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -31,7 +31,9 @@ function form_maker_options_panel() {
|
|
31 |
$themes_page = add_submenu_page('manage_fm', 'Themes', 'Themes', 'manage_options', 'themes_fm', 'form_maker');
|
32 |
add_action('admin_print_styles-' . $themes_page, 'form_maker_manage_styles');
|
33 |
add_action('admin_print_scripts-' . $themes_page, 'form_maker_manage_scripts');
|
34 |
-
|
|
|
|
|
35 |
$licensing_plugins_page = add_submenu_page('manage_fm', 'Pro Version', 'Pro Version', 'manage_options', 'licensing_fm', 'form_maker');
|
36 |
|
37 |
add_submenu_page('manage_fm', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'featured_plugins_fm', 'fm_featured');
|
@@ -54,7 +56,7 @@ function form_maker() {
|
|
54 |
}
|
55 |
require_once(WD_FM_DIR . '/framework/WDW_FM_Library.php');
|
56 |
$page = WDW_FM_Library::get('page');
|
57 |
-
if (($page != '') && (($page == 'manage_fm') || ($page == 'submissions_fm')|| ($page == 'licensing_fm') || ($page == 'blocked_ips_fm') || ($page == 'themes_fm') || ($page == 'featured_plugins_fm') || ($page == 'uninstall_fm') || ($page == 'formmakerwindow') || ($page == 'extensions_fm'))) {
|
58 |
require_once (WD_FM_DIR . '/admin/controllers/FMController' . ucfirst(strtolower($page)) . '.php');
|
59 |
$controller_class = 'FMController' . ucfirst(strtolower($page));
|
60 |
$controller = new $controller_class();
|
@@ -170,6 +172,7 @@ function form_maker_admin_ajax() {
|
|
170 |
<script>
|
171 |
var form_maker_admin_ajax = '<?php echo add_query_arg(array('action' => 'formmakerwindow'), admin_url('admin-ajax.php')); ?>';
|
172 |
var plugin_url = '<?php echo WD_FM_URL; ?>';
|
|
|
173 |
</script>
|
174 |
<?php
|
175 |
}
|
@@ -268,12 +271,18 @@ function register_fmemailverification_cpt(){
|
|
268 |
// Activate plugin.
|
269 |
function form_maker_activate() {
|
270 |
$version = get_option("wd_form_maker_version");
|
271 |
-
$new_version = '1.8.
|
272 |
global $wpdb;
|
273 |
if (!$version) {
|
274 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
275 |
if ($wpdb->get_var("SHOW TABLES LIKE '" . $wpdb->prefix . "formmaker'") == $wpdb->prefix . "formmaker") {
|
276 |
require_once WD_FM_DIR . "/form_maker_update.php";
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
form_maker_update_until_mvc();
|
278 |
form_maker_update_contact();
|
279 |
form_maker_update('');
|
@@ -290,7 +299,7 @@ function form_maker_activate() {
|
|
290 |
'post_type' => 'fmemailverification',
|
291 |
);
|
292 |
$mail_verification_post_id = wp_insert_post( $email_verification_post );
|
293 |
-
|
294 |
$wpdb->update($wpdb->prefix . "formmaker", array(
|
295 |
'mail_verification_post_id' => $mail_verification_post_id,
|
296 |
), array('id' => 1), array(
|
@@ -312,6 +321,14 @@ function form_maker_activate() {
|
|
312 |
}
|
313 |
form_maker_update($version);
|
314 |
update_option("wd_form_maker_version", $new_version);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
}
|
316 |
|
317 |
require_once WD_FM_DIR . "/form_maker_insert.php";
|
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.8.17
|
7 |
* Author: WebDorado
|
8 |
* Author URI: https://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
31 |
$themes_page = add_submenu_page('manage_fm', 'Themes', 'Themes', 'manage_options', 'themes_fm', 'form_maker');
|
32 |
add_action('admin_print_styles-' . $themes_page, 'form_maker_manage_styles');
|
33 |
add_action('admin_print_scripts-' . $themes_page, 'form_maker_manage_scripts');
|
34 |
+
$global_options_page = add_submenu_page('manage_fm', 'Global Options', 'Global Options', 'manage_options', 'goptions_fm', 'form_maker');
|
35 |
+
add_action('admin_print_styles-' . $global_options_page, 'form_maker_manage_styles');
|
36 |
+
add_action('admin_print_scripts-' . $global_options_page, 'form_maker_manage_scripts');
|
37 |
$licensing_plugins_page = add_submenu_page('manage_fm', 'Pro Version', 'Pro Version', 'manage_options', 'licensing_fm', 'form_maker');
|
38 |
|
39 |
add_submenu_page('manage_fm', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'featured_plugins_fm', 'fm_featured');
|
56 |
}
|
57 |
require_once(WD_FM_DIR . '/framework/WDW_FM_Library.php');
|
58 |
$page = WDW_FM_Library::get('page');
|
59 |
+
if (($page != '') && (($page == 'manage_fm') || ($page == 'goptions_fm') || ($page == 'submissions_fm')|| ($page == 'licensing_fm') || ($page == 'blocked_ips_fm') || ($page == 'themes_fm') || ($page == 'featured_plugins_fm') || ($page == 'uninstall_fm') || ($page == 'formmakerwindow') || ($page == 'extensions_fm'))) {
|
60 |
require_once (WD_FM_DIR . '/admin/controllers/FMController' . ucfirst(strtolower($page)) . '.php');
|
61 |
$controller_class = 'FMController' . ucfirst(strtolower($page));
|
62 |
$controller = new $controller_class();
|
172 |
<script>
|
173 |
var form_maker_admin_ajax = '<?php echo add_query_arg(array('action' => 'formmakerwindow'), admin_url('admin-ajax.php')); ?>';
|
174 |
var plugin_url = '<?php echo WD_FM_URL; ?>';
|
175 |
+
var admin_url = '<?php echo admin_url('admin.php'); ?>';
|
176 |
</script>
|
177 |
<?php
|
178 |
}
|
271 |
// Activate plugin.
|
272 |
function form_maker_activate() {
|
273 |
$version = get_option("wd_form_maker_version");
|
274 |
+
$new_version = '1.8.17';
|
275 |
global $wpdb;
|
276 |
if (!$version) {
|
277 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
278 |
if ($wpdb->get_var("SHOW TABLES LIKE '" . $wpdb->prefix . "formmaker'") == $wpdb->prefix . "formmaker") {
|
279 |
require_once WD_FM_DIR . "/form_maker_update.php";
|
280 |
+
$recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
|
281 |
+
$public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
|
282 |
+
$private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
|
283 |
+
if (FALSE === $fm_settings = get_option('fm_settings')) {
|
284 |
+
add_option('fm_settings', array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ','));
|
285 |
+
}
|
286 |
form_maker_update_until_mvc();
|
287 |
form_maker_update_contact();
|
288 |
form_maker_update('');
|
299 |
'post_type' => 'fmemailverification',
|
300 |
);
|
301 |
$mail_verification_post_id = wp_insert_post( $email_verification_post );
|
302 |
+
add_option('fm_settings', array('public_key' => '', 'private_key' => '', 'csv_delimiter' => ','));
|
303 |
$wpdb->update($wpdb->prefix . "formmaker", array(
|
304 |
'mail_verification_post_id' => $mail_verification_post_id,
|
305 |
), array('id' => 1), array(
|
321 |
}
|
322 |
form_maker_update($version);
|
323 |
update_option("wd_form_maker_version", $new_version);
|
324 |
+
|
325 |
+
$recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
|
326 |
+
$public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
|
327 |
+
$private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
|
328 |
+
|
329 |
+
if (FALSE === $fm_settings = get_option('fm_settings')) {
|
330 |
+
add_option('fm_settings', array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ','));
|
331 |
+
}
|
332 |
}
|
333 |
|
334 |
require_once WD_FM_DIR . "/form_maker_insert.php";
|
frontend/models/FMModelForm_maker.php
CHANGED
@@ -58,6 +58,7 @@ class FMModelForm_maker {
|
|
58 |
}
|
59 |
|
60 |
public function savedata($form, $id) {
|
|
|
61 |
$all_files = array();
|
62 |
$correct = FALSE;
|
63 |
$id_for_old = $id;
|
@@ -106,7 +107,7 @@ class FMModelForm_maker {
|
|
106 |
}
|
107 |
}
|
108 |
elseif (isset($_POST["g-recaptcha-response"])){
|
109 |
-
$privatekey
|
110 |
$response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$privatekey."&response=".$_POST['g-recaptcha-response']);
|
111 |
$response = json_decode($response, true);
|
112 |
if($response["success"] === true)
|
58 |
}
|
59 |
|
60 |
public function savedata($form, $id) {
|
61 |
+
$fm_settings = get_option('fm_settings');
|
62 |
$all_files = array();
|
63 |
$correct = FALSE;
|
64 |
$id_for_old = $id;
|
107 |
}
|
108 |
}
|
109 |
elseif (isset($_POST["g-recaptcha-response"])){
|
110 |
+
$privatekey= isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
|
111 |
$response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$privatekey."&response=".$_POST['g-recaptcha-response']);
|
112 |
$response = json_decode($response, true);
|
113 |
if($response["success"] === true)
|
frontend/views/FMViewForm_maker.php
CHANGED
@@ -23,6 +23,7 @@ class FMViewForm_maker {
|
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display($id) {
|
|
|
26 |
$current_url=htmlentities($_SERVER['REQUEST_URI']);
|
27 |
$form_maker_front_end = "";
|
28 |
$pattern = '/\/\/(.+)(\r\n|\r|\n)/';
|
@@ -2696,7 +2697,7 @@ class FMViewForm_maker {
|
|
2696 |
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
2697 |
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
2698 |
|
2699 |
-
$publickey=($
|
2700 |
|
2701 |
$rep =' <script src="https://www.google.com/recaptcha/api.js"></script><div type="type_recaptcha" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos1'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span></div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].';"><div class="g-recaptcha" data-sitekey="'.$publickey.'"></div></div></div>';
|
2702 |
break;
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display($id) {
|
26 |
+
$fm_settings = get_option('fm_settings');
|
27 |
$current_url=htmlentities($_SERVER['REQUEST_URI']);
|
28 |
$form_maker_front_end = "";
|
29 |
$pattern = '/\/\/(.+)(\r\n|\r|\n)/';
|
2697 |
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
2698 |
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
2699 |
|
2700 |
+
$publickey= isset($fm_settings['public_key']) ? $fm_settings['public_key'] : '0';
|
2701 |
|
2702 |
$rep =' <script src="https://www.google.com/recaptcha/api.js"></script><div type="type_recaptcha" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos1'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span></div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].';"><div class="g-recaptcha" data-sitekey="'.$publickey.'"></div></div></div>';
|
2703 |
break;
|
js/formmaker_div_free.js
CHANGED
@@ -18402,7 +18402,6 @@ function type_country(i, w_field_label, w_field_label_size, w_countries, w_field
|
|
18402 |
// fm_popup();
|
18403 |
}
|
18404 |
|
18405 |
-
|
18406 |
function type_recaptcha(i,w_field_label, w_field_label_size, w_field_label_pos, w_public, w_private, w_theme, w_class, w_attr_name, w_attr_value){
|
18407 |
|
18408 |
document.getElementById("element_type").value="type_recaptcha";
|
@@ -18505,65 +18504,22 @@ function type_recaptcha(i,w_field_label, w_field_label_size, w_field_label_pos,
|
|
18505 |
|
18506 |
var el_style_textarea = document.createElement('input');
|
18507 |
el_style_textarea.setAttribute("id", "el_style_textarea");
|
|
|
18508 |
el_style_textarea.setAttribute("type", "text");
|
18509 |
el_style_textarea.setAttribute("value", w_class);
|
18510 |
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
18511 |
|
18512 |
var el_public_label = document.createElement('label');
|
18513 |
-
el_public_label.setAttribute("class", "fm-field-recaptcha-label");
|
18514 |
el_public_label.setAttribute("for", "public_key");
|
18515 |
-
el_public_label.
|
18516 |
-
|
18517 |
-
var el_public_textarea = document.createElement('input');
|
18518 |
-
el_public_textarea.setAttribute("id", "public_key");
|
18519 |
-
el_public_textarea.setAttribute("type", "text");
|
18520 |
-
el_public_textarea.setAttribute("value", w_public);
|
18521 |
-
el_public_textarea.setAttribute("onChange", "change_key(this.value, 'public_key')");
|
18522 |
-
|
18523 |
-
var el_private_label = document.createElement('label');
|
18524 |
-
el_private_label.setAttribute("class", "fm-field-recaptcha-label");
|
18525 |
-
el_private_label.setAttribute("for", "private_key");
|
18526 |
-
el_private_label.innerHTML = "Private key";
|
18527 |
|
18528 |
-
var
|
18529 |
-
|
18530 |
-
|
18531 |
-
|
18532 |
-
|
18533 |
|
18534 |
-
var el_theme_label = document.createElement('label');
|
18535 |
-
el_theme_label.setAttribute("class", "fm-field-label");
|
18536 |
-
el_theme_label.setAttribute("for", "el_theme_select");
|
18537 |
-
el_theme_label.innerHTML = "Recaptcha Theme";
|
18538 |
-
|
18539 |
-
var el_theme_select = document.createElement('select');
|
18540 |
-
el_theme_select.setAttribute("id", "el_theme_select");
|
18541 |
-
el_theme_select.setAttribute("onChange", "change_key(this.value, 'theme')");
|
18542 |
-
el_theme_select.style.cssText = 'width:200px;';
|
18543 |
-
|
18544 |
-
var el_theme_option1 = document.createElement('option');
|
18545 |
-
el_theme_option1.value="red";
|
18546 |
-
el_theme_option1.innerHTML="Red";
|
18547 |
-
|
18548 |
-
var el_theme_option2= document.createElement('option');
|
18549 |
-
el_theme_option2.value="white";
|
18550 |
-
el_theme_option2.innerHTML="White";
|
18551 |
-
|
18552 |
-
var el_theme_option3= document.createElement('option');
|
18553 |
-
el_theme_option3.value="blackglass";
|
18554 |
-
el_theme_option3.innerHTML="Blackglass";
|
18555 |
-
|
18556 |
-
var el_theme_option4= document.createElement('option');
|
18557 |
-
el_theme_option4.value="clean";
|
18558 |
-
el_theme_option4.innerHTML="Clean";
|
18559 |
-
|
18560 |
-
el_theme_select.appendChild(el_theme_option1);
|
18561 |
-
el_theme_select.appendChild(el_theme_option2);
|
18562 |
-
el_theme_select.appendChild(el_theme_option3);
|
18563 |
-
el_theme_select.appendChild(el_theme_option4);
|
18564 |
-
|
18565 |
-
el_theme_select.value=w_theme;
|
18566 |
-
|
18567 |
|
18568 |
var el_attr_label = document.createElement('label');
|
18569 |
el_attr_label.setAttribute("class", "fm-field-label");
|
@@ -18672,14 +18628,7 @@ function type_recaptcha(i,w_field_label, w_field_label_size, w_field_label_pos,
|
|
18672 |
edit_main_td4_1.appendChild(el_style_textarea);
|
18673 |
|
18674 |
edit_main_td6.appendChild(el_public_label);
|
18675 |
-
edit_main_td6_1.appendChild(
|
18676 |
-
|
18677 |
-
edit_main_td7.appendChild(el_private_label);
|
18678 |
-
edit_main_td7_1.appendChild(el_private_textarea);
|
18679 |
-
|
18680 |
-
edit_main_td8.appendChild(el_theme_label);
|
18681 |
-
edit_main_td8_1.appendChild(el_theme_select);
|
18682 |
-
|
18683 |
|
18684 |
edit_main_td5.appendChild(el_attr_label);
|
18685 |
edit_main_td5.appendChild(el_attr_add);
|
@@ -18702,16 +18651,11 @@ function type_recaptcha(i,w_field_label, w_field_label_size, w_field_label_pos,
|
|
18702 |
edit_main_tr5.appendChild(edit_main_td5_1);
|
18703 |
edit_main_tr6.appendChild(edit_main_td6);
|
18704 |
edit_main_tr6.appendChild(edit_main_td6_1);
|
18705 |
-
|
18706 |
-
edit_main_tr7.appendChild(edit_main_td7_1);
|
18707 |
-
edit_main_tr8.appendChild(edit_main_td8);
|
18708 |
-
edit_main_tr8.appendChild(edit_main_td8_1);
|
18709 |
edit_main_table.appendChild(edit_main_tr1);
|
18710 |
edit_main_table.appendChild(edit_main_tr9);
|
18711 |
edit_main_table.appendChild(edit_main_tr2);
|
18712 |
edit_main_table.appendChild(edit_main_tr6);
|
18713 |
-
edit_main_table.appendChild(edit_main_tr7);
|
18714 |
-
edit_main_table.appendChild(edit_main_tr8);
|
18715 |
edit_main_table.appendChild(edit_main_tr4);
|
18716 |
edit_main_table.appendChild(edit_main_tr5);
|
18717 |
edit_div.appendChild(edit_main_table);
|
@@ -25030,10 +24974,9 @@ function edit(id)
|
|
25030 |
}
|
25031 |
case 'type_recaptcha':
|
25032 |
{
|
25033 |
-
w_public =
|
25034 |
-
w_private =
|
25035 |
-
w_theme =
|
25036 |
-
|
25037 |
atrs=return_attributes('wd_recaptchaform_id_temp');
|
25038 |
w_attr_name=atrs[0];
|
25039 |
w_attr_value=atrs[1];
|
@@ -27056,9 +26999,9 @@ function gen_form_fields()
|
|
27056 |
}
|
27057 |
case 'type_recaptcha':
|
27058 |
{
|
27059 |
-
w_public =
|
27060 |
-
|
27061 |
-
|
27062 |
|
27063 |
atrs=return_attributes('wd_recaptchaform_id_temp');
|
27064 |
w_attr_name=atrs[0];
|
18402 |
// fm_popup();
|
18403 |
}
|
18404 |
|
|
|
18405 |
function type_recaptcha(i,w_field_label, w_field_label_size, w_field_label_pos, w_public, w_private, w_theme, w_class, w_attr_name, w_attr_value){
|
18406 |
|
18407 |
document.getElementById("element_type").value="type_recaptcha";
|
18504 |
|
18505 |
var el_style_textarea = document.createElement('input');
|
18506 |
el_style_textarea.setAttribute("id", "el_style_textarea");
|
18507 |
+
|
18508 |
el_style_textarea.setAttribute("type", "text");
|
18509 |
el_style_textarea.setAttribute("value", w_class);
|
18510 |
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
18511 |
|
18512 |
var el_public_label = document.createElement('label');
|
|
|
18513 |
el_public_label.setAttribute("for", "public_key");
|
18514 |
+
el_public_label.setAttribute("class", "fm-field-label");
|
18515 |
+
el_public_label.innerHTML = "Keys";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18516 |
|
18517 |
+
var el_public_link = document.createElement('a');
|
18518 |
+
el_public_link.setAttribute("href", admin_url +"?page=goptions_fm");
|
18519 |
+
el_public_link.setAttribute("class", "fm-field-recaptcha-label");
|
18520 |
+
el_public_link.setAttribute("target", "_blank");
|
18521 |
+
el_public_link.innerHTML ='To set up recaptcha keys click here';
|
18522 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18523 |
|
18524 |
var el_attr_label = document.createElement('label');
|
18525 |
el_attr_label.setAttribute("class", "fm-field-label");
|
18628 |
edit_main_td4_1.appendChild(el_style_textarea);
|
18629 |
|
18630 |
edit_main_td6.appendChild(el_public_label);
|
18631 |
+
edit_main_td6_1.appendChild(el_public_link);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18632 |
|
18633 |
edit_main_td5.appendChild(el_attr_label);
|
18634 |
edit_main_td5.appendChild(el_attr_add);
|
18651 |
edit_main_tr5.appendChild(edit_main_td5_1);
|
18652 |
edit_main_tr6.appendChild(edit_main_td6);
|
18653 |
edit_main_tr6.appendChild(edit_main_td6_1);
|
18654 |
+
|
|
|
|
|
|
|
18655 |
edit_main_table.appendChild(edit_main_tr1);
|
18656 |
edit_main_table.appendChild(edit_main_tr9);
|
18657 |
edit_main_table.appendChild(edit_main_tr2);
|
18658 |
edit_main_table.appendChild(edit_main_tr6);
|
|
|
|
|
18659 |
edit_main_table.appendChild(edit_main_tr4);
|
18660 |
edit_main_table.appendChild(edit_main_tr5);
|
18661 |
edit_div.appendChild(edit_main_table);
|
24974 |
}
|
24975 |
case 'type_recaptcha':
|
24976 |
{
|
24977 |
+
w_public = '';
|
24978 |
+
w_private = '';
|
24979 |
+
w_theme = '';
|
|
|
24980 |
atrs=return_attributes('wd_recaptchaform_id_temp');
|
24981 |
w_attr_name=atrs[0];
|
24982 |
w_attr_value=atrs[1];
|
26999 |
}
|
27000 |
case 'type_recaptcha':
|
27001 |
{
|
27002 |
+
w_public = '';
|
27003 |
+
w_private = '';
|
27004 |
+
w_theme = '';
|
27005 |
|
27006 |
atrs=return_attributes('wd_recaptchaform_id_temp');
|
27007 |
w_attr_name=atrs[0];
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-form.html
|
|
4 |
Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha, pdf, mysql
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 1.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -302,6 +302,9 @@ The Form Maker (Pro version) has simple PayPal integration. This allows the user
|
|
302 |
|
303 |
== Changelog ==
|
304 |
|
|
|
|
|
|
|
305 |
= 1.8.16 =
|
306 |
Fixed: User guide links
|
307 |
|
4 |
Tags: form, forms, form builder, form maker, form manager, form plugin, form with recaptcha, forms plugin, multiple forms, paypal form, survey form, feedback form, feedback forms, contact form,contact form plugin, contact form builder, form creator, email form, secure form, web form, form to email, contact forms, custom forms, form widget, captcha form, wordpress contact form ,recaptcha contact form, form creation, contact form with auto reply, widget contact form, builder, feedback, contacts form plugin , custom contact form, contact us form, formular, formulario, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, form with captcha, pdf, mysql
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 1.8.17
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
302 |
|
303 |
== Changelog ==
|
304 |
|
305 |
+
= 1.8.17 =
|
306 |
+
Added: Global Options
|
307 |
+
|
308 |
= 1.8.16 =
|
309 |
Fixed: User guide links
|
310 |
|