This package allows you to use the antispambot
function outside of WordPress.
You can install the package via composer:
composer require webnuvola/antispambot
echo antispambot('[email protected]');
// Example output: <a href="mailto:demo@example.com">demo@example.com</a>
// Example output decoded: <a href="mailto:[email protected]">[email protected]</a>
echo antispambot('[email protected]', 'Contact us');
// Example output: <a href="mailto:info@example.com">Contact us</a>
echo antispambot('[email protected]', '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('[email protected]');
// Example output: demo@example.com
Use antispambot_html
function to return an instance of Illuminate\Support\HtmlString
to use with Laravel framework.
antispambot
on WordPress Developer Resources.
composer test
This software is release under GPL v2. Please see LICENSE file for more information.