Version Description
- Added user interface
- Added links to page scanner
Download this release
Release Info
Developer | tillkruess |
Plugin | Email Address Encoder |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- email-address-encoder.php +7 -2
- includes/admin.php +131 -0
- includes/mo-notice.php +171 -0
- includes/ui.php +92 -0
- readme.txt +16 -27
email-address-encoder.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Email Address Encoder
|
4 |
-
Plugin URI:
|
5 |
Description: A lightweight plugin to protect 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
|
@@ -14,6 +14,11 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* Define default filter-priority constant, unless it has already been defined.
|
19 |
*/
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Email Address Encoder
|
4 |
+
Plugin URI: https://encoder.till.im/
|
5 |
Description: A lightweight plugin to protect email addresses from email-harvesting robots by encoding them into decimal and hexadecimal entities.
|
6 |
+
Version: 1.0.8
|
7 |
Author: Till Krüss
|
8 |
Author URI: https://till.im/
|
9 |
Text Domain: email-address-encoder
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
16 |
|
17 |
+
/**
|
18 |
+
* Load admin related code.
|
19 |
+
*/
|
20 |
+
require_once __DIR__ . '/includes/admin.php';
|
21 |
+
|
22 |
/**
|
23 |
* Define default filter-priority constant, unless it has already been defined.
|
24 |
*/
|
includes/admin.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
+
|
5 |
+
include __DIR__ . '/mo-notice.php';
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Load the plugin's text domain.
|
9 |
+
*/
|
10 |
+
add_action( 'plugins_loaded', 'eae_load_textdomain' );
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Register the plugin's menu item.
|
14 |
+
*/
|
15 |
+
add_action( 'admin_menu', 'eae_register_ui' );
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Register the plugin's setting fields.
|
19 |
+
*/
|
20 |
+
add_action( 'admin_init', 'eae_register_settings' );
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Register the plugin's action links.
|
24 |
+
*/
|
25 |
+
add_filter( 'plugin_action_links', 'eae_plugin_actions_links', 10, 2 );
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Register page scanner admin notice.
|
29 |
+
*/
|
30 |
+
add_action( 'admin_notices', 'eae_page_scanner_notice' );
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Callback to load the plugin's text domain.
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
function eae_load_textdomain() {
|
38 |
+
load_plugin_textdomain(
|
39 |
+
'email-address-encoder',
|
40 |
+
false,
|
41 |
+
basename( dirname( __FILE__ ) ) . '/languages'
|
42 |
+
);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Callback to add the plugin's menu item to the "Settings" menu.
|
47 |
+
*
|
48 |
+
* @return void
|
49 |
+
*/
|
50 |
+
function eae_register_ui() {
|
51 |
+
add_options_page(
|
52 |
+
__( 'Email Address Encoder', 'email-address-encoder' ),
|
53 |
+
__( 'Email Encoder', 'email-address-encoder' ),
|
54 |
+
'manage_options',
|
55 |
+
'email-address-encoder',
|
56 |
+
'eae_options_page'
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Register the plugin's setting fields.
|
62 |
+
*
|
63 |
+
* @return void
|
64 |
+
*/
|
65 |
+
function eae_register_settings() {
|
66 |
+
register_setting( 'email-address-encoder', 'eae_search_in' );
|
67 |
+
register_setting( 'email-address-encoder', 'eae_technique' );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Callback that displays the plugin's settings interface.
|
72 |
+
*
|
73 |
+
* @return void
|
74 |
+
*/
|
75 |
+
function eae_options_page() {
|
76 |
+
update_user_meta( get_current_user_id(), 'eae_has_seen_options', '1' );
|
77 |
+
|
78 |
+
include __DIR__ . '/ui.php';
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Callback to add "Settings" link to the plugin's action links.
|
83 |
+
*
|
84 |
+
* @param array $links
|
85 |
+
* @param string $file
|
86 |
+
*
|
87 |
+
* @return array
|
88 |
+
*/
|
89 |
+
function eae_plugin_actions_links( $links, $file ) {
|
90 |
+
if ( strpos( $file, 'email-address-encoder/' ) !== 0 ) {
|
91 |
+
return $links;
|
92 |
+
}
|
93 |
+
|
94 |
+
$link = sprintf(
|
95 |
+
'<a href="%s">%s</a>',
|
96 |
+
admin_url( 'options-general.php?page=email-address-encoder' ),
|
97 |
+
__( 'Settings', 'email-address-encoder' )
|
98 |
+
);
|
99 |
+
|
100 |
+
return array_merge( array( $link ), $links );
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Admin notices callback that display "Page Scanner" notice.
|
105 |
+
*
|
106 |
+
* @return void
|
107 |
+
*/
|
108 |
+
function eae_page_scanner_notice() {
|
109 |
+
$screen = get_current_screen();
|
110 |
+
|
111 |
+
if ( isset( $screen->id ) && $screen->id === 'settings_page_email-address-encoder' ) {
|
112 |
+
return;
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
116 |
+
return;
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( get_user_meta( get_current_user_id(), 'eae_has_seen_options', true ) === '1' ) {
|
120 |
+
return;
|
121 |
+
}
|
122 |
+
|
123 |
+
printf(
|
124 |
+
'<div class="notice notice-info"><p><strong>%s</strong> %s</p></div>',
|
125 |
+
__( 'Make sure all your email addresses are encoded!', 'email-address-encoder' ),
|
126 |
+
sprintf(
|
127 |
+
__( 'Use the <a href="%s">Page Scanner</a> to test your site.', 'email-address-encoder' ),
|
128 |
+
admin_url( 'options-general.php?page=email-address-encoder' )
|
129 |
+
)
|
130 |
+
);
|
131 |
+
}
|
includes/mo-notice.php
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! class_exists( 'MO_Admin_Notice' ) ) :
|
4 |
+
|
5 |
+
class MO_Admin_Notice
|
6 |
+
{
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
add_action( 'admin_notices', array( $this, 'admin_notice' ) );
|
10 |
+
add_action( 'network_admin_notices', array( $this, 'admin_notice' ) );
|
11 |
+
add_action( 'admin_init', array( $this, 'dismiss_admin_notice' ) );
|
12 |
+
}
|
13 |
+
|
14 |
+
public function dismiss_admin_notice()
|
15 |
+
{
|
16 |
+
if ( ! isset( $_GET[ 'mo-adaction' ] ) || $_GET[ 'mo-adaction' ] !== 'mo_dismiss_adnotice' ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
$url = admin_url();
|
21 |
+
update_option( 'mo_dismiss_adnotice', 'true' );
|
22 |
+
|
23 |
+
wp_redirect( $url );
|
24 |
+
exit;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function admin_notice()
|
28 |
+
{
|
29 |
+
global $pagenow;
|
30 |
+
|
31 |
+
if ($pagenow !== 'index.php') {
|
32 |
+
return; // Only show on dashboard to avoid rendering issues on other admin pages
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( get_option( 'mo_dismiss_adnotice', 'false' ) === 'true' ) {
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( $this->is_plugin_installed() && $this->is_plugin_active() ) {
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
|
43 |
+
$dismiss_url = esc_url_raw(
|
44 |
+
add_query_arg(
|
45 |
+
array(
|
46 |
+
'mo-adaction' => 'mo_dismiss_adnotice'
|
47 |
+
),
|
48 |
+
admin_url()
|
49 |
+
)
|
50 |
+
);
|
51 |
+
|
52 |
+
$this->notice_css();
|
53 |
+
|
54 |
+
$install_url = wp_nonce_url(
|
55 |
+
admin_url( 'update.php?action=install-plugin&plugin=mailoptin' ),
|
56 |
+
'install-plugin_mailoptin'
|
57 |
+
);
|
58 |
+
|
59 |
+
$activate_url = wp_nonce_url(
|
60 |
+
admin_url( 'plugins.php?action=activate&plugin=mailoptin%2Fmailoptin.php' ),
|
61 |
+
'activate-plugin_mailoptin/mailoptin.php'
|
62 |
+
);
|
63 |
+
|
64 |
+
?>
|
65 |
+
<div class="mo-admin-notice notice notice-success">
|
66 |
+
<div class="mo-notice-first-half">
|
67 |
+
<p>
|
68 |
+
<?php
|
69 |
+
printf(
|
70 |
+
__('Free optin form plugin that will %1$sincrease your email list subscribers%2$s and keep them engaged with %1$sautomated and schedule newsletters%2$s.'),
|
71 |
+
'<span class="mo-stylize"><strong>', '</strong></span>');
|
72 |
+
?>
|
73 |
+
</p>
|
74 |
+
<p style="text-decoration: underline;font-size: 12px;">Recommended by Email Address Encoder.</p>
|
75 |
+
</div>
|
76 |
+
<div class="mo-notice-other-half">
|
77 |
+
<?php if ( ! $this->is_plugin_installed()) : ?>
|
78 |
+
<a class="button button-primary button-hero" id="mo-install-mailoptin-plugin" href="<?php echo $install_url; ?>">
|
79 |
+
<?php _e('Install MailOptin Now for Free!'); ?>
|
80 |
+
</a>
|
81 |
+
<?php endif; ?>
|
82 |
+
<?php if ($this->is_plugin_installed() && ! $this->is_plugin_active()) : ?>
|
83 |
+
<a class="button button-primary button-hero" id="mo-activate-mailoptin-plugin" href="<?php echo $activate_url; ?>">
|
84 |
+
<?php _e('Activate MailOptin Now!'); ?>
|
85 |
+
</a>
|
86 |
+
<?php endif; ?>
|
87 |
+
<div class="mo-notice-learn-more">
|
88 |
+
<a target="_blank" href="https://mailoptin.io">Learn more</a>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
<a href="<?php echo $dismiss_url; ?>">
|
92 |
+
<button type="button" class="notice-dismiss">
|
93 |
+
<span class="screen-reader-text"><?php _e('Dismiss this notice'); ?>.</span>
|
94 |
+
</button>
|
95 |
+
</a>
|
96 |
+
</div>
|
97 |
+
<?php
|
98 |
+
}
|
99 |
+
|
100 |
+
public function is_plugin_installed()
|
101 |
+
{
|
102 |
+
$installed_plugins = get_plugins();
|
103 |
+
|
104 |
+
return isset( $installed_plugins[ 'mailoptin/mailoptin.php' ] );
|
105 |
+
}
|
106 |
+
|
107 |
+
public function is_plugin_active()
|
108 |
+
{
|
109 |
+
return is_plugin_active( 'mailoptin/mailoptin.php' );
|
110 |
+
}
|
111 |
+
|
112 |
+
public function notice_css()
|
113 |
+
{ ?>
|
114 |
+
<style type="text/css">
|
115 |
+
.mo-admin-notice {
|
116 |
+
background: #fff;
|
117 |
+
color: #000;
|
118 |
+
border-left-color: #46b450;
|
119 |
+
position: relative;
|
120 |
+
}
|
121 |
+
.mo-admin-notice .notice-dismiss:before {
|
122 |
+
color: #72777c;
|
123 |
+
}
|
124 |
+
.mo-admin-notice .mo-stylize {
|
125 |
+
line-height: 2;
|
126 |
+
}
|
127 |
+
.mo-admin-notice .button-primary {
|
128 |
+
background: #006799;
|
129 |
+
text-shadow: none;
|
130 |
+
border: 0;
|
131 |
+
box-shadow: none;
|
132 |
+
}
|
133 |
+
.mo-notice-first-half {
|
134 |
+
width: 66%;
|
135 |
+
display: inline-block;
|
136 |
+
margin: 10px 0;
|
137 |
+
}
|
138 |
+
.mo-notice-other-half {
|
139 |
+
width: 33%;
|
140 |
+
display: inline-block;
|
141 |
+
padding: 20px 0;
|
142 |
+
position: absolute;
|
143 |
+
text-align: center;
|
144 |
+
}
|
145 |
+
.mo-notice-first-half p {
|
146 |
+
font-size: 14px;
|
147 |
+
}
|
148 |
+
.mo-notice-learn-more a {
|
149 |
+
margin: 10px;
|
150 |
+
}
|
151 |
+
.mo-notice-learn-more {
|
152 |
+
margin-top: 10px;
|
153 |
+
}
|
154 |
+
</style><?php
|
155 |
+
}
|
156 |
+
|
157 |
+
public static function instance()
|
158 |
+
{
|
159 |
+
static $instance = null;
|
160 |
+
|
161 |
+
if ( is_null( $instance ) ) {
|
162 |
+
$instance = new self;
|
163 |
+
}
|
164 |
+
|
165 |
+
return $instance;
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
endif;
|
170 |
+
|
171 |
+
MO_Admin_Notice::instance();
|
includes/ui.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<div class="wrap">
|
3 |
+
|
4 |
+
<h1><?php _e( 'Email Address Encoder', 'email-address-encoder' ); ?></h1>
|
5 |
+
|
6 |
+
<form method="POST" action="options.php">
|
7 |
+
|
8 |
+
<?php settings_fields( 'email-address-encoder' ); ?>
|
9 |
+
|
10 |
+
<table class="form-table">
|
11 |
+
<tbody>
|
12 |
+
|
13 |
+
<tr>
|
14 |
+
<th scope="row">
|
15 |
+
<?php _e( 'Search for emails using', 'email-address-encoder' ); ?>
|
16 |
+
</th>
|
17 |
+
<td>
|
18 |
+
<fieldset>
|
19 |
+
<legend class="screen-reader-text">
|
20 |
+
<span><?php _e( 'Search for emails using', 'email-address-encoder' ); ?></span>
|
21 |
+
</legend>
|
22 |
+
<label><input type="radio" name="eae_search_in" value="filters" checked> <?php _e( 'WordPress filters', 'email-address-encoder' ); ?></label><br>
|
23 |
+
<label><input type="radio" name="eae_search_in" value="fullpage"> <?php _e( 'Full page scan', 'email-address-encoder' ); ?> (<a target="_blank" rel="noopener" href="https://encoder.till.im/?utm_source=wp-plugin&utm_medium=setting"><?php _e( 'PRO only', 'email-address-encoder' ); ?></a>)</label>
|
24 |
+
</fieldset>
|
25 |
+
|
26 |
+
<p class="description" style="max-width: 50em;">
|
27 |
+
<?php _e( 'WordPress filters are slightly faster, but full page scans will find and protect your email addresses in unfiltered sections of your site, such as your footer, custom fields, theme components, etc.', 'email-address-encoder' ); ?>
|
28 |
+
</p>
|
29 |
+
</td>
|
30 |
+
</tr>
|
31 |
+
|
32 |
+
<tr>
|
33 |
+
<th scope="row">
|
34 |
+
<?php _e( 'Protect emails using', 'email-address-encoder' ); ?>
|
35 |
+
</th>
|
36 |
+
<td>
|
37 |
+
<fieldset>
|
38 |
+
<legend class="screen-reader-text">
|
39 |
+
<span><?php _e( 'Protect emails using', 'email-address-encoder' ); ?></span>
|
40 |
+
</legend>
|
41 |
+
|
42 |
+
<label>
|
43 |
+
<input type="radio" name="eae_technique" value="entities" checked> <?php _e( 'HTML entities', 'email-address-encoder' ); ?>
|
44 |
+
<p class="description">
|
45 |
+
<small><?php _e( 'Offer good protection and work in most scenarios.', 'email-address-encoder' ); ?></small>
|
46 |
+
</p>
|
47 |
+
</label>
|
48 |
+
<br>
|
49 |
+
|
50 |
+
<label>
|
51 |
+
<input type="radio" name="eae_technique" value="css-direction"> <?php _e( 'CSS direction', 'email-address-encoder' ); ?> (<a target="_blank" rel="noopener" href="https://encoder.till.im/?utm_source=wp-plugin&utm_medium=setting"><?php _e( 'PRO only', 'email-address-encoder' ); ?></a>)
|
52 |
+
<p class="description">
|
53 |
+
<small><?php _e( 'Protects against smart robots without the need for JavaScript.', 'email-address-encoder' ); ?></small>
|
54 |
+
</p>
|
55 |
+
</label>
|
56 |
+
<br>
|
57 |
+
|
58 |
+
<label>
|
59 |
+
<input type="radio" name="eae_technique" value="rot13"> <?php _e( 'ROT13 encoding', 'email-address-encoder' ); ?> (<a target="_blank" rel="noopener" href="https://encoder.till.im/?utm_source=wp-plugin&utm_medium=setting"><?php _e( 'PRO only', 'email-address-encoder' ); ?></a>)
|
60 |
+
<p class="description">
|
61 |
+
<small><?php _e( 'Offers the best protection, but requires JavaScript.', 'email-address-encoder' ); ?></small>
|
62 |
+
</p>
|
63 |
+
</label>
|
64 |
+
|
65 |
+
</fieldset>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
|
69 |
+
</tbody>
|
70 |
+
</table>
|
71 |
+
|
72 |
+
<p class="submit">
|
73 |
+
<?php submit_button( null, 'primary large', 'submit', false ); ?>
|
74 |
+
</p>
|
75 |
+
|
76 |
+
</form>
|
77 |
+
|
78 |
+
<div class="card">
|
79 |
+
<h2 class="title">
|
80 |
+
<?php _e( 'Page Scanner', 'email-address-encoder' ); ?>
|
81 |
+
</h2>
|
82 |
+
<p>
|
83 |
+
<?php _e( 'For your peace of mind and a spam-free inbox, test whether email addresses are encoded on your site.', 'email-address-encoder' ); ?>
|
84 |
+
</p>
|
85 |
+
<p>
|
86 |
+
<a class="button button-secondary" target="_blank" rel="noopener" href="https://encoder.till.im/?utm_source=wp-plugin&utm_medium=banner">
|
87 |
+
<?php _e( 'Open Page Scanner', 'email-address-encoder' ); ?>
|
88 |
+
</a>
|
89 |
+
</p>
|
90 |
+
</div>
|
91 |
+
|
92 |
+
</div>
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: tillkruess
|
|
3 |
Donate link: https://www.paypal.me/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 |
|
@@ -14,7 +14,7 @@ A lightweight plugin to protect email addresses from email-harvesting robots by
|
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
-
A lightweight plugin to protect plain email addresses and mailto links from email-harvesting robots by encoding them into decimal and hexadecimal entities. Has effect on the posts, pages, comments, excerpts and
|
18 |
|
19 |
|
20 |
== Installation ==
|
@@ -23,47 +23,32 @@ For detailed installation instructions, please read the [standard installation p
|
|
23 |
|
24 |
1. Upload the `/email-address-encoder/` directory and its contents to `/wp-content/plugins/`.
|
25 |
2. Login to your WordPress installation and activate the plugin through the _Plugins_ menu.
|
26 |
-
3.
|
27 |
|
28 |
|
29 |
== Frequently Asked Questions ==
|
30 |
|
31 |
= What does this plugin do? =
|
32 |
|
33 |
-
This plugin
|
34 |
|
35 |
-
Alternatively, you can use the `[encode]` shortcode: `[encode]+1 (
|
36 |
|
37 |
= How can I make sure the plugin works? =
|
38 |
|
39 |
-
You
|
40 |
-
|
41 |
-
= How can I use WP's built-in `antispambot()` function instead? =
|
42 |
-
|
43 |
-
You specify any valid callback function with the `eae_method` filter to apply to found email addresses: `add_filter('eae_method', function() { return 'antispambot'; });`
|
44 |
|
45 |
= How can I filter other parts of my site? =
|
46 |
|
47 |
-
|
48 |
-
* If the content is a PHP string, run it through the `eae_encode_emails()` function: `$text = eae_encode_emails( $text );`
|
49 |
-
* If you want to encode a single email address, use the `eae_encode_str()` function: `<?php echo eae_encode_str( 'name@domain.com' ); ?>`
|
50 |
-
|
51 |
-
This plugin doesn't encode the entire website for performance reasons, it encodes only the content of the following WordPress filters `the_content`, `the_excerpt`, `widget_text`, `comment_text`, `comment_excerpt`.
|
52 |
-
|
53 |
-
= How can I change the regular expression pattern? =
|
54 |
-
|
55 |
-
You can override [the pattern](http://fightingforalostcause.net/misc/2006/compare-email-regex.php "Comparing E-mail Address Validating Regular Expressions") with the `eae_regexp` filter: `add_filter( 'eae_regexp', function () { return '/^pattern$/'; } );`
|
56 |
-
|
57 |
-
= How can I change the priority of the default filters? =
|
58 |
|
59 |
-
The default filter priority is `1000` and you can adjust it by defining the `EAE_FILTER_PRIORITY` constant: `define( 'EAE_FILTER_PRIORITY', 99999 );`. The constant has to be defined before this plugin is loaded, e.g. in your `wp-config.php` or in Must-use plugin (a.k.a. mu-plugin).
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
Like this: `add_filter( 'eae_at_sign_check', '__return_false' );`
|
64 |
|
|
|
65 |
|
66 |
-
|
|
|
67 |
|
68 |
= 1.0.7 =
|
69 |
|
@@ -103,6 +88,10 @@ Like this: `add_filter( 'eae_at_sign_check', '__return_false' );`
|
|
103 |
|
104 |
== Upgrade Notice ==
|
105 |
|
|
|
|
|
|
|
|
|
106 |
= 1.0.7 =
|
107 |
|
108 |
This release prevents potential compatibility issues.
|
3 |
Donate link: https://www.paypal.me/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.0
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 1.0.8
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
+
A lightweight plugin to protect plain email addresses and mailto links from email-harvesting robots by encoding them into decimal and hexadecimal entities. Has effect on the posts, pages, comments, excerpts, text widgets and other filtered content. Works without JavaScript — just simple spam protection.
|
18 |
|
19 |
|
20 |
== Installation ==
|
23 |
|
24 |
1. Upload the `/email-address-encoder/` directory and its contents to `/wp-content/plugins/`.
|
25 |
2. Login to your WordPress installation and activate the plugin through the _Plugins_ menu.
|
26 |
+
3. Use the "Page Scanner" under _Settings -> Email Encoder_ to test if your email addresses are protected.
|
27 |
|
28 |
|
29 |
== Frequently Asked Questions ==
|
30 |
|
31 |
= What does this plugin do? =
|
32 |
|
33 |
+
This plugin searches for email addresses using WordPress filters like `the_content`, `widget_text` and others. Found email addresses are encoded using decimal and hexadecimal HTML entities, which obfuscates the email addresses to protect it from being read by most email-harvesting robots.
|
34 |
|
35 |
+
Alternatively, you can use the `[encode]` shortcode: `[encode]+1 (555) 123-4567[/encode]`
|
36 |
|
37 |
= How can I make sure the plugin works? =
|
38 |
|
39 |
+
You can use the "Page Scanner" found under _Settings -> Email Encoder_ to test if your email addresses are protected. Alternatively, you can look at the "page source" if your site. **Please note Chrome's Developer Tools, Safari's Web Inspector and others, because they decode decimal and hexadecimal entities into plain text.**
|
|
|
|
|
|
|
|
|
40 |
|
41 |
= How can I filter other parts of my site? =
|
42 |
|
43 |
+
[This guide](https://encoder.till.im/guide) will help you encode all email addresses that aren’t caught.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
|
|
45 |
|
46 |
+
== Changelog ==
|
|
|
|
|
47 |
|
48 |
+
= 1.0.8 =
|
49 |
|
50 |
+
* Added user interface
|
51 |
+
* Added links to page scanner
|
52 |
|
53 |
= 1.0.7 =
|
54 |
|
88 |
|
89 |
== Upgrade Notice ==
|
90 |
|
91 |
+
= 1.0.8 =
|
92 |
+
|
93 |
+
This release adds a minimal user interface and page scanner.
|
94 |
+
|
95 |
= 1.0.7 =
|
96 |
|
97 |
This release prevents potential compatibility issues.
|