
內容簡介
以下是 RIACO Content Protector 外掛的總結:
- RIACO Content Protector 外掛讓您可以使用簡碼來保護 WordPress 內容的任何部分。
- 與内建的文章密碼保護不同,此外掛僅保護您包裹的部分,而不是整個文章。
- 適用於保護付費內容區塊、指南、下載、連結或敏感部分等。
### 問題與答案:
1. RIACO Content Protector 外掛能夠保護 WordPress 內容的哪些部分?
- 可以保護任何部分,使用簡碼包裹起來。
2. 如果使用 RIACO Content Protector 外掛保護內容,當訪客輸入正確密碼後會發生什麼情況?
- 內容將立即解鎖,所有其他受保護的區域也會自動解鎖。
- 可選擇使用 cookie 保留解鎖的內容一段時間。
3. RIACO Content Protector 的安全性功能有哪些?
- 每次請求均使用 Nonces。
- 以安全的 HMAC 標記進行 cookie 認證。
- 清理簡碼屬性。
- 脫離的輸出。
- 不在 cookie 中存儲敏感資料。
外掛標籤
開發者團隊
原文外掛簡介
RIACO Content Protector allows you to protect any part of your WordPress content using a shortcode.
Unlike the built-in post password protection, this plugin protects only what you wrap, not the whole post.
Perfect for:
Protecting premium blocks of content
Protecting guides, downloads, links, or sensitive sections
Paywall-style snippets
Features
Protect only specific content inside posts/pages
Uses a minimal shortcode:
[riaco_content_protector] Hidden text here [/riaco_content_protector]
Global password stored in plain text, like WordPress page passwords.
AJAX-based form — no page reload
Unlocks all protected sections on the site after correct password
Optional cookie persistence (remember unlocked content for a configurable number of days)
Secure implementation using nonces, hashed tokens, and transients
Important:
The global password is stored in plain text, just like WordPress page passwords. It can be read by user with ‘manage_options’ ability.
If the global password or “Remember Unlocked” duration is changed in settings, all existing unlock cookies are invalidated. Users will need to re-enter the new password to access protected content.
How It Works
Wrap content you want to protect:
[riaco_content_protector]
This text will be hidden until the visitor enters the password.
[/riaco_content_protector]
Set the global password under:
Settings > Content Protector
Visitors will see a modern, styled form.
After entering the correct password:
The content unlocks immediately
All other protected areas unlock automatically
An optional cookie can keep everything unlocked for a chosen number of days
Security
Nonces on every request
Secure HMAC token for cookie authentication
Sanitized shortcode attributes
Escaped output
No sensitive data stored in cookies
Global password stored in plain text, like WordPress page passwords.
Cookie
We use this cookie to understand if user unlocked the content: riaco_cp_unlocked_global.
Style
You can style the content protector box.
It has this class: .riaco-cp--container, so you can add in your style.css:
.riaco-cp--container {
background: #f8f9fa;
padding: 20px;
border: 1px solid #ddd;
border-radius: 6px;
}
You can replace button classes using:
add_filter( 'riaco_cp_button_classes', function( $classes ) {
return 'button my-custom-button-class';
});
Or you can remove button classes:
add_filter( 'riaco_cp_button_classes', function( $classes ) {
// Remove wp-element-button
return str_replace( 'wp-element-button', '', $classes );
});
License
This plugin is licensed under GPLv2 or later.
