From b0d05d8bee3f42adc4ded406dd168847eba12842 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:54:33 +0300 Subject: [PATCH] Add Captcha to login page Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- wp-content/themes/academyAfrica/functions.php | 2 +- .../academyAfrica/template-parts/login.php | 21 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/academyAfrica/functions.php b/wp-content/themes/academyAfrica/functions.php index 879fed8..d474ce4 100644 --- a/wp-content/themes/academyAfrica/functions.php +++ b/wp-content/themes/academyAfrica/functions.php @@ -29,7 +29,7 @@ function child_theme_configurator_css() // END ENQUEUE PARENT ACTION -define('ACADEMY_AFRICA_VERSION', '1.4.2'); +define('ACADEMY_AFRICA_VERSION', '1.4.3'); const MINIMUM_ELEMENTOR_VERSION = '3.16.6'; diff --git a/wp-content/themes/academyAfrica/template-parts/login.php b/wp-content/themes/academyAfrica/template-parts/login.php index 1d8d48e..73832c4 100644 --- a/wp-content/themes/academyAfrica/template-parts/login.php +++ b/wp-content/themes/academyAfrica/template-parts/login.php @@ -33,7 +33,26 @@

- $_GET['redirect_url'], 'redirect' => $_GET['redirect_url'])); ?> + $_GET['redirect_url'], 'redirect' => $_GET['redirect_url'])); + $form_output = ob_get_clean(); + + // Get the Google Captcha shortcode output + $captcha_output = do_shortcode('[bws_google_captcha]'); + + // Find the position of the submit button + $submit_button_pos = strpos($form_output, '