Email Encoder Bundle – Protect Email Address - Version 2.0.2

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 Icon 128x128 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 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?', 'ironikus' ), '2.0.0' );
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?', 'ironikus' ), '2.0.0' );
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 = EEB()->helpers->translate( EEB()->settings->get_setting( 'protection_text', true ), 'email-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( $this->translate($content[0], 'create-admin-notice'), $content[1] );
130
  } else {
131
- $validated_content = $this->translate($content, 'create-admin-notice');
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 ), EEB()->helpers->translate('Settings', 'plugin-page') );
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', EEB()->helpers->translate('Visit us', 'plugin-page') );
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', EEB()->helpers->translate( $this->page_title, 'admin-add-submenu-page-title' ), EEB()->helpers->translate( $this->page_title, 'admin-add-submenu-page-site-title' ), 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( EEB()->helpers->translate( $this->page_title, 'admin-add-menu-page-title' ), EEB()->helpers->translate( $this->page_title, 'admin-add-menu-page-site-title' ), 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,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( EEB()->helpers->translate( EEB()->settings->get_default_string( 'insufficient-permissions' ), 'admin-submenu-page-insufficient-permissions' ) );
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( EEB()->helpers->translate( 'You don\'t have permission to update these settings.', 'admin-settings' ) );
158
  }
159
 
160
  if( ! current_user_can( EEB()->settings->get_admin_cap( 'admin-update-settings' ) ) ){
161
- wp_die( EEB()->helpers->translate( 'You don\'t have permission to update these settings.', 'admin-settings' ) );
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', EEB()->helpers->translate( $this->page_title, 'admin-add-encoder-widget' ), array( $this, 'show_meta_box_content' ), null, 'normal', 'core', array( '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
- ob_start( array( $this, 'apply_content_filter' ) );
 
 
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 = EEB()->helpers->translate( EEB()->settings->get_setting( 'protection_text', true ), 'email-protection-text-eeb-content' );
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="' . EEB()->helpers->translate( 'Email encoded successfully!', 'frontend-security-check-title' ) . '"></i>';
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 = (string) EEB()->settings->get_setting( 'show_encoded_check', true );
 
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, $display );
478
  break;
479
  case 'enc_escape':
480
  case 'escape':
481
- $mailto = EEB()->validate->encode_escape( $mailto, $display );
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="' . EEB()->helpers->translate( 'Email encoded successfully!', 'frontend-security-check-title' ) . '"></i>';
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( EEB()->helpers->translate('Your signture is invalid.', 'plugin-frontend') );
523
  }
524
 
525
  $image = EEB()->validate->email_to_image( $email );
526
 
527
  if( empty( $image ) ){
528
- wp_die( EEB()->helpers->translate('Your email could not be converted.', 'plugin-frontend') );
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' => EEB()->helpers->translate( 'Protect emails', 'eeb-settings-protect' ),
100
  'inputs' => array(
101
  1 => array(
102
- 'label' => EEB()->helpers->translate( 'Full-page scan', 'eeb-settings-protect-label' ),
103
- 'description' => EEB()->helpers->translate('This will check the whole page against any mails and secures them.', 'eeb-settings-protect-tip')
104
  ),
105
  2 => array(
106
- 'label' => EEB()->helpers->translate( 'Wordpress filters', 'eeb-settings-protect-label' ),
107
- 'description' => EEB()->helpers->translate('Secure only mails that occur within WordPress filters. (Not recommended)', 'eeb-settings-protect-tip'),
108
  'advanced' => true,
109
  ),
110
  3 => array(
111
- 'label' => EEB()->helpers->translate( 'Don\'t do anything.', 'eeb-settings-protect-label' ),
112
- 'description' => EEB()->helpers->translate('This turns off the protection for emails. (Not recommended)', 'eeb-settings-protect-tip')
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' => EEB()->helpers->translate( 'Protect emails using', 'eeb-settings-protect_using' ),
124
  'inputs' => array(
125
  'with_javascript' => array(
126
- 'label' => EEB()->helpers->translate( 'automatically the best method (including javascript)', 'eeb-settings-protect_using-label' )
127
  ),
128
  'without_javascript' => array(
129
- 'label' => EEB()->helpers->translate( 'automatically the best method (excluding javascript)', 'eeb-settings-protect_using-label' ),
130
  ),
131
  'strong_method' => array(
132
- 'label' => EEB()->helpers->translate( 'a strong method that replaces all emails with a "*protection text*".', 'eeb-settings-protect_using-label' ),
133
- 'description' => EEB()->helpers->translate('You can configure the protection text within the advanced settings.', 'eeb-settings-protect_using-tip')
134
  ),
135
  'char_encode' => array(
136
- 'label' => EEB()->helpers->translate( 'simple HTML character encoding.', 'eeb-settings-protect_using-label' ),
137
- 'description' => EEB()->helpers->translate('Offers good (but not the best) protection, which saves you in most scenarios.', 'eeb-settings-protect_using-tip')
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' => EEB()->helpers->translate( 'Protect...', 'eeb-settings-filter_body' ),
150
- 'label' => EEB()->helpers->translate( 'Customize what this plugin protects.', 'eeb-settings-filter_body-label' ),
151
  'inputs' => array(
152
  'filter_rss' => array(
153
  'advanced' => true,
154
- 'label' => EEB()->helpers->translate( 'RSS feed', 'eeb-settings-filter_rss-label' ),
155
- 'description' => EEB()->helpers->translate( 'Activating this option results in protecting the rss feed based on the given protection method.', 'eeb-settings-filter_rss-tip' )
156
  ),
157
  'remove_shortcodes_rss' => array(
158
  'advanced' => true,
159
- 'label' => EEB()->helpers->translate( 'Remove all shortcodes from the RSS feeds', 'eeb-settings-remove_shortcodes_rss-label' ),
160
- 'description' => EEB()->helpers->translate( 'Activating this option results in protecting the rss feed based on the given protection method.', 'eeb-settings-remove_shortcodes_rss-tip' )
161
  ),
162
  'input_strong_protection' => array(
163
  'advanced' => true,
164
- 'label' => EEB()->helpers->translate( 'input form email fields using strong protection.', 'eeb-settings-input_strong_protection-label' ),
165
- 'description' => EEB()->helpers->translate( 'Warning: this option could conflict with certain form plugins. Test it first. (Requires javascript)', 'eeb-settings-input_strong_protection-tip' )
166
  ),
167
  'encode_mailtos' => array(
168
  'advanced' => true,
169
- 'label' => EEB()->helpers->translate( 'plain emails by converting them to mailto links', 'eeb-settings-encode_mailtos-label' ),
170
- 'description' => EEB()->helpers->translate( 'Plain emails will be automatically converted to mailto links where possible.', 'eeb-settings-encode_mailtos-tip' )
171
  ),
172
  'convert_plain_to_image' => array(
173
  'advanced' => true,
174
- 'label' => EEB()->helpers->translate( 'plain emails by converting them to png images', 'eeb-settings-convert_plain_to_image-label' ),
175
- 'description' => EEB()->helpers->translate( 'Plain emails will be automatically converted to png images where possible.', 'eeb-settings-convert_plain_to_image-tip' )
176
  ),
177
  'protect_shortcode_tags' => array(
178
  'advanced' => true,
179
- 'label' => EEB()->helpers->translate( 'shortcode content', 'eeb-settings-protect_shortcode_tags-label' ),
180
- 'description' => EEB()->helpers->translate( 'Protect every shortcode content separately. (This may slows down your site)', 'eeb-settings-protect_shortcode_tags-tip' )
181
  ),
182
  'filter_hook' => array(
183
  'advanced' => true,
184
- 'label' => EEB()->helpers->translate( 'emails from "init" hook', 'eeb-settings-filter_hook-label' ),
185
- 'description' => EEB()->helpers->translate( 'Check this option if you want to register the email filters on the "init" hook instead of the "wp" hook.', 'eeb-settings-filter_hook-tip' )
186
  ),
187
  'deactivate_rtl' => array(
188
  'advanced' => true,
189
- 'label' => EEB()->helpers->translate( 'mailto links without CSS direction', 'eeb-settings-filter_hook-label' ),
190
- 'description' => EEB()->helpers->translate( 'Check this option if your site does not support CSS directions.', 'eeb-settings-filter_hook-tip' )
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' => EEB()->helpers->translate( 'Image settings', 'eeb-settings-filter_body' ),
203
- 'label' => EEB()->helpers->translate( 'Customize the settings for dynamically created images.', 'eeb-settings-filter_body-label' ),
204
  'inputs' => array(
205
  'image_color' => array(
206
  'advanced' => true,
207
- 'label' => EEB()->helpers->translate( 'Image Colors', 'eeb-settings-image_color-label' ),
208
- 'description' => EEB()->helpers->translate( 'Please include RGB colors, comme saparated. E.g.: 0,0,255', 'eeb-settings-image_color-tip' )
209
  ),
210
  'image_background_color' => array(
211
  'advanced' => true,
212
- 'label' => EEB()->helpers->translate( 'Image Background Colors', 'eeb-settings-image_background_color-label' ),
213
- 'description' => EEB()->helpers->translate( 'Please include RGB colors, comme saparated. E.g.: 0,0,255', 'eeb-settings-image_background_color-tip' )
214
  ),
215
  'image_text_opacity' => array(
216
  'advanced' => true,
217
- 'label' => EEB()->helpers->translate( 'Text Opacity', 'eeb-settings-image_text_opacity-label' ),
218
- 'description' => EEB()->helpers->translate( 'Change the text opacity for the created images. 0 = not transparent - 127 = completely transprent', 'eeb-settings-image_text_opacity-tip' )
219
  ),
220
  'image_background_opacity' => array(
221
  'advanced' => true,
222
- 'label' => EEB()->helpers->translate( 'Background Opacity', 'eeb-settings-image_background_opacity-label' ),
223
- 'description' => EEB()->helpers->translate( 'Change the background opacity for the created images. 0 = not transparent - 127 = completely transprent', 'eeb-settings-image_background_opacity-tip' )
224
  ),
225
  'image_font_size' => array(
226
  'advanced' => true,
227
- 'label' => EEB()->helpers->translate( 'Font Size', 'eeb-settings-image_font_size-label' ),
228
- 'description' => EEB()->helpers->translate( 'Change the font size of the image text. Default: 4 - You can choose from 1 - 5', 'eeb-settings-image_font_size-tip' )
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' => EEB()->helpers->translate('Exclude post id\'s from protection', 'eeb-settings-skip_posts'),
240
  'placeholder' => '',
241
  'required' => false,
242
- 'description' => EEB()->helpers->translate('By comma separating post id\'s ( e.g. 123,4535,643), you are able to exclude these posts from the logic protection.', 'eeb-settings-skip_posts-tip')
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' => EEB()->helpers->translate('Set protection text *', 'eeb-settings-class_name'),
251
  'placeholder' => '',
252
  'required' => false,
253
- 'description' => EEB()->helpers->translate('This text will be shown for protected email addresses and within noscript tags.', 'eeb-settings-class_name-tip')
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' => EEB()->helpers->translate('Additional classes', 'eeb-settings-class_name'),
262
- 'label' => EEB()->helpers->translate('Add extra classes to mailto links.', 'eeb-settings-class_name-label'),
263
  'placeholder' => '',
264
  'required' => false,
265
- 'description' => EEB()->helpers->translate('Leave blank for none', 'eeb-settings-class_name-tip')
 
 
 
 
 
 
 
 
 
 
 
 
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' => EEB()->helpers->translate('Disable Marketing', 'eeb-settings-disable_marketing'),
274
- 'label' => EEB()->helpers->translate('Disable all marketing notifications', 'eeb-settings-disable_marketing-label'),
275
  'placeholder' => '',
276
  'required' => false,
277
- 'description' => EEB()->helpers->translate('If you are not satisfied with our marketing recommendations, check this box.', 'eeb-settings-disable_marketing-tip')
278
  ),
279
 
280
  'show_encoded_check' => array(
281
  'fieldset' => array( 'slug' => 'main', 'label' => 'Label' ),
282
  'id' => 'show_encoded_check',
283
  'type' => 'checkbox',
284
- 'title' => EEB()->helpers->translate('Security Check', 'eeb-settings-show_encoded_check'),
285
- 'label' => EEB()->helpers->translate('Mark emails on the site as successfully encoded', 'eeb-settings-show_encoded_check-label') . '<i class="dashicons-before dashicons-lock" style="color:green;"></i>',
286
  'placeholder' => '',
287
  'required' => false,
288
- 'description' => EEB()->helpers->translate('Only visible for admin users. If your emails look broken, simply deactivate this feature.', 'eeb-settings-show_encoded_check-tip')
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' => EEB()->helpers->translate('Admin Menu', 'eeb-settings-own_admin_menu'),
297
- 'label' => EEB()->helpers->translate('Show this page in the main menu item', 'eeb-settings-own_admin_menu-label'),
298
  'placeholder' => '',
299
  'required' => false,
300
- 'description' => EEB()->helpers->translate('Otherwise it will be shown in "Settings"-menu.', 'eeb-settings-own_admin_menu-tip')
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' => EEB()->helpers->translate( 'Encoder form settings', 'eeb-settings-encoder_form' ),
310
  'inputs' => array(
311
  'display_encoder_form' => array(
312
- 'label' => EEB()->helpers->translate( 'Activate the encoder form.', 'eeb-settings-display_encoder_form-label' ),
313
- 'description' => EEB()->helpers->translate( 'This allows you to use the email encoder form, as well as the shortcode and template tag.', 'eeb-settings-display_encoder_form-tip' )
314
  ),
315
  'powered_by' => array(
316
- 'label' => EEB()->helpers->translate( 'Show a "powered by" link on bottom of the encoder form', 'eeb-settings-powered_by-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' => EEB()->helpers->translate('Advanced Settings', 'eeb-settings-advanced_settings'),
327
- 'label' => EEB()->helpers->translate('Show advanced settings for more configuration possibilities.', 'eeb-settings-advanced_settings-label'),
328
  'placeholder' => '',
329
  'required' => false,
330
- 'description' => EEB()->helpers->translate('Activate the advanced settings in case you want to customize the default logic or you want to troubleshoot the plugin.', 'eeb-settings-advanced_settings-tip')
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 = EEB()->helpers->translate( EEB()->settings->get_setting( 'protection_text', true ), 'email-protection-text' );
179
  }
180
 
181
  $self = $this;
@@ -205,10 +205,10 @@ class Email_Encoder_Validate{
205
  }
206
 
207
  } elseif( $protection_method === 'use_javascript' ){
208
- $protection_text = EEB()->helpers->translate( EEB()->settings->get_setting( 'protection_text', true ), 'email-protection-text' );
209
  $protected_return = $this->dynamic_js_email_encoding( $matches[0], $protection_text );
210
  } elseif( $protection_method === 'use_css' ){
211
- $protection_text = EEB()->helpers->translate( EEB()->settings->get_setting( 'protection_text', true ), 'email-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="' . EEB()->helpers->translate( 'Email encoded successfully!', 'frontend-security-check-title' ) . '"></i>';
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="' . EEB()->helpers->translate( 'Email encoded successfully!', 'frontend-security-check-title' ) . '"></i>';
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="' . EEB()->helpers->translate( 'Email encoded successfully!', 'frontend-security-check-title' ) . '"></i>';
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' && $activated_protection ) {
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 .= ( $activated_protection && preg_match( EEB()->settings->get_email_regex(), $display) > 0 ) ? $this->get_protected_display( $display, $protection_method ) : $display;
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="' . EEB()->helpers->translate( 'Email encoded successfully!', 'frontend-security-check-title' ) . '"></i>';
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 = EEB()->helpers->translate( EEB()->settings->get_setting( 'protection_text', true ), 'email-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' => EEB()->helpers->translate( 'Rot13 (Javascript)', 'eeb-encoder-form-methods' ),
757
- 'escape' => EEB()->helpers->translate( 'Escape (Javascript)', 'eeb-encoder-form-methods' ),
758
- 'encode' => EEB()->helpers->translate( 'Encode (HTML)', 'eeb-encoder-form-methods' ),
759
  );
760
  $method_options = '';
761
  $selected = false;
@@ -765,12 +764,12 @@ class Email_Encoder_Validate{
765
  }
766
 
767
  $labels = array(
768
- 'email' => EEB()->helpers->translate( 'Email Address:', 'eeb-encoder-form-labels' ),
769
- 'display' => EEB()->helpers->translate( 'Display Text:', 'eeb-encoder-form-labels' ),
770
- 'mailto' => EEB()->helpers->translate( 'Mailto Link:', 'eeb-encoder-form-labels' ),
771
- 'method' => EEB()->helpers->translate( 'Encoding Method:', 'eeb-encoder-form-labels' ),
772
- 'create_link' => EEB()->helpers->translate( 'Create Protected Mail Link &gt;&gt;', 'eeb-encoder-form-labels' ),
773
- 'output' => EEB()->helpers->translate( 'Protected Mail Link (code):', 'eeb-encoder-form-labels' ),
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 &gt;&gt;', '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 = EEB()->helpers->translate( EEB()->settings->get_setting( 'protection_text', true ), 'email-protection-text-eeb-content-template-func' );
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
- $plugins = array(
20
  'mailoptin' => 'mailoptin.php',
21
  );
22
- $disable_marketing = (bool) EEB()->settings->get_setting( 'disable_marketing', true );
23
 
24
- $filter_integrations = true;
 
 
 
25
  if( $disable_marketing ){
26
- $filter_integrations = false;
27
  }
 
 
28
 
29
- foreach ( $plugins as $plugin_id => $plugin_file ) :
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, $filter_integrations ) ){
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 EEB()->helpers->translate( 'The plugin works out-of-the-box to protect your email addresses. All settings are default set to protect your email addresses automatically.', 'help_tab-general' ); ?>
5
  </p>
6
  <p>
7
- <?php echo EEB()->helpers->translate( '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>.', 'help_tab-general' ); ?>
8
  </p>
9
  <p>
10
- <?php echo EEB()->helpers->translate( '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>.', 'help_tab-general' ); ?>
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 EEB()->helpers->translate( 'Shortcodes', 'help_tab-shortcodes' ); ?></h3>
2
- <p><?php echo EEB()->helpers->translate( 'You can protect those addresses using the following shortcode. Everything you add within these both tags, will be checked for emails automatically.', 'help_tab-shortcodes' ); ?></p>
3
  <p><code>[eeb_protect_emails protect_using="with_javascript"]…[/eeb_protect_emails]</code>
4
  </p>
5
- <p><?php echo EEB()->helpers->translate( 'Create a protected mailto link:', 'help_tab-shortcodes' ); ?></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 EEB()->helpers->translate( 'You can also protect phone numbers and any kind of text by using the following shortcode:', 'help_tab-shortcodes' ); ?></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 EEB()->helpers->translate( 'Display the encoder form', 'help_tab-shortcodes' ); ?></p>
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 EEB()->helpers->translate( 'Template functions', 'help_tab-template-tags' ); ?></h3>
2
 
3
  <h4><code>eeb_mailto( $email [, $display] [, $attrs] [, $method] )</code></h4>
4
- <p><?php echo EEB()->helpers->translate( 'Create a protected mailto link:', 'help_tab-template-tags' ); ?></p>
5
  <pre><code><&#63;php
6
  if (function_exists('eeb_mailto')) {
7
  echo eeb_mailto('info@somedomain.com', 'Mail Me');
8
  }
9
  &#63;></code></pre>
10
- <p><?php echo EEB()->helpers->translate( 'You can pass 3 optional arguments: <code>$display</code>, <code>$attrs</code> and <code>$method</code>', 'help_tab-template-tags' ); ?></p>
11
  <br><br>
12
  <h4><code>eeb_form()</code></h4>
13
- <p><?php echo EEB()->helpers->translate( 'Get Email Encoder Form', 'help_tab-template-tags' ); ?></p>
14
  <pre><code><&#63;php
15
  if (function_exists('eeb_form')) {
16
  echo eeb_form();
17
  }
18
  &#63;></code></pre>
19
- <p><?php echo EEB()->helpers->translate( 'This will output the email encoder form on your website.', 'help_tab-template-tags' ); ?></p>
20
  <br><br>
21
  <h4><code>eeb_protect_content( $content )</code></h4>
22
- <p><?php echo EEB()->helpers->translate( 'Protects the given content against spambots.', 'help_tab-template-tags' ); ?></p>
23
  <pre><code><&#63;php
24
  if (function_exists('eeb_protect_content')) {
25
  echo eeb_protect_content('+12 345 678');
@@ -27,7 +27,7 @@
27
  &#63;></code></pre>
28
  <br><br>
29
  <h4><code>eeb_protect_emails( $content )</code></h4>
30
- <p><?php echo EEB()->helpers->translate( 'Protects the given content against spambots.', 'help_tab-template-tags' ); ?></p>
31
  <pre><code><&#63;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><&#63;php
6
  if (function_exists('eeb_mailto')) {
7
  echo eeb_mailto('info@somedomain.com', 'Mail Me');
8
  }
9
  &#63;></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><&#63;php
15
  if (function_exists('eeb_form')) {
16
  echo eeb_form();
17
  }
18
  &#63;></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><&#63;php
24
  if (function_exists('eeb_protect_content')) {
25
  echo eeb_protect_content('+12 345 678');
27
  &#63;></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><&#63;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( EEB()->helpers->translate( 'Save all', 'admin-settings' ) ); ?>
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.1
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.1' );
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.0
5
  Requires PHP: 5.1
6
  Tested up to: 5.2.3
7
- Stable tag: 2.0.1
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