Skip to content

Commit 8fb8f62

Browse files
kagg-designMaison da Silva
andauthored
V3.5.0 (#300)
* Fix composer.json. * Bump up version. * Add ability to process customized MailChimp forms. * Add the ability to process customized MailChimp forms. * Remove unneeded arrays from load_modules. * Add hCaptcha field to GF admin. * Verify any type of GF hcaptcha field on front. * Do not auto-add hCaptcha if reCaptcha is in the form. * Disable duplication link on hCaptcha field. * Prevent duplication of hCaptcha field by JS. * Add hCaptcha field settings in GF. * Set GF hCaptcha default values in JS. * Fix init issue. * Update GF styles. * Styling GF with auto/injected/modern/legacy. * Make GF injected hCaptcha label hidden by default. * Styling GF with auto/injected/modern/legacy. * Differ auto and insertion mode for GF. * Fix GF tests. * Amend GF tests. * Fix yarn on CI. * Fix yarn on CI. * Make hCaptcha active when editing a GF form. * Make hCaptcha active when editing a GF form. * Add hCaptcha settings information on the GF edit page. * Fix yarn on CI. * Fix Main test. * Fix yarn on CI. * Fix comments. * Update readme.txt. * Update readme.txt. * Fix loading of local .mo files. * WPCS in AutoVerify.php. * Grammar and WPCS. * WPCS in request.php. * Grammar and WPCS. * Add embed setting to GF. * Add HTML Forms integration. * Fix NF naming. * Do not display a size option for NF field. * Clean and update NF code. * Fix WPForo tests on CI. * Clean and update NF code. * Grammar. * Add template in admin. * Make hCaptcha visible in admin (no JS source + Backbone). Fix bug in NF - template id is different for admin and front. * Make hCaptcha active in admin. Update hCaptcha on open/close of settings drawer. * Update readme.txt. Fix yarn.lock. * Optimize NF admin mutation observer. * Add invisible hCaptcha support for Ninja Forms. * Fix yarn on CI. * Fix yarn on CI. * Fix yarn on CI. * Upgrade js packages. * Upgrade readme.txt. * Reposition hCaptcha field in NF admin. * Fix yarn on CI. * Add icon to NF hCaptcha. * Prevent from having multiple hCaptcha fields in NF. * Prevent from having multiple hCaptcha fields in NF. * Prevent from having multiple hCaptcha fields in NF. * Update hCaptcha when adding another field. * Update hCaptcha when adding another field. * Place hCaptcha field before recaptcha field. * Fix updating preloadedFormData. * Fix fatal with WP Dark Mode plugin and HCaptcha in dev mode. * Respect dark theme basically. * Upgrade readme.txt. * Respect dark theme by WP Dark Theme plugin. * Upgrade readme.txt. * Fix dark mode bugs. * Add support for the Droit Dark Mode plugin. * Upgrade readme.txt. * Update readme.txt. * Add Blogstream theme. * Add WP hook system in JS. * Fix MailPoet issues in admin. * Lang ptBR * Add PHP 8.3 support. * Add PHP 8.3 support. * Update readme.txt. * Add pt_BR translation. * Do not include .pot files in the distribution package. * Add pt_BR translation. * Add pt_BR translation. * Update en_US.pot. * Prevent flickering with dark mode plugins. * Prevent flickering with dark mode plugins. * Add ability to activate/deactivate themes from the Integrations settings page. * Test dismissed notifications. * Test dismissed notifications. * Test dismissed notifications. * Test shuffled notifications. * Test admin_enqueue_scripts. * Test admin_enqueue_scripts. * Add pt_BR translation. * Test dismiss_notification(). * Test dismiss_notification(). * Test dismiss_notification(). * Cover Notifications in 100%. * Cover HCaptchaHandler with tests 100%. * Cover Jetpack with tests by 100%. * Cover Wordfence with tests by 100%. * Cover functions with tests by 100%. * Cover functions with tests by 100%. * Rename dir in tests. * Cover HCaptcha helpers with tests by 100%. * Bump up version. --------- Co-authored-by: Maison da Silva <maisonmdsgreen@hotmail.com>
1 parent 00bf947 commit 8fb8f62

File tree

101 files changed

+4688
-1431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+4688
-1431
lines changed

.distignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
/phpcs.xml
2222
/webpack.config.js
2323
/yarn.lock
24+
/languages/*.pot
2425

2526
# Directories
2627
/.codeception

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
os: [ ubuntu-latest ]
10-
php-version: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
10+
php-version: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
1111

1212
env:
1313
wp-directory: wordpress
@@ -52,6 +52,7 @@ jobs:
5252
working-directory: ${{ env.wp-plugin-directory }}
5353
if: ${{ matrix.php-version == '8.2' }}
5454
run: |
55+
corepack enable
5556
yarn set version stable
5657
yarn
5758
yarn dev
@@ -93,6 +94,11 @@ jobs:
9394
working-directory: ${{ env.wp-directory }}
9495
run: wp plugin install bbpress buddypress ultimate-member wpforms-lite wpforo
9596

97+
- name: Install plugins requiring 7.1
98+
if: ${{ matrix.php-version >= '7.1' }}
99+
working-directory: ${{ env.wp-directory }}
100+
run: wp plugin install wpforo
101+
96102
- name: Install plugins requiring 7.2
97103
if: ${{ matrix.php-version >= '7.2' }}
98104
working-directory: ${{ env.wp-directory }}

.github/workflows/create-zip.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020

2121
- name: Install packages
2222
run: |
23+
corepack enable
2324
yarn set version stable
2425
yarn
2526
yarn prod

.github/workflows/deploy-to-wp-org.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222

2323
- name: Install packages
2424
run: |
25+
corepack enable
2526
yarn set version stable
2627
yarn
2728
yarn prod

.tests/js/assets-js-files/integrations.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function getDom() {
2727
<tr class="hcaptcha-integrations-wp-status">
2828
<th scope="row">
2929
<img src="https://test.test/wp-content/plugins/hcaptcha-wordpress-plugin/assets/images/wp-core-logo.png"
30-
alt="WP Core Logo">
30+
alt="WP Core Logo" data-entity="core">
3131
</th>
3232
<td>
3333
<fieldset>
@@ -71,7 +71,7 @@ function getDom() {
7171
<tr class="hcaptcha-integrations-acfe-status">
7272
<th scope="row">
7373
<img src="https://test.test/wp-content/plugins/hcaptcha-wordpress-plugin/assets/images/acf-extended-logo.png"
74-
alt="ACF Extended Logo">
74+
alt="ACF Extended Logo" data-entity="plugin">
7575
</th>
7676
<td>
7777
<fieldset disabled="disabled">

.tests/php/integration/AAAMainTest.php

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ static function () use ( $whitelisted ) {
161161
self::assertSame( - PHP_INT_MAX, has_action( 'plugins_loaded', [ $hcaptcha, 'init_hooks' ] ) );
162162

163163
self::assertSame( - PHP_INT_MAX + 1, has_action( 'plugins_loaded', [ $hcaptcha, 'load_modules' ] ) );
164-
self::assertSame( 10, has_action( 'plugins_loaded', [ $hcaptcha, 'load_textdomain' ] ) );
165164

166165
self::assertSame( 10, has_filter( 'wp_resource_hints', [ $hcaptcha, 'prefetch_hcaptcha_dns' ] ) );
167166
self::assertSame( 10, has_filter( 'wp_headers', [ $hcaptcha, 'csp_headers' ] ) );
@@ -192,10 +191,6 @@ static function () use ( $whitelisted ) {
192191
- PHP_INT_MAX + 1,
193192
has_action( 'plugins_loaded', [ $subject, 'load_modules' ] )
194193
);
195-
self::assertSame(
196-
10,
197-
has_action( 'plugins_loaded', [ $subject, 'load_textdomain' ] )
198-
);
199194
self::assertSame(
200195
- PHP_INT_MAX,
201196
has_filter(
@@ -293,10 +288,6 @@ static function () {
293288
- PHP_INT_MAX + 1,
294289
has_action( 'plugins_loaded', [ $subject, 'load_modules' ] )
295290
);
296-
self::assertSame(
297-
10,
298-
has_action( 'plugins_loaded', [ $subject, 'load_textdomain' ] )
299-
);
300291
self::assertSame(
301292
- PHP_INT_MAX,
302293
has_filter(
@@ -544,12 +535,17 @@ public function test_print_inline_styles() {
544535
background-position: 50% 79%;
545536
}
546537
547-
.h-captcha[data-theme="light"]::before {
538+
.h-captcha[data-theme="light"]::before,
539+
body.is-light-theme .h-captcha[data-theme="auto"]::before,
540+
.h-captcha[data-theme="auto"]::before {
548541
background-color: #fafafa;
549542
border: 1px solid #e0e0e0;
550543
}
551544
552-
.h-captcha[data-theme="dark"]::before {
545+
.h-captcha[data-theme="dark"]::before,
546+
body.is-dark-theme .h-captcha[data-theme="auto"]::before,
547+
html.wp-dark-mode-active .h-captcha[data-theme="auto"]::before,
548+
html.drdt-dark-mode .h-captcha[data-theme="auto"]::before {
553549
background-image: url(' . $div_logo_url_white . ');
554550
background-repeat: no-repeat;
555551
background-color: #333;
@@ -703,7 +699,8 @@ function delayedLoad() {
703699
} )();
704700
</script>';
705701

706-
$site_key = 'some key';
702+
$site_key = 'some site key';
703+
$secret_key = 'some secret key';
707704
$theme = 'light';
708705
$size = 'normal';
709706
$language = $language ?: '';
@@ -727,6 +724,7 @@ function delayedLoad() {
727724
'recaptcha_compat_off' => $compat ? [ $compat ] : [],
728725
'language' => $language,
729726
'site_key' => $site_key,
727+
'secret_key' => $secret_key,
730728
'mode' => 'live',
731729
'theme' => $theme,
732730
'size' => $size,
@@ -1210,9 +1208,9 @@ public function dp_test_load_modules(): array {
12101208
\HCaptcha\GiveWP\Form::class,
12111209
],
12121210
'Gravity Forms' => [
1213-
[ 'gravity_status', 'form' ],
1211+
[ 'gravity_status', null ],
12141212
'gravityforms/gravityforms.php',
1215-
\HCaptcha\GravityForms\Form::class,
1213+
[ \HCaptcha\GravityForms\Form::class, \HCaptcha\GravityForms\Field::class ],
12161214
],
12171215
'Jetpack' => [
12181216
[ 'jetpack_status', 'contact' ],
@@ -1468,8 +1466,6 @@ static function ( $override, $domain, $mofile ) use ( &$override_filter_params )
14681466
3
14691467
);
14701468

1471-
self::assertEquals( 10, has_action( 'plugins_loaded', [ $subject, 'load_textdomain' ] ) );
1472-
14731469
$subject->load_textdomain();
14741470

14751471
self::assertFalse( $override_filter_params[0] );

0 commit comments

Comments
 (0)