An open API service indexing awesome lists of open source software.

https://github.com/webnuvola/antispambot

Stand-alone antispambot function from WordPress
https://github.com/webnuvola/antispambot

antispam antispambot email obfuscation php spam wordpress

Last synced: about 2 months ago
JSON representation

Stand-alone antispambot function from WordPress

Awesome Lists containing this project

README

          

# Antispambot
[![Latest Version on Packagist](https://img.shields.io/packagist/v/webnuvola/antispambot.svg?style=flat-square)](https://packagist.org/packages/webnuvola/antispambot)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/webnuvola/antispambot/tests.yml?branch=main&style=flat-square)](https://github.com/Webnuvola/antispambot/actions?query=branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/webnuvola/antispambot.svg?style=flat-square)](https://packagist.org/packages/webnuvola/antispambot)

This package allows you to use the `antispambot` function outside of WordPress.

## Installation
You can install the package via composer:

```bash
composer require webnuvola/antispambot
```

## Usage
```php
echo antispambot('demo@example.com');
// Example output: demo@example.com
// Example output decoded: demo@example.com

echo antispambot('demo@example.com', 'Contact us');
// Example output: Contact us

echo antispambot('demo@example.com', 'Contact us', ['class' => 'text-white', 'target' => '_blank']);
// Example output: Contact us

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](https://developer.wordpress.org/reference/functions/antispambot/).

## Testing
```bash
composer test
```

## Credits
- [WordPress](https://wordpress.org/)
- [Fabio Cagliero](https://github.com/fab120)

## License
This software is release under GPL v2. Please see [LICENSE](LICENSE) file for more information.