| 开发者 | prototipo88 |
|---|---|
| 更新时间 | 2025年12月5日 04:52 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.8 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[riaco_content_protector] Hidden text here [/riaco_content_protector][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:
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 ); });
/wp-content/plugins/[riaco_content_protector] This is hidden. [/riaco_content_protector]= Can I protect multiple sections on the same page? =\ Yes. All instances use the same global password and unlock together. = Does this protect the entire post? =\ No — only the content wrapped in the shortcode. No, the global password is stored in plain text like WordPress page passwords for easy admin management. = Does this work with Gutenberg / block editor? =\ Yes. It works in both Classic and Block Editor.\ You can insert the shortcode inside Paragraph block or using Shortcode block.
All previously unlocked content cookies are invalidated. Users must re-enter the new password.