{"id":1862,"date":"2024-12-26T12:47:16","date_gmt":"2024-12-26T11:47:16","guid":{"rendered":"https:\/\/wpmastertoolkit.com\/module\/masquer-les-adresses-e-mail\/"},"modified":"2026-03-09T13:47:27","modified_gmt":"2026-03-09T12:47:27","slug":"masquer-les-adresses-e-mail","status":"publish","type":"module","link":"https:\/\/wpmastertoolkit.com\/en\/module\/1862-autosave-v1\/","title":{"rendered":"Hide e-mail addresses"},"content":{"rendered":"<h1 class=\"wp-block-heading\">Protect your email addresses with WPMasterToolKit's Obfuscation Module<\/h1>\n\n\n\n<p>The e-mail addresses visible on a WordPress site are often picked up by bots scouring the web to feed spam lists. It's a classic problem: you want to display a contact clearly for your visitors, but without stupidly exposing it to bots.<\/p>\n\n\n\n<p>It is precisely to meet this need that we have developed the <strong>Obfuscate Email Addresses<\/strong> from <strong>WPMasterToolKit<\/strong>. Its objective is simple: <strong>make an e-mail address human-readable, while greatly complicating its automated extraction<\/strong>. All this with a very lightweight shortcode.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Which plugin can Obfuscate Email Addresses replace?<\/h2>\n\n\n\n<p>Depending on your needs, this module can replace extensions dedicated to :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>obfuscation of e-mail addresses<\/li>\n\n\n\n<li>protection against e-mail bots<\/li>\n\n\n\n<li>secure link display <code data-no-auto-translation=\"\">mailto:<\/code><\/li>\n<\/ul>\n\n\n\n<p>The point here is not to add yet another specialized plugin just for one function. With WPMasterToolKit, you only activate this module when you need it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What exactly is the purpose of this module?<\/h2>\n\n\n\n<p>This module allows you to display an email address in your WordPress content via a shortcode, with several protection mechanisms:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the address is not trivially exposed in the rendering<\/li>\n\n\n\n<li>it can be displayed in a visually correct order for the user, while being more difficult for a robot to analyze<\/li>\n\n\n\n<li>a link <code data-no-auto-translation=\"\">mailto:<\/code> protected can be generated without directly placing the plain-text e-mail in the initial link<\/li>\n<\/ul>\n\n\n\n<p>In practice, this allows you to display a contact address in a page, article or even a widget, while reducing the risk of automatic harvesting.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A simple shortcode to display a protected e-mail address<\/h2>\n\n\n\n<p>The module registers the following shortcode:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">[wpm_obfuscate]\n<\/code><\/pre>\n\n\n\n<p>It supports several attributes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code data-no-auto-translation=\"\">email<\/code> the e-mail address to protect<\/li>\n\n\n\n<li><code data-no-auto-translation=\"\">display<\/code> display mode<\/li>\n\n\n\n<li><code data-no-auto-translation=\"\">rtl<\/code> : enables or disables reverse visual rendering<\/li>\n\n\n\n<li><code data-no-auto-translation=\"\">mailto<\/code> transforms the address into a protected clickable link<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Basic example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">[wpm_obfuscate email=\"contact@example.com\"]\n<\/code><\/pre>\n\n\n\n<p>This shortcode displays the e-mail address with module protection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example with clickable link<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">[wpm_obfuscate email=\"contact@example.com\" mailto=\"yes\"]\n<\/code><\/pre>\n\n\n\n<p>Here, the address becomes clickable, but without immediately exposing a link <code data-no-auto-translation=\"\">mailto:contact@example.com<\/code> in the original HTML code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example without RTL rendering<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">[wpm_obfuscate email=\"contact@example.com\" rtl=\"no\"]\n<\/code><\/pre>\n\n\n\n<p>This option disables the rendering strategy based on text direction.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example with display on a new line<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">[wpm_obfuscate email=\"contact@example.com\" display=\"newline\"]\n<\/code><\/pre>\n\n\n\n<p>This modifies the rendering to force a display on a dedicated line.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How e-mail obfuscation works<\/h2>\n\n\n\n<p>The core of the module is based on a simple idea: <strong>don't display the e-mail in the way that's easiest for a robot to read<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Visual address inversion<\/h3>\n\n\n\n<p>When the <code data-no-auto-translation=\"\">rtl<\/code> is active, the module can <strong>invert e-mail address characters<\/strong> then use CSS styles so that the human visitor sees it correctly on screen.<\/p>\n\n\n\n<p>In other words:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>in the code, the address can be manipulated in an inverted form<\/li>\n\n\n\n<li>on the screen, it remains legible as usual for the user<\/li>\n<\/ul>\n\n\n\n<p>It's a light, effective method with no external dependency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Insertion of an invisible parasitic element<\/h3>\n\n\n\n<p>The module also adds a piece of hidden content to the displayed address:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">&lt;span style=&quot;display:none;&quot;&gt;wpm_obfuscate&lt;\/span&gt;\n<\/code><\/pre>\n\n\n\n<p>This element is invisible to the visitor, but it disrupts some naive scraping attempts that seek to reconstruct the e-mail address simply by reading the HTML content.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Address validation before display<\/h3>\n\n\n\n<p>The shortcode returns nothing if the value provided in <code data-no-auto-translation=\"\">email<\/code> is not a valid address. This prevents incorrect or ill-formed data from being displayed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A protected mailto link, activated on click<\/h2>\n\n\n\n<p>One of the module's most interesting features is the management of the <code data-no-auto-translation=\"\">mailto=\"yes\"<\/code>.<\/p>\n\n\n\n<p>When this option is enabled, the module does not directly place the real address in the <code data-no-auto-translation=\"\">href<\/code>. Instead :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the link first uses a false address<\/li>\n\n\n\n<li>the real address is stored in a <code data-no-auto-translation=\"\">data-email<\/code><\/li>\n\n\n\n<li>this value is encoded in Base64<\/li>\n\n\n\n<li>a JavaScript script in the footer decodes the address only when it is clicked<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Why is it useful?<\/h3>\n\n\n\n<p>A bot can easily spot a link like :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">mailto:contact@example.com\n<\/code><\/pre>\n\n\n\n<p>On the other hand, if it only finds a dummy address and encoded data that is only decoded when clicked, extraction becomes less immediate.<\/p>\n\n\n\n<p>It's not absolute protection against all advanced bots, but it's an excellent layer of defense to block the majority of basic automated collections.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Inline or new line display<\/h2>\n\n\n\n<p>The <code data-no-auto-translation=\"\">display<\/code> allows you to adapt the visual integration of the address.<\/p>\n\n\n\n<p>By default, the address is displayed inline, i.e. in the normal text flow.<\/p>\n\n\n\n<p>With <code data-no-auto-translation=\"\">display=\"newline\"<\/code>In RTL mode, the module applies a more appropriate display to a dedicated line. When RTL mode is active, alignment is also adjusted to maintain a consistent presentation.<\/p>\n\n\n\n<p>Useful for :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>an address in a contact page<\/li>\n\n\n\n<li>a block of practical information<\/li>\n\n\n\n<li>a footer or sidebar widget<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Can also be used in text widgets<\/h2>\n\n\n\n<p>The module doesn't limit itself to classic content. It also enables the processing of shortcodes in WordPress text widgets.<\/p>\n\n\n\n<p>This means that you can use <code data-no-auto-translation=\"\">[wpm_obfuscate]<\/code> in :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>a classic text widget<\/li>\n\n\n\n<li>some shortcode-compatible content areas<\/li>\n\n\n\n<li>contact locations in the sidebar or footer<\/li>\n<\/ul>\n\n\n\n<p>It's handy for centralizing your contact information without exposing your e-mails.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to use this module<\/h2>\n\n\n\n<p>It's very easy to use:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Activate the <strong>Obfuscate Email Addresses<\/strong> in WPMasterToolKit.<\/li>\n\n\n\n<li>Add the shortcode <code data-no-auto-translation=\"\">[wpm_obfuscate]<\/code> in a page, article or widget.<\/li>\n\n\n\n<li>Fill in at least the <code data-no-auto-translation=\"\">email<\/code>.<\/li>\n\n\n\n<li>Activate <code data-no-auto-translation=\"\">mailto=\"yes\"<\/code> if you want a protected clickable link.<\/li>\n\n\n\n<li>Disable <code data-no-auto-translation=\"\">rtl<\/code> with <code data-no-auto-translation=\"\">rtl=\"no\"<\/code> if you prefer a display without visual inversion.<\/li>\n<\/ol>\n\n\n\n<p>Complete example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">[wpm_obfuscate email=\"contact@example.com\" mailto=\"yes\" rtl=\"yes\"]\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Why we chose this technical approach<\/h2>\n\n\n\n<p>We wanted a :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>easy to use<\/li>\n\n\n\n<li>light on performance<\/li>\n\n\n\n<li>without heavy dependence<\/li>\n\n\n\n<li>compatible with classic WordPress uses<\/li>\n\n\n\n<li>robust enough to discourage even the simplest bots<\/li>\n<\/ul>\n\n\n\n<p>Instead of adding a complicated system or intrusive protection, we opted for a pragmatic approach:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>e-mail validation<\/li>\n\n\n\n<li>visual obfuscation<\/li>\n\n\n\n<li>injection of invisible disruptive content<\/li>\n\n\n\n<li>deferred link decoding <code data-no-auto-translation=\"\">mailto:<\/code> to the click<\/li>\n\n\n\n<li>JavaScript script loaded only when a protected link is actually used<\/li>\n<\/ul>\n\n\n\n<p>This last point is important: <strong>the decoding script is only displayed in the footer if necessary<\/strong>. This avoids unnecessary JavaScript loading on pages that don't use a protected mailto link.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The module <strong>Obfuscate Email Addresses<\/strong> WPMasterToolKit meets a very real need: <strong>display an e-mail address on WordPress without handing it over too easily to spambots<\/strong>.<\/p>\n\n\n\n<p>Thanks to its simple shortcode, visual obfuscation, widget compatibility and link system <code data-no-auto-translation=\"\">mailto<\/code> click-protected, it offers a lightweight, clean and efficient solution.<\/p>\n\n\n\n<p>This is typically the kind of useful functionality you'd rather integrate into an all-in-one modular plugin than install an additional extension just for it.<\/p>","protected":false},"excerpt":{"rendered":"<p>WPMasterToolKit's \"Obfuscate Email Addresses\" module is designed to protect email addresses from spammers and bots by obfuscating them, while making them readable to humans. Unlike other more complex solutions, this module offers a lightweight, effective approach by using a simple shortcode on WordPress to invert the characters of email addresses, complicating their detection by automated systems. The tool is easy to integrate, improves compatibility with WordPress, and offers enhanced security without impacting overall site performance. This solution is ideal for users looking to defend their mailboxes with a simple, elegant approach.<\/p>","protected":false},"featured_media":0,"parent":0,"template":"","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"","_seopress_titles_title":"Prot\u00e9gez vos Email: Obfuscation Simple par WPMasterToolKit","_seopress_titles_desc":"Masquez vos adresses email contre les robots avec le module d'obfuscation l\u00e9ger et efficace de WPMasterToolKit pour WordPress.","_seopress_robots_index":"","_surecart_dashboard_logo_width":"180px","_surecart_dashboard_show_logo":true,"_surecart_dashboard_navigation_orders":true,"_surecart_dashboard_navigation_invoices":true,"_surecart_dashboard_navigation_subscriptions":true,"_surecart_dashboard_navigation_downloads":true,"_surecart_dashboard_navigation_billing":true,"_surecart_dashboard_navigation_account":true},"class_list":["post-1862","module","type-module","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module\/1862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module"}],"about":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/types\/module"}],"wp:attachment":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/media?parent=1862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}