Contact Form Email - Version 1.2.76

Version Description

  • Removed use of CURL
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Contact Form Email
Version 1.2.76
Comparing to
See all releases

Code changes from version 1.2.75 to 1.2.76

Files changed (5) hide show
  1. README.txt +5 -2
  2. cp-feedback.php +17 -30
  3. cp-main-class.inc.php +1 -1
  4. form-to-email.php +1 -1
  5. js/block.js +1 -1
README.txt CHANGED
@@ -456,6 +456,9 @@ When you click a field already added into the contact form builder area, you can
456
 
457
  == Changelog ==
458
 
 
 
 
459
  = 1.2.75 =
460
  * Added Elementor integration
461
 
@@ -988,5 +991,5 @@ When you click a field already added into the contact form builder area, you can
988
 
989
  == Upgrade Notice ==
990
 
991
- = 1.2.75 =
992
- * Added Elementor integration
456
 
457
  == Changelog ==
458
 
459
+ = 1.2.76 =
460
+ * Removed use of CURL
461
+
462
  = 1.2.75 =
463
  * Added Elementor integration
464
 
991
 
992
  == Upgrade Notice ==
993
 
994
+ = 1.2.76 =
995
+ * Removed use of CURL
cp-feedback.php CHANGED
@@ -23,29 +23,29 @@ function cpcfte_feedback() {
23
  $plugin_version = $plugin_data['Version'];
24
  $time = time() - get_option('installed_contact-form-to-email', '');
25
  $data = array(
26
- 'answer' => urlencode(@$_POST["answer"]),
27
- 'otherplugin' => urlencode(@$_POST["opinfo"]),
28
- 'otherinfo' => urlencode(@$_POST["oinfo"]),
29
- 'plugin' => urlencode($plugin_data['Name']),
30
- 'pluginv' => urlencode($plugin_version),
31
- 'wordpress' => urlencode(get_bloginfo( 'version' )),
32
- 'itime' => urlencode($time),
33
- 'phpversion' => urlencode(phpversion ())
34
  );
35
  if (@$_POST["onymous"] == 'false') // send this data only if explicitly accepted
36
  {
37
  $current_user = wp_get_current_user();
38
- $data['email'] = urlencode($current_user->user_email);
39
- $data['website'] = urlencode($_SERVER['HTTP_HOST']);
40
- $data['url'] = urlencode(get_site_url());
41
  // for detecting theme and plugin conflicts:
42
- $data['theme'] = urlencode(wp_get_theme()->get('Name') . " " .wp_get_theme()->get('Version'));
43
  $plist = "";
44
  $activeplugins = get_option('active_plugins');
45
  $plugins = get_plugins();
46
  foreach ($activeplugins as $plugin)
47
  $plist .= $plugins[$plugin]["Title"]." ".$plugins[$plugin]["Version"]."\n";
48
- $data['plugins'] = urlencode($plist);
49
  }
50
 
51
  //extract data from the post
@@ -53,23 +53,10 @@ function cpcfte_feedback() {
53
  $url = 'https://wordpress.dwbooster.com/licensesystem/debug-data.php';
54
  $fields = $data;
55
 
56
- //url-ify the data for the POST
57
- foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
58
- rtrim($fields_string, '&');
59
-
60
- //open connection
61
- $ch = curl_init();
62
-
63
- //set the url, number of POST vars, POST data
64
- curl_setopt($ch,CURLOPT_URL, $url);
65
- curl_setopt($ch,CURLOPT_POST, count($fields));
66
- curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
67
-
68
- //execute post
69
- $result = curl_exec($ch);
70
-
71
- //close connection
72
- curl_close($ch);
73
 
74
  wp_die(); // this is required to terminate immediately and return a proper response
75
  }
23
  $plugin_version = $plugin_data['Version'];
24
  $time = time() - get_option('installed_contact-form-to-email', '');
25
  $data = array(
26
+ 'answer' => (@$_POST["answer"]),
27
+ 'otherplugin' => (@$_POST["opinfo"]),
28
+ 'otherinfo' => (@$_POST["oinfo"]),
29
+ 'plugin' => ($plugin_data['Name']),
30
+ 'pluginv' => ($plugin_version),
31
+ 'wordpress' => (get_bloginfo( 'version' )),
32
+ 'itime' => ($time),
33
+ 'phpversion' => (phpversion ())
34
  );
35
  if (@$_POST["onymous"] == 'false') // send this data only if explicitly accepted
36
  {
37
  $current_user = wp_get_current_user();
38
+ $data['email'] = ($current_user->user_email);
39
+ $data['website'] = ($_SERVER['HTTP_HOST']);
40
+ $data['url'] = (get_site_url());
41
  // for detecting theme and plugin conflicts:
42
+ $data['theme'] = (wp_get_theme()->get('Name') . " " .wp_get_theme()->get('Version'));
43
  $plist = "";
44
  $activeplugins = get_option('active_plugins');
45
  $plugins = get_plugins();
46
  foreach ($activeplugins as $plugin)
47
  $plist .= $plugins[$plugin]["Title"]." ".$plugins[$plugin]["Version"]."\n";
48
+ $data['plugins'] = ($plist);
49
  }
50
 
51
  //extract data from the post
53
  $url = 'https://wordpress.dwbooster.com/licensesystem/debug-data.php';
54
  $fields = $data;
55
 
56
+ wp_remote_post(
57
+ $url,
58
+ array ( 'body' => $fields )
59
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  wp_die(); // this is required to terminate immediately and return a proper response
62
  }
cp-main-class.inc.php CHANGED
@@ -474,7 +474,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
474
  'label' => $item->form_name,
475
  );
476
 
477
- wp_localize_script( 'cfte_gutenberg_editor', 'apphourbk_forms', array(
478
  'forms' => $forms,
479
  'siteUrl' => get_site_url()
480
  ) );
474
  'label' => $item->form_name,
475
  );
476
 
477
+ wp_localize_script( 'cfte_gutenberg_editor', 'cfte_forms', array(
478
  'forms' => $forms,
479
  'siteUrl' => get_site_url()
480
  ) );
form-to-email.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Contact Form Email
4
  Plugin URI: https://form2email.dwbooster.com/download
5
  Description: Contact form that sends the data to email and also to a database list and CSV file.
6
- Version: 1.2.75
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
3
  Plugin Name: Contact Form Email
4
  Plugin URI: https://form2email.dwbooster.com/download
5
  Description: Contact form that sends the data to email and also to a database list and CSV file.
6
+ Version: 1.2.76
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
js/block.js CHANGED
@@ -50,7 +50,7 @@ jQuery(function()
50
  }
51
  },
52
  edit: function( { attributes, className, isSelected, setAttributes } ) {
53
- const formOptions = apphourbk_forms.forms;
54
  if (!formOptions.length)
55
  return el("div", null, 'Please create a contact form first.' );
56
  var iId = attributes.instanceId;
50
  }
51
  },
52
  edit: function( { attributes, className, isSelected, setAttributes } ) {
53
+ const formOptions = cfte_forms.forms;
54
  if (!formOptions.length)
55
  return el("div", null, 'Please create a contact form first.' );
56
  var iId = attributes.instanceId;