內容簡介
使用 `[recaptcha-protected-download]` 短碼(shortcode)包裹任何您想要 reCaptcha 處理的直接下載連結。
`[recaptcha-protected-download]https://example.com/download.zip[/recaptcha-protected-download]`
範例
這是我的 `hello world` 文章 HTML:
Hello! This page is dynamically generated with my plugin called Content Generator which you can download from <a href="[recaptcha-protected-download]https://my-cdn.tld/static/content-generator.zip[/recaptcha-protected-download]">這裡</a>.
You can also download WordPress following <a href="[recaptcha-protected-download]https://wordpress.org/latest.zip[/recaptcha-protected-download]">這個 URL</a>
解析如下:
Hello! This page is dynamically generated with my plugin called Content Generator which you can download from <a href="#rcpdl=371bce9996c0afc711648c2c4f3d5c97">這裡</a>.
You can also download WordPress following <a href="#rcpdl=7039e773658ed3c70d50e791ed4940fd">這個 URL</a>
關於
此外掛選擇以 JavaScript 控制的假連結(錨點)來啟動模態框,讓使用者完成 Google reCaptcha 的防垃圾郵件測試。
使用者成功提交測試後,會有 AJAX 回調來驗證回應並解析下載。
使用 `md5` 來對下載連結進行雜湊,並在使用者提交測試後稍後取回它們。
您必須提供 Google reCaptcha 憑證,這可以在此頁面上申請。
啟用此外掛後,您應該移至「設定」>「reCaptcha 下載」(若是網路已啟用的外掛則為「選項」>「reCaptcha 下載」),並加入您的 Google reCaptcha 憑證(公鑰和私鑰),可以由 https://www.google.com/recaptcha/admin 取得。
此外掛的開發版本位於 Github 上,歡迎 fork、貢獻和改善它,或若您想要報告像非尋常的錯誤之類的問題,請開啟一個新的 issue。
以下是 Github 存儲庫網址:https://github.com/elhardoum/recaptcha-protected-downloads
謝謝!
外掛標籤
開發者團隊
原文外掛簡介
Use the shortcode `[recaptcha-protected-download]` to wrap any direct download link that you’d like reCaptcha to process.
`[recaptcha-protected-download]https://example.com/download.zip[/recaptcha-protected-download]`
Example
Here’s my `hello world` post HTML:
Hello! This page is dynamically generated with my plugin called Content Generator which you can download from here.
You can also download WordPress following this URL
Which is parsed as follows:
Hello! This page is dynamically generated with my plugin called Content Generator which you can download from here.
You can also download WordPress following this URL
About
This plugin opts to generate fake links (anchors) controlled with JavaScript to open up a modal once clicked to opt users to complete the anti-spam test with Google reCaptcha.
Once a user successfully submits a test, an AJAX callback will then verify the response and parse the download.
`md5` is used to hash the download links and fetch them later once a user submits a test.
You must provide your Google reCaptcha credentials which you can obtain from this page
Once you activate the plugin, you should now navigate to “Settings” > “reCaptcha Downlaods” (or “Options” > “reCaptcha Downlaods” for network activated plugin) and add your Google reCaptcha credentials (public and private keys) which you can obtain from https://www.google.com/recaptcha/admin
The development version of this plugin is hosted on Github, feel free to fork it, contribute and improve it, or start a new issue if you want to report something like an unusual bug.
Here’s the Github repo: https://github.com/elhardoum/recaptcha-protected-downloads
Thank you!
