[wordpress插件] Content Hider内容隐藏器

wordpress 插件 文章 2020-04-01 03:00 681 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

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编辑器中添加了一个新按钮,因此您可以轻松快捷地锁定内容。

Features:

功能:

Custom error messages: You can specify the error message while hiding the content.

自定义错误消息::您可以在隐藏内容时指定错误消息。

Just add an error attribute to the shortcode.

只需在简码中添加错误属性即可。

For instance:

例如:

[lock_content error="You need to log in first"]Some text[/lock_content]

  [lock_content error =“您需要先登录”]一些文本[/ lock_content]

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.

此外,您可以在控制面板中添加默认错误消息,以防缺少简码的错误属性。

User levels: By specifying a role in the shortcode you can decide which members see the hidden content.

用户级别:通过在简码中指定角色,您可以确定哪些成员可以看到隐藏的内容。

For instance:

例如:

[lock_content role="author"]Text visible to authors, editors and admins[/lock_content]

  [lock_content role =“ author”]作者,编辑者和管理员可以看到的文本[/ lock_content]

You can also set a default access level in the control panel.

您还可以在控制面板中设置默认访问级别。

Capabilities: You can also block access by specifying a capability instead of a role.

功能:您还可以通过指定功能而不是角色来阻止访问。

This may come in handy if you have custom roles on your website.

如果您在网站上具有自定义角色,这可能会派上用场。

Here’s an example of this feature:

这是此功能的示例:

[lock_content capability="activate_plugins"]Text visible to admins[/lock_content]

  [lock_content功能=“ activate_plugins”]管理员可见的文本[/ lock_content]

If you like this plugin please give it a good rating.

如果您喜欢此插件,请给它一个良好的评价。

安装步骤

    1. Use WordPress’ plugin installer to install the plugin.
    2. 使用WordPress的插件安装程序来安装插件。

    3. Set default values in the control panel (optional).
    4. 在控制面板中设置默认值(可选)。

    5. In the WordPress editor select the content you want to hide and click the lock icon in the top panel.

    6. 在WordPress编辑器中,选择要隐藏的内容,然后单击顶部面板中的锁定图标。

      The selected text will automatically be wrapped in the shortcode.

    7. 选定的文本将自动以简码换行。

下载地址
https://downloads.wordpress.org/plugin/content-hider.0.1.zip
-EOF-

AI助手支持GPT4.0