Version Description
- Changed page slug to avoid issues with the
encode
keyword - Only search for unprotected emails on public pages
- Show warning when page couldn't be fetched
Download this release
Release Info
Developer | tillkruess |
Plugin | Email Address Encoder |
Version | 1.0.21 |
Comparing to | |
See all releases |
Code changes from version 1.0.19 to 1.0.21
- email-address-encoder.php +4 -2
- includes/admin.php +7 -6
- includes/email-detector.js +2 -1
- includes/ui.php +19 -1
- readme.txt +19 -3
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
|
@@ -60,12 +60,14 @@ register_activation_hook( __FILE__, 'eae_activation_hook' );
|
|
60 |
|
61 |
/**
|
62 |
* Register filters to encode plain email addresses in posts, pages, excerpts,
|
63 |
-
* comments and
|
64 |
*/
|
65 |
if ( get_option( 'eae_search_in', 'filters' ) !== 'void' ) {
|
66 |
foreach ( array( 'the_content', 'the_excerpt', 'widget_text', 'comment_text', 'comment_excerpt' ) as $filter ) {
|
67 |
add_filter( $filter, 'eae_encode_emails', EAE_FILTER_PRIORITY );
|
68 |
}
|
|
|
|
|
69 |
}
|
70 |
|
71 |
/**
|
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.21
|
7 |
Author: Till Krüss
|
8 |
Author URI: https://till.im/
|
9 |
Text Domain: email-address-encoder
|
60 |
|
61 |
/**
|
62 |
* Register filters to encode plain email addresses in posts, pages, excerpts,
|
63 |
+
* comments, text widgets and nav menus.
|
64 |
*/
|
65 |
if ( get_option( 'eae_search_in', 'filters' ) !== 'void' ) {
|
66 |
foreach ( array( 'the_content', 'the_excerpt', 'widget_text', 'comment_text', 'comment_excerpt' ) as $filter ) {
|
67 |
add_filter( $filter, 'eae_encode_emails', EAE_FILTER_PRIORITY );
|
68 |
}
|
69 |
+
|
70 |
+
add_filter( 'walker_nav_menu_start_el', 'eae_encode_emails', EAE_FILTER_PRIORITY );
|
71 |
}
|
72 |
|
73 |
/**
|
includes/admin.php
CHANGED
@@ -45,7 +45,7 @@ add_action( 'admin_enqueue_scripts', 'eae_enqueue_admin_scripts' );
|
|
45 |
/**
|
46 |
* Register callback to transmit email address to remote server.
|
47 |
*/
|
48 |
-
add_action( 'load-
|
49 |
|
50 |
/**
|
51 |
* Register callback to clear page caches.
|
@@ -85,7 +85,7 @@ function eae_register_ui() {
|
|
85 |
__( 'Email Address Encoder', 'email-address-encoder' ),
|
86 |
__( 'Email Encoder', 'email-address-encoder' ),
|
87 |
'manage_options',
|
88 |
-
'
|
89 |
'eae_options_page'
|
90 |
);
|
91 |
}
|
@@ -165,7 +165,7 @@ function eae_plugin_actions_links( $links, $file ) {
|
|
165 |
),
|
166 |
sprintf(
|
167 |
'<a href="%s">%s</a>',
|
168 |
-
admin_url( 'options-general.php?page=
|
169 |
__( 'Settings', 'email-address-encoder' )
|
170 |
),
|
171 |
), $links );
|
@@ -206,6 +206,7 @@ function eae_enqueue_scripts() {
|
|
206 |
wp_localize_script( 'email-detector', 'eae_detector', array(
|
207 |
'one_email' => __( '1 Unprotected Email', 'email-address-encoder' ),
|
208 |
'many_emails' => __( '{number} Unprotected Emails', 'email-address-encoder' ),
|
|
|
209 |
) );
|
210 |
|
211 |
add_filter( 'script_loader_tag', 'eae_defer_script', 10, 2 );
|
@@ -311,7 +312,7 @@ function eae_page_scanner_notice() {
|
|
311 |
__( 'Protect your email addresses!', 'email-address-encoder' ),
|
312 |
sprintf(
|
313 |
__( 'Receive <a href="%1$s">automatic warnings</a> when your site contains unprotected email addresses, or use the <a href="%1$s">page scanner</a> to test your site manually.', 'email-address-encoder' ),
|
314 |
-
admin_url( 'options-general.php?page=
|
315 |
)
|
316 |
);
|
317 |
}
|
@@ -461,7 +462,7 @@ function eae_compatibility_warnings() {
|
|
461 |
'dashboard',
|
462 |
'plugins',
|
463 |
'edit-page',
|
464 |
-
'
|
465 |
);
|
466 |
|
467 |
if ( ! in_array( $screen->id, $screens ) ) {
|
@@ -486,7 +487,7 @@ function eae_compatibility_warnings() {
|
|
486 |
__( 'Incompatible plugin detected!', 'email-address-encoder' ),
|
487 |
sprintf(
|
488 |
__( 'The "Ginger – EU Cookie Law" plugin decodes all HTML entities and thus prevents the Email Address Encoder from working. Please use a different cookie banner plugin, or use the full-page scanner technique of the <a href="%s">Premium version</a>.', 'email-address-encoder' ),
|
489 |
-
admin_url( 'options-general.php?page=
|
490 |
)
|
491 |
);
|
492 |
}
|
45 |
/**
|
46 |
* Register callback to transmit email address to remote server.
|
47 |
*/
|
48 |
+
add_action( 'load-settings_page_eae', 'eae_transmit_email' );
|
49 |
|
50 |
/**
|
51 |
* Register callback to clear page caches.
|
85 |
__( 'Email Address Encoder', 'email-address-encoder' ),
|
86 |
__( 'Email Encoder', 'email-address-encoder' ),
|
87 |
'manage_options',
|
88 |
+
'eae',
|
89 |
'eae_options_page'
|
90 |
);
|
91 |
}
|
165 |
),
|
166 |
sprintf(
|
167 |
'<a href="%s">%s</a>',
|
168 |
+
admin_url( 'options-general.php?page=eae' ),
|
169 |
__( 'Settings', 'email-address-encoder' )
|
170 |
),
|
171 |
), $links );
|
206 |
wp_localize_script( 'email-detector', 'eae_detector', array(
|
207 |
'one_email' => __( '1 Unprotected Email', 'email-address-encoder' ),
|
208 |
'many_emails' => __( '{number} Unprotected Emails', 'email-address-encoder' ),
|
209 |
+
'fetch_failed' => __( '[Email Address Encoder] The email detector failed to fetch and search this page for unprotected email addresses. This happens in some scenarios, you can ignore this message.', 'email-address-encoder' ),
|
210 |
) );
|
211 |
|
212 |
add_filter( 'script_loader_tag', 'eae_defer_script', 10, 2 );
|
312 |
__( 'Protect your email addresses!', 'email-address-encoder' ),
|
313 |
sprintf(
|
314 |
__( 'Receive <a href="%1$s">automatic warnings</a> when your site contains unprotected email addresses, or use the <a href="%1$s">page scanner</a> to test your site manually.', 'email-address-encoder' ),
|
315 |
+
admin_url( 'options-general.php?page=eae' )
|
316 |
)
|
317 |
);
|
318 |
}
|
462 |
'dashboard',
|
463 |
'plugins',
|
464 |
'edit-page',
|
465 |
+
'settings_page_eae'
|
466 |
);
|
467 |
|
468 |
if ( ! in_array( $screen->id, $screens ) ) {
|
487 |
__( 'Incompatible plugin detected!', 'email-address-encoder' ),
|
488 |
sprintf(
|
489 |
__( 'The "Ginger – EU Cookie Law" plugin decodes all HTML entities and thus prevents the Email Address Encoder from working. Please use a different cookie banner plugin, or use the full-page scanner technique of the <a href="%s">Premium version</a>.', 'email-address-encoder' ),
|
490 |
+
admin_url( 'options-general.php?page=eae' )
|
491 |
)
|
492 |
);
|
493 |
}
|
includes/email-detector.js
CHANGED
@@ -9,10 +9,11 @@
|
|
9 |
}
|
10 |
|
11 |
fetch( document.location.href, {
|
|
|
12 |
headers: { "X-Email-Detector": "true" },
|
13 |
}).then( function ( response ) {
|
14 |
if ( ! response.ok ) {
|
15 |
-
|
16 |
}
|
17 |
|
18 |
return response;
|
9 |
}
|
10 |
|
11 |
fetch( document.location.href, {
|
12 |
+
credentials: "omit",
|
13 |
headers: { "X-Email-Detector": "true" },
|
14 |
}).then( function ( response ) {
|
15 |
if ( ! response.ok ) {
|
16 |
+
console.info( eae_detector.fetch_failed );
|
17 |
}
|
18 |
|
19 |
return response;
|
includes/ui.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
parse_url( get_home_url(), PHP_URL_HOST )
|
16 |
); ?>
|
17 |
</p>
|
18 |
-
<form method="post" action="<?php echo admin_url( 'options-general.php?page=
|
19 |
<?php wp_nonce_field('subscribe'); ?>
|
20 |
<input type="hidden" name="action" value="subscribe" />
|
21 |
<p>
|
@@ -137,6 +137,24 @@
|
|
137 |
</td>
|
138 |
</tr>
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
<tr>
|
141 |
<th scope="row">
|
142 |
<?php _e( 'Filter priority', 'email-address-encoder' ); ?>
|
15 |
parse_url( get_home_url(), PHP_URL_HOST )
|
16 |
); ?>
|
17 |
</p>
|
18 |
+
<form method="post" action="<?php echo admin_url( 'options-general.php?page=eae' ); ?>">
|
19 |
<?php wp_nonce_field('subscribe'); ?>
|
20 |
<input type="hidden" name="action" value="subscribe" />
|
21 |
<p>
|
137 |
</td>
|
138 |
</tr>
|
139 |
|
140 |
+
<tr>
|
141 |
+
<th scope="row">
|
142 |
+
<?php _e( 'Buffer priority', 'email-address-encoder' ); ?>
|
143 |
+
</th>
|
144 |
+
<td>
|
145 |
+
<label>
|
146 |
+
<input type="checkbox" name="eae_buffer_priority" value="early" disabled>
|
147 |
+
<?php _e( 'Register the output buffer early' ); ?>
|
148 |
+
</label>
|
149 |
+
|
150 |
+
(<a target="_blank" rel="noopener" href="https://encoder.till.im/download?utm_source=wp-plugin&utm_medium=setting"><?php _e( 'Premium only', 'email-address-encoder' ); ?></a>)
|
151 |
+
|
152 |
+
<p class="description" style="max-width: 40em;">
|
153 |
+
<?php _e( 'Enable this setting if your theme doesn’t adhere to best practices and the full-page isn’t working.', 'email-address-encoder' ); ?><br>
|
154 |
+
</p>
|
155 |
+
</td>
|
156 |
+
</tr>
|
157 |
+
|
158 |
<tr>
|
159 |
<th scope="row">
|
160 |
<?php _e( 'Filter priority', 'email-address-encoder' ); ?>
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Email Address Encoder ===
|
2 |
Contributors: tillkruess
|
3 |
-
Donate link: https://
|
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: 5.
|
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 |
|
@@ -33,6 +33,8 @@ Other content (like phone numbers) can be protected using `[encode]` shortcode:
|
|
33 |
|
34 |
Check out the [Premium](https://encoder.till.im/download?utm_source=wp-plugin&utm_medium=readme) version of Email Address Encoder.
|
35 |
|
|
|
|
|
36 |
== Installation ==
|
37 |
|
38 |
For detailed installation instructions, please read the [standard installation procedure for WordPress plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
|
@@ -69,6 +71,20 @@ You can use the "Page Scanner" found under _Settings -> Email Encoder_ to see wh
|
|
69 |
|
70 |
== Changelog ==
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
= 1.0.19 =
|
73 |
|
74 |
* Defer loading of email detector script
|
1 |
=== Email Address Encoder ===
|
2 |
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: 5.4
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 1.0.21
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
33 |
|
34 |
Check out the [Premium](https://encoder.till.im/download?utm_source=wp-plugin&utm_medium=readme) version of Email Address Encoder.
|
35 |
|
36 |
+
[](http://coderisk.com/wp/plugin/email-address-encoder/RIPS-r0bJqKvBws)
|
37 |
+
|
38 |
== Installation ==
|
39 |
|
40 |
For detailed installation instructions, please read the [standard installation procedure for WordPress plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
- add "encoding" gutenberg block
|
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
|
81 |
+
* Only search for unprotected emails on public pages
|
82 |
+
* Show warning when page couldn't be fetched
|
83 |
+
|
84 |
+
= 1.0.20 =
|
85 |
+
|
86 |
+
* Encode emails in navigation menus
|
87 |
+
|
88 |
= 1.0.19 =
|
89 |
|
90 |
* Defer loading of email detector script
|