Contact Form Email - Version 1.3.03

Version Description

  • API improvement
Download this release

Release Info

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

Code changes from version 1.3.02 to 1.3.03

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.3.02 =
460
  * Improved antispam rules
461
 
@@ -1063,5 +1066,5 @@ When you click a field already added into the contact form builder area, you can
1063
 
1064
  == Upgrade Notice ==
1065
 
1066
- = 1.3.02 =
1067
- * Improved antispam rules
456
 
457
  == Changelog ==
458
 
459
+ = 1.3.03 =
460
+ * API improvement
461
+
462
  = 1.3.02 =
463
  * Improved antispam rules
464
 
1066
 
1067
  == Upgrade Notice ==
1068
 
1069
+ = 1.3.03 =
1070
+ * API improvement
cp-main-class.inc.php CHANGED
@@ -223,6 +223,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
223
  {
224
  wp_enqueue_style('cfte-stylepublic', plugins_url('css/stylepublic.css', __FILE__) );
225
  wp_enqueue_style('cfte-stylecalendar', plugins_url('css/cupertino/jquery-ui-1.8.20.custom.css', __FILE__));
 
226
 
227
  wp_deregister_script('query-stringify');
228
  wp_register_script('query-stringify', plugins_url('/js/jQuery.stringify.js', __FILE__));
@@ -233,6 +234,8 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
233
  wp_enqueue_script( $this->prefix.'_builder_script',
234
  plugins_url('/js/fbuilderf.jquery.js?nc=1', __FILE__),array("jquery","jquery-ui-core","jquery-ui-datepicker","jquery-ui-widget","jquery-ui-dialog","jquery-ui-position","jquery-ui-tooltip","query-stringify",$this->prefix."_validate_script"), false, true );
235
 
 
 
236
  wp_localize_script($this->prefix.'_builder_script', $this->prefix.'_fbuilder_config'.('_'.$this->print_counter), array('obj' =>
237
  '{"pub":true,"identifier":"'.('_'.$this->print_counter).'","messages": {
238
  "required": "'.str_replace(array('"'),array('\\"'),__($this->get_option('vs_text_is_required', CP_CFEMAIL_DEFAULT_vs_text_is_required),'contact-form-to-email')).'",
@@ -460,6 +463,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
460
  /* ]]> */
461
  </script>
462
  <script type='text/javascript' src='<?php echo plugins_url('js/fbuilderf.jquery.js?nc=1', __FILE__); ?>'></script>
 
463
  <?php
464
  }
465
  $this->print_counter++;
@@ -668,8 +672,25 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
668
 
669
 
670
  function data_management() {
671
- global $wpdb;
672
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
673
  $this->check_reports();
674
 
675
  if ($this->get_param($this->prefix.'_encodingfix') == '1')
223
  {
224
  wp_enqueue_style('cfte-stylepublic', plugins_url('css/stylepublic.css', __FILE__) );
225
  wp_enqueue_style('cfte-stylecalendar', plugins_url('css/cupertino/jquery-ui-1.8.20.custom.css', __FILE__));
226
+ wp_enqueue_style('cfte-custompublicstyle', $this->get_site_url( false ).'?cp_cfte_resources=css');
227
 
228
  wp_deregister_script('query-stringify');
229
  wp_register_script('query-stringify', plugins_url('/js/jQuery.stringify.js', __FILE__));
234
  wp_enqueue_script( $this->prefix.'_builder_script',
235
  plugins_url('/js/fbuilderf.jquery.js?nc=1', __FILE__),array("jquery","jquery-ui-core","jquery-ui-datepicker","jquery-ui-widget","jquery-ui-dialog","jquery-ui-position","jquery-ui-tooltip","query-stringify",$this->prefix."_validate_script"), false, true );
236
 
237
+ wp_enqueue_script( $this->prefix.'_customjs', $this->get_site_url( false ).'?cp_cfte_resources=customjs',array($this->prefix.'_builder_script'));
238
+
239
  wp_localize_script($this->prefix.'_builder_script', $this->prefix.'_fbuilder_config'.('_'.$this->print_counter), array('obj' =>
240
  '{"pub":true,"identifier":"'.('_'.$this->print_counter).'","messages": {
241
  "required": "'.str_replace(array('"'),array('\\"'),__($this->get_option('vs_text_is_required', CP_CFEMAIL_DEFAULT_vs_text_is_required),'contact-form-to-email')).'",
463
  /* ]]> */
464
  </script>
465
  <script type='text/javascript' src='<?php echo plugins_url('js/fbuilderf.jquery.js?nc=1', __FILE__); ?>'></script>
466
+ <script type='text/javascript' src='<?php echo $this->get_site_url( false ).'?cp_cfte_resources=customjs'; ?>'></script>
467
  <?php
468
  }
469
  $this->print_counter++;
672
 
673
 
674
  function data_management() {
675
+ global $wpdb, $cp_cfte_plugin;
676
 
677
+ if( isset( $_REQUEST[ 'cp_cfte_resources' ] ) )
678
+ {
679
+ if( $_REQUEST[ 'cp_cfte_resources' ] == 'css' )
680
+ {
681
+ header("Content-type: text/css");
682
+ $custom_styles = base64_decode(get_option('CP_CFTE_CSS', ''));
683
+ echo $custom_styles;
684
+ }
685
+ else if( $_REQUEST[ 'cp_cfte_resources' ] == 'customjs' )
686
+ {
687
+ header("Content-type: application/javascript");
688
+ $custom_scripts = base64_decode(get_option('CP_CFTE_JS', ''));
689
+ echo $custom_scripts;
690
+ }
691
+ exit;
692
+ }
693
+
694
  $this->check_reports();
695
 
696
  if ($this->get_param($this->prefix.'_encodingfix') == '1')
cp-public-int.inc.php CHANGED
@@ -1,12 +1,4 @@
1
  <?php if ( !defined('CP_AUTH_INCLUDE') ) { echo 'Direct access not allowed.'; exit; } ?>
2
- <?php
3
- $custom_styles = base64_decode(get_option('CP_CFTE_CSS', ''));
4
- if ($custom_styles != '')
5
- echo '<style type="text/css">'.$custom_styles.'</style>';
6
- $custom_scripts = base64_decode(get_option('CP_CFTE_JS', ''));
7
- if ($custom_scripts != '')
8
- echo '<script type="text/javascript">'.$custom_scripts.'</script>';
9
- ?>
10
  <form class="cpp_form" name="<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>" id="<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>" action="<?php $this->get_site_url(); ?>" method="post" enctype="multipart/form-data" onsubmit="return <?php echo $this->prefix; ?>_pform_doValidate<?php echo '_'.$this->print_counter; ?>(this);"><input type="hidden" name="cp_pform_psequence" value="<?php echo '_'.$this->print_counter; ?>" /><input type="hidden" name="<?php echo $this->prefix; ?>_pform_process" value="1" /><input type="hidden" name="<?php echo $this->prefix; ?>_id" value="<?php echo $this->item; ?>" /><input type="hidden" name="cp_ref_page" value="<?php esc_attr($this->get_site_url()); ?>" /><input type="hidden" name="form_structure<?php echo '_'.$this->print_counter; ?>" id="form_structure<?php echo '_'.$this->print_counter; ?>" size="180" value="<?php echo $raw_form_str; ?>" /><input type="hidden" name="refpage<?php echo '_'.$this->print_counter; ?>" id="refpage<?php echo '_'.$this->print_counter; ?>" value=""><input type="hidden" name="<?php echo $this->prefix; ?>_pform_status" value="0" /><?php if (count($preload_params)) { ?><input type="hidden" name="edititem" value="<?php echo $preload_params["itemnumber"]; ?>" /><?php } ?>
11
  <?php if (is_admin() && !defined('APHOURBK_ELEMENTOR_EDIT_MODE') && @$_GET["action"] != 'edit') {?>
12
  <fieldset style="border: 1px solid black; -webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; padding:15px;">
1
  <?php if ( !defined('CP_AUTH_INCLUDE') ) { echo 'Direct access not allowed.'; exit; } ?>
 
 
 
 
 
 
 
 
2
  <form class="cpp_form" name="<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>" id="<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>" action="<?php $this->get_site_url(); ?>" method="post" enctype="multipart/form-data" onsubmit="return <?php echo $this->prefix; ?>_pform_doValidate<?php echo '_'.$this->print_counter; ?>(this);"><input type="hidden" name="cp_pform_psequence" value="<?php echo '_'.$this->print_counter; ?>" /><input type="hidden" name="<?php echo $this->prefix; ?>_pform_process" value="1" /><input type="hidden" name="<?php echo $this->prefix; ?>_id" value="<?php echo $this->item; ?>" /><input type="hidden" name="cp_ref_page" value="<?php esc_attr($this->get_site_url()); ?>" /><input type="hidden" name="form_structure<?php echo '_'.$this->print_counter; ?>" id="form_structure<?php echo '_'.$this->print_counter; ?>" size="180" value="<?php echo $raw_form_str; ?>" /><input type="hidden" name="refpage<?php echo '_'.$this->print_counter; ?>" id="refpage<?php echo '_'.$this->print_counter; ?>" value=""><input type="hidden" name="<?php echo $this->prefix; ?>_pform_status" value="0" /><?php if (count($preload_params)) { ?><input type="hidden" name="edititem" value="<?php echo $preload_params["itemnumber"]; ?>" /><?php } ?>
3
  <?php if (is_admin() && !defined('APHOURBK_ELEMENTOR_EDIT_MODE') && @$_GET["action"] != 'edit') {?>
4
  <fieldset style="border: 1px solid black; -webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; padding:15px;">
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.3.02
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.3.03
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
js/fbuilderf.jquery.js CHANGED
@@ -1269,6 +1269,7 @@ jQuery(window).on('load', function(){
1269
  e.css('top',element.parent().outerHeight(true));
1270
  }
1271
  });
 
1272
  } catch (e) {}
1273
  fcount++;
1274
  fnum = "_"+fcount;
1269
  e.css('top',element.parent().outerHeight(true));
1270
  }
1271
  });
1272
+ $( document ).trigger( 'showHideDepEvent', fnum );
1273
  } catch (e) {}
1274
  fcount++;
1275
  fnum = "_"+fcount;