PluginProbe ʕ •ᴥ•ʔ
Email Encoder – Protect Email Addresses and Phone Numbers / 1.4.4
Email Encoder – Protect Email Addresses and Phone Numbers v1.4.4
2.5.0 2.4.8 trunk 0.10 0.11 0.12 0.20 0.21 0.22 0.30 0.31 0.32 0.40 0.41 0.42 0.50 0.60 0.70 0.71 0.80 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.5 1.5.2 1.51 1.53 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.10 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7
email-encoder-bundle / email-encoder-bundle.php
email-encoder-bundle Last commit date
images 10 years ago includes 10 years ago js 10 years ago languages 10 years ago email-encoder-bundle.php 10 years ago readme.txt 10 years ago screenshot-1.png 10 years ago screenshot-2.png 10 years ago screenshot-3.png 10 years ago
email-encoder-bundle.php
71 lines
1 <?php defined('ABSPATH') OR die('No direct access.');
2 /*
3 Plugin Name: Email Encoder Bundle - Protect Email Address
4 Plugin URI: http://www.freelancephp.net/email-encoder-php-class-wp-plugin/
5 Description: Protect email addresses on your site and hide them from spambots by using an encoding method. Easy to use, flexible .
6 Author: Victor Villaverde Laan
7 Version: 1.4.4
8 Author URI: http://www.freelancephp.net
9 License: Dual licensed under the MIT and GPL licenses
10 Text Domain: email-encoder-bundle
11 Domain Path: /languages
12 */
13
14 // constants
15 if (!defined('EMAIL_ENCODER_BUNDLE_VERSION')) { define('EMAIL_ENCODER_BUNDLE_VERSION', '1.4.4'); }
16 if (!defined('EMAIL_ENCODER_BUNDLE_FILE')) { define('EMAIL_ENCODER_BUNDLE_FILE', defined('TEST_EEB_PLUGIN_FILE') ? TEST_EEB_PLUGIN_FILE : __FILE__); }
17 if (!defined('EMAIL_ENCODER_BUNDLE_KEY')) { define('EMAIL_ENCODER_BUNDLE_KEY', 'WP_Email_Encoder_Bundle'); }
18 if (!defined('EMAIL_ENCODER_BUNDLE_OPTIONS_NAME')) { define('EMAIL_ENCODER_BUNDLE_OPTIONS_NAME', 'WP_Email_Encoder_Bundle_options'); }
19 if (!defined('EMAIL_ENCODER_BUNDLE_ADMIN_PAGE')) { define('EMAIL_ENCODER_BUNDLE_ADMIN_PAGE', 'email-encoder-bundle-settings'); }
20
21 // wp_version var was used by older WP versions
22 if (!isset($wp_version)) {
23 $wp_version = get_bloginfo('version');
24 }
25
26 // check plugin compatibility
27 if (version_compare($wp_version, '3.6', '>=') && version_compare(phpversion(), '5.2.4', '>=')) {
28
29 // include classes
30 require_once('includes/class-eeb-admin.php');
31 require_once('includes/class-eeb-site.php');
32 require_once('includes/template-functions.php');
33
34 // create instance
35 $Eeb_Site = Eeb_Site::getInstance();
36
37 // handle AJAX request
38 // input vars
39 if (!empty($_POST['eebActionEncodeEmail'])) {
40 $eebActionEncodeEmail = sanitize_text_field($_POST['eebActionEncodeEmail']);
41 $method = sanitize_text_field($_POST['eebMethod']);
42 $email = sanitize_email($_POST['eebEmail']);
43 $display = wp_kses_post($_POST['eebDisplay']);
44
45 if (empty($display)) {
46 $display = $email;
47 }
48
49 echo $Eeb_Site->encode_email($email, $display, '', $method, true);
50 exit;
51 }
52
53 } else {
54
55 // set error message
56 if (!function_exists('eeb_error_notice')):
57 function eeb_error_notice() {
58 $plugin_title = get_admin_page_title();
59
60 echo '<div class="error">'
61 . sprintf(__('<p>Warning - The plugin <strong>%s</strong> requires PHP 5.2.4+ and WP 3.6+. Please upgrade your PHP and/or WordPress.'
62 . '<br/>Disable the plugin to remove this message.</p>'
63 , 'email-encoder-bundle'), $plugin_title)
64 . '</div>';
65 }
66
67 add_action('admin_notices', 'eeb_error_notice');
68 endif;
69
70 }
71