<commit_before>=== Email Encoder Bundle ===
Contributors: freelancephp
Tags: email, hide, mailto, spam, protection, spambots, encoder, encrypt, encode, obfuscate, antispam, spamming
Requires at least: 2.7.0
Tested up to: 3.5.0
Stable tag: 0.60

Protect email addresses on your site from spambots and being used for spamming. This plugin encodes all email adresses so spambots cannot read them.

== Description ==

Protect email addresses on your site from spambots and being used for spamming. This plugin encodes all email adresses so spambots cannot read them.

= Features =
* Protect plain emails and mailto links
* Encode all kind of content (text and html)
* Scanning posts, widgets, comments and RSS feeds
* Choose one of the high-quality encoding methods
* Supports querystrings like '<EMAIL>?subject=Plugin'
* Put an Email Encoder Form on your site

= Tags =
* `[encode_email email="..." display="..." method="..."]` Encode the given email, "display" is optional otherwise the email wil be used as display
* `[encode_content method="..."]...[/encode_content]` Encode content, "method" is optional otherwise the method set in the admin options page
* `[email_encoder_form]` Puts an encoder form in your post (check if the option is activated on this page)

= Template functions =
* `<?php echo encode_email( $email, [ $display ], [ $method ], [ $extra_attrs ] ); ?>` Encode the given email, the other params are optional
* `<?php echo encode_content( $content, [ $method ] ); ?>` Encode the given content for emails to encode
* `<?php echo encode_email_filter( $content, [ $enc_tags ], [ $enc_mailtos ], [ $enc_plain_emails ] ); ?>` Filter the given content for emails to encode, the other params are optional

= Support =
Supports PHP4.3+ and up to latest WP version.

== Installation ==

1. Go to `Plugins` in the Admin menu
1. Click on the button `Add new`
1. Search for `Email Encode Bundle` and click 'Install Now' or click on the `upload` link to upload `email-encode-bundle.zip`
1. Click on `Activate plugin`

== Frequently Asked Questions ==

= How do I encode my emailaddress(es)? =

In the posts you can use this shortcode:
`[email_encode email="<EMAIL>" display="My Email"]`

By default the option `Encode mailto links` and that means this of html snippet will also be encoded:
`<a href="mailto:<EMAIL>">My Email</a>`

The default method is `JavaScript ASCII` the following output will be created in the source code of the page:
`<script type="text/javascript">/*<![CDATA[*/ML="mo@k<insc:r.y=-Ehe a\">f/lMt";MI="4CB8HC77=D0C5HJ1>H563DB@:AF=D0C5HJ190<6C0A2JA7J;6HDBBJ5JHA=DI<B?0C5HDEI<B?0C5H4GCE";OT="";for(j=0;j<MI.length;j++){OT+=ML.charAt(MI.charCodeAt(j)-48);}document.write(OT);/*]]>*/</script><noscript>*protected email*</noscript>`

This code is not readable by spambots and protects your emailaddress.

= Which encoding method should I use? =

The `Html Encode` method is a simple method. Probably JavaScript methods like JavaScript ASCII` would be a better protection against spambots.

= How to create mailto links that opens in a new window? =

You could add extra params to the mailto link and add `target='_blank'` for opening them in a new window, like:
`[encode_email email="<EMAIL>" display="My Mail" extra_attrs="target='_blank'"]`

= How can I add custom filters for encoding? =

If you use other plugins that needs to be encoded you can add a callback to the action "init_email_encoder_bundle".
For Example:

`add_action('init_email_encoder_bundle', 'extra_encode_filters');`

`function extra_encode_filters($filter_callback) {`
`	add_filter('bbp_get_reply_content', $filter_callback);`
`	add_filter('bbp_get_topic_content', $filter_callback);`
`}`

= How to encode emails in ALL widgets? =

If the option 'All text widgets' is activated, only text widgets will be filtered for encoding.
It's possible to filter all widgets by using the Widget Logic plugin and activate the 'widget_content' filter.<commit_msg>Updated documentation<commit_after>=== Email Encoder Bundle ===
Contributors: freelancephp
Tags: email, hide, mailto, spam, protection, spambots, encoder, encrypt, encode, obfuscate, antispam, spamming
Requires at least: 2.7.0
Tested up to: 3.5.0
Stable tag: 0.60

Protect email addresses on your site from spambots and being used for spamming. This plugin encodes all email adresses so spambots cannot read them.

== Description ==

Protect email addresses on your site from spambots and being used for spamming. This plugin encodes all email adresses so spambots cannot read them.

= Features =
* Protect plain emails and mailto links
* Encode all kind of content (text and html)
* Scanning posts, widgets, comments and RSS feeds
* Choose one of the high-quality encoding methods
* Supports querystrings like '<EMAIL>?subject=Plugin'
* Put an Email Encoder Form on your site

= Tags =
Encode the given email, "display" is optional:
`[encode_email email="..." display="..."]`

Encode content, "method" is optional:
`[encode_content method="..."]...[/encode_content]`

Puts an encoder form in your post:
`[email_encoder_form]`

= Template functions =
Encode the given email (other params are optional):
`<?php echo encode_email($email, [$display], [$method], [$extra_attrs]); ?>`

Encode the given content for emails to encode (other param is optional):
`<?php echo encode_content($content, [$method]); ?>`

Filter the given content for emails to encode (other params are optional):
`<?php echo encode_email_filter($content, [$enc_tags], [$enc_mailtos], [$enc_plain_emails]); ?>`

= Hooks =
Add extra code on initialize the Email Encoder Bundle (f.e. add extra filters for encoding):
`add_action('init_email_encoder_bundle', 'extra_encode_filters');

function extra_encode_filters($filter_callback) {
	add_filter('some_filter', $filter_callback);
}`

= Support =
Supports PHP4.3+ and up to latest WP version.

= Contact =
[Send our comment](http://www.freelancephp.net/email-encoder-php-class-wp-plugin/)[ or question](http://www.freelancephp.net/contact/)

== Installation ==

1. Go to `Plugins` in the Admin menu
1. Click on the button `Add new`
1. Search for `Email Encode Bundle` and click 'Install Now' or click on the `upload` link to upload `email-encode-bundle.zip`
1. Click on `Activate plugin`

== Frequently Asked Questions ==

= How do I encode my emailaddress(es)? =

In the posts you can use this shortcode:
`[email_encode email="<EMAIL>" display="My Email"]`

By default the option `Encode mailto links` and that means this of html snippet will also be encoded:
`<a href="mailto:<EMAIL>">My Email</a>`

The default method is `JavaScript ASCII` the following output will be created in the source code of the page:
`<script type="text/javascript">/*<![CDATA[*/ML="mo@k<insc:r.y=-Ehe a\">f/lMt";MI="4CB8HC77=D0C5HJ1>H563DB@:AF=D0C5HJ190<6C0A2JA7J;6HDBBJ5JHA=DI<B?0C5HDEI<B?0C5H4GCE";OT="";for(j=0;j<MI.length;j++){OT+=ML.charAt(MI.charCodeAt(j)-48);}document.write(OT);/*]]>*/</script><noscript>*protected email*</noscript>`

This code is not readable by spambots and protects your emailaddress.

= Which encoding method should I use? =

The `Html Encode` method is a simple method. Probably JavaScript methods like JavaScript ASCII` would be a better protection against spambots.

= How to create mailto links that opens in a new window? =

You could add extra params to the mailto link and add `target='_blank'` for opening them in a new window, like:
`[encode_email email="<EMAIL>" display="My Mail" extra_attrs="target='_blank'"]`

= How can I encode content of BBPress plugin? =

If you use other plugins that needs to be encoded you can add a callback to the action "init_email_encoder_bundle".
For Example:

`add_action('init_email_encoder_bundle', 'extra_encode_filters');

function extra_encode_filters($filter_callback) {
	add_filter('bbp_get_reply_content', $filter_callback);
	add_filter('bbp_get_topic_content', $filter_callback);
}`

= How to encode emails in ALL widgets? =

If the option 'All text widgets' is activated, only text widgets will be filtered for encoding.
It's possible to filter all widgets by using the Widget Logic plugin and activate the 'widget_content' filter.
{'fraction_non_alphanumeric': 0.11160166789305861, 'fraction_numerical': 0.010792249202845229, 'mean_word_length': 5.406127258444619, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4753674', 'n_tokens_mistral': 2572, 'n_tokens_neox': 2479, 'n_words': 982}