Version Description
Download this release
Release Info
Developer | freelancephp |
Plugin | Email Encoder Bundle – Protect Email Address |
Version | 1.4.3 |
Comparing to | |
See all releases |
Code changes from version 1.4.2 to 1.4.3
- email-encoder-bundle.php +3 -4
- includes/class-eeb-admin.php +89 -89
- includes/class-eeb-site.php +3 -3
- readme.txt +2 -2
email-encoder-bundle.php
CHANGED
@@ -4,7 +4,7 @@ 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.
|
8 |
Author URI: http://www.freelancephp.net
|
9 |
License: Dual licensed under the MIT and GPL licenses
|
10 |
Text Domain: email-encoder-bundle
|
@@ -12,10 +12,9 @@ Domain Path: /languages
|
|
12 |
*/
|
13 |
|
14 |
// constants
|
15 |
-
if (!defined('EMAIL_ENCODER_BUNDLE_VERSION')) { define('EMAIL_ENCODER_BUNDLE_VERSION', '1.4.
|
16 |
if (!defined('EMAIL_ENCODER_BUNDLE_FILE')) { define('EMAIL_ENCODER_BUNDLE_FILE', __FILE__); }
|
17 |
if (!defined('EMAIL_ENCODER_BUNDLE_KEY')) { define('EMAIL_ENCODER_BUNDLE_KEY', 'WP_Email_Encoder_Bundle'); }
|
18 |
-
if (!defined('EMAIL_ENCODER_BUNDLE_DOMAIN')) { define('EMAIL_ENCODER_BUNDLE_DOMAIN', 'email-encoder-bundle'); }
|
19 |
if (!defined('EMAIL_ENCODER_BUNDLE_OPTIONS_NAME')) { define('EMAIL_ENCODER_BUNDLE_OPTIONS_NAME', 'WP_Email_Encoder_Bundle_options'); }
|
20 |
if (!defined('EMAIL_ENCODER_BUNDLE_ADMIN_PAGE')) { define('EMAIL_ENCODER_BUNDLE_ADMIN_PAGE', 'email-encoder-bundle-settings'); }
|
21 |
|
@@ -61,7 +60,7 @@ if (version_compare($wp_version, '3.6', '>=') && version_compare(phpversion(), '
|
|
61 |
echo '<div class="error">'
|
62 |
. sprintf(__('<p>Warning - The plugin <strong>%s</strong> requires PHP 5.2.4+ and WP 3.6+. Please upgrade your PHP and/or WordPress.'
|
63 |
. '<br/>Disable the plugin to remove this message.</p>'
|
64 |
-
,
|
65 |
. '</div>';
|
66 |
}
|
67 |
|
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.3
|
8 |
Author URI: http://www.freelancephp.net
|
9 |
License: Dual licensed under the MIT and GPL licenses
|
10 |
Text Domain: email-encoder-bundle
|
12 |
*/
|
13 |
|
14 |
// constants
|
15 |
+
if (!defined('EMAIL_ENCODER_BUNDLE_VERSION')) { define('EMAIL_ENCODER_BUNDLE_VERSION', '1.4.3'); }
|
16 |
if (!defined('EMAIL_ENCODER_BUNDLE_FILE')) { define('EMAIL_ENCODER_BUNDLE_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 |
|
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 |
|
includes/class-eeb-admin.php
CHANGED
@@ -70,21 +70,21 @@ abstract class Eeb_Admin {
|
|
70 |
*/
|
71 |
protected function __construct() {
|
72 |
// load text domain for translations
|
73 |
-
load_plugin_textdomain(
|
74 |
|
75 |
// set methods
|
76 |
$this->methods = array(
|
77 |
'enc_ascii' => array(
|
78 |
-
'name' => __('JS Rot13',
|
79 |
-
'description' => __('Recommended, the savest method using a rot13 method in JavaScript.',
|
80 |
),
|
81 |
'enc_escape' => array(
|
82 |
-
'name' => __('JS Escape',
|
83 |
-
'description' => __('Pretty save method using JavaScipt\'s escape function.',
|
84 |
),
|
85 |
'enc_html' => array(
|
86 |
-
'name' => __('Html Encode',
|
87 |
-
'description' => __('Not recommended, equal to <a href="http://codex.wordpress.org/Function_Reference/antispambot" target="_blank"><code>antispambot()</code></a> function of WordPress.',
|
88 |
),
|
89 |
);
|
90 |
|
@@ -193,7 +193,7 @@ abstract class Eeb_Admin {
|
|
193 |
public function plugin_action_links($links, $file) {
|
194 |
if ($file == plugin_basename(EMAIL_ENCODER_BUNDLE_FILE)) {
|
195 |
$page = ($this->options['own_admin_menu']) ? 'admin.php' : 'options-general.php';
|
196 |
-
$settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/' . $page . '?page=' . EMAIL_ENCODER_BUNDLE_ADMIN_PAGE . '">' . __('Settings',
|
197 |
array_unshift($links, $settings_link);
|
198 |
}
|
199 |
|
@@ -207,12 +207,12 @@ abstract class Eeb_Admin {
|
|
207 |
// add page and menu item
|
208 |
if ($this->options['own_admin_menu']) {
|
209 |
// create main menu item
|
210 |
-
$page_hook = add_menu_page(__('Email Encoder Bundle',
|
211 |
'manage_options', EMAIL_ENCODER_BUNDLE_ADMIN_PAGE, array($this, 'show_options_page'),
|
212 |
plugins_url('images/icon-email-encoder-bundle-16.png', EMAIL_ENCODER_BUNDLE_FILE));
|
213 |
} else {
|
214 |
// create submenu item under "Settings"
|
215 |
-
$page_hook = add_submenu_page('options-general.php', __('Email Encoder Bundle',
|
216 |
'manage_options', EMAIL_ENCODER_BUNDLE_ADMIN_PAGE, array($this, 'show_options_page'));
|
217 |
}
|
218 |
|
@@ -248,13 +248,13 @@ abstract class Eeb_Admin {
|
|
248 |
}
|
249 |
|
250 |
// add meta boxes
|
251 |
-
add_meta_box('main_settings', __('Main Settings',
|
252 |
-
add_meta_box('additional_settings', __('Additional Settings',
|
253 |
-
add_meta_box('rss_settings', __('RSS Settings',
|
254 |
-
add_meta_box('admin_settings', __('Admin Settings',
|
255 |
-
add_meta_box('encode_form', __('Email Encoder Form',
|
256 |
-
add_meta_box('this_plugin', __('Support',
|
257 |
-
add_meta_box('other_plugins', __('Other Plugins',
|
258 |
}
|
259 |
|
260 |
/**
|
@@ -265,7 +265,7 @@ abstract class Eeb_Admin {
|
|
265 |
?>
|
266 |
<div class="wrap">
|
267 |
<div class="icon32" id="icon-options-custom" style="background:url(<?php echo plugins_url('images/icon-email-encoder-bundle.png', EMAIL_ENCODER_BUNDLE_FILE) ?>) no-repeat 50% 50%"><br></div>
|
268 |
-
<h2><?php echo get_admin_page_title() ?> - <em><small><?php _e('Protect Email Addresses',
|
269 |
|
270 |
<?php if (isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true' && $this->options['own_admin_menu']): ?>
|
271 |
<div class="updated settings-error" id="setting-error-settings_updated">
|
@@ -315,42 +315,42 @@ abstract class Eeb_Admin {
|
|
315 |
if ($key === 'main_settings') {
|
316 |
?>
|
317 |
<?php if (is_plugin_active('wp-mailto-links/wp-mailto-links.php')): ?>
|
318 |
-
<p class="description"><?php _e('Warning: "WP Mailto Links"-plugin is also activated, which could cause conflicts.',
|
319 |
<?php endif; ?>
|
320 |
<fieldset class="options">
|
321 |
<table class="form-table">
|
322 |
<tr>
|
323 |
-
<th><?php _e('Choose what to protect',
|
324 |
<td>
|
325 |
<label><input type="checkbox" id="encode_mailtos" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[encode_mailtos]" value="1" <?php checked('1', (int) $options['encode_mailtos']); ?> />
|
326 |
-
<span><?php _e('Protect mailto links, like f.e. <code><a href="info@myemail.com">My Email</a></code>',
|
327 |
<br/><label><input type="checkbox" id="encode_emails" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[encode_emails]" value="1" <?php checked('1', (int) $options['encode_emails']); ?> disabled="disabled" />
|
328 |
-
<span><?php _e('Replace plain email addresses to protected mailto links.',
|
329 |
-
<!--<span class="description notice-form-field-bug"><br/><?php _e('Notice: be carefull with this option when using email addresses on form fields, please <a href="http://wordpress.org/extend/plugins/email-encoder-bundle/faq/" target="_blank">check the FAQ</a> for more info.',
|
330 |
</label>
|
331 |
<br/><label><input type="checkbox" id="encode_fields" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[encode_fields]" value="1" <?php checked('1', (int) $options['encode_fields']); ?> />
|
332 |
-
<span><?php _e('Replace prefilled email addresses in input fields.',
|
333 |
-
<span class="description"><?php _e(' - Recommended!',
|
334 |
</label>
|
335 |
<br/>
|
336 |
</td>
|
337 |
</tr>
|
338 |
<tr>
|
339 |
-
<th><?php _e('Apply on...',
|
340 |
<td>
|
341 |
<label><input type="checkbox" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_posts]" value="1" <?php checked('1', (int) $options['filter_posts']); ?> />
|
342 |
-
<span><?php _e('All posts and pages',
|
343 |
</label>
|
344 |
<br/><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_comments]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_comments]" value="1" <?php checked('1', (int) $options['filter_comments']); ?> />
|
345 |
-
<span><?php _e('All comments',
|
346 |
<br/><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_widgets]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_widgets]" value="1" <?php checked('1', (int) $options['filter_widgets']); ?> />
|
347 |
-
<span><?php if ($this->options['widget_logic_filter']) { _e('All widgets (uses the <code>widget_content</code> filter of the Widget Logic plugin)',
|
348 |
</td>
|
349 |
</tr>
|
350 |
<tr>
|
351 |
-
<th><?php _e('Add class to protected mailto links',
|
352 |
<td><label><input type="text" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[class_name]" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[class_name]" value="<?php echo $options['class_name']; ?>" />
|
353 |
-
<br/><span class="description"><?php _e('All protected mailto links will get these class(es). Optional, else keep blank.',
|
354 |
</tr>
|
355 |
</table>
|
356 |
</fieldset>
|
@@ -366,21 +366,21 @@ abstract class Eeb_Admin {
|
|
366 |
<fieldset class="options">
|
367 |
<table class="form-table">
|
368 |
<tr>
|
369 |
-
<th><?php _e('Protect emails in RSS feeds',
|
370 |
<td><label><input type="checkbox" id="filter_rss" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_rss]" value="1" <?php checked('1', (int) $options['filter_rss']); ?> />
|
371 |
-
<span><?php _e('Replace emails in RSS feeds.',
|
372 |
</td>
|
373 |
</tr>
|
374 |
<tr>
|
375 |
-
<th><?php _e('Remove shortcodes from RSS feeds',
|
376 |
<td><label><input type="checkbox" id="remove_shortcodes_rss" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[remove_shortcodes_rss]" value="1" <?php checked('1', (int) $options['remove_shortcodes_rss']); ?> />
|
377 |
-
<span><?php _e('Remove all shortcodes from the RSS feeds.',
|
378 |
</td>
|
379 |
</tr>
|
380 |
<tr>
|
381 |
-
<th><?php _e('Set protection text in RSS feeds',
|
382 |
<td><label><input type="text" id="protection_text" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[protection_text_rss]" value="<?php echo $options['protection_text_rss']; ?>" />
|
383 |
-
<br/><span class="description"><?php _e('Used as replacement for email addresses in RSS feeds.',
|
384 |
</label>
|
385 |
</td>
|
386 |
</tr>
|
@@ -397,7 +397,7 @@ abstract class Eeb_Admin {
|
|
397 |
<fieldset class="options">
|
398 |
<table class="form-table">
|
399 |
<tr>
|
400 |
-
<th><?php _e('Choose protection method',
|
401 |
<td>
|
402 |
<?php foreach ($this->methods AS $method => $info): ?>
|
403 |
<label>
|
@@ -410,45 +410,45 @@ abstract class Eeb_Admin {
|
|
410 |
</td>
|
411 |
</tr>
|
412 |
<tr>
|
413 |
-
<th><?php _e('Set <code><noscript></code> text',
|
414 |
<td><label>
|
415 |
-
<span><?php _e('For encoded emails:',
|
416 |
<br/><input type="text" id="protection_text" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[protection_text]" value="<?php echo $options['protection_text']; ?>" />
|
417 |
</label>
|
418 |
<br/>
|
419 |
<br/>
|
420 |
<label>
|
421 |
-
<span><?php _e('For other encoded content:',
|
422 |
<br/><input type="text" id="protection_text_content" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[protection_text_content]" value="<?php echo $options['protection_text_content']; ?>" />
|
423 |
</label>
|
424 |
<br/>
|
425 |
-
<br/><span class="description"><?php _e('Used as <code><noscript></code> fallback for JavaScrip methods.',
|
426 |
</td>
|
427 |
</tr>
|
428 |
<tr>
|
429 |
-
<th><?php _e('Exclude posts',
|
430 |
<td>
|
431 |
<label>
|
432 |
-
<span><?php _e('Do <strong>not</strong> apply protection on posts or pages with the folllowing ID:',
|
433 |
<br/><input type="text" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[skip_posts]" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[skip_posts]" value="<?php echo $options['skip_posts']; ?>" />
|
434 |
-
<br/><span class="description"><?php _e('Seperate Id\'s by comma, f.e.: 2, 7, 13, 32.',
|
435 |
-
<br/><span class="description"><?php _e('Notice: shortcodes still work on these posts.',
|
436 |
</label>
|
437 |
</td>
|
438 |
</tr>
|
439 |
<tr>
|
440 |
-
<th><?php _e('Use shortcodes in widgets',
|
441 |
<td>
|
442 |
<label><input type="checkbox" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[shortcodes_in_widgets]" value="1" <?php checked('1', (int) $options['shortcodes_in_widgets']); ?> />
|
443 |
-
<span><?php _e('Also use shortcodes in widgets.',
|
444 |
-
<br/><span class="description"><?php if (!$this->options['widget_logic_filter']) { _e('Notice: only works for text widgets!',
|
445 |
</label>
|
446 |
</td>
|
447 |
</tr>
|
448 |
<tr>
|
449 |
-
<th><?php _e('Use deprecated names',
|
450 |
<td><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[support_deprecated_names]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[support_deprecated_names]" value="1" <?php checked('1', (int) $options['support_deprecated_names']); ?> />
|
451 |
-
<span><?php _e('Keep supporting the old names for action, shortcodes and template functions.',
|
452 |
<br /><span class="description">These deprecated will still be available: <code>init_email_encoder_bundle</code>, <code>[encode_email]</code>, <code>[encode_content]</code>, <code>[email_encoder_form]</code>, <code>encode_email()</code>, <code>encode_content()</code>, <code>encode_email_filter()</code></span></label></td>
|
453 |
</tr>
|
454 |
</table>
|
@@ -464,17 +464,17 @@ abstract class Eeb_Admin {
|
|
464 |
<fieldset class="options">
|
465 |
<table class="form-table">
|
466 |
<tr>
|
467 |
-
<th><?php _e('Check "succesfully encoded"',
|
468 |
<td><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[show_encoded_check]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[show_encoded_check]" value="1" <?php checked('1', (int) $options['show_encoded_check']); ?> />
|
469 |
-
<span><?php _e('Show "successfully encoded" text for all encoded content, only when logged in as admin user.',
|
470 |
-
<br/><span class="description"><?php _e('This way you can check if emails are really encoded on your site.',
|
471 |
</label>
|
472 |
</td>
|
473 |
</tr>
|
474 |
<tr>
|
475 |
-
<th><?php _e('Choose admin menu position',
|
476 |
<td><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[own_admin_menu]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[own_admin_menu]" value="1" <?php checked('1', (int) $options['own_admin_menu']); ?> />
|
477 |
-
<span><?php _e('Show as main menu item.',
|
478 |
<br /><span class="description">When disabled this page will be available under "<?php _e('Settings') ?>".</span>
|
479 |
</label>
|
480 |
</td>
|
@@ -490,7 +490,7 @@ abstract class Eeb_Admin {
|
|
490 |
<?php
|
491 |
} else if ($key === 'encode_form') {
|
492 |
?>
|
493 |
-
<p><?php _e('If you like you can also create you own secure mailto links manually with this form. Just copy the generated code and put it on your post, page or template.',
|
494 |
|
495 |
<hr style="border:1px solid #FFF; border-top:1px solid #EEE;" />
|
496 |
|
@@ -498,14 +498,14 @@ abstract class Eeb_Admin {
|
|
498 |
|
499 |
<hr style="border:1px solid #FFF; border-top:1px solid #EEE;"/>
|
500 |
|
501 |
-
<p class="description"><?php _e('You can also put the encoder form on your site by using the shortcode <code>[eeb_form]</code> or the template function <code>eeb_form()</code>.',
|
502 |
|
503 |
<fieldset class="options">
|
504 |
<table class="form-table">
|
505 |
<tr>
|
506 |
-
<th><?php _e('Show "powered by"',
|
507 |
<td><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[powered_by]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[powered_by]" value="1" <?php checked('1', (int) $options['powered_by']); ?> />
|
508 |
-
<span><?php _e('Show the "powered by"-link on bottom of the encoder form',
|
509 |
</label>
|
510 |
</td>
|
511 |
</tr>
|
@@ -521,11 +521,11 @@ abstract class Eeb_Admin {
|
|
521 |
} else if ($key === 'this_plugin') {
|
522 |
?>
|
523 |
<ul>
|
524 |
-
<li><a href="#" class="eeb-help-link"><?php _e('Documentation',
|
525 |
-
<li><a href="http://wordpress.org/support/plugin/email-encoder-bundle#postform" target="_blank"><?php _e('Report a problem',
|
526 |
</ul>
|
527 |
|
528 |
-
<p><strong><a href="http://wordpress.org/support/view/plugin-reviews/email-encoder-bundle" target="_blank"><?php _e('Please rate this plugin!',
|
529 |
<?php
|
530 |
} else if ($key === 'other_plugins') {
|
531 |
?>
|
@@ -533,12 +533,12 @@ abstract class Eeb_Admin {
|
|
533 |
<?php if (is_plugin_active('wp-external-links/wp-external-links.php')): ?>
|
534 |
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/options-general.php?page=wp-external-links/wp-external-links.php"><?php _e('Settings') ?></a>
|
535 |
<?php elseif( file_exists( WP_PLUGIN_DIR . '/wp-external-links/wp-external-links.php')): ?>
|
536 |
-
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/plugins.php?plugin_status=inactive"><?php _e('Activate',
|
537 |
<?php else: ?>
|
538 |
-
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/plugin-install.php?tab=search&type=term&s=WP+External+Links+freelancephp&plugin-search-input=Search+Plugins"><?php _e('Get this plugin',
|
539 |
<?php endif; ?>
|
540 |
</h4>
|
541 |
-
<p><?php _e('Manage external links on your site: open in new window/tab, set icon, add "external", add "nofollow" and more.',
|
542 |
<br /><a href="http://wordpress.org/extend/plugins/wp-external-links/" target="_blank">WordPress.org</a> | <a href="http://www.freelancephp.net/wp-external-links-plugin/" target="_blank">FreelancePHP.net</a>
|
543 |
</p>
|
544 |
|
@@ -546,12 +546,12 @@ abstract class Eeb_Admin {
|
|
546 |
<?php if (is_plugin_active('wp-mailto-links/wp-mailto-links.php')): ?>
|
547 |
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/options-general.php?page=wp-mailto-links/wp-mailto-links.php"><?php _e('Settings') ?></a>
|
548 |
<?php elseif( file_exists( WP_PLUGIN_DIR . '/wp-mailto-links/wp-mailto-links.php')): ?>
|
549 |
-
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/plugins.php?plugin_status=inactive"><?php _e('Activate',
|
550 |
<?php else: ?>
|
551 |
-
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/plugin-install.php?tab=search&type=term&s=WP+Mailto+Links+freelancephp&plugin-search-input=Search+Plugins"><?php _e('Get this plugin',
|
552 |
<?php endif; ?>
|
553 |
</h4>
|
554 |
-
<p><?php _e('Manage mailto links on your site and protect emails from spambots, set mail icon and more.',
|
555 |
<br /><a href="http://wordpress.org/extend/plugins/wp-mailto-links/" target="_blank">WordPress.org</a> | <a href="http://www.freelancephp.net/wp-mailto-links-plugin/" target="_blank">FreelancePHP.net</a>
|
556 |
</p>
|
557 |
<?php
|
@@ -576,32 +576,32 @@ abstract class Eeb_Admin {
|
|
576 |
|
577 |
$screen->add_help_tab(array(
|
578 |
'id' => 'quickstart',
|
579 |
-
'title' => __('Quick Start',
|
580 |
'content' => $this->get_help_text('quickstart'),
|
581 |
));
|
582 |
$screen->add_help_tab(array(
|
583 |
'id' => 'shortcodes',
|
584 |
-
'title' => __('Shortcodes',
|
585 |
'content' => $this->get_help_text('shortcodes'),
|
586 |
));
|
587 |
$screen->add_help_tab(array(
|
588 |
'id' => 'templatefunctions',
|
589 |
-
'title' => __('Template Functions',
|
590 |
'content' => $this->get_help_text('templatefunctions'),
|
591 |
));
|
592 |
$screen->add_help_tab(array(
|
593 |
'id' => 'actions',
|
594 |
-
'title' => __('Action Hook',
|
595 |
'content' => $this->get_help_text('actions'),
|
596 |
));
|
597 |
$screen->add_help_tab(array(
|
598 |
'id' => 'filters',
|
599 |
-
'title' => __('Filter Hooks',
|
600 |
'content' => $this->get_help_text('filters'),
|
601 |
));
|
602 |
$screen->add_help_tab(array(
|
603 |
'id' => 'faq',
|
604 |
-
'title' => __('FAQ',
|
605 |
'content' => $this->get_help_text('faq'),
|
606 |
));
|
607 |
}
|
@@ -621,7 +621,7 @@ abstract class Eeb_Admin {
|
|
621 |
$content = sprintf(__('<h3><img src="%s" width="16" height="16" /> %s - version %s</h3>'
|
622 |
. '<p>The plugin works out-of-the-box. All mailto links in your posts, pages, comments and (text) widgets will be encoded (by default). <br/>If you also want to encode plain email address as well, you have to check the option.</p>'
|
623 |
. '<img src="%s" width="600" height="273" />'
|
624 |
-
,
|
625 |
} else if ($key === 'shortcodes') {
|
626 |
$content = __('<h3>Shortcodes</h3>'
|
627 |
. '<p>You can use these shortcodes within your post or page.</p>'
|
@@ -642,7 +642,7 @@ abstract class Eeb_Admin {
|
|
642 |
. '<h4>eeb_form</h4>'
|
643 |
. '<p>Create an encoder form:</p>'
|
644 |
. '<p><code>[eeb_form]</code></p>'
|
645 |
-
,
|
646 |
} else if ($key === 'templatefunctions') {
|
647 |
$content = __('<h3>Template Functions</h3>'
|
648 |
. '<h4>eeb_email()</h4>'
|
@@ -676,7 +676,7 @@ abstract class Eeb_Admin {
|
|
676 |
. ' echo eeb_form();' . "\n"
|
677 |
. '}' . "\n"
|
678 |
. '?></code></pre>'
|
679 |
-
,
|
680 |
} else if ($key === 'actions') {
|
681 |
$content = __('<h3>Action Hooks</h3>'
|
682 |
. '<h4>eeb_ready</h4>'
|
@@ -687,7 +687,7 @@ abstract class Eeb_Admin {
|
|
687 |
. ' add_filter(\'some_filter\', array($eeb_object, \'callback_filter\'));' . "\n"
|
688 |
. '}' . "\n"
|
689 |
. '?></code></pre>'
|
690 |
-
,
|
691 |
} else if ($key === 'filters') {
|
692 |
$content = __('<h3>Filter Hooks</h3>'
|
693 |
. '<h4>eeb_mailto_regexp</h4>'
|
@@ -715,18 +715,18 @@ abstract class Eeb_Admin {
|
|
715 |
. ' return \'<div class="form-wrapper">\' . $content . \'</div>\';' . "\n"
|
716 |
. '}' . "\n"
|
717 |
. '?></code></pre>'
|
718 |
-
,
|
719 |
} else if ($key === 'faq') {
|
720 |
$content = __('<h3>FAQ</h3>'
|
721 |
. '<p>Please check the <a href="http://wordpress.org/extend/plugins/email-encoder-bundle/faq/" target="_blank">FAQ on the Plugin site</a>.'
|
722 |
-
,
|
723 |
} else if ($key === 'sidebar') {
|
724 |
$content = __('<h4>About the author</h4>'
|
725 |
. '<ul>'
|
726 |
. '<li><a href="http://www.freelancephp.net/" target="_blank">FreelancePHP.net</a></li>'
|
727 |
. '<li><a href="http://www.freelancephp.net/contact/" target="_blank">Contact</a></li>'
|
728 |
. '</ul>'
|
729 |
-
,
|
730 |
} else {
|
731 |
$content = '';
|
732 |
}
|
@@ -751,16 +751,16 @@ abstract class Eeb_Admin {
|
|
751 |
$show_powered_by = (bool) $this->options['powered_by'];
|
752 |
$powered_by = '';
|
753 |
if ($show_powered_by) {
|
754 |
-
$powered_by .= '<p class="powered-by">' . __('Powered by',
|
755 |
}
|
756 |
|
757 |
$labels = array(
|
758 |
-
'email' => __('Email Address:',
|
759 |
-
'display' => __('Display Text:',
|
760 |
-
'mailto' => __('Mailto Link:',
|
761 |
-
'method' => __('Encoding Method:',
|
762 |
-
'create_link' => __('Create Protected Mail Link >>',
|
763 |
-
'output' => __('Protected Mail Link (code):',
|
764 |
'method_options' => $method_options,
|
765 |
'powered_by' => $powered_by,
|
766 |
);
|
70 |
*/
|
71 |
protected function __construct() {
|
72 |
// load text domain for translations
|
73 |
+
load_plugin_textdomain('email-encoder-bundle', false, dirname(plugin_basename(EMAIL_ENCODER_BUNDLE_FILE)) . '/languages/');
|
74 |
|
75 |
// set methods
|
76 |
$this->methods = array(
|
77 |
'enc_ascii' => array(
|
78 |
+
'name' => __('JS Rot13', 'email-encoder-bundle'),
|
79 |
+
'description' => __('Recommended, the savest method using a rot13 method in JavaScript.', 'email-encoder-bundle'),
|
80 |
),
|
81 |
'enc_escape' => array(
|
82 |
+
'name' => __('JS Escape', 'email-encoder-bundle'),
|
83 |
+
'description' => __('Pretty save method using JavaScipt\'s escape function.', 'email-encoder-bundle'),
|
84 |
),
|
85 |
'enc_html' => array(
|
86 |
+
'name' => __('Html Encode', 'email-encoder-bundle'),
|
87 |
+
'description' => __('Not recommended, equal to <a href="http://codex.wordpress.org/Function_Reference/antispambot" target="_blank"><code>antispambot()</code></a> function of WordPress.', 'email-encoder-bundle'),
|
88 |
),
|
89 |
);
|
90 |
|
193 |
public function plugin_action_links($links, $file) {
|
194 |
if ($file == plugin_basename(EMAIL_ENCODER_BUNDLE_FILE)) {
|
195 |
$page = ($this->options['own_admin_menu']) ? 'admin.php' : 'options-general.php';
|
196 |
+
$settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/' . $page . '?page=' . EMAIL_ENCODER_BUNDLE_ADMIN_PAGE . '">' . __('Settings', 'email-encoder-bundle') . '</a>';
|
197 |
array_unshift($links, $settings_link);
|
198 |
}
|
199 |
|
207 |
// add page and menu item
|
208 |
if ($this->options['own_admin_menu']) {
|
209 |
// create main menu item
|
210 |
+
$page_hook = add_menu_page(__('Email Encoder Bundle', 'email-encoder-bundle'), __('Email Encoder Bundle', 'email-encoder-bundle'),
|
211 |
'manage_options', EMAIL_ENCODER_BUNDLE_ADMIN_PAGE, array($this, 'show_options_page'),
|
212 |
plugins_url('images/icon-email-encoder-bundle-16.png', EMAIL_ENCODER_BUNDLE_FILE));
|
213 |
} else {
|
214 |
// create submenu item under "Settings"
|
215 |
+
$page_hook = add_submenu_page('options-general.php', __('Email Encoder Bundle', 'email-encoder-bundle'), __('Email Encoder Bundle', 'email-encoder-bundle'),
|
216 |
'manage_options', EMAIL_ENCODER_BUNDLE_ADMIN_PAGE, array($this, 'show_options_page'));
|
217 |
}
|
218 |
|
248 |
}
|
249 |
|
250 |
// add meta boxes
|
251 |
+
add_meta_box('main_settings', __('Main Settings', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('main_settings'));
|
252 |
+
add_meta_box('additional_settings', __('Additional Settings', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('additional_settings'));
|
253 |
+
add_meta_box('rss_settings', __('RSS Settings', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('rss_settings'));
|
254 |
+
add_meta_box('admin_settings', __('Admin Settings', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('admin_settings'));
|
255 |
+
add_meta_box('encode_form', __('Email Encoder Form', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('encode_form'));
|
256 |
+
add_meta_box('this_plugin', __('Support', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'side', 'core', array('this_plugin'));
|
257 |
+
add_meta_box('other_plugins', __('Other Plugins', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'side', 'core', array('other_plugins'));
|
258 |
}
|
259 |
|
260 |
/**
|
265 |
?>
|
266 |
<div class="wrap">
|
267 |
<div class="icon32" id="icon-options-custom" style="background:url(<?php echo plugins_url('images/icon-email-encoder-bundle.png', EMAIL_ENCODER_BUNDLE_FILE) ?>) no-repeat 50% 50%"><br></div>
|
268 |
+
<h2><?php echo get_admin_page_title() ?> - <em><small><?php _e('Protect Email Addresses', 'email-encoder-bundle') ?></small></em></h2>
|
269 |
|
270 |
<?php if (isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true' && $this->options['own_admin_menu']): ?>
|
271 |
<div class="updated settings-error" id="setting-error-settings_updated">
|
315 |
if ($key === 'main_settings') {
|
316 |
?>
|
317 |
<?php if (is_plugin_active('wp-mailto-links/wp-mailto-links.php')): ?>
|
318 |
+
<p class="description"><?php _e('Warning: "WP Mailto Links"-plugin is also activated, which could cause conflicts.', 'email-encoder-bundle') ?></p>
|
319 |
<?php endif; ?>
|
320 |
<fieldset class="options">
|
321 |
<table class="form-table">
|
322 |
<tr>
|
323 |
+
<th><?php _e('Choose what to protect', 'email-encoder-bundle') ?></th>
|
324 |
<td>
|
325 |
<label><input type="checkbox" id="encode_mailtos" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[encode_mailtos]" value="1" <?php checked('1', (int) $options['encode_mailtos']); ?> />
|
326 |
+
<span><?php _e('Protect mailto links, like f.e. <code><a href="info@myemail.com">My Email</a></code>', 'email-encoder-bundle') ?></span>
|
327 |
<br/><label><input type="checkbox" id="encode_emails" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[encode_emails]" value="1" <?php checked('1', (int) $options['encode_emails']); ?> disabled="disabled" />
|
328 |
+
<span><?php _e('Replace plain email addresses to protected mailto links.', 'email-encoder-bundle') ?></span>
|
329 |
+
<!--<span class="description notice-form-field-bug"><br/><?php _e('Notice: be carefull with this option when using email addresses on form fields, please <a href="http://wordpress.org/extend/plugins/email-encoder-bundle/faq/" target="_blank">check the FAQ</a> for more info.', 'email-encoder-bundle') ?></span>-->
|
330 |
</label>
|
331 |
<br/><label><input type="checkbox" id="encode_fields" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[encode_fields]" value="1" <?php checked('1', (int) $options['encode_fields']); ?> />
|
332 |
+
<span><?php _e('Replace prefilled email addresses in input fields.', 'email-encoder-bundle') ?></span>
|
333 |
+
<span class="description"><?php _e(' - Recommended!', 'email-encoder-bundle') ?></span>
|
334 |
</label>
|
335 |
<br/>
|
336 |
</td>
|
337 |
</tr>
|
338 |
<tr>
|
339 |
+
<th><?php _e('Apply on...', 'email-encoder-bundle') ?></th>
|
340 |
<td>
|
341 |
<label><input type="checkbox" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_posts]" value="1" <?php checked('1', (int) $options['filter_posts']); ?> />
|
342 |
+
<span><?php _e('All posts and pages', 'email-encoder-bundle') ?></span>
|
343 |
</label>
|
344 |
<br/><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_comments]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_comments]" value="1" <?php checked('1', (int) $options['filter_comments']); ?> />
|
345 |
+
<span><?php _e('All comments', 'email-encoder-bundle') ?></span></label>
|
346 |
<br/><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_widgets]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_widgets]" value="1" <?php checked('1', (int) $options['filter_widgets']); ?> />
|
347 |
+
<span><?php if ($this->options['widget_logic_filter']) { _e('All widgets (uses the <code>widget_content</code> filter of the Widget Logic plugin)', 'email-encoder-bundle'); } else { _e('All text widgets', 'email-encoder-bundle'); } ?></span></label>
|
348 |
</td>
|
349 |
</tr>
|
350 |
<tr>
|
351 |
+
<th><?php _e('Add class to protected mailto links', 'email-encoder-bundle') ?></th>
|
352 |
<td><label><input type="text" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[class_name]" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[class_name]" value="<?php echo $options['class_name']; ?>" />
|
353 |
+
<br/><span class="description"><?php _e('All protected mailto links will get these class(es). Optional, else keep blank.', 'email-encoder-bundle') ?></span></label></td>
|
354 |
</tr>
|
355 |
</table>
|
356 |
</fieldset>
|
366 |
<fieldset class="options">
|
367 |
<table class="form-table">
|
368 |
<tr>
|
369 |
+
<th><?php _e('Protect emails in RSS feeds', 'email-encoder-bundle') ?></th>
|
370 |
<td><label><input type="checkbox" id="filter_rss" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[filter_rss]" value="1" <?php checked('1', (int) $options['filter_rss']); ?> />
|
371 |
+
<span><?php _e('Replace emails in RSS feeds.', 'email-encoder-bundle') ?></span></label>
|
372 |
</td>
|
373 |
</tr>
|
374 |
<tr>
|
375 |
+
<th><?php _e('Remove shortcodes from RSS feeds', 'email-encoder-bundle') ?></th>
|
376 |
<td><label><input type="checkbox" id="remove_shortcodes_rss" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[remove_shortcodes_rss]" value="1" <?php checked('1', (int) $options['remove_shortcodes_rss']); ?> />
|
377 |
+
<span><?php _e('Remove all shortcodes from the RSS feeds.', 'email-encoder-bundle') ?></span></label>
|
378 |
</td>
|
379 |
</tr>
|
380 |
<tr>
|
381 |
+
<th><?php _e('Set protection text in RSS feeds', 'email-encoder-bundle') ?></th>
|
382 |
<td><label><input type="text" id="protection_text" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[protection_text_rss]" value="<?php echo $options['protection_text_rss']; ?>" />
|
383 |
+
<br/><span class="description"><?php _e('Used as replacement for email addresses in RSS feeds.', 'email-encoder-bundle') ?></span>
|
384 |
</label>
|
385 |
</td>
|
386 |
</tr>
|
397 |
<fieldset class="options">
|
398 |
<table class="form-table">
|
399 |
<tr>
|
400 |
+
<th><?php _e('Choose protection method', 'email-encoder-bundle') ?></th>
|
401 |
<td>
|
402 |
<?php foreach ($this->methods AS $method => $info): ?>
|
403 |
<label>
|
410 |
</td>
|
411 |
</tr>
|
412 |
<tr>
|
413 |
+
<th><?php _e('Set <code><noscript></code> text', 'email-encoder-bundle') ?></th>
|
414 |
<td><label>
|
415 |
+
<span><?php _e('For encoded emails:', 'email-encoder-bundle') ?></span>
|
416 |
<br/><input type="text" id="protection_text" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[protection_text]" value="<?php echo $options['protection_text']; ?>" />
|
417 |
</label>
|
418 |
<br/>
|
419 |
<br/>
|
420 |
<label>
|
421 |
+
<span><?php _e('For other encoded content:', 'email-encoder-bundle') ?></span>
|
422 |
<br/><input type="text" id="protection_text_content" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[protection_text_content]" value="<?php echo $options['protection_text_content']; ?>" />
|
423 |
</label>
|
424 |
<br/>
|
425 |
+
<br/><span class="description"><?php _e('Used as <code><noscript></code> fallback for JavaScrip methods.', 'email-encoder-bundle') ?></span>
|
426 |
</td>
|
427 |
</tr>
|
428 |
<tr>
|
429 |
+
<th><?php _e('Exclude posts', 'email-encoder-bundle') ?></th>
|
430 |
<td>
|
431 |
<label>
|
432 |
+
<span><?php _e('Do <strong>not</strong> apply protection on posts or pages with the folllowing ID:', 'email-encoder-bundle') ?></span>
|
433 |
<br/><input type="text" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[skip_posts]" class="regular-text" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[skip_posts]" value="<?php echo $options['skip_posts']; ?>" />
|
434 |
+
<br/><span class="description"><?php _e('Seperate Id\'s by comma, f.e.: 2, 7, 13, 32.', 'email-encoder-bundle') ?></span>
|
435 |
+
<br/><span class="description"><?php _e('Notice: shortcodes still work on these posts.', 'email-encoder-bundle') ?></span>
|
436 |
</label>
|
437 |
</td>
|
438 |
</tr>
|
439 |
<tr>
|
440 |
+
<th><?php _e('Use shortcodes in widgets', 'email-encoder-bundle') ?></th>
|
441 |
<td>
|
442 |
<label><input type="checkbox" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[shortcodes_in_widgets]" value="1" <?php checked('1', (int) $options['shortcodes_in_widgets']); ?> />
|
443 |
+
<span><?php _e('Also use shortcodes in widgets.', 'email-encoder-bundle') ?></span>
|
444 |
+
<br/><span class="description"><?php if (!$this->options['widget_logic_filter']) { _e('Notice: only works for text widgets!', 'email-encoder-bundle'); } else { _e('All text widgets', 'email-encoder-bundle'); } ?></span></label>
|
445 |
</label>
|
446 |
</td>
|
447 |
</tr>
|
448 |
<tr>
|
449 |
+
<th><?php _e('Use deprecated names', 'email-encoder-bundle') ?></th>
|
450 |
<td><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[support_deprecated_names]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[support_deprecated_names]" value="1" <?php checked('1', (int) $options['support_deprecated_names']); ?> />
|
451 |
+
<span><?php _e('Keep supporting the old names for action, shortcodes and template functions.', 'email-encoder-bundle') ?></span>
|
452 |
<br /><span class="description">These deprecated will still be available: <code>init_email_encoder_bundle</code>, <code>[encode_email]</code>, <code>[encode_content]</code>, <code>[email_encoder_form]</code>, <code>encode_email()</code>, <code>encode_content()</code>, <code>encode_email_filter()</code></span></label></td>
|
453 |
</tr>
|
454 |
</table>
|
464 |
<fieldset class="options">
|
465 |
<table class="form-table">
|
466 |
<tr>
|
467 |
+
<th><?php _e('Check "succesfully encoded"', 'email-encoder-bundle') ?></th>
|
468 |
<td><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[show_encoded_check]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[show_encoded_check]" value="1" <?php checked('1', (int) $options['show_encoded_check']); ?> />
|
469 |
+
<span><?php _e('Show "successfully encoded" text for all encoded content, only when logged in as admin user.', 'email-encoder-bundle') ?></span>
|
470 |
+
<br/><span class="description"><?php _e('This way you can check if emails are really encoded on your site.', 'email-encoder-bundle') ?></span>
|
471 |
</label>
|
472 |
</td>
|
473 |
</tr>
|
474 |
<tr>
|
475 |
+
<th><?php _e('Choose admin menu position', 'email-encoder-bundle') ?></th>
|
476 |
<td><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[own_admin_menu]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[own_admin_menu]" value="1" <?php checked('1', (int) $options['own_admin_menu']); ?> />
|
477 |
+
<span><?php _e('Show as main menu item.', 'email-encoder-bundle') ?></span>
|
478 |
<br /><span class="description">When disabled this page will be available under "<?php _e('Settings') ?>".</span>
|
479 |
</label>
|
480 |
</td>
|
490 |
<?php
|
491 |
} else if ($key === 'encode_form') {
|
492 |
?>
|
493 |
+
<p><?php _e('If you like you can also create you own secure mailto links manually with this form. Just copy the generated code and put it on your post, page or template.', 'email-encoder-bundle') ?></p>
|
494 |
|
495 |
<hr style="border:1px solid #FFF; border-top:1px solid #EEE;" />
|
496 |
|
498 |
|
499 |
<hr style="border:1px solid #FFF; border-top:1px solid #EEE;"/>
|
500 |
|
501 |
+
<p class="description"><?php _e('You can also put the encoder form on your site by using the shortcode <code>[eeb_form]</code> or the template function <code>eeb_form()</code>.', 'email-encoder-bundle') ?></p>
|
502 |
|
503 |
<fieldset class="options">
|
504 |
<table class="form-table">
|
505 |
<tr>
|
506 |
+
<th><?php _e('Show "powered by"', 'email-encoder-bundle') ?></th>
|
507 |
<td><label><input type="checkbox" id="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[powered_by]" name="<?php echo EMAIL_ENCODER_BUNDLE_OPTIONS_NAME ?>[powered_by]" value="1" <?php checked('1', (int) $options['powered_by']); ?> />
|
508 |
+
<span><?php _e('Show the "powered by"-link on bottom of the encoder form', 'email-encoder-bundle') ?></span>
|
509 |
</label>
|
510 |
</td>
|
511 |
</tr>
|
521 |
} else if ($key === 'this_plugin') {
|
522 |
?>
|
523 |
<ul>
|
524 |
+
<li><a href="#" class="eeb-help-link"><?php _e('Documentation', 'email-encoder-bundle') ?></a></li>
|
525 |
+
<li><a href="http://wordpress.org/support/plugin/email-encoder-bundle#postform" target="_blank"><?php _e('Report a problem', 'email-encoder-bundle') ?></a></li>
|
526 |
</ul>
|
527 |
|
528 |
+
<p><strong><a href="http://wordpress.org/support/view/plugin-reviews/email-encoder-bundle" target="_blank"><?php _e('Please rate this plugin!', 'email-encoder-bundle') ?></a></strong></p>
|
529 |
<?php
|
530 |
} else if ($key === 'other_plugins') {
|
531 |
?>
|
533 |
<?php if (is_plugin_active('wp-external-links/wp-external-links.php')): ?>
|
534 |
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/options-general.php?page=wp-external-links/wp-external-links.php"><?php _e('Settings') ?></a>
|
535 |
<?php elseif( file_exists( WP_PLUGIN_DIR . '/wp-external-links/wp-external-links.php')): ?>
|
536 |
+
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/plugins.php?plugin_status=inactive"><?php _e('Activate', 'email-encoder-bundle') ?></a>
|
537 |
<?php else: ?>
|
538 |
+
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/plugin-install.php?tab=search&type=term&s=WP+External+Links+freelancephp&plugin-search-input=Search+Plugins"><?php _e('Get this plugin', 'email-encoder-bundle') ?></a>
|
539 |
<?php endif; ?>
|
540 |
</h4>
|
541 |
+
<p><?php _e('Manage external links on your site: open in new window/tab, set icon, add "external", add "nofollow" and more.', 'email-encoder-bundle') ?>
|
542 |
<br /><a href="http://wordpress.org/extend/plugins/wp-external-links/" target="_blank">WordPress.org</a> | <a href="http://www.freelancephp.net/wp-external-links-plugin/" target="_blank">FreelancePHP.net</a>
|
543 |
</p>
|
544 |
|
546 |
<?php if (is_plugin_active('wp-mailto-links/wp-mailto-links.php')): ?>
|
547 |
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/options-general.php?page=wp-mailto-links/wp-mailto-links.php"><?php _e('Settings') ?></a>
|
548 |
<?php elseif( file_exists( WP_PLUGIN_DIR . '/wp-mailto-links/wp-mailto-links.php')): ?>
|
549 |
+
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/plugins.php?plugin_status=inactive"><?php _e('Activate', 'email-encoder-bundle') ?></a>
|
550 |
<?php else: ?>
|
551 |
+
<a href="<?php echo get_bloginfo('url') ?>/wp-admin/plugin-install.php?tab=search&type=term&s=WP+Mailto+Links+freelancephp&plugin-search-input=Search+Plugins"><?php _e('Get this plugin', 'email-encoder-bundle') ?></a>
|
552 |
<?php endif; ?>
|
553 |
</h4>
|
554 |
+
<p><?php _e('Manage mailto links on your site and protect emails from spambots, set mail icon and more.', 'email-encoder-bundle') ?>
|
555 |
<br /><a href="http://wordpress.org/extend/plugins/wp-mailto-links/" target="_blank">WordPress.org</a> | <a href="http://www.freelancephp.net/wp-mailto-links-plugin/" target="_blank">FreelancePHP.net</a>
|
556 |
</p>
|
557 |
<?php
|
576 |
|
577 |
$screen->add_help_tab(array(
|
578 |
'id' => 'quickstart',
|
579 |
+
'title' => __('Quick Start', 'email-encoder-bundle'),
|
580 |
'content' => $this->get_help_text('quickstart'),
|
581 |
));
|
582 |
$screen->add_help_tab(array(
|
583 |
'id' => 'shortcodes',
|
584 |
+
'title' => __('Shortcodes', 'email-encoder-bundle'),
|
585 |
'content' => $this->get_help_text('shortcodes'),
|
586 |
));
|
587 |
$screen->add_help_tab(array(
|
588 |
'id' => 'templatefunctions',
|
589 |
+
'title' => __('Template Functions', 'email-encoder-bundle'),
|
590 |
'content' => $this->get_help_text('templatefunctions'),
|
591 |
));
|
592 |
$screen->add_help_tab(array(
|
593 |
'id' => 'actions',
|
594 |
+
'title' => __('Action Hook', 'email-encoder-bundle'),
|
595 |
'content' => $this->get_help_text('actions'),
|
596 |
));
|
597 |
$screen->add_help_tab(array(
|
598 |
'id' => 'filters',
|
599 |
+
'title' => __('Filter Hooks', 'email-encoder-bundle'),
|
600 |
'content' => $this->get_help_text('filters'),
|
601 |
));
|
602 |
$screen->add_help_tab(array(
|
603 |
'id' => 'faq',
|
604 |
+
'title' => __('FAQ', 'email-encoder-bundle'),
|
605 |
'content' => $this->get_help_text('faq'),
|
606 |
));
|
607 |
}
|
621 |
$content = sprintf(__('<h3><img src="%s" width="16" height="16" /> %s - version %s</h3>'
|
622 |
. '<p>The plugin works out-of-the-box. All mailto links in your posts, pages, comments and (text) widgets will be encoded (by default). <br/>If you also want to encode plain email address as well, you have to check the option.</p>'
|
623 |
. '<img src="%s" width="600" height="273" />'
|
624 |
+
, 'email-encoder-bundle'), $icon_url, $plugin_title, $version, $quick_start_url);
|
625 |
} else if ($key === 'shortcodes') {
|
626 |
$content = __('<h3>Shortcodes</h3>'
|
627 |
. '<p>You can use these shortcodes within your post or page.</p>'
|
642 |
. '<h4>eeb_form</h4>'
|
643 |
. '<p>Create an encoder form:</p>'
|
644 |
. '<p><code>[eeb_form]</code></p>'
|
645 |
+
, 'email-encoder-bundle');
|
646 |
} else if ($key === 'templatefunctions') {
|
647 |
$content = __('<h3>Template Functions</h3>'
|
648 |
. '<h4>eeb_email()</h4>'
|
676 |
. ' echo eeb_form();' . "\n"
|
677 |
. '}' . "\n"
|
678 |
. '?></code></pre>'
|
679 |
+
, 'email-encoder-bundle');
|
680 |
} else if ($key === 'actions') {
|
681 |
$content = __('<h3>Action Hooks</h3>'
|
682 |
. '<h4>eeb_ready</h4>'
|
687 |
. ' add_filter(\'some_filter\', array($eeb_object, \'callback_filter\'));' . "\n"
|
688 |
. '}' . "\n"
|
689 |
. '?></code></pre>'
|
690 |
+
, 'email-encoder-bundle');
|
691 |
} else if ($key === 'filters') {
|
692 |
$content = __('<h3>Filter Hooks</h3>'
|
693 |
. '<h4>eeb_mailto_regexp</h4>'
|
715 |
. ' return \'<div class="form-wrapper">\' . $content . \'</div>\';' . "\n"
|
716 |
. '}' . "\n"
|
717 |
. '?></code></pre>'
|
718 |
+
, 'email-encoder-bundle');
|
719 |
} else if ($key === 'faq') {
|
720 |
$content = __('<h3>FAQ</h3>'
|
721 |
. '<p>Please check the <a href="http://wordpress.org/extend/plugins/email-encoder-bundle/faq/" target="_blank">FAQ on the Plugin site</a>.'
|
722 |
+
, 'email-encoder-bundle');
|
723 |
} else if ($key === 'sidebar') {
|
724 |
$content = __('<h4>About the author</h4>'
|
725 |
. '<ul>'
|
726 |
. '<li><a href="http://www.freelancephp.net/" target="_blank">FreelancePHP.net</a></li>'
|
727 |
. '<li><a href="http://www.freelancephp.net/contact/" target="_blank">Contact</a></li>'
|
728 |
. '</ul>'
|
729 |
+
, 'email-encoder-bundle');
|
730 |
} else {
|
731 |
$content = '';
|
732 |
}
|
751 |
$show_powered_by = (bool) $this->options['powered_by'];
|
752 |
$powered_by = '';
|
753 |
if ($show_powered_by) {
|
754 |
+
$powered_by .= '<p class="powered-by">' . __('Powered by', 'email-encoder-bundle') . ' <a rel="external" href="http://www.freelancephp.net/email-encoder-php-class-wp-plugin/">Email Encoder Bundle</a></p>';
|
755 |
}
|
756 |
|
757 |
$labels = array(
|
758 |
+
'email' => __('Email Address:', 'email-encoder-bundle'),
|
759 |
+
'display' => __('Display Text:', 'email-encoder-bundle'),
|
760 |
+
'mailto' => __('Mailto Link:', 'email-encoder-bundle'),
|
761 |
+
'method' => __('Encoding Method:', 'email-encoder-bundle'),
|
762 |
+
'create_link' => __('Create Protected Mail Link >>', 'email-encoder-bundle'),
|
763 |
+
'output' => __('Protected Mail Link (code):', 'email-encoder-bundle'),
|
764 |
'method_options' => $method_options,
|
765 |
'powered_by' => $powered_by,
|
766 |
);
|
includes/class-eeb-site.php
CHANGED
@@ -426,10 +426,10 @@ final class Eeb_Site extends Eeb_Admin {
|
|
426 |
|
427 |
return $content
|
428 |
. '<a href="javascript:;" class="encoded-check"'
|
429 |
-
. ' title="' . __('Successfully Encoded (this is a check and only visible when logged in as admin)',
|
430 |
. '<img class="encoded-check-icon" src="' . plugins_url('images/icon-email-encoder-bundle.png', EMAIL_ENCODER_BUNDLE_FILE)
|
431 |
-
. '" alt="' . __('Encoded',
|
432 |
-
. __('Successfully Encoded',
|
433 |
}
|
434 |
|
435 |
/* -------------------------------------------------------------------------
|
426 |
|
427 |
return $content
|
428 |
. '<a href="javascript:;" class="encoded-check"'
|
429 |
+
. ' title="' . __('Successfully Encoded (this is a check and only visible when logged in as admin)', 'email-encoder-bundle') . '">'
|
430 |
. '<img class="encoded-check-icon" src="' . plugins_url('images/icon-email-encoder-bundle.png', EMAIL_ENCODER_BUNDLE_FILE)
|
431 |
+
. '" alt="' . __('Encoded', 'email-encoder-bundle') . '" />'
|
432 |
+
. __('Successfully Encoded', 'email-encoder-bundle') . '</a>';
|
433 |
}
|
434 |
|
435 |
/* -------------------------------------------------------------------------
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: freelancephp
|
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: 3.6.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.4.
|
7 |
|
8 |
Encode mailto links, email addresses, phone numbers and any text to hide them from (spam)bots. Mailto links will be protected automatically.
|
9 |
|
2 |
Contributors: freelancephp
|
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: 3.6.0
|
5 |
+
Tested up to: 4.3.1
|
6 |
+
Stable tag: 1.4.3
|
7 |
|
8 |
Encode mailto links, email addresses, phone numbers and any text to hide them from (spam)bots. Mailto links will be protected automatically.
|
9 |
|