Version Description
- Feature: New settings item to include custom scripts within the footer and not in the header
- Feature: Support for the "Maintenance" plugin from WP Maintenance
- TweaK: Remove our main translation handler to make plugin translations on WordPress.org available again.
- Tweak: Optimize PHP code to WordPress standards
- Tweak: Enqueue dashicons as well if only "show_encoded_check" is checked and protection is set to "Do nothing"
- Tweak: Make eeb_mailto link available with protection set to "Do nothing" as well
- Fix: WP CLI did not work with this plugin in an active state (Due to the active buffer filter)
- Fix: Emails have been not encoded properly if "Do nothing" was chosen as a setting and the eeb_mailto shortcode was used
Download this release
Release Info
Developer | ironikus |
Plugin | Email Encoder Bundle – Protect Email Address |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.0.2
- core/class-email-encoder-bundle.php +2 -2
- core/includes/classes/class-email-encoder-bundle-ajax.php +1 -1
- core/includes/classes/class-email-encoder-bundle-helpers.php +2 -46
- core/includes/classes/class-email-encoder-bundle-run-admin.php +8 -8
- core/includes/classes/class-email-encoder-bundle-run.php +24 -15
- core/includes/classes/class-email-encoder-bundle-settings.php +79 -67
- core/includes/classes/class-email-encoder-bundle-validate.php +19 -20
- core/includes/functions/template-tags.php +1 -1
- core/includes/integrations/classes/mailoptin.php +4 -0
- core/includes/integrations/classes/maintenance.php +109 -0
- core/includes/integrations/loader.php +11 -6
- core/includes/partials/help-tabs/general.php +3 -3
- core/includes/partials/help-tabs/shortcodes.php +5 -5
- core/includes/partials/help-tabs/template-tags.php +7 -7
- core/includes/partials/widgets/main.php +1 -1
- email-encoder-bundle.php +2 -2
- readme.txt +12 -2
core/class-email-encoder-bundle.php
CHANGED
@@ -51,7 +51,7 @@ if ( ! class_exists( 'Email_Encoder' ) ) :
|
|
51 |
* @return void
|
52 |
*/
|
53 |
public function __clone() {
|
54 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', '
|
55 |
}
|
56 |
|
57 |
/**
|
@@ -61,7 +61,7 @@ if ( ! class_exists( 'Email_Encoder' ) ) :
|
|
61 |
* @return void
|
62 |
*/
|
63 |
public function __wakeup() {
|
64 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', '
|
65 |
}
|
66 |
|
67 |
/**
|
51 |
* @return void
|
52 |
*/
|
53 |
public function __clone() {
|
54 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'email-encoder-bundle' ), '2.0.0' );
|
55 |
}
|
56 |
|
57 |
/**
|
61 |
* @return void
|
62 |
*/
|
63 |
public function __wakeup() {
|
64 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'email-encoder-bundle' ), '2.0.0' );
|
65 |
}
|
66 |
|
67 |
/**
|
core/includes/classes/class-email-encoder-bundle-ajax.php
CHANGED
@@ -90,7 +90,7 @@ class Email_Encoder_Ajax{
|
|
90 |
$method = sanitize_text_field( $_POST['eebMethod'] );
|
91 |
$display = wp_kses_post( $_POST['eebDisplay'] );
|
92 |
$custom_class = (string) EEB()->settings->get_setting( 'class_name', true );
|
93 |
-
$protection_text =
|
94 |
|
95 |
if( empty( $display ) ) {
|
96 |
$display = $email;
|
90 |
$method = sanitize_text_field( $_POST['eebMethod'] );
|
91 |
$display = wp_kses_post( $_POST['eebDisplay'] );
|
92 |
$custom_class = (string) EEB()->settings->get_setting( 'class_name', true );
|
93 |
+
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
94 |
|
95 |
if( empty( $display ) ) {
|
96 |
$display = $email;
|
core/includes/classes/class-email-encoder-bundle-helpers.php
CHANGED
@@ -17,50 +17,6 @@
|
|
17 |
*/
|
18 |
class Email_Encoder_Helpers {
|
19 |
|
20 |
-
/**
|
21 |
-
* Translate custom Strings
|
22 |
-
*
|
23 |
-
* @param $string - The language string
|
24 |
-
* @param null $cname - If no custom name is set, return the default one
|
25 |
-
* @return string - The translated language string
|
26 |
-
*/
|
27 |
-
public function translate( $string, $cname = null, $prefix = null ){
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Filter to control the translation and optimize
|
31 |
-
* them to a specific output
|
32 |
-
*/
|
33 |
-
$trigger = apply_filters( 'eeb/helpers/control_translations', true, $string, $cname );
|
34 |
-
if( empty( $trigger ) ){
|
35 |
-
return $string;
|
36 |
-
}
|
37 |
-
|
38 |
-
if( empty( $string ) ){
|
39 |
-
return $string;
|
40 |
-
}
|
41 |
-
|
42 |
-
if( ! empty( $cname ) ){
|
43 |
-
$context = $cname;
|
44 |
-
} else {
|
45 |
-
$context = 'default';
|
46 |
-
}
|
47 |
-
|
48 |
-
if( $prefix == 'default' ){
|
49 |
-
$front = 'EEB: ';
|
50 |
-
} elseif ( ! empty( $prefix ) ){
|
51 |
-
$front = $prefix;
|
52 |
-
} else {
|
53 |
-
$front = '';
|
54 |
-
}
|
55 |
-
|
56 |
-
// WPML String Translation Logic (WPML itself has problems with _x in some versions)
|
57 |
-
if( function_exists( 'icl_t' ) ){
|
58 |
-
return icl_t( (string) 'email-encoder-bundle', $context, $string );
|
59 |
-
} else {
|
60 |
-
return $front . _x( $string, $context, (string) 'email-encoder-bundle' );
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
/**
|
65 |
* Checks if the parsed param is available on the current site
|
66 |
*
|
@@ -126,9 +82,9 @@ class Email_Encoder_Helpers {
|
|
126 |
}
|
127 |
|
128 |
if( is_array( $content ) ){
|
129 |
-
$validated_content = sprintf(
|
130 |
} else {
|
131 |
-
$validated_content =
|
132 |
}
|
133 |
|
134 |
ob_start();
|
17 |
*/
|
18 |
class Email_Encoder_Helpers {
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Checks if the parsed param is available on the current site
|
22 |
*
|
82 |
}
|
83 |
|
84 |
if( is_array( $content ) ){
|
85 |
+
$validated_content = sprintf( __( $content[0], 'email-encoder-bundle' ), $content[1] );
|
86 |
} else {
|
87 |
+
$validated_content = __( $content, 'email-encoder-bundle' );
|
88 |
}
|
89 |
|
90 |
ob_start();
|
core/includes/classes/class-email-encoder-bundle-run-admin.php
CHANGED
@@ -73,11 +73,11 @@ class Email_Encoder_Run{
|
|
73 |
* @return array An array of plugin action links.
|
74 |
*/
|
75 |
public function plugin_action_links( $links ) {
|
76 |
-
$settings_link = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=' . $this->page_name ),
|
77 |
|
78 |
array_unshift( $links, $settings_link );
|
79 |
|
80 |
-
$links['visit_us'] = sprintf( '<a href="%s" target="_blank" style="font-weight:700;color:#f1592a;">%s</a>', 'https://ironikus.com/?utm_source=email-encoder-bundle&utm_medium=plugin-overview-website-button&utm_campaign=WP%20Mailto%20Links',
|
81 |
|
82 |
return $links;
|
83 |
}
|
@@ -120,9 +120,9 @@ class Email_Encoder_Run{
|
|
120 |
public function add_user_submenu(){
|
121 |
|
122 |
if( (string) EEB()->settings->get_setting( 'own_admin_menu', true ) !== '1' ){
|
123 |
-
$this->pagehook = add_submenu_page( 'options-general.php',
|
124 |
} else {
|
125 |
-
$this->pagehook = add_menu_page(
|
126 |
}
|
127 |
|
128 |
add_action( 'load-' . $this->pagehook, array( $this, 'add_help_tabs' ) );
|
@@ -135,7 +135,7 @@ class Email_Encoder_Run{
|
|
135 |
*/
|
136 |
public function render_admin_menu_page(){
|
137 |
if( ! current_user_can( EEB()->settings->get_admin_cap('admin-menu-page') ) ){
|
138 |
-
wp_die(
|
139 |
}
|
140 |
|
141 |
include( EEB_PLUGIN_DIR . 'core/includes/partials/eeb-page-display.php' );
|
@@ -154,11 +154,11 @@ class Email_Encoder_Run{
|
|
154 |
|
155 |
if( isset( $_POST[ $this->page_name . '_nonce' ] ) ){
|
156 |
if( ! wp_verify_nonce( $_POST[ $this->page_name . '_nonce' ], $this->page_name ) ){
|
157 |
-
wp_die(
|
158 |
}
|
159 |
|
160 |
if( ! current_user_can( EEB()->settings->get_admin_cap( 'admin-update-settings' ) ) ){
|
161 |
-
wp_die(
|
162 |
}
|
163 |
|
164 |
if( isset( $_POST[ $this->settings_key ] ) && is_array( $_POST[ $this->settings_key ] ) ){
|
@@ -210,7 +210,7 @@ class Email_Encoder_Run{
|
|
210 |
|
211 |
//Add widgets
|
212 |
if( $display_encoder_form ){
|
213 |
-
add_meta_box( 'encode_form',
|
214 |
}
|
215 |
|
216 |
}
|
73 |
* @return array An array of plugin action links.
|
74 |
*/
|
75 |
public function plugin_action_links( $links ) {
|
76 |
+
$settings_link = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=' . $this->page_name ), __( 'Settings', 'email-encoder-bundle' ) );
|
77 |
|
78 |
array_unshift( $links, $settings_link );
|
79 |
|
80 |
+
$links['visit_us'] = sprintf( '<a href="%s" target="_blank" style="font-weight:700;color:#f1592a;">%s</a>', 'https://ironikus.com/?utm_source=email-encoder-bundle&utm_medium=plugin-overview-website-button&utm_campaign=WP%20Mailto%20Links', __('Visit us', 'email-encoder-bundle') );
|
81 |
|
82 |
return $links;
|
83 |
}
|
120 |
public function add_user_submenu(){
|
121 |
|
122 |
if( (string) EEB()->settings->get_setting( 'own_admin_menu', true ) !== '1' ){
|
123 |
+
$this->pagehook = add_submenu_page( 'options-general.php', __( $this->page_title, 'email-encoder-bundle' ), __( $this->page_title, 'email-encoder-bundle' ), EEB()->settings->get_admin_cap( 'admin-add-submenu-page-item' ), $this->page_name, array( $this, 'render_admin_menu_page' ) );
|
124 |
} else {
|
125 |
+
$this->pagehook = add_menu_page( __( $this->page_title, 'email-encoder-bundle' ), __( $this->page_title, 'email-encoder-bundle' ), EEB()->settings->get_admin_cap( 'admin-add-menu-page-item' ), $this->page_name, array( $this, 'render_admin_menu_page' ), plugins_url( 'core/includes/assets/img/icon-email-encoder-bundle.png', EEB_PLUGIN_FILE ) );
|
126 |
}
|
127 |
|
128 |
add_action( 'load-' . $this->pagehook, array( $this, 'add_help_tabs' ) );
|
135 |
*/
|
136 |
public function render_admin_menu_page(){
|
137 |
if( ! current_user_can( EEB()->settings->get_admin_cap('admin-menu-page') ) ){
|
138 |
+
wp_die( __( EEB()->settings->get_default_string( 'insufficient-permissions' ), 'email-encoder-bundle' ) );
|
139 |
}
|
140 |
|
141 |
include( EEB_PLUGIN_DIR . 'core/includes/partials/eeb-page-display.php' );
|
154 |
|
155 |
if( isset( $_POST[ $this->page_name . '_nonce' ] ) ){
|
156 |
if( ! wp_verify_nonce( $_POST[ $this->page_name . '_nonce' ], $this->page_name ) ){
|
157 |
+
wp_die( __( 'You don\'t have permission to update these settings.', 'email-encoder-bundle' ) );
|
158 |
}
|
159 |
|
160 |
if( ! current_user_can( EEB()->settings->get_admin_cap( 'admin-update-settings' ) ) ){
|
161 |
+
wp_die( __( 'You don\'t have permission to update these settings.', 'email-encoder-bundle' ) );
|
162 |
}
|
163 |
|
164 |
if( isset( $_POST[ $this->settings_key ] ) && is_array( $_POST[ $this->settings_key ] ) ){
|
210 |
|
211 |
//Add widgets
|
212 |
if( $display_encoder_form ){
|
213 |
+
add_meta_box( 'encode_form', __( $this->page_title, 'email-encoder-bundle' ), array( $this, 'show_meta_box_content' ), null, 'normal', 'core', array( 'encode_form' ) );
|
214 |
}
|
215 |
|
216 |
}
|
core/includes/classes/class-email-encoder-bundle-run.php
CHANGED
@@ -109,7 +109,9 @@ class Email_Encoder_Run{
|
|
109 |
* @return void
|
110 |
*/
|
111 |
public function buffer_final_output(){
|
112 |
-
|
|
|
|
|
113 |
}
|
114 |
|
115 |
/**
|
@@ -193,20 +195,16 @@ class Email_Encoder_Run{
|
|
193 |
|
194 |
public function load_frontend_header_styling(){
|
195 |
|
196 |
-
$js_version_form = date( "ymd-Gis", filemtime( EEB_PLUGIN_DIR . 'core/includes/assets/js/encoder-form.js' ));
|
197 |
$js_version = date( "ymd-Gis", filemtime( EEB_PLUGIN_DIR . 'core/includes/assets/js/custom.js' ));
|
198 |
$css_version = date( "ymd-Gis", filemtime( EEB_PLUGIN_DIR . 'core/includes/assets/css/style.css' ));
|
199 |
$protection_activated = (int) EEB()->settings->get_setting( 'protect', true );
|
200 |
$without_javascript = (string) EEB()->settings->get_setting( 'protect_using', true );
|
|
|
201 |
|
202 |
if( $protection_activated === 2 || $protection_activated === 1 ){
|
203 |
|
204 |
-
if( (string) EEB()->settings->get_setting( 'show_encoded_check', true ) === '1' ){
|
205 |
-
wp_enqueue_style('dashicons');
|
206 |
-
}
|
207 |
-
|
208 |
if( $without_javascript !== 'without_javascript' ){
|
209 |
-
wp_enqueue_script( 'eeb-js-frontend', EEB_PLUGIN_URL . 'core/includes/assets/js/custom.js', array( 'jquery' ), $js_version );
|
210 |
}
|
211 |
|
212 |
wp_register_style( 'eeb-css-frontend', EEB_PLUGIN_URL . 'core/includes/assets/css/style.css', false, $css_version );
|
@@ -214,6 +212,10 @@ class Email_Encoder_Run{
|
|
214 |
|
215 |
}
|
216 |
|
|
|
|
|
|
|
|
|
217 |
}
|
218 |
|
219 |
/**
|
@@ -397,7 +399,7 @@ class Email_Encoder_Run{
|
|
397 |
$show_encoded_check = (string) EEB()->settings->get_setting( 'show_encoded_check', true );
|
398 |
|
399 |
if( ! isset( $atts['protection_text'] ) ){
|
400 |
-
$protection_text =
|
401 |
} else {
|
402 |
$protection_text = wp_kses_post( $atts['protection_text'] );
|
403 |
}
|
@@ -426,7 +428,7 @@ class Email_Encoder_Run{
|
|
426 |
|
427 |
// mark link as successfullly encoded (for admin users)
|
428 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
429 |
-
$content .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' .
|
430 |
}
|
431 |
|
432 |
return apply_filters( 'eeb/frontend/shortcode/eeb_protect_content', $content, $atts );
|
@@ -439,7 +441,8 @@ class Email_Encoder_Run{
|
|
439 |
*/
|
440 |
public function shortcode_eeb_email( $atts = array(), $content = null ){
|
441 |
|
442 |
-
$show_encoded_check = (
|
|
|
443 |
|
444 |
if( empty( $atts['email'] ) ){
|
445 |
return '';
|
@@ -467,6 +470,12 @@ class Email_Encoder_Run{
|
|
467 |
$display = html_entity_decode( $atts['display'] );
|
468 |
}
|
469 |
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
$class_name = ' ' . trim( $extra_attrs );
|
471 |
$class_name .= ' class="' . esc_attr( $custom_class ) . '"';
|
472 |
$mailto = '<a href="mailto:' . $email . '"'. $class_name . '>' . $display . '</a>';
|
@@ -474,11 +483,11 @@ class Email_Encoder_Run{
|
|
474 |
switch( $method ){
|
475 |
case 'enc_ascii':
|
476 |
case 'rot13':
|
477 |
-
$mailto = EEB()->validate->encode_ascii( $mailto, $
|
478 |
break;
|
479 |
case 'enc_escape':
|
480 |
case 'escape':
|
481 |
-
$mailto = EEB()->validate->encode_escape( $mailto, $
|
482 |
break;
|
483 |
case 'enc_html':
|
484 |
case 'encode':
|
@@ -489,7 +498,7 @@ class Email_Encoder_Run{
|
|
489 |
|
490 |
// mark link as successfullly encoded (for admin users)
|
491 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
492 |
-
$mailto .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' .
|
493 |
}
|
494 |
|
495 |
return apply_filters( 'eeb/frontend/shortcode/eeb_mailto', $mailto );
|
@@ -519,13 +528,13 @@ class Email_Encoder_Run{
|
|
519 |
$secret = EEB()->settings->get_email_image_secret();
|
520 |
|
521 |
if( EEB()->validate->generate_email_signature( $email, $secret ) !== $hash ){
|
522 |
-
wp_die(
|
523 |
}
|
524 |
|
525 |
$image = EEB()->validate->email_to_image( $email );
|
526 |
|
527 |
if( empty( $image ) ){
|
528 |
-
wp_die(
|
529 |
}
|
530 |
|
531 |
header('Content-type: image/png');
|
109 |
* @return void
|
110 |
*/
|
111 |
public function buffer_final_output(){
|
112 |
+
if ( ! defined( 'WP_CLI' ) ) {
|
113 |
+
ob_start( array( $this, 'apply_content_filter' ) );
|
114 |
+
}
|
115 |
}
|
116 |
|
117 |
/**
|
195 |
|
196 |
public function load_frontend_header_styling(){
|
197 |
|
|
|
198 |
$js_version = date( "ymd-Gis", filemtime( EEB_PLUGIN_DIR . 'core/includes/assets/js/custom.js' ));
|
199 |
$css_version = date( "ymd-Gis", filemtime( EEB_PLUGIN_DIR . 'core/includes/assets/css/style.css' ));
|
200 |
$protection_activated = (int) EEB()->settings->get_setting( 'protect', true );
|
201 |
$without_javascript = (string) EEB()->settings->get_setting( 'protect_using', true );
|
202 |
+
$footer_scripts = (bool) EEB()->settings->get_setting( 'footer_scripts', true );
|
203 |
|
204 |
if( $protection_activated === 2 || $protection_activated === 1 ){
|
205 |
|
|
|
|
|
|
|
|
|
206 |
if( $without_javascript !== 'without_javascript' ){
|
207 |
+
wp_enqueue_script( 'eeb-js-frontend', EEB_PLUGIN_URL . 'core/includes/assets/js/custom.js', array( 'jquery' ), $js_version, $footer_scripts );
|
208 |
}
|
209 |
|
210 |
wp_register_style( 'eeb-css-frontend', EEB_PLUGIN_URL . 'core/includes/assets/css/style.css', false, $css_version );
|
212 |
|
213 |
}
|
214 |
|
215 |
+
if( (string) EEB()->settings->get_setting( 'show_encoded_check', true ) === '1' ){
|
216 |
+
wp_enqueue_style('dashicons');
|
217 |
+
}
|
218 |
+
|
219 |
}
|
220 |
|
221 |
/**
|
399 |
$show_encoded_check = (string) EEB()->settings->get_setting( 'show_encoded_check', true );
|
400 |
|
401 |
if( ! isset( $atts['protection_text'] ) ){
|
402 |
+
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-protection-text-eeb-content' );
|
403 |
} else {
|
404 |
$protection_text = wp_kses_post( $atts['protection_text'] );
|
405 |
}
|
428 |
|
429 |
// mark link as successfullly encoded (for admin users)
|
430 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
431 |
+
$content .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' . __( 'Email encoded successfully!', 'email-encoder-bundle' ) . '"></i>';
|
432 |
}
|
433 |
|
434 |
return apply_filters( 'eeb/frontend/shortcode/eeb_protect_content', $content, $atts );
|
441 |
*/
|
442 |
public function shortcode_eeb_email( $atts = array(), $content = null ){
|
443 |
|
444 |
+
$show_encoded_check = (bool) EEB()->settings->get_setting( 'show_encoded_check', true );
|
445 |
+
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
446 |
|
447 |
if( empty( $atts['email'] ) ){
|
448 |
return '';
|
470 |
$display = html_entity_decode( $atts['display'] );
|
471 |
}
|
472 |
|
473 |
+
if( empty( $atts['noscript'] ) ) {
|
474 |
+
$noscript = $protection_text;
|
475 |
+
} else {
|
476 |
+
$noscript = html_entity_decode( $atts['noscript'] );
|
477 |
+
}
|
478 |
+
|
479 |
$class_name = ' ' . trim( $extra_attrs );
|
480 |
$class_name .= ' class="' . esc_attr( $custom_class ) . '"';
|
481 |
$mailto = '<a href="mailto:' . $email . '"'. $class_name . '>' . $display . '</a>';
|
483 |
switch( $method ){
|
484 |
case 'enc_ascii':
|
485 |
case 'rot13':
|
486 |
+
$mailto = EEB()->validate->encode_ascii( $mailto, $noscript );
|
487 |
break;
|
488 |
case 'enc_escape':
|
489 |
case 'escape':
|
490 |
+
$mailto = EEB()->validate->encode_escape( $mailto, $noscript );
|
491 |
break;
|
492 |
case 'enc_html':
|
493 |
case 'encode':
|
498 |
|
499 |
// mark link as successfullly encoded (for admin users)
|
500 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
501 |
+
$mailto .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' . __( 'Email encoded successfully!', 'email-encoder-bundle' ) . '"></i>';
|
502 |
}
|
503 |
|
504 |
return apply_filters( 'eeb/frontend/shortcode/eeb_mailto', $mailto );
|
528 |
$secret = EEB()->settings->get_email_image_secret();
|
529 |
|
530 |
if( EEB()->validate->generate_email_signature( $email, $secret ) !== $hash ){
|
531 |
+
wp_die( __('Your signture is invalid.', 'email-encoder-bundle') );
|
532 |
}
|
533 |
|
534 |
$image = EEB()->validate->email_to_image( $email );
|
535 |
|
536 |
if( empty( $image ) ){
|
537 |
+
wp_die( __('Your email could not be converted.', 'email-encoder-bundle') );
|
538 |
}
|
539 |
|
540 |
header('Content-type: image/png');
|
core/includes/classes/class-email-encoder-bundle-settings.php
CHANGED
@@ -96,20 +96,20 @@ class Email_Encoder_Settings{
|
|
96 |
'id' => 'protect',
|
97 |
'type' => 'multi-input',
|
98 |
'input-type' => 'radio',
|
99 |
-
'title' =>
|
100 |
'inputs' => array(
|
101 |
1 => array(
|
102 |
-
'label' =>
|
103 |
-
'description' =>
|
104 |
),
|
105 |
2 => array(
|
106 |
-
'label' =>
|
107 |
-
'description' =>
|
108 |
'advanced' => true,
|
109 |
),
|
110 |
3 => array(
|
111 |
-
'label' =>
|
112 |
-
'description' =>
|
113 |
),
|
114 |
),
|
115 |
'required' => false
|
@@ -120,21 +120,21 @@ class Email_Encoder_Settings{
|
|
120 |
'id' => 'protect_using',
|
121 |
'type' => 'multi-input',
|
122 |
'input-type' => 'radio',
|
123 |
-
'title' =>
|
124 |
'inputs' => array(
|
125 |
'with_javascript' => array(
|
126 |
-
'label' =>
|
127 |
),
|
128 |
'without_javascript' => array(
|
129 |
-
'label' =>
|
130 |
),
|
131 |
'strong_method' => array(
|
132 |
-
'label' =>
|
133 |
-
'description' =>
|
134 |
),
|
135 |
'char_encode' => array(
|
136 |
-
'label' =>
|
137 |
-
'description' =>
|
138 |
),
|
139 |
),
|
140 |
'required' => false
|
@@ -146,48 +146,48 @@ class Email_Encoder_Settings{
|
|
146 |
'type' => 'multi-input',
|
147 |
'input-type' => 'checkbox',
|
148 |
'advanced' => true,
|
149 |
-
'title' =>
|
150 |
-
'label' =>
|
151 |
'inputs' => array(
|
152 |
'filter_rss' => array(
|
153 |
'advanced' => true,
|
154 |
-
'label' =>
|
155 |
-
'description' =>
|
156 |
),
|
157 |
'remove_shortcodes_rss' => array(
|
158 |
'advanced' => true,
|
159 |
-
'label' =>
|
160 |
-
'description' =>
|
161 |
),
|
162 |
'input_strong_protection' => array(
|
163 |
'advanced' => true,
|
164 |
-
'label' =>
|
165 |
-
'description' =>
|
166 |
),
|
167 |
'encode_mailtos' => array(
|
168 |
'advanced' => true,
|
169 |
-
'label' =>
|
170 |
-
'description' =>
|
171 |
),
|
172 |
'convert_plain_to_image' => array(
|
173 |
'advanced' => true,
|
174 |
-
'label' =>
|
175 |
-
'description' =>
|
176 |
),
|
177 |
'protect_shortcode_tags' => array(
|
178 |
'advanced' => true,
|
179 |
-
'label' =>
|
180 |
-
'description' =>
|
181 |
),
|
182 |
'filter_hook' => array(
|
183 |
'advanced' => true,
|
184 |
-
'label' =>
|
185 |
-
'description' =>
|
186 |
),
|
187 |
'deactivate_rtl' => array(
|
188 |
'advanced' => true,
|
189 |
-
'label' =>
|
190 |
-
'description' =>
|
191 |
),
|
192 |
),
|
193 |
'required' => false,
|
@@ -199,33 +199,33 @@ class Email_Encoder_Settings{
|
|
199 |
'type' => 'multi-input',
|
200 |
'input-type' => 'text',
|
201 |
'advanced' => true,
|
202 |
-
'title' =>
|
203 |
-
'label' =>
|
204 |
'inputs' => array(
|
205 |
'image_color' => array(
|
206 |
'advanced' => true,
|
207 |
-
'label' =>
|
208 |
-
'description' =>
|
209 |
),
|
210 |
'image_background_color' => array(
|
211 |
'advanced' => true,
|
212 |
-
'label' =>
|
213 |
-
'description' =>
|
214 |
),
|
215 |
'image_text_opacity' => array(
|
216 |
'advanced' => true,
|
217 |
-
'label' =>
|
218 |
-
'description' =>
|
219 |
),
|
220 |
'image_background_opacity' => array(
|
221 |
'advanced' => true,
|
222 |
-
'label' =>
|
223 |
-
'description' =>
|
224 |
),
|
225 |
'image_font_size' => array(
|
226 |
'advanced' => true,
|
227 |
-
'label' =>
|
228 |
-
'description' =>
|
229 |
),
|
230 |
),
|
231 |
'required' => false,
|
@@ -236,10 +236,10 @@ class Email_Encoder_Settings{
|
|
236 |
'id' => 'skip_posts',
|
237 |
'type' => 'text',
|
238 |
'advanced' => true,
|
239 |
-
'title' =>
|
240 |
'placeholder' => '',
|
241 |
'required' => false,
|
242 |
-
'description' =>
|
243 |
),
|
244 |
|
245 |
'protection_text' => array(
|
@@ -247,10 +247,10 @@ class Email_Encoder_Settings{
|
|
247 |
'id' => 'protection_text',
|
248 |
'type' => 'text',
|
249 |
'advanced' => true,
|
250 |
-
'title' =>
|
251 |
'placeholder' => '',
|
252 |
'required' => false,
|
253 |
-
'description' =>
|
254 |
),
|
255 |
|
256 |
'class_name' => array(
|
@@ -258,11 +258,23 @@ class Email_Encoder_Settings{
|
|
258 |
'id' => 'class_name',
|
259 |
'type' => 'text',
|
260 |
'advanced' => true,
|
261 |
-
'title' =>
|
262 |
-
'label' =>
|
263 |
'placeholder' => '',
|
264 |
'required' => false,
|
265 |
-
'description' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
),
|
267 |
|
268 |
'disable_marketing' => array(
|
@@ -270,22 +282,22 @@ class Email_Encoder_Settings{
|
|
270 |
'id' => 'disable_marketing',
|
271 |
'type' => 'checkbox',
|
272 |
'advanced' => true,
|
273 |
-
'title' =>
|
274 |
-
'label' =>
|
275 |
'placeholder' => '',
|
276 |
'required' => false,
|
277 |
-
'description' =>
|
278 |
),
|
279 |
|
280 |
'show_encoded_check' => array(
|
281 |
'fieldset' => array( 'slug' => 'main', 'label' => 'Label' ),
|
282 |
'id' => 'show_encoded_check',
|
283 |
'type' => 'checkbox',
|
284 |
-
'title' =>
|
285 |
-
'label' =>
|
286 |
'placeholder' => '',
|
287 |
'required' => false,
|
288 |
-
'description' =>
|
289 |
),
|
290 |
|
291 |
'own_admin_menu' => array(
|
@@ -293,11 +305,11 @@ class Email_Encoder_Settings{
|
|
293 |
'id' => 'own_admin_menu',
|
294 |
'type' => 'checkbox',
|
295 |
'advanced' => true,
|
296 |
-
'title' =>
|
297 |
-
'label' =>
|
298 |
'placeholder' => '',
|
299 |
'required' => false,
|
300 |
-
'description' =>
|
301 |
),
|
302 |
|
303 |
'encoder_form' => array(
|
@@ -306,14 +318,14 @@ class Email_Encoder_Settings{
|
|
306 |
'type' => 'multi-input',
|
307 |
'input-type' => 'checkbox',
|
308 |
'advanced' => true,
|
309 |
-
'title' =>
|
310 |
'inputs' => array(
|
311 |
'display_encoder_form' => array(
|
312 |
-
'label' =>
|
313 |
-
'description' =>
|
314 |
),
|
315 |
'powered_by' => array(
|
316 |
-
'label' =>
|
317 |
),
|
318 |
),
|
319 |
'required' => false
|
@@ -323,11 +335,11 @@ class Email_Encoder_Settings{
|
|
323 |
'fieldset' => array( 'slug' => 'main', 'label' => 'Label' ),
|
324 |
'id' => 'advanced_settings',
|
325 |
'type' => 'checkbox',
|
326 |
-
'title' =>
|
327 |
-
'label' =>
|
328 |
'placeholder' => '',
|
329 |
'required' => false,
|
330 |
-
'description' =>
|
331 |
),
|
332 |
|
333 |
);
|
96 |
'id' => 'protect',
|
97 |
'type' => 'multi-input',
|
98 |
'input-type' => 'radio',
|
99 |
+
'title' => __( 'Protect emails', 'email-encoder-bundle' ),
|
100 |
'inputs' => array(
|
101 |
1 => array(
|
102 |
+
'label' => __( 'Full-page scan', 'email-encoder-bundle' ),
|
103 |
+
'description' => __('This will check the whole page against any mails and secures them.', 'email-encoder-bundle' )
|
104 |
),
|
105 |
2 => array(
|
106 |
+
'label' => __( 'Wordpress filters', 'email-encoder-bundle' ),
|
107 |
+
'description' => __('Secure only mails that occur within WordPress filters. (Not recommended)', 'email-encoder-bundle' ),
|
108 |
'advanced' => true,
|
109 |
),
|
110 |
3 => array(
|
111 |
+
'label' => __( 'Don\'t do anything.', 'email-encoder-bundle' ),
|
112 |
+
'description' => __('This turns off the protection for emails. (Not recommended)', 'email-encoder-bundle')
|
113 |
),
|
114 |
),
|
115 |
'required' => false
|
120 |
'id' => 'protect_using',
|
121 |
'type' => 'multi-input',
|
122 |
'input-type' => 'radio',
|
123 |
+
'title' => __( 'Protect emails using', 'email-encoder-bundle' ),
|
124 |
'inputs' => array(
|
125 |
'with_javascript' => array(
|
126 |
+
'label' => __( 'automatically the best method (including javascript)', 'email-encoder-bundle' )
|
127 |
),
|
128 |
'without_javascript' => array(
|
129 |
+
'label' => __( 'automatically the best method (excluding javascript)', 'email-encoder-bundle' ),
|
130 |
),
|
131 |
'strong_method' => array(
|
132 |
+
'label' => __( 'a strong method that replaces all emails with a "*protection text*".', 'email-encoder-bundle' ),
|
133 |
+
'description' => __('You can configure the protection text within the advanced settings.', 'email-encoder-bundle')
|
134 |
),
|
135 |
'char_encode' => array(
|
136 |
+
'label' => __( 'simple HTML character encoding.', 'email-encoder-bundle' ),
|
137 |
+
'description' => __('Offers good (but not the best) protection, which saves you in most scenarios.', 'email-encoder-bundle')
|
138 |
),
|
139 |
),
|
140 |
'required' => false
|
146 |
'type' => 'multi-input',
|
147 |
'input-type' => 'checkbox',
|
148 |
'advanced' => true,
|
149 |
+
'title' => __( 'Protect...', 'email-encoder-bundle' ),
|
150 |
+
'label' => __( 'Customize what this plugin protects.', 'email-encoder-bundle' ),
|
151 |
'inputs' => array(
|
152 |
'filter_rss' => array(
|
153 |
'advanced' => true,
|
154 |
+
'label' => __( 'RSS feed', 'email-encoder-bundle' ),
|
155 |
+
'description' => __( 'Activating this option results in protecting the rss feed based on the given protection method.', 'email-encoder-bundle' )
|
156 |
),
|
157 |
'remove_shortcodes_rss' => array(
|
158 |
'advanced' => true,
|
159 |
+
'label' => __( 'Remove all shortcodes from the RSS feeds', 'email-encoder-bundle' ),
|
160 |
+
'description' => __( 'Activating this option results in protecting the rss feed based on the given protection method.', 'email-encoder-bundle' )
|
161 |
),
|
162 |
'input_strong_protection' => array(
|
163 |
'advanced' => true,
|
164 |
+
'label' => __( 'input form email fields using strong protection.', 'email-encoder-bundle' ),
|
165 |
+
'description' => __( 'Warning: this option could conflict with certain form plugins. Test it first. (Requires javascript)', 'email-encoder-bundle' )
|
166 |
),
|
167 |
'encode_mailtos' => array(
|
168 |
'advanced' => true,
|
169 |
+
'label' => __( 'plain emails by converting them to mailto links', 'email-encoder-bundle' ),
|
170 |
+
'description' => __( 'Plain emails will be automatically converted to mailto links where possible.', 'email-encoder-bundle' )
|
171 |
),
|
172 |
'convert_plain_to_image' => array(
|
173 |
'advanced' => true,
|
174 |
+
'label' => __( 'plain emails by converting them to png images', 'email-encoder-bundle' ),
|
175 |
+
'description' => __( 'Plain emails will be automatically converted to png images where possible.', 'email-encoder-bundle' )
|
176 |
),
|
177 |
'protect_shortcode_tags' => array(
|
178 |
'advanced' => true,
|
179 |
+
'label' => __( 'shortcode content', 'email-encoder-bundle' ),
|
180 |
+
'description' => __( 'Protect every shortcode content separately. (This may slows down your site)', 'email-encoder-bundle' )
|
181 |
),
|
182 |
'filter_hook' => array(
|
183 |
'advanced' => true,
|
184 |
+
'label' => __( 'emails from "init" hook', 'email-encoder-bundle' ),
|
185 |
+
'description' => __( 'Check this option if you want to register the email filters on the "init" hook instead of the "wp" hook.', 'email-encoder-bundle' )
|
186 |
),
|
187 |
'deactivate_rtl' => array(
|
188 |
'advanced' => true,
|
189 |
+
'label' => __( 'mailto links without CSS direction', 'email-encoder-bundle' ),
|
190 |
+
'description' => __( 'Check this option if your site does not support CSS directions.', 'email-encoder-bundle' )
|
191 |
),
|
192 |
),
|
193 |
'required' => false,
|
199 |
'type' => 'multi-input',
|
200 |
'input-type' => 'text',
|
201 |
'advanced' => true,
|
202 |
+
'title' => __( 'Image settings', 'email-encoder-bundle' ),
|
203 |
+
'label' => __( 'Customize the settings for dynamically created images.', 'email-encoder-bundle' ),
|
204 |
'inputs' => array(
|
205 |
'image_color' => array(
|
206 |
'advanced' => true,
|
207 |
+
'label' => __( 'Image Colors', 'email-encoder-bundle' ),
|
208 |
+
'description' => __( 'Please include RGB colors, comme saparated. E.g.: 0,0,255', 'email-encoder-bundle' )
|
209 |
),
|
210 |
'image_background_color' => array(
|
211 |
'advanced' => true,
|
212 |
+
'label' => __( 'Image Background Colors', 'email-encoder-bundle' ),
|
213 |
+
'description' => __( 'Please include RGB colors, comme saparated. E.g.: 0,0,255', 'email-encoder-bundle' )
|
214 |
),
|
215 |
'image_text_opacity' => array(
|
216 |
'advanced' => true,
|
217 |
+
'label' => __( 'Text Opacity', 'email-encoder-bundle' ),
|
218 |
+
'description' => __( 'Change the text opacity for the created images. 0 = not transparent - 127 = completely transprent', 'email-encoder-bundle' )
|
219 |
),
|
220 |
'image_background_opacity' => array(
|
221 |
'advanced' => true,
|
222 |
+
'label' => __( 'Background Opacity', 'email-encoder-bundle' ),
|
223 |
+
'description' => __( 'Change the background opacity for the created images. 0 = not transparent - 127 = completely transprent', 'email-encoder-bundle' )
|
224 |
),
|
225 |
'image_font_size' => array(
|
226 |
'advanced' => true,
|
227 |
+
'label' => __( 'Font Size', 'email-encoder-bundle' ),
|
228 |
+
'description' => __( 'Change the font size of the image text. Default: 4 - You can choose from 1 - 5', 'email-encoder-bundle' )
|
229 |
),
|
230 |
),
|
231 |
'required' => false,
|
236 |
'id' => 'skip_posts',
|
237 |
'type' => 'text',
|
238 |
'advanced' => true,
|
239 |
+
'title' => __('Exclude post id\'s from protection', 'email-encoder-bundle'),
|
240 |
'placeholder' => '',
|
241 |
'required' => false,
|
242 |
+
'description' => __('By comma separating post id\'s ( e.g. 123,4535,643), you are able to exclude these posts from the logic protection.', 'email-encoder-bundle')
|
243 |
),
|
244 |
|
245 |
'protection_text' => array(
|
247 |
'id' => 'protection_text',
|
248 |
'type' => 'text',
|
249 |
'advanced' => true,
|
250 |
+
'title' => __('Set protection text *', 'email-encoder-bundle'),
|
251 |
'placeholder' => '',
|
252 |
'required' => false,
|
253 |
+
'description' => __('This text will be shown for protected email addresses and within noscript tags.', 'email-encoder-bundle')
|
254 |
),
|
255 |
|
256 |
'class_name' => array(
|
258 |
'id' => 'class_name',
|
259 |
'type' => 'text',
|
260 |
'advanced' => true,
|
261 |
+
'title' => __('Additional classes', 'email-encoder-bundle'),
|
262 |
+
'label' => __('Add extra classes to mailto links.', 'email-encoder-bundle'),
|
263 |
'placeholder' => '',
|
264 |
'required' => false,
|
265 |
+
'description' => __('Leave blank for none', 'email-encoder-bundle')
|
266 |
+
),
|
267 |
+
|
268 |
+
'footer_scripts' => array(
|
269 |
+
'fieldset' => array( 'slug' => 'main', 'label' => 'Label' ),
|
270 |
+
'id' => 'footer_scripts',
|
271 |
+
'type' => 'checkbox',
|
272 |
+
'advanced' => true,
|
273 |
+
'title' => __('Load scripts in footer', 'email-encoder-bundle'),
|
274 |
+
'label' => __('Check this button if you want to load all frontend scripts within the footer.', 'email-encoder-bundle'),
|
275 |
+
'placeholder' => '',
|
276 |
+
'required' => false,
|
277 |
+
'description' => __('This forces every script to be enqueued within the footer.', 'email-encoder-bundle')
|
278 |
),
|
279 |
|
280 |
'disable_marketing' => array(
|
282 |
'id' => 'disable_marketing',
|
283 |
'type' => 'checkbox',
|
284 |
'advanced' => true,
|
285 |
+
'title' => __('Disable Marketing', 'email-encoder-bundle'),
|
286 |
+
'label' => __('Disable all marketing notifications', 'email-encoder-bundle'),
|
287 |
'placeholder' => '',
|
288 |
'required' => false,
|
289 |
+
'description' => __('If you are not satisfied with our marketing recommendations, check this box.', 'email-encoder-bundle')
|
290 |
),
|
291 |
|
292 |
'show_encoded_check' => array(
|
293 |
'fieldset' => array( 'slug' => 'main', 'label' => 'Label' ),
|
294 |
'id' => 'show_encoded_check',
|
295 |
'type' => 'checkbox',
|
296 |
+
'title' => __('Security Check', 'email-encoder-bundle'),
|
297 |
+
'label' => __('Mark emails on the site as successfully encoded', 'email-encoder-bundle') . '<i class="dashicons-before dashicons-lock" style="color:green;"></i>',
|
298 |
'placeholder' => '',
|
299 |
'required' => false,
|
300 |
+
'description' => __('Only visible for admin users. If your emails look broken, simply deactivate this feature.', 'email-encoder-bundle')
|
301 |
),
|
302 |
|
303 |
'own_admin_menu' => array(
|
305 |
'id' => 'own_admin_menu',
|
306 |
'type' => 'checkbox',
|
307 |
'advanced' => true,
|
308 |
+
'title' => __('Admin Menu', 'email-encoder-bundle'),
|
309 |
+
'label' => __('Show this page in the main menu item', 'email-encoder-bundle'),
|
310 |
'placeholder' => '',
|
311 |
'required' => false,
|
312 |
+
'description' => __('Otherwise it will be shown in "Settings"-menu.', 'email-encoder-bundle')
|
313 |
),
|
314 |
|
315 |
'encoder_form' => array(
|
318 |
'type' => 'multi-input',
|
319 |
'input-type' => 'checkbox',
|
320 |
'advanced' => true,
|
321 |
+
'title' => __( 'Encoder form settings', 'email-encoder-bundle' ),
|
322 |
'inputs' => array(
|
323 |
'display_encoder_form' => array(
|
324 |
+
'label' => __( 'Activate the encoder form.', 'email-encoder-bundle' ),
|
325 |
+
'description' => __( 'This allows you to use the email encoder form, as well as the shortcode and template tag.', 'email-encoder-bundle' )
|
326 |
),
|
327 |
'powered_by' => array(
|
328 |
+
'label' => __( 'Show a "powered by" link on bottom of the encoder form', 'email-encoder-bundle' ),
|
329 |
),
|
330 |
),
|
331 |
'required' => false
|
335 |
'fieldset' => array( 'slug' => 'main', 'label' => 'Label' ),
|
336 |
'id' => 'advanced_settings',
|
337 |
'type' => 'checkbox',
|
338 |
+
'title' => __('Advanced Settings', 'email-encoder-bundle'),
|
339 |
+
'label' => __('Show advanced settings for more configuration possibilities.', 'email-encoder-bundle'),
|
340 |
'placeholder' => '',
|
341 |
'required' => false,
|
342 |
+
'description' => __('Activate the advanced settings in case you want to customize the default logic or you want to troubleshoot the plugin.', 'email-encoder-bundle')
|
343 |
),
|
344 |
|
345 |
);
|
core/includes/classes/class-email-encoder-bundle-validate.php
CHANGED
@@ -175,7 +175,7 @@ class Email_Encoder_Validate{
|
|
175 |
}
|
176 |
|
177 |
if ( $replace_by === null ) {
|
178 |
-
$replace_by =
|
179 |
}
|
180 |
|
181 |
$self = $this;
|
@@ -205,10 +205,10 @@ class Email_Encoder_Validate{
|
|
205 |
}
|
206 |
|
207 |
} elseif( $protection_method === 'use_javascript' ){
|
208 |
-
$protection_text =
|
209 |
$protected_return = $this->dynamic_js_email_encoding( $matches[0], $protection_text );
|
210 |
} elseif( $protection_method === 'use_css' ){
|
211 |
-
$protection_text =
|
212 |
$protected_return = $this->encode_email_css( $matches[0], $protection_text );
|
213 |
} else {
|
214 |
$protected_return = $replace_by;
|
@@ -216,7 +216,7 @@ class Email_Encoder_Validate{
|
|
216 |
|
217 |
// mark link as successfullly encoded (for admin users)
|
218 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
219 |
-
$protected_return .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' .
|
220 |
}
|
221 |
|
222 |
return $protected_return;
|
@@ -438,7 +438,7 @@ class Email_Encoder_Validate{
|
|
438 |
$sub_return = str_replace( $email, antispambot( $email ), $input );
|
439 |
|
440 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
441 |
-
$sub_return .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' .
|
442 |
}
|
443 |
|
444 |
return $sub_return;
|
@@ -451,7 +451,7 @@ class Email_Encoder_Validate{
|
|
451 |
|
452 |
// mark link as successfullly encoded (for admin users)
|
453 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
454 |
-
$inputWithDataAttr .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' .
|
455 |
}
|
456 |
|
457 |
// remove email from value attribute
|
@@ -492,7 +492,6 @@ class Email_Encoder_Validate{
|
|
492 |
$email = '';
|
493 |
$class_ori = ( empty( $attrs['class'] ) ) ? '' : $attrs['class'];
|
494 |
$custom_class = (string) EEB()->settings->get_setting( 'class_name', true );
|
495 |
-
$activated_protection = ( in_array( (int) EEB()->settings->get_setting( 'protect', true ), array( 1, 2 ) ) ) ? true : false;
|
496 |
$show_encoded_check = (string) EEB()->settings->get_setting( 'show_encoded_check', true );
|
497 |
|
498 |
// set user-defined class
|
@@ -512,7 +511,7 @@ class Email_Encoder_Validate{
|
|
512 |
$link = '<a ';
|
513 |
|
514 |
foreach ( $attrs AS $key => $value ) {
|
515 |
-
if ( strtolower( $key ) == 'href'
|
516 |
if( $protection_method === 'without_javascript' ){
|
517 |
$link .= $key . '="' . antispambot( $value ) . '" ';
|
518 |
} else {
|
@@ -536,7 +535,7 @@ class Email_Encoder_Validate{
|
|
536 |
|
537 |
$link .= '>';
|
538 |
|
539 |
-
$link .= (
|
540 |
|
541 |
$link .= '</a>';
|
542 |
|
@@ -548,7 +547,7 @@ class Email_Encoder_Validate{
|
|
548 |
|
549 |
// mark link as successfullly encoded (for admin users)
|
550 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
551 |
-
$link .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' .
|
552 |
}
|
553 |
|
554 |
|
@@ -567,7 +566,7 @@ class Email_Encoder_Validate{
|
|
567 |
public function get_protected_display( $display, $protection_method = null ){
|
568 |
|
569 |
$convert_plain_to_image = (bool) EEB()->settings->get_setting( 'convert_plain_to_image', true, 'filter_body' );
|
570 |
-
$protection_text =
|
571 |
|
572 |
// get display out of array (result of preg callback)
|
573 |
if ( is_array( $display ) ) {
|
@@ -753,9 +752,9 @@ class Email_Encoder_Validate{
|
|
753 |
}
|
754 |
|
755 |
$smethods = array(
|
756 |
-
'rot13' =>
|
757 |
-
'escape' =>
|
758 |
-
'encode' =>
|
759 |
);
|
760 |
$method_options = '';
|
761 |
$selected = false;
|
@@ -765,12 +764,12 @@ class Email_Encoder_Validate{
|
|
765 |
}
|
766 |
|
767 |
$labels = array(
|
768 |
-
'email' =>
|
769 |
-
'display' =>
|
770 |
-
'mailto' =>
|
771 |
-
'method' =>
|
772 |
-
'create_link' =>
|
773 |
-
'output' =>
|
774 |
'powered_by' => $powered_by,
|
775 |
);
|
776 |
|
175 |
}
|
176 |
|
177 |
if ( $replace_by === null ) {
|
178 |
+
$replace_by = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
179 |
}
|
180 |
|
181 |
$self = $this;
|
205 |
}
|
206 |
|
207 |
} elseif( $protection_method === 'use_javascript' ){
|
208 |
+
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
209 |
$protected_return = $this->dynamic_js_email_encoding( $matches[0], $protection_text );
|
210 |
} elseif( $protection_method === 'use_css' ){
|
211 |
+
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
212 |
$protected_return = $this->encode_email_css( $matches[0], $protection_text );
|
213 |
} else {
|
214 |
$protected_return = $replace_by;
|
216 |
|
217 |
// mark link as successfullly encoded (for admin users)
|
218 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
219 |
+
$protected_return .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' . __( 'Email encoded successfully!', 'email-encoder-bundle' ) . '"></i>';
|
220 |
}
|
221 |
|
222 |
return $protected_return;
|
438 |
$sub_return = str_replace( $email, antispambot( $email ), $input );
|
439 |
|
440 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
441 |
+
$sub_return .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' . __( 'Email encoded successfully!', 'email-encoder-bundle' ) . '"></i>';
|
442 |
}
|
443 |
|
444 |
return $sub_return;
|
451 |
|
452 |
// mark link as successfullly encoded (for admin users)
|
453 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
454 |
+
$inputWithDataAttr .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' . __( 'Email encoded successfully!', 'email-encoder-bundle' ) . '"></i>';
|
455 |
}
|
456 |
|
457 |
// remove email from value attribute
|
492 |
$email = '';
|
493 |
$class_ori = ( empty( $attrs['class'] ) ) ? '' : $attrs['class'];
|
494 |
$custom_class = (string) EEB()->settings->get_setting( 'class_name', true );
|
|
|
495 |
$show_encoded_check = (string) EEB()->settings->get_setting( 'show_encoded_check', true );
|
496 |
|
497 |
// set user-defined class
|
511 |
$link = '<a ';
|
512 |
|
513 |
foreach ( $attrs AS $key => $value ) {
|
514 |
+
if ( strtolower( $key ) == 'href' ) {
|
515 |
if( $protection_method === 'without_javascript' ){
|
516 |
$link .= $key . '="' . antispambot( $value ) . '" ';
|
517 |
} else {
|
535 |
|
536 |
$link .= '>';
|
537 |
|
538 |
+
$link .= ( preg_match( EEB()->settings->get_email_regex(), $display) > 0 ) ? $this->get_protected_display( $display, $protection_method ) : $display;
|
539 |
|
540 |
$link .= '</a>';
|
541 |
|
547 |
|
548 |
// mark link as successfullly encoded (for admin users)
|
549 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
550 |
+
$link .= '<i class="eeb-encoded dashicons-before dashicons-lock" title="' . __( 'Email encoded successfully!', 'email-encoder-bundle' ) . '"></i>';
|
551 |
}
|
552 |
|
553 |
|
566 |
public function get_protected_display( $display, $protection_method = null ){
|
567 |
|
568 |
$convert_plain_to_image = (bool) EEB()->settings->get_setting( 'convert_plain_to_image', true, 'filter_body' );
|
569 |
+
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
570 |
|
571 |
// get display out of array (result of preg callback)
|
572 |
if ( is_array( $display ) ) {
|
752 |
}
|
753 |
|
754 |
$smethods = array(
|
755 |
+
'rot13' => __( 'Rot13 (Javascript)', 'email-encoder-bundle' ),
|
756 |
+
'escape' => __( 'Escape (Javascript)', 'email-encoder-bundle' ),
|
757 |
+
'encode' => __( 'Encode (HTML)', 'email-encoder-bundle' ),
|
758 |
);
|
759 |
$method_options = '';
|
760 |
$selected = false;
|
764 |
}
|
765 |
|
766 |
$labels = array(
|
767 |
+
'email' => __( 'Email Address:', 'email-encoder-bundle' ),
|
768 |
+
'display' => __( 'Display Text:', 'email-encoder-bundle' ),
|
769 |
+
'mailto' => __( 'Mailto Link:', 'email-encoder-bundle' ),
|
770 |
+
'method' => __( 'Encoding Method:', 'email-encoder-bundle' ),
|
771 |
+
'create_link' => __( 'Create Protected Mail Link >>', 'email-encoder-bundle' ),
|
772 |
+
'output' => __( 'Protected Mail Link (code):', 'email-encoder-bundle' ),
|
773 |
'powered_by' => $powered_by,
|
774 |
);
|
775 |
|
core/includes/functions/template-tags.php
CHANGED
@@ -76,7 +76,7 @@ if (!function_exists('eeb_protect_content')):
|
|
76 |
function eeb_protect_content( $content, $method = null, $protection_text = null ) {
|
77 |
|
78 |
if( empty( $protection_text ) ){
|
79 |
-
$protection_text =
|
80 |
} else {
|
81 |
$protection_text = wp_kses_post( $protection_text );
|
82 |
}
|
76 |
function eeb_protect_content( $content, $method = null, $protection_text = null ) {
|
77 |
|
78 |
if( empty( $protection_text ) ){
|
79 |
+
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
80 |
} else {
|
81 |
$protection_text = wp_kses_post( $protection_text );
|
82 |
}
|
core/includes/integrations/classes/mailoptin.php
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
if ( ! class_exists( 'MO_Admin_Notice' ) ) {
|
3 |
class MO_Admin_Notice {
|
4 |
public function __construct() {
|
1 |
<?php
|
2 |
+
|
3 |
+
// Exit if accessed directly.
|
4 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
5 |
+
|
6 |
if ( ! class_exists( 'MO_Admin_Notice' ) ) {
|
7 |
class MO_Admin_Notice {
|
8 |
public function __construct() {
|
core/includes/integrations/classes/maintenance.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Exit if accessed directly.
|
4 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
5 |
+
|
6 |
+
if( ! class_exists( 'Email_Encoder_Integration_Maintenance' ) ){
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class Email_Encoder_Integration_Maintenance
|
10 |
+
*
|
11 |
+
* This class integrates support for the maintenance plugin: https://de.wordpress.org/plugins/maintenance/
|
12 |
+
*
|
13 |
+
* @since 2.0.0
|
14 |
+
* @package EEB
|
15 |
+
* @author Ironikus <info@ironikus.com>
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Email_Encoder_Integration_Maintenance{
|
19 |
+
|
20 |
+
/**
|
21 |
+
* The main page name for our admin page
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
* @since 2.0.0
|
25 |
+
*/
|
26 |
+
private $page_name;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The main page title for our admin page
|
30 |
+
*
|
31 |
+
* @var string
|
32 |
+
* @since 2.0.0
|
33 |
+
*/
|
34 |
+
private $page_title;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Our Email_Encoder_Run constructor.
|
38 |
+
*/
|
39 |
+
function __construct(){
|
40 |
+
$this->page_name = EEB()->settings->get_page_name();
|
41 |
+
$this->page_title = EEB()->settings->get_page_title();
|
42 |
+
$this->add_hooks();
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Define all of our necessary hooks
|
47 |
+
*/
|
48 |
+
private function add_hooks(){
|
49 |
+
add_action( 'load_custom_style', array( $this, 'eeb_integrations_maintenance_load_custom_styles' ), 100 );
|
50 |
+
add_action( 'load_custom_scripts', array( $this, 'eeb_integrations_maintenance_load_custom_scripts' ), 100 );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* ######################
|
55 |
+
* ###
|
56 |
+
* #### HELPERS
|
57 |
+
* ###
|
58 |
+
* ######################
|
59 |
+
*/
|
60 |
+
|
61 |
+
public function is_maintenance_active(){
|
62 |
+
return class_exists( 'MTNC' );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* ######################
|
67 |
+
* ###
|
68 |
+
* #### SCRIPTS & STYLES
|
69 |
+
* ###
|
70 |
+
* ######################
|
71 |
+
*/
|
72 |
+
|
73 |
+
public function eeb_integrations_maintenance_load_custom_styles(){
|
74 |
+
|
75 |
+
if( ! $this->is_maintenance_active() ){
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
|
79 |
+
$protection_activated = (int) EEB()->settings->get_setting( 'protect', true );
|
80 |
+
|
81 |
+
if( $protection_activated === 2 || $protection_activated === 1 ){
|
82 |
+
|
83 |
+
echo '<link rel="stylesheet" id="eeb-css-frontend" href="' . EEB_PLUGIN_URL . 'core/includes/assets/css/style.css' . '" type="text/css" media="all" />';
|
84 |
+
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
public function eeb_integrations_maintenance_load_custom_scripts(){
|
89 |
+
if( ! $this->is_maintenance_active() ){
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
|
93 |
+
$protection_activated = (int) EEB()->settings->get_setting( 'protect', true );
|
94 |
+
$without_javascript = (string) EEB()->settings->get_setting( 'protect_using', true );
|
95 |
+
|
96 |
+
if( $protection_activated === 2 || $protection_activated === 1 ){
|
97 |
+
|
98 |
+
if( $without_javascript !== 'without_javascript' ){
|
99 |
+
echo '<script type="text/javascript" src="' . EEB_PLUGIN_URL . 'core/includes/assets/js/custom.js' . '"></script>';
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
new Email_Encoder_Integration_Maintenance();
|
109 |
+
}
|
core/includes/integrations/loader.php
CHANGED
@@ -15,23 +15,28 @@ class EEB_Integrations_Loader{
|
|
15 |
}
|
16 |
|
17 |
public function load_integrations(){
|
|
|
18 |
|
19 |
-
$
|
20 |
'mailoptin' => 'mailoptin.php',
|
21 |
);
|
22 |
-
$disable_marketing = (bool) EEB()->settings->get_setting( 'disable_marketing', true );
|
23 |
|
24 |
-
$
|
|
|
|
|
|
|
25 |
if( $disable_marketing ){
|
26 |
-
$
|
27 |
}
|
|
|
|
|
28 |
|
29 |
-
foreach ( $
|
30 |
|
31 |
$plugin_file = 'classes/' . $plugin_file;
|
32 |
$full_path = EEB_PLUGIN_DIR . 'core/includes/integrations/' . $plugin_file;
|
33 |
|
34 |
-
if ( TRUE === apply_filters( 'eeb/integrations/' . $plugin_id,
|
35 |
if( file_exists( $full_path ) ){
|
36 |
include( $plugin_file );
|
37 |
}
|
15 |
}
|
16 |
|
17 |
public function load_integrations(){
|
18 |
+
$disable_marketing = (bool) EEB()->settings->get_setting( 'disable_marketing', true );
|
19 |
|
20 |
+
$marketing = array(
|
21 |
'mailoptin' => 'mailoptin.php',
|
22 |
);
|
|
|
23 |
|
24 |
+
$plugins = array(
|
25 |
+
'maintenance' => 'maintenance.php',
|
26 |
+
);
|
27 |
+
|
28 |
if( $disable_marketing ){
|
29 |
+
$marketing = array();
|
30 |
}
|
31 |
+
|
32 |
+
$integrations = array_merge( $marketing, $plugins );
|
33 |
|
34 |
+
foreach ( $integrations as $plugin_id => $plugin_file ) :
|
35 |
|
36 |
$plugin_file = 'classes/' . $plugin_file;
|
37 |
$full_path = EEB_PLUGIN_DIR . 'core/includes/integrations/' . $plugin_file;
|
38 |
|
39 |
+
if ( TRUE === apply_filters( 'eeb/integrations/' . $plugin_id, true ) ){
|
40 |
if( file_exists( $full_path ) ){
|
41 |
include( $plugin_file );
|
42 |
}
|
core/includes/partials/help-tabs/general.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php $pluginData = get_plugin_data( EEB_PLUGIN_FILE ); ?>
|
2 |
<h3><i class="dashicons-before dashicons-email"></i> <?php echo $pluginData['Name'] ?> - v<?php echo $pluginData['Version']; ?></h3>
|
3 |
<p>
|
4 |
-
<?php echo
|
5 |
</p>
|
6 |
<p>
|
7 |
-
<?php echo
|
8 |
</p>
|
9 |
<p>
|
10 |
-
<?php echo
|
11 |
</p>
|
12 |
<p>
|
13 |
Visit us at <a href="https://ironikus.com" target="_blank" title="Visit us at https://ironikus.com" >https://ironikus.com</a>
|
1 |
<?php $pluginData = get_plugin_data( EEB_PLUGIN_FILE ); ?>
|
2 |
<h3><i class="dashicons-before dashicons-email"></i> <?php echo $pluginData['Name'] ?> - v<?php echo $pluginData['Version']; ?></h3>
|
3 |
<p>
|
4 |
+
<?php echo __( 'The plugin works out-of-the-box to protect your email addresses. All settings are default set to protect your email addresses automatically.', 'email-encoder-bundle' ); ?>
|
5 |
</p>
|
6 |
<p>
|
7 |
+
<?php echo __( 'To report problems or bugs or for support, please use <a href="https://wordpress.org/support/plugin/email-encoder-bundle#postform" target="_new">the official forum</a>.', 'email-encoder-bundle' ); ?>
|
8 |
</p>
|
9 |
<p>
|
10 |
+
<?php echo __( 'You can now also check your website protection using our email checker tool: <a href="https://ironikus.com/email-checker/" target="_blank">https://ironikus.com/email-checker/</a>.', 'email-encoder-bundle' ); ?>
|
11 |
</p>
|
12 |
<p>
|
13 |
Visit us at <a href="https://ironikus.com" target="_blank" title="Visit us at https://ironikus.com" >https://ironikus.com</a>
|
core/includes/partials/help-tabs/shortcodes.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<h3><?php echo
|
2 |
-
<p><?php echo
|
3 |
<p><code>[eeb_protect_emails protect_using="with_javascript"]…[/eeb_protect_emails]</code>
|
4 |
</p>
|
5 |
-
<p><?php echo
|
6 |
<p><code>[eeb_mailto email="info@myemail.com" extra_attrs="target='_blank'" method="rot13" display="Custom Text"]</code>
|
7 |
</p>
|
8 |
-
<p><?php echo
|
9 |
<h4><code>[eeb_protect_content protection_text="I am a noscript text" method="rot13"]My Email[/eeb_protect_content]</code></h4>
|
10 |
-
<p><?php echo
|
11 |
<p><code>[eeb_form]</code>
|
12 |
</p>
|
1 |
+
<h3><?php echo __( 'Shortcodes', 'email-encoder-bundle' ); ?></h3>
|
2 |
+
<p><?php echo __( 'You can protect those addresses using the following shortcode. Everything you add within these both tags, will be checked for emails automatically.', 'email-encoder-bundle' ); ?></p>
|
3 |
<p><code>[eeb_protect_emails protect_using="with_javascript"]…[/eeb_protect_emails]</code>
|
4 |
</p>
|
5 |
+
<p><?php echo __( 'Create a protected mailto link:', 'email-encoder-bundle' ); ?></p>
|
6 |
<p><code>[eeb_mailto email="info@myemail.com" extra_attrs="target='_blank'" method="rot13" display="Custom Text"]</code>
|
7 |
</p>
|
8 |
+
<p><?php echo __( 'You can also protect phone numbers and any kind of text by using the following shortcode:', 'email-encoder-bundle' ); ?></p>
|
9 |
<h4><code>[eeb_protect_content protection_text="I am a noscript text" method="rot13"]My Email[/eeb_protect_content]</code></h4>
|
10 |
+
<p><?php echo __( 'Display the encoder form', 'email-encoder-bundle' ); ?></p>
|
11 |
<p><code>[eeb_form]</code>
|
12 |
</p>
|
core/includes/partials/help-tabs/template-tags.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<h3><?php echo
|
2 |
|
3 |
<h4><code>eeb_mailto( $email [, $display] [, $attrs] [, $method] )</code></h4>
|
4 |
-
<p><?php echo
|
5 |
<pre><code><?php
|
6 |
if (function_exists('eeb_mailto')) {
|
7 |
echo eeb_mailto('info@somedomain.com', 'Mail Me');
|
8 |
}
|
9 |
?></code></pre>
|
10 |
-
<p><?php echo
|
11 |
<br><br>
|
12 |
<h4><code>eeb_form()</code></h4>
|
13 |
-
<p><?php echo
|
14 |
<pre><code><?php
|
15 |
if (function_exists('eeb_form')) {
|
16 |
echo eeb_form();
|
17 |
}
|
18 |
?></code></pre>
|
19 |
-
<p><?php echo
|
20 |
<br><br>
|
21 |
<h4><code>eeb_protect_content( $content )</code></h4>
|
22 |
-
<p><?php echo
|
23 |
<pre><code><?php
|
24 |
if (function_exists('eeb_protect_content')) {
|
25 |
echo eeb_protect_content('+12 345 678');
|
@@ -27,7 +27,7 @@
|
|
27 |
?></code></pre>
|
28 |
<br><br>
|
29 |
<h4><code>eeb_protect_emails( $content )</code></h4>
|
30 |
-
<p><?php echo
|
31 |
<pre><code><?php
|
32 |
if (function_exists('eeb_protect_emails')) {
|
33 |
echo eeb_protect_emails('You can parse any kind of text or html in here. All emails like test@test.test will be encoded depending on your plugin settings.');
|
1 |
+
<h3><?php echo __( 'Template functions', 'email-encoder-bundle' ); ?></h3>
|
2 |
|
3 |
<h4><code>eeb_mailto( $email [, $display] [, $attrs] [, $method] )</code></h4>
|
4 |
+
<p><?php echo __( 'Create a protected mailto link:', 'email-encoder-bundle' ); ?></p>
|
5 |
<pre><code><?php
|
6 |
if (function_exists('eeb_mailto')) {
|
7 |
echo eeb_mailto('info@somedomain.com', 'Mail Me');
|
8 |
}
|
9 |
?></code></pre>
|
10 |
+
<p><?php echo __( 'You can pass 3 optional arguments: <code>$display</code>, <code>$attrs</code> and <code>$method</code>', 'email-encoder-bundle' ); ?></p>
|
11 |
<br><br>
|
12 |
<h4><code>eeb_form()</code></h4>
|
13 |
+
<p><?php echo __( 'Get Email Encoder Form', 'email-encoder-bundle' ); ?></p>
|
14 |
<pre><code><?php
|
15 |
if (function_exists('eeb_form')) {
|
16 |
echo eeb_form();
|
17 |
}
|
18 |
?></code></pre>
|
19 |
+
<p><?php echo __( 'This will output the email encoder form on your website.', 'email-encoder-bundle' ); ?></p>
|
20 |
<br><br>
|
21 |
<h4><code>eeb_protect_content( $content )</code></h4>
|
22 |
+
<p><?php echo __( 'Protects the given content against spambots.', 'email-encoder-bundle' ); ?></p>
|
23 |
<pre><code><?php
|
24 |
if (function_exists('eeb_protect_content')) {
|
25 |
echo eeb_protect_content('+12 345 678');
|
27 |
?></code></pre>
|
28 |
<br><br>
|
29 |
<h4><code>eeb_protect_emails( $content )</code></h4>
|
30 |
+
<p><?php echo __( 'Protects the given content against spambots.', 'email-encoder-bundle' ); ?></p>
|
31 |
<pre><code><?php
|
32 |
if (function_exists('eeb_protect_emails')) {
|
33 |
echo eeb_protect_emails('You can parse any kind of text or html in here. All emails like test@test.test will be encoded depending on your plugin settings.');
|
core/includes/partials/widgets/main.php
CHANGED
@@ -98,7 +98,7 @@ $advanced_settings = (bool) EEB()->settings->get_setting( 'advanced_settings', t
|
|
98 |
</fieldset>
|
99 |
|
100 |
<p>
|
101 |
-
<?php submit_button(
|
102 |
</p>
|
103 |
</div>
|
104 |
</div>
|
98 |
</fieldset>
|
99 |
|
100 |
<p>
|
101 |
+
<?php submit_button( __( 'Save all', 'email-encoder-bundle' ) ); ?>
|
102 |
</p>
|
103 |
</div>
|
104 |
</div>
|
email-encoder-bundle.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Email Encoder - Protect Email Addresses
|
4 |
-
* Version: 2.0.
|
5 |
* Plugin URI: https://wordpress.org/plugins/email-encoder-bundle/
|
6 |
* Description: Protect email addresses on your site and hide them from spambots. Easy to use & flexible.
|
7 |
* Author: Ironikus
|
@@ -22,7 +22,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
22 |
define( 'EEB_NAME', 'Email Encoder' );
|
23 |
|
24 |
// Plugin version.
|
25 |
-
define( 'EEB_VERSION', '2.0.
|
26 |
|
27 |
// Determines if the plugin is loaded
|
28 |
define( 'EEB_SETUP', true );
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Email Encoder - Protect Email Addresses
|
4 |
+
* Version: 2.0.2
|
5 |
* Plugin URI: https://wordpress.org/plugins/email-encoder-bundle/
|
6 |
* Description: Protect email addresses on your site and hide them from spambots. Easy to use & flexible.
|
7 |
* Author: Ironikus
|
22 |
define( 'EEB_NAME', 'Email Encoder' );
|
23 |
|
24 |
// Plugin version.
|
25 |
+
define( 'EEB_VERSION', '2.0.2' );
|
26 |
|
27 |
// Determines if the plugin is loaded
|
28 |
define( 'EEB_SETUP', true );
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Email Encoder - Protect Email Addresses ===
|
2 |
Contributors: ironikus
|
3 |
Tags: email address, protect, antispam, mailto, spambot, secure, e-mail, email, mail, obfuscate, encode, encoder, encrypt, hide, bot, crawl, spider, robots, spam, protection, harvest, harvesting, security
|
4 |
-
Requires at least: 4.
|
5 |
Requires PHP: 5.1
|
6 |
Tested up to: 5.2.3
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -115,6 +115,16 @@ Yes, since version 1.3.0 also special characters are supported.
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
= 2.0.1 =
|
119 |
* Fix: Include missing template functions requirement
|
120 |
* Tweak: Clear languages
|
1 |
=== Email Encoder - Protect Email Addresses ===
|
2 |
Contributors: ironikus
|
3 |
Tags: email address, protect, antispam, mailto, spambot, secure, e-mail, email, mail, obfuscate, encode, encoder, encrypt, hide, bot, crawl, spider, robots, spam, protection, harvest, harvesting, security
|
4 |
+
Requires at least: 4.7
|
5 |
Requires PHP: 5.1
|
6 |
Tested up to: 5.2.3
|
7 |
+
Stable tag: 2.0.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 2.0.2 =
|
119 |
+
* Feature: New settings item to include custom scripts within the footer and not in the header
|
120 |
+
* Feature: Support for the "Maintenance" plugin from WP Maintenance
|
121 |
+
* TweaK: Remove our main translation handler to make plugin translations on WordPress.org available again.
|
122 |
+
* Tweak: Optimize PHP code to WordPress standards
|
123 |
+
* Tweak: Enqueue dashicons as well if only "show_encoded_check" is checked and protection is set to "Do nothing"
|
124 |
+
* Tweak: Make eeb_mailto link available with protection set to "Do nothing" as well
|
125 |
+
* Fix: WP CLI did not work with this plugin in an active state (Due to the active buffer filter)
|
126 |
+
* Fix: Emails have been not encoded properly if "Do nothing" was chosen as a setting and the eeb_mailto shortcode was used
|
127 |
+
|
128 |
= 2.0.1 =
|
129 |
* Fix: Include missing template functions requirement
|
130 |
* Tweak: Clear languages
|