Version Description
- Added
link
attribute to[encode]
shortcode
Download this release
Release Info
Developer | tillkruess |
Plugin | Email Address Encoder |
Version | 1.0.22 |
Comparing to | |
See all releases |
Code changes from version 1.0.21 to 1.0.22
- email-address-encoder.php +13 -1
- readme.txt +7 -2
email-address-encoder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Email Address Encoder
|
4 |
Plugin URI: https://encoder.till.im/
|
5 |
Description: A lightweight plugin that protects email addresses from email-harvesting robots by encoding them into decimal and hexadecimal entities.
|
6 |
-
Version: 1.0.
|
7 |
Author: Till Krüss
|
8 |
Author URI: https://till.im/
|
9 |
Text Domain: email-address-encoder
|
@@ -95,9 +95,21 @@ function eae_register_shortcode() {
|
|
95 |
* @return string Encoded given text
|
96 |
*/
|
97 |
function eae_shortcode( $attributes, $content = '' ) {
|
|
|
|
|
|
|
|
|
98 |
// override encoding function with the 'eae_method' filter
|
99 |
$method = apply_filters( 'eae_method', 'eae_encode_str' );
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
return $method( $content );
|
102 |
}
|
103 |
|
3 |
Plugin Name: Email Address Encoder
|
4 |
Plugin URI: https://encoder.till.im/
|
5 |
Description: A lightweight plugin that protects email addresses from email-harvesting robots by encoding them into decimal and hexadecimal entities.
|
6 |
+
Version: 1.0.22
|
7 |
Author: Till Krüss
|
8 |
Author URI: https://till.im/
|
9 |
Text Domain: email-address-encoder
|
95 |
* @return string Encoded given text
|
96 |
*/
|
97 |
function eae_shortcode( $attributes, $content = '' ) {
|
98 |
+
$atts = shortcode_atts( array(
|
99 |
+
'link' => null,
|
100 |
+
), $attributes, 'encode' );
|
101 |
+
|
102 |
// override encoding function with the 'eae_method' filter
|
103 |
$method = apply_filters( 'eae_method', 'eae_encode_str' );
|
104 |
|
105 |
+
if ( ! empty( $atts[ 'link' ] ) ) {
|
106 |
+
return sprintf(
|
107 |
+
'<a href="%s">%s</a>',
|
108 |
+
esc_attr( $method( $atts[ 'link' ] ) ),
|
109 |
+
$method( $content )
|
110 |
+
);
|
111 |
+
}
|
112 |
+
|
113 |
return $method( $content );
|
114 |
}
|
115 |
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: tillkruess
|
|
3 |
Donate link: https://github.com/sponsors/tillkruss
|
4 |
Tags: antispam, anti spam, spam, email, e-mail, mail, spider, crawler, harvester, robots, spambot, block, obfuscate, obfuscation, encode, encoder, encoding, encrypt, encryption, protect, protection
|
5 |
Requires at least: 2.0
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 1.0.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -22,6 +22,7 @@ Other content (like phone numbers) can be protected using `[encode]` shortcode:
|
|
22 |
|
23 |
`
|
24 |
[encode]+1 (555) 123-4567[/encode]
|
|
|
25 |
`
|
26 |
|
27 |
= Premium Features =
|
@@ -75,6 +76,10 @@ You can use the "Page Scanner" found under _Settings -> Email Encoder_ to see wh
|
|
75 |
- Show premium upgrade page inside wordpress?
|
76 |
- Dashboard widget with scanner results?
|
77 |
|
|
|
|
|
|
|
|
|
78 |
= 1.0.21 =
|
79 |
|
80 |
* Changed page slug to avoid issues with the `encode` keyword
|
3 |
Donate link: https://github.com/sponsors/tillkruss
|
4 |
Tags: antispam, anti spam, spam, email, e-mail, mail, spider, crawler, harvester, robots, spambot, block, obfuscate, obfuscation, encode, encoder, encoding, encrypt, encryption, protect, protection
|
5 |
Requires at least: 2.0
|
6 |
+
Tested up to: 6.0
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 1.0.22
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
22 |
|
23 |
`
|
24 |
[encode]+1 (555) 123-4567[/encode]
|
25 |
+
[encode link="tel:+15551234567"]+1 (555) 123-4567[/encode]
|
26 |
`
|
27 |
|
28 |
= Premium Features =
|
76 |
- Show premium upgrade page inside wordpress?
|
77 |
- Dashboard widget with scanner results?
|
78 |
|
79 |
+
= 1.0.22 =
|
80 |
+
|
81 |
+
* Added `link` attribute to `[encode]` shortcode
|
82 |
+
|
83 |
= 1.0.21 =
|
84 |
|
85 |
* Changed page slug to avoid issues with the `encode` keyword
|