webnuvola / antispambot
WordPress 独立的 antispambot 功能
v1.5.0
2024-03-01 16:46 UTC
Requires
- php: ^8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.14
- illuminate/support: ^9.0 || ^10.0 || ^11.0
- pestphp/pest: ^2.34
Suggests
- illuminate/support: Required to use antispambot_html function (^9.0||^10.0||^11.0)
README
此包允许您在 WordPress 外部使用 antispambot
功能。
安装
您可以通过 composer 安装此包
composer require webnuvola/antispambot
用法
echo antispambot('demo@example.com'); // Example output: <a href="mailto:demo@example.com">demo@example.com</a> // Example output decoded: <a href="mailto:demo@example.com">demo@example.com</a> echo antispambot('demo@example.com', 'Contact us'); // Example output: <a href="mailto:info@example.com">Contact us</a> echo antispambot('demo@example.com', 'Contact us', ['class' => 'text-white', 'target' => '_blank']); // Example output: <a href="mailto:info@example.com" class="text-white" target="_blank">Contact us</a> echo \Webnuvola\Antispambot\Antispambot::antispambot('demo@example.com'); // Example output: demo@example.com
使用 antispambot_html
函数返回一个 Illuminate\Support\HtmlString
实例,用于与 Laravel 框架一起使用。
文档
antispambot
在 WordPress 开发者资源 中。
测试
composer test
致谢
许可证
本软件根据 GPL v2 发布。有关更多信息,请参阅 LICENSE 文件。