webnuvola / antispambot
Stand-alone antispambot function from WordPress
Installs: 2 259
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
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
This package allows you to use the antispambot
function outside of WordPress.
Installation
You can install the package via composer:
composer require webnuvola/antispambot
Usage
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
Use antispambot_html
function to return an instance of Illuminate\Support\HtmlString
to use with Laravel framework.
Documentation
antispambot
on WordPress Developer Resources.
Testing
composer test
Credits
License
This software is release under GPL v2. Please see LICENSE file for more information.