Contact Form 7 - Version 5.5.4

Version Description

https://contactform7.com/contact-form-7-554/

Download this release

Release Info

Developer takayukister
Plugin Icon 128x128 Contact Form 7
Version 5.5.4
Comparing to
See all releases

Code changes from version 5.5.3 to 5.5.4

admin/css/styles-rtl.css CHANGED
@@ -35,9 +35,24 @@
35
  /*
36
  * Welcome Panel
37
  */
38
- .welcome-panel .welcome-panel-column,
39
- .welcome-panel .welcome-panel-column:first-child {
40
- padding: 0 0 0 2%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
 
43
  /*
35
  /*
36
  * Welcome Panel
37
  */
38
+ .wpcf7-welcome-panel .welcome-panel-close {
39
+ left: 10px;
40
+ right: auto;
41
+ padding: 10px 21px 10px 15px;
42
+ }
43
+
44
+ .wpcf7-welcome-panel .welcome-panel-close::before {
45
+ right: 0;
46
+ left: auto;
47
+ }
48
+
49
+ .wpcf7-welcome-panel .welcome-panel-content {
50
+ margin-right: 13px;
51
+ }
52
+
53
+ .wpcf7-welcome-panel .welcome-panel-column {
54
+ float: right;
55
+ padding: 0 0 0 2%;
56
  }
57
 
58
  /*
admin/css/styles.css CHANGED
@@ -359,30 +359,26 @@ ul.config-error li {
359
  /*
360
  * Welcome Panel
361
  */
362
- .welcome-panel .welcome-panel-column,
363
- .welcome-panel .welcome-panel-column:first-child {
364
- width: 48%;
365
- padding: 0 2% 0 0;
366
- margin: 0 0 1em 0;
367
- }
368
-
369
- @media screen and (max-width: 870px) {
370
- .welcome-panel .welcome-panel-column,
371
- .welcome-panel .welcome-panel-column:first-child {
372
- display: block;
373
- float: none;
374
- width: 100%;
375
- }
376
  }
377
 
378
- .welcome-panel h3 {
379
  font-size: 16px;
380
  font-weight: 600;
381
  line-height: 2.1em;
382
  margin: 1em 0 1.2em;
383
  }
384
 
385
- .welcome-panel h3 .dashicons {
386
  position: relative;
387
  top: -2px;
388
  display: inline-block;
@@ -391,12 +387,75 @@ ul.config-error li {
391
  font-size: 40px;
392
  }
393
 
394
- .welcome-panel p a {
 
 
 
 
395
  font-weight: bold;
396
  }
397
 
398
- .welcome-panel-close {
 
399
  z-index: 2;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  }
401
 
402
  /*
359
  /*
360
  * Welcome Panel
361
  */
362
+ .wpcf7-welcome-panel {
363
+ position: relative;
364
+ overflow: auto;
365
+ margin: 16px 0;
366
+ padding: 23px 10px 0;
367
+ border: 1px solid #c3c4c7;
368
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
369
+ background: #fff;
370
+ font-size: 13px;
371
+ line-height: 1.7;
 
 
 
 
372
  }
373
 
374
+ .wpcf7-welcome-panel h3 {
375
  font-size: 16px;
376
  font-weight: 600;
377
  line-height: 2.1em;
378
  margin: 1em 0 1.2em;
379
  }
380
 
381
+ .wpcf7-welcome-panel h3 .dashicons {
382
  position: relative;
383
  top: -2px;
384
  display: inline-block;
387
  font-size: 40px;
388
  }
389
 
390
+ .wpcf7-welcome-panel p {
391
+ color: #646970;
392
+ }
393
+
394
+ .wpcf7-welcome-panel p a {
395
  font-weight: bold;
396
  }
397
 
398
+ .wpcf7-welcome-panel .welcome-panel-close {
399
+ position: absolute;
400
  z-index: 2;
401
+ top: 10px;
402
+ right: 10px;
403
+ padding: 10px 15px 10px 21px;
404
+ font-size: 13px;
405
+ line-height: 1.23076923; /* Chrome rounding, needs to be 16px equivalent */
406
+ text-decoration: none;
407
+ }
408
+
409
+ .wpcf7-welcome-panel .welcome-panel-close::before {
410
+ background: 0 0;
411
+ color: #787c82;
412
+ content: "\f153";
413
+ display: block;
414
+ font: normal 16px/20px dashicons;
415
+ speak: never;
416
+ height: 20px;
417
+ text-align: center;
418
+ width: 20px;
419
+ -webkit-font-smoothing: antialiased;
420
+ -moz-osx-font-smoothing: grayscale;
421
+ position: absolute;
422
+ top: 8px;
423
+ left: 0;
424
+ transition: all .1s ease-in-out;
425
+ }
426
+
427
+ .wpcf7-welcome-panel .welcome-panel-content {
428
+ display: block;
429
+ margin-left: 13px;
430
+ max-width: 1500px;
431
+ min-height: auto;
432
+ }
433
+
434
+ .wpcf7-welcome-panel .welcome-panel-column-container {
435
+ clear: both;
436
+ position: relative;
437
+ }
438
+
439
+ .wpcf7-welcome-panel .welcome-panel-column {
440
+ display: block;
441
+ width: 48%;
442
+ min-width: 200px;
443
+ float: left;
444
+ padding: 0 2% 0 0;
445
+ margin: 0 0 1em 0;
446
+ }
447
+
448
+ @media screen and (max-width: 870px) {
449
+ .wpcf7-welcome-panel .welcome-panel-column {
450
+ display: block;
451
+ float: none;
452
+ width: 100%;
453
+ }
454
+ }
455
+
456
+ .wpcf7-welcome-panel .welcome-panel-column p {
457
+ margin-top: 7px;
458
+ color: #3c434a;
459
  }
460
 
461
  /*
admin/includes/welcome-panel.php CHANGED
@@ -200,7 +200,7 @@ function wpcf7_welcome_panel() {
200
  $columns[] = new WPCF7_WelcomePanelColumn_Integration();
201
  }
202
 
203
- $classes = 'welcome-panel';
204
 
205
  $vers = (array) get_user_meta( get_current_user_id(),
206
  'wpcf7_hide_welcome_panel_on', true
@@ -211,7 +211,7 @@ function wpcf7_welcome_panel() {
211
  }
212
 
213
  ?>
214
- <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
215
  <?php wp_nonce_field( 'wpcf7-welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
216
  <a class="welcome-panel-close" href="<?php echo esc_url( menu_page_url( 'wpcf7', false ) ); ?>"><?php echo esc_html( __( 'Dismiss', 'contact-form-7' ) ); ?></a>
217
 
200
  $columns[] = new WPCF7_WelcomePanelColumn_Integration();
201
  }
202
 
203
+ $classes = 'wpcf7-welcome-panel';
204
 
205
  $vers = (array) get_user_meta( get_current_user_id(),
206
  'wpcf7_hide_welcome_panel_on', true
211
  }
212
 
213
  ?>
214
+ <div id="wpcf7-welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
215
  <?php wp_nonce_field( 'wpcf7-welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
216
  <a class="welcome-panel-close" href="<?php echo esc_url( menu_page_url( 'wpcf7', false ) ); ?>"><?php echo esc_html( __( 'Dismiss', 'contact-form-7' ) ); ?></a>
217
 
admin/js/scripts.js CHANGED
@@ -7,7 +7,7 @@
7
  }
8
 
9
  $( function() {
10
- var welcomePanel = $( '#welcome-panel' );
11
  var updateWelcomePanel;
12
 
13
  updateWelcomePanel = function( visible ) {
7
  }
8
 
9
  $( function() {
10
+ var welcomePanel = $( '#wpcf7-welcome-panel' );
11
  var updateWelcomePanel;
12
 
13
  updateWelcomePanel = function( visible ) {
includes/block-editor/index.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var c in r)e.o(r,c)&&!e.o(t,c)&&Object.defineProperty(t,c,{enumerable:!0,get:r[c]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,r=window.wp.i18n,c=window.wp.blocks,n=(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 242.5 239.46"},(0,t.createElement)("defs",null,(0,t.createElement)("clipPath",{id:"clip-path",transform:"translate(1.72)"},(0,t.createElement)("circle",{className:"cls-1",cx:"119.73",cy:"119.73",r:"116.15",fill:"none"}))),(0,t.createElement)("g",{id:"Layer_2","data-name":"Layer 2"},(0,t.createElement)("g",{id:"Layer_1","data-name":"Layer 1"},(0,t.createElement)("g",{className:"cls-2",clipPath:"url(#clip-path)"},(0,t.createElement)("circle",{className:"cls-3",cx:"121.45",cy:"119.73",r:"116.15",fill:"#33c6f4"}),(0,t.createElement)("path",{className:"cls-4",d:"M239.32,167.79c-53.41-24-108.37-91.46-113-94.55s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11S36.94,237.79,122,237.79C208.48,237.79,239.32,167.79,239.32,167.79Z",transform:"translate(1.72)",fill:"#1b447e"}),(0,t.createElement)("path",{className:"cls-5",d:"M67.48,116.58s15.48-7,12.38,4.65-15.48,28.64-11.61,29.41S83,140.58,86.06,142.12s5.42.78,3.87,6.2-3.1,9.29,0,9.29,5.42-7,9.29-13.94,10.06-3.87,12.38-1.55,9.29,15.49,14.71,13.94,8.51-8.52,6.19-24,1.55-20.12,1.55-20.12,4.64-2.32,13.16,8.51,24,27.09,26.31,26.32-10.83-17.8-7.74-19.35,15.48,2.32,21.68,7.74c0,0,2.12,8.87,2.12.36L126.31,73.24,115.47,74l-10.06.77S80.64,111.94,67.48,116.58Z",transform:"translate(1.72)",fill:"#fff"}),(0,t.createElement)("path",{className:"cls-6",d:"M239.32,170.11c-53.41-24-108.37-93.78-113-96.87s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11",transform:"translate(1.72)",fill:"none",stroke:"#221e1f",strokeMiterlimit:"10",strokeWidth:"8px"})),(0,t.createElement)("circle",{className:"cls-6",cx:"121.45",cy:"119.73",r:"116.15",fill:"none",stroke:"#1b447e",strokeMiterlimit:"10",strokeWidth:"8px"})))),a=window.wp.apiFetch,o=e.n(a),l=window.wp.compose,s=window.wp.components;const i=new Map;o()({path:"contact-form-7/v1/contact-forms?per_page=20"}).then((e=>{Object.entries(e).forEach((([e,t])=>{i.set(t.id,t)}))}));var m={from:[{type:"shortcode",tag:"contact-form-7",attributes:{id:{type:"integer",shortcode:function(e){var t=e.named.id;return parseInt(t)}},title:{type:"string",shortcode:function(e){return e.named.title}}}}],to:[{type:"block",blocks:["core/shortcode"],transform:function(e){return(0,c.createBlock)("core/shortcode",{text:'[contact-form-7 id="'.concat(e.id,'" title="').concat(e.title,'"]')})}}]};(0,c.registerBlockType)("contact-form-7/contact-form-selector",{title:(0,r.__)("Contact Form 7","contact-form-7"),description:(0,r.__)("Insert a contact form you have created with Contact Form 7.","contact-form-7"),category:"widgets",attributes:{id:{type:"integer"},title:{type:"string"}},icon:n,transforms:m,edit:function e({attributes:c,setAttributes:n}){if(!i.size&&!c.id)return(0,t.createElement)("div",{className:"components-placeholder"},(0,t.createElement)("p",null,(0,r.__)("No contact forms were found. Create a contact form first.","contact-form-7")));const a=Array.from(i.values(),(e=>({value:e.id,label:e.title})));if(c.id)a.length||a.push({value:c.id,label:c.title});else{const e=a[0];c={id:parseInt(e.value),title:e.label}}const o=`contact-form-7-contact-form-selector-${(0,l.useInstanceId)(e)}`;return(0,t.createElement)("div",{className:"components-placeholder"},(0,t.createElement)("label",{htmlFor:o,className:"components-placeholder__label"},(0,r.__)("Select a contact form:","contact-form-7")),(0,t.createElement)(s.SelectControl,{id:o,options:a,value:c.id,onChange:e=>n({id:parseInt(e),title:i.get(parseInt(e)).title})}))},save:function(e){var r=e.attributes;return(0,t.createElement)("div",null,'[contact-form-7 id="',r.id,'" title="',r.title,'"]')}})}();
1
+ !function(){"use strict";var t,e={n:function(t){var c=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(c,{a:c}),c},d:function(t,c){for(var r in c)e.o(c,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:c[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},c=window.wp.element,r=window.wp.apiFetch,o=e.n(r),n=window.wp.i18n,a=window.wp.blocks,l=(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 242.5 239.46"},(0,c.createElement)("defs",null,(0,c.createElement)("clipPath",{id:"clip-path",transform:"translate(1.72)"},(0,c.createElement)("circle",{className:"cls-1",cx:"119.73",cy:"119.73",r:"116.15",fill:"none"}))),(0,c.createElement)("g",{id:"Layer_2","data-name":"Layer 2"},(0,c.createElement)("g",{id:"Layer_1","data-name":"Layer 1"},(0,c.createElement)("g",{className:"cls-2",clipPath:"url(#clip-path)"},(0,c.createElement)("circle",{className:"cls-3",cx:"121.45",cy:"119.73",r:"116.15",fill:"#33c6f4"}),(0,c.createElement)("path",{className:"cls-4",d:"M239.32,167.79c-53.41-24-108.37-91.46-113-94.55s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11S36.94,237.79,122,237.79C208.48,237.79,239.32,167.79,239.32,167.79Z",transform:"translate(1.72)",fill:"#1b447e"}),(0,c.createElement)("path",{className:"cls-5",d:"M67.48,116.58s15.48-7,12.38,4.65-15.48,28.64-11.61,29.41S83,140.58,86.06,142.12s5.42.78,3.87,6.2-3.1,9.29,0,9.29,5.42-7,9.29-13.94,10.06-3.87,12.38-1.55,9.29,15.49,14.71,13.94,8.51-8.52,6.19-24,1.55-20.12,1.55-20.12,4.64-2.32,13.16,8.51,24,27.09,26.31,26.32-10.83-17.8-7.74-19.35,15.48,2.32,21.68,7.74c0,0,2.12,8.87,2.12.36L126.31,73.24,115.47,74l-10.06.77S80.64,111.94,67.48,116.58Z",transform:"translate(1.72)",fill:"#fff"}),(0,c.createElement)("path",{className:"cls-6",d:"M239.32,170.11c-53.41-24-108.37-93.78-113-96.87s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11",transform:"translate(1.72)",fill:"none",stroke:"#221e1f",strokeMiterlimit:"10",strokeWidth:"8px"})),(0,c.createElement)("circle",{className:"cls-6",cx:"121.45",cy:"119.73",r:"116.15",fill:"none",stroke:"#1b447e",strokeMiterlimit:"10",strokeWidth:"8px"})))),i=window.wp.compose,s=window.wp.components,m={from:[{type:"shortcode",tag:"contact-form-7",attributes:{id:{type:"integer",shortcode:t=>{let{named:{id:e}}=t;return parseInt(e)}},title:{type:"string",shortcode:t=>{let{named:{title:e}}=t;return e}}}}],to:[{type:"block",blocks:["core/shortcode"],transform:t=>(0,a.createBlock)("core/shortcode",{text:`[contact-form-7 id="${t.id}" title="${t.title}"]`})}]};window.wpcf7=null!==(t=window.wpcf7)&&void 0!==t?t:{},o()({path:"contact-form-7/v1/contact-forms?per_page=20"}).then((t=>{window.wpcf7.contactForms=t})),(0,a.registerBlockType)("contact-form-7/contact-form-selector",{title:(0,n.__)("Contact Form 7","contact-form-7"),description:(0,n.__)("Insert a contact form you have created with Contact Form 7.","contact-form-7"),category:"widgets",attributes:{id:{type:"integer"},title:{type:"string"}},icon:l,transforms:m,edit:function t(e){let{attributes:r,setAttributes:o}=e;const a=new Map;if(Object.entries(window.wpcf7.contactForms).forEach((t=>{let[e,c]=t;a.set(c.id,c)})),!a.size&&!r.id)return(0,c.createElement)("div",{className:"components-placeholder"},(0,c.createElement)("p",null,(0,n.__)("No contact forms were found. Create a contact form first.","contact-form-7")));const l=Array.from(a.values(),(t=>({value:t.id,label:t.title})));if(r.id)l.length||l.push({value:r.id,label:r.title});else{const t=l[0];r={id:parseInt(t.value),title:t.label}}const m=`contact-form-7-contact-form-selector-${(0,i.useInstanceId)(t)}`;return(0,c.createElement)("div",{className:"components-placeholder"},(0,c.createElement)("label",{htmlFor:m,className:"components-placeholder__label"},(0,n.__)("Select a contact form:","contact-form-7")),(0,c.createElement)(s.SelectControl,{id:m,options:l,value:r.id,onChange:t=>o({id:parseInt(t),title:a.get(parseInt(t)).title})}))},save:t=>{var e,r,o,n;let{attributes:a}=t;return a={id:null!==(e=a.id)&&void 0!==e?e:null===(r=window.wpcf7.contactForms[0])||void 0===r?void 0:r.id,title:null!==(o=a.title)&&void 0!==o?o:null===(n=window.wpcf7.contactForms[0])||void 0===n?void 0:n.title},(0,c.createElement)("div",null,'[contact-form-7 id="',a.id,'" title="',a.title,'"]')}})}();
includes/js/index.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e=function(e){return Math.abs(parseInt(e,10))};const t=(e,t)=>{const n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["payment_required","payment-required"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const r=e.getAttribute("data-status");return e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t&&e.classList.remove(r),t};var n=function(e,t,n){var r=new CustomEvent("wpcf7".concat(t),{bubbles:!0,detail:n});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(r)};function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var o=function(e){var t=wpcf7.api,n=t.root,r=t.namespace,a=void 0===r?"contact-form-7/v1":r;return i.reduceRight((function(e,t){return function(n){return t(n,e)}}),(function(e){var t,r,o=e.url,i=e.path,s=e.endpoint,u=e.headers,l=e.body,f=e.data,p=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["url","path","endpoint","headers","body","data"]);"string"==typeof s&&(t=a.replace(/^\/|\/$/g,""),i=(r=s.replace(/^\//,""))?t+"/"+r:t),"string"==typeof i&&(-1!==n.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),o=n+i),delete(u=c({Accept:"application/json, */*;q=0.1"},u))["X-WP-Nonce"],f&&(l=JSON.stringify(f),u["Content-Type"]="application/json");var d={code:"fetch_error",message:"You are probably offline."},w={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(o||i||window.location.href,c(c({},p),{},{headers:u,body:l})).then((function(e){return Promise.resolve(e).then((function(e){if(e.status>=200&&e.status<300)return e;throw e})).then((function(e){if(204===e.status)return null;if(e&&e.json)return e.json().catch((function(){throw w}));throw w}))}),(function(){throw d}))}))(e)},i=[];function s(e,r={}){if(wpcf7.blocked)return u(e),void t(e,"submitting");const a=new FormData(e);r.submitter&&r.submitter.name&&a.append(r.submitter.name,r.submitter.value);const c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(a,(e=>{const t=e[0],n=e[1];return!t.match(/^_/)&&{name:t,value:n}})).filter((e=>!1!==e)),formData:a},i=t=>{const n=document.createElement("li");n.setAttribute("id",t.error_id),t.idref?n.insertAdjacentHTML("beforeend",`<a href="#${t.idref}">${t.message}</a>`):n.insertAdjacentText("beforeend",t.message),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(n)},s=t=>{const n=e.querySelector(t.into),r=n.querySelector(".wpcf7-form-control");r.classList.add("wpcf7-not-valid"),r.setAttribute("aria-describedby",t.error_id);const a=document.createElement("span");a.setAttribute("class","wpcf7-not-valid-tip"),a.setAttribute("aria-hidden","true"),a.insertAdjacentText("beforeend",t.message),n.appendChild(a),n.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),r.closest(".use-floating-validation-tip")&&(r.addEventListener("focus",(e=>{a.setAttribute("style","display: none")})),a.addEventListener("mouseover",(e=>{a.setAttribute("style","display: none")})))};o({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:a,wpcf7:{endpoint:"feedback",form:e,detail:c}}).then((r=>{const a=t(e,r.status);return c.status=r.status,c.apiResponse=r,["invalid","unaccepted","spam","aborted"].includes(a)?n(e,a,c):["sent","failed"].includes(a)&&n(e,`mail${a}`,c),n(e,"submit",c),r})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&(t.invalid_fields.forEach(i),t.invalid_fields.forEach(s)),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}o.use=function(e){i.unshift(e)},o.use(((e,r)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:r,detail:a}=e.wpcf7;u(r),n(r,"beforesubmit",a),t(r,"submitting")}return r(e)}));const u=e=>{e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.wpcf7.parent.querySelector(".screen-reader-response ul").innerText="",e.querySelectorAll(".wpcf7-not-valid-tip").forEach((e=>{e.remove()})),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid")})),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function l(e){var r=new FormData(e),a={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(r,(function(e){var t=e[0],n=e[1];return!t.match(/^_/)&&{name:t,value:n}})).filter((function(e){return!1!==e})),formData:r};o({endpoint:"contact-forms/".concat(e.wpcf7.id,"/refill"),method:"GET",wpcf7:{endpoint:"refill",form:e,detail:a}}).then((function(r){e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,t(e,"mail_sent")):t(e,"init"),a.apiResponse=r,n(e,"reset",a)})).catch((function(e){return console.error(e)}))}o.use((function(e,n){if(e.wpcf7&&"refill"===e.wpcf7.endpoint){var r=e.wpcf7,a=r.form;r.detail,u(a),t(a,"resetting")}return n(e)}));var f=function(e,t){var n=function(n){var r=t[n];e.querySelectorAll('input[name="'.concat(n,'"]')).forEach((function(e){e.value=""})),e.querySelectorAll("img.wpcf7-captcha-".concat(n)).forEach((function(e){e.setAttribute("src",r)}));var a=/([0-9]+)\.(png|gif|jpeg)$/.exec(r);a&&e.querySelectorAll('input[name="_wpcf7_captcha_challenge_'.concat(n,'"]')).forEach((function(e){e.value=a[1]}))};for(var r in t)n(r)},p=function(e,t){var n=function(n){var r=t[n][0],a=t[n][1];e.querySelectorAll(".wpcf7-form-control-wrap.".concat(n)).forEach((function(e){e.querySelector('input[name="'.concat(n,'"]')).value="",e.querySelector(".wpcf7-quiz-label").textContent=r,e.querySelector('input[name="_wpcf7_quiz_answer_'.concat(n,'"]')).value=a}))};for(var r in t)n(r)};function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(t){const n=new FormData(t);t.wpcf7={id:e(n.get("_wpcf7")),status:t.getAttribute("data-status"),pluginVersion:n.get("_wpcf7_version"),locale:n.get("_wpcf7_locale"),unitTag:n.get("_wpcf7_unit_tag"),containerPost:e(n.get("_wpcf7_container_post")),parent:t.closest(".wpcf7")},t.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'<span class="wpcf7-spinner"></span>')})),function(e){e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((function(t){t.addEventListener("change",(function(t){var n=t.target.getAttribute("name");e.querySelectorAll('input[type="checkbox"][name="'.concat(n,'"]')).forEach((function(e){e!==t.target&&(e.checked=!1)}))}))}))}(t),function(e){e.querySelectorAll(".has-free-text").forEach((function(t){var n=t.querySelector("input.wpcf7-free-text"),r=t.querySelector('input[type="checkbox"], input[type="radio"]');n.disabled=!r.checked,e.addEventListener("change",(function(e){n.disabled=!r.checked,e.target===r&&r.checked&&n.focus()}))}))}(t),function(e){e.querySelectorAll(".wpcf7-validates-as-url").forEach((function(e){e.addEventListener("change",(function(t){var n=e.value.trim();n&&!n.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==n.indexOf(".")&&(n="http://"+(n=n.replace(/^\/+/,""))),e.value=n}))}))}(t),function(e){if(e.querySelector(".wpcf7-acceptance")&&!e.classList.contains("wpcf7-acceptance-as-validation")){var t=function(){var t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((function(e){if(t&&!e.classList.contains("optional")){var n=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&n.checked||!e.classList.contains("invert")&&!n.checked)&&(t=!1)}})),e.querySelectorAll(".wpcf7-submit").forEach((function(e){e.disabled=!t}))};t(),e.addEventListener("change",(function(e){t()})),e.addEventListener("wpcf7reset",(function(e){t()}))}}(t),function(t){var n=function(t,n){var r=e(t.getAttribute("data-starting-value")),a=e(t.getAttribute("data-maximum-value")),c=e(t.getAttribute("data-minimum-value")),o=t.classList.contains("down")?r-n.value.length:n.value.length;t.setAttribute("data-current-value",o),t.innerText=o,a&&a<n.value.length?t.classList.add("too-long"):t.classList.remove("too-long"),c&&n.value.length<c?t.classList.add("too-short"):t.classList.remove("too-short")},a=function(e){e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({init:!1},e),t.querySelectorAll(".wpcf7-character-count").forEach((function(r){var a=r.getAttribute("data-target-name"),c=t.querySelector('[name="'.concat(a,'"]'));c&&(c.value=c.defaultValue,n(r,c),e.init&&c.addEventListener("keyup",(function(e){n(r,c)})))}))};a({init:!0}),t.addEventListener("wpcf7reset",(function(e){a()}))}(t),window.addEventListener("load",(e=>{wpcf7.cached&&t.reset()})),t.addEventListener("reset",(e=>{wpcf7.reset(t)})),t.addEventListener("submit",(e=>{const n=e.submitter;wpcf7.submit(t,{submitter:n}),e.preventDefault()})),t.addEventListener("wpcf7submit",(e=>{e.detail.apiResponse.captcha&&f(t,e.detail.apiResponse.captcha),e.detail.apiResponse.quiz&&p(t,e.detail.apiResponse.quiz)})),t.addEventListener("wpcf7reset",(e=>{e.detail.apiResponse.captcha&&f(t,e.detail.apiResponse.captcha),e.detail.apiResponse.quiz&&p(t,e.detail.apiResponse.quiz)}))}document.addEventListener("DOMContentLoaded",(e=>{var t;if("undefined"==typeof wpcf7)return void console.error("wpcf7 is not defined.");if(void 0===wpcf7.api)return void console.error("wpcf7.api is not defined.");if("function"!=typeof window.fetch)return void console.error("Your browser doesn't support window.fetch().");if("function"!=typeof window.FormData)return void console.error("Your browser doesn't support window.FormData().");const n=document.querySelectorAll(".wpcf7 > form");"function"==typeof n.forEach?(wpcf7={init:w,submit:s,reset:l,...null!==(t=wpcf7)&&void 0!==t?t:{}},n.forEach((e=>wpcf7.init(e)))):console.error("Your browser doesn't support NodeList.forEach().")}))}();
1
+ !function(){"use strict";const e=e=>Math.abs(parseInt(e,10)),t=(e,t)=>{const r=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["payment_required","payment-required"]]);r.has(t)&&(t=r.get(t)),Array.from(r.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const n=e.getAttribute("data-status");return e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),n&&n!==t&&e.classList.remove(n),t},r=(e,t,r)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:r});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=e=>{const{root:t,namespace:r="contact-form-7/v1"}=wpcf7.api;return a.reduceRight(((e,t)=>r=>t(r,e)),(e=>{let n,a,{url:c,path:s,endpoint:o,headers:i,body:l,data:p,...d}=e;"string"==typeof o&&(n=r.replace(/^\/|\/$/g,""),a=o.replace(/^\//,""),s=a?n+"/"+a:n),"string"==typeof s&&(-1!==t.indexOf("?")&&(s=s.replace("?","&")),s=s.replace(/^\//,""),c=t+s),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const u={code:"fetch_error",message:"You are probably offline."},f={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(c||s||window.location.href,{...d,headers:i,body:l}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw f}));throw f}))),(()=>{throw u}))}))(e)},a=[];function c(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(wpcf7.blocked)return s(e),void t(e,"submitting");const c=new FormData(e);a.submitter&&a.submitter.name&&c.append(a.submitter.name,a.submitter.value);const o={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(c,(e=>{const t=e[0],r=e[1];return!t.match(/^_/)&&{name:t,value:r}})).filter((e=>!1!==e)),formData:c},i=t=>{const r=document.createElement("li");r.setAttribute("id",t.error_id),t.idref?r.insertAdjacentHTML("beforeend",`<a href="#${t.idref}">${t.message}</a>`):r.insertAdjacentText("beforeend",t.message),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(r)},l=t=>{const r=e.querySelector(t.into),n=r.querySelector(".wpcf7-form-control");n.classList.add("wpcf7-not-valid"),n.setAttribute("aria-describedby",t.error_id);const a=document.createElement("span");a.setAttribute("class","wpcf7-not-valid-tip"),a.setAttribute("aria-hidden","true"),a.insertAdjacentText("beforeend",t.message),r.appendChild(a),r.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),n.closest(".use-floating-validation-tip")&&(n.addEventListener("focus",(e=>{a.setAttribute("style","display: none")})),a.addEventListener("mouseover",(e=>{a.setAttribute("style","display: none")})))};n({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((n=>{const a=t(e,n.status);return o.status=n.status,o.apiResponse=n,["invalid","unaccepted","spam","aborted"].includes(a)?r(e,a,o):["sent","failed"].includes(a)&&r(e,`mail${a}`,o),r(e,"submit",o),n})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&(t.invalid_fields.forEach(i),t.invalid_fields.forEach(l)),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}n.use=e=>{a.unshift(e)},n.use(((e,n)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:n,detail:a}=e.wpcf7;s(n),r(n,"beforesubmit",a),t(n,"submitting")}return n(e)}));const s=e=>{e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.wpcf7.parent.querySelector(".screen-reader-response ul").innerText="",e.querySelectorAll(".wpcf7-not-valid-tip").forEach((e=>{e.remove()})),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid")})),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function o(e){const a=new FormData(e),c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(a,(e=>{const t=e[0],r=e[1];return!t.match(/^_/)&&{name:t,value:r}})).filter((e=>!1!==e)),formData:a};n({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:c}}).then((n=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,t(e,"mail_sent")):t(e,"init"),c.apiResponse=n,r(e,"reset",c)})).catch((e=>console.error(e)))}n.use(((e,r)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:r,detail:n}=e.wpcf7;s(r),t(r,"resetting")}return r(e)}));const i=(e,t)=>{for(const r in t){const n=t[r];e.querySelectorAll(`input[name="${r}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${r}`).forEach((e=>{e.setAttribute("src",n)}));const a=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);a&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${r}"]`).forEach((e=>{e.value=a[1]}))}},l=(e,t)=>{for(const r in t){const n=t[r][0],a=t[r][1];e.querySelectorAll(`.wpcf7-form-control-wrap.${r}`).forEach((e=>{e.querySelector(`input[name="${r}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${r}"]`).value=a}))}};function p(t){const r=new FormData(t);t.wpcf7={id:e(r.get("_wpcf7")),status:t.getAttribute("data-status"),pluginVersion:r.get("_wpcf7_version"),locale:r.get("_wpcf7_locale"),unitTag:r.get("_wpcf7_unit_tag"),containerPost:e(r.get("_wpcf7_container_post")),parent:t.closest(".wpcf7")},t.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'<span class="wpcf7-spinner"></span>')})),(e=>{e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((t=>{t.addEventListener("change",(t=>{const r=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${r}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(t),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const r=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');r.disabled=!n.checked,e.addEventListener("change",(e=>{r.disabled=!n.checked,e.target===n&&n.checked&&r.focus()}))}))})(t),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let r=e.value.trim();r&&!r.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==r.indexOf(".")&&(r=r.replace(/^\/+/,""),r="http://"+r),e.value=r}))}))})(t),(e=>{if(!e.querySelector(".wpcf7-acceptance")||e.classList.contains("wpcf7-acceptance-as-validation"))return;const t=()=>{let t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((e=>{if(!t||e.classList.contains("optional"))return;const r=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&r.checked||!e.classList.contains("invert")&&!r.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(t),(t=>{const r=(t,r)=>{const n=e(t.getAttribute("data-starting-value")),a=e(t.getAttribute("data-maximum-value")),c=e(t.getAttribute("data-minimum-value")),s=t.classList.contains("down")?n-r.value.length:r.value.length;t.setAttribute("data-current-value",s),t.innerText=s,a&&a<r.value.length?t.classList.add("too-long"):t.classList.remove("too-long"),c&&r.value.length<c?t.classList.add("too-short"):t.classList.remove("too-short")},n=e=>{e={init:!1,...e},t.querySelectorAll(".wpcf7-character-count").forEach((n=>{const a=n.getAttribute("data-target-name"),c=t.querySelector(`[name="${a}"]`);c&&(c.value=c.defaultValue,r(n,c),e.init&&c.addEventListener("keyup",(e=>{r(n,c)})))}))};n({init:!0}),t.addEventListener("wpcf7reset",(e=>{n()}))})(t),window.addEventListener("load",(e=>{wpcf7.cached&&t.reset()})),t.addEventListener("reset",(e=>{wpcf7.reset(t)})),t.addEventListener("submit",(e=>{const r=e.submitter;wpcf7.submit(t,{submitter:r}),e.preventDefault()})),t.addEventListener("wpcf7submit",(e=>{e.detail.apiResponse.captcha&&i(t,e.detail.apiResponse.captcha),e.detail.apiResponse.quiz&&l(t,e.detail.apiResponse.quiz)})),t.addEventListener("wpcf7reset",(e=>{e.detail.apiResponse.captcha&&i(t,e.detail.apiResponse.captcha),e.detail.apiResponse.quiz&&l(t,e.detail.apiResponse.quiz)}))}document.addEventListener("DOMContentLoaded",(e=>{var t;if("undefined"==typeof wpcf7)return void console.error("wpcf7 is not defined.");if(void 0===wpcf7.api)return void console.error("wpcf7.api is not defined.");if("function"!=typeof window.fetch)return void console.error("Your browser doesn't support window.fetch().");if("function"!=typeof window.FormData)return void console.error("Your browser doesn't support window.FormData().");const r=document.querySelectorAll(".wpcf7 > form");"function"==typeof r.forEach?(wpcf7={init:p,submit:c,reset:o,...null!==(t=wpcf7)&&void 0!==t?t:{}},r.forEach((e=>wpcf7.init(e)))):console.error("Your browser doesn't support NodeList.forEach().")}))}();
includes/pipe.php CHANGED
@@ -1,5 +1,14 @@
1
  <?php
 
 
 
 
 
2
 
 
 
 
 
3
  class WPCF7_Pipe {
4
 
5
  public $before = '';
@@ -19,6 +28,10 @@ class WPCF7_Pipe {
19
  }
20
  }
21
 
 
 
 
 
22
  class WPCF7_Pipes {
23
 
24
  private $pipes = array();
@@ -40,18 +53,12 @@ class WPCF7_Pipes {
40
  ) );
41
 
42
  foreach ( $this->pipes as $pipe ) {
 
 
 
43
 
44
- list( $before, $after ) = array_map(
45
- function ( $item ) {
46
- return wpcf7_canonicalize( $item, array(
47
- 'strto' => 'as-is',
48
- ) );
49
- },
50
- array( $pipe->before, $pipe->after )
51
- );
52
-
53
- if ( $input_canonical === $before ) {
54
- return $after;
55
  }
56
  }
57
 
1
  <?php
2
+ /**
3
+ * Pipe-related classes.
4
+ *
5
+ * @link https://contactform7.com/selectable-recipient-with-pipes/
6
+ */
7
 
8
+
9
+ /**
10
+ * Class representing a pair of pipe.
11
+ */
12
  class WPCF7_Pipe {
13
 
14
  public $before = '';
28
  }
29
  }
30
 
31
+
32
+ /**
33
+ * Class representing a list of pipes.
34
+ */
35
  class WPCF7_Pipes {
36
 
37
  private $pipes = array();
53
  ) );
54
 
55
  foreach ( $this->pipes as $pipe ) {
56
+ $before_canonical = wpcf7_canonicalize( $pipe->before, array(
57
+ 'strto' => 'as-is',
58
+ ) );
59
 
60
+ if ( $input_canonical === $before_canonical ) {
61
+ return $pipe->after;
 
 
 
 
 
 
 
 
 
62
  }
63
  }
64
 
license.txt CHANGED
@@ -1,365 +1,365 @@
1
- Contact Form 7 WordPress Plugin, 2007-2021 Takayuki Miyoshi
2
- Contact Form 7 is distributed under the terms of the GNU GPL
3
-
4
- This program is free software; you can redistribute it and/or modify
5
- it under the terms of the GNU General Public License as published by
6
- the Free Software Foundation; either version 2 of the License, or
7
- (at your option) any later version.
8
-
9
- This program is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License
15
- along with this program; if not, write to the Free Software
16
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
-
18
-
19
- Contact Form 7 WordPress Plugin bundles the following third-party resources:
20
-
21
- The official icon designed by Cheung Vong
22
- https://contactform7.com/2020/04/08/new-official-logo/
23
-
24
-
25
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
26
-
27
- GNU GENERAL PUBLIC LICENSE
28
- Version 2, June 1991
29
-
30
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
31
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32
- Everyone is permitted to copy and distribute verbatim copies
33
- of this license document, but changing it is not allowed.
34
-
35
- Preamble
36
-
37
- The licenses for most software are designed to take away your
38
- freedom to share and change it. By contrast, the GNU General Public
39
- License is intended to guarantee your freedom to share and change free
40
- software--to make sure the software is free for all its users. This
41
- General Public License applies to most of the Free Software
42
- Foundation's software and to any other program whose authors commit to
43
- using it. (Some other Free Software Foundation software is covered by
44
- the GNU Lesser General Public License instead.) You can apply it to
45
- your programs, too.
46
-
47
- When we speak of free software, we are referring to freedom, not
48
- price. Our General Public Licenses are designed to make sure that you
49
- have the freedom to distribute copies of free software (and charge for
50
- this service if you wish), that you receive source code or can get it
51
- if you want it, that you can change the software or use pieces of it
52
- in new free programs; and that you know you can do these things.
53
-
54
- To protect your rights, we need to make restrictions that forbid
55
- anyone to deny you these rights or to ask you to surrender the rights.
56
- These restrictions translate to certain responsibilities for you if you
57
- distribute copies of the software, or if you modify it.
58
-
59
- For example, if you distribute copies of such a program, whether
60
- gratis or for a fee, you must give the recipients all the rights that
61
- you have. You must make sure that they, too, receive or can get the
62
- source code. And you must show them these terms so they know their
63
- rights.
64
-
65
- We protect your rights with two steps: (1) copyright the software, and
66
- (2) offer you this license which gives you legal permission to copy,
67
- distribute and/or modify the software.
68
-
69
- Also, for each author's protection and ours, we want to make certain
70
- that everyone understands that there is no warranty for this free
71
- software. If the software is modified by someone else and passed on, we
72
- want its recipients to know that what they have is not the original, so
73
- that any problems introduced by others will not reflect on the original
74
- authors' reputations.
75
-
76
- Finally, any free program is threatened constantly by software
77
- patents. We wish to avoid the danger that redistributors of a free
78
- program will individually obtain patent licenses, in effect making the
79
- program proprietary. To prevent this, we have made it clear that any
80
- patent must be licensed for everyone's free use or not licensed at all.
81
-
82
- The precise terms and conditions for copying, distribution and
83
- modification follow.
84
-
85
- GNU GENERAL PUBLIC LICENSE
86
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
87
-
88
- 0. This License applies to any program or other work which contains
89
- a notice placed by the copyright holder saying it may be distributed
90
- under the terms of this General Public License. The "Program", below,
91
- refers to any such program or work, and a "work based on the Program"
92
- means either the Program or any derivative work under copyright law:
93
- that is to say, a work containing the Program or a portion of it,
94
- either verbatim or with modifications and/or translated into another
95
- language. (Hereinafter, translation is included without limitation in
96
- the term "modification".) Each licensee is addressed as "you".
97
-
98
- Activities other than copying, distribution and modification are not
99
- covered by this License; they are outside its scope. The act of
100
- running the Program is not restricted, and the output from the Program
101
- is covered only if its contents constitute a work based on the
102
- Program (independent of having been made by running the Program).
103
- Whether that is true depends on what the Program does.
104
-
105
- 1. You may copy and distribute verbatim copies of the Program's
106
- source code as you receive it, in any medium, provided that you
107
- conspicuously and appropriately publish on each copy an appropriate
108
- copyright notice and disclaimer of warranty; keep intact all the
109
- notices that refer to this License and to the absence of any warranty;
110
- and give any other recipients of the Program a copy of this License
111
- along with the Program.
112
-
113
- You may charge a fee for the physical act of transferring a copy, and
114
- you may at your option offer warranty protection in exchange for a fee.
115
-
116
- 2. You may modify your copy or copies of the Program or any portion
117
- of it, thus forming a work based on the Program, and copy and
118
- distribute such modifications or work under the terms of Section 1
119
- above, provided that you also meet all of these conditions:
120
-
121
- a) You must cause the modified files to carry prominent notices
122
- stating that you changed the files and the date of any change.
123
-
124
- b) You must cause any work that you distribute or publish, that in
125
- whole or in part contains or is derived from the Program or any
126
- part thereof, to be licensed as a whole at no charge to all third
127
- parties under the terms of this License.
128
-
129
- c) If the modified program normally reads commands interactively
130
- when run, you must cause it, when started running for such
131
- interactive use in the most ordinary way, to print or display an
132
- announcement including an appropriate copyright notice and a
133
- notice that there is no warranty (or else, saying that you provide
134
- a warranty) and that users may redistribute the program under
135
- these conditions, and telling the user how to view a copy of this
136
- License. (Exception: if the Program itself is interactive but
137
- does not normally print such an announcement, your work based on
138
- the Program is not required to print an announcement.)
139
-
140
- These requirements apply to the modified work as a whole. If
141
- identifiable sections of that work are not derived from the Program,
142
- and can be reasonably considered independent and separate works in
143
- themselves, then this License, and its terms, do not apply to those
144
- sections when you distribute them as separate works. But when you
145
- distribute the same sections as part of a whole which is a work based
146
- on the Program, the distribution of the whole must be on the terms of
147
- this License, whose permissions for other licensees extend to the
148
- entire whole, and thus to each and every part regardless of who wrote it.
149
-
150
- Thus, it is not the intent of this section to claim rights or contest
151
- your rights to work written entirely by you; rather, the intent is to
152
- exercise the right to control the distribution of derivative or
153
- collective works based on the Program.
154
-
155
- In addition, mere aggregation of another work not based on the Program
156
- with the Program (or with a work based on the Program) on a volume of
157
- a storage or distribution medium does not bring the other work under
158
- the scope of this License.
159
-
160
- 3. You may copy and distribute the Program (or a work based on it,
161
- under Section 2) in object code or executable form under the terms of
162
- Sections 1 and 2 above provided that you also do one of the following:
163
-
164
- a) Accompany it with the complete corresponding machine-readable
165
- source code, which must be distributed under the terms of Sections
166
- 1 and 2 above on a medium customarily used for software interchange; or,
167
-
168
- b) Accompany it with a written offer, valid for at least three
169
- years, to give any third party, for a charge no more than your
170
- cost of physically performing source distribution, a complete
171
- machine-readable copy of the corresponding source code, to be
172
- distributed under the terms of Sections 1 and 2 above on a medium
173
- customarily used for software interchange; or,
174
-
175
- c) Accompany it with the information you received as to the offer
176
- to distribute corresponding source code. (This alternative is
177
- allowed only for noncommercial distribution and only if you
178
- received the program in object code or executable form with such
179
- an offer, in accord with Subsection b above.)
180
-
181
- The source code for a work means the preferred form of the work for
182
- making modifications to it. For an executable work, complete source
183
- code means all the source code for all modules it contains, plus any
184
- associated interface definition files, plus the scripts used to
185
- control compilation and installation of the executable. However, as a
186
- special exception, the source code distributed need not include
187
- anything that is normally distributed (in either source or binary
188
- form) with the major components (compiler, kernel, and so on) of the
189
- operating system on which the executable runs, unless that component
190
- itself accompanies the executable.
191
-
192
- If distribution of executable or object code is made by offering
193
- access to copy from a designated place, then offering equivalent
194
- access to copy the source code from the same place counts as
195
- distribution of the source code, even though third parties are not
196
- compelled to copy the source along with the object code.
197
-
198
- 4. You may not copy, modify, sublicense, or distribute the Program
199
- except as expressly provided under this License. Any attempt
200
- otherwise to copy, modify, sublicense or distribute the Program is
201
- void, and will automatically terminate your rights under this License.
202
- However, parties who have received copies, or rights, from you under
203
- this License will not have their licenses terminated so long as such
204
- parties remain in full compliance.
205
-
206
- 5. You are not required to accept this License, since you have not
207
- signed it. However, nothing else grants you permission to modify or
208
- distribute the Program or its derivative works. These actions are
209
- prohibited by law if you do not accept this License. Therefore, by
210
- modifying or distributing the Program (or any work based on the
211
- Program), you indicate your acceptance of this License to do so, and
212
- all its terms and conditions for copying, distributing or modifying
213
- the Program or works based on it.
214
-
215
- 6. Each time you redistribute the Program (or any work based on the
216
- Program), the recipient automatically receives a license from the
217
- original licensor to copy, distribute or modify the Program subject to
218
- these terms and conditions. You may not impose any further
219
- restrictions on the recipients' exercise of the rights granted herein.
220
- You are not responsible for enforcing compliance by third parties to
221
- this License.
222
-
223
- 7. If, as a consequence of a court judgment or allegation of patent
224
- infringement or for any other reason (not limited to patent issues),
225
- conditions are imposed on you (whether by court order, agreement or
226
- otherwise) that contradict the conditions of this License, they do not
227
- excuse you from the conditions of this License. If you cannot
228
- distribute so as to satisfy simultaneously your obligations under this
229
- License and any other pertinent obligations, then as a consequence you
230
- may not distribute the Program at all. For example, if a patent
231
- license would not permit royalty-free redistribution of the Program by
232
- all those who receive copies directly or indirectly through you, then
233
- the only way you could satisfy both it and this License would be to
234
- refrain entirely from distribution of the Program.
235
-
236
- If any portion of this section is held invalid or unenforceable under
237
- any particular circumstance, the balance of the section is intended to
238
- apply and the section as a whole is intended to apply in other
239
- circumstances.
240
-
241
- It is not the purpose of this section to induce you to infringe any
242
- patents or other property right claims or to contest validity of any
243
- such claims; this section has the sole purpose of protecting the
244
- integrity of the free software distribution system, which is
245
- implemented by public license practices. Many people have made
246
- generous contributions to the wide range of software distributed
247
- through that system in reliance on consistent application of that
248
- system; it is up to the author/donor to decide if he or she is willing
249
- to distribute software through any other system and a licensee cannot
250
- impose that choice.
251
-
252
- This section is intended to make thoroughly clear what is believed to
253
- be a consequence of the rest of this License.
254
-
255
- 8. If the distribution and/or use of the Program is restricted in
256
- certain countries either by patents or by copyrighted interfaces, the
257
- original copyright holder who places the Program under this License
258
- may add an explicit geographical distribution limitation excluding
259
- those countries, so that distribution is permitted only in or among
260
- countries not thus excluded. In such case, this License incorporates
261
- the limitation as if written in the body of this License.
262
-
263
- 9. The Free Software Foundation may publish revised and/or new versions
264
- of the General Public License from time to time. Such new versions will
265
- be similar in spirit to the present version, but may differ in detail to
266
- address new problems or concerns.
267
-
268
- Each version is given a distinguishing version number. If the Program
269
- specifies a version number of this License which applies to it and "any
270
- later version", you have the option of following the terms and conditions
271
- either of that version or of any later version published by the Free
272
- Software Foundation. If the Program does not specify a version number of
273
- this License, you may choose any version ever published by the Free Software
274
- Foundation.
275
-
276
- 10. If you wish to incorporate parts of the Program into other free
277
- programs whose distribution conditions are different, write to the author
278
- to ask for permission. For software which is copyrighted by the Free
279
- Software Foundation, write to the Free Software Foundation; we sometimes
280
- make exceptions for this. Our decision will be guided by the two goals
281
- of preserving the free status of all derivatives of our free software and
282
- of promoting the sharing and reuse of software generally.
283
-
284
- NO WARRANTY
285
-
286
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
287
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
288
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
289
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
290
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
291
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
292
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
293
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
294
- REPAIR OR CORRECTION.
295
-
296
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
297
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
298
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
299
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
300
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
301
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
302
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
303
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
304
- POSSIBILITY OF SUCH DAMAGES.
305
-
306
- END OF TERMS AND CONDITIONS
307
-
308
- How to Apply These Terms to Your New Programs
309
-
310
- If you develop a new program, and you want it to be of the greatest
311
- possible use to the public, the best way to achieve this is to make it
312
- free software which everyone can redistribute and change under these terms.
313
-
314
- To do so, attach the following notices to the program. It is safest
315
- to attach them to the start of each source file to most effectively
316
- convey the exclusion of warranty; and each file should have at least
317
- the "copyright" line and a pointer to where the full notice is found.
318
-
319
- <one line to give the program's name and a brief idea of what it does.>
320
- Copyright (C) <year> <name of author>
321
-
322
- This program is free software; you can redistribute it and/or modify
323
- it under the terms of the GNU General Public License as published by
324
- the Free Software Foundation; either version 2 of the License, or
325
- (at your option) any later version.
326
-
327
- This program is distributed in the hope that it will be useful,
328
- but WITHOUT ANY WARRANTY; without even the implied warranty of
329
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
330
- GNU General Public License for more details.
331
-
332
- You should have received a copy of the GNU General Public License along
333
- with this program; if not, write to the Free Software Foundation, Inc.,
334
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
335
-
336
- Also add information on how to contact you by electronic and paper mail.
337
-
338
- If the program is interactive, make it output a short notice like this
339
- when it starts in an interactive mode:
340
-
341
- Gnomovision version 69, Copyright (C) year name of author
342
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
343
- This is free software, and you are welcome to redistribute it
344
- under certain conditions; type `show c' for details.
345
-
346
- The hypothetical commands `show w' and `show c' should show the appropriate
347
- parts of the General Public License. Of course, the commands you use may
348
- be called something other than `show w' and `show c'; they could even be
349
- mouse-clicks or menu items--whatever suits your program.
350
-
351
- You should also get your employer (if you work as a programmer) or your
352
- school, if any, to sign a "copyright disclaimer" for the program, if
353
- necessary. Here is a sample; alter the names:
354
-
355
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
356
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
357
-
358
- <signature of Ty Coon>, 1 April 1989
359
- Ty Coon, President of Vice
360
-
361
- This General Public License does not permit incorporating your program into
362
- proprietary programs. If your program is a subroutine library, you may
363
- consider it more useful to permit linking proprietary applications with the
364
- library. If this is what you want to do, use the GNU Lesser General
365
- Public License instead of this License.
1
+ Contact Form 7 WordPress Plugin, 2007-2022 Takayuki Miyoshi
2
+ Contact Form 7 is distributed under the terms of the GNU GPL
3
+
4
+ This program is free software; you can redistribute it and/or modify
5
+ it under the terms of the GNU General Public License as published by
6
+ the Free Software Foundation; either version 2 of the License, or
7
+ (at your option) any later version.
8
+
9
+ This program is distributed in the hope that it will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ GNU General Public License for more details.
13
+
14
+ You should have received a copy of the GNU General Public License
15
+ along with this program; if not, write to the Free Software
16
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
+
18
+
19
+ Contact Form 7 WordPress Plugin bundles the following third-party resources:
20
+
21
+ The official icon designed by Cheung Vong
22
+ https://contactform7.com/2020/04/08/new-official-logo/
23
+
24
+
25
+ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
26
+
27
+ GNU GENERAL PUBLIC LICENSE
28
+ Version 2, June 1991
29
+
30
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
31
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32
+ Everyone is permitted to copy and distribute verbatim copies
33
+ of this license document, but changing it is not allowed.
34
+
35
+ Preamble
36
+
37
+ The licenses for most software are designed to take away your
38
+ freedom to share and change it. By contrast, the GNU General Public
39
+ License is intended to guarantee your freedom to share and change free
40
+ software--to make sure the software is free for all its users. This
41
+ General Public License applies to most of the Free Software
42
+ Foundation's software and to any other program whose authors commit to
43
+ using it. (Some other Free Software Foundation software is covered by
44
+ the GNU Lesser General Public License instead.) You can apply it to
45
+ your programs, too.
46
+
47
+ When we speak of free software, we are referring to freedom, not
48
+ price. Our General Public Licenses are designed to make sure that you
49
+ have the freedom to distribute copies of free software (and charge for
50
+ this service if you wish), that you receive source code or can get it
51
+ if you want it, that you can change the software or use pieces of it
52
+ in new free programs; and that you know you can do these things.
53
+
54
+ To protect your rights, we need to make restrictions that forbid
55
+ anyone to deny you these rights or to ask you to surrender the rights.
56
+ These restrictions translate to certain responsibilities for you if you
57
+ distribute copies of the software, or if you modify it.
58
+
59
+ For example, if you distribute copies of such a program, whether
60
+ gratis or for a fee, you must give the recipients all the rights that
61
+ you have. You must make sure that they, too, receive or can get the
62
+ source code. And you must show them these terms so they know their
63
+ rights.
64
+
65
+ We protect your rights with two steps: (1) copyright the software, and
66
+ (2) offer you this license which gives you legal permission to copy,
67
+ distribute and/or modify the software.
68
+
69
+ Also, for each author's protection and ours, we want to make certain
70
+ that everyone understands that there is no warranty for this free
71
+ software. If the software is modified by someone else and passed on, we
72
+ want its recipients to know that what they have is not the original, so
73
+ that any problems introduced by others will not reflect on the original
74
+ authors' reputations.
75
+
76
+ Finally, any free program is threatened constantly by software
77
+ patents. We wish to avoid the danger that redistributors of a free
78
+ program will individually obtain patent licenses, in effect making the
79
+ program proprietary. To prevent this, we have made it clear that any
80
+ patent must be licensed for everyone's free use or not licensed at all.
81
+
82
+ The precise terms and conditions for copying, distribution and
83
+ modification follow.
84
+
85
+ GNU GENERAL PUBLIC LICENSE
86
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
87
+
88
+ 0. This License applies to any program or other work which contains
89
+ a notice placed by the copyright holder saying it may be distributed
90
+ under the terms of this General Public License. The "Program", below,
91
+ refers to any such program or work, and a "work based on the Program"
92
+ means either the Program or any derivative work under copyright law:
93
+ that is to say, a work containing the Program or a portion of it,
94
+ either verbatim or with modifications and/or translated into another
95
+ language. (Hereinafter, translation is included without limitation in
96
+ the term "modification".) Each licensee is addressed as "you".
97
+
98
+ Activities other than copying, distribution and modification are not
99
+ covered by this License; they are outside its scope. The act of
100
+ running the Program is not restricted, and the output from the Program
101
+ is covered only if its contents constitute a work based on the
102
+ Program (independent of having been made by running the Program).
103
+ Whether that is true depends on what the Program does.
104
+
105
+ 1. You may copy and distribute verbatim copies of the Program's
106
+ source code as you receive it, in any medium, provided that you
107
+ conspicuously and appropriately publish on each copy an appropriate
108
+ copyright notice and disclaimer of warranty; keep intact all the
109
+ notices that refer to this License and to the absence of any warranty;
110
+ and give any other recipients of the Program a copy of this License
111
+ along with the Program.
112
+
113
+ You may charge a fee for the physical act of transferring a copy, and
114
+ you may at your option offer warranty protection in exchange for a fee.
115
+
116
+ 2. You may modify your copy or copies of the Program or any portion
117
+ of it, thus forming a work based on the Program, and copy and
118
+ distribute such modifications or work under the terms of Section 1
119
+ above, provided that you also meet all of these conditions:
120
+
121
+ a) You must cause the modified files to carry prominent notices
122
+ stating that you changed the files and the date of any change.
123
+
124
+ b) You must cause any work that you distribute or publish, that in
125
+ whole or in part contains or is derived from the Program or any
126
+ part thereof, to be licensed as a whole at no charge to all third
127
+ parties under the terms of this License.
128
+
129
+ c) If the modified program normally reads commands interactively
130
+ when run, you must cause it, when started running for such
131
+ interactive use in the most ordinary way, to print or display an
132
+ announcement including an appropriate copyright notice and a
133
+ notice that there is no warranty (or else, saying that you provide
134
+ a warranty) and that users may redistribute the program under
135
+ these conditions, and telling the user how to view a copy of this
136
+ License. (Exception: if the Program itself is interactive but
137
+ does not normally print such an announcement, your work based on
138
+ the Program is not required to print an announcement.)
139
+
140
+ These requirements apply to the modified work as a whole. If
141
+ identifiable sections of that work are not derived from the Program,
142
+ and can be reasonably considered independent and separate works in
143
+ themselves, then this License, and its terms, do not apply to those
144
+ sections when you distribute them as separate works. But when you
145
+ distribute the same sections as part of a whole which is a work based
146
+ on the Program, the distribution of the whole must be on the terms of
147
+ this License, whose permissions for other licensees extend to the
148
+ entire whole, and thus to each and every part regardless of who wrote it.
149
+
150
+ Thus, it is not the intent of this section to claim rights or contest
151
+ your rights to work written entirely by you; rather, the intent is to
152
+ exercise the right to control the distribution of derivative or
153
+ collective works based on the Program.
154
+
155
+ In addition, mere aggregation of another work not based on the Program
156
+ with the Program (or with a work based on the Program) on a volume of
157
+ a storage or distribution medium does not bring the other work under
158
+ the scope of this License.
159
+
160
+ 3. You may copy and distribute the Program (or a work based on it,
161
+ under Section 2) in object code or executable form under the terms of
162
+ Sections 1 and 2 above provided that you also do one of the following:
163
+
164
+ a) Accompany it with the complete corresponding machine-readable
165
+ source code, which must be distributed under the terms of Sections
166
+ 1 and 2 above on a medium customarily used for software interchange; or,
167
+
168
+ b) Accompany it with a written offer, valid for at least three
169
+ years, to give any third party, for a charge no more than your
170
+ cost of physically performing source distribution, a complete
171
+ machine-readable copy of the corresponding source code, to be
172
+ distributed under the terms of Sections 1 and 2 above on a medium
173
+ customarily used for software interchange; or,
174
+
175
+ c) Accompany it with the information you received as to the offer
176
+ to distribute corresponding source code. (This alternative is
177
+ allowed only for noncommercial distribution and only if you
178
+ received the program in object code or executable form with such
179
+ an offer, in accord with Subsection b above.)
180
+
181
+ The source code for a work means the preferred form of the work for
182
+ making modifications to it. For an executable work, complete source
183
+ code means all the source code for all modules it contains, plus any
184
+ associated interface definition files, plus the scripts used to
185
+ control compilation and installation of the executable. However, as a
186
+ special exception, the source code distributed need not include
187
+ anything that is normally distributed (in either source or binary
188
+ form) with the major components (compiler, kernel, and so on) of the
189
+ operating system on which the executable runs, unless that component
190
+ itself accompanies the executable.
191
+
192
+ If distribution of executable or object code is made by offering
193
+ access to copy from a designated place, then offering equivalent
194
+ access to copy the source code from the same place counts as
195
+ distribution of the source code, even though third parties are not
196
+ compelled to copy the source along with the object code.
197
+
198
+ 4. You may not copy, modify, sublicense, or distribute the Program
199
+ except as expressly provided under this License. Any attempt
200
+ otherwise to copy, modify, sublicense or distribute the Program is
201
+ void, and will automatically terminate your rights under this License.
202
+ However, parties who have received copies, or rights, from you under
203
+ this License will not have their licenses terminated so long as such
204
+ parties remain in full compliance.
205
+
206
+ 5. You are not required to accept this License, since you have not
207
+ signed it. However, nothing else grants you permission to modify or
208
+ distribute the Program or its derivative works. These actions are
209
+ prohibited by law if you do not accept this License. Therefore, by
210
+ modifying or distributing the Program (or any work based on the
211
+ Program), you indicate your acceptance of this License to do so, and
212
+ all its terms and conditions for copying, distributing or modifying
213
+ the Program or works based on it.
214
+
215
+ 6. Each time you redistribute the Program (or any work based on the
216
+ Program), the recipient automatically receives a license from the
217
+ original licensor to copy, distribute or modify the Program subject to
218
+ these terms and conditions. You may not impose any further
219
+ restrictions on the recipients' exercise of the rights granted herein.
220
+ You are not responsible for enforcing compliance by third parties to
221
+ this License.
222
+
223
+ 7. If, as a consequence of a court judgment or allegation of patent
224
+ infringement or for any other reason (not limited to patent issues),
225
+ conditions are imposed on you (whether by court order, agreement or
226
+ otherwise) that contradict the conditions of this License, they do not
227
+ excuse you from the conditions of this License. If you cannot
228
+ distribute so as to satisfy simultaneously your obligations under this
229
+ License and any other pertinent obligations, then as a consequence you
230
+ may not distribute the Program at all. For example, if a patent
231
+ license would not permit royalty-free redistribution of the Program by
232
+ all those who receive copies directly or indirectly through you, then
233
+ the only way you could satisfy both it and this License would be to
234
+ refrain entirely from distribution of the Program.
235
+
236
+ If any portion of this section is held invalid or unenforceable under
237
+ any particular circumstance, the balance of the section is intended to
238
+ apply and the section as a whole is intended to apply in other
239
+ circumstances.
240
+
241
+ It is not the purpose of this section to induce you to infringe any
242
+ patents or other property right claims or to contest validity of any
243
+ such claims; this section has the sole purpose of protecting the
244
+ integrity of the free software distribution system, which is
245
+ implemented by public license practices. Many people have made
246
+ generous contributions to the wide range of software distributed
247
+ through that system in reliance on consistent application of that
248
+ system; it is up to the author/donor to decide if he or she is willing
249
+ to distribute software through any other system and a licensee cannot
250
+ impose that choice.
251
+
252
+ This section is intended to make thoroughly clear what is believed to
253
+ be a consequence of the rest of this License.
254
+
255
+ 8. If the distribution and/or use of the Program is restricted in
256
+ certain countries either by patents or by copyrighted interfaces, the
257
+ original copyright holder who places the Program under this License
258
+ may add an explicit geographical distribution limitation excluding
259
+ those countries, so that distribution is permitted only in or among
260
+ countries not thus excluded. In such case, this License incorporates
261
+ the limitation as if written in the body of this License.
262
+
263
+ 9. The Free Software Foundation may publish revised and/or new versions
264
+ of the General Public License from time to time. Such new versions will
265
+ be similar in spirit to the present version, but may differ in detail to
266
+ address new problems or concerns.
267
+
268
+ Each version is given a distinguishing version number. If the Program
269
+ specifies a version number of this License which applies to it and "any
270
+ later version", you have the option of following the terms and conditions
271
+ either of that version or of any later version published by the Free
272
+ Software Foundation. If the Program does not specify a version number of
273
+ this License, you may choose any version ever published by the Free Software
274
+ Foundation.
275
+
276
+ 10. If you wish to incorporate parts of the Program into other free
277
+ programs whose distribution conditions are different, write to the author
278
+ to ask for permission. For software which is copyrighted by the Free
279
+ Software Foundation, write to the Free Software Foundation; we sometimes
280
+ make exceptions for this. Our decision will be guided by the two goals
281
+ of preserving the free status of all derivatives of our free software and
282
+ of promoting the sharing and reuse of software generally.
283
+
284
+ NO WARRANTY
285
+
286
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
287
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
288
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
289
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
290
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
291
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
292
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
293
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
294
+ REPAIR OR CORRECTION.
295
+
296
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
297
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
298
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
299
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
300
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
301
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
302
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
303
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
304
+ POSSIBILITY OF SUCH DAMAGES.
305
+
306
+ END OF TERMS AND CONDITIONS
307
+
308
+ How to Apply These Terms to Your New Programs
309
+
310
+ If you develop a new program, and you want it to be of the greatest
311
+ possible use to the public, the best way to achieve this is to make it
312
+ free software which everyone can redistribute and change under these terms.
313
+
314
+ To do so, attach the following notices to the program. It is safest
315
+ to attach them to the start of each source file to most effectively
316
+ convey the exclusion of warranty; and each file should have at least
317
+ the "copyright" line and a pointer to where the full notice is found.
318
+
319
+ <one line to give the program's name and a brief idea of what it does.>
320
+ Copyright (C) <year> <name of author>
321
+
322
+ This program is free software; you can redistribute it and/or modify
323
+ it under the terms of the GNU General Public License as published by
324
+ the Free Software Foundation; either version 2 of the License, or
325
+ (at your option) any later version.
326
+
327
+ This program is distributed in the hope that it will be useful,
328
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
329
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
330
+ GNU General Public License for more details.
331
+
332
+ You should have received a copy of the GNU General Public License along
333
+ with this program; if not, write to the Free Software Foundation, Inc.,
334
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
335
+
336
+ Also add information on how to contact you by electronic and paper mail.
337
+
338
+ If the program is interactive, make it output a short notice like this
339
+ when it starts in an interactive mode:
340
+
341
+ Gnomovision version 69, Copyright (C) year name of author
342
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
343
+ This is free software, and you are welcome to redistribute it
344
+ under certain conditions; type `show c' for details.
345
+
346
+ The hypothetical commands `show w' and `show c' should show the appropriate
347
+ parts of the General Public License. Of course, the commands you use may
348
+ be called something other than `show w' and `show c'; they could even be
349
+ mouse-clicks or menu items--whatever suits your program.
350
+
351
+ You should also get your employer (if you work as a programmer) or your
352
+ school, if any, to sign a "copyright disclaimer" for the program, if
353
+ necessary. Here is a sample; alter the names:
354
+
355
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
356
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
357
+
358
+ <signature of Ty Coon>, 1 April 1989
359
+ Ty Coon, President of Vice
360
+
361
+ This General Public License does not permit incorporating your program into
362
+ proprietary programs. If your program is a subroutine library, you may
363
+ consider it more useful to permit linking proprietary applications with the
364
+ library. If this is what you want to do, use the GNU Lesser General
365
+ Public License instead of this License.
load.php CHANGED
@@ -43,6 +43,7 @@ class WPCF7 {
43
  self::load_module( 'count' );
44
  self::load_module( 'date' );
45
  self::load_module( 'disallowed-list' );
 
46
  self::load_module( 'file' );
47
  self::load_module( 'flamingo' );
48
  self::load_module( 'hidden' );
43
  self::load_module( 'count' );
44
  self::load_module( 'date' );
45
  self::load_module( 'disallowed-list' );
46
+ self::load_module( 'doi-helper' );
47
  self::load_module( 'file' );
48
  self::load_module( 'flamingo' );
49
  self::load_module( 'hidden' );
modules/constant-contact/constant-contact.php CHANGED
@@ -3,6 +3,7 @@
3
  wpcf7_include_module_file( 'constant-contact/service.php' );
4
  wpcf7_include_module_file( 'constant-contact/contact-post-request.php' );
5
  wpcf7_include_module_file( 'constant-contact/contact-form-properties.php' );
 
6
 
7
 
8
  add_action(
@@ -96,9 +97,27 @@ function wpcf7_constant_contact_submit( $contact_form, $result ) {
96
  return;
97
  }
98
 
99
- if ( $email = $request_builder->get_email_address()
100
- and $service->email_exists( $email ) ) {
101
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  }
103
 
104
  $service->create_contact( $request_builder->to_array() );
3
  wpcf7_include_module_file( 'constant-contact/service.php' );
4
  wpcf7_include_module_file( 'constant-contact/contact-post-request.php' );
5
  wpcf7_include_module_file( 'constant-contact/contact-form-properties.php' );
6
+ wpcf7_include_module_file( 'constant-contact/doi.php' );
7
 
8
 
9
  add_action(
97
  return;
98
  }
99
 
100
+ $email = $request_builder->get_email_address();
101
+
102
+ if ( $email ) {
103
+ if ( $service->email_exists( $email ) ) {
104
+ return;
105
+ }
106
+
107
+ $token = null;
108
+
109
+ do_action_ref_array( 'wpcf7_doi', array(
110
+ 'wpcf7_constant_contact',
111
+ array(
112
+ 'email_to' => $email,
113
+ 'properties' => $request_builder->to_array(),
114
+ ),
115
+ &$token,
116
+ ) );
117
+
118
+ if ( isset( $token ) ) {
119
+ return;
120
+ }
121
  }
122
 
123
  $service->create_contact( $request_builder->to_array() );
modules/constant-contact/doi.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Double Opt-In Helper-related functions
4
+ *
5
+ * @link https://contactform7.com/doi-helper/
6
+ */
7
+
8
+
9
+ add_action(
10
+ 'doihelper_init',
11
+ 'wpcf7_constant_contact_doi_register_agent',
12
+ 10, 0
13
+ );
14
+
15
+ /**
16
+ * Registers wpcf7_constant_contact as an agent.
17
+ */
18
+ function wpcf7_constant_contact_doi_register_agent() {
19
+ if ( ! function_exists( 'doihelper_register_agent' ) ) {
20
+ return;
21
+ }
22
+
23
+ doihelper_register_agent( 'wpcf7_constant_contact', array(
24
+ 'optin_callback' => apply_filters(
25
+ 'wpcf7_constant_contact_doi_optin_callback',
26
+ 'wpcf7_constant_contact_doi_default_optin_callback'
27
+ ),
28
+ 'email_callback' => apply_filters(
29
+ 'wpcf7_constant_contact_doi_email_callback',
30
+ 'wpcf7_constant_contact_doi_default_email_callback'
31
+ ),
32
+ ) );
33
+ }
34
+
35
+
36
+ /**
37
+ * Default optin_callback function.
38
+ */
39
+ function wpcf7_constant_contact_doi_default_optin_callback( $properties ) {
40
+ $service = WPCF7_ConstantContact::get_instance();
41
+
42
+ if ( $service->is_active() ) {
43
+ $service->create_contact( $properties );
44
+ }
45
+ }
46
+
47
+
48
+ /**
49
+ * Default email_callback function.
50
+ */
51
+ function wpcf7_constant_contact_doi_default_email_callback( $args ) {
52
+ if ( ! isset( $args['token'] ) or ! isset( $args['email_to'] ) ) {
53
+ return;
54
+ }
55
+
56
+ $site_title = wp_specialchars_decode(
57
+ get_bloginfo( 'name' ),
58
+ ENT_QUOTES
59
+ );
60
+
61
+ $link = add_query_arg(
62
+ array( 'doitoken' => $args['token'] ),
63
+ home_url()
64
+ );
65
+
66
+ $to = $args['email_to'];
67
+
68
+ $subject = sprintf(
69
+ /* translators: %s: blog name */
70
+ __( 'Opt-in confirmation from %s', 'contact-form-7' ),
71
+ $site_title
72
+ );
73
+
74
+ $message = sprintf(
75
+ /* translators: 1: blog name, 2: confirmation link */
76
+ __( 'Hello,
77
+
78
+ This is a confirmation email sent from %1$s.
79
+
80
+ We have received your submission to our web form, according to which you have allowed us to add you to our contact list. But, the process has not yet been completed. To complete it, please click the following link.
81
+
82
+ %2$s
83
+
84
+ If it was not your intention, or if you have no idea why you received this message, please do not click on the link, and ignore this message. We will never collect or use your personal data without your clear consent.
85
+
86
+ Sincerely,
87
+ %1$s', 'contact-form-7' ),
88
+ $site_title,
89
+ $link
90
+ );
91
+
92
+ wp_mail( $to, $subject, $message );
93
+ }
modules/doi-helper.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Double Opt-In Helper module
4
+ *
5
+ * @link https://contactform7.com/doi-helper/
6
+ */
7
+
8
+
9
+ add_action( 'wpcf7_doi', 'wpcf7_doihelper_start_session', 10, 3 );
10
+
11
+ /**
12
+ * Starts a double opt-in session.
13
+ */
14
+ function wpcf7_doihelper_start_session( $agent_name, $args, &$token ) {
15
+ if ( isset( $token ) ) {
16
+ return;
17
+ }
18
+
19
+ if ( ! function_exists( 'doihelper_start_session' ) ) {
20
+ return;
21
+ }
22
+
23
+ $submission = WPCF7_Submission::get_instance();
24
+
25
+ if ( ! $submission ) {
26
+ return;
27
+ }
28
+
29
+ $contact_form = $submission->get_contact_form();
30
+
31
+ $do_doi = ! array_filter(
32
+ $contact_form->additional_setting( 'doi', false ),
33
+ function ( $setting ) {
34
+ return in_array( $setting, array( 'off', 'false', '0' ), true );
35
+ }
36
+ );
37
+
38
+ $do_doi = apply_filters( 'wpcf7_do_doi', $do_doi, $agent_name, $args );
39
+
40
+ if ( ! $do_doi ) {
41
+ return;
42
+ }
43
+
44
+ $token = doihelper_start_session( $agent_name, $args );
45
+ }
modules/recaptcha/index.js CHANGED
@@ -1 +1 @@
1
- document.addEventListener("DOMContentLoaded",(e=>{var t;wpcf7_recaptcha={...null!==(t=wpcf7_recaptcha)&&void 0!==t?t:{}};const c=wpcf7_recaptcha.sitekey,{homepage:n,contactform:a}=wpcf7_recaptcha.actions,o=e=>{const{action:t,func:n,params:a}=e;grecaptcha.execute(c,{action:t}).then((e=>{const c=new CustomEvent("wpcf7grecaptchaexecuted",{detail:{action:t,token:e}});document.dispatchEvent(c)})).then((()=>{"function"==typeof n&&n(...a)})).catch((e=>console.error(e)))};if(grecaptcha.ready((()=>{o({action:n})})),document.addEventListener("change",(e=>{o({action:a})})),"undefined"!=typeof wpcf7&&"function"==typeof wpcf7.submit){const e=wpcf7.submit;wpcf7.submit=(t,c={})=>{o({action:a,func:e,params:[t,c]})}}document.addEventListener("wpcf7grecaptchaexecuted",(e=>{const t=document.querySelectorAll('form.wpcf7-form input[name="_wpcf7_recaptcha_response"]');for(let c=0;c<t.length;c++)t[c].setAttribute("value",e.detail.token)}))}));
1
+ document.addEventListener("DOMContentLoaded",(t=>{var e;wpcf7_recaptcha={...null!==(e=wpcf7_recaptcha)&&void 0!==e?e:{}};const c=wpcf7_recaptcha.sitekey,{homepage:n,contactform:a}=wpcf7_recaptcha.actions,o=t=>{const{action:e,func:n,params:a}=t;grecaptcha.execute(c,{action:e}).then((t=>{const c=new CustomEvent("wpcf7grecaptchaexecuted",{detail:{action:e,token:t}});document.dispatchEvent(c)})).then((()=>{"function"==typeof n&&n(...a)})).catch((t=>console.error(t)))};if(grecaptcha.ready((()=>{o({action:n})})),document.addEventListener("change",(t=>{o({action:a})})),"undefined"!=typeof wpcf7&&"function"==typeof wpcf7.submit){const t=wpcf7.submit;wpcf7.submit=function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o({action:a,func:t,params:[e,c]})}}document.addEventListener("wpcf7grecaptchaexecuted",(t=>{const e=document.querySelectorAll('form.wpcf7-form input[name="_wpcf7_recaptcha_response"]');for(let c=0;c<e.length;c++)e[c].setAttribute("value",t.detail.token)}))}));
modules/sendinblue/doi.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Double Opt-In Helper-related functions
4
+ *
5
+ * @link https://contactform7.com/doi-helper/
6
+ */
7
+
8
+
9
+ add_action(
10
+ 'doihelper_init',
11
+ 'wpcf7_sendinblue_doi_register_agent',
12
+ 10, 0
13
+ );
14
+
15
+ /**
16
+ * Registers wpcf7_sendinblue as an agent.
17
+ */
18
+ function wpcf7_sendinblue_doi_register_agent() {
19
+ if ( ! function_exists( 'doihelper_register_agent' ) ) {
20
+ return;
21
+ }
22
+
23
+ doihelper_register_agent( 'wpcf7_sendinblue', array(
24
+ 'optin_callback' => apply_filters(
25
+ 'wpcf7_sendinblue_doi_optin_callback',
26
+ 'wpcf7_sendinblue_doi_default_optin_callback'
27
+ ),
28
+ 'email_callback' => apply_filters(
29
+ 'wpcf7_sendinblue_doi_email_callback',
30
+ 'wpcf7_sendinblue_doi_default_email_callback'
31
+ ),
32
+ ) );
33
+ }
34
+
35
+
36
+ /**
37
+ * Default optin_callback function.
38
+ */
39
+ function wpcf7_sendinblue_doi_default_optin_callback( $properties ) {
40
+ $service = WPCF7_Sendinblue::get_instance();
41
+
42
+ if ( ! $service->is_active() ) {
43
+ return;
44
+ }
45
+
46
+ if ( ! empty( $properties['contact'] ) ) {
47
+ $contact_id = $service->create_contact( $properties['contact'] );
48
+
49
+ if ( $contact_id and ! empty( $properties['email'] ) ) {
50
+ $service->send_email( $properties['email'] );
51
+ }
52
+ }
53
+ }
54
+
55
+
56
+ /**
57
+ * Default email_callback function.
58
+ */
59
+ function wpcf7_sendinblue_doi_default_email_callback( $args ) {
60
+ if ( ! isset( $args['token'] ) or ! isset( $args['email_to'] ) ) {
61
+ return;
62
+ }
63
+
64
+ $site_title = wp_specialchars_decode(
65
+ get_bloginfo( 'name' ),
66
+ ENT_QUOTES
67
+ );
68
+
69
+ $link = add_query_arg(
70
+ array( 'doitoken' => $args['token'] ),
71
+ home_url()
72
+ );
73
+
74
+ $to = $args['email_to'];
75
+
76
+ $subject = sprintf(
77
+ /* translators: %s: blog name */
78
+ __( 'Opt-in confirmation from %s', 'contact-form-7' ),
79
+ $site_title
80
+ );
81
+
82
+ $message = sprintf(
83
+ /* translators: 1: blog name, 2: confirmation link */
84
+ __( 'Hello,
85
+
86
+ This is a confirmation email sent from %1$s.
87
+
88
+ We have received your submission to our web form, according to which you have allowed us to add you to our contact list. But, the process has not yet been completed. To complete it, please click the following link.
89
+
90
+ %2$s
91
+
92
+ If it was not your intention, or if you have no idea why you received this message, please do not click on the link, and ignore this message. We will never collect or use your personal data without your clear consent.
93
+
94
+ Sincerely,
95
+ %1$s', 'contact-form-7' ),
96
+ $site_title,
97
+ $link
98
+ );
99
+
100
+ wp_mail( $to, $subject, $message );
101
+ }
modules/sendinblue/sendinblue.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  wpcf7_include_module_file( 'sendinblue/service.php' );
4
  wpcf7_include_module_file( 'sendinblue/contact-form-properties.php' );
 
5
 
6
 
7
  add_action( 'wpcf7_init', 'wpcf7_sendinblue_register_service', 1, 0 );
@@ -69,65 +70,83 @@ function wpcf7_sendinblue_submit( $contact_form, $result ) {
69
 
70
  $attributes = wpcf7_sendinblue_collect_parameters();
71
 
72
- if ( empty( $attributes['EMAIL'] ) and empty( $attributes['SMS'] ) ) {
73
- return;
74
- }
75
-
76
- $contact_params = apply_filters(
77
- 'wpcf7_sendinblue_contact_parameters',
78
- array(
79
- 'email' => $attributes['EMAIL'],
80
- 'attributes' => (object) $attributes,
81
- 'listIds' => (array) $prop['contact_lists'],
82
- 'updateEnabled' => false,
83
- )
84
  );
85
 
86
- $contact_id = $service->create_contact( $contact_params );
87
-
88
- if ( ! $contact_id ) {
89
- return;
 
 
 
 
 
 
90
  }
91
 
92
- if ( ! $prop['enable_transactional_email'] or ! $prop['email_template'] ) {
93
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
- $first_name = isset( $attributes['FIRSTNAME'] )
97
- ? trim( $attributes['FIRSTNAME'] )
98
- : '';
99
 
100
- $last_name = isset( $attributes['LASTNAME'] )
101
- ? trim( $attributes['LASTNAME'] )
102
- : '';
 
 
 
 
 
103
 
104
- if ( $first_name or $last_name ) {
105
- $email_to_name = sprintf(
106
- /* translators: 1: first name, 2: last name */
107
- _x( '%1$s %2$s', 'personal name', 'contact-form-7' ),
108
- $first_name,
109
- $last_name
110
- );
111
- } else {
112
- $email_to_name = '';
113
  }
114
 
115
- $email_params = apply_filters(
116
- 'wpcf7_sendinblue_email_parameters',
117
- array(
118
- 'templateId' => absint( $prop['email_template'] ),
119
- 'to' => array(
120
- array(
121
- 'name' => $email_to_name,
122
- 'email' => $attributes['EMAIL'],
123
- ),
124
- ),
125
- 'params' => (object) $attributes,
126
- 'tags' => array( 'Contact Form 7' ),
127
- )
128
- );
129
 
130
- $service->send_email( $email_params );
 
 
 
131
  }
132
 
133
 
2
 
3
  wpcf7_include_module_file( 'sendinblue/service.php' );
4
  wpcf7_include_module_file( 'sendinblue/contact-form-properties.php' );
5
+ wpcf7_include_module_file( 'sendinblue/doi.php' );
6
 
7
 
8
  add_action( 'wpcf7_init', 'wpcf7_sendinblue_register_service', 1, 0 );
70
 
71
  $attributes = wpcf7_sendinblue_collect_parameters();
72
 
73
+ $params = array(
74
+ 'contact' => array(),
75
+ 'email' => array(),
 
 
 
 
 
 
 
 
 
76
  );
77
 
78
+ if ( ! empty( $attributes['EMAIL'] ) or ! empty( $attributes['SMS'] ) ) {
79
+ $params['contact'] = apply_filters(
80
+ 'wpcf7_sendinblue_contact_parameters',
81
+ array(
82
+ 'email' => $attributes['EMAIL'],
83
+ 'attributes' => (object) $attributes,
84
+ 'listIds' => (array) $prop['contact_lists'],
85
+ 'updateEnabled' => false,
86
+ )
87
+ );
88
  }
89
 
90
+ if ( $prop['enable_transactional_email'] and $prop['email_template'] ) {
91
+ $first_name = isset( $attributes['FIRSTNAME'] )
92
+ ? trim( $attributes['FIRSTNAME'] )
93
+ : '';
94
+
95
+ $last_name = isset( $attributes['LASTNAME'] )
96
+ ? trim( $attributes['LASTNAME'] )
97
+ : '';
98
+
99
+ if ( $first_name or $last_name ) {
100
+ $email_to_name = sprintf(
101
+ /* translators: 1: first name, 2: last name */
102
+ _x( '%1$s %2$s', 'personal name', 'contact-form-7' ),
103
+ $first_name,
104
+ $last_name
105
+ );
106
+ } else {
107
+ $email_to_name = '';
108
+ }
109
+
110
+ $params['email'] = apply_filters(
111
+ 'wpcf7_sendinblue_email_parameters',
112
+ array(
113
+ 'templateId' => absint( $prop['email_template'] ),
114
+ 'to' => array(
115
+ array(
116
+ 'name' => $email_to_name,
117
+ 'email' => $attributes['EMAIL'],
118
+ ),
119
+ ),
120
+ 'params' => (object) $attributes,
121
+ 'tags' => array( 'Contact Form 7' ),
122
+ )
123
+ );
124
  }
125
 
126
+ if ( is_email( $attributes['EMAIL'] ) ) {
127
+ $token = null;
 
128
 
129
+ do_action_ref_array( 'wpcf7_doi', array(
130
+ 'wpcf7_sendinblue',
131
+ array(
132
+ 'email_to' => $attributes['EMAIL'],
133
+ 'properties' => $params,
134
+ ),
135
+ &$token,
136
+ ) );
137
 
138
+ if ( isset( $token ) ) {
139
+ return;
140
+ }
 
 
 
 
 
 
141
  }
142
 
143
+ if ( ! empty( $params['contact'] ) ) {
144
+ $contact_id = $service->create_contact( $params['contact'] );
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
+ if ( $contact_id and ! empty( $params['email'] ) ) {
147
+ $service->send_email( $params['email'] );
148
+ }
149
+ }
150
  }
151
 
152
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: takayukister
3
  Donate link: https://contactform7.com/donate/
4
  Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
5
  Requires at least: 5.7
6
- Tested up to: 5.8
7
- Stable tag: 5.5.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -77,6 +77,10 @@ Do you have questions or issues with Contact Form 7? Use these support channels
77
 
78
  For more information, see [Releases](https://contactform7.com/category/releases/).
79
 
 
 
 
 
80
  = 5.5.3 =
81
 
82
  [https://contactform7.com/contact-form-7-553/](https://contactform7.com/contact-form-7-553/)
3
  Donate link: https://contactform7.com/donate/
4
  Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
5
  Requires at least: 5.7
6
+ Tested up to: 5.9
7
+ Stable tag: 5.5.4
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
77
 
78
  For more information, see [Releases](https://contactform7.com/category/releases/).
79
 
80
+ = 5.5.4 =
81
+
82
+ [https://contactform7.com/contact-form-7-554/](https://contactform7.com/contact-form-7-554/)
83
+
84
  = 5.5.3 =
85
 
86
  [https://contactform7.com/contact-form-7-553/](https://contactform7.com/contact-form-7-553/)
wp-contact-form-7.php CHANGED
@@ -7,10 +7,10 @@ Author: Takayuki Miyoshi
7
  Author URI: https://ideasilo.wordpress.com/
8
  Text Domain: contact-form-7
9
  Domain Path: /languages/
10
- Version: 5.5.3
11
  */
12
 
13
- define( 'WPCF7_VERSION', '5.5.3' );
14
 
15
  define( 'WPCF7_REQUIRED_WP_VERSION', '5.7' );
16
 
7
  Author URI: https://ideasilo.wordpress.com/
8
  Text Domain: contact-form-7
9
  Domain Path: /languages/
10
+ Version: 5.5.4
11
  */
12
 
13
+ define( 'WPCF7_VERSION', '5.5.4' );
14
 
15
  define( 'WPCF7_REQUIRED_WP_VERSION', '5.7' );
16