timnarr/kirby-obfuscate-email
最新稳定版本:0.1.0
Composer 安装命令:
composer require timnarr/kirby-obfuscate-email
包简介
This plugin provides field methods to obfuscate email addresses.
README 文档
README
This plugin provides e-mail obfuscation via field-methods to prevent spam bots from harvesting e-mail addresses from your website.
Credits
First things first - I basically copied this plugin code from seehat's post in the Kirby forum. Many thanks to him.
Installation via Composer
composer require timnarr/kirby-obfuscate-email
Usage
Use the obfuscateEmail() field method if you just want to obfuscate an single e-mail value from a field. Example:
$page->emailField()->obfuscateEmail().
If you want to obfuscate multiple e-mails in a text field you can use the obfuscateEmails() method. This method uses regex to find all e-mails and obfuscate them. Example: $page->myTextField()->obfuscateEmails().
Options
| Option | Default | Type | Description |
|---|---|---|---|
regex |
/[A-Z0-9\._%+-]+(@)[A-Z0-9\.-]+(\.)[a-z]{2,}/i |
string | Regular expression, used to find e-mails in text. Change to custom pattern if needed. |
License
MIT License Copyright © 2024-present Tim Narr
统计信息
- 总下载量: 1.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 19
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-15