Skip to content

Commit a80c2f0

Browse files
authored
hidden extended via hiddenByClass and hiddenContainer
The hiddenByClass is used for explicit what class to use for hide element. The hiddenContainer is template for sprintf
1 parent c88c017 commit a80c2f0

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

app/Config/Honeypot.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,23 @@ class Honeypot extends BaseConfig
1111
* @var boolean
1212
*/
1313
public $hidden = true;
14-
/**
15-
* Hide the Honypot. The default is style, but if the CSP is enabled, it is better to use class.
14+
15+
/**
16+
* Hide the Honeypot. If not set or null, the style parameter will be use. Otherwise it will be set the class parametr by inserted string.
1617
* Example:
17-
* public $hiddenBy = 'class="hidden"';
18+
* public $hiddenBy = 'hidden';
19+
*
20+
* @var ?string
21+
*/
22+
public $hiddenByClass = null;
23+
24+
/**
25+
* Div wrapper of honeypot.
1826
*
1927
* @var string
2028
*/
21-
public $hiddenBy = 'style="display:none"';
29+
public $hiddenContainer = '<div %s>%s</div>';
30+
2231
/**
2332
* Honeypot Label Content
2433
*

0 commit comments

Comments
 (0)