Content Control – User Access Restriction Plugin WordPress 插件

Content Control – User Access Restriction Plugin WordPress 插件

描述

Content Control is a lightweight and powerful plugin that allows you to take complete control of your website’s content by restricting access to pages/posts to logged in users, specific user roles or to logged out users.

The plugin also enables you to restrict access to certain parts of a page/post using shortcodes e.g [content_control]Logged in content[/content_control]

Lastly, the plugin allows you to control the visibility of each sidebar/footer widget by selecting who can view each widget (everyone, logged out users, logged in users, specific user roles).

Full Feature List

Content Control allows you to do the following:

  • Restrict access to pages/posts to logged in/out users or specific user roles
  • Restrict access to media attachment pages, tags, categories, format to logged in/out users or specific user roles
  • Display a custom message to users who do not have permission to view the content
  • Redirect users who do not have permission to view the content to login page (redirects back to page/post after login), website homepage or custom URL
  • Display certain content on a page/post to logged in users only
  • Display certain content on a page/post to specific user roles
  • Display certain content on a page/post to logged out users
  • Apply custom CSS classes to on page content restriction shortcodes
  • Control the visibility of each sidebar/footer widget by selecting who can view each widget (everyone, logged out users, logged in users, specific user roles).

Note: Content Control restricts access to media at the content level via the media attachment pages. Content Control does not restrict access at the server level to actual media files (e.g.: .jpg, .gif, .pdf, and .webp files).

Shortcode

This example allows only logged-in subscribers and editors to see the text “Logged in content”.

[content_control roles=”subscriber,editor” class=”custom-css-class” message=”You don’t have access to this.”]Logged in content[/content_control]

If you are logged out or aren’t logged in as a subscriber or editor, you’ll see the “You don’t have access to this.” denial message.

All parameters are optional. If you add a parameter, make sure it’s followed by an equals (=) sign and the values of your parameters are inside double quotes (“”).

List of parameters:

  • roles – By default, all roles will have access to restricted content. If you want to give access only to specific roles, add this parameter with a comma-separated list of valid WordPress user roles wrapped by double quotes (“”). See the example above.
  • logged_out=”1″ – Only logged out visitors can see this content. If you want the opposite (only logged-in people can see the content), leave this parameter out. I.e., By default, Content Control restricts content so only logged-in visitors can view it.
  • class – Add the name of your custom CSS class if you want to add custom styles to your restricted content.
  • message – Your custom denial message if you want to override the default message from the plugin settings.

Created by Code Atlantic

Content Control is built by the Code Atlantic team. We create high-quality WordPress plugins that help you grow your WordPress sites.

Check out some of our most popular plugins:

  • Popup Maker – #1 Popup & Marketing Plugin for WordPress
  • User Menus – Show Or Hide Menu Items For Different Users

Requires WordPress 3.6 and PHP 5.3

相关推荐

发表回复

房先生
我们将24小时内回复。
2024-05-11 07:06:52
您好,有任何疑问请与我们联系!
您的工单我们已经收到,我们将会尽快跟您联系!
[QQ客服]
2781198
加我微信
[电话联系]
13585372227
[电子邮件]
chaoneo@163.com
取消

选择聊天工具: