Wordpress plugins
Content Protector

Content Protector

Version : 2.11
Tested up to : 4.5.10
Number of download : 28039
Author : K. Tough

Screenshots

Content Protector
Content Protector
Content Protector
Content Protector

The Content Protector plugin allows users to password-protect a portion of a Page or Post. This is done by adding a shortcode that you wrap around the content you want to protect. Your users are shown an access form in which to enter a password; if it’s correct, the protected content will get displayed. Features Set up multiple protected sections on a single Post Display the protected content inline via AJAX or by reloading the page Set cookies so users won’t need to re-enter the password on every visit, and share authorization with groups of protected sections. Apply custom CSS to your forms Choose from a variety of encryption methods for your passwords (depending on your server configuration) Set custom passwords or use a CAPTCHA to authorize your visitors A TinyMCE dialog is included to help users build the shortcode. See the Screenshots tab for more info. Usage NOTE: The shortcode can be built using the built-in TinyMCE dialog. When in doubt, use the dialog to create correctly formed shortcodes. Shortcode [content_protector password="{string}" identifier="{string}" cookie_expires="{string|int}" ajax="{true|{string}}"]...[/content_protector] password – Specifies the password that unlocks the protected content. Upper- and lower-case Latin alphabet letters (A-Z and a-z), numbers (0-9), and “.” and “/” only. Set password to “CAPTCHA” to add a CAPTCHA to your access form. identifier (Optional) – Used to differentiate between multiple instances of protected content cookie_expires (Optional) – If set, put a cookie on the user’s computer so the user doesn’t need to re-enter the password when revisiting the page. ajax (Optional) – Load the protected content using AJAX instead of reloading the page. Set to “true” to activate, but you must also set the identifier attribute in order to use this. Template/Conditional Tag content_protector_is_logged_in( $password = "", $identifier = "", $post_id = "", $cookie_expires = "" ) $password, $cookie_expires, and $identifier are defined the same as their analogous attributes above. $post_id is the Post ID. Returns true if the user is currently authorized to access the content protected by a Content Protector shortcode matching those parameters. All arguments are required. Notes cookie_expires can be either a string or an integer. If it’s an integer, it’s processed as the number of seconds before the cookie expires; set it to “0” to make the cookie expire when the browser is closed. If it’s a string, it can be either a duration (e.g., “2 weeks”) or a human-readable date/time description with timezone identifier (e.g., “January 1, 2014 12:01 AM America/New York”). The plugin uses PHP’s strtotime function to process dates/times, so anything it can understand can be used depending on your server configuration. While the use of identifier is optional, you must set it if you want to apply custom CSS or use AJAX with a specific access form, or to use Shared Authorization. While you don’t need to set identifier if you want to want to set a cookie for specific protected content, editing that content in the future will invalidate any cookies set for it (this may actually be desired behaviour, depending on what you’re trying to do). Basically, when in doubt, set the identifier attribute. You’ll thank yourself later. When you set an identifier for protected content, the identifier gets appended onto the existing DOM IDs in its access form. For example if you set identifier="Bob" in a shortcode, the ID for that form element will be #content-protector-access-form-Bob Any identifiers you set on shortcodes you use in a specific post should be unique to that post (see Note 5).

Download now