Contact Form 7 - Version 5.5.5

Version Description

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

Download this release

Release Info

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

Code changes from version 5.5.4 to 5.5.5

includes/block-editor/block-editor.php CHANGED
@@ -44,4 +44,28 @@ function wpcf7_init_block_editor_assets() {
44
  'editor_script' => 'contact-form-7-block-editor',
45
  )
46
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
44
  'editor_script' => 'contact-form-7-block-editor',
45
  )
46
  );
47
+
48
+ $contact_forms = array_map(
49
+ function ( $contact_form ) {
50
+ return array(
51
+ 'id' => $contact_form->id(),
52
+ 'slug' => $contact_form->name(),
53
+ 'title' => $contact_form->title(),
54
+ 'locale' => $contact_form->locale(),
55
+ );
56
+ },
57
+ WPCF7_ContactForm::find( array(
58
+ 'posts_per_page' => 20,
59
+ ) )
60
+ );
61
+
62
+ wp_add_inline_script(
63
+ 'contact-form-7-block-editor',
64
+ sprintf(
65
+ 'window.wpcf7 = {contactForms:%s};',
66
+ json_encode( $contact_forms )
67
+ ),
68
+ 'before'
69
+ );
70
+
71
  }
includes/block-editor/index.js CHANGED
@@ -1 +1 @@
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,'"]')}})}();
1
+ !function(){"use strict";var t,e=window.wp.element,c=window.wp.i18n,l=window.wp.blocks,r=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 242.5 239.46"},(0,e.createElement)("defs",null,(0,e.createElement)("clipPath",{id:"clip-path",transform:"translate(1.72)"},(0,e.createElement)("circle",{className:"cls-1",cx:"119.73",cy:"119.73",r:"116.15",fill:"none"}))),(0,e.createElement)("g",{id:"Layer_2","data-name":"Layer 2"},(0,e.createElement)("g",{id:"Layer_1","data-name":"Layer 1"},(0,e.createElement)("g",{className:"cls-2",clipPath:"url(#clip-path)"},(0,e.createElement)("circle",{className:"cls-3",cx:"121.45",cy:"119.73",r:"116.15",fill:"#33c6f4"}),(0,e.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,e.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,e.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,e.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.compose,o=window.wp.components,n={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,l.createBlock)("core/shortcode",{text:`[contact-form-7 id="${t.id}" title="${t.title}"]`})}]};window.wpcf7=null!==(t=window.wpcf7)&&void 0!==t?t:{contactForms:[]},(0,l.registerBlockType)("contact-form-7/contact-form-selector",{title:(0,c.__)("Contact Form 7","contact-form-7"),description:(0,c.__)("Insert a contact form you have created with Contact Form 7.","contact-form-7"),category:"widgets",attributes:{id:{type:"integer"},title:{type:"string"}},icon:r,transforms:n,edit:function t(l){let{attributes:r,setAttributes:n}=l;const i=new Map;if(Object.entries(window.wpcf7.contactForms).forEach((t=>{let[e,c]=t;i.set(c.id,c)})),!i.size&&!r.id)return(0,e.createElement)("div",{className:"components-placeholder"},(0,e.createElement)("p",null,(0,c.__)("No contact forms were found. Create a contact form first.","contact-form-7")));const s=Array.from(i.values(),(t=>({value:t.id,label:t.title})));if(r.id)s.length||s.push({value:r.id,label:r.title});else{const t=s[0];r={id:parseInt(t.value),title:t.label}}const m=`contact-form-7-contact-form-selector-${(0,a.useInstanceId)(t)}`;return(0,e.createElement)("div",{className:"components-placeholder"},(0,e.createElement)("label",{htmlFor:m,className:"components-placeholder__label"},(0,c.__)("Select a contact form:","contact-form-7")),(0,e.createElement)(o.SelectControl,{id:m,options:s,value:r.id,onChange:t=>n({id:parseInt(t),title:i.get(parseInt(t)).title})}))},save:t=>{var c,l,r,a;let{attributes:o}=t;return o={id:null!==(c=o.id)&&void 0!==c?c:null===(l=window.wpcf7.contactForms[0])||void 0===l?void 0:l.id,title:null!==(r=o.title)&&void 0!==r?r:null===(a=window.wpcf7.contactForms[0])||void 0===a?void 0:a.title},(0,e.createElement)("div",null,'[contact-form-7 id="',o.id,'" title="',o.title,'"]')}})}();
includes/functions.php CHANGED
@@ -534,7 +534,7 @@ function wpcf7_deprecated_function( $function, $version, $replacement ) {
534
  trigger_error(
535
  sprintf(
536
  /* translators: 1: PHP function name, 2: version number, 3: alternative function name */
537
- __( '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ),
538
  $function, $version, $replacement
539
  ),
540
  E_USER_DEPRECATED
@@ -542,7 +542,7 @@ function wpcf7_deprecated_function( $function, $version, $replacement ) {
542
  } else {
543
  trigger_error(
544
  sprintf(
545
- '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.',
546
  $function, $version, $replacement
547
  ),
548
  E_USER_DEPRECATED
@@ -571,7 +571,7 @@ function wpcf7_apply_filters_deprecated( $tag, $args, $version, $replacement ) {
571
  trigger_error(
572
  sprintf(
573
  /* translators: 1: WordPress hook name, 2: version number, 3: alternative hook name */
574
- __( '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ),
575
  $tag, $version, $replacement
576
  ),
577
  E_USER_DEPRECATED
@@ -604,7 +604,7 @@ function wpcf7_doing_it_wrong( $function, $message, $version ) {
604
  trigger_error(
605
  sprintf(
606
  /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Contact Form 7 version number. */
607
- __( '%1$s was called incorrectly. %2$s %3$s', 'contact-form-7' ),
608
  $function,
609
  $message,
610
  $version
@@ -621,7 +621,7 @@ function wpcf7_doing_it_wrong( $function, $message, $version ) {
621
 
622
  trigger_error(
623
  sprintf(
624
- '%1$s was called incorrectly. %2$s %3$s',
625
  $function,
626
  $message,
627
  $version
534
  trigger_error(
535
  sprintf(
536
  /* translators: 1: PHP function name, 2: version number, 3: alternative function name */
537
+ __( 'Function %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ),
538
  $function, $version, $replacement
539
  ),
540
  E_USER_DEPRECATED
542
  } else {
543
  trigger_error(
544
  sprintf(
545
+ 'Function %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.',
546
  $function, $version, $replacement
547
  ),
548
  E_USER_DEPRECATED
571
  trigger_error(
572
  sprintf(
573
  /* translators: 1: WordPress hook name, 2: version number, 3: alternative hook name */
574
+ __( 'Hook %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ),
575
  $tag, $version, $replacement
576
  ),
577
  E_USER_DEPRECATED
604
  trigger_error(
605
  sprintf(
606
  /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Contact Form 7 version number. */
607
+ __( 'Function %1$s was called incorrectly. %2$s %3$s', 'contact-form-7' ),
608
  $function,
609
  $message,
610
  $version
621
 
622
  trigger_error(
623
  sprintf(
624
+ 'Function %1$s was called incorrectly. %2$s %3$s',
625
  $function,
626
  $message,
627
  $version
includes/integration.php CHANGED
@@ -9,9 +9,18 @@ class WPCF7_Integration {
9
 
10
  private function __construct() {}
11
 
 
 
 
 
 
 
 
 
12
  public static function get_instance() {
13
  if ( empty( self::$instance ) ) {
14
  self::$instance = new self;
 
15
  }
16
 
17
  return self::$instance;
9
 
10
  private function __construct() {}
11
 
12
+ public static function get_builtin_categories() {
13
+ return array(
14
+ 'spam_protection' => __( 'Spam protection', 'contact-form-7' ),
15
+ 'email_marketing' => __( 'Email marketing', 'contact-form-7' ),
16
+ 'payments' => __( 'Payments', 'contact-form-7' ),
17
+ );
18
+ }
19
+
20
  public static function get_instance() {
21
  if ( empty( self::$instance ) ) {
22
  self::$instance = new self;
23
+ self::$instance->categories = self::get_builtin_categories();
24
  }
25
 
26
  return self::$instance;
modules/constant-contact/constant-contact.php CHANGED
@@ -18,10 +18,6 @@ add_action(
18
  function wpcf7_constant_contact_register_service() {
19
  $integration = WPCF7_Integration::get_instance();
20
 
21
- $integration->add_category( 'email_marketing',
22
- __( 'Email marketing', 'contact-form-7' )
23
- );
24
-
25
  $service = WPCF7_ConstantContact::get_instance();
26
  $integration->add_service( 'constant_contact', $service );
27
  }
18
  function wpcf7_constant_contact_register_service() {
19
  $integration = WPCF7_Integration::get_instance();
20
 
 
 
 
 
21
  $service = WPCF7_ConstantContact::get_instance();
22
  $integration->add_service( 'constant_contact', $service );
23
  }
modules/recaptcha/recaptcha.php CHANGED
@@ -5,10 +5,6 @@ add_action( 'wpcf7_init', 'wpcf7_recaptcha_register_service', 15, 0 );
5
  function wpcf7_recaptcha_register_service() {
6
  $integration = WPCF7_Integration::get_instance();
7
 
8
- $integration->add_category( 'captcha',
9
- __( 'CAPTCHA', 'contact-form-7' )
10
- );
11
-
12
  $integration->add_service( 'recaptcha',
13
  WPCF7_RECAPTCHA::get_instance()
14
  );
@@ -241,7 +237,7 @@ class WPCF7_RECAPTCHA extends WPCF7_Service {
241
  }
242
 
243
  public function get_categories() {
244
- return array( 'captcha' );
245
  }
246
 
247
  public function icon() {
5
  function wpcf7_recaptcha_register_service() {
6
  $integration = WPCF7_Integration::get_instance();
7
 
 
 
 
 
8
  $integration->add_service( 'recaptcha',
9
  WPCF7_RECAPTCHA::get_instance()
10
  );
237
  }
238
 
239
  public function get_categories() {
240
+ return array( 'spam_protection' );
241
  }
242
 
243
  public function icon() {
modules/stripe/stripe.php CHANGED
@@ -16,10 +16,6 @@ add_action(
16
  function wpcf7_stripe_register_service() {
17
  $integration = WPCF7_Integration::get_instance();
18
 
19
- $integration->add_category( 'payments',
20
- __( 'Payments', 'contact-form-7' )
21
- );
22
-
23
  $integration->add_service( 'stripe',
24
  WPCF7_Stripe::get_instance()
25
  );
16
  function wpcf7_stripe_register_service() {
17
  $integration = WPCF7_Integration::get_instance();
18
 
 
 
 
 
19
  $integration->add_service( 'stripe',
20
  WPCF7_Stripe::get_instance()
21
  );
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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,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.4 =
81
 
82
  [https://contactform7.com/contact-form-7-554/](https://contactform7.com/contact-form-7-554/)
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.5
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.5 =
81
+
82
+ [https://contactform7.com/contact-form-7-555/](https://contactform7.com/contact-form-7-555/)
83
+
84
  = 5.5.4 =
85
 
86
  [https://contactform7.com/contact-form-7-554/](https://contactform7.com/contact-form-7-554/)
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.4
11
  */
12
 
13
- define( 'WPCF7_VERSION', '5.5.4' );
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.5
11
  */
12
 
13
+ define( 'WPCF7_VERSION', '5.5.5' );
14
 
15
  define( 'WPCF7_REQUIRED_WP_VERSION', '5.7' );
16