Skip to content

Commit

Permalink
Fix bug in CF7 shortcode.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Jul 19, 2023
1 parent c5c086a commit 1e72b94
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/php/CF7/CF7.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace HCaptcha\CF7;

use HCaptcha\Helpers\HCaptcha;
use WPCF7_FormTag;
use WPCF7_Submission;
use WPCF7_Validation;

Expand Down Expand Up @@ -84,12 +85,12 @@ public function wpcf7_shortcode( string $output, string $tag, $attr, array $m ):
/**
* CF7 hCaptcha shortcode.
*
* @param array $attr Shortcode attributes.
* @param array|string $attr Shortcode attributes.
*
* @return string
* @noinspection PhpUnusedParameterInspection
*/
public function cf7_hcaptcha_shortcode( array $attr = [] ): string {
public function cf7_hcaptcha_shortcode( $attr = [] ): string {
$settings = hcaptcha()->settings();
$hcaptcha_site_key = $settings->get_site_key();
$hcaptcha_theme = $settings->get( 'theme' );
Expand Down Expand Up @@ -178,7 +179,7 @@ class="<?php echo esc_attr( HCaptcha::HCAPTCHA_WIDGET_ID ); ?>"
* Verify CF7 recaptcha.
*
* @param WPCF7_Validation $result Result.
* @param WPCF7_FormTag $tag Tag.
* @param WPCF7_FormTag $tag Tag.
*
* @return WPCF7_Validation
* @noinspection PhpUnusedParameterInspection
Expand Down

0 comments on commit 1e72b94

Please sign in to comment.