AI助手支持GPT4.0
This light weight plugin can be used to hide posts and pages from specified user roles.
此轻量级插件可用于隐藏指定用户角色的帖子和页面。
All you have to do is wrap the target content in the shortcode [lock_content].
您要做的就是将目标内容包装在简码[lock_content]中。
The plugin also adds a new button to the default WordPress editor so you can lock content quickly and effortlessly.
该插件还在默认的WordPress编辑器中添加了一个新按钮,因此您可以轻松快捷地锁定内容。 p>
Features:
功能: strong> p>Custom error messages: You can specify the error message while hiding the content. 自定义错误消息: strong>:您可以在隐藏内容时指定错误消息。Just add an error attribute to the shortcode.只需在简码中添加错误属性即可。For instance:例如: p>[lock_content error="You need to log in first"]Some text[/lock_content] [lock_content error =“您需要先登录”]一些文本[/ lock_content] code> pre>Also, you can add a default error message in the control panel that will be displayed in case the error attribute of the shortcode is absent.此外,您可以在控制面板中添加默认错误消息,以防缺少简码的错误属性。 p>User levels: By specifying a role in the shortcode you can decide which members see the hidden content. 用户级别 strong>:通过在简码中指定角色,您可以确定哪些成员可以看到隐藏的内容。For instance:例如: p>[lock_content role="author"]Text visible to authors, editors and admins[/lock_content] [lock_content role =“ author”]作者,编辑者和管理员可以看到的文本[/ lock_content] code> pre>You can also set a default access level in the control panel.您还可以在控制面板中设置默认访问级别。 p>Capabilities: You can also block access by specifying a capability instead of a role. 功能 strong>:您还可以通过指定功能而不是角色来阻止访问。This may come in handy if you have custom roles on your website.如果您在网站上具有自定义角色,这可能会派上用场。Here’s an example of this feature:这是此功能的示例: p>[lock_content capability="activate_plugins"]Text visible to admins[/lock_content] [lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content] code> pre>If you like this plugin please give it a good rating.如果您喜欢此插件,请给它一个良好的评价。 p>
Custom error messages: You can specify the error message while hiding the content.
自定义错误消息: strong>:您可以在隐藏内容时指定错误消息。Just add an error attribute to the shortcode.只需在简码中添加错误属性即可。For instance:例如: p>[lock_content error="You need to log in first"]Some text[/lock_content] [lock_content error =“您需要先登录”]一些文本[/ lock_content] code> pre>Also, you can add a default error message in the control panel that will be displayed in case the error attribute of the shortcode is absent.此外,您可以在控制面板中添加默认错误消息,以防缺少简码的错误属性。 p>User levels: By specifying a role in the shortcode you can decide which members see the hidden content. 用户级别 strong>:通过在简码中指定角色,您可以确定哪些成员可以看到隐藏的内容。For instance:例如: p>[lock_content role="author"]Text visible to authors, editors and admins[/lock_content] [lock_content role =“ author”]作者,编辑者和管理员可以看到的文本[/ lock_content] code> pre>You can also set a default access level in the control panel.您还可以在控制面板中设置默认访问级别。 p>Capabilities: You can also block access by specifying a capability instead of a role. 功能 strong>:您还可以通过指定功能而不是角色来阻止访问。This may come in handy if you have custom roles on your website.如果您在网站上具有自定义角色,这可能会派上用场。Here’s an example of this feature:这是此功能的示例: p>[lock_content capability="activate_plugins"]Text visible to admins[/lock_content] [lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content] code> pre>If you like this plugin please give it a good rating.如果您喜欢此插件,请给它一个良好的评价。 p>
Just add an error attribute to the shortcode.
只需在简码中添加错误属性即可。
For instance:
例如: p>
[lock_content error="You need to log in first"]Some text[/lock_content] [lock_content error =“您需要先登录”]一些文本[/ lock_content] code> pre>Also, you can add a default error message in the control panel that will be displayed in case the error attribute of the shortcode is absent.此外,您可以在控制面板中添加默认错误消息,以防缺少简码的错误属性。 p>User levels: By specifying a role in the shortcode you can decide which members see the hidden content. 用户级别 strong>:通过在简码中指定角色,您可以确定哪些成员可以看到隐藏的内容。For instance:例如: p>[lock_content role="author"]Text visible to authors, editors and admins[/lock_content] [lock_content role =“ author”]作者,编辑者和管理员可以看到的文本[/ lock_content] code> pre>You can also set a default access level in the control panel.您还可以在控制面板中设置默认访问级别。 p>Capabilities: You can also block access by specifying a capability instead of a role. 功能 strong>:您还可以通过指定功能而不是角色来阻止访问。This may come in handy if you have custom roles on your website.如果您在网站上具有自定义角色,这可能会派上用场。Here’s an example of this feature:这是此功能的示例: p>[lock_content capability="activate_plugins"]Text visible to admins[/lock_content] [lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content] code> pre>If you like this plugin please give it a good rating.如果您喜欢此插件,请给它一个良好的评价。 p>
[lock_content error =“您需要先登录”]一些文本[/ lock_content]
code> pre>
Also, you can add a default error message in the control panel that will be displayed in case the error attribute of the shortcode is absent.
此外,您可以在控制面板中添加默认错误消息,以防缺少简码的错误属性。 p>
User levels: By specifying a role in the shortcode you can decide which members see the hidden content.
用户级别 strong>:通过在简码中指定角色,您可以确定哪些成员可以看到隐藏的内容。For instance:例如: p>[lock_content role="author"]Text visible to authors, editors and admins[/lock_content] [lock_content role =“ author”]作者,编辑者和管理员可以看到的文本[/ lock_content] code> pre>You can also set a default access level in the control panel.您还可以在控制面板中设置默认访问级别。 p>Capabilities: You can also block access by specifying a capability instead of a role. 功能 strong>:您还可以通过指定功能而不是角色来阻止访问。This may come in handy if you have custom roles on your website.如果您在网站上具有自定义角色,这可能会派上用场。Here’s an example of this feature:这是此功能的示例: p>[lock_content capability="activate_plugins"]Text visible to admins[/lock_content] [lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content] code> pre>If you like this plugin please give it a good rating.如果您喜欢此插件,请给它一个良好的评价。 p>
[lock_content role="author"]Text visible to authors, editors and admins[/lock_content] [lock_content role =“ author”]作者,编辑者和管理员可以看到的文本[/ lock_content] code> pre>You can also set a default access level in the control panel.您还可以在控制面板中设置默认访问级别。 p>Capabilities: You can also block access by specifying a capability instead of a role. 功能 strong>:您还可以通过指定功能而不是角色来阻止访问。This may come in handy if you have custom roles on your website.如果您在网站上具有自定义角色,这可能会派上用场。Here’s an example of this feature:这是此功能的示例: p>[lock_content capability="activate_plugins"]Text visible to admins[/lock_content] [lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content] code> pre>If you like this plugin please give it a good rating.如果您喜欢此插件,请给它一个良好的评价。 p>
[lock_content role =“ author”]作者,编辑者和管理员可以看到的文本[/ lock_content]
You can also set a default access level in the control panel.
您还可以在控制面板中设置默认访问级别。 p>
Capabilities: You can also block access by specifying a capability instead of a role.
功能 strong>:您还可以通过指定功能而不是角色来阻止访问。This may come in handy if you have custom roles on your website.如果您在网站上具有自定义角色,这可能会派上用场。Here’s an example of this feature:这是此功能的示例: p>[lock_content capability="activate_plugins"]Text visible to admins[/lock_content] [lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content] code> pre>If you like this plugin please give it a good rating.如果您喜欢此插件,请给它一个良好的评价。 p>
This may come in handy if you have custom roles on your website.
如果您在网站上具有自定义角色,这可能会派上用场。
Here’s an example of this feature:
这是此功能的示例: p>
[lock_content capability="activate_plugins"]Text visible to admins[/lock_content] [lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content] code> pre>If you like this plugin please give it a good rating.如果您喜欢此插件,请给它一个良好的评价。 p>
[lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content]
If you like this plugin please give it a good rating.
如果您喜欢此插件,请给它一个良好的评价。 p>
The selected text will automatically be wrapped in the shortcode.
选定的文本将自动以简码换行。 li>
ol>
原文出处:http://www.sanshu.cn/a/8525.html
群主管理都是支付大佬