[WordPress] 外掛分享: Encode Shortcode

首頁外掛目錄 › Encode Shortcode
WordPress 外掛 Encode Shortcode 的封面圖片
全新外掛
安裝啟用
尚無評分
2564 天前
最後更新
問題解決
WordPress 4.9+ v1.0.3 上架:2019-03-09

內容簡介

WordPress外掛程式:Encode Shortcode

這是一款WordPress外掛,可保護您網站中的電子郵件地址,避免被爬蟲或索引程式搜集後進行垃圾郵件發送。它使用不同的密鑰進行替換加密,每次讀取頁面時都會產生不同的密鑰。

在WordPress編輯器中的使用方法為:

[encode email="[email protected]"]

或:

[encode email="[email protected]"]鏈結文字[/encode]

在HTML代碼中的結果如下:

<span id="es-23908716">[Encoded]</span><script type="text/javascript">var a="x78UC50DOygu4kZAGq+ei3TbMfcrNYmvP@62Lznt_dQwJWX91HaIRVKEF.s-SjholpB";var b=a.split("").sort().join("");var c="WVdHRkVdHR8Xs";var d="";for(var e=0;e<c.length;e++) d+=b.charAt(a.indexOf(c.charAt(e)));document.getElementById("es-23908716").innerHTML="<a href=\"mailto:"+d+"\">"+d+"</a>"</script>

對於用戶的結果如下:

<span id="es-24377098"><a href="mailto:[email protected]">鏈結文字</a></span>

在PHP中的使用方法為:

傳統方式:

<?php echo do_shortcode('[encode email="[email protected]"]鏈結文字[/encode]'); ?>

資源:

(https://github.com/julien-jacob/encode-shortcode 「Github存放庫」)

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Encode Shortcode」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WordPress plugin : Encode Shortcode
A WordPress plugin to protect the email address in your website against bots or spiders that index or harvest email addresses for sending spam. It uses a substitution cipher with a different key for every page load.
How to use in the WordPress editor
[encode email="[email protected]"]

Or :
[encode email="[email protected]"]Text in the link[/encode]

The result in the HTML code is like :
[Encoded]

The result for the user is like :
Text in the link

How to use in PHP
Classic method :

Ressourses

(https://github.com/julien-jacob/encode-shortcode “Github repository”)

文章
Filter
Apply Filters
Mastodon