From 1f29e87c7103e217dbc81773a2a6ace36d4f119f Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Mon, 22 Apr 2024 11:25:24 +0100 Subject: [PATCH 01/16] WIP --- .github/workflows/create-zip.yml | 2 +- .../deploy-readme-assets-to-wp-org.yml | 2 +- .github/workflows/deploy-to-wp-org.yml | 2 +- .../hcaptcha-beaver-builder.test.js | 14 +- .tests/php/integration/AAAMainTest.php | 96 ++-- .../integration/Admin/NotificationsTest.php | 38 +- .../integration/AutoVerify/AutoVerifyTest.php | 4 +- .tests/php/integration/Avada/FormTest.php | 4 +- .../php/integration/BBPress/NewTopicTest.php | 2 +- .tests/php/integration/BBPress/ReplyTest.php | 2 +- .../BuddyPress/CreateGroupTest.php | 4 +- .../integration/BuddyPress/RegisterTest.php | 2 +- .tests/php/integration/CF7/CF7Test.php | 18 +- .../DelayedScript/DelayedScriptTest.php | 4 +- .tests/php/integration/Divi/ContactTest.php | 4 +- .../ElementorPro/HCaptchaHandlerTest.php | 6 +- .../php/integration/FluentForm/FormTest.php | 6 +- .../php/integration/GravityForms/FormTest.php | 14 +- .tests/php/integration/HCaptchaWPTestCase.php | 8 +- .tests/php/integration/Mailchimp/FormTest.php | 2 +- .tests/php/integration/NF/FieldTest.php | 2 +- .tests/php/integration/WC/LoginTest.php | 2 +- .../php/integration/WC/LostPasswordTest.php | 2 +- .tests/php/integration/WC/RegisterTest.php | 2 +- .tests/php/integration/WP/CommentTest.php | 4 +- .../php/integration/WPDiscuz/CommentTest.php | 10 +- .../integration/WPDiscuz/SubscribeTest.php | 12 +- .tests/php/integration/WPForms/FormTest.php | 10 +- .../php/integration/WPForo/NewTopicTest.php | 6 +- .../php/integration/includes/RequestTest.php | 14 +- .tests/php/unit/HCaptchaTestCase.php | 10 +- .../Settings/Abstracts/SettingsBaseTest.php | 8 +- .tests/php/unit/Settings/GeneralTest.php | 12 +- .tests/php/unit/Settings/IntegrationsTest.php | 2 +- .../unit/Settings/PluginSettingsBaseTest.php | 4 +- .tests/php/unit/Settings/SystemInfoTest.php | 4 +- .yarnrc.yml | 2 + MAINTAINERS.md | 2 +- README.md | 8 +- assets/css/general.css | 4 +- assets/css/settings-base.css | 18 +- assets/css/wpforms.css | 16 + assets/images/checkbox-off.svg | 8 - assets/images/checkbox-on.svg | 8 - assets/images/notification-bell.svg | 48 +- assets/images/procaptcha-logo.svg | 1 + assets/js/admin-nf.js | 4 +- assets/js/general.js | 45 +- assets/js/hcaptcha-fluentform.js | 2 +- assets/js/hcaptcha-helper.js | 4 +- assets/js/hcaptcha-mailpoet.js | 4 +- assets/js/hcaptcha-nf.js | 2 +- assets/js/hcaptcha-otter.js | 2 +- assets/js/hcaptcha-simple-download-monitor.js | 4 +- assets/js/hcaptcha-spectra.js | 2 +- changelog.txt | 2 +- composer.json | 9 +- docker/docker-compose.wordpress.yml | 35 ++ docker/wordpress.dockerfile | 7 + docker/wordpress.ini | 6 + hcaptcha.php | 16 +- languages/en_US.pot | 72 +-- .../hcaptcha-for-forms-and-more-ko_KR.po | 132 +++--- .../hcaptcha-for-forms-and-more-pt_BR.po | 138 +++--- package.json | 2 +- readme.txt | 16 +- src/js/hcaptcha/app.js | 7 +- src/js/hcaptcha/hcaptcha.js | 42 +- src/php/Admin/Events/EventsTable.php | 12 +- src/php/Admin/Events/FormsTable.php | 6 +- src/php/Admin/Notifications.php | 102 ++--- src/php/Admin/PluginStats.php | 4 +- src/php/Affiliates/Login.php | 2 +- src/php/Affiliates/Register.php | 2 +- src/php/Asgaros/Base.php | 2 +- src/php/AutoVerify/AutoVerify.php | 1 - src/php/Avada/Form.php | 2 +- src/php/BackInStockNotifier/Form.php | 2 +- src/php/Brizy/Base.php | 4 +- src/php/BuddyPress/CreateGroup.php | 2 +- src/php/CF7/CF7.php | 14 +- src/php/CoBlocks/Form.php | 2 +- src/php/DelayedScript/DelayedScript.php | 6 +- src/php/DownloadManager/DownloadManager.php | 4 +- src/php/ElementorPro/HCaptchaHandler.php | 8 +- src/php/ElementorPro/Login.php | 2 +- src/php/EssentialAddons/Register.php | 2 +- src/php/FluentForm/Form.php | 8 +- src/php/GravityForms/Field.php | 6 +- src/php/GravityForms/Form.php | 14 +- src/php/HTMLForms/Form.php | 4 +- src/php/Helpers/HCaptcha.php | 12 +- src/php/Jetpack/JetpackBase.php | 4 +- src/php/Kadence/AdvancedForm.php | 8 +- src/php/Kadence/Form.php | 8 +- src/php/LearnDash/Register.php | 2 +- src/php/LoginSignupPopup/Login.php | 2 +- src/php/LoginSignupPopup/Register.php | 2 +- src/php/Main.php | 120 ++--- src/php/NF/NF.php | 2 +- src/php/Otter/Form.php | 2 +- src/php/Passster/Protect.php | 2 +- src/php/ProfileBuilder/Login.php | 2 +- src/php/Quform/Quform.php | 2 +- src/php/Settings/EventsPage.php | 18 +- src/php/Settings/FormsPage.php | 12 +- src/php/Settings/General.php | 426 +++++++++--------- src/php/Settings/Integrations.php | 242 +++++----- src/php/Settings/PluginSettingsBase.php | 22 +- src/php/Settings/SystemInfo.php | 8 +- src/php/SimpleDownloadMonitor/Form.php | 4 +- src/php/Spectra/Form.php | 6 +- src/php/SupportCandy/Base.php | 2 +- src/php/UM/Base.php | 4 +- src/php/WC/Login.php | 2 +- src/php/WC/LostPassword.php | 2 +- src/php/WC/Register.php | 2 +- src/php/WP/Comment.php | 4 +- src/php/WPDiscuz/Comment.php | 8 +- src/php/WPDiscuz/Subscribe.php | 8 +- src/php/WPForms/Form.php | 29 +- src/php/WPForo/Base.php | 6 +- src/php/includes/request.php | 72 +-- 123 files changed, 1161 insertions(+), 1101 deletions(-) create mode 100644 assets/css/wpforms.css delete mode 100644 assets/images/checkbox-off.svg delete mode 100644 assets/images/checkbox-on.svg create mode 100644 assets/images/procaptcha-logo.svg create mode 100644 docker/docker-compose.wordpress.yml create mode 100644 docker/wordpress.dockerfile create mode 100644 docker/wordpress.ini diff --git a/.github/workflows/create-zip.yml b/.github/workflows/create-zip.yml index b866e65f..438d1764 100644 --- a/.github/workflows/create-zip.yml +++ b/.github/workflows/create-zip.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest env: - SLUG: "hcaptcha-for-forms-and-more" + SLUG: "procaptcha-wordpress" steps: - name: Checkout code diff --git a/.github/workflows/deploy-readme-assets-to-wp-org.yml b/.github/workflows/deploy-readme-assets-to-wp-org.yml index d089e7df..89955731 100644 --- a/.github/workflows/deploy-readme-assets-to-wp-org.yml +++ b/.github/workflows/deploy-readme-assets-to-wp-org.yml @@ -14,7 +14,7 @@ jobs: - name: WordPress.org plugin asset/readme update uses: 10up/action-wordpress-plugin-asset-update@stable env: - SLUG: hcaptcha-for-forms-and-more + SLUG: procaptcha-wordpress SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SVN_USERNAME: ${{ secrets.SVN_USERNAME }} IGNORE_OTHER_FILES: true diff --git a/.github/workflows/deploy-to-wp-org.yml b/.github/workflows/deploy-to-wp-org.yml index b8c779a9..95e43c40 100644 --- a/.github/workflows/deploy-to-wp-org.yml +++ b/.github/workflows/deploy-to-wp-org.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest env: - SLUG: "hcaptcha-for-forms-and-more" + SLUG: "procaptcha-wordpress" steps: - name: Checkout code diff --git a/.tests/js/assets-js-files/hcaptcha-beaver-builder.test.js b/.tests/js/assets-js-files/hcaptcha-beaver-builder.test.js index 8a05a553..24de6fb6 100644 --- a/.tests/js/assets-js-files/hcaptcha-beaver-builder.test.js +++ b/.tests/js/assets-js-files/hcaptcha-beaver-builder.test.js @@ -26,7 +26,7 @@ describe( 'hCaptcha Beaver Builder', () => { document.body.innerHTML = `
- +
@@ -35,24 +35,24 @@ describe( 'hCaptcha Beaver Builder', () => { require( '../../../assets/js/hcaptcha-beaver-builder.js' ); } ); - test( 'appends h-captcha-response and hcaptcha_beaver_builder_nonce when data starts with action=fl_builder_email', () => { + test( 'appends procaptcha-response and hcaptcha_beaver_builder_nonce when data starts with action=fl_builder_email', () => { options.data = 'action=fl_builder_email&node_id=123'; ajaxPrefilterCallback( options ); - expect( options.data ).toContain( 'h-captcha-response=responseValue' ); + expect( options.data ).toContain( 'procaptcha-response=responseValue' ); expect( options.data ).toContain( 'hcaptcha_beaver_builder_nonce=nonceValue' ); } ); - test( 'appends h-captcha-response and hcaptcha_login_nonce when data starts with action=fl_builder_login_form_submit', () => { + test( 'appends procaptcha-response and hcaptcha_login_nonce when data starts with action=fl_builder_login_form_submit', () => { options.data = 'action=fl_builder_login_form_submit&node_id=123'; ajaxPrefilterCallback( options ); - expect( options.data ).toContain( 'h-captcha-response=responseValue' ); + expect( options.data ).toContain( 'procaptcha-response=responseValue' ); expect( options.data ).toContain( 'hcaptcha_login_nonce=loginNonceValue' ); } ); test( 'does not append anything when data does not start with any expected action', () => { options.data = 'action=other_action&node_id=123'; ajaxPrefilterCallback( options ); - expect( options.data ).not.toContain( 'h-captcha-response' ); + expect( options.data ).not.toContain( 'procaptcha-response' ); expect( options.data ).not.toContain( 'hcaptcha_beaver_builder_nonce' ); expect( options.data ).not.toContain( 'hcaptcha_login_nonce' ); } ); @@ -60,7 +60,7 @@ describe( 'hCaptcha Beaver Builder', () => { test( 'does not append anything when data is not a string', () => { options.data = {}; ajaxPrefilterCallback( options ); - expect( options.data ).not.toContain( 'h-captcha-response' ); + expect( options.data ).not.toContain( 'procaptcha-response' ); expect( options.data ).not.toContain( 'hcaptcha_beaver_builder_nonce' ); expect( options.data ).not.toContain( 'hcaptcha_login_nonce' ); } ); diff --git a/.tests/php/integration/AAAMainTest.php b/.tests/php/integration/AAAMainTest.php index a5cdace3..aef5aaa6 100644 --- a/.tests/php/integration/AAAMainTest.php +++ b/.tests/php/integration/AAAMainTest.php @@ -395,7 +395,7 @@ public function test_prefetch_hcaptcha_dns() { ]; $expected = [ '//s.w.org', - 'https://hcaptcha.com', + 'https://prosopo.io', ]; $subject = new Main(); @@ -415,7 +415,7 @@ public function test_csp_headers() { 'Content-Security-Policy' => "default-src 'self'", ]; $expected = $headers; - $hcap_csp = "'self' 'unsafe-inline' 'unsafe-eval' https://hcaptcha.com https://*.hcaptcha.com"; + $hcap_csp = "'self' 'unsafe-inline' 'unsafe-eval' https://prosopo.io https://*.prosopo.io"; $expected['Content-Security-Policy'] = "script-src $hcap_csp; " . @@ -462,7 +462,7 @@ static function ( $name ) { ); $expected = << [ 'on' ], 'custom_themes' => [ 'on' ], - 'asset_host' => 'assets-cn1.hcaptcha.com', - 'endpoint' => 'cn1.hcaptcha.com', - 'host' => 'cn1.hcaptcha.com', - 'image_host' => 'imgs-cn1.hcaptcha.com', - 'report_api' => 'reportapi-cn1.hcaptcha.com', - 'sentry' => 'cn1.hcaptcha.com', + 'asset_host' => 'assets-cn1.prosopo.io', + 'endpoint' => 'cn1.prosopo.io', + 'host' => 'cn1.prosopo.io', + 'image_host' => 'imgs-cn1.prosopo.io', + 'report_api' => 'reportapi-cn1.prosopo.io', + 'sentry' => 'cn1.prosopo.io', 'license' => 'pro', ] ); - $expected = 'https://js.hcaptcha.com/1/api.js?onload=hCaptchaOnLoad&render=explicit&recaptchacompat=off&custom=true&assethost=https%3A%2F%2Fassets-cn1.hcaptcha.com&endpoint=https%3A%2F%2Fcn1.hcaptcha.com&host=https%3A%2F%2Fcn1.hcaptcha.com&imghost=https%3A%2F%2Fimgs-cn1.hcaptcha.com&reportapi=https%3A%2F%2Freportapi-cn1.hcaptcha.com&sentry=https%3A%2F%2Fcn1.hcaptcha.com'; + $expected = 'https://js.prosopo.io/js/procaptcha.bundle.js?onload=hCaptchaOnLoad&render=explicit&recaptchacompat=off&custom=true&assethost=https%3A%2F%2Fassets-cn1.prosopo.io&endpoint=https%3A%2F%2Fcn1.prosopo.io&host=https%3A%2F%2Fcn1.prosopo.io&imghost=https%3A%2F%2Fimgs-cn1.prosopo.io&reportapi=https%3A%2F%2Freportapi-cn1.prosopo.io&sentry=https%3A%2F%2Fcn1.prosopo.io'; $subject = new Main(); @@ -693,11 +693,11 @@ public function test_get_verify_url( string $backend, string $expected ) { */ public function dp_test_get_verify_url(): array { return [ - [ '', 'https://api.hcaptcha.com/siteverify' ], - [ ' ', 'https://api.hcaptcha.com/siteverify' ], - [ 'cn1.hcaptcha.com', 'https://cn1.hcaptcha.com/siteverify' ], - [ 'http://cn1.hcaptcha.com', 'https://cn1.hcaptcha.com/siteverify' ], - [ 'https://cn1.hcaptcha.com', 'https://cn1.hcaptcha.com/siteverify' ], + [ '', 'https://api.prosopo.io/siteverify' ], + [ ' ', 'https://api.prosopo.io/siteverify' ], + [ 'cn1.prosopo.io', 'https://cn1.prosopo.io/siteverify' ], + [ 'http://cn1.prosopo.io', 'https://cn1.prosopo.io/siteverify' ], + [ 'https://cn1.prosopo.io', 'https://cn1.prosopo.io/siteverify' ], ]; } @@ -732,11 +732,11 @@ public function test_get_check_site_config_url( string $backend, string $expecte */ public function dp_test_get_check_site_config_url(): array { return [ - [ '', 'https://api.hcaptcha.com/checksiteconfig' ], - [ ' ', 'https://api.hcaptcha.com/checksiteconfig' ], - [ 'cn1.hcaptcha.com', 'https://cn1.hcaptcha.com/checksiteconfig' ], - [ 'http://cn1.hcaptcha.com', 'https://cn1.hcaptcha.com/checksiteconfig' ], - [ 'https://cn1.hcaptcha.com', 'https://cn1.hcaptcha.com/checksiteconfig' ], + [ '', 'https://api.prosopo.io/checksiteconfig' ], + [ ' ', 'https://api.prosopo.io/checksiteconfig' ], + [ 'cn1.prosopo.io', 'https://cn1.prosopo.io/checksiteconfig' ], + [ 'http://cn1.prosopo.io', 'https://cn1.prosopo.io/checksiteconfig' ], + [ 'https://cn1.prosopo.io', 'https://cn1.prosopo.io/checksiteconfig' ], ]; } @@ -951,37 +951,37 @@ public function dp_test_print_footer_scripts(): array { false, false, false, - 'https://js.hcaptcha.com/1/api.js?onload=hCaptchaOnLoad&render=explicit', + 'https://js.prosopo.io/js/procaptcha.bundle.js?onload=hCaptchaOnLoad&render=explicit', ], 'empty options' => [ '', '', '', - 'https://js.hcaptcha.com/1/api.js?onload=hCaptchaOnLoad&render=explicit', + 'https://js.prosopo.io/js/procaptcha.bundle.js?onload=hCaptchaOnLoad&render=explicit', ], 'compat only' => [ 'on', false, false, - 'https://js.hcaptcha.com/1/api.js?onload=hCaptchaOnLoad&render=explicit&recaptchacompat=off', + 'https://js.prosopo.io/js/procaptcha.bundle.js?onload=hCaptchaOnLoad&render=explicit&recaptchacompat=off', ], 'language only' => [ false, 'ru', false, - 'https://js.hcaptcha.com/1/api.js?onload=hCaptchaOnLoad&render=explicit', + 'https://js.prosopo.io/js/procaptcha.bundle.js?onload=hCaptchaOnLoad&render=explicit', ], 'custom themes only' => [ false, false, 'on', - 'https://js.hcaptcha.com/1/api.js?onload=hCaptchaOnLoad&render=explicit&custom=true', + 'https://js.prosopo.io/js/procaptcha.bundle.js?onload=hCaptchaOnLoad&render=explicit&custom=true', ], 'all options' => [ 'on', 'ru', 'on', - 'https://js.hcaptcha.com/1/api.js?onload=hCaptchaOnLoad&render=explicit&recaptchacompat=off&custom=true', + 'https://js.prosopo.io/js/procaptcha.bundle.js?onload=hCaptchaOnLoad&render=explicit&recaptchacompat=off&custom=true', ], ]; } @@ -1615,7 +1615,7 @@ public function test_load_textdomain() { $default_domain = 'default'; $default_mofile = WP_LANG_DIR . "/$locale.mo"; - $domain = 'hcaptcha-for-forms-and-more'; + $domain = 'procaptcha-wordpress'; $mofile = WP_PLUGIN_DIR . '/' . dirname( plugin_basename( HCAPTCHA_FILE ) ) . '/languages/' . $domain . '-' . $locale . '.mo'; diff --git a/.tests/php/integration/Admin/NotificationsTest.php b/.tests/php/integration/Admin/NotificationsTest.php index 61ff1919..17fcf7f6 100644 --- a/.tests/php/integration/Admin/NotificationsTest.php +++ b/.tests/php/integration/Admin/NotificationsTest.php @@ -45,20 +45,20 @@ public function test_init( bool $empty_keys ) { 'register' => [ 'title' => 'Get your hCaptcha site keys', - 'message' => 'To use hCaptcha, please register here to get your site and secret keys.', + 'message' => 'To use hCaptcha, please register here to get your site and secret keys.', 'button' => [ - 'url' => 'https://www.hcaptcha.com/signup-interstitial/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=sk', + 'url' => 'https://www.prosopo.io/signup-interstitial/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=sk', 'text' => 'Get site keys', ], ], 'pro-free-trial' => [ 'title' => 'Try Pro for free', - 'message' => 'Want low friction and custom themes? hCaptcha Pro is for you. Start a free trial in your dashboard, no credit card required.', + 'message' => 'Want low friction and custom themes? hCaptcha Pro is for you. Start a free trial in your dashboard, no credit card required.', 'button' => [ - 'url' => 'https://www.hcaptcha.com/pro?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not', + 'url' => 'https://www.prosopo.io/pro?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not', 'text' => 'Try Pro', ], ], @@ -66,15 +66,15 @@ public function test_init( bool $empty_keys ) { 'title' => 'hCaptcha\'s Leadership', 'message' => 'hCaptcha Named a Technology Leader in Bot Management: 2023 SPARK Matrix™', 'button' => [ - 'url' => 'https://www.hcaptcha.com/post/hcaptcha-named-a-technology-leader-in-bot-management/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not', + 'url' => 'https://www.prosopo.io/post/hcaptcha-named-a-technology-leader-in-bot-management/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not', 'text' => 'Read post', ], ], 'please-rate' => [ 'title' => 'Rate hCaptcha plugin', - 'message' => 'Please rate hCaptcha for WordPress ★★★★★ on WordPress.org. Thank you!', + 'message' => 'Please rate Procaptcha for WordPress ★★★★★ on WordPress.org. Thank you!', 'button' => [ - 'url' => 'https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/reviews/?filter=5#new-post', + 'url' => 'https://wordpress.org/support/plugin/procaptcha-wordpress/reviews/?filter=5#new-post', 'text' => 'Rate', ], ], @@ -90,7 +90,7 @@ public function test_init( bool $empty_keys ) { 'title' => 'Support for Enterprise features', 'message' => 'The hCaptcha plugin commenced support for Enterprise features. Solve your fraud and abuse problem today.', 'button' => [ - 'url' => 'https://www.hcaptcha.com/#enterprise-features?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not', + 'url' => 'https://www.prosopo.io/#enterprise-features?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not', 'text' => 'Get started', ], ], @@ -104,7 +104,7 @@ public function test_init( bool $empty_keys ) { ], 'events_page' => [ 'title' => 'Events admin page', - 'message' => 'Turn on events statistics and upgrade to Pro to see complete statistics on form events.', + 'message' => 'Turn on events statistics and upgrade to Pro to see complete statistics on form events.', 'button' => [ 'url' => 'http://test.test/wp-admin/options-general.php?page=hcaptcha&tab=general#statistics_1', 'text' => 'Turn on stats', @@ -225,12 +225,12 @@ class="hcaptcha-notification notice notice-info is-dismissible inline" Get your hCaptcha site keys

To use hCaptcha, please register here to get your site and secret keys.

@@ -242,12 +242,12 @@ class="hcaptcha-notification notice notice-info is-dismissible inline" Try Pro for free

Want low friction and custom themes? hCaptcha Pro is for you. Start a free trial in your dashboard, no credit card required.

@@ -260,7 +260,7 @@ class="hcaptcha-notification notice notice-info is-dismissible inline"

hCaptcha Named a Technology Leader in Bot Management: 2023 SPARK Matrix™

@@ -341,12 +341,12 @@ class="hcaptcha-notification notice notice-info is-dismissible inline" Try Pro for free

Want low friction and custom themes? hCaptcha Pro is for you. Start a free trial in your dashboard, no credit card required.

diff --git a/.tests/php/integration/AutoVerify/AutoVerifyTest.php b/.tests/php/integration/AutoVerify/AutoVerifyTest.php index fa0ed918..241ce0ed 100644 --- a/.tests/php/integration/AutoVerify/AutoVerifyTest.php +++ b/.tests/php/integration/AutoVerify/AutoVerifyTest.php @@ -299,7 +299,7 @@ public function test_verify_form_when_no_success() { $_POST['test_input'] = 'some input'; $die_arr = []; $expected = [ - 'Please complete the hCaptcha.', + 'Please complete the Procaptcha.', 'hCaptcha', [ 'back_link' => true, @@ -336,7 +336,7 @@ public function test_verify_form_when_success() { $expected = [ 'test_input' => 'some input', 'hcaptcha_nonce' => $this->get_test_nonce(), - 'h-captcha-response' => $hcaptcha_response, + 'procaptcha-response' => $hcaptcha_response, ]; $_SERVER['REQUEST_METHOD'] = 'POST'; diff --git a/.tests/php/integration/Avada/FormTest.php b/.tests/php/integration/Avada/FormTest.php index ea335ffa..b7e0d003 100644 --- a/.tests/php/integration/Avada/FormTest.php +++ b/.tests/php/integration/Avada/FormTest.php @@ -82,7 +82,7 @@ public function test_add_hcaptcha() { public function test_verify() { $demo_mode = true; $hcaptcha_response = 'some_response'; - $form_data = "h-captcha-response=$hcaptcha_response"; + $form_data = "procaptcha-response=$hcaptcha_response"; $this->prepare_hcaptcha_request_verify( $hcaptcha_response ); @@ -102,7 +102,7 @@ public function test_verify_not_verified() { $hcaptcha_response = 'some_response'; $die_arr = []; $expected = [ - '{"status":"error","info":{"hcaptcha":"Please complete the hCaptcha."}}', + '{"status":"error","info":{"hcaptcha":"Please complete the Procaptcha."}}', '', [], ]; diff --git a/.tests/php/integration/BBPress/NewTopicTest.php b/.tests/php/integration/BBPress/NewTopicTest.php index dc75fcc1..7cb538c2 100644 --- a/.tests/php/integration/BBPress/NewTopicTest.php +++ b/.tests/php/integration/BBPress/NewTopicTest.php @@ -89,7 +89,7 @@ public function test_verify() { * @noinspection PhpUndefinedFunctionInspection */ public function test_verify_not_verified() { - $expected = new WP_Error( 'hcap_error', 'Please complete the hCaptcha.' ); + $expected = new WP_Error( 'hcap_error', 'Please complete the Procaptcha.' ); $subject = new NewTopic(); self::assertFalse( $subject->verify() ); diff --git a/.tests/php/integration/BBPress/ReplyTest.php b/.tests/php/integration/BBPress/ReplyTest.php index 83ce7a67..00d4f9f4 100644 --- a/.tests/php/integration/BBPress/ReplyTest.php +++ b/.tests/php/integration/BBPress/ReplyTest.php @@ -88,7 +88,7 @@ public function test_verify() { * @noinspection PhpUndefinedFunctionInspection */ public function test_verify_not_verified() { - $expected = new WP_Error( 'hcap_error', 'Please complete the hCaptcha.' ); + $expected = new WP_Error( 'hcap_error', 'Please complete the Procaptcha.' ); $subject = new Reply(); self::assertFalse( $subject->verify() ); diff --git a/.tests/php/integration/BuddyPress/CreateGroupTest.php b/.tests/php/integration/BuddyPress/CreateGroupTest.php index 46451fe4..53ce3447 100644 --- a/.tests/php/integration/BuddyPress/CreateGroupTest.php +++ b/.tests/php/integration/BuddyPress/CreateGroupTest.php @@ -134,7 +134,7 @@ static function ( $location, $status ) { $bp = buddypress(); - self::assertSame( 'Please complete the hCaptcha.', $bp->template_message ); + self::assertSame( 'Please complete the Procaptcha.', $bp->template_message ); self::assertSame( 'error', $bp->template_message_type ); } @@ -159,7 +159,7 @@ static function ( $name ) { ); $expected = << [ - 'hcaptcha_response_verify' => 'Please complete the hCaptcha.', + 'hcaptcha_response_verify' => 'Please complete the Procaptcha.', ], ]; $subject = new Register(); diff --git a/.tests/php/integration/CF7/CF7Test.php b/.tests/php/integration/CF7/CF7Test.php index 0ffe0d39..cc1cb6ba 100644 --- a/.tests/php/integration/CF7/CF7Test.php +++ b/.tests/php/integration/CF7/CF7Test.php @@ -237,7 +237,7 @@ static function ( $prefix, $more_entropy ) use ( $uniqid ) { * @noinspection PhpVariableIsUsedOnlyInClosureInspection */ public function test_hcap_cf7_verify_recaptcha() { - $data = [ 'h-captcha-response' => 'some response' ]; + $data = [ 'procaptcha-response' => 'some response' ]; $wpcf7_id = 23; $hcaptcha_site_key = 'some site key'; $cf7_text = @@ -265,7 +265,7 @@ static function ( $content ) use ( $wpcf7_id, $cf7_text ) { hcaptcha()->init_hooks(); - $this->prepare_hcaptcha_request_verify( $data['h-captcha-response'] ); + $this->prepare_hcaptcha_request_verify( $data['procaptcha-response'] ); $result = Mockery::mock( WPCF7_Validation::class ); $tag = Mockery::mock( WPCF7_FormTag::class ); @@ -285,7 +285,7 @@ public function test_hcap_cf7_verify_recaptcha_without_submission() { 'type' => 'hcaptcha', 'name' => 'hcap-cf7', ], - 'Please complete the hCaptcha.' + 'Please complete the Procaptcha.' ); $tag = Mockery::mock( WPCF7_FormTag::class ); @@ -310,7 +310,7 @@ public function test_hcap_cf7_verify_recaptcha_without_posted_data() { 'type' => 'hcaptcha', 'name' => 'hcap-cf7', ], - 'Please complete the hCaptcha.' + 'Please complete the Procaptcha.' ); $tag = Mockery::mock( WPCF7_FormTag::class ); @@ -336,7 +336,7 @@ public function test_hcap_cf7_verify_recaptcha_without_site_key() { 'type' => 'hcaptcha', 'name' => 'hcap-cf7', ], - 'Please complete the hCaptcha.' + 'Please complete the Procaptcha.' ); $tag = Mockery::mock( WPCF7_FormTag::class ); @@ -390,7 +390,7 @@ static function ( $content ) use ( $wpcf7_id, $cf7_text ) { 'type' => 'hcaptcha', 'name' => 'hcap-cf7', ], - 'Please complete the hCaptcha.' + 'Please complete the Procaptcha.' ) ->once(); @@ -405,7 +405,7 @@ static function ( $content ) use ( $wpcf7_id, $cf7_text ) { * @noinspection PhpVariableIsUsedOnlyInClosureInspection */ public function test_hcap_cf7_verify_recaptcha_not_verified() { - $data = [ 'h-captcha-response' => 'some response' ]; + $data = [ 'procaptcha-response' => 'some response' ]; $wpcf7_id = 23; $hcaptcha_site_key = 'some site key'; $cf7_text = @@ -433,7 +433,7 @@ static function ( $content ) use ( $wpcf7_id, $cf7_text ) { hcaptcha()->init_hooks(); - $this->prepare_hcaptcha_request_verify( $data['h-captcha-response'], false ); + $this->prepare_hcaptcha_request_verify( $data['procaptcha-response'], false ); $result = Mockery::mock( WPCF7_Validation::class ); $tag = Mockery::mock( WPCF7_FormTag::class ); @@ -506,7 +506,7 @@ static function ( $name ) { ); $expected = << $src ]; ob_start(); diff --git a/.tests/php/integration/Divi/ContactTest.php b/.tests/php/integration/Divi/ContactTest.php index 1c043075..4919c215 100644 --- a/.tests/php/integration/Divi/ContactTest.php +++ b/.tests/php/integration/Divi/ContactTest.php @@ -223,7 +223,7 @@ public function test_verify() { $_POST[ $this->submit_field ] = 'submit'; - $current_form_fields = '[{"field_id":"et_pb_contact_name_0","original_id":"name","required_mark":"required","field_type":"input","field_label":"Name"},{"field_id":"et_pb_contact_email_0","original_id":"email","required_mark":"required","field_type":"email","field_label":"Email Address"},{"field_id":"et_pb_contact_message_0","original_id":"message","required_mark":"required","field_type":"text","field_label":"Message"},{"field_id":"h-captcha-response-0lwsv53iy61b","original_id":"","required_mark":"not_required","field_type":"text","field_label":""}]'; + $current_form_fields = '[{"field_id":"et_pb_contact_name_0","original_id":"name","required_mark":"required","field_type":"input","field_label":"Name"},{"field_id":"et_pb_contact_email_0","original_id":"email","required_mark":"required","field_type":"email","field_label":"Email Address"},{"field_id":"et_pb_contact_message_0","original_id":"message","required_mark":"required","field_type":"text","field_label":"Message"},{"field_id":"procaptcha-response-0lwsv53iy61b","original_id":"","required_mark":"not_required","field_type":"text","field_label":""}]'; $_POST[ $this->current_form_field ] = $current_form_fields; $expected_current_form_fields = '[{"field_id":"et_pb_contact_name_0","original_id":"name","required_mark":"required","field_type":"input","field_label":"Name"},{"field_id":"et_pb_contact_email_0","original_id":"email","required_mark":"required","field_type":"email","field_label":"Email Address"},{"field_id":"et_pb_contact_message_0","original_id":"message","required_mark":"required","field_type":"text","field_label":"Message"}]'; @@ -286,7 +286,7 @@ public function test_verify_not_verified() { $_POST[ $this->submit_field ] = 'submit'; - $current_form_fields = '[{"field_id":"et_pb_contact_name_0","original_id":"name","required_mark":"required","field_type":"input","field_label":"Name"},{"field_id":"et_pb_contact_email_0","original_id":"email","required_mark":"required","field_type":"email","field_label":"Email Address"},{"field_id":"et_pb_contact_message_0","original_id":"message","required_mark":"required","field_type":"text","field_label":"Message"},{"field_id":"h-captcha-response-0lwsv53iy61b","original_id":"","required_mark":"not_required","field_type":"text","field_label":""}]'; + $current_form_fields = '[{"field_id":"et_pb_contact_name_0","original_id":"name","required_mark":"required","field_type":"input","field_label":"Name"},{"field_id":"et_pb_contact_email_0","original_id":"email","required_mark":"required","field_type":"email","field_label":"Email Address"},{"field_id":"et_pb_contact_message_0","original_id":"message","required_mark":"required","field_type":"text","field_label":"Message"},{"field_id":"procaptcha-response-0lwsv53iy61b","original_id":"","required_mark":"not_required","field_type":"text","field_label":""}]'; $_POST[ $this->current_form_field ] = $current_form_fields; $expected_current_form_fields = '[{"field_id":"et_pb_contact_name_0","original_id":"name","required_mark":"required","field_type":"input","field_label":"Name"},{"field_id":"et_pb_contact_email_0","original_id":"email","required_mark":"required","field_type":"email","field_label":"Email Address"},{"field_id":"et_pb_contact_message_0","original_id":"message","required_mark":"required","field_type":"text","field_label":"Message"}]'; diff --git a/.tests/php/integration/ElementorPro/HCaptchaHandlerTest.php b/.tests/php/integration/ElementorPro/HCaptchaHandlerTest.php index 057b3e73..ac879eb6 100644 --- a/.tests/php/integration/ElementorPro/HCaptchaHandlerTest.php +++ b/.tests/php/integration/ElementorPro/HCaptchaHandlerTest.php @@ -125,7 +125,7 @@ public function test_init( bool $enabled ) { self::assertTrue( wp_script_is( 'elementor-hcaptcha-api', 'registered' ) ); $elementor_hcaptcha_api = wp_scripts()->registered['elementor-hcaptcha-api']; - self::assertSame( 'https://js.hcaptcha.com/1/api.js?onload=hCaptchaOnLoad&render=explicit', $elementor_hcaptcha_api->src ); + self::assertSame( 'https://js.prosopo.io/js/procaptcha.bundle.js?onload=hCaptchaOnLoad&render=explicit', $elementor_hcaptcha_api->src ); self::assertSame( [], $elementor_hcaptcha_api->deps ); self::assertSame( HCAPTCHA_VERSION, $elementor_hcaptcha_api->ver ); self::assertSame( [ 'group' => 1 ], $elementor_hcaptcha_api->extra ); @@ -468,7 +468,7 @@ public function test_validation_with_no_captcha() { $record->shouldReceive( 'remove_field' )->never(); $ajax_handler = Mockery::mock( Ajax_Handler::class ); - $ajax_handler->shouldReceive( 'add_error' )->with( $field['id'], 'Please complete the hCaptcha.' )->once(); + $ajax_handler->shouldReceive( 'add_error' )->with( $field['id'], 'Please complete the Procaptcha.' )->once(); $subject = new HCaptchaHandler(); $subject->validation( $record, $ajax_handler ); @@ -915,7 +915,7 @@ static function ( $name ) { background: transparent !important; } - .elementor-field-type-hcaptcha .h-captcha { + .elementor-field-type-hcaptcha .procaptcha { margin-bottom: unset; } CSS; diff --git a/.tests/php/integration/FluentForm/FormTest.php b/.tests/php/integration/FluentForm/FormTest.php index 0229ee7b..b5485236 100644 --- a/.tests/php/integration/FluentForm/FormTest.php +++ b/.tests/php/integration/FluentForm/FormTest.php @@ -79,7 +79,7 @@ public function test_add_captcha() { ?>
-
+
'Some error description', - 'h-captcha-response' => [ 'Please complete the hCaptcha.' ], + 'procaptcha-response' => [ 'Please complete the Procaptcha.' ], ]; $data = []; $form = Mockery::mock( FluentForm::class ); @@ -151,7 +151,7 @@ public function test_verify() { $fields = []; $response = 'some response'; $expected = $errors; - $expected['h-captcha-response'] = [ 'Please complete the hCaptcha.' ]; + $expected['procaptcha-response'] = [ 'Please complete the Procaptcha.' ]; $mock = Mockery::mock( Form::class )->makePartial(); $mock->shouldAllowMockingProtectedMethods(); diff --git a/.tests/php/integration/GravityForms/FormTest.php b/.tests/php/integration/GravityForms/FormTest.php index c15c5dc2..2ddd242a 100644 --- a/.tests/php/integration/GravityForms/FormTest.php +++ b/.tests/php/integration/GravityForms/FormTest.php @@ -390,15 +390,15 @@ static function ( $name ) { ); $expected = << $result ] ); @@ -211,7 +211,7 @@ protected function prepare_hcaptcha_request_verify( string $hcaptcha_response, $ 'pre_http_request', static function ( $preempt, $parsed_args, $url ) use ( $hcaptcha_secret_key, $hcaptcha_response, $raw_response, $ip ) { $expected_url = - 'https://api.hcaptcha.com/siteverify'; + 'https://api.prosopo.io/siteverify'; $expected_body = [ 'secret' => $hcaptcha_secret_key, 'response' => $hcaptcha_response, @@ -247,7 +247,7 @@ protected function prepare_hcaptcha_verify_post( string $nonce_field_name, strin $hcaptcha_response = 'some response'; $_POST[ $nonce_field_name ] = wp_create_nonce( $nonce_action_name ); - $_POST['h-captcha-response'] = $hcaptcha_response; + $_POST['procaptcha-response'] = $hcaptcha_response; $this->prepare_hcaptcha_request_verify( $hcaptcha_response, $result ); } diff --git a/.tests/php/integration/Mailchimp/FormTest.php b/.tests/php/integration/Mailchimp/FormTest.php index 5c8e1ba9..e34b9eeb 100644 --- a/.tests/php/integration/Mailchimp/FormTest.php +++ b/.tests/php/integration/Mailchimp/FormTest.php @@ -69,7 +69,7 @@ public function test_add_hcap_error_messages() { ], 'empty' => [ 'type' => 'error', - 'text' => 'Please complete the hCaptcha.', + 'text' => 'Please complete the Procaptcha.', ], 'fail' => [ 'type' => 'error', diff --git a/.tests/php/integration/NF/FieldTest.php b/.tests/php/integration/NF/FieldTest.php index 4d0a1e44..e2cbe581 100644 --- a/.tests/php/integration/NF/FieldTest.php +++ b/.tests/php/integration/NF/FieldTest.php @@ -56,7 +56,7 @@ public function test_validate() { public function test_validate_without_field() { $subject = new Field(); - self::assertSame( 'Please complete the hCaptcha.', $subject->validate( [], null ) ); + self::assertSame( 'Please complete the Procaptcha.', $subject->validate( [], null ) ); } /** diff --git a/.tests/php/integration/WC/LoginTest.php b/.tests/php/integration/WC/LoginTest.php index dcbe182d..fa882e8d 100644 --- a/.tests/php/integration/WC/LoginTest.php +++ b/.tests/php/integration/WC/LoginTest.php @@ -166,7 +166,7 @@ static function ( $name ) { ); $expected = <<verify( $commentdata ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing - self::assertFalse( isset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ) ); + self::assertFalse( isset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ) ); self::assertNull( $this->get_protected_property( $subject, 'result' ) ); } @@ -252,7 +252,7 @@ public function est_verify_not_verified_in_admin() { public function est_verify_do_not_need_to_verify_not_admin() { $approved = 1; $commentdata = [ 'some comment data' ]; - $expected = new WP_Error( 'invalid_hcaptcha', 'hCaptcha error: Please complete the hCaptcha.', 400 ); + $expected = new WP_Error( 'invalid_hcaptcha', 'hCaptcha error: Please complete the Procaptcha.', 400 ); $subject = new Comment(); diff --git a/.tests/php/integration/WPDiscuz/CommentTest.php b/.tests/php/integration/WPDiscuz/CommentTest.php index 38fe3366..2b2a1211 100644 --- a/.tests/php/integration/WPDiscuz/CommentTest.php +++ b/.tests/php/integration/WPDiscuz/CommentTest.php @@ -27,7 +27,7 @@ class CommentTest extends HCaptchaWPTestCase { * @noinspection PhpUndefinedClassInspection */ public function tearDown(): void { // phpcs:ignore PHPCompatibility.FunctionDeclarations.NewReturnTypeDeclarations.voidFound - unset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ); + unset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ); } /** @@ -136,7 +136,7 @@ public function test_verify_NOT_verified() { $hcaptcha_response = 'some response'; $die_arr = []; $expected = [ - 'Please complete the hCaptcha.', + 'Please complete the Procaptcha.', '', [], ]; @@ -149,7 +149,7 @@ public function test_verify_NOT_verified() { $this->prepare_hcaptcha_request_verify( $hcaptcha_response, false ); - unset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ); + unset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ); add_filter( 'wp_die_handler', @@ -165,7 +165,7 @@ static function ( $name ) use ( &$die_arr ) { $subject->verify( $comment_data ); // phpcs:ignore WordPress.Security.NonceVerification.Missing - self::assertFalse( isset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ) ); + self::assertFalse( isset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ) ); self::assertSame( $expected, $die_arr ); self::assertFalse( has_filter( 'preprocess_comment', [ $wp_discuz, 'validateRecaptcha' ] ) ); } @@ -176,7 +176,7 @@ static function ( $name ) use ( &$die_arr ) { * @return void */ public function test_print_inline_styles() { - $expected = '.wpd-field-hcaptcha .h-captcha{margin-left:auto}'; + $expected = '.wpd-field-hcaptcha .procaptcha{margin-left:auto}'; $expected = "\n"; $subject = new Comment(); diff --git a/.tests/php/integration/WPDiscuz/SubscribeTest.php b/.tests/php/integration/WPDiscuz/SubscribeTest.php index 8068b596..2ca88fe6 100644 --- a/.tests/php/integration/WPDiscuz/SubscribeTest.php +++ b/.tests/php/integration/WPDiscuz/SubscribeTest.php @@ -27,7 +27,7 @@ class SubscribeTest extends HCaptchaWPTestCase { * @noinspection PhpUndefinedClassInspection */ public function tearDown(): void { // phpcs:ignore PHPCompatibility.FunctionDeclarations.NewReturnTypeDeclarations.voidFound - unset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ); + unset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ); } /** @@ -115,7 +115,7 @@ public function test_verify() { $subject->verify(); // phpcs:ignore WordPress.Security.NonceVerification.Missing - self::assertFalse( isset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ) ); + self::assertFalse( isset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ) ); } /** @@ -134,7 +134,7 @@ public function test_verify_NOT_verified() { $this->prepare_hcaptcha_request_verify( $hcaptcha_response, false ); - unset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ); + unset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ); add_filter( 'wp_doing_ajax', '__return_true' ); add_filter( @@ -152,10 +152,10 @@ static function () use ( &$die_arr ) { $subject->verify(); - self::assertSame( '{"success":false,"data":"Please complete the hCaptcha."}', ob_get_clean() ); + self::assertSame( '{"success":false,"data":"Please complete the Procaptcha."}', ob_get_clean() ); // phpcs:ignore WordPress.Security.NonceVerification.Missing - self::assertFalse( isset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ) ); + self::assertFalse( isset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ) ); self::assertSame( $expected, $die_arr ); } @@ -165,7 +165,7 @@ static function () use ( &$die_arr ) { * @return void */ public function test_print_inline_styles() { - $expected = '#wpdiscuz-subscribe-form .h-captcha{margin-top:5px;margin-left:auto}'; + $expected = '#wpdiscuz-subscribe-form .procaptcha{margin-top:5px;margin-left:auto}'; $expected = "\n"; $subject = new Subscribe(); diff --git a/.tests/php/integration/WPForms/FormTest.php b/.tests/php/integration/WPForms/FormTest.php index e5b6c896..874f943b 100644 --- a/.tests/php/integration/WPForms/FormTest.php +++ b/.tests/php/integration/WPForms/FormTest.php @@ -242,7 +242,7 @@ static function ( $name ) { ); $expected = <<prepare_hcaptcha_verify_post( $nonce_field_name, $nonce_action_name, null ); - self::assertSame( 'Please complete the hCaptcha.', hcaptcha_verify_post( $nonce_field_name, $nonce_action_name ) ); + self::assertSame( 'Please complete the Procaptcha.', hcaptcha_verify_post( $nonce_field_name, $nonce_action_name ) ); } /** @@ -286,7 +286,7 @@ public function test_hcaptcha_verify_POST_not_verified_logged_in() { $nonce_action_name = 'some nonce action'; $_POST[ $nonce_field_name ] = 'wrong nonce'; - $_POST['h-captcha-response'] = 'some response'; + $_POST['procaptcha-response'] = 'some response'; wp_set_current_user( 1 ); @@ -332,7 +332,7 @@ public function test_hcaptcha_get_verify_output_not_validated_empty_POST() { $this->prepare_hcaptcha_verify_post( $nonce_field_name, $nonce_action_name, null ); - self::assertSame( 'Please complete the hCaptcha.', hcaptcha_get_verify_output( $empty_message, $fail_message, $nonce_field_name, $nonce_action_name ) ); + self::assertSame( 'Please complete the Procaptcha.', hcaptcha_get_verify_output( $empty_message, $fail_message, $nonce_field_name, $nonce_action_name ) ); } /** @@ -368,7 +368,7 @@ public function test_hcaptcha_get_verify_message_not_validated_empty_POST() { $this->prepare_hcaptcha_get_verify_message( $nonce_field_name, $nonce_action_name, null ); - self::assertSame( 'Please complete the hCaptcha.', hcaptcha_get_verify_message( $nonce_field_name, $nonce_action_name ) ); + self::assertSame( 'Please complete the Procaptcha.', hcaptcha_get_verify_message( $nonce_field_name, $nonce_action_name ) ); } /** @@ -407,6 +407,6 @@ public function test_hcaptcha_get_verify_message_html_not_validated_empty_POST() $this->prepare_hcaptcha_get_verify_message_html( $nonce_field_name, $nonce_action_name, null ); - self::assertSame( 'hCaptcha error: Please complete the hCaptcha.', hcaptcha_get_verify_message_html( $nonce_field_name, $nonce_action_name ) ); + self::assertSame( 'hCaptcha error: Please complete the Procaptcha.', hcaptcha_get_verify_message_html( $nonce_field_name, $nonce_action_name ) ); } } diff --git a/.tests/php/unit/HCaptchaTestCase.php b/.tests/php/unit/HCaptchaTestCase.php index 8fe3a021..92569ade 100644 --- a/.tests/php/unit/HCaptchaTestCase.php +++ b/.tests/php/unit/HCaptchaTestCase.php @@ -557,11 +557,11 @@ protected function get_test_general_form_fields(): array { /* translators: 1: hCaptcha Pro link, 2: hCaptcha Enterprise link. */ 'Note: only works on hCaptcha %1$s and %2$s site keys.', sprintf( - '%s', + '%s', 'Pro' ), sprintf( - '%s', + '%s', 'Enterprise' ) ), @@ -587,7 +587,7 @@ protected function get_test_general_form_fields(): array { /* translators: 1: hCaptcha render params doc link. */ 'hCaptcha render %s (optional). Must be a valid JSON.', sprintf( - '%s', + '%s', 'parameters' ) ), @@ -596,7 +596,7 @@ protected function get_test_general_form_fields(): array { 'label' => 'API Host', 'type' => 'text', 'section' => 'enterprise', - 'default' => 'js.hcaptcha.com', + 'default' => 'js.prosopo.io', 'helper' => 'See Enterprise docs.', ], 'asset_host' => [ @@ -639,7 +639,7 @@ protected function get_test_general_form_fields(): array { 'label' => 'Backend', 'type' => 'text', 'section' => 'enterprise', - 'default' => 'api.hcaptcha.com', + 'default' => 'api.prosopo.io', 'helper' => 'See Enterprise docs.', ], 'off_when_logged_in' => [ diff --git a/.tests/php/unit/Settings/Abstracts/SettingsBaseTest.php b/.tests/php/unit/Settings/Abstracts/SettingsBaseTest.php index 80e095a9..c1ec355b 100644 --- a/.tests/php/unit/Settings/Abstracts/SettingsBaseTest.php +++ b/.tests/php/unit/Settings/Abstracts/SettingsBaseTest.php @@ -520,7 +520,7 @@ public function test_admin_enqueue_scripts() { * Test admin_enqueue_base_scripts(). */ public function test_base_admin_enqueue_scripts() { - $plugin_url = 'http://test.test/wp-content/plugins/hcaptcha-for-forms-and-more'; + $plugin_url = 'http://test.test/wp-content/plugins/procaptcha-wordpress'; $plugin_version = '1.0.0'; $page = Mockery::mock( SettingsBase::class ); @@ -566,7 +566,7 @@ public function test_base_admin_enqueue_scripts() { * Test admin_enqueue_base_scripts() when not options screen. */ public function test_base_admin_enqueue_scripts_when_not_options_screen() { - $plugin_url = 'http://test.test/wp-content/plugins/hcaptcha-for-forms-and-more'; + $plugin_url = 'http://test.test/wp-content/plugins/procaptcha-wordpress'; $plugin_version = '1.0.0'; $subject = Mockery::mock( SettingsBase::class )->makePartial(); @@ -2265,8 +2265,8 @@ public function dp_test_pre_update_option_filter(): array { * Test load_plugin_textdomain(). */ public function test_load_plugin_text_domain() { - $text_domain = 'hcaptcha-for-forms-and-more'; - $plugin_base_name = 'hcaptcha-for-forms-and-more/hcaptcha.php'; + $text_domain = 'procaptcha-wordpress'; + $plugin_base_name = 'procaptcha-wordpress/hcaptcha.php'; $subject = Mockery::mock( SettingsBase::class )->makePartial(); $subject->shouldAllowMockingProtectedMethods(); diff --git a/.tests/php/unit/Settings/GeneralTest.php b/.tests/php/unit/Settings/GeneralTest.php index 458d05fb..1d4d285f 100644 --- a/.tests/php/unit/Settings/GeneralTest.php +++ b/.tests/php/unit/Settings/GeneralTest.php @@ -40,7 +40,7 @@ class GeneralTest extends HCaptchaTestCase { * @return void */ public function tearDown(): void { // phpcs:ignore PHPCompatibility.FunctionDeclarations.NewReturnTypeDeclarations.voidFound - unset( $_POST['mode'], $_POST['siteKey'], $_POST['secretKey'], $_POST['h-captcha-response'], $_POST['section'], $_POST['status'] ); + unset( $_POST['mode'], $_POST['siteKey'], $_POST['secretKey'], $_POST['procaptcha-response'], $_POST['section'], $_POST['status'] ); parent::tearDown(); } @@ -69,7 +69,7 @@ public function test_section_title() { * Test init_hooks(). */ public function test_init_hooks() { - $plugin_base_name = 'hcaptcha-for-forms-and-more/hcaptcha.php'; + $plugin_base_name = 'procaptcha-wordpress/hcaptcha.php'; $option_name = 'hcaptcha_settings'; $hcaptcha = Mockery::mock( Main::class )->makePartial(); $subject = Mockery::mock( General::class )->makePartial(); @@ -273,7 +273,7 @@ public function dp_test_section_callback(): array { General::SECTION_CUSTOM, '

- Custom - hCaptcha Pro Required + Custom - Procaptcha Pro Required

@@ -283,7 +283,7 @@ public function dp_test_section_callback(): array { General::SECTION_ENTERPRISE, '

- Enterprise - hCaptcha Enterprise Required + Enterprise - Procaptcha Enterprise Required

@@ -411,7 +411,7 @@ static function ( $name ) use ( $plugin_url, $plugin_version ) { 'modeTestEnterpriseBotDetectedSiteKey' => General::MODE_TEST_ENTERPRISE_BOT_DETECTED_SITE_KEY, 'checkConfigNotice' => $check_config_notice, 'checkingConfigMsg' => 'Checking site config...', - 'completeHCaptchaTitle' => 'Please complete the hCaptcha.', + 'completeHCaptchaTitle' => 'Please complete the Procaptcha.', 'completeHCaptchaContent' => 'Before checking the site config, please complete the Active hCaptcha in the current section.', 'OKBtnText' => 'OK', ] @@ -513,7 +513,7 @@ public function test_check_config() { $_POST['mode'] = $ajax_mode; $_POST['siteKey'] = $ajax_site_key; $_POST['secretKey'] = $ajax_secret_key; - $_POST['h-captcha-response'] = $hcaptcha_response; + $_POST['procaptcha-response'] = $hcaptcha_response; $subject->shouldAllowMockingProtectedMethods(); $subject->shouldReceive( 'update_option' )->with( 'license', $license )->once(); diff --git a/.tests/php/unit/Settings/IntegrationsTest.php b/.tests/php/unit/Settings/IntegrationsTest.php index 7f14d6d8..1a30493c 100644 --- a/.tests/php/unit/Settings/IntegrationsTest.php +++ b/.tests/php/unit/Settings/IntegrationsTest.php @@ -216,7 +216,7 @@ public function dp_test_section_callback(): array {

You can activate and deactivate a plugin by clicking on its logo.

- Don\'t see your plugin here? Use the `[hcaptcha]` shortcode or request an integration.

+ Don\'t see your plugin here? Use the `[hcaptcha]` shortcode or request an integration.

Active plugins and themes

', ], diff --git a/.tests/php/unit/Settings/PluginSettingsBaseTest.php b/.tests/php/unit/Settings/PluginSettingsBaseTest.php index d1c91da2..53face8d 100644 --- a/.tests/php/unit/Settings/PluginSettingsBaseTest.php +++ b/.tests/php/unit/Settings/PluginSettingsBaseTest.php @@ -180,7 +180,7 @@ public function test_text_domain() { $subject = Mockery::mock( PluginSettingsBase::class )->makePartial()->shouldAllowMockingProtectedMethods(); $method = 'text_domain'; - self::assertSame( 'hcaptcha-for-forms-and-more', $subject->$method() ); + self::assertSame( 'procaptcha-wordpress', $subject->$method() ); } /** @@ -298,7 +298,7 @@ public function test_admin_footer_text() { $subject = Mockery::mock( PluginSettingsBase::class )->makePartial(); $method = 'admin_footer_text'; $text = 'Some text'; - $expected = 'Please rate hCaptcha for WordPress ★★★★★ on WordPress.org. Thank you!'; + $expected = 'Please rate Procaptcha for WordPress ★★★★★ on WordPress.org. Thank you!'; $subject->shouldAllowMockingProtectedMethods(); $subject->shouldReceive( 'is_options_screen' )->with( [] )->andReturn( true ); diff --git a/.tests/php/unit/Settings/SystemInfoTest.php b/.tests/php/unit/Settings/SystemInfoTest.php index 15d2ccaf..32c1d00c 100644 --- a/.tests/php/unit/Settings/SystemInfoTest.php +++ b/.tests/php/unit/Settings/SystemInfoTest.php @@ -228,7 +228,7 @@ public function test_get_system_info() { 'Version' => '5.9.3', ], 'hcaptcha-wordpress-plugin/hcaptcha.php' => [ - 'Name' => 'hCaptcha for WordPress', + 'Name' => 'Procaptcha for WordPress', 'Version' => '3.10.1', ], 'woocommerce/woocommerce.php' => [ @@ -485,7 +485,7 @@ public function test_get_system_info() { -- WordPress Active Plugins -- Contact Form 7: 5.9.3 -hCaptcha for WordPress: 3.10.1 +Procaptcha for WordPress: 3.10.1 -- WordPress Inactive Plugins -- diff --git a/.yarnrc.yml b/.yarnrc.yml index 91b1101f..53da0a35 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -3,3 +3,5 @@ compressionLevel: mixed enableGlobalCache: false nodeLinker: node-modules + +yarnPath: .yarn/releases/yarn-4.1.1.cjs diff --git a/MAINTAINERS.md b/MAINTAINERS.md index a8d4f52a..cfdc062b 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -14,4 +14,4 @@ This relies on repo secrets SVN_USERNAME and SVN_PASSWORD; if wp.org credentials ## Creating translations -The easiest way is to [create translations online](https://translate.wordpress.org/projects/wp-plugins/hcaptcha-for-forms-and-more/). Such translations are loaded automatically by the plugin via WordPress Core and require no further amendments to the plugin code. +The easiest way is to [create translations online](https://translate.wordpress.org/projects/wp-plugins/procaptcha-wordpress/). Such translations are loaded automatically by the plugin via WordPress Core and require no further amendments to the plugin code. diff --git a/README.md b/README.md index 1a9df517..982ad143 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# hCaptcha for WordPress +# Procaptcha for WordPress ![Build Status](https://github.com/hCaptcha/hcaptcha-wordpress-plugin/actions/workflows/ci.yml/badge.svg?branch=master) @@ -32,7 +32,7 @@ yarn yarn dev ``` -1. Sign up at [hCaptcha.com](https://www.hcaptcha.com/) to get a site key and secret. +1. Sign up at [hCaptcha.com](https://www.prosopo.io/) to get a site key and secret. 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Enter your Site Key and SECRET in the Settings -> hCaptcha menu in WordPress 4. Enable desired Integrations @@ -58,11 +58,11 @@ composer unit ## Frequently Asked Questions Q: Where can I get more information about hCaptcha? -A: Please see our website at: https://www.hcaptcha.com/ +A: Please see our website at: https://www.prosopo.io/ ## Screenshots -See the [official plugin page on wordpress.org](https://wordpress.org/plugins/hcaptcha-for-forms-and-more/). +See the [official plugin page on wordpress.org](https://wordpress.org/plugins/procaptcha-wordpress/). ## Credits diff --git a/assets/css/general.css b/assets/css/general.css index d720c9d0..9c624989 100644 --- a/assets/css/general.css +++ b/assets/css/general.css @@ -23,7 +23,7 @@ position: relative; } -#hcaptcha-options .h-captcha { +#hcaptcha-options .procaptcha { margin-bottom: 0; } @@ -384,3 +384,5 @@ h3.closed .hcaptcha-section-header-toggle:after { grid-area: unset !important; } } + +.procaptcha input:before, .procaptcha input:after { content: none !important; } diff --git a/assets/css/settings-base.css b/assets/css/settings-base.css index 02f55ccb..2bd1b5cc 100644 --- a/assets/css/settings-base.css +++ b/assets/css/settings-base.css @@ -66,28 +66,12 @@ body.settings_page_hcaptcha { #hcaptcha-options table tr td input[type="checkbox"] { display: inline; - border: none; box-shadow: none; - width: 2.3611rem; + width: 1.25rem; height: 1.25rem; margin: -0.125rem 0.5rem 0 0; } -#hcaptcha-options table tr td input[type="checkbox"]::before { - background: url('../images/checkbox-off.svg'); - background-size: cover; - margin: 0; - width: 2.3611rem; - height: 1.25rem; - content: ''; - display: inline-block; -} - -#hcaptcha-options table tr td input[type="checkbox"]:checked::before { - background: no-repeat url('../images/checkbox-on.svg'); - background-size: cover; -} - #hcaptcha-options fieldset:disabled { color: #dadada; } diff --git a/assets/css/wpforms.css b/assets/css/wpforms.css new file mode 100644 index 00000000..abd915dd --- /dev/null +++ b/assets/css/wpforms.css @@ -0,0 +1,16 @@ +.procaptcha > div > div > div.css-1qvfrk6 > div > div > div > div:nth-child(1) > div > div > div:nth-child(2) > div > div{ + margin-top: 0px; + margin-left: 15px; + margin-right: 15px; + width: 2em; + height: 2em; + border-width: 4px; + border-style: solid; + border-color: rgb(0, 0, 0) rgb(0, 0, 0) transparent; + border-image: initial; + border-radius: 50%; +} + +.procaptcha > div > div > div.css-1qvfrk6 > div > div > div > div:nth-child(2) > a > div > div > div { + padding: 8px; +} diff --git a/assets/images/checkbox-off.svg b/assets/images/checkbox-off.svg deleted file mode 100644 index 472bb97d..00000000 --- a/assets/images/checkbox-off.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/assets/images/checkbox-on.svg b/assets/images/checkbox-on.svg deleted file mode 100644 index e840aa95..00000000 --- a/assets/images/checkbox-on.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/assets/images/notification-bell.svg b/assets/images/notification-bell.svg index 8838c2b4..fc4ef706 100644 --- a/assets/images/notification-bell.svg +++ b/assets/images/notification-bell.svg @@ -1,36 +1,12 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/procaptcha-logo.svg b/assets/images/procaptcha-logo.svg new file mode 100644 index 00000000..86436eda --- /dev/null +++ b/assets/images/procaptcha-logo.svg @@ -0,0 +1 @@ +Prosopo Logo Black \ No newline at end of file diff --git a/assets/js/admin-nf.js b/assets/js/admin-nf.js index 8913cf7f..4d14399d 100644 --- a/assets/js/admin-nf.js +++ b/assets/js/admin-nf.js @@ -106,8 +106,8 @@ document.addEventListener( 'DOMContentLoaded', function() { for ( const mutation of mutationList ) { [ ...mutation.addedNodes ].map( ( node ) => { if ( - document.querySelector( '.h-captcha' ) && - ! document.querySelector( '.h-captcha iframe' ) + document.querySelector( '.procaptcha' ) && + ! document.querySelector( '.procaptcha iframe' ) ) { window.hCaptchaBindEvents(); } diff --git a/assets/js/general.js b/assets/js/general.js index ee7f6220..89ca9a54 100644 --- a/assets/js/general.js +++ b/assets/js/general.js @@ -197,7 +197,7 @@ const general = function( $ ) { const updatedParams = Object.assign( hCaptcha.getParams(), params ); hCaptcha.setParams( updatedParams ); - const sampleHCaptcha = document.querySelector( '#hcaptcha-options .h-captcha' ); + const sampleHCaptcha = document.querySelector( '#hcaptcha-options .procaptcha' ); sampleHCaptcha.innerHTML = ''; for ( const key in params ) { @@ -252,7 +252,7 @@ const general = function( $ ) { if ( ! $customThemes.prop( 'checked' ) ) { configParams = { - sitekey: $siteKey.val(), + siteKey: $siteKey.val(), theme: $theme.val(), size: $size.val(), hl: $language.val(), @@ -272,7 +272,7 @@ const general = function( $ ) { mode: $mode.val(), siteKey: $siteKey.val(), secretKey: $secretKey.val(), - 'h-captcha-response': $( 'textarea[name="h-captcha-response"]' ).val(), + 'procaptcha-response': $( 'input[name="procaptcha-response"]' ).val(), }; // noinspection JSVoidFunctionReturnValueUsed,JSCheckFunctionSignatures @@ -304,8 +304,12 @@ const general = function( $ ) { } function checkChangeCredentials() { - if ( $siteKey.val() === siteKeyInitVal && $secretKey.val() === secretKeyInitVal ) { - credentialsChanged = false; + console.log("$siteKey.val()", $siteKey.val(), "siteKeyInitVal", siteKeyInitVal) + console.log("$secretKey.val()", $secretKey.val(), "secretKeyInitVal", secretKeyInitVal) + console.log("credentialsChanged", credentialsChanged) + if ( $siteKey.val() !== siteKeyInitVal || $secretKey.val() !== secretKeyInitVal ) { + console.log("value changed, setting disabled to false") + credentialsChanged = true; clearMessage(); $submit.attr( 'disabled', false ); } else if ( ! credentialsChanged ) { @@ -333,9 +337,10 @@ const general = function( $ ) { $checkConfig.on( 'click', function( event ) { event.preventDefault(); - + console.log("$( 'input[name=\"procaptcha-response\"]' )", $( 'input[name="procaptcha-response"]' ).length) // Check if hCaptcha is solved. - if ( $( '.hcaptcha-general-sample-hcaptcha iframe' ).attr( 'data-hcaptcha-response' ) === '' ) { + if ( $( 'input[name="procaptcha-response"]' ).length === 0 ) { + console.log("procaptcha is not solved") kaggDialog.confirm( { title: HCaptchaGeneralObject.completeHCaptchaTitle, content: HCaptchaGeneralObject.completeHCaptchaContent, @@ -350,14 +355,14 @@ const general = function( $ ) { return; } - + console.log("checkConfig") checkConfig(); } ); $siteKey.on( 'change', function( e ) { - const sitekey = $( e.target ).val(); + const siteKey = $( e.target ).val(); - hCaptchaUpdate( { sitekey } ); + hCaptchaUpdate( { siteKey } ); checkChangeCredentials(); } ); @@ -403,8 +408,8 @@ const general = function( $ ) { $secretKey.attr( 'disabled', true ); } - const sitekey = modes[ mode ]; - hCaptchaUpdate( { sitekey } ); + const siteKey = modes[ mode ]; + hCaptchaUpdate( { siteKey } ); } ); $customThemes.on( 'change', function() { @@ -430,7 +435,7 @@ const general = function( $ ) { function scriptUpdate() { const params = { - onload: 'hCaptchaOnLoad', + onload: 'procaptchaOnLoad', render: 'explicit', }; @@ -465,8 +470,8 @@ const general = function( $ ) { * @param enterpriseValues.api_host */ let apiHost = enterpriseValues.api_host.trim(); - apiHost = apiHost ? apiHost : 'js.hcaptcha.com'; - apiHost = forceHttps( apiHost ) + '/1/api.js'; + apiHost = apiHost ? apiHost : 'js.prosopo.io'; + apiHost = forceHttps( apiHost ) + '/js/procaptcha.bundle.js'; const url = new URL( apiHost ); @@ -475,19 +480,19 @@ const general = function( $ ) { } // Remove the existing API script. - document.getElementById( 'hcaptcha-api' ).remove(); - delete global.hcaptcha; + document.getElementById( 'procaptcha-api' ).remove(); + delete global.procaptcha; // Remove sample hCaptcha. - const sampleHCaptcha = document.querySelector( '#hcaptcha-options .h-captcha' ); + const sampleHCaptcha = document.querySelector( '#hcaptcha-options .procaptcha' ); sampleHCaptcha.innerHTML = ''; // Re-create the API script. const t = document.getElementsByTagName( 'head' )[ 0 ]; const s = document.createElement( 'script' ); - s.type = 'text/javascript'; - s.id = 'hcaptcha-api'; + s.type = 'module'; + s.id = 'procaptcha-api'; s.src = url.href; t.appendChild( s ); diff --git a/assets/js/hcaptcha-fluentform.js b/assets/js/hcaptcha-fluentform.js index ab94be6c..cbeed618 100644 --- a/assets/js/hcaptcha-fluentform.js +++ b/assets/js/hcaptcha-fluentform.js @@ -144,7 +144,7 @@ window.fetch = async ( ...args ) => { // @param {FormData} body const body = config.body; const formId = body.get( 'form_id' ); - const inputName = 'h-captcha-response'; + const inputName = 'procaptcha-response'; const widgetName = 'hcaptcha-widget-id'; let data = body.get( 'data' ); diff --git a/assets/js/hcaptcha-helper.js b/assets/js/hcaptcha-helper.js index 3e878e1d..3cac1a06 100644 --- a/assets/js/hcaptcha-helper.js +++ b/assets/js/hcaptcha-helper.js @@ -6,13 +6,13 @@ export class helper { return; } - let response = $node.find( '[name="h-captcha-response"]' ).val(); + let response = $node.find( '[name="procaptcha-response"]' ).val(); response = response ? response : ''; let id = $node.find( '[name="hcaptcha-widget-id"]' ).val(); id = id ? id : ''; let nonce = $node.find( '[name="' + nonceName + '"]' ).val(); nonce = nonce ? nonce : ''; options.data += - '&h-captcha-response=' + response + '&hcaptcha-widget-id=' + id + '&' + nonceName + '=' + nonce; + '&procaptcha-response=' + response + '&hcaptcha-widget-id=' + id + '&' + nonceName + '=' + nonce; } } diff --git a/assets/js/hcaptcha-mailpoet.js b/assets/js/hcaptcha-mailpoet.js index c6d7a7ba..163624aa 100644 --- a/assets/js/hcaptcha-mailpoet.js +++ b/assets/js/hcaptcha-mailpoet.js @@ -17,13 +17,13 @@ const urlParams = new URLSearchParams( data ); const formId = urlParams.get( 'data[form_id]' ); const $form = $( 'input[name="data[form_id]"][value=' + formId + ']' ).parent( 'form' ); - let response = $form.find( '[name="h-captcha-response"]' ).val(); + let response = $form.find( '[name="procaptcha-response"]' ).val(); response = response ? response : ''; let id = $form.find( '[name="hcaptcha-widget-id"]' ).val(); id = id ? id : ''; let nonce = $form.find( '[name="' + nonceName + '"]' ).val(); nonce = nonce ? nonce : ''; options.data += - '&h-captcha-response=' + response + '&hcaptcha-widget-id=' + id + '&' + nonceName + '=' + nonce; + '&procaptcha-response=' + response + '&hcaptcha-widget-id=' + id + '&' + nonceName + '=' + nonce; } ); }( jQuery ) ); diff --git a/assets/js/hcaptcha-nf.js b/assets/js/hcaptcha-nf.js index 9374cca2..17f97102 100644 --- a/assets/js/hcaptcha-nf.js +++ b/assets/js/hcaptcha-nf.js @@ -45,7 +45,7 @@ document.addEventListener( 'DOMContentLoaded', function() { ); } else { const fieldId = model.get( 'id' ); - const widget = document.querySelector( '.h-captcha[data-fieldId="' + fieldId + '"] iframe' ); + const widget = document.querySelector( '.procaptcha[data-fieldId="' + fieldId + '"] iframe' ); if ( ! widget ) { return; diff --git a/assets/js/hcaptcha-otter.js b/assets/js/hcaptcha-otter.js index b2e3e338..3053b7b2 100644 --- a/assets/js/hcaptcha-otter.js +++ b/assets/js/hcaptcha-otter.js @@ -21,7 +21,7 @@ window.fetch = async ( ...args ) => { * @param {string} formData.payload.formId */ const body = config.body; - const inputName = 'h-captcha-response'; + const inputName = 'procaptcha-response'; const widgetName = 'hcaptcha-widget-id'; const nonceName = 'hcaptcha_otter_nonce'; const formData = JSON.parse( body.get( 'form_data' ) ); diff --git a/assets/js/hcaptcha-simple-download-monitor.js b/assets/js/hcaptcha-simple-download-monitor.js index 2c81799f..4ceb86a9 100644 --- a/assets/js/hcaptcha-simple-download-monitor.js +++ b/assets/js/hcaptcha-simple-download-monitor.js @@ -7,9 +7,9 @@ let location = e.target.href; const $item = $( e.target ).closest( 'div.sdm_download_item ' ); const nonce = $item.find( '#hcaptcha_simple_download_monitor_nonce' ).val(); - const response = $item.find( '[name="h-captcha-response"]' ).val(); + const response = $item.find( '[name="procaptcha-response"]' ).val(); - location += '&hcaptcha_simple_download_monitor_nonce=' + nonce + '&h-captcha-response=' + response; + location += '&hcaptcha_simple_download_monitor_nonce=' + nonce + '&procaptcha-response=' + response; window.location.href = location; } ); diff --git a/assets/js/hcaptcha-spectra.js b/assets/js/hcaptcha-spectra.js index a13332db..357697bc 100644 --- a/assets/js/hcaptcha-spectra.js +++ b/assets/js/hcaptcha-spectra.js @@ -7,7 +7,7 @@ window.fetch = async ( ...args ) => { // @param {FormData} body const body = config.body; const blockId = body.get( 'block_id' ); - const inputName = 'h-captcha-response'; + const inputName = 'procaptcha-response'; const widgetName = 'hcaptcha-widget-id'; const nonceName = 'hcaptcha_spectra_form_nonce'; const formData = JSON.parse( body.get( 'form_data' ) ); diff --git a/changelog.txt b/changelog.txt index 5ab3b806..bdb21d72 100644 --- a/changelog.txt +++ b/changelog.txt @@ -323,7 +323,7 @@ * Added Sendinblue support. * Added Download Manager support. * Added support for password-protected post/page. -* Added actual messages from hcaptcha.com. +* Added actual messages from prosopo.io. * Added support for Multipage Gravity Form. * Fixed error messaging in Ninja Forms. * Fixed 'hcaptcha is not defined' issue with Elementor. diff --git a/composer.json b/composer.json index 6378f89d..cce0058e 100644 --- a/composer.json +++ b/composer.json @@ -5,9 +5,14 @@ "keywords": [ "hcaptcha" ], - "homepage": "https://wordpress.org/plugins/hcaptcha-for-forms-and-more/", + "homepage": "https://wordpress.org/plugins/procaptcha-wordpress/", "type": "wordpress-plugin", "authors": [ + { + "name": "Prosopo", + "email": "hello@prosopo.io", + "homepage": "https://prosopo.io/" + }, { "name": "hCaptcha", "homepage": "https://hCaptcha.com/" @@ -19,7 +24,7 @@ } ], "support": { - "issues": "https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more" + "issues": "https://wordpress.org/support/plugin/procaptcha-wordpress" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/docker/docker-compose.wordpress.yml b/docker/docker-compose.wordpress.yml new file mode 100644 index 00000000..f9fb4e91 --- /dev/null +++ b/docker/docker-compose.wordpress.yml @@ -0,0 +1,35 @@ +version: '3.1' + +services: + + wordpress: + image: prosopo/wordpress:latest + build: + context: . + dockerfile: ./wordpress.dockerfile + restart: always + ports: + - 8080:80 + environment: + WORDPRESS_DB_HOST: db + WORDPRESS_DB_USER: procaptcha + WORDPRESS_DB_PASSWORD: procaptchapass + WORDPRESS_DB_NAME: procaptchadb + volumes: + - ../../wordpress:/var/www/html + - ./wordpress.ini:/usr/local/etc/php/conf.d/wordpress.ini + + db: + image: mysql:5.7 + restart: always + environment: + MYSQL_DATABASE: procaptchadb + MYSQL_USER: procaptcha + MYSQL_PASSWORD: procaptchapass + MYSQL_RANDOM_ROOT_PASSWORD: '1' + volumes: + - db:/var/lib/mysql + +volumes: + wordpress: + db: diff --git a/docker/wordpress.dockerfile b/docker/wordpress.dockerfile new file mode 100644 index 00000000..f424543d --- /dev/null +++ b/docker/wordpress.dockerfile @@ -0,0 +1,7 @@ +FROM wordpress:latest + +RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar +RUN php wp-cli.phar --info +RUN chmod +x wp-cli.phar +RUN mv wp-cli.phar /usr/local/bin/wp +RUN wp --info diff --git a/docker/wordpress.ini b/docker/wordpress.ini new file mode 100644 index 00000000..e52f6097 --- /dev/null +++ b/docker/wordpress.ini @@ -0,0 +1,6 @@ +file_uploads = On +memory_limit = 256M +upload_max_filesize = 64M +post_max_size = 64M +max_execution_time = 300 +max_input_time = 1000 diff --git a/hcaptcha.php b/hcaptcha.php index c4911284..d6154c45 100644 --- a/hcaptcha.php +++ b/hcaptcha.php @@ -1,23 +1,23 @@ \n" -"Language-Team: hCaptcha team\n" +"Language-Team: Procaptcha team\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -16,7 +16,7 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" #: Admin/Notifications.php:90 -msgid "Get your hCaptcha site keys" +msgid "Get your Procaptcha site keys" msgstr "" #: Admin/Notifications.php:93 @@ -27,7 +27,7 @@ msgstr "" #: Admin/Notifications.php:97 ElementorPro/HCaptchaHandler.php:362 #: NF/Field.php:76 Settings/PluginSettingsBase.php:42 UM/Base.php:146 #: UM/Base.php:149 -msgid "hCaptcha" +msgid "Procaptcha" msgstr "" #: Admin/Notifications.php:102 @@ -48,7 +48,7 @@ msgid "Want low friction and custom themes? %1$s is for you. %2$s, no credit car msgstr "" #: Admin/Notifications.php:118 -msgid "hCaptcha Pro" +msgid "Procaptcha Pro" msgstr "" #: Admin/Notifications.php:123 @@ -60,11 +60,11 @@ msgid "Try Pro" msgstr "" #: Admin/Notifications.php:132 -msgid "hCaptcha's Leadership" +msgid "Procaptcha's Leadership" msgstr "" #: Admin/Notifications.php:133 -msgid "hCaptcha Named a Technology Leader in Bot Management: 2023 SPARK Matrix™" +msgid "Procaptcha Named a Technology Leader in Bot Management: 2023 SPARK Matrix™" msgstr "" #: Admin/Notifications.php:136 @@ -86,40 +86,40 @@ msgid "You are not allowed to perform this action." msgstr "" #: DownloadManager/DownloadManager.php:104 -msgid "hCaptcha error" +msgid "Procaptcha error" msgstr "" #: ElementorPro/HCaptchaHandler.php:169 -msgid "To use hCaptcha, you need to add the Site and Secret keys." +msgid "To use Procaptcha, you need to add the Site and Secret keys." msgstr "" #: GravityForms/Field.php:117 -msgid "Adds a hCaptcha field to your form to help protect your website from spam and bot abuse." +msgid "Adds a Procaptcha field to your form to help protect your website from spam and bot abuse." msgstr "" #: GravityForms/Field.php:122 -msgid "hCaptcha settings must be modified on the hCaptcha plugin General settings page." +msgid "Procaptcha settings must be modified on the Procaptcha plugin General settings page." msgstr "" #: GravityForms/Field.php:236 -msgid "Only one hCaptcha field can be added to the form." +msgid "Only one Procaptcha field can be added to the form." msgstr "" #: Helpers/HCaptcha.php:216 -msgid "hCaptcha plugin is active" +msgid "Procaptcha plugin is active" msgstr "" #: Helpers/HCaptcha.php:220 #, php-format -msgid "When hCaptcha plugin is active and integration is on, hCaptcha settings must be modified on the %1$s." +msgid "When Procaptcha plugin is active and integration is on, Procaptcha settings must be modified on the %1$s." msgstr "" #: Kadence/AdvancedForm.php:142 Kadence/Form.php:115 -msgid "hCaptcha Failed" +msgid "Procaptcha Failed" msgstr "" #: NF/NF.php:146 -msgid "Only one hCaptcha field allowed." +msgid "Only one Procaptcha field allowed." msgstr "" #: Quform/Quform.php:112 @@ -139,7 +139,7 @@ msgid "Secret Key" msgstr "" #: Settings/General.php:140 -msgid "Active hCaptcha to Check Site Config" +msgid "Active Procaptcha to Check Site Config" msgstr "" #: Settings/General.php:145 @@ -175,7 +175,7 @@ msgid "Auto" msgstr "" #: Settings/General.php:165 -msgid "Select hCaptcha theme." +msgid "Select Procaptcha theme." msgstr "" #: Settings/General.php:168 @@ -195,7 +195,7 @@ msgid "Invisible" msgstr "" #: Settings/General.php:176 -msgid "Select hCaptcha size." +msgid "Select Procaptcha size." msgstr "" #: Settings/General.php:179 @@ -203,7 +203,7 @@ msgid "Language" msgstr "" #: Settings/General.php:296 -msgid "By default, hCaptcha will automatically detect the user's locale and localize widgets accordingly." +msgid "By default, Procaptcha will automatically detect the user's locale and localize widgets accordingly." msgstr "" #: Settings/General.php:301 @@ -224,7 +224,7 @@ msgstr "" #: Settings/General.php:327 #, php-format -msgid "Note: only works on hCaptcha %1$s and %2$s site keys." +msgid "Note: only works on Procaptcha %1$s and %2$s site keys." msgstr "" #: Settings/General.php:330 Settings/Integrations.php:432 @@ -241,7 +241,7 @@ msgstr "" #: Settings/General.php:344 #, php-format -msgid "hCaptcha render %s (optional). Must be a valid JSON." +msgid "Procaptcha render %s (optional). Must be a valid JSON." msgstr "" #: Settings/General.php:347 @@ -257,7 +257,7 @@ msgid "Turn Off When Logged In" msgstr "" #: Settings/General.php:358 -msgid "Do not show hCaptcha to logged-in users." +msgid "Do not show Procaptcha to logged-in users." msgstr "" #: Settings/General.php:364 @@ -265,7 +265,7 @@ msgid "Disable reCAPTCHA Compatibility" msgstr "" #: Settings/General.php:366 -msgid "Use if including both hCaptcha and reCAPTCHA on the same page." +msgid "Use if including both Procaptcha and reCAPTCHA on the same page." msgstr "" #: Settings/General.php:372 @@ -281,15 +281,15 @@ msgid "Whitelisted IPs" msgstr "" #: Settings/General.php:380 -msgid "Do not show hCaptcha for listed IP addresses. Please specify one IP address per line." +msgid "Do not show Procaptcha for listed IP addresses. Please specify one IP address per line." msgstr "" #: Settings/General.php:383 -msgid "Login attempts before hCaptcha" +msgid "Login attempts before Procaptcha" msgstr "" #: Settings/General.php:388 -msgid "Maximum number of failed login attempts before showing hCaptcha." +msgid "Maximum number of failed login attempts before showing Procaptcha." msgstr "" #: Settings/General.php:391 @@ -301,11 +301,11 @@ msgid "Time interval in minutes when failed login attempts are counted." msgstr "" #: Settings/General.php:399 -msgid "Delay showing hCaptcha, ms" +msgid "Delay showing Procaptcha, ms" msgstr "" #: Settings/General.php:405 -msgid "Delay time for loading the hCaptcha API script. Any negative value will prevent the API script from loading until user interaction: mouseenter, click, scroll or touch. This significantly improves Google Pagespeed Insights score." +msgid "Delay time for loading the Procaptcha API script. Any negative value will prevent the API script from loading until user interaction: mouseenter, click, scroll or touch. This significantly improves Google Pagespeed Insights score." msgstr "" #: Settings/General.php:448 @@ -329,15 +329,15 @@ msgid "Credentials changed." msgstr "" #: Settings/General.php:492 -msgid "Please complete hCaptcha and check the site config." +msgid "Please complete Procaptcha and check the site config." msgstr "" #: Settings/General.php:552 -msgid "hCaptcha is in invisible mode." +msgid "Procaptcha is in invisible mode." msgstr "" #: Settings/General.php:613 -msgid "Cannot communicate with hCaptcha server." +msgid "Cannot communicate with Procaptcha server." msgstr "" #: Settings/General.php:640 @@ -552,7 +552,7 @@ msgid "%s plugin is deactivated." msgstr "" #: Settings/PluginSettingsBase.php:114 -msgid "hCaptcha Settings" +msgid "Procaptcha Settings" msgstr "" #: Settings/PluginSettingsBase.php:123 @@ -622,13 +622,13 @@ msgid "The sitekey is not registered with the provided secret." msgstr "" #: includes/request.php:81 -msgid "Please complete the hCaptcha." +msgid "Please complete the Procaptcha." msgstr "" #: includes/request.php:82 includes/request.php:314 -msgid "The hCaptcha is invalid." +msgid "The Procaptcha is invalid." msgstr "" #: includes/request.php:83 -msgid "Bad hCaptcha nonce!" +msgid "Bad Procaptcha nonce!" msgstr "" diff --git a/languages/hcaptcha-for-forms-and-more-ko_KR.po b/languages/hcaptcha-for-forms-and-more-ko_KR.po index 958ce19c..11a2db1e 100644 --- a/languages/hcaptcha-for-forms-and-more-ko_KR.po +++ b/languages/hcaptcha-for-forms-and-more-ko_KR.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"Project-Id-Version: hCaptcha for Forms and More\n" +"Project-Id-Version: Procaptcha Wordpress\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-03-28 18:28+0300\n" "PO-Revision-Date: 2021-03-28 18:29+0300\n" @@ -14,7 +14,7 @@ msgstr "" "X-Generator: Poedit 2.4.2\n" "X-Loco-Version: 2.5.0; wp-5.6.2\n" "X-Poedit-KeywordsList: __;esc_html__;esc_html_e;esc_attr__;esc_attr_e\n" -"X-Domain: hcaptcha-for-forms-and-more\n" +"X-Domain: procaptcha-wordpress\n" "X-Poedit-Basepath: ..\n" "X-Poedit-SearchPath-0: backend\n" "X-Poedit-SearchPath-1: bbp\n" @@ -32,15 +32,15 @@ msgstr "" "X-Poedit-SearchPath-13: wpforo\n" #: backend/nav.php:25 backend/settings.php:59 -msgid "hCaptcha Settings" -msgstr "hCaptcha 설정" +msgid "Procaptcha Settings" +msgstr "Procaptcha 설정" #: backend/nav.php:42 msgid "You do not have sufficient permissions to access this page." msgstr "당신은 접근 권한을 가지고 있지 않습니다." #: backend/nav.php:83 -msgid "View hCaptcha settings" +msgid "View Procaptcha settings" msgstr "캡챠 설정 보기" #: backend/nav.php:84 @@ -53,33 +53,33 @@ msgstr "설정 업데이트됨" #: backend/settings.php:64 msgid "" -"In order to use hCaptcha please register Procaptcha please register here to get your site key and secret key." msgstr "" -"hCaptcha 사" -"이트에서 회원가" +"Procaptcha 사" +"이트에서 회원가" "입을 한 후 사이트 키와 비밀 키를 요청하세요." #: backend/settings.php:75 -msgid "Save hCaptcha Settings" -msgstr "hCaptcha 설정 저장하기" +msgid "Save Procaptcha Settings" +msgstr "Procaptcha 설정 저장하기" #: backend/settings.php:103 msgid "Enable/Disable Features" msgstr "기능 활성화/비활성화" #: common/functions.php:57 -msgid "hCaptcha Site Key" -msgstr "hCaptcha 사이트 키" +msgid "Procaptcha Site Key" +msgstr "Procaptcha 사이트 키" #: common/functions.php:61 -msgid "hCaptcha Secret Key" -msgstr "hCaptcha 비밀키" +msgid "Procaptcha Secret Key" +msgstr "Procaptcha 비밀키" #: common/functions.php:65 -msgid "hCaptcha Theme" -msgstr "hCaptcha 테마" +msgid "Procaptcha Theme" +msgstr "Procaptcha 테마" #: common/functions.php:68 msgid "Light" @@ -90,8 +90,8 @@ msgid "Dark" msgstr "다크" #: common/functions.php:73 -msgid "hCaptcha Size" -msgstr "hCaptcha 크기" +msgid "Procaptcha Size" +msgstr "Procaptcha 크기" #: common/functions.php:76 msgid "Normal" @@ -107,15 +107,15 @@ msgstr "언어 자동감지 무시 (선택)" #: common/functions.php:84 msgid "" -"Info on language codes." msgstr "" -"언어 코" +"언어 코" "드 정보에 대해 알아보세요." #: common/functions.php:89 msgid "" -"Disable reCAPTCHA Compatibility (use if including both hCaptcha and " +"Disable reCAPTCHA Compatibility (use if including both Procaptcha and " "reCAPTCHA on the same page)" msgstr "" @@ -128,84 +128,84 @@ msgid "Enable Contact Form 7 Addon" msgstr "Contact Form 7에서 활성화" #: common/functions.php:101 -msgid "Enable hCaptcha on Login Form" -msgstr "hCaptcha를 로그인 폼에서 활성화" +msgid "Enable Procaptcha on Login Form" +msgstr "Procaptcha를 로그인 폼에서 활성화" #: common/functions.php:105 -msgid "Enable hCaptcha on Register Form" -msgstr "hCaptcha를 회원가입 폼에서 활성화" +msgid "Enable Procaptcha on Register Form" +msgstr "Procaptcha를 회원가입 폼에서 활성화" #: common/functions.php:109 -msgid "Enable hCaptcha on Comment Form" -msgstr "hCaptcha를 댓글 폼에서 활성화" +msgid "Enable Procaptcha on Comment Form" +msgstr "Procaptcha를 댓글 폼에서 활성화" #: common/functions.php:113 -msgid "Enable hCaptcha on Lost Password Form" -msgstr "hCaptcha를 비밀번호 재설정 폼에서 활성화" +msgid "Enable Procaptcha on Lost Password Form" +msgstr "Procaptcha를 비밀번호 재설정 폼에서 활성화" #: common/functions.php:117 -msgid "Enable hCaptcha on WooCommerce Login Form" -msgstr "hCaptcha를 우커머스 로그인 폼에서 활성화" +msgid "Enable Procaptcha on WooCommerce Login Form" +msgstr "Procaptcha를 우커머스 로그인 폼에서 활성화" #: common/functions.php:121 -msgid "Enable hCaptcha on WooCommerce Registration Form" -msgstr "hCaptcha를 우커머스 회원가입 폼에서 활성화" +msgid "Enable Procaptcha on WooCommerce Registration Form" +msgstr "Procaptcha를 우커머스 회원가입 폼에서 활성화" #: common/functions.php:125 -msgid "Enable hCaptcha on WooCommerce Lost Password Form" -msgstr "hCaptcha를 우커머스 비밀번호 찾기 폼에서 활성화" +msgid "Enable Procaptcha on WooCommerce Lost Password Form" +msgstr "Procaptcha를 우커머스 비밀번호 찾기 폼에서 활성화" #: common/functions.php:129 -msgid "Enable hCaptcha on WooCommerce Checkout Form" -msgstr "hCaptcha를 우커머스 체크아웃 폼에서 활성화" +msgid "Enable Procaptcha on WooCommerce Checkout Form" +msgstr "Procaptcha를 우커머스 체크아웃 폼에서 활성화" #: common/functions.php:133 -msgid "Enable hCaptcha on Buddypress Registration Form" -msgstr "hCaptcha를 BuddyPress 회원가입 폼에서 활성화" +msgid "Enable Procaptcha on Buddypress Registration Form" +msgstr "Procaptcha를 BuddyPress 회원가입 폼에서 활성화" #: common/functions.php:137 -msgid "Enable hCaptcha on BuddyPress Create Group Form" -msgstr "hCaptcha를 BuddyPress 그룹 생성 폼에서 활성화" +msgid "Enable Procaptcha on BuddyPress Create Group Form" +msgstr "Procaptcha를 BuddyPress 그룹 생성 폼에서 활성화" #: common/functions.php:141 -msgid "Enable hCaptcha on bbPress New Topic Form" -msgstr "hCaptcha를 bbPress 새 주제 폼에서 활성화" +msgid "Enable Procaptcha on bbPress New Topic Form" +msgstr "Procaptcha를 bbPress 새 주제 폼에서 활성화" #: common/functions.php:145 -msgid "Enable hCaptcha on bbPress Reply Form" -msgstr "hCaptcha를 bbPress 답장 폼에서 활성화" +msgid "Enable Procaptcha on bbPress Reply Form" +msgstr "Procaptcha를 bbPress 답장 폼에서 활성화" #: common/functions.php:149 -msgid "Enable hCaptcha on WPForms Lite" -msgstr "hCaptcha를 WPForms Lite 에서 활성화" +msgid "Enable Procaptcha on WPForms Lite" +msgstr "Procaptcha를 WPForms Lite 에서 활성화" #: common/functions.php:153 -msgid "Enable hCaptcha on WPForms Pro" -msgstr "hCaptcha를 WPForms Pro 에서 활성화" +msgid "Enable Procaptcha on WPForms Pro" +msgstr "Procaptcha를 WPForms Pro 에서 활성화" #: common/functions.php:157 -msgid "Enable hCaptcha on WPForo New Topic Form" -msgstr "hCaptcha를 WPForo 새 주제 폼에서 활성화" +msgid "Enable Procaptcha on WPForo New Topic Form" +msgstr "Procaptcha를 WPForo 새 주제 폼에서 활성화" #: common/functions.php:161 -msgid "Enable hCaptcha on WPForo Reply Form" -msgstr "hCaptcha를 WPForo 답장 폼에서 활성화" +msgid "Enable Procaptcha on WPForo Reply Form" +msgstr "Procaptcha를 WPForo 답장 폼에서 활성화" #: common/functions.php:165 -msgid "Enable hCaptcha on Mailchimp for WP Form" -msgstr "hCaptcha를 Mailchimp for WP 폼에서 활성화" +msgid "Enable Procaptcha on Mailchimp for WP Form" +msgstr "Procaptcha를 Mailchimp for WP 폼에서 활성화" #: common/functions.php:169 -msgid "Enable hCaptcha on Jetpack Contact Form" -msgstr "hCaptcha를 젯팩 연락처 폼에서 활성화" +msgid "Enable Procaptcha on Jetpack Contact Form" +msgstr "Procaptcha를 젯팩 연락처 폼에서 활성화" #: common/functions.php:173 -msgid "Enable hCaptcha on Subscribers Form" -msgstr "hCaptcha를 Subscribers 폼에서 활성화" +msgid "Enable Procaptcha on Subscribers Form" +msgstr "Procaptcha를 Subscribers 폼에서 활성화" #: common/functions.php:177 -msgid "Enable hCaptcha on WooCommerce Wishlists Create List Form" -msgstr "hCaptcha를 우커머스 위시리스트 생성 폼에서 활성화" +msgid "Enable Procaptcha on WooCommerce Wishlists Create List Form" +msgstr "Procaptcha를 우커머스 위시리스트 생성 폼에서 활성화" #: common/request.php:106 nf/class-hcaptchafieldsfornf.php:84 #: src/php/CF7/CF7.php:133 @@ -230,12 +230,12 @@ msgid "Invalid Captcha" msgstr "" #: nf/class-hcaptchafieldsfornf.php:70 -msgid "hCaptcha" -msgstr "hCaptcha" +msgid "Procaptcha" +msgstr "Procaptcha" #: wpforms/wpforms.php:50 msgid "Captcha Failed" msgstr "캡챠 인증 실패." -#~ msgid "https://hcaptcha.com/" -#~ msgstr "https://hcaptcha.com/" +#~ msgid "https://prosopo.io/" +#~ msgstr "https://prosopo.io/" diff --git a/languages/hcaptcha-for-forms-and-more-pt_BR.po b/languages/hcaptcha-for-forms-and-more-pt_BR.po index b1c7c049..96eab387 100644 --- a/languages/hcaptcha-for-forms-and-more-pt_BR.po +++ b/languages/hcaptcha-for-forms-and-more-pt_BR.po @@ -20,8 +20,8 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" #: Admin/Notifications.php:90 loco:6575cd123e6a6a48c90bc830 -msgid "Get your hCaptcha site keys" -msgstr "Obtenha suas chaves de site hCaptcha" +msgid "Get your Procaptcha site keys" +msgstr "Obtenha suas chaves de site Procaptcha" #: Admin/Notifications.php:93 loco:6575cd133e6a6a48c90bc831 #, php-format @@ -33,8 +33,8 @@ msgstr "" #: Admin/Notifications.php:97 ElementorPro/HCaptchaHandler.php:362 #: NF/Field.php:76 Settings/PluginSettingsBase.php:42 UM/Base.php:146 #: UM/Base.php:149 loco:6575cd133e6a6a48c90bc832 -msgid "hCaptcha" -msgstr "hCaptcha" +msgid "Procaptcha" +msgstr "Procaptcha" #: Admin/Notifications.php:102 loco:6575cd133e6a6a48c90bc833 msgid "here" @@ -58,8 +58,8 @@ msgstr "" "cartão de crédito necessário." #: Admin/Notifications.php:118 loco:6575cd133e6a6a48c90bc837 -msgid "hCaptcha Pro" -msgstr "hCaptcha Pro" +msgid "Procaptcha Pro" +msgstr "Procaptcha Pro" #: Admin/Notifications.php:123 loco:6575cd133e6a6a48c90bc838 msgid "Start a free trial in your dashboard" @@ -70,14 +70,14 @@ msgid "Try Pro" msgstr "Experimente o Pro" #: Admin/Notifications.php:132 loco:6575cd133e6a6a48c90bc83a -msgid "hCaptcha's Leadership" -msgstr "Liderança da hCaptcha's" +msgid "Procaptcha's Leadership" +msgstr "Liderança da Procaptcha's" #: Admin/Notifications.php:133 loco:6575cd133e6a6a48c90bc83b msgid "" -"hCaptcha Named a Technology Leader in Bot Management: 2023 SPARK Matrix™" +"Procaptcha Named a Technology Leader in Bot Management: 2023 SPARK Matrix™" msgstr "" -"hCaptcha Nomeada Líder em Tecnologia de Gerenciamento de Bot: 2023 SPARK " +"Procaptcha Nomeada Líder em Tecnologia de Gerenciamento de Bot: 2023 SPARK " "Matrix™" #: Admin/Notifications.php:136 loco:6575cd133e6a6a48c90bc83c @@ -101,55 +101,55 @@ msgid "You are not allowed to perform this action." msgstr "Você não tem permissão para realizar esta ação." #: DownloadManager/DownloadManager.php:104 loco:6575cd133e6a6a48c90bc840 -msgid "hCaptcha error" -msgstr "Erro do hCaptcha" +msgid "Procaptcha error" +msgstr "Erro do Procaptcha" #: ElementorPro/HCaptchaHandler.php:169 loco:6575cd133e6a6a48c90bc841 -msgid "To use hCaptcha, you need to add the Site and Secret keys." +msgid "To use Procaptcha, you need to add the Site and Secret keys." msgstr "" -"Para usar o hCaptcha, você precisa adicionar as chaves de Site e Secreta." +"Para usar o Procaptcha, você precisa adicionar as chaves de Site e Secreta." #: GravityForms/Field.php:117 loco:6575cd133e6a6a48c90bc842 msgid "" -"Adds a hCaptcha field to your form to help protect your website from spam " +"Adds a Procaptcha field to your form to help protect your website from spam " "and bot abuse." msgstr "" -"Adiciona um campo hCaptcha ao seu formulário para ajudar a proteger seu site " +"Adiciona um campo Procaptcha ao seu formulário para ajudar a proteger seu site " "contra spam e abuso de bots." #: GravityForms/Field.php:122 loco:6575cd133e6a6a48c90bc843 msgid "" -"hCaptcha settings must be modified on the hCaptcha plugin General settings " +"Procaptcha settings must be modified on the Procaptcha plugin General settings " "page." msgstr "" -"As configurações do hCaptcha devem ser modificadas na página de " -"configurações gerais do plugin hCaptcha." +"As configurações do Procaptcha devem ser modificadas na página de " +"configurações gerais do plugin Procaptcha." #: GravityForms/Field.php:236 loco:6575cd133e6a6a48c90bc844 -msgid "Only one hCaptcha field can be added to the form." -msgstr "Apenas um campo hCaptcha pode ser adicionado ao formulário." +msgid "Only one Procaptcha field can be added to the form." +msgstr "Apenas um campo Procaptcha pode ser adicionado ao formulário." #: Helpers/HCaptcha.php:216 loco:6575cd133e6a6a48c90bc845 -msgid "hCaptcha plugin is active" -msgstr "O plugin hCaptcha está ativo" +msgid "Procaptcha plugin is active" +msgstr "O plugin Procaptcha está ativo" #: Helpers/HCaptcha.php:220 loco:6575cd133e6a6a48c90bc846 #, php-format msgid "" -"When hCaptcha plugin is active and integration is on, hCaptcha settings must " +"When Procaptcha plugin is active and integration is on, Procaptcha settings must " "be modified on the %1$s." msgstr "" -"Quando o plugin hCaptcha está ativo e a integração está habilitada, as " -"configurações do hCaptcha devem ser modificadas na página %1$s." +"Quando o plugin Procaptcha está ativo e a integração está habilitada, as " +"configurações do Procaptcha devem ser modificadas na página %1$s." #: Kadence/AdvancedForm.php:142 Kadence/Form.php:115 #: loco:6575cd133e6a6a48c90bc847 -msgid "hCaptcha Failed" +msgid "Procaptcha Failed" msgstr "Falha no Captcha" #: NF/NF.php:146 loco:6575cd133e6a6a48c90bc848 -msgid "Only one hCaptcha field allowed." -msgstr "Apenas um campo hCaptcha permitido." +msgid "Only one Procaptcha field allowed." +msgstr "Apenas um campo Procaptcha permitido." #: Quform/Quform.php:112 loco:6575cd133e6a6a48c90bc849 msgid "Please enable JavaScript to submit this form." @@ -168,8 +168,8 @@ msgid "Secret Key" msgstr "Chave Secreta" #: Settings/General.php:140 loco:6575cd133e6a6a48c90bc84d -msgid "Active hCaptcha to Check Site Config" -msgstr "Ative o hCaptcha para verificar a configuração do site" +msgid "Active Procaptcha to Check Site Config" +msgstr "Ative o Procaptcha para verificar a configuração do site" #: Settings/General.php:145 loco:6575cd133e6a6a48c90bc84e msgid "Check Site Config" @@ -204,8 +204,8 @@ msgid "Auto" msgstr "Automático" #: Settings/General.php:165 loco:6575cd133e6a6a48c90bc856 -msgid "Select hCaptcha theme." -msgstr "Selecionar tema do hCaptcha." +msgid "Select Procaptcha theme." +msgstr "Selecionar tema do Procaptcha." #: Settings/General.php:168 loco:6575cd133e6a6a48c90bc857 msgid "Size" @@ -224,8 +224,8 @@ msgid "Invisible" msgstr "Invisível" #: Settings/General.php:176 loco:6575cd133e6a6a48c90bc85b -msgid "Select hCaptcha size." -msgstr "Selecionar tamanho do hCaptcha." +msgid "Select Procaptcha size." +msgstr "Selecionar tamanho do Procaptcha." #: Settings/General.php:179 loco:6575cd133e6a6a48c90bc85c msgid "Language" @@ -233,10 +233,10 @@ msgstr "Idioma" #: Settings/General.php:296 loco:6575cd133e6a6a48c90bc85d msgid "" -"By default, hCaptcha will automatically detect the user's locale and " +"By default, Procaptcha will automatically detect the user's locale and " "localize widgets accordingly." msgstr "" -"Por padrão, o hCaptcha detectará automaticamente a localidade do usuário e " +"Por padrão, o Procaptcha detectará automaticamente a localidade do usuário e " "localizará os widgets de acordo." #: Settings/General.php:301 loco:6575cd133e6a6a48c90bc85e @@ -259,9 +259,9 @@ msgstr "Ativar Temas Personalizados" #: Settings/General.php:327 loco:6575cd133e6a6a48c90bc862 #, php-format -msgid "Note: only works on hCaptcha %1$s and %2$s site keys." +msgid "Note: only works on Procaptcha %1$s and %2$s site keys." msgstr "" -"Observação: funciona apenas nas chaves de site %1$s e %2$s do hCaptcha." +"Observação: funciona apenas nas chaves de site %1$s e %2$s do Procaptcha." #: Settings/General.php:330 Settings/Integrations.php:432 #: loco:6575cd133e6a6a48c90bc863 @@ -278,8 +278,8 @@ msgstr "Parâmetros de Configuração" #: Settings/General.php:344 loco:6575cd133e6a6a48c90bc866 #, php-format -msgid "hCaptcha render %s (optional). Must be a valid JSON." -msgstr "Renderização do hCaptcha %s (opcional). Deve ser um JSON válido." +msgid "Procaptcha render %s (optional). Must be a valid JSON." +msgstr "Renderização do Procaptcha %s (opcional). Deve ser um JSON válido." #: Settings/General.php:347 loco:6575cd133e6a6a48c90bc867 msgid "parameters" @@ -294,17 +294,17 @@ msgid "Turn Off When Logged In" msgstr "Desativar Quando Conectado" #: Settings/General.php:358 loco:6575cd133e6a6a48c90bc86a -msgid "Do not show hCaptcha to logged-in users." -msgstr "Não mostrar hCaptcha para usuários conectados." +msgid "Do not show Procaptcha to logged-in users." +msgstr "Não mostrar Procaptcha para usuários conectados." #: Settings/General.php:364 loco:6575cd133e6a6a48c90bc86b msgid "Disable reCAPTCHA Compatibility" msgstr "Desativar Compatibilidade com reCAPTCHA" #: Settings/General.php:366 loco:6575cd133e6a6a48c90bc86c -msgid "Use if including both hCaptcha and reCAPTCHA on the same page." +msgid "Use if including both Procaptcha and reCAPTCHA on the same page." msgstr "" -"Use se estiver incluindo tanto hCaptcha quanto reCAPTCHA na mesma página." +"Use se estiver incluindo tanto Procaptcha quanto reCAPTCHA na mesma página." #: Settings/General.php:372 loco:6575cd133e6a6a48c90bc86d msgid "Use network-wide settings" @@ -321,20 +321,20 @@ msgstr "IPs na Lista Branca" #: Settings/General.php:380 loco:6575cd133e6a6a48c90bc870 msgid "" -"Do not show hCaptcha for listed IP addresses. Please specify one IP address " +"Do not show Procaptcha for listed IP addresses. Please specify one IP address " "per line." msgstr "" -"Não exibir hCaptcha para os endereços IP listados. Por favor, especifique um " +"Não exibir Procaptcha para os endereços IP listados. Por favor, especifique um " "endereço IP por linha." #: Settings/General.php:383 loco:6575cd133e6a6a48c90bc871 -msgid "Login attempts before hCaptcha" -msgstr "Tentativas de login antes do hCaptcha" +msgid "Login attempts before Procaptcha" +msgstr "Tentativas de login antes do Procaptcha" #: Settings/General.php:388 loco:6575cd133e6a6a48c90bc872 -msgid "Maximum number of failed login attempts before showing hCaptcha." +msgid "Maximum number of failed login attempts before showing Procaptcha." msgstr "" -"Número máximo de tentativas de login falhadas antes de exibir o hCaptcha." +"Número máximo de tentativas de login falhadas antes de exibir o Procaptcha." #: Settings/General.php:391 loco:6575cd133e6a6a48c90bc873 msgid "Failed login attempts interval, min" @@ -347,17 +347,17 @@ msgstr "" "contadas." #: Settings/General.php:399 loco:6575cd133e6a6a48c90bc875 -msgid "Delay showing hCaptcha, ms" -msgstr "Atraso na exibição do hCaptcha, em milissegundo" +msgid "Delay showing Procaptcha, ms" +msgstr "Atraso na exibição do Procaptcha, em milissegundo" #: Settings/General.php:405 loco:6575cd133e6a6a48c90bc876 msgid "" -"Delay time for loading the hCaptcha API script. Any negative value will " +"Delay time for loading the Procaptcha API script. Any negative value will " "prevent the API script from loading until user interaction: mouseenter, " "click, scroll or touch. This significantly improves Google Pagespeed " "Insights score." msgstr "" -"Tempo de atraso para carregar o script da API do hCaptcha. Qualquer valor " +"Tempo de atraso para carregar o script da API do Procaptcha. Qualquer valor " "negativo impedirá o carregamento do script da API até a interação do " "usuário: mouseenter, click, scroll ou touch. Isso melhora significativamente " "a pontuação do Google Pagespeed Insights." @@ -383,16 +383,16 @@ msgid "Credentials changed." msgstr "Credenciais alteradas." #: Settings/General.php:492 loco:6575cd133e6a6a48c90bc87c -msgid "Please complete hCaptcha and check the site config." -msgstr "Preencha o hCaptcha e verifique a configuração do site." +msgid "Please complete Procaptcha and check the site config." +msgstr "Preencha o Procaptcha e verifique a configuração do site." #: Settings/General.php:552 loco:6575cd133e6a6a48c90bc87d -msgid "hCaptcha is in invisible mode." -msgstr "O hCaptcha está em modo invisível." +msgid "Procaptcha is in invisible mode." +msgstr "O Procaptcha está em modo invisível." #: Settings/General.php:613 loco:6575cd133e6a6a48c90bc87e -msgid "Cannot communicate with hCaptcha server." -msgstr "Não é possível se comunicar com o servidor hCaptcha." +msgid "Cannot communicate with Procaptcha server." +msgstr "Não é possível se comunicar com o servidor Procaptcha." #: Settings/General.php:640 loco:6575cd133e6a6a48c90bc87f msgid "Site config is valid." @@ -617,8 +617,8 @@ msgid "%s plugin is deactivated." msgstr "O plugin %s está desativado." #: Settings/PluginSettingsBase.php:114 loco:6575cd133e6a6a48c90bc8ac -msgid "hCaptcha Settings" -msgstr "Configurações do hCaptcha" +msgid "Procaptcha Settings" +msgstr "Configurações do Procaptcha" #: Settings/PluginSettingsBase.php:123 loco:6575cd133e6a6a48c90bc8ad msgid "Settings" @@ -689,14 +689,14 @@ msgid "The sitekey is not registered with the provided secret." msgstr "A chave do site não está registrada com o segredo fornecido." #: includes/request.php:81 loco:6575cd133e6a6a48c90bc8bd -msgid "Please complete the hCaptcha." -msgstr "Por favor, complete o hCaptcha." +msgid "Please complete the Procaptcha." +msgstr "Por favor, complete o Procaptcha." #: includes/request.php:82 includes/request.php:314 #: loco:6575cd133e6a6a48c90bc8be -msgid "The hCaptcha is invalid." -msgstr "O hCaptcha é inválido." +msgid "The Procaptcha is invalid." +msgstr "O Procaptcha é inválido." #: includes/request.php:83 loco:6575cd133e6a6a48c90bc8bf -msgid "Bad hCaptcha nonce!" -msgstr "Mau hCaptcha agora!" +msgid "Bad Procaptcha nonce!" +msgstr "Mau Procaptcha agora!" diff --git a/package.json b/package.json index de0863ff..f18d993c 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "node": ">=21.6.2", "npm": ">=10.4.0" }, - "packageManager": "yarn@4.1.0", + "packageManager": "yarn@4.1.1", "dependencies": { "@wordpress/hooks": "^3.51.0" }, diff --git a/readme.txt b/readme.txt index e28813b4..008b9d5c 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -=== hCaptcha for WordPress === +=== Procaptcha for WordPress === Contributors: hcaptcha, kaggdesign Tags: captcha, hcaptcha, antispam, abuse, protect form Requires at least: 5.1 @@ -12,7 +12,7 @@ Enables hCaptcha integration with WordPress and popular plugins. == Description == -[hCaptcha](https://www.hcaptcha.com/) is a drop-in replacement for reCAPTCHA that puts user privacy first. +[hCaptcha](https://www.prosopo.io/) is a drop-in replacement for reCAPTCHA that puts user privacy first. Need to keep out bots? hCaptcha protects privacy while offering better protection against spam and abuse. Help build a better web. @@ -22,9 +22,9 @@ The purpose of a CAPTCHA is to distinguish between people and machines via a cha To use this plugin, install it and enter your sitekey and secret in the Settings -> hCaptcha menu after signing up on hCaptcha.com. -[hCaptcha Free](https://www.hcaptcha.com/) lets websites block bots and other forms of abuse via humanity challenges. +[hCaptcha Free](https://www.prosopo.io/) lets websites block bots and other forms of abuse via humanity challenges. -[hCaptcha Pro](https://www.hcaptcha.com/pro) goes beyond the free hCaptcha service with advanced machine learning to reduce the challenge rate, delivering high security and low friction along with more features like UI customization. +[hCaptcha Pro](https://www.prosopo.io/pro) goes beyond the free hCaptcha service with advanced machine learning to reduce the challenge rate, delivering high security and low friction along with more features like UI customization. == Screenshots == @@ -40,7 +40,7 @@ To use this plugin, install it and enter your sitekey and secret in the Settings == Installation == -Sign up at [hCaptcha.com](https://www.hcaptcha.com/) to get your sitekey and secret, then: +Sign up at [hCaptcha.com](https://www.prosopo.io/) to get your sitekey and secret, then: 1. Install hCaptcha either via the WordPress.org plugin repository (best) or by uploading the files to your server. ([Upload instructions](https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/)) 2. Activate the hCaptcha plugin on the 'Plugins' admin page @@ -425,7 +425,7 @@ Please make sure you have removed the reCAPTCHA keys under WPForms > Settings > = Where can I get more information about hCaptcha? = -Please see our [website](https://hcaptcha.com/). +Please see our [website](https://prosopo.io/). == Privacy Notices == @@ -433,7 +433,7 @@ hCaptcha is designed to comply with privacy laws in every country, including GDP For example, hCaptcha has been certified under ISO 27001 and 27701 and is enrolled in the EU-US, UK-US, and Swiss-US Data Privacy Framework for GDPR compliance. -Details are available at [www.hcaptcha.com/certifications](https://www.hcaptcha.com/certifications) and [www.hcaptcha.com/gdpr](https://www.hcaptcha.com/gdpr). +Details are available at [www.prosopo.io/certifications](https://www.prosopo.io/certifications) and [www.prosopo.io/gdpr](https://www.prosopo.io/gdpr). With the default configuration, this plugin does not: @@ -743,4 +743,4 @@ Instructions for popular native integrations are below: * Added compatibility with Profile Builder. * Added compatibility with an Easy Digital Downloads Checkout form. -[See changelog for all versions](https://plugins.svn.wordpress.org/hcaptcha-for-forms-and-more/trunk/changelog.txt). +[See changelog for all versions](https://plugins.svn.wordpress.org/procaptcha-wordpress/trunk/changelog.txt). diff --git a/src/js/hcaptcha/app.js b/src/js/hcaptcha/app.js index 0ef86a86..5cfdf7c1 100644 --- a/src/js/hcaptcha/app.js +++ b/src/js/hcaptcha/app.js @@ -28,8 +28,13 @@ window.hCaptchaSubmit = () => { window.hCaptchaOnLoad = () => { function hCaptchaOnLoad() { + console.log("running onLoad") + // Just allow one procaptcha element for now + const procaptchaElement = document.querySelector(".procaptcha") + // put the callback on the window object + window.onCaptchaVerified = (payload) => hCaptcha.callback(payload, procaptchaElement) window.hCaptchaBindEvents(); - document.dispatchEvent( new CustomEvent( 'hCaptchaLoaded' ) ); + document.dispatchEvent(new CustomEvent("hCaptchaLoaded")); } // Sync with DOMContentLoaded event. diff --git a/src/js/hcaptcha/hcaptcha.js b/src/js/hcaptcha/hcaptcha.js index f6cf168b..8cf429f3 100644 --- a/src/js/hcaptcha/hcaptcha.js +++ b/src/js/hcaptcha/hcaptcha.js @@ -2,7 +2,7 @@ * @file class HCaptcha. */ -/* global hcaptcha, HCaptchaMainObject */ +/* global procaptcha, HCaptchaMainObject */ /** * Class hCaptcha. @@ -55,7 +55,7 @@ class HCaptcha { return ''; } - const hcaptcha = el.getElementsByClassName( 'h-captcha' )[ 0 ]; + const hcaptcha = el.getElementsByClassName( 'procaptcha' )[ 0 ]; if ( typeof hcaptcha === 'undefined' ) { return ''; @@ -82,7 +82,7 @@ class HCaptcha { return; } - hcaptcha.reset( widgetId ); + procaptcha.reset( widgetId ); } /** @@ -129,12 +129,12 @@ class HCaptcha { return; } - const iframe = formElement.querySelector( '.h-captcha iframe' ); + const iframe = formElement.querySelector( '.procaptcha iframe' ); const token = iframe.dataset.hcaptchaResponse; // Do not execute hCaptcha twice. if ( token === '' ) { - hcaptcha.execute( widgetId ); + procaptcha.execute( widgetId ); } else { this.callback( token ); } @@ -171,7 +171,7 @@ class HCaptcha { params = {}; } - params.callback = this.callback; + params.callback = 'onCaptchaVerified'; return params; } @@ -273,24 +273,30 @@ class HCaptcha { /** * Called when the user submits a successful response. * - * @param {string} token The h-captcha-response token. + * @param {string} payload The procaptcha-response token. + * @param {HTMLElement} element The procaptcha element. */ - callback( token ) { + callback( payload, element ) { document.dispatchEvent( new CustomEvent( 'hCaptchaSubmitted', { - detail: { token }, + detail: { payload }, } ) ); - const params = this.getParams(); - const iframe = document.querySelector( 'iframe[data-hcaptcha-response="' + token + '"]' ); - const hcaptcha = iframe ? iframe.closest( '.h-captcha' ) : null; - const force = hcaptcha ? hcaptcha.dataset.force : null; + const form = element.closest(this.formSelector) + if (!form) { + console.error('Parent form not found for the element:', element) + return + } + const input = document.createElement('input') + input.type = 'hidden' + input.name = "procaptcha-response" + input.value = JSON.stringify(payload) + form.appendChild(input) if ( - params.size === 'invisible' || // Prevent form submit when hCaptcha widget was manually solved. - ( force === 'true' && this.isValidated() ) + this.isValidated() ) { this.submit(); } @@ -334,14 +340,14 @@ class HCaptcha { const params = this.applyAutoTheme( this.getParams() ); - hcaptcha.render( hcaptchaElement, params ); + procaptcha.render( hcaptchaElement.id, params ); } /** * Bind events on forms containing hCaptcha. */ bindEvents() { - if ( 'undefined' === typeof hcaptcha ) { + if ( 'undefined' === typeof procaptcha ) { return; } @@ -360,7 +366,7 @@ class HCaptcha { ); this.getForms().map( ( formElement ) => { - const hcaptchaElement = formElement.querySelector( '.h-captcha' ); + const hcaptchaElement = formElement.querySelector( '.procaptcha' ); // Ignore forms not having hcaptcha. if ( null === hcaptchaElement ) { diff --git a/src/php/Admin/Events/EventsTable.php b/src/php/Admin/Events/EventsTable.php index 90569d73..ac9004de 100644 --- a/src/php/Admin/Events/EventsTable.php +++ b/src/php/Admin/Events/EventsTable.php @@ -81,12 +81,12 @@ public function init() { ]; $this->columns = [ - 'source' => __( 'Source', 'hcaptcha-for-forms-and-more' ), - 'form_id' => __( 'Form Id', 'hcaptcha-for-forms-and-more' ), - 'ip' => __( 'IP', 'hcaptcha-for-forms-and-more' ), - 'user_agent' => __( 'User Agent', 'hcaptcha-for-forms-and-more' ), - 'error_codes' => __( 'Errors', 'hcaptcha-for-forms-and-more' ), - 'date_gmt' => __( 'Date', 'hcaptcha-for-forms-and-more' ), + 'source' => __( 'Source', 'procaptcha-wordpress' ), + 'form_id' => __( 'Form Id', 'procaptcha-wordpress' ), + 'ip' => __( 'IP', 'procaptcha-wordpress' ), + 'user_agent' => __( 'User Agent', 'procaptcha-wordpress' ), + 'error_codes' => __( 'Errors', 'procaptcha-wordpress' ), + 'date_gmt' => __( 'Date', 'procaptcha-wordpress' ), ]; $this->plugins = get_plugins(); diff --git a/src/php/Admin/Events/FormsTable.php b/src/php/Admin/Events/FormsTable.php index 48e14fe0..82d6f62b 100644 --- a/src/php/Admin/Events/FormsTable.php +++ b/src/php/Admin/Events/FormsTable.php @@ -76,9 +76,9 @@ public function __construct() { */ public function init() { $this->columns = [ - 'source' => __( 'Source', 'hcaptcha-for-forms-and-more' ), - 'form_id' => __( 'Form Id', 'hcaptcha-for-forms-and-more' ), - 'served' => __( 'Served', 'hcaptcha-for-forms-and-more' ), + 'source' => __( 'Source', 'procaptcha-wordpress' ), + 'form_id' => __( 'Form Id', 'procaptcha-wordpress' ), + 'served' => __( 'Served', 'procaptcha-wordpress' ), ]; $this->plugins = get_plugins(); diff --git a/src/php/Admin/Notifications.php b/src/php/Admin/Notifications.php index f1f9a83e..211b854e 100644 --- a/src/php/Admin/Notifications.php +++ b/src/php/Admin/Notifications.php @@ -79,14 +79,14 @@ private function init_hooks() { * @noinspection HtmlUnknownTarget */ private function init_notifications() { - $hcaptcha_url = 'https://www.hcaptcha.com/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=sk'; - $register_url = 'https://www.hcaptcha.com/signup-interstitial/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=sk'; - $pro_url = 'https://www.hcaptcha.com/pro?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; - $dashboard_url = 'https://dashboard.hcaptcha.com/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; - $post_leadership_url = 'https://www.hcaptcha.com/post/hcaptcha-named-a-technology-leader-in-bot-management/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; - $rate_url = 'https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/reviews/?filter=5#new-post'; + $hcaptcha_url = 'https://www.prosopo.io/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=sk'; + $register_url = 'https://www.prosopo.io/signup-interstitial/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=sk'; + $pro_url = 'https://www.prosopo.io/pro?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; + $dashboard_url = 'https://dashboard.prosopo.io/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; + $post_leadership_url = 'https://www.prosopo.io/post/hcaptcha-named-a-technology-leader-in-bot-management/?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; + $rate_url = 'https://wordpress.org/support/plugin/procaptcha-wordpress/reviews/?filter=5#new-post'; $search_integrations_url = admin_url( 'options-general.php?page=hcaptcha&tab=integrations#hcaptcha-integrations-search' ); - $enterprise_features_url = 'https://www.hcaptcha.com/#enterprise-features?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; + $enterprise_features_url = 'https://www.prosopo.io/#enterprise-features?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; $statistics_url = admin_url( 'options-general.php?page=hcaptcha&tab=general#statistics_1' ); $forms_url = admin_url( 'options-general.php?page=hcaptcha&tab=forms' ); $events_url = admin_url( 'options-general.php?page=hcaptcha&tab=events' ); @@ -94,61 +94,61 @@ private function init_notifications() { $this->notifications = [ 'register' => [ - 'title' => __( 'Get your hCaptcha site keys', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'Get your hCaptcha site keys', 'procaptcha-wordpress' ), 'message' => sprintf( /* translators: 1: hCaptcha link, 2: register link. */ - __( 'To use %1$s, please register %2$s to get your site and secret keys.', 'hcaptcha-for-forms-and-more' ), + __( 'To use %1$s, please register %2$s to get your site and secret keys.', 'procaptcha-wordpress' ), sprintf( '%2$s', $hcaptcha_url, - __( 'hCaptcha', 'hcaptcha-for-forms-and-more' ) + __( 'hCaptcha', 'procaptcha-wordpress' ) ), sprintf( '%2$s', $register_url, - __( 'here', 'hcaptcha-for-forms-and-more' ) + __( 'here', 'procaptcha-wordpress' ) ) ), 'button' => [ 'url' => $register_url, - 'text' => __( 'Get site keys', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Get site keys', 'procaptcha-wordpress' ), ], ], 'pro-free-trial' => [ - 'title' => __( 'Try Pro for free', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'Try Pro for free', 'procaptcha-wordpress' ), 'message' => sprintf( /* translators: 1: hCaptcha Pro link, 2: dashboard link. */ - __( 'Want low friction and custom themes? %1$s is for you. %2$s, no credit card required.', 'hcaptcha-for-forms-and-more' ), + __( 'Want low friction and custom themes? %1$s is for you. %2$s, no credit card required.', 'procaptcha-wordpress' ), sprintf( '%2$s', $pro_url, - __( 'hCaptcha Pro', 'hcaptcha-for-forms-and-more' ) + __( 'hCaptcha Pro', 'procaptcha-wordpress' ) ), sprintf( '%2$s', $dashboard_url, - __( 'Start a free trial in your dashboard', 'hcaptcha-for-forms-and-more' ) + __( 'Start a free trial in your dashboard', 'procaptcha-wordpress' ) ) ), 'button' => [ 'url' => $pro_url, - 'text' => __( 'Try Pro', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Try Pro', 'procaptcha-wordpress' ), ], ], 'post-leadership' => [ - 'title' => __( 'hCaptcha\'s Leadership', 'hcaptcha-for-forms-and-more' ), - 'message' => __( 'hCaptcha Named a Technology Leader in Bot Management: 2023 SPARK Matrix™', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'hCaptcha\'s Leadership', 'procaptcha-wordpress' ), + 'message' => __( 'hCaptcha Named a Technology Leader in Bot Management: 2023 SPARK Matrix™', 'procaptcha-wordpress' ), 'button' => [ 'url' => $post_leadership_url, - 'text' => __( 'Read post', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Read post', 'procaptcha-wordpress' ), ], ], 'please-rate' => [ - 'title' => __( 'Rate hCaptcha plugin', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'Rate hCaptcha plugin', 'procaptcha-wordpress' ), 'message' => sprintf( /* translators: 1: plugin name, 2: wp.org review link with stars, 3: wp.org review link with text. */ - __( 'Please rate %1$s %2$s on %3$s. Thank you!', 'hcaptcha-for-forms-and-more' ), - 'hCaptcha for WordPress', + __( 'Please rate %1$s %2$s on %3$s. Thank you!', 'procaptcha-wordpress' ), + 'Procaptcha for WordPress', sprintf( '★★★★★', $rate_url @@ -160,83 +160,83 @@ private function init_notifications() { ), 'button' => [ 'url' => $rate_url, - 'text' => __( 'Rate', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Rate', 'procaptcha-wordpress' ), ], ], // Added in 3.8.0. 'search-integrations' => [ - 'title' => __( 'Search on Integrations page', 'hcaptcha-for-forms-and-more' ), - 'message' => __( 'Now you can search for plugin an themes on the Integrations page.', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'Search on Integrations page', 'procaptcha-wordpress' ), + 'message' => __( 'Now you can search for plugin an themes on the Integrations page.', 'procaptcha-wordpress' ), 'button' => [ 'url' => $search_integrations_url, - 'text' => __( 'Start search', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Start search', 'procaptcha-wordpress' ), ], ], // Added in 3.9.0. 'enterprise-support' => [ - 'title' => __( 'Support for Enterprise features', 'hcaptcha-for-forms-and-more' ), - 'message' => __( 'The hCaptcha plugin commenced support for Enterprise features. Solve your fraud and abuse problem today.', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'Support for Enterprise features', 'procaptcha-wordpress' ), + 'message' => __( 'The hCaptcha plugin commenced support for Enterprise features. Solve your fraud and abuse problem today.', 'procaptcha-wordpress' ), 'button' => [ 'url' => $enterprise_features_url, - 'text' => __( 'Get started', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Get started', 'procaptcha-wordpress' ), ], ], // Added in 4.0.0. 'statistics' => [ - 'title' => __( 'Events statistics and Forms admin page', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'Events statistics and Forms admin page', 'procaptcha-wordpress' ), 'message' => sprintf( /* translators: 1: statistics switch link, 2: the 'forms' page link. */ - __( '%1$s events statistics and %2$s how your forms are used.', 'hcaptcha-for-forms-and-more' ), + __( '%1$s events statistics and %2$s how your forms are used.', 'procaptcha-wordpress' ), sprintf( '%2$s', $statistics_url, - __( 'Turn on', 'hcaptcha-for-forms-and-more' ) + __( 'Turn on', 'procaptcha-wordpress' ) ), sprintf( '%2$s', $forms_url, - __( 'see', 'hcaptcha-for-forms-and-more' ) + __( 'see', 'procaptcha-wordpress' ) ) ), 'button' => [ 'url' => $statistics_url, - 'text' => __( 'Turn on stats', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Turn on stats', 'procaptcha-wordpress' ), ], ], // Added in 4.0.0. 'events_page' => [ - 'title' => __( 'Events admin page', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'Events admin page', 'procaptcha-wordpress' ), 'message' => sprintf( /* translators: 1: statistics switch link, 2: the 'forms' page link. */ - __( '%1$s events statistics and %2$s to %3$s complete statistics on form events.', 'hcaptcha-for-forms-and-more' ), + __( '%1$s events statistics and %2$s to %3$s complete statistics on form events.', 'procaptcha-wordpress' ), sprintf( '%2$s', $statistics_url, - __( 'Turn on', 'hcaptcha-for-forms-and-more' ) + __( 'Turn on', 'procaptcha-wordpress' ) ), sprintf( '%2$s', $dashboard_url, - __( 'upgrade to Pro', 'hcaptcha-for-forms-and-more' ) + __( 'upgrade to Pro', 'procaptcha-wordpress' ) ), sprintf( '%2$s', $events_url, - __( 'see', 'hcaptcha-for-forms-and-more' ) + __( 'see', 'procaptcha-wordpress' ) ) ), 'button' => [ 'url' => $statistics_url, - 'text' => __( 'Turn on stats', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Turn on stats', 'procaptcha-wordpress' ), ], ], // Added in 4.0.0. 'force' => [ - 'title' => __( 'Force hCaptcha', 'hcaptcha-for-forms-and-more' ), - 'message' => __( 'Force hCaptcha check before submitting the form and simplify the user experience.', 'hcaptcha-for-forms-and-more' ), + 'title' => __( 'Force hCaptcha', 'procaptcha-wordpress' ), + 'message' => __( 'Force hCaptcha check before submitting the form and simplify the user experience.', 'procaptcha-wordpress' ), 'button' => [ 'url' => $force_url, - 'text' => __( 'Turn on force', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Turn on force', 'procaptcha-wordpress' ), ], ], ]; @@ -276,7 +276,7 @@ public function show() { ?>
- +
update_dismissed( $id ) ) { - wp_send_json_error( esc_html__( 'Error dismissing notification.', 'hcaptcha-for-forms-and-more' ) ); + wp_send_json_error( esc_html__( 'Error dismissing notification.', 'procaptcha-wordpress' ) ); } wp_send_json_success(); @@ -423,16 +423,16 @@ private function update_dismissed( string $id ): bool { public function reset_notifications() { // Run a security check. if ( ! check_ajax_referer( self::RESET_NOTIFICATIONS_ACTION, 'nonce', false ) ) { - wp_send_json_error( esc_html__( 'Your session has expired. Please reload the page.', 'hcaptcha-for-forms-and-more' ) ); + wp_send_json_error( esc_html__( 'Your session has expired. Please reload the page.', 'procaptcha-wordpress' ) ); } // Check for permissions. if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( esc_html__( 'You are not allowed to perform this action.', 'hcaptcha-for-forms-and-more' ) ); + wp_send_json_error( esc_html__( 'You are not allowed to perform this action.', 'procaptcha-wordpress' ) ); } if ( ! $this->remove_dismissed() ) { - wp_send_json_error( esc_html__( 'Error removing dismissed notifications.', 'hcaptcha-for-forms-and-more' ) ); + wp_send_json_error( esc_html__( 'Error removing dismissed notifications.', 'procaptcha-wordpress' ) ); } ob_start(); diff --git a/src/php/Admin/PluginStats.php b/src/php/Admin/PluginStats.php index 07d1edfd..c1d1ae6d 100644 --- a/src/php/Admin/PluginStats.php +++ b/src/php/Admin/PluginStats.php @@ -17,7 +17,7 @@ class PluginStats { /** * Event API URL. */ - const EVENT_API = 'https://a.hcaptcha.com/api/event'; + const EVENT_API = 'https://a.prosopo.io/api/event'; /** * Event name. @@ -27,7 +27,7 @@ class PluginStats { /** * Report domain. */ - const DOMAIN = 'wp-plugin.hcaptcha.com'; + const DOMAIN = 'wp-plugin.prosopo.io'; /** * Max props to send. diff --git a/src/php/Affiliates/Login.php b/src/php/Affiliates/Login.php index 98b6ecf5..d0477a49 100644 --- a/src/php/Affiliates/Login.php +++ b/src/php/Affiliates/Login.php @@ -55,7 +55,7 @@ public function add_affiliates_captcha( $content, array $args ): string { */ public function print_inline_styles() { $css = <<
- + error_message ); ?>
diff --git a/src/php/Asgaros/Base.php b/src/php/Asgaros/Base.php index 7d1a7879..c43a0cb0 100644 --- a/src/php/Asgaros/Base.php +++ b/src/php/Asgaros/Base.php @@ -109,7 +109,7 @@ public function print_inline_styles() { flex-direction: row-reverse; } - #af-wrapper div.editor-row.editor-row-hcaptcha .h-captcha { + #af-wrapper div.editor-row.editor-row-hcaptcha .procaptcha { margin-bottom: 0; } CSS; diff --git a/src/php/AutoVerify/AutoVerify.php b/src/php/AutoVerify/AutoVerify.php index 441d9a1d..b11312d3 100644 --- a/src/php/AutoVerify/AutoVerify.php +++ b/src/php/AutoVerify/AutoVerify.php @@ -113,7 +113,6 @@ public function verify_form() { */ private function register_forms( array $forms ) { $forms_data = []; - foreach ( $forms as $form ) { $action = $this->get_form_action( $form ); diff --git a/src/php/Avada/Form.php b/src/php/Avada/Form.php index 66fd218b..926412c7 100644 --- a/src/php/Avada/Form.php +++ b/src/php/Avada/Form.php @@ -93,7 +93,7 @@ public function verify( $demo_mode ) { []; $form_data = wp_parse_args( str_replace( '&', '&', $form_data ) ); - $hcaptcha_response = $form_data['h-captcha-response'] ?? ''; + $hcaptcha_response = $form_data['procaptcha-response'] ?? ''; $_POST['hcaptcha-widget-id'] = $form_data['hcaptcha-widget-id'] ?? ''; // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Missing diff --git a/src/php/BackInStockNotifier/Form.php b/src/php/BackInStockNotifier/Form.php index d12d4f9f..40ac7221 100644 --- a/src/php/BackInStockNotifier/Form.php +++ b/src/php/BackInStockNotifier/Form.php @@ -112,7 +112,7 @@ public function after_submit_button( int $product_id, int $variation_id ) { */ public function verify( array $post_data, bool $rest_api ) { - $hcaptcha_response = $post_data['h-captcha-response'] ?? ''; + $hcaptcha_response = $post_data['procaptcha-response'] ?? ''; $result = hcaptcha_request_verify( $hcaptcha_response ); diff --git a/src/php/Brizy/Base.php b/src/php/Brizy/Base.php index 04b4b781..9dfdba85 100644 --- a/src/php/Brizy/Base.php +++ b/src/php/Brizy/Base.php @@ -90,7 +90,7 @@ public function verify( $form ) { continue; } - if ( 'g-recaptcha-response' === $item['name'] || 'h-captcha-response' === $item['name'] ) { + if ( 'g-recaptcha-response' === $item['name'] || 'procaptcha-response' === $item['name'] ) { $hcaptcha_response = $item['value']; } @@ -130,7 +130,7 @@ public function print_inline_styles() { $style_shown = true; $css = <<get_posted_data(); - $response = $data['h-captcha-response'] ?? ''; + $response = $data['procaptcha-response'] ?? ''; $captcha_result = hcaptcha_request_verify( $response ); if ( null !== $captcha_result ) { @@ -239,7 +239,7 @@ public function enqueue_scripts() { */ public function print_inline_styles() { $css = <<add( 'cf7-hcaptcha', - __( 'hCaptcha', 'hcaptcha-for-forms-and-more' ), + __( 'hCaptcha', 'procaptcha-wordpress' ), [ $this, 'tag_generator_hcaptcha' ] ); } @@ -279,7 +279,7 @@ public function add_tag_generator_hcaptcha() { public function tag_generator_hcaptcha( $contact_form, $args = '' ) { $args = wp_parse_args( $args ); $type = $args['id']; - $description = __( 'Generate a form-tag for a hCaptcha field.', 'hcaptcha-for-forms-and-more' ); + $description = __( 'Generate a form-tag for a hCaptcha field.', 'procaptcha-wordpress' ); ?>
@@ -292,7 +292,7 @@ public function tag_generator_hcaptcha( $contact_form, $args = '' ) { @@ -305,7 +305,7 @@ public function tag_generator_hcaptcha( $contact_form, $args = '' ) { @@ -330,7 +330,7 @@ public function tag_generator_hcaptcha( $contact_form, $args = '' ) {
+ value=""/>
true, 'response' => 303, @@ -119,7 +119,7 @@ public function verify( $package ) { */ public function print_inline_styles() { $css = <<
-
+
get_captcha(); diff --git a/src/php/GravityForms/Field.php b/src/php/GravityForms/Field.php index 666186be..11023622 100644 --- a/src/php/GravityForms/Field.php +++ b/src/php/GravityForms/Field.php @@ -117,12 +117,12 @@ public function get_form_editor_field_description(): string { return ( esc_attr__( 'Adds a hCaptcha field to your form to help protect your website from spam and bot abuse.', - 'hcaptcha-for-forms-and-more' + 'procaptcha-wordpress' ) . ' ' . esc_attr__( 'hCaptcha settings must be modified on the hCaptcha plugin General settings page.', - 'hcaptcha-for-forms-and-more' + 'procaptcha-wordpress' ) ); } @@ -235,7 +235,7 @@ public function enqueue_admin_script() { self::ADMIN_HANDLE, 'HCaptchaGravityFormsObject', [ - 'onlyOne' => __( 'Only one hCaptcha field can be added to the form.', 'hcaptcha-for-forms-and-more' ), + 'onlyOne' => __( 'Only one hCaptcha field can be added to the form.', 'procaptcha-wordpress' ), ] ); } diff --git a/src/php/GravityForms/Form.php b/src/php/GravityForms/Form.php index 5bbb199c..5ae9a321 100644 --- a/src/php/GravityForms/Form.php +++ b/src/php/GravityForms/Form.php @@ -191,15 +191,15 @@ public function form_validation_errors_markup( $validation_errors_markup, array */ public function print_inline_styles() { $css = <<is_on( 'force' ); $hcaptcha_size = $settings->get( 'size' ); $allowed_sizes = [ 'normal', 'compact', 'invisible' ]; - $args = wp_parse_args( $args, [ @@ -125,7 +124,8 @@ public static function form_display( array $args = [] ) { ?>
%2$s', esc_url( $url ), - __( 'General settings page', 'hcaptcha-for-forms-and-more' ) + __( 'General settings page', 'procaptcha-wordpress' ) ) ) ); @@ -627,7 +627,7 @@ public static function get_hcap_locale(): string { 'Zulu' => 'zul', ]; - // To get all hCaptcha locales, use the following statement on the https://docs.hcaptcha.com/languages page + // To get all hCaptcha locales, use the following statement on the https://docs.prosopo.io/languages page // and remove all double quotes. // phpcs:disable Squiz.Commenting.InlineComment.InvalidEndChar // [...document.querySelectorAll('table tbody tr')].map( r => { return ' + r.querySelector('td:nth-of-type(1)').innerText + ' => ' + r.querySelector('td:nth-of-type(2)').innerText + ' }) diff --git a/src/php/Jetpack/JetpackBase.php b/src/php/Jetpack/JetpackBase.php index 99174c42..175eacba 100644 --- a/src/php/Jetpack/JetpackBase.php +++ b/src/php/Jetpack/JetpackBase.php @@ -120,8 +120,8 @@ public function error_message( $hcaptcha_content = '' ) { */ public function print_inline_styles() { $css = << '
' . $error . '
', - 'console' => __( 'hCaptcha Failed', 'hcaptcha-for-forms-and-more' ), + 'console' => __( 'hCaptcha Failed', 'procaptcha-wordpress' ), 'required' => null, ]; diff --git a/src/php/Kadence/Form.php b/src/php/Kadence/Form.php index c7fdcacc..72fa8e28 100644 --- a/src/php/Kadence/Form.php +++ b/src/php/Kadence/Form.php @@ -97,8 +97,8 @@ public function process_ajax() { // Nonce is checked by Kadence. // phpcs:disable WordPress.Security.NonceVerification.Missing - $hcaptcha_response = isset( $_POST['h-captcha-response'] ) ? - filter_var( wp_unslash( $_POST['h-captcha-response'] ), FILTER_SANITIZE_FULL_SPECIAL_CHARS ) : + $hcaptcha_response = isset( $_POST['procaptcha-response'] ) ? + filter_var( wp_unslash( $_POST['procaptcha-response'] ), FILTER_SANITIZE_FULL_SPECIAL_CHARS ) : ''; $error = hcaptcha_request_verify( $hcaptcha_response ); @@ -107,12 +107,12 @@ public function process_ajax() { return; } - unset( $_POST['h-captcha-response'], $_POST['g-recaptcha-response'] ); + unset( $_POST['procaptcha-response'], $_POST['g-recaptcha-response'] ); // phpcs:enable WordPress.Security.NonceVerification.Missing $data = [ 'html' => '
' . $error . '
', - 'console' => __( 'hCaptcha Failed', 'hcaptcha-for-forms-and-more' ), + 'console' => __( 'hCaptcha Failed', 'procaptcha-wordpress' ), 'required' => null, 'headers_sent' => headers_sent(), ]; diff --git a/src/php/LearnDash/Register.php b/src/php/LearnDash/Register.php index fceebe57..36cc2c06 100644 --- a/src/php/LearnDash/Register.php +++ b/src/php/LearnDash/Register.php @@ -105,7 +105,7 @@ public function add_registration_errors( $registration_errors ) { */ public function print_inline_styles() { $css = <<get_site_key() || '' === $settings->get_secret_key() ) + ( '' === $settings->get_site_key() ) ); $activate = ( ! $deactivate ) || $this->is_elementor_pro_edit_page(); @@ -288,7 +288,7 @@ public function prefetch_hcaptcha_dns( $urls, string $relation_type ): array { $urls = (array) $urls; if ( 'dns-prefetch' === $relation_type ) { - $urls[] = 'https://hcaptcha.com'; + $urls[] = 'https://prosopo.io'; } return $urls; @@ -322,7 +322,7 @@ public function csp_headers( $headers ): array { return $headers; } - $hcap_src = "'self' 'unsafe-inline' 'unsafe-eval' https://hcaptcha.com https://*.hcaptcha.com"; + $hcap_src = "'self' 'unsafe-inline' 'unsafe-eval' https://prosopo.io https://*.prosopo.io"; $hcap_csp = "script-src $hcap_src; frame-src $hcap_src; style-src $hcap_src; connect-src $hcap_src"; $hcap_csp_arr = $this->parse_csp( $hcap_csp ); @@ -404,7 +404,7 @@ public function print_inline_styles() { $div_logo_white_url = HCAPTCHA_URL . '/assets/images/hcaptcha-div-logo-white.svg'; $css = <<force_https( $api_host ); - return "$api_host/1/api.js"; + return "$api_host/js/procaptcha.bundle.js"; } /** @@ -656,7 +656,7 @@ public function print_footer_scripts() { */ $delay = (int) apply_filters( 'hcap_delay_api', (int) $settings->get( 'delay' ) ); - DelayedScript::launch( [ 'src' => $this->get_api_src() ], $delay ); + DelayedScript::launch( [ 'src' => $this->get_api_src() ], $delay, 'module' ); wp_enqueue_script( self::HANDLE, @@ -667,7 +667,7 @@ public function print_footer_scripts() { ); $params = [ - 'sitekey' => $settings->get_site_key(), + 'siteKey' => $settings->get_site_key(), 'theme' => $settings->get_theme(), 'size' => $settings->get( 'size' ), ]; @@ -1327,7 +1327,7 @@ private function plugin_or_theme_active( $plugin_or_theme_names ): bool { public function load_textdomain() { load_default_textdomain(); load_plugin_textdomain( - 'hcaptcha-for-forms-and-more', + 'procaptcha-wordpress', false, dirname( plugin_basename( HCAPTCHA_FILE ) ) . '/languages/' ); diff --git a/src/php/NF/NF.php b/src/php/NF/NF.php index 07b8149c..ca23a608 100644 --- a/src/php/NF/NF.php +++ b/src/php/NF/NF.php @@ -143,7 +143,7 @@ public function nf_admin_enqueue_scripts() { self::ADMIN_HANDLE, 'HCaptchaAdminNFObject', [ - 'onlyOneHCaptchaAllowed' => __( 'Only one hCaptcha field allowed.', 'hcaptcha-for-forms-and-more' ), + 'onlyOneHCaptchaAllowed' => __( 'Only one hCaptcha field allowed.', 'procaptcha-wordpress' ), ] ); } diff --git a/src/php/Otter/Form.php b/src/php/Otter/Form.php index 60890935..f98d6a50 100644 --- a/src/php/Otter/Form.php +++ b/src/php/Otter/Form.php @@ -124,7 +124,7 @@ public function verify( $form_data ) { return $form_data; } - $_POST['h-captcha-response'] = $form_data->get_root_data( 'h-captcha-response' ) ?: ''; + $_POST['procaptcha-response'] = $form_data->get_root_data( 'procaptcha-response' ) ?: ''; $_POST[ self::NONCE ] = $form_data->get_root_data( self::NONCE ) ?: ''; $error_message = hcaptcha_verify_post( diff --git a/src/php/Passster/Protect.php b/src/php/Passster/Protect.php index 3762eeb6..82181636 100644 --- a/src/php/Passster/Protect.php +++ b/src/php/Passster/Protect.php @@ -171,7 +171,7 @@ public function add_type_module( $tag, string $handle, string $src ): string { */ public function print_inline_styles() { $css = <<get_hcaptcha( $form_id ); ?> - +
diff --git a/src/php/Settings/EventsPage.php b/src/php/Settings/EventsPage.php index dac8dbc8..81539d21 100644 --- a/src/php/Settings/EventsPage.php +++ b/src/php/Settings/EventsPage.php @@ -68,7 +68,7 @@ class EventsPage extends PluginSettingsBase { * @return string */ protected function page_title(): string { - return __( 'Events', 'hcaptcha-for-forms-and-more' ); + return __( 'Events', 'procaptcha-wordpress' ); } /** @@ -163,8 +163,8 @@ public function admin_enqueue_scripts() { 'succeed' => $this->succeed, 'failed' => $this->failed, 'unit' => $this->unit, - 'succeedLabel' => __( 'Succeed', 'hcaptcha-for-forms-and-more' ), - 'failedLabel' => __( 'Failed', 'hcaptcha-for-forms-and-more' ), + 'succeedLabel' => __( 'Succeed', 'procaptcha-wordpress' ), + 'failedLabel' => __( 'Failed', 'procaptcha-wordpress' ), ] ); } @@ -183,22 +183,22 @@ public function section_callback( array $arguments ) { if ( ! $this->allowed ) { $statistics_url = admin_url( 'options-general.php?page=hcaptcha&tab=general#statistics_1' ); - $pro_url = 'https://www.hcaptcha.com/pro?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; + $pro_url = 'https://www.prosopo.io/pro?r=wp&utm_source=wordpress&utm_medium=wpplugin&utm_campaign=not'; $message = sprintf( /* translators: 1: Statistics link, 2: Pro account link. */ - __( 'Want to see events statistics? Please turn on the %1$s on the General settings page and upgrade to %2$s.', 'hcaptcha-for-forms-and-more' ), + __( 'Want to see events statistics? Please turn on the %1$s on the General settings page and upgrade to %2$s.', 'procaptcha-wordpress' ), sprintf( /* translators: 1: Statistics switch link, 2: Statistics switch text. */ '%2$s', $statistics_url, - __( 'Statistics switch', 'hcaptcha-for-forms-and-more' ) + __( 'Statistics switch', 'procaptcha-wordpress' ) ), sprintf( /* translators: 1: Pro account link, 2: Pro account text. */ '%2$s', $pro_url, - __( 'Pro account', 'hcaptcha-for-forms-and-more' ) + __( 'Pro account', 'procaptcha-wordpress' ) ) ); @@ -206,7 +206,7 @@ public function section_callback( array $arguments ) {
-

+

- +

diff --git a/src/php/Settings/FormsPage.php b/src/php/Settings/FormsPage.php index 57ff1ee2..13194a69 100644 --- a/src/php/Settings/FormsPage.php +++ b/src/php/Settings/FormsPage.php @@ -62,7 +62,7 @@ class FormsPage extends PluginSettingsBase { * @return string */ protected function page_title(): string { - return __( 'Forms', 'hcaptcha-for-forms-and-more' ); + return __( 'Forms', 'procaptcha-wordpress' ); } /** @@ -156,7 +156,7 @@ public function admin_enqueue_scripts() { [ 'served' => $this->served, 'unit' => $this->unit, - 'servedLabel' => __( 'Served', 'hcaptcha-for-forms-and-more' ), + 'servedLabel' => __( 'Served', 'procaptcha-wordpress' ), ] ); } @@ -178,12 +178,12 @@ public function section_callback( array $arguments ) { $message = sprintf( /* translators: 1: Statistics link. */ - __( 'Want to see forms statistics? Please turn on the %1$s on the General settings page.', 'hcaptcha-for-forms-and-more' ), + __( 'Want to see forms statistics? Please turn on the %1$s on the General settings page.', 'procaptcha-wordpress' ), sprintf( /* translators: 1: Statistics switch link, 2: Statistics switch text. */ '%2$s', $statistics_url, - __( 'Statistics switch', 'hcaptcha-for-forms-and-more' ) + __( 'Statistics switch', 'procaptcha-wordpress' ) ) ); @@ -191,7 +191,7 @@ public function section_callback( array $arguments ) {
-

+

- +

diff --git a/src/php/Settings/General.php b/src/php/Settings/General.php index 285052b5..6f61177c 100644 --- a/src/php/Settings/General.php +++ b/src/php/Settings/General.php @@ -127,7 +127,7 @@ class General extends PluginSettingsBase { * @return string */ protected function page_title(): string { - return __( 'General', 'hcaptcha-for-forms-and-more' ); + return __( 'General', 'procaptcha-wordpress' ); } /** @@ -175,382 +175,382 @@ public function init_notifications() { public function init_form_fields() { $this->form_fields = [ 'site_key' => [ - 'label' => __( 'Site Key', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Site Key', 'procaptcha-wordpress' ), 'type' => 'text', 'autocomplete' => 'nickname', 'lp_ignore' => 'true', 'section' => self::SECTION_KEYS, ], 'secret_key' => [ - 'label' => __( 'Secret Key', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Secret Key', 'procaptcha-wordpress' ), 'type' => 'password', 'section' => self::SECTION_KEYS, ], 'sample_hcaptcha' => [ - 'label' => __( 'Active hCaptcha to Check Site Config', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Active hCaptcha to Check Site Config', 'procaptcha-wordpress' ), 'type' => 'hcaptcha', 'section' => self::SECTION_KEYS, ], 'check_config' => [ - 'label' => __( 'Check Site Config', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Check Site Config', 'procaptcha-wordpress' ), 'type' => 'button', - 'text' => __( 'Check', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Check', 'procaptcha-wordpress' ), 'section' => self::SECTION_KEYS, ], 'reset_notifications' => [ - 'label' => __( 'Reset Notifications', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Reset Notifications', 'procaptcha-wordpress' ), 'type' => 'button', - 'text' => __( 'Reset', 'hcaptcha-for-forms-and-more' ), + 'text' => __( 'Reset', 'procaptcha-wordpress' ), 'section' => self::SECTION_KEYS, ], 'theme' => [ - 'label' => __( 'Theme', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Theme', 'procaptcha-wordpress' ), 'type' => 'select', 'section' => self::SECTION_APPEARANCE, 'options' => [ - 'light' => __( 'Light', 'hcaptcha-for-forms-and-more' ), - 'dark' => __( 'Dark', 'hcaptcha-for-forms-and-more' ), - 'auto' => __( 'Auto', 'hcaptcha-for-forms-and-more' ), + 'light' => __( 'Light', 'procaptcha-wordpress' ), + 'dark' => __( 'Dark', 'procaptcha-wordpress' ), + 'auto' => __( 'Auto', 'procaptcha-wordpress' ), ], - 'helper' => __( 'Select hCaptcha theme.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Select hCaptcha theme.', 'procaptcha-wordpress' ), ], 'size' => [ - 'label' => __( 'Size', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Size', 'procaptcha-wordpress' ), 'type' => 'select', 'section' => self::SECTION_APPEARANCE, 'options' => [ - 'normal' => __( 'Normal', 'hcaptcha-for-forms-and-more' ), - 'compact' => __( 'Compact', 'hcaptcha-for-forms-and-more' ), - 'invisible' => __( 'Invisible', 'hcaptcha-for-forms-and-more' ), + 'normal' => __( 'Normal', 'procaptcha-wordpress' ), + 'compact' => __( 'Compact', 'procaptcha-wordpress' ), + 'invisible' => __( 'Invisible', 'procaptcha-wordpress' ), ], - 'helper' => __( 'Select hCaptcha size.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Select hCaptcha size.', 'procaptcha-wordpress' ), ], 'language' => [ - 'label' => __( 'Language', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Language', 'procaptcha-wordpress' ), 'type' => 'select', 'section' => self::SECTION_APPEARANCE, 'options' => [ - '' => __( '--- Auto-Detect ---', 'hcaptcha-for-forms-and-more' ), - 'af' => __( 'Afrikaans', 'hcaptcha-for-forms-and-more' ), - 'sq' => __( 'Albanian', 'hcaptcha-for-forms-and-more' ), - 'am' => __( 'Amharic', 'hcaptcha-for-forms-and-more' ), - 'ar' => __( 'Arabic', 'hcaptcha-for-forms-and-more' ), - 'hy' => __( 'Armenian', 'hcaptcha-for-forms-and-more' ), - 'az' => __( 'Azerbaijani', 'hcaptcha-for-forms-and-more' ), - 'eu' => __( 'Basque', 'hcaptcha-for-forms-and-more' ), - 'be' => __( 'Belarusian', 'hcaptcha-for-forms-and-more' ), - 'bn' => __( 'Bengali', 'hcaptcha-for-forms-and-more' ), - 'bg' => __( 'Bulgarian', 'hcaptcha-for-forms-and-more' ), - 'bs' => __( 'Bosnian', 'hcaptcha-for-forms-and-more' ), - 'my' => __( 'Burmese', 'hcaptcha-for-forms-and-more' ), - 'ca' => __( 'Catalan', 'hcaptcha-for-forms-and-more' ), - 'ceb' => __( 'Cebuano', 'hcaptcha-for-forms-and-more' ), - 'zh' => __( 'Chinese', 'hcaptcha-for-forms-and-more' ), - 'zh-CN' => __( 'Chinese Simplified', 'hcaptcha-for-forms-and-more' ), - 'zh-TW' => __( 'Chinese Traditional', 'hcaptcha-for-forms-and-more' ), - 'co' => __( 'Corsican', 'hcaptcha-for-forms-and-more' ), - 'hr' => __( 'Croatian', 'hcaptcha-for-forms-and-more' ), - 'cs' => __( 'Czech', 'hcaptcha-for-forms-and-more' ), - 'da' => __( 'Danish', 'hcaptcha-for-forms-and-more' ), - 'nl' => __( 'Dutch', 'hcaptcha-for-forms-and-more' ), - 'en' => __( 'English', 'hcaptcha-for-forms-and-more' ), - 'eo' => __( 'Esperanto', 'hcaptcha-for-forms-and-more' ), - 'et' => __( 'Estonian', 'hcaptcha-for-forms-and-more' ), - 'fa' => __( 'Persian', 'hcaptcha-for-forms-and-more' ), - 'fi' => __( 'Finnish', 'hcaptcha-for-forms-and-more' ), - 'fr' => __( 'French', 'hcaptcha-for-forms-and-more' ), - 'fy' => __( 'Frisian', 'hcaptcha-for-forms-and-more' ), - 'gd' => __( 'Gaelic', 'hcaptcha-for-forms-and-more' ), - 'gl' => __( 'Galician', 'hcaptcha-for-forms-and-more' ), - 'ka' => __( 'Georgian', 'hcaptcha-for-forms-and-more' ), - 'de' => __( 'German', 'hcaptcha-for-forms-and-more' ), - 'el' => __( 'Greek', 'hcaptcha-for-forms-and-more' ), - 'gu' => __( 'Gujarati', 'hcaptcha-for-forms-and-more' ), - 'ht' => __( 'Haitian', 'hcaptcha-for-forms-and-more' ), - 'ha' => __( 'Hausa', 'hcaptcha-for-forms-and-more' ), - 'haw' => __( 'Hawaiian', 'hcaptcha-for-forms-and-more' ), - 'he' => __( 'Hebrew', 'hcaptcha-for-forms-and-more' ), - 'hi' => __( 'Hindi', 'hcaptcha-for-forms-and-more' ), - 'hmn' => __( 'Hmong', 'hcaptcha-for-forms-and-more' ), - 'hu' => __( 'Hungarian', 'hcaptcha-for-forms-and-more' ), - 'is' => __( 'Icelandic', 'hcaptcha-for-forms-and-more' ), - 'ig' => __( 'Igbo', 'hcaptcha-for-forms-and-more' ), - 'id' => __( 'Indonesian', 'hcaptcha-for-forms-and-more' ), - 'ga' => __( 'Irish', 'hcaptcha-for-forms-and-more' ), - 'it' => __( 'Italian', 'hcaptcha-for-forms-and-more' ), - 'ja' => __( 'Japanese', 'hcaptcha-for-forms-and-more' ), - 'jw' => __( 'Javanese', 'hcaptcha-for-forms-and-more' ), - 'kn' => __( 'Kannada', 'hcaptcha-for-forms-and-more' ), - 'kk' => __( 'Kazakh', 'hcaptcha-for-forms-and-more' ), - 'km' => __( 'Khmer', 'hcaptcha-for-forms-and-more' ), - 'rw' => __( 'Kinyarwanda', 'hcaptcha-for-forms-and-more' ), - 'ky' => __( 'Kirghiz', 'hcaptcha-for-forms-and-more' ), - 'ko' => __( 'Korean', 'hcaptcha-for-forms-and-more' ), - 'ku' => __( 'Kurdish', 'hcaptcha-for-forms-and-more' ), - 'lo' => __( 'Lao', 'hcaptcha-for-forms-and-more' ), - 'la' => __( 'Latin', 'hcaptcha-for-forms-and-more' ), - 'lv' => __( 'Latvian', 'hcaptcha-for-forms-and-more' ), - 'lt' => __( 'Lithuanian', 'hcaptcha-for-forms-and-more' ), - 'lb' => __( 'Luxembourgish', 'hcaptcha-for-forms-and-more' ), - 'mk' => __( 'Macedonian', 'hcaptcha-for-forms-and-more' ), - 'mg' => __( 'Malagasy', 'hcaptcha-for-forms-and-more' ), - 'ms' => __( 'Malay', 'hcaptcha-for-forms-and-more' ), - 'ml' => __( 'Malayalam', 'hcaptcha-for-forms-and-more' ), - 'mt' => __( 'Maltese', 'hcaptcha-for-forms-and-more' ), - 'mi' => __( 'Maori', 'hcaptcha-for-forms-and-more' ), - 'mr' => __( 'Marathi', 'hcaptcha-for-forms-and-more' ), - 'mn' => __( 'Mongolian', 'hcaptcha-for-forms-and-more' ), - 'ne' => __( 'Nepali', 'hcaptcha-for-forms-and-more' ), - 'no' => __( 'Norwegian', 'hcaptcha-for-forms-and-more' ), - 'ny' => __( 'Nyanja', 'hcaptcha-for-forms-and-more' ), - 'or' => __( 'Oriya', 'hcaptcha-for-forms-and-more' ), - 'pl' => __( 'Polish', 'hcaptcha-for-forms-and-more' ), - 'pt' => __( 'Portuguese', 'hcaptcha-for-forms-and-more' ), - 'ps' => __( 'Pashto', 'hcaptcha-for-forms-and-more' ), - 'pa' => __( 'Punjabi', 'hcaptcha-for-forms-and-more' ), - 'ro' => __( 'Romanian', 'hcaptcha-for-forms-and-more' ), - 'ru' => __( 'Russian', 'hcaptcha-for-forms-and-more' ), - 'sm' => __( 'Samoan', 'hcaptcha-for-forms-and-more' ), - 'sn' => __( 'Shona', 'hcaptcha-for-forms-and-more' ), - 'sd' => __( 'Sindhi', 'hcaptcha-for-forms-and-more' ), - 'si' => __( 'Sinhala', 'hcaptcha-for-forms-and-more' ), - 'sr' => __( 'Serbian', 'hcaptcha-for-forms-and-more' ), - 'sk' => __( 'Slovak', 'hcaptcha-for-forms-and-more' ), - 'sl' => __( 'Slovenian', 'hcaptcha-for-forms-and-more' ), - 'so' => __( 'Somali', 'hcaptcha-for-forms-and-more' ), - 'st' => __( 'Southern Sotho', 'hcaptcha-for-forms-and-more' ), - 'es' => __( 'Spanish', 'hcaptcha-for-forms-and-more' ), - 'su' => __( 'Sundanese', 'hcaptcha-for-forms-and-more' ), - 'sw' => __( 'Swahili', 'hcaptcha-for-forms-and-more' ), - 'sv' => __( 'Swedish', 'hcaptcha-for-forms-and-more' ), - 'tl' => __( 'Tagalog', 'hcaptcha-for-forms-and-more' ), - 'tg' => __( 'Tajik', 'hcaptcha-for-forms-and-more' ), - 'ta' => __( 'Tamil', 'hcaptcha-for-forms-and-more' ), - 'tt' => __( 'Tatar', 'hcaptcha-for-forms-and-more' ), - 'te' => __( 'Telugu', 'hcaptcha-for-forms-and-more' ), - 'th' => __( 'Thai', 'hcaptcha-for-forms-and-more' ), - 'tr' => __( 'Turkish', 'hcaptcha-for-forms-and-more' ), - 'tk' => __( 'Turkmen', 'hcaptcha-for-forms-and-more' ), - 'ug' => __( 'Uyghur', 'hcaptcha-for-forms-and-more' ), - 'uk' => __( 'Ukrainian', 'hcaptcha-for-forms-and-more' ), - 'ur' => __( 'Urdu', 'hcaptcha-for-forms-and-more' ), - 'uz' => __( 'Uzbek', 'hcaptcha-for-forms-and-more' ), - 'vi' => __( 'Vietnamese', 'hcaptcha-for-forms-and-more' ), - 'cy' => __( 'Welsh', 'hcaptcha-for-forms-and-more' ), - 'xh' => __( 'Xhosa', 'hcaptcha-for-forms-and-more' ), - 'yi' => __( 'Yiddish', 'hcaptcha-for-forms-and-more' ), - 'yo' => __( 'Yoruba', 'hcaptcha-for-forms-and-more' ), - 'zu' => __( 'Zulu', 'hcaptcha-for-forms-and-more' ), + '' => __( '--- Auto-Detect ---', 'procaptcha-wordpress' ), + 'af' => __( 'Afrikaans', 'procaptcha-wordpress' ), + 'sq' => __( 'Albanian', 'procaptcha-wordpress' ), + 'am' => __( 'Amharic', 'procaptcha-wordpress' ), + 'ar' => __( 'Arabic', 'procaptcha-wordpress' ), + 'hy' => __( 'Armenian', 'procaptcha-wordpress' ), + 'az' => __( 'Azerbaijani', 'procaptcha-wordpress' ), + 'eu' => __( 'Basque', 'procaptcha-wordpress' ), + 'be' => __( 'Belarusian', 'procaptcha-wordpress' ), + 'bn' => __( 'Bengali', 'procaptcha-wordpress' ), + 'bg' => __( 'Bulgarian', 'procaptcha-wordpress' ), + 'bs' => __( 'Bosnian', 'procaptcha-wordpress' ), + 'my' => __( 'Burmese', 'procaptcha-wordpress' ), + 'ca' => __( 'Catalan', 'procaptcha-wordpress' ), + 'ceb' => __( 'Cebuano', 'procaptcha-wordpress' ), + 'zh' => __( 'Chinese', 'procaptcha-wordpress' ), + 'zh-CN' => __( 'Chinese Simplified', 'procaptcha-wordpress' ), + 'zh-TW' => __( 'Chinese Traditional', 'procaptcha-wordpress' ), + 'co' => __( 'Corsican', 'procaptcha-wordpress' ), + 'hr' => __( 'Croatian', 'procaptcha-wordpress' ), + 'cs' => __( 'Czech', 'procaptcha-wordpress' ), + 'da' => __( 'Danish', 'procaptcha-wordpress' ), + 'nl' => __( 'Dutch', 'procaptcha-wordpress' ), + 'en' => __( 'English', 'procaptcha-wordpress' ), + 'eo' => __( 'Esperanto', 'procaptcha-wordpress' ), + 'et' => __( 'Estonian', 'procaptcha-wordpress' ), + 'fa' => __( 'Persian', 'procaptcha-wordpress' ), + 'fi' => __( 'Finnish', 'procaptcha-wordpress' ), + 'fr' => __( 'French', 'procaptcha-wordpress' ), + 'fy' => __( 'Frisian', 'procaptcha-wordpress' ), + 'gd' => __( 'Gaelic', 'procaptcha-wordpress' ), + 'gl' => __( 'Galician', 'procaptcha-wordpress' ), + 'ka' => __( 'Georgian', 'procaptcha-wordpress' ), + 'de' => __( 'German', 'procaptcha-wordpress' ), + 'el' => __( 'Greek', 'procaptcha-wordpress' ), + 'gu' => __( 'Gujarati', 'procaptcha-wordpress' ), + 'ht' => __( 'Haitian', 'procaptcha-wordpress' ), + 'ha' => __( 'Hausa', 'procaptcha-wordpress' ), + 'haw' => __( 'Hawaiian', 'procaptcha-wordpress' ), + 'he' => __( 'Hebrew', 'procaptcha-wordpress' ), + 'hi' => __( 'Hindi', 'procaptcha-wordpress' ), + 'hmn' => __( 'Hmong', 'procaptcha-wordpress' ), + 'hu' => __( 'Hungarian', 'procaptcha-wordpress' ), + 'is' => __( 'Icelandic', 'procaptcha-wordpress' ), + 'ig' => __( 'Igbo', 'procaptcha-wordpress' ), + 'id' => __( 'Indonesian', 'procaptcha-wordpress' ), + 'ga' => __( 'Irish', 'procaptcha-wordpress' ), + 'it' => __( 'Italian', 'procaptcha-wordpress' ), + 'ja' => __( 'Japanese', 'procaptcha-wordpress' ), + 'jw' => __( 'Javanese', 'procaptcha-wordpress' ), + 'kn' => __( 'Kannada', 'procaptcha-wordpress' ), + 'kk' => __( 'Kazakh', 'procaptcha-wordpress' ), + 'km' => __( 'Khmer', 'procaptcha-wordpress' ), + 'rw' => __( 'Kinyarwanda', 'procaptcha-wordpress' ), + 'ky' => __( 'Kirghiz', 'procaptcha-wordpress' ), + 'ko' => __( 'Korean', 'procaptcha-wordpress' ), + 'ku' => __( 'Kurdish', 'procaptcha-wordpress' ), + 'lo' => __( 'Lao', 'procaptcha-wordpress' ), + 'la' => __( 'Latin', 'procaptcha-wordpress' ), + 'lv' => __( 'Latvian', 'procaptcha-wordpress' ), + 'lt' => __( 'Lithuanian', 'procaptcha-wordpress' ), + 'lb' => __( 'Luxembourgish', 'procaptcha-wordpress' ), + 'mk' => __( 'Macedonian', 'procaptcha-wordpress' ), + 'mg' => __( 'Malagasy', 'procaptcha-wordpress' ), + 'ms' => __( 'Malay', 'procaptcha-wordpress' ), + 'ml' => __( 'Malayalam', 'procaptcha-wordpress' ), + 'mt' => __( 'Maltese', 'procaptcha-wordpress' ), + 'mi' => __( 'Maori', 'procaptcha-wordpress' ), + 'mr' => __( 'Marathi', 'procaptcha-wordpress' ), + 'mn' => __( 'Mongolian', 'procaptcha-wordpress' ), + 'ne' => __( 'Nepali', 'procaptcha-wordpress' ), + 'no' => __( 'Norwegian', 'procaptcha-wordpress' ), + 'ny' => __( 'Nyanja', 'procaptcha-wordpress' ), + 'or' => __( 'Oriya', 'procaptcha-wordpress' ), + 'pl' => __( 'Polish', 'procaptcha-wordpress' ), + 'pt' => __( 'Portuguese', 'procaptcha-wordpress' ), + 'ps' => __( 'Pashto', 'procaptcha-wordpress' ), + 'pa' => __( 'Punjabi', 'procaptcha-wordpress' ), + 'ro' => __( 'Romanian', 'procaptcha-wordpress' ), + 'ru' => __( 'Russian', 'procaptcha-wordpress' ), + 'sm' => __( 'Samoan', 'procaptcha-wordpress' ), + 'sn' => __( 'Shona', 'procaptcha-wordpress' ), + 'sd' => __( 'Sindhi', 'procaptcha-wordpress' ), + 'si' => __( 'Sinhala', 'procaptcha-wordpress' ), + 'sr' => __( 'Serbian', 'procaptcha-wordpress' ), + 'sk' => __( 'Slovak', 'procaptcha-wordpress' ), + 'sl' => __( 'Slovenian', 'procaptcha-wordpress' ), + 'so' => __( 'Somali', 'procaptcha-wordpress' ), + 'st' => __( 'Southern Sotho', 'procaptcha-wordpress' ), + 'es' => __( 'Spanish', 'procaptcha-wordpress' ), + 'su' => __( 'Sundanese', 'procaptcha-wordpress' ), + 'sw' => __( 'Swahili', 'procaptcha-wordpress' ), + 'sv' => __( 'Swedish', 'procaptcha-wordpress' ), + 'tl' => __( 'Tagalog', 'procaptcha-wordpress' ), + 'tg' => __( 'Tajik', 'procaptcha-wordpress' ), + 'ta' => __( 'Tamil', 'procaptcha-wordpress' ), + 'tt' => __( 'Tatar', 'procaptcha-wordpress' ), + 'te' => __( 'Telugu', 'procaptcha-wordpress' ), + 'th' => __( 'Thai', 'procaptcha-wordpress' ), + 'tr' => __( 'Turkish', 'procaptcha-wordpress' ), + 'tk' => __( 'Turkmen', 'procaptcha-wordpress' ), + 'ug' => __( 'Uyghur', 'procaptcha-wordpress' ), + 'uk' => __( 'Ukrainian', 'procaptcha-wordpress' ), + 'ur' => __( 'Urdu', 'procaptcha-wordpress' ), + 'uz' => __( 'Uzbek', 'procaptcha-wordpress' ), + 'vi' => __( 'Vietnamese', 'procaptcha-wordpress' ), + 'cy' => __( 'Welsh', 'procaptcha-wordpress' ), + 'xh' => __( 'Xhosa', 'procaptcha-wordpress' ), + 'yi' => __( 'Yiddish', 'procaptcha-wordpress' ), + 'yo' => __( 'Yoruba', 'procaptcha-wordpress' ), + 'zu' => __( 'Zulu', 'procaptcha-wordpress' ), ], 'helper' => __( "By default, hCaptcha will automatically detect the user's locale and localize widgets accordingly.", - 'hcaptcha-for-forms-and-more' + 'procaptcha-wordpress' ), ], 'mode' => [ - 'label' => __( 'Mode', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Mode', 'procaptcha-wordpress' ), 'type' => 'select', 'section' => self::SECTION_APPEARANCE, // phpcs:disable WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned, WordPress.Arrays.MultipleStatementAlignment.LongIndexSpaceBeforeDoubleArrow 'options' => [ - self::MODE_LIVE => __( 'Live', 'hcaptcha-for-forms-and-more' ), - self::MODE_TEST_PUBLISHER => __( 'Test: Publisher Account', 'hcaptcha-for-forms-and-more' ), - self::MODE_TEST_ENTERPRISE_SAFE_END_USER => __( 'Test: Enterprise Account (Safe End User)', 'hcaptcha-for-forms-and-more' ), - self::MODE_TEST_ENTERPRISE_BOT_DETECTED => __( 'Test: Enterprise Account (Bot Detected)', 'hcaptcha-for-forms-and-more' ), + self::MODE_LIVE => __( 'Live', 'procaptcha-wordpress' ), + self::MODE_TEST_PUBLISHER => __( 'Test: Publisher Account', 'procaptcha-wordpress' ), + self::MODE_TEST_ENTERPRISE_SAFE_END_USER => __( 'Test: Enterprise Account (Safe End User)', 'procaptcha-wordpress' ), + self::MODE_TEST_ENTERPRISE_BOT_DETECTED => __( 'Test: Enterprise Account (Bot Detected)', 'procaptcha-wordpress' ), ], // phpcs:enable WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned, WordPress.Arrays.MultipleStatementAlignment.LongIndexSpaceBeforeDoubleArrow 'default' => self::MODE_LIVE, 'helper' => __( 'Select live or test mode. In test mode, predefined keys are used.', - 'hcaptcha-for-forms-and-more' + 'procaptcha-wordpress' ), ], 'force' => [ - 'label' => __( 'Force hCaptcha', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Force hCaptcha', 'procaptcha-wordpress' ), 'type' => 'checkbox', 'section' => self::SECTION_APPEARANCE, 'options' => [ - 'on' => __( 'Force hCaptcha', 'hcaptcha-for-forms-and-more' ), + 'on' => __( 'Force hCaptcha', 'procaptcha-wordpress' ), ], - 'helper' => __( 'Force hCaptcha check before submit.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Force hCaptcha check before submit.', 'procaptcha-wordpress' ), ], 'custom_themes' => [ - 'label' => __( 'Custom Themes', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Custom Themes', 'procaptcha-wordpress' ), 'type' => 'checkbox', 'section' => self::SECTION_CUSTOM, 'options' => [ - 'on' => __( 'Enable Custom Themes', 'hcaptcha-for-forms-and-more' ), + 'on' => __( 'Enable Custom Themes', 'procaptcha-wordpress' ), ], 'helper' => sprintf( /* translators: 1: hCaptcha Pro link, 2: hCaptcha Enterprise link. */ - __( 'Note: only works on hCaptcha %1$s and %2$s site keys.', 'hcaptcha-for-forms-and-more' ), + __( 'Note: only works on hCaptcha %1$s and %2$s site keys.', 'procaptcha-wordpress' ), sprintf( - '%s', - __( 'Pro', 'hcaptcha-for-forms-and-more' ) + '%s', + __( 'Pro', 'procaptcha-wordpress' ) ), sprintf( - '%s', - __( 'Enterprise', 'hcaptcha-for-forms-and-more' ) + '%s', + __( 'Enterprise', 'procaptcha-wordpress' ) ) ), ], 'custom_prop' => [ - 'label' => __( 'Property', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Property', 'procaptcha-wordpress' ), 'type' => 'select', 'options' => [], 'section' => self::SECTION_CUSTOM, - 'helper' => __( 'Select custom theme property.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Select custom theme property.', 'procaptcha-wordpress' ), ], 'custom_value' => [ - 'label' => __( 'Value', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Value', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_CUSTOM, - 'helper' => __( 'Set property value.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Set property value.', 'procaptcha-wordpress' ), ], 'config_params' => [ - 'label' => __( 'Config Params', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Config Params', 'procaptcha-wordpress' ), 'type' => 'textarea', 'section' => self::SECTION_CUSTOM, 'helper' => sprintf( /* translators: 1: hCaptcha render params doc link. */ - __( 'hCaptcha render %s (optional). Must be a valid JSON.', 'hcaptcha-for-forms-and-more' ), + __( 'hCaptcha render %s (optional). Must be a valid JSON.', 'procaptcha-wordpress' ), sprintf( - '%s', - __( 'parameters', 'hcaptcha-for-forms-and-more' ) + '%s', + __( 'parameters', 'procaptcha-wordpress' ) ) ), ], 'api_host' => [ - 'label' => __( 'API Host', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'API Host', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_ENTERPRISE, 'default' => Main::API_HOST, 'helper' => __( 'See Enterprise docs.' ), ], 'asset_host' => [ - 'label' => __( 'Asset Host', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Asset Host', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_ENTERPRISE, - 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'See Enterprise docs.', 'procaptcha-wordpress' ), ], 'endpoint' => [ - 'label' => __( 'Endpoint', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Endpoint', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_ENTERPRISE, - 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'See Enterprise docs.', 'procaptcha-wordpress' ), ], 'host' => [ - 'label' => __( 'Host', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Host', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_ENTERPRISE, - 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'See Enterprise docs.', 'procaptcha-wordpress' ), ], 'image_host' => [ - 'label' => __( 'Image Host', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Image Host', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_ENTERPRISE, - 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'See Enterprise docs.', 'procaptcha-wordpress' ), ], 'report_api' => [ - 'label' => __( 'Report API', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Report API', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_ENTERPRISE, - 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'See Enterprise docs.', 'procaptcha-wordpress' ), ], 'sentry' => [ - 'label' => __( 'Sentry', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Sentry', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_ENTERPRISE, - 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'See Enterprise docs.', 'procaptcha-wordpress' ), ], 'backend' => [ - 'label' => __( 'Backend', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Backend', 'procaptcha-wordpress' ), 'type' => 'text', 'section' => self::SECTION_ENTERPRISE, 'default' => Main::VERIFY_HOST, - 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'See Enterprise docs.', 'procaptcha-wordpress' ), ], 'off_when_logged_in' => [ - 'label' => __( 'Other Settings', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Other Settings', 'procaptcha-wordpress' ), 'type' => 'checkbox', 'section' => self::SECTION_OTHER, 'options' => [ - 'on' => __( 'Turn Off When Logged In', 'hcaptcha-for-forms-and-more' ), + 'on' => __( 'Turn Off When Logged In', 'procaptcha-wordpress' ), ], - 'helper' => __( 'Do not show hCaptcha to logged-in users.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Do not show hCaptcha to logged-in users.', 'procaptcha-wordpress' ), ], 'recaptcha_compat_off' => [ 'type' => 'checkbox', 'section' => self::SECTION_OTHER, 'options' => [ - 'on' => __( 'Disable reCAPTCHA Compatibility', 'hcaptcha-for-forms-and-more' ), + 'on' => __( 'Disable reCAPTCHA Compatibility', 'procaptcha-wordpress' ), ], - 'helper' => __( 'Use if including both hCaptcha and reCAPTCHA on the same page.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Use if including both hCaptcha and reCAPTCHA on the same page.', 'procaptcha-wordpress' ), ], self::NETWORK_WIDE => [ 'type' => 'checkbox', 'section' => self::SECTION_OTHER, 'options' => [ - 'on' => __( 'Use network-wide settings', 'hcaptcha-for-forms-and-more' ), + 'on' => __( 'Use network-wide settings', 'procaptcha-wordpress' ), ], - 'helper' => __( 'On multisite, use same settings for all sites of the network.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'On multisite, use same settings for all sites of the network.', 'procaptcha-wordpress' ), ], 'whitelisted_ips' => [ - 'label' => __( 'Whitelisted IPs', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Whitelisted IPs', 'procaptcha-wordpress' ), 'type' => 'textarea', 'section' => self::SECTION_OTHER, - 'helper' => __( 'Do not show hCaptcha for listed IP addresses. Please specify one IP address per line.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Do not show hCaptcha for listed IP addresses. Please specify one IP address per line.', 'procaptcha-wordpress' ), ], 'login_limit' => [ - 'label' => __( 'Login attempts before hCaptcha', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Login attempts before hCaptcha', 'procaptcha-wordpress' ), 'type' => 'number', 'section' => self::SECTION_OTHER, 'default' => 0, 'min' => 0, - 'helper' => __( 'Maximum number of failed login attempts before showing hCaptcha.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Maximum number of failed login attempts before showing hCaptcha.', 'procaptcha-wordpress' ), ], 'login_interval' => [ - 'label' => __( 'Failed login attempts interval, min', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Failed login attempts interval, min', 'procaptcha-wordpress' ), 'type' => 'number', 'section' => self::SECTION_OTHER, 'default' => 15, 'min' => 1, - 'helper' => __( 'Time interval in minutes when failed login attempts are counted.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Time interval in minutes when failed login attempts are counted.', 'procaptcha-wordpress' ), ], 'delay' => [ - 'label' => __( 'Delay showing hCaptcha, ms', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Delay showing hCaptcha, ms', 'procaptcha-wordpress' ), 'type' => 'number', 'section' => self::SECTION_OTHER, 'default' => -100, 'min' => -100, 'step' => 100, - 'helper' => __( 'Delay time for loading the hCaptcha API script. Any negative value will prevent the API script from loading until user interaction: mouseenter, click, scroll or touch. This significantly improves Google Pagespeed Insights score.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Delay time for loading the hCaptcha API script. Any negative value will prevent the API script from loading until user interaction: mouseenter, click, scroll or touch. This significantly improves Google Pagespeed Insights score.', 'procaptcha-wordpress' ), ], 'statistics' => [ - 'label' => __( 'Statistics', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Statistics', 'procaptcha-wordpress' ), 'type' => 'checkbox', 'section' => self::SECTION_STATISTICS, 'options' => [ - 'on' => __( 'Enable Statistics', 'hcaptcha-for-forms-and-more' ), + 'on' => __( 'Enable Statistics', 'procaptcha-wordpress' ), ], - 'helper' => __( 'By turning the statistics on, you agree to the collection of non-personal data to improve the plugin.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'By turning the statistics on, you agree to the collection of non-personal data to improve the plugin.', 'procaptcha-wordpress' ), ], 'collect_ip' => [ - 'label' => __( 'Collection', 'hcaptcha-for-forms-and-more' ), + 'label' => __( 'Collection', 'procaptcha-wordpress' ), 'type' => 'checkbox', 'section' => self::SECTION_STATISTICS, 'options' => [ - 'on' => __( 'Collect IP', 'hcaptcha-for-forms-and-more' ), + 'on' => __( 'Collect IP', 'procaptcha-wordpress' ), ], - 'helper' => __( 'Allow collecting of IP addresses from which forms were sent.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Allow collecting of IP addresses from which forms were sent.', 'procaptcha-wordpress' ), ], 'collect_ua' => [ 'type' => 'checkbox', 'section' => self::SECTION_STATISTICS, 'options' => [ - 'on' => __( 'Collect User Agent', 'hcaptcha-for-forms-and-more' ), + 'on' => __( 'Collect User Agent', 'procaptcha-wordpress' ), ], - 'helper' => __( 'Allow collecting of User Agent headers of users sending forms.', 'hcaptcha-for-forms-and-more' ), + 'helper' => __( 'Allow collecting of User Agent headers of users sending forms.', 'procaptcha-wordpress' ), ], ]; @@ -583,7 +583,7 @@ public function setup_fields() { $custom_theme = $this->flatten_array( $custom_theme ); $options = []; $custom_theme = array_merge( - [ esc_html__( '- Select Property -', 'hcaptcha-for-forms-and-more' ) => '' ], + [ esc_html__( '- Select Property -', 'procaptcha-wordpress' ) => '' ], $custom_theme ); @@ -616,22 +616,22 @@ public function section_callback( array $arguments ) {
notifications->show(); - $this->print_section_header( $arguments['id'], __( 'Keys', 'hcaptcha-for-forms-and-more' ) ); + $this->print_section_header( $arguments['id'], __( 'Keys', 'procaptcha-wordpress' ) ); break; case self::SECTION_APPEARANCE: - $this->print_section_header( $arguments['id'], __( 'Appearance', 'hcaptcha-for-forms-and-more' ) ); + $this->print_section_header( $arguments['id'], __( 'Appearance', 'procaptcha-wordpress' ) ); break; case self::SECTION_CUSTOM: - $this->print_section_header( $arguments['id'], __( 'Custom', 'hcaptcha-for-forms-and-more' ) ); + $this->print_section_header( $arguments['id'], __( 'Custom', 'procaptcha-wordpress' ) ); break; case self::SECTION_ENTERPRISE: - $this->print_section_header( $arguments['id'], __( 'Enterprise', 'hcaptcha-for-forms-and-more' ) ); + $this->print_section_header( $arguments['id'], __( 'Enterprise', 'procaptcha-wordpress' ) ); break; case self::SECTION_OTHER: - $this->print_section_header( $arguments['id'], __( 'Other', 'hcaptcha-for-forms-and-more' ) ); + $this->print_section_header( $arguments['id'], __( 'Other', 'procaptcha-wordpress' ) ); break; case self::SECTION_STATISTICS: - $this->print_section_header( $arguments['id'], __( 'Statistics', 'hcaptcha-for-forms-and-more' ) ); + $this->print_section_header( $arguments['id'], __( 'Statistics', 'procaptcha-wordpress' ) ); break; default: break; @@ -665,7 +665,7 @@ private function print_section_header( string $id, string $title ) { $open = false; $disabled = true; - $title .= ' - ' . __( 'hCaptcha Pro Required', 'hcaptcha-for-forms-and-more' ); + $title .= ' - ' . __( 'hCaptcha Pro Required', 'procaptcha-wordpress' ); } break; case self::SECTION_ENTERPRISE: @@ -673,7 +673,7 @@ private function print_section_header( string $id, string $title ) { $open = false; $disabled = true; - $title .= ' - ' . __( 'hCaptcha Enterprise Required', 'hcaptcha-for-forms-and-more' ); + $title .= ' - ' . __( 'hCaptcha Enterprise Required', 'procaptcha-wordpress' ); } break; default: @@ -722,8 +722,8 @@ public function admin_enqueue_scripts() { ); $check_config_notice = - esc_html__( 'Credentials changed.', 'hcaptcha-for-forms-and-more' ) . "\n" . - esc_html__( 'Please complete hCaptcha and check the site config.', 'hcaptcha-for-forms-and-more' ); + esc_html__( 'Credentials changed.', 'procaptcha-wordpress' ) . "\n" . + esc_html__( 'Please complete hCaptcha and check the site config.', 'procaptcha-wordpress' ); wp_localize_script( self::HANDLE, @@ -743,10 +743,10 @@ public function admin_enqueue_scripts() { 'modeTestEnterpriseSafeEndUserSiteKey' => self::MODE_TEST_ENTERPRISE_SAFE_END_USER_SITE_KEY, 'modeTestEnterpriseBotDetectedSiteKey' => self::MODE_TEST_ENTERPRISE_BOT_DETECTED_SITE_KEY, 'checkConfigNotice' => $check_config_notice, - 'checkingConfigMsg' => __( 'Checking site config...', 'hcaptcha-for-forms-and-more' ), - 'completeHCaptchaTitle' => __( 'Please complete the hCaptcha.', 'hcaptcha-for-forms-and-more' ), - 'completeHCaptchaContent' => __( 'Before checking the site config, please complete the Active hCaptcha in the current section.', 'hcaptcha-for-forms-and-more' ), - 'OKBtnText' => __( 'OK', 'hcaptcha-for-forms-and-more' ), + 'checkingConfigMsg' => __( 'Checking site config...', 'procaptcha-wordpress' ), + 'completeHCaptchaTitle' => __( 'Please complete the Procaptcha.', 'procaptcha-wordpress' ), + 'completeHCaptchaContent' => __( 'Before checking the site config, please complete the Active hCaptcha in the current section.', 'procaptcha-wordpress' ), + 'OKBtnText' => __( 'OK', 'procaptcha-wordpress' ), ] ); @@ -756,6 +756,7 @@ public function admin_enqueue_scripts() { [ static::PREFIX . '-' . SettingsBase::HANDLE, self::DIALOG_HANDLE ], constant( 'HCAPTCHA_VERSION' ) ); + } /** @@ -789,7 +790,7 @@ public function print_hcaptcha_field() { ?>

- +

ID ?? 0; if ( ! $user_id ) { - wp_send_json_error( esc_html__( 'Cannot save section status.', 'hcaptcha-for-forms-and-more' ) ); + wp_send_json_error( esc_html__( 'Cannot save section status.', 'procaptcha-wordpress' ) ); } $hcaptcha_user_settings = array_filter( @@ -934,10 +935,9 @@ private function send_check_config_error( string $error, bool $raw_result = fals $prefix = ''; if ( ! $raw_result ) { - $prefix = esc_html__( 'Site configuration error', 'hcaptcha-for-forms-and-more' ); + $prefix = esc_html__( 'Site configuration error', 'procaptcha-wordpress' ); $prefix = $error ? $prefix . ': ' : $prefix . '.'; } - wp_send_json_error( $prefix . $error ); } diff --git a/src/php/Settings/Integrations.php b/src/php/Settings/Integrations.php index ceed4a87..c02f0631 100644 --- a/src/php/Settings/Integrations.php +++ b/src/php/Settings/Integrations.php @@ -60,7 +60,7 @@ class Integrations extends PluginSettingsBase { * @return string */ protected function page_title(): string { - return __( 'Integrations', 'hcaptcha-for-forms-and-more' ); + return __( 'Integrations', 'procaptcha-wordpress' ); } /** @@ -92,33 +92,33 @@ public function init_form_fields() { 'label' => 'WP Core', 'type' => 'checkbox', 'options' => [ - 'comment' => __( 'Comment Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Lost Password Form', 'hcaptcha-for-forms-and-more' ), - 'password_protected' => __( 'Post/Page Password Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'comment' => __( 'Comment Form', 'procaptcha-wordpress' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Lost Password Form', 'procaptcha-wordpress' ), + 'password_protected' => __( 'Post/Page Password Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'acfe_status' => [ 'label' => 'ACF Extended', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'ACF Extended Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'ACF Extended Form', 'procaptcha-wordpress' ), ], ], 'affiliates_status' => [ 'label' => 'Affiliates', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Affiliates Login Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Affiliates Register Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Affiliates Login Form', 'procaptcha-wordpress' ), + 'register' => __( 'Affiliates Register Form', 'procaptcha-wordpress' ), ], ], 'asgaros_status' => [ 'label' => 'Asgaros', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'avada_status' => [ @@ -126,22 +126,22 @@ public function init_form_fields() { 'label' => 'Avada', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Avada Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Avada Form', 'procaptcha-wordpress' ), ], ], 'back_in_stock_notifier_status' => [ 'label' => 'Back In Stock Notifier', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Back In Stock Notifier Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Back In Stock Notifier Form', 'procaptcha-wordpress' ), ], ], 'bbp_status' => [ 'label' => 'bbPress', 'type' => 'checkbox', 'options' => [ - 'new_topic' => __( 'New Topic Form', 'hcaptcha-for-forms-and-more' ), - 'reply' => __( 'Reply Form', 'hcaptcha-for-forms-and-more' ), + 'new_topic' => __( 'New Topic Form', 'procaptcha-wordpress' ), + 'reply' => __( 'Reply Form', 'procaptcha-wordpress' ), ], ], 'beaver_builder_status' => [ @@ -149,8 +149,8 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'contact' => __( 'Contact Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), + 'contact' => __( 'Contact Form', 'procaptcha-wordpress' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), ], ], 'brizy_status' => [ @@ -158,7 +158,7 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'bp_status' => [ @@ -166,34 +166,34 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'create_group' => __( 'Create Group Form', 'hcaptcha-for-forms-and-more' ), - 'registration' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'create_group' => __( 'Create Group Form', 'procaptcha-wordpress' ), + 'registration' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'classified_listing_status' => [ 'label' => 'Classified Listing', 'type' => 'checkbox', 'options' => [ - 'contact' => __( 'Contact Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Lost Password Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'contact' => __( 'Contact Form', 'procaptcha-wordpress' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Lost Password Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'coblocks_status' => [ 'label' => 'CoBlocks', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'colorlib_customizer_status' => [ 'label' => 'Colorlib Login Customizer', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Lost Password Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Lost Password Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'cf7_status' => [ @@ -201,7 +201,7 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'divi_status' => [ @@ -209,17 +209,17 @@ public function init_form_fields() { 'label' => 'Divi', 'type' => 'checkbox', 'options' => [ - 'comment' => __( 'Divi Comment Form', 'hcaptcha-for-forms-and-more' ), - 'contact' => __( 'Divi Contact Form', 'hcaptcha-for-forms-and-more' ), - 'email_optin' => __( 'Divi Email Optin Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Divi Login Form', 'hcaptcha-for-forms-and-more' ), + 'comment' => __( 'Divi Comment Form', 'procaptcha-wordpress' ), + 'contact' => __( 'Divi Contact Form', 'procaptcha-wordpress' ), + 'email_optin' => __( 'Divi Email Optin Form', 'procaptcha-wordpress' ), + 'login' => __( 'Divi Login Form', 'procaptcha-wordpress' ), ], ], 'download_manager_status' => [ 'label' => 'Download Manager', 'type' => 'checkbox', 'options' => [ - 'button' => __( 'Button', 'hcaptcha-for-forms-and-more' ), + 'button' => __( 'Button', 'procaptcha-wordpress' ), ], ], 'easy_digital_downloads_status' => [ @@ -227,10 +227,10 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'checkout' => __( 'Checkout Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Lost Password Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'checkout' => __( 'Checkout Form', 'procaptcha-wordpress' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Lost Password Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'elementor_pro_status' => [ @@ -238,23 +238,23 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Login', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), + 'login' => __( 'Login', 'procaptcha-wordpress' ), ], ], 'essential_addons_status' => [ 'label' => 'Essential Addons', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login', 'procaptcha-wordpress' ), + 'register' => __( 'Register', 'procaptcha-wordpress' ), ], ], 'fluent_status' => [ 'label' => 'Fluent Forms', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'formidable_forms_status' => [ @@ -262,14 +262,14 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'forminator_status' => [ 'label' => 'Forminator', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'give_wp_status' => [ @@ -277,7 +277,7 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'gravity_status' => [ @@ -285,15 +285,15 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form Auto-Add', 'hcaptcha-for-forms-and-more' ), - 'embed' => __( 'Form Embed', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form Auto-Add', 'procaptcha-wordpress' ), + 'embed' => __( 'Form Embed', 'procaptcha-wordpress' ), ], ], 'html_forms_status' => [ 'label' => 'HTML Forms', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'jetpack_status' => [ @@ -301,7 +301,7 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'contact' => __( 'Contact Form', 'hcaptcha-for-forms-and-more' ), + 'contact' => __( 'Contact Form', 'procaptcha-wordpress' ), ], ], 'kadence_status' => [ @@ -309,8 +309,8 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Kadence Form', 'hcaptcha-for-forms-and-more' ), - 'advanced_form' => __( 'Kadence Advanced Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Kadence Form', 'procaptcha-wordpress' ), + 'advanced_form' => __( 'Kadence Advanced Form', 'procaptcha-wordpress' ), ], ], 'learn_dash_status' => [ @@ -318,17 +318,17 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Lost Password Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Lost Password Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'login_signup_popup_status' => [ 'label' => 'Login Signup Popup', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'mailchimp_status' => [ @@ -336,7 +336,7 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'mailpoet_status' => [ @@ -344,7 +344,7 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'memberpress_status' => [ @@ -352,22 +352,22 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'ninja_status' => [ 'label' => 'Ninja Forms', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'otter_status' => [ 'label' => 'Otter Blocks', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'paid_memberships_pro_status' => [ @@ -375,31 +375,31 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'checkout' => __( 'Checkout Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), + 'checkout' => __( 'Checkout Form', 'procaptcha-wordpress' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), ], ], 'passster_status' => [ 'label' => 'Passster', 'type' => 'checkbox', 'options' => [ - 'protect' => __( 'Protection Form', 'hcaptcha-for-forms-and-more' ), + 'protect' => __( 'Protection Form', 'procaptcha-wordpress' ), ], ], 'profile_builder_status' => [ 'label' => 'Profile Builder', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Recover Password Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Recover Password Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'quform_status' => [ 'label' => 'Quform', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'sendinblue_status' => [ @@ -407,21 +407,21 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'simple_basic_contact_form_status' => [ 'label' => 'Simple Basic Contact Form', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'simple_download_monitor_status' => [ 'label' => 'Simple Download Monitor', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'spectra_status' => [ @@ -429,66 +429,66 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'subscriber_status' => [ 'label' => 'Subscriber', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'supportcandy_status' => [ 'label' => 'Support Candy', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], 'theme_my_login_status' => [ 'label' => 'Theme My Login', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Lost Password Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Lost Password Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'ultimate_member_status' => [ 'label' => 'Ultimate Member', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Lost Password Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Lost Password Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'users_wp_status' => [ 'label' => 'Users WP', 'type' => 'checkbox', 'options' => [ - 'forgot' => __( 'Forgot Password Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'forgot' => __( 'Forgot Password Form', 'procaptcha-wordpress' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'woocommerce_status' => [ 'label' => 'WooCommerce', 'type' => 'checkbox', 'options' => [ - 'checkout' => __( 'Checkout Form', 'hcaptcha-for-forms-and-more' ), - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), - 'lost_pass' => __( 'Lost Password Form', 'hcaptcha-for-forms-and-more' ), - 'order_tracking' => __( 'Order Tracking Form', 'hcaptcha-for-forms-and-more' ), - 'register' => __( 'Register Form', 'hcaptcha-for-forms-and-more' ), + 'checkout' => __( 'Checkout Form', 'procaptcha-wordpress' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), + 'lost_pass' => __( 'Lost Password Form', 'procaptcha-wordpress' ), + 'order_tracking' => __( 'Order Tracking Form', 'procaptcha-wordpress' ), + 'register' => __( 'Register Form', 'procaptcha-wordpress' ), ], ], 'woocommerce_wishlists_status' => [ 'label' => 'WooCommerce Wishlists', 'type' => 'checkbox', 'options' => [ - 'create_list' => __( 'Create List Form', 'hcaptcha-for-forms-and-more' ), + 'create_list' => __( 'Create List Form', 'procaptcha-wordpress' ), ], ], 'wordfence_status' => [ @@ -496,38 +496,38 @@ public function init_form_fields() { 'logo' => 'svg', 'type' => 'checkbox', 'options' => [ - 'login' => __( 'Login Form', 'hcaptcha-for-forms-and-more' ), + 'login' => __( 'Login Form', 'procaptcha-wordpress' ), ], ], 'wpforms_status' => [ 'label' => 'WPForms', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form Auto-Add', 'hcaptcha-for-forms-and-more' ), - 'embed' => __( 'Form Embed', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form Auto-Add', 'procaptcha-wordpress' ), + 'embed' => __( 'Form Embed', 'procaptcha-wordpress' ), ], ], 'wpdiscuz_status' => [ 'label' => 'WPDiscuz', 'type' => 'checkbox', 'options' => [ - 'comment_form' => __( 'Comment Form', 'hcaptcha-for-forms-and-more' ), - 'subscribe_form' => __( 'Subscribe Form', 'hcaptcha-for-forms-and-more' ), + 'comment_form' => __( 'Comment Form', 'procaptcha-wordpress' ), + 'subscribe_form' => __( 'Subscribe Form', 'procaptcha-wordpress' ), ], ], 'wpforo_status' => [ 'label' => 'WPForo', 'type' => 'checkbox', 'options' => [ - 'new_topic' => __( 'New Topic Form', 'hcaptcha-for-forms-and-more' ), - 'reply' => __( 'Reply Form', 'hcaptcha-for-forms-and-more' ), + 'new_topic' => __( 'New Topic Form', 'procaptcha-wordpress' ), + 'reply' => __( 'Reply Form', 'procaptcha-wordpress' ), ], ], 'wp_job_openings_status' => [ 'label' => 'WP Job Openings', 'type' => 'checkbox', 'options' => [ - 'form' => __( 'Form', 'hcaptcha-for-forms-and-more' ), + 'form' => __( 'Form', 'procaptcha-wordpress' ), ], ], ]; @@ -625,7 +625,7 @@ public function search_box() { + placeholder="">
-

+

- +

- +

%2$s', $shortcode_url, - __( 'shortcode', 'hcaptcha-for-forms-and-more' ) + __( 'shortcode', 'procaptcha-wordpress' ) ), sprintf( '%2$s', $integration_url, - __( 'request an integration', 'hcaptcha-for-forms-and-more' ) + __( 'request an integration', 'procaptcha-wordpress' ) ) ) ); ?>

-

+

self::ACTIVATE_ACTION, 'nonce' => wp_create_nonce( self::ACTIVATE_ACTION ), /* translators: 1: Plugin name. */ - 'activateMsg' => __( 'Activate %s plugin?', 'hcaptcha-for-forms-and-more' ), + 'activateMsg' => __( 'Activate %s plugin?', 'procaptcha-wordpress' ), /* translators: 1: Plugin name. */ - 'deactivateMsg' => __( 'Deactivate %s plugin?', 'hcaptcha-for-forms-and-more' ), + 'deactivateMsg' => __( 'Deactivate %s plugin?', 'procaptcha-wordpress' ), /* translators: 1: Theme name. */ - 'activateThemeMsg' => __( 'Activate %s theme?', 'hcaptcha-for-forms-and-more' ), + 'activateThemeMsg' => __( 'Activate %s theme?', 'procaptcha-wordpress' ), /* translators: 1: Theme name. */ - 'deactivateThemeMsg' => __( 'Deactivate %s theme?', 'hcaptcha-for-forms-and-more' ), - 'selectThemeMsg' => __( 'Select theme to activate:', 'hcaptcha-for-forms-and-more' ), - 'onlyOneThemeMsg' => __( 'Cannot deactivate the only theme on the site.', 'hcaptcha-for-forms-and-more' ), - 'unexpectedErrorMsg' => __( 'Unexpected error.', 'hcaptcha-for-forms-and-more' ), - 'OKBtnText' => __( 'OK', 'hcaptcha-for-forms-and-more' ), - 'CancelBtnText' => __( 'Cancel', 'hcaptcha-for-forms-and-more' ), + 'deactivateThemeMsg' => __( 'Deactivate %s theme?', 'procaptcha-wordpress' ), + 'selectThemeMsg' => __( 'Select theme to activate:', 'procaptcha-wordpress' ), + 'onlyOneThemeMsg' => __( 'Cannot deactivate the only theme on the site.', 'procaptcha-wordpress' ), + 'unexpectedErrorMsg' => __( 'Unexpected error.', 'procaptcha-wordpress' ), + 'OKBtnText' => __( 'OK', 'procaptcha-wordpress' ), + 'CancelBtnText' => __( 'Cancel', 'procaptcha-wordpress' ), 'themes' => $this->get_themes(), 'defaultTheme' => $this->get_default_theme(), ] @@ -798,7 +798,7 @@ protected function process_plugins( bool $activate, array $plugins, string $plug if ( ! $this->activate_plugins( $plugins ) ) { $message = sprintf( /* translators: 1: Plugin name. */ - __( 'Error activating %s plugin.', 'hcaptcha-for-forms-and-more' ), + __( 'Error activating %s plugin.', 'procaptcha-wordpress' ), $plugin_name ); @@ -807,7 +807,7 @@ protected function process_plugins( bool $activate, array $plugins, string $plug $message = sprintf( /* translators: 1: Plugin name. */ - __( '%s plugin is activated.', 'hcaptcha-for-forms-and-more' ), + __( '%s plugin is activated.', 'procaptcha-wordpress' ), $plugin_name ); @@ -818,7 +818,7 @@ protected function process_plugins( bool $activate, array $plugins, string $plug $message = sprintf( /* translators: 1: Plugin name. */ - __( '%s plugin is deactivated.', 'hcaptcha-for-forms-and-more' ), + __( '%s plugin is deactivated.', 'procaptcha-wordpress' ), $plugin_name ); @@ -836,7 +836,7 @@ protected function process_theme( string $theme ) { if ( ! $this->activate_theme( $theme ) ) { $message = sprintf( /* translators: 1: Theme name. */ - __( 'Error activating %s theme.', 'hcaptcha-for-forms-and-more' ), + __( 'Error activating %s theme.', 'procaptcha-wordpress' ), $theme ); @@ -845,7 +845,7 @@ protected function process_theme( string $theme ) { $message = sprintf( /* translators: 1: Theme name. */ - __( '%s theme is activated.', 'hcaptcha-for-forms-and-more' ), + __( '%s theme is activated.', 'procaptcha-wordpress' ), $theme ); diff --git a/src/php/Settings/PluginSettingsBase.php b/src/php/Settings/PluginSettingsBase.php index 02ac235f..953e8d79 100644 --- a/src/php/Settings/PluginSettingsBase.php +++ b/src/php/Settings/PluginSettingsBase.php @@ -46,7 +46,7 @@ public function __construct( $tabs = [] ) { * @return string */ protected function menu_title(): string { - $menu_title = __( 'hCaptcha', 'hcaptcha-for-forms-and-more' ); + $menu_title = __( 'hCaptcha', 'procaptcha-wordpress' ); $icon = constant( 'HCAPTCHA_URL' ) . '/assets/images/hcaptcha-icon.svg'; $icon = 'hCaptcha icon'; @@ -122,7 +122,7 @@ protected function plugin_version(): string { * @return string */ protected function settings_link_label(): string { - return __( 'hCaptcha Settings', 'hcaptcha-for-forms-and-more' ); + return __( 'hCaptcha Settings', 'procaptcha-wordpress' ); } /** @@ -131,7 +131,7 @@ protected function settings_link_label(): string { * @return string */ protected function settings_link_text(): string { - return __( 'Settings', 'hcaptcha-for-forms-and-more' ); + return __( 'Settings', 'procaptcha-wordpress' ); } /** @@ -140,7 +140,7 @@ protected function settings_link_text(): string { * @return string */ protected function text_domain(): string { - return 'hcaptcha-for-forms-and-more'; + return 'procaptcha-wordpress'; } /** @@ -164,7 +164,7 @@ public function setup_fields() { public function settings_page() { ?> @@ -214,13 +214,13 @@ public function admin_footer_text( $text ) { return $text; } - $url = 'https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/reviews/?filter=5#new-post'; + $url = 'https://wordpress.org/support/plugin/procaptcha-wordpress/reviews/?filter=5#new-post'; return wp_kses( sprintf( /* translators: 1: plugin name, 2: wp.org review link with stars, 3: wp.org review link with text. */ - __( 'Please rate %1$s %2$s on %3$s. Thank you!', 'hcaptcha-for-forms-and-more' ), - 'hCaptcha for WordPress', + __( 'Please rate %1$s %2$s on %3$s. Thank you!', 'procaptcha-wordpress' ), + 'Procaptcha for WordPress', sprintf( '★★★★★', $url @@ -254,7 +254,7 @@ public function update_footer( $content ) { return sprintf( /* translators: 1: plugin version. */ - __( 'Version %s', 'hcaptcha-for-forms-and-more' ), + __( 'Version %s', 'procaptcha-wordpress' ), constant( 'HCAPTCHA_VERSION' ) ); } @@ -269,12 +269,12 @@ public function update_footer( $content ) { protected function run_checks( string $action ) { // Run a security check. if ( ! check_ajax_referer( $action, 'nonce', false ) ) { - wp_send_json_error( esc_html__( 'Your session has expired. Please reload the page.', 'hcaptcha-for-forms-and-more' ) ); + wp_send_json_error( esc_html__( 'Your session has expired. Please reload the page.', 'procaptcha-wordpress' ) ); } // Check for permissions. if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( esc_html__( 'You are not allowed to perform this action.', 'hcaptcha-for-forms-and-more' ) ); + wp_send_json_error( esc_html__( 'You are not allowed to perform this action.', 'procaptcha-wordpress' ) ); } } } diff --git a/src/php/Settings/SystemInfo.php b/src/php/Settings/SystemInfo.php index cadf6b4e..1e92a985 100644 --- a/src/php/Settings/SystemInfo.php +++ b/src/php/Settings/SystemInfo.php @@ -38,7 +38,7 @@ class SystemInfo extends PluginSettingsBase { * @return string */ protected function page_title(): string { - return __( 'System Info', 'hcaptcha-for-forms-and-more' ); + return __( 'System Info', 'procaptcha-wordpress' ); } /** @@ -66,7 +66,7 @@ public function admin_enqueue_scripts() { self::HANDLE, self::OBJECT, [ - 'copiedMsg' => __( 'System info copied to clipboard.', 'hcaptcha-for-forms-and-more' ), + 'copiedMsg' => __( 'System info copied to clipboard.', 'procaptcha-wordpress' ), ] ); @@ -86,11 +86,11 @@ public function admin_enqueue_scripts() { public function section_callback( array $arguments ) { ?>

- +

- +