Forms by CaptainForm – Form Builder for WordPress - Version 2.5

Version Description

(14 February 2019) = * Added support for WordPress 5.0 or higher

Download this release

Release Info

Developer 123contactform
Plugin Icon 128x128 Forms by CaptainForm – Form Builder for WordPress
Version 2.5
Comparing to
See all releases

Code changes from version 2.4.1 to 2.5

admin/gutenberg/blocks.build.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){function t(n){if(l[n])return l[n].exports;var i=l[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var l={};t.m=e,t.c=l,t.d=function(e,l,n){t.o(e,l)||Object.defineProperty(e,l,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(l,"a",l),l},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});l(1)},function(e,t,l){"use strict";var n=l(2),i=(l.n(n),l(3)),r=(l.n(i),l(4)),o=(l.n(r),l(5));wp.i18n.__;(0,wp.blocks.registerBlockType)("captainform/captainform-block",{title:"CaptainForm",icon:o.a,category:"embed",keywords:["captain-form-block \u2014 CaptainForm Block"],attributes:{shortcode:{type:"string",source:"text"}},edit:function(e){function t(t){""!=t&&void 0==e.attributes.shortcode&&!0===e.isSelected&&(e.attributes.shortcode=t,window.shortcode123="",setTimeout(function(){Object(r.dispatch)("core/editor").clearSelectedBlock()},500))}if(null==e.attributes.shortcode){!function(){window.captainformShowThickBox(),setTimeout(function(){var l=document.getElementById("captainform-button-insert"),n=document.getElementById("captainform-button-cancel");l.addEventListener("click",function(e){t(window.shortcode123)}),n.addEventListener("click",function(t){Object(r.dispatch)("core/editor").removeBlock(e.clientId),Object(r.dispatch)("core/editor").clearSelectedBlock()})},1600)}();var l=setInterval(function(){if(null===document.getElementById("TB_window")&&!0===e.isSelected&&null==e.attributes.shortcode){try{Object(r.dispatch)("core/editor").removeBlock(e.clientId)}catch(e){console.log(e)}Object(r.dispatch)("core/editor").clearSelectedBlock(),clearInterval(l)}},800)}return wp.element.createElement("div",{className:"captainform-guten-block-editor"},wp.element.createElement("p",null,e.attributes.shortcode))},save:function(e){return wp.element.createElement("div",{className:"captainform-guten-block"},wp.element.createElement("p",null,e.attributes.shortcode))}})},function(e,t){},function(e,t){},function(e,t){e.exports=wp.data},function(e,t,l){"use strict";t.a=function(){return wp.element.createElement("svg",{width:"84px",height:"88px",viewBox:"0 0 84 88"},wp.element.createElement("title",null,"CF_icon"),wp.element.createElement("defs",null,wp.element.createElement("polygon",{id:"path-1",points:"0.0766678112 0.101463415 39.3414489 0.101463415 39.3414489 6.84132927 0.0766678112 6.84132927"}),wp.element.createElement("polygon",{id:"path-3",points:"0 0.179970732 73.7160052 0.179970732 73.7160052 70.7073171 0 70.7073171"}),wp.element.createElement("polygon",{id:"path-5",points:"0.0766678112 0.101463415 39.3414489 0.101463415 39.3414489 6.84132927 0.0766678112 6.84132927"})),wp.element.createElement("g",{id:"CF_icon",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"Group-29",transform:"translate(5.000000, 5.000000)"},wp.element.createElement("polygon",{id:"Fill-1",fill:"#162B53",points:"56.4916635 7.05414878 17.224024 7.05414878 0.000127038627 7.05414878 7.08443605 20.6093439 29.3784446 63.2690024 36.8594318 77.5813683 44.3407365 63.2690024 66.6315691 20.6093439 73.7161957 7.05414878"}),wp.element.createElement("polygon",{id:"Fill-2",fill:"#FEFEFE",points:"36.8594318 66.296322 8.62795536 12.273078 65.0912258 12.273078"}),wp.element.createElement("polygon",{id:"Fill-3",fill:"#BE1E2D",points:"55.4743382 16.9734976 17.83057 16.9734976 36.6551536 54.5530098 41.9491708 43.9824244 37.8277202 35.764522 46.0649047 35.764522 49.5943554 28.7147171 34.3014455 28.7147171 31.9477373 24.0175951 51.9452052 24.0175951"}),wp.element.createElement("path",{d:"M29.3782223,63.2689707 L7.08453133,20.6093122 L29.3782223,63.2689707 Z",id:"Fill-4",fill:"#58595B"}),wp.element.createElement("g",{id:"Group-28",transform:"translate(0.000000, 0.215610)"},wp.element.createElement("path",{d:"M4.88574678,32.0222976 C4.88574678,47.0775659 15.3299099,59.6910537 29.3781588,63.0564683 L7.08446781,20.393639 C5.6702103,23.9968585 4.88574678,27.9165171 4.88574678,32.0222976",id:"Fill-5",fill:"#BE1E2D"}),wp.element.createElement("path",{d:"M68.833085,32.0222976 C68.833085,47.0775659 58.3889219,59.6910537 44.3378146,63.0564683 L66.631188,20.393639 C68.0457631,23.9968585 68.833085,27.9165171 68.833085,32.0222976",id:"Fill-7",fill:"#BE1E2D"}),wp.element.createElement("g",{id:"Group-11",transform:"translate(17.150215, 0.000000)"},wp.element.createElement("mask",{id:"mask-2",fill:"white"},wp.element.createElement("use",{href:"#path-1"})),wp.element.createElement("g",{id:"Clip-10"}),wp.element.createElement("path",{d:"M19.7092172,0.101304878 C12.3057236,0.101304878 5.49708841,2.62045122 0.0766678112,6.84132927 L39.3414489,6.84132927 C33.9210283,2.62045122 27.1123931,0.101304878 19.7092172,0.101304878",id:"Fill-9",fill:"#BE1E2D",mask:"url(#mask-2)"})),wp.element.createElement("g",{id:"Group-14",transform:"translate(0.000000, 6.658537)"},wp.element.createElement("mask",{id:"mask-4",fill:"white"},wp.element.createElement("use",{href:"#path-3"})),wp.element.createElement("g",{id:"Clip-13"}),wp.element.createElement("polygon",{id:"Fill-12",fill:"#162B53",mask:"url(#mask-4)",points:"56.4917906 0.179970732 17.2238335 0.179970732 -6.35193133e-05 0.179970732 7.08456309 13.7351659 29.3782541 56.3948244 36.8595588 70.7075073 44.3405459 56.3948244 66.6313785 13.7351659 73.7160052 0.179970732"})),wp.element.createElement("polygon",{id:"Fill-15",fill:"#FEFEFE",points:"36.8594318 66.0807122 8.62795536 12.0574683 65.0912258 12.0574683"}),wp.element.createElement("polygon",{id:"Fill-17",fill:"#BE1E2D",points:"55.4743382 16.7578878 17.83057 16.7578878 36.6551536 54.3374 41.9491708 43.7668146 37.8277202 35.5489122 46.0649047 35.5489122 49.5943554 28.4991073 34.3014455 28.4991073 31.9477373 23.8019854 51.9452052 23.8019854"}),wp.element.createElement("path",{d:"M29.3782223,63.053361 L7.08453133,20.3937024 L29.3782223,63.053361 Z",id:"Fill-19",fill:"#58595B"}),wp.element.createElement("path",{d:"M4.88574678,32.0222976 C4.88574678,47.0775659 15.3299099,59.6910537 29.3781588,63.0564683 L7.08446781,20.393639 C5.6702103,23.9968585 4.88574678,27.9165171 4.88574678,32.0222976",id:"Fill-21",fill:"#BE1E2D"}),wp.element.createElement("path",{d:"M68.833085,32.0222976 C68.833085,47.0775659 58.3889219,59.6910537 44.3378146,63.0564683 L66.631188,20.393639 C68.0457631,23.9968585 68.833085,27.9165171 68.833085,32.0222976",id:"Fill-23",fill:"#BE1E2D"}),wp.element.createElement("g",{id:"Group-27",transform:"translate(17.150215, 0.000000)"},wp.element.createElement("mask",{id:"mask-6",fill:"white"},wp.element.createElement("use",{href:"#path-5"})),wp.element.createElement("g",{id:"Clip-26"}),wp.element.createElement("path",{d:"M19.7092172,0.101304878 C12.3057236,0.101304878 5.49708841,2.62045122 0.0766678112,6.84132927 L39.3414489,6.84132927 C33.9210283,2.62045122 27.1123931,0.101304878 19.7092172,0.101304878",id:"Fill-25",fill:"#BE1E2D",mask:"url(#mask-6)"}))))))}}]);
admin/gutenberg/blocks.editor.build.css ADDED
File without changes
admin/gutenberg/blocks.style.build.css ADDED
File without changes
admin/gutenberg/init.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Blocks Initializer
4
+ *
5
+ * @since 1.0.0
6
+ * @package CPF
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Enqueue Gutenberg block assets for both frontend + backend.
15
+ *
16
+ * @uses {wp-editor} for WP editor styles.
17
+ * @since 1.0.0
18
+ */
19
+ function captain_form_block_assets() { // phpcs:ignore
20
+ wp_enqueue_style(
21
+ 'captain-form-block-style-css',
22
+ plugins_url( 'gutenberg/blocks.style.build.css', dirname( __FILE__ ) ),
23
+ array( 'wp-editor' )
24
+ );
25
+ }
26
+ add_action( 'enqueue_block_assets', 'captain_form_block_assets' );
27
+
28
+ /**
29
+ * Enqueue Gutenberg block assets for backend editor.
30
+ *
31
+ * @uses {wp-blocks} for block type registration & related functions.
32
+ * @uses {wp-element} for WP Element abstraction — structure of blocks.
33
+ * @uses {wp-i18n} to internationalize the block's text.
34
+ * @uses {wp-editor} for WP editor styles.
35
+ * @since 1.0.0
36
+ */
37
+ function captain_form_editor_assets() { // phpcs:ignore
38
+ wp_enqueue_script(
39
+ 'captain-form-block-js',
40
+ plugins_url( '/gutenberg/blocks.build.js', dirname( __FILE__ ) ),
41
+ array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),
42
+ true
43
+ );
44
+
45
+ wp_enqueue_style(
46
+ 'captain-form-block-editor-css',
47
+ plugins_url( 'gutenberg/blocks.editor.build.css', dirname( __FILE__ ) ),
48
+ array( 'wp-edit-blocks' )
49
+ );
50
+ }
51
+ add_action( 'enqueue_block_editor_assets', 'captain_form_editor_assets' );
admin/js/wp-editor-captainform-media-button.js CHANGED
@@ -6,11 +6,13 @@ function captainformBindPagePostWidget(url_plugin) {
6
  }
7
  }
8
 
 
9
  function captainformInsertShortcode() {
10
  var publish_code = document.getElementById('captainform_publish_code').value;
11
  var custom_vars = document.getElementById('captainform_custom_vars_code').value;
12
  var code = publish_code.substring(0, publish_code.length - 1) + custom_vars + ']';
13
  window.send_to_editor(code);
 
14
  tb_remove();
15
  }
16
 
6
  }
7
  }
8
 
9
+ window.shortcode123 = '';
10
  function captainformInsertShortcode() {
11
  var publish_code = document.getElementById('captainform_publish_code').value;
12
  var custom_vars = document.getElementById('captainform_custom_vars_code').value;
13
  var code = publish_code.substring(0, publish_code.length - 1) + custom_vars + ']';
14
  window.send_to_editor(code);
15
+ window.shortcode123 = code;
16
  tb_remove();
17
  }
18
 
captainform.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: CaptainForm
17
  * Plugin URI: http://captainform.com
18
  * Description: CaptainForm is a fully-featured WordPress form plugin created for web designers, developers, and also for non-tech savvy users.
19
- * Version: 2.4.1
20
  * Author: captainform
21
  * Author URI: https://profiles.wordpress.org/captainform
22
  * License: GPL-2.0+
@@ -85,3 +85,11 @@ function run_captainform() {
85
 
86
  }
87
  run_captainform();
 
 
 
 
 
 
 
 
16
  * Plugin Name: CaptainForm
17
  * Plugin URI: http://captainform.com
18
  * Description: CaptainForm is a fully-featured WordPress form plugin created for web designers, developers, and also for non-tech savvy users.
19
+ * Version: 2.5
20
  * Author: captainform
21
  * Author URI: https://profiles.wordpress.org/captainform
22
  * License: GPL-2.0+
85
 
86
  }
87
  run_captainform();
88
+
89
+ /**
90
+ * Block Initializer.
91
+ */
92
+ global $wp_version;
93
+ if ( version_compare( $wp_version, '5.0', '>=' ) ) {
94
+ include plugin_dir_path( __FILE__ ) . 'admin/gutenberg/init.php';
95
+ }
includes/class-captainform.php CHANGED
@@ -105,7 +105,7 @@ class Captainform {
105
  public function __construct() {
106
 
107
  $this->plugin_name = 'captainform';
108
- $this->version = '2.4.1';
109
 
110
  $this->load_dependencies();
111
  $this->set_locale();
105
  public function __construct() {
106
 
107
  $this->plugin_name = 'captainform';
108
+ $this->version = '2.5';
109
 
110
  $this->load_dependencies();
111
  $this->set_locale();
readme.txt CHANGED
@@ -3,7 +3,7 @@
3
  Contributors: captainform, 123contactform
4
  Tags: CaptainForm, contact form, drag-and-drop, file upload forms, form builder plugin, newsletter subscription, order form, payment form, paypal form, popup form, registration form, secure forms, survey,form builder, event registration, survey, feedback form,booking form, poll, quiz, PayPal form
5
  Requires at least: 3.9
6
- Tested up to: 4.9
7
  Requires PHP: 5.3
8
  Stable tag: trunk
9
  License: GPLv2 or later
@@ -482,6 +482,9 @@ We support MasterCard, Visa, PayPal, American Express, JCB, Discover/Novus and D
482
  Click on the Cancel subscription button in the My Account section and fill out the cancellation form. All premium features will be deactivated when your license key will expire. You can upgrade again at any time by purchasing a new license key.
483
 
484
  == Changelog ==
 
 
 
485
  = 2.4.1 (05 February 2019) =
486
  * Update support widget
487
 
3
  Contributors: captainform, 123contactform
4
  Tags: CaptainForm, contact form, drag-and-drop, file upload forms, form builder plugin, newsletter subscription, order form, payment form, paypal form, popup form, registration form, secure forms, survey,form builder, event registration, survey, feedback form,booking form, poll, quiz, PayPal form
5
  Requires at least: 3.9
6
+ Tested up to: 5.0.3
7
  Requires PHP: 5.3
8
  Stable tag: trunk
9
  License: GPLv2 or later
482
  Click on the Cancel subscription button in the My Account section and fill out the cancellation form. All premium features will be deactivated when your license key will expire. You can upgrade again at any time by purchasing a new license key.
483
 
484
  == Changelog ==
485
+ = 2.5 (14 February 2019) =
486
+ * Added support for WordPress 5.0 or higher
487
+
488
  = 2.4.1 (05 February 2019) =
489
  * Update support widget
490