File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -628,6 +628,7 @@ Instructions for popular native integrations are below:
628628== Changelog ==
629629
630630= 4.11.0 =
631+ * Added compatibility with the UsersWP plugin v1.2.28.
631632* Fixed processing wpDiscuz comment form with wpDiscuz custom ajax.
632633* Fixed adding hCaptcha internal fields to Avada from submission.
633634
Original file line number Diff line number Diff line change @@ -79,24 +79,19 @@ public function uwp_template_after( string $name ): void {
7979
8080 $ template = (string ) ob_get_clean ();
8181
82- ob_start ();
83-
84- $ args = [
82+ $ args = [
8583 'action ' => static ::ACTION ,
8684 'name ' => static ::NONCE ,
8785 'id ' => [
8886 'source ' => HCaptcha::get_class_source ( static ::class ),
8987 'form_id ' => 'register ' ,
9088 ],
9189 ];
92-
93- HCaptcha::form_display ( $ args );
94-
95- $ captcha = (string ) ob_get_clean ();
96- $ search = '<input type="submit" ' ;
90+ $ hcaptcha = HCaptcha::form ( $ args );
91+ $ search = '/(<(?:input|button) type="submit")/ ' ;
9792
9893 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
99- echo str_replace ( $ search , $ captcha . $ search , $ template );
94+ echo preg_replace ( $ search , $ hcaptcha . ' $1 ' , $ template );
10095 }
10196
10297 /**
You can’t perform that action at this time.
0 commit comments