Version Description
(30 September 2016) = * Added support for PHP 5.2
Download this release
Release Info
Developer | 123contactform |
Plugin | Forms by CaptainForm – Form Builder for WordPress |
Version | 1.7.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1.1 to 1.7.2.2
- captainform.php +1 -1
- includes/display-functions.php +6 -4
- includes/form-resources/global-vars.php +2 -1
- includes/form-resources/normal-embedding.php +1 -1
- includes/hooks.php +52 -0
- includes/settings.php +1 -1
- readme.txt +4 -1
captainform.php
CHANGED
@@ -6,7 +6,7 @@ defined('ABSPATH') or die('No direct access!');
|
|
6 |
Description: CaptainForm is a fully-featured WordPress form plugin created for web designers, developers, and also for non-tech savvy users.
|
7 |
Author: CaptainForm
|
8 |
Author URI: https://profiles.wordpress.org/captainform
|
9 |
-
Version: 1.7.2.
|
10 |
*/
|
11 |
|
12 |
/* * ****************************
|
6 |
Description: CaptainForm is a fully-featured WordPress form plugin created for web designers, developers, and also for non-tech savvy users.
|
7 |
Author: CaptainForm
|
8 |
Author URI: https://profiles.wordpress.org/captainform
|
9 |
+
Version: 1.7.2.2
|
10 |
*/
|
11 |
|
12 |
/* * ****************************
|
includes/display-functions.php
CHANGED
@@ -22,9 +22,11 @@ function captainform_get_custom_vars_from_shortcode($shortcode)
|
|
22 |
{
|
23 |
$custom_vars_string = '';
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
|
29 |
return $custom_vars_string;
|
30 |
}
|
@@ -53,7 +55,7 @@ function captainform_get_custom_vars($shortcode, $extra_vars)
|
|
53 |
} elseif (strlen($extra_vars))
|
54 |
$custom_vars_string .= $extra_vars;
|
55 |
|
56 |
-
if(strlen($custom_vars_string))
|
57 |
$custom_vars_string .= '&embeddingCustomVars=true';
|
58 |
|
59 |
return $custom_vars_string;
|
22 |
{
|
23 |
$custom_vars_string = '';
|
24 |
|
25 |
+
preg_match_all('/cf_custom_var([\\d-]+)=(\'[^\']+\'|"[^"]+")/', $shortcode, $matches, PREG_SET_ORDER);
|
26 |
+
if (count($matches))
|
27 |
+
foreach ($matches as $custom_var)
|
28 |
+
if (isset($custom_var[1]) && !empty($custom_var[1]) && isset($custom_var[2]) && !empty($custom_var[2]))
|
29 |
+
$custom_vars_string .= '&control' . $custom_var[1] . '=' . urlencode(substr($custom_var[2], 1, -1));
|
30 |
|
31 |
return $custom_vars_string;
|
32 |
}
|
55 |
} elseif (strlen($extra_vars))
|
56 |
$custom_vars_string .= $extra_vars;
|
57 |
|
58 |
+
if (strlen($custom_vars_string))
|
59 |
$custom_vars_string .= '&embeddingCustomVars=true';
|
60 |
|
61 |
return $custom_vars_string;
|
includes/form-resources/global-vars.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<script type="text/javascript">
|
2 |
-
|
|
|
3 |
if (document.getElementById('captainform_js_global_vars') == null) {
|
4 |
append_element({
|
5 |
elementType: "script",
|
1 |
<script type="text/javascript">
|
2 |
+
var captainformDomReady=function(e){var t=!1,n=function(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",d),window.removeEventListener("load",d)):(document.detachEvent("onreadystatechange",d),window.detachEvent("onload",d))},d=function(){t||!document.addEventListener&&"load"!==event.type&&"complete"!==document.readyState||(t=!0,n(),e())};if("complete"===document.readyState)e();else if(document.addEventListener)document.addEventListener("DOMContentLoaded",d),window.addEventListener("load",d);else{document.attachEvent("onreadystatechange",d),window.attachEvent("onload",d);var o=!1;try{o=null==window.frameElement&&document.documentElement}catch(a){}o&&o.doScroll&&!function c(){if(!t){try{o.doScroll("left")}catch(d){return setTimeout(c,50)}t=!0,n(),e()}}()}};
|
3 |
+
captainformDomReady(function() {
|
4 |
if (document.getElementById('captainform_js_global_vars') == null) {
|
5 |
append_element({
|
6 |
elementType: "script",
|
includes/form-resources/normal-embedding.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<script id="{{ID}}" type="text/javascript">
|
2 |
var customVarsMF = '{{CUSTOMVARS}}';
|
3 |
var captainform_theme_style = '{{STYLE}}';
|
4 |
-
|
5 |
if(document.getElementById('captainform_easyxdmjs') == null)
|
6 |
{
|
7 |
append_element({
|
1 |
<script id="{{ID}}" type="text/javascript">
|
2 |
var customVarsMF = '{{CUSTOMVARS}}';
|
3 |
var captainform_theme_style = '{{STYLE}}';
|
4 |
+
captainformDomReady(function(){
|
5 |
if(document.getElementById('captainform_easyxdmjs') == null)
|
6 |
{
|
7 |
append_element({
|
includes/hooks.php
CHANGED
@@ -1,12 +1,64 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( 'No direct access!' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
function captainform_deactivate(){
|
|
|
|
|
|
|
5 |
}
|
6 |
|
7 |
function captainform_activate(){
|
|
|
|
|
|
|
8 |
check_captainform_settings();
|
|
|
9 |
}
|
10 |
|
11 |
function captainform_uninstall(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) or die( 'No direct access!' );
|
3 |
+
global $args;
|
4 |
+
$args = array();
|
5 |
+
|
6 |
+
function captainform_curl_call(){
|
7 |
+
global $args;
|
8 |
+
$_curl_url = 'http://' . $GLOBALS['captainform_servicedomain'] . '/modules/captainform/plugin_track.php?';
|
9 |
+
|
10 |
+
$args['website'] = get_site_url();
|
11 |
+
$args['is_multisite'] = is_multisite();
|
12 |
+
$args['unique_id'] = captainform_get_referer_params('unique_id');
|
13 |
+
|
14 |
+
$args['installation_id'] = captainform_wpp_encrypt(get_site_option($GLOBALS['captainform_option1']));
|
15 |
+
$args['installation_key'] = captainform_wpp_encrypt(get_site_option($GLOBALS['captainform_option2']));
|
16 |
+
$args['source'] = captainform_get_referer_params('source');
|
17 |
+
|
18 |
+
$_curl_url .= http_build_query($args);
|
19 |
+
|
20 |
+
$response = wp_remote_get( $_curl_url, $args );
|
21 |
+
}
|
22 |
|
23 |
function captainform_deactivate(){
|
24 |
+
global $args;
|
25 |
+
$args['action'] = 'deactivate';
|
26 |
+
captainform_curl_call();
|
27 |
}
|
28 |
|
29 |
function captainform_activate(){
|
30 |
+
global $args;
|
31 |
+
$args['action'] = 'activate';
|
32 |
+
|
33 |
check_captainform_settings();
|
34 |
+
captainform_curl_call();
|
35 |
}
|
36 |
|
37 |
function captainform_uninstall(){
|
38 |
+
global $args;
|
39 |
+
$args['action'] = 'uninstall';
|
40 |
+
captainform_curl_call();
|
41 |
+
}
|
42 |
+
|
43 |
+
function captainform_get_referer_params($param = '') {
|
44 |
+
$file_exists = false;
|
45 |
+
$plugin_referer = '';
|
46 |
+
$file = (__DIR__) . '/referer.php';
|
47 |
+
if (file_exists($file)) {
|
48 |
+
require_once($file);
|
49 |
+
$file_exists = true;
|
50 |
+
}
|
51 |
+
if ($param == 'unique_id') {
|
52 |
+
if ($file_exists && isset($captainform_unique_id) && $captainform_unique_id) {
|
53 |
+
return $captainform_unique_id;
|
54 |
+
}
|
55 |
+
return 'captainform_' . substr(md5(get_site_url()),-12);
|
56 |
+
}
|
57 |
+
if ($param == 'source') {
|
58 |
+
if ($file_exists && isset($captainform_referer) && $captainform_referer) {
|
59 |
+
return $captainform_referer;
|
60 |
+
}
|
61 |
+
return 'plugin_directory';
|
62 |
+
}
|
63 |
+
return '';
|
64 |
}
|
includes/settings.php
CHANGED
@@ -11,7 +11,7 @@ global $captainform_plugin_name,
|
|
11 |
$captainform_widget_text_filter;
|
12 |
|
13 |
$captainform_plugin_name = 'captainform';
|
14 |
-
$captainform_plugin_version = "1.7.2.
|
15 |
|
16 |
//plugin options key name
|
17 |
$captainform_option1 = $captainform_plugin_name . '_installation_id';
|
11 |
$captainform_widget_text_filter;
|
12 |
|
13 |
$captainform_plugin_name = 'captainform';
|
14 |
+
$captainform_plugin_version = "1.7.2.2";
|
15 |
|
16 |
//plugin options key name
|
17 |
$captainform_option1 = $captainform_plugin_name . '_installation_id';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: captainform, 123contactform
|
|
4 |
Tags: CaptainForm, form builder plugin, drag-and-drop, event registration form, order form, paypal form, quiz, survey, popup form, newsletter subscription, contact form, secured forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.6
|
7 |
-
Stable tag: 1.7.2.
|
8 |
|
9 |
User-friendly form builder with advanced features. Build any type of form or survey with drag & drop ease and no add-ons required.
|
10 |
|
@@ -92,6 +92,9 @@ We support MasterCard, Visa, PayPal, American Express, JCB, Discover/Novus and D
|
|
92 |
To downgrade the plugin, click on the Downgrade button under our Pioneer plan and fill out the cancellation form. All premium features will be deactivated, but you can upgrade again at any time by purchasing a new license key.
|
93 |
|
94 |
== Changelog ==
|
|
|
|
|
|
|
95 |
= 1.7.2.1 (22 September 2016) =
|
96 |
* Fix for cached JavaScript
|
97 |
|
4 |
Tags: CaptainForm, form builder plugin, drag-and-drop, event registration form, order form, paypal form, quiz, survey, popup form, newsletter subscription, contact form, secured forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.6
|
7 |
+
Stable tag: 1.7.2.2
|
8 |
|
9 |
User-friendly form builder with advanced features. Build any type of form or survey with drag & drop ease and no add-ons required.
|
10 |
|
92 |
To downgrade the plugin, click on the Downgrade button under our Pioneer plan and fill out the cancellation form. All premium features will be deactivated, but you can upgrade again at any time by purchasing a new license key.
|
93 |
|
94 |
== Changelog ==
|
95 |
+
= 1.7.2.2 (30 September 2016) =
|
96 |
+
* Added support for PHP 5.2
|
97 |
+
|
98 |
= 1.7.2.1 (22 September 2016) =
|
99 |
* Fix for cached JavaScript
|
100 |
|