Skip to content

Commit

Permalink
💄 Fix gaps for hidden inputs
Browse files Browse the repository at this point in the history
See #52
  • Loading branch information
MatzeKitt committed Sep 1, 2024
1 parent 825c88e commit 9fe9294
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions assets/style/form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
}
}

&.is-type-hidden,
&.is-type-system,
&:last-child {
margin-bottom: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/blocks/class-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function add_form_id_input( string $block_content, array $block ): string
* @return string Updated block content
*/
public function add_honeypot( string $block_content, array $block ): string {
$honeypot = '<div class="wp-block-form-block-input form-block__element"><input name="_town" type="text" aria-hidden="true" autocomplete="new-password" style="padding: 0; clip: rect(1px, 1px, 1px, 1px); position: absolute !important; white-space: nowrap; height: 1px; width: 1px; overflow: hidden;" tabindex="-1" /></div>';
$honeypot = '<div class="wp-block-form-block-input form-block__element is-type-system"><input name="_town" type="text" aria-hidden="true" autocomplete="new-password" style="padding: 0; clip: rect(1px, 1px, 1px, 1px); position: absolute !important; white-space: nowrap; height: 1px; width: 1px; overflow: hidden;" tabindex="-1" /></div>';

/**
* Filter the honeypot code.
Expand Down

0 comments on commit 9fe9294

Please sign in to comment.