[wordpress插件] DC RoleDC角色

wordpress 插件 文章 2020-04-13 13:20 410 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

DC Role is a plugin which can show content to users (not) belonging to a certain role they have.

DC Role是一个插件,可以向属于某个角色的用户(而非用户)显示内容。

It is meant as a lightweight version for some kind of member/subscription system.

它是某种成员/订阅系统的轻量级版本。

The shortcodes can also be selected from a button in the editor, making it (hopefully) friendly to non-techies.

也可以从编辑器中的按钮中选择简码,以使其(希望)对非技术人员友好。

DC Role consists of 5 shortcodes:

DC角色包含5个短代码:

    • [dc_role role=”administrator”]content[/dc_role] shows the specified content only if the users is an administrator

      [dc_role role =” administrator”] content [/ dc_role]仅在用户为管理员时显示指定的内容

    • [dc_not_role role=”administrator]content[/dc_not_role] shows the specified content only if the user is not an administrator

      [dc_not_role role =“ administrator] content [/ dc_not_role]仅在用户不是管理员时显示指定的内容

    • [dc_roles roles=”administrator,subscriber”]content[/dc_roles] shows the specified content if the user has any of the provided roles (in this case administrator or subscriber)

      [dc_roles角色=“管理员,订户”] content [/ dc_roles]显示指定内容,如果用户具有任何提供的角色(在这种情况下为管理员或订户)

    • [dc_not_roles roles=”administrator,subscriber]content[/dc_not_roles] shows the specified content if the user does not have any of the provided roles

      如果用户没有任何提供的角色,[dc_not_roles角色=”管理员,订阅者] content [/ dc_not_roles]显示指定的内容

    • [dc_all_roles] shows a list of all roles the wordpress installation has

      [dc_all_roles]显示了wordpress安装具有的所有角色的列表

安装步骤

This section describes how to install the plugin and get it working.

本节介绍如何安装插件并使其正常工作。

    1. Upload the dc-role folder to the /wp-content/plugins/ directory
    2. 将dc-role文件夹上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. When editing a page that you want to show content based on the users role, click on the red button in the editor and select your case.

    6. 在编辑要根据用户角色显示内容的页面时,请单击编辑器中的红色按钮,然后选择案例。

      Enter the role(s) that the system should take into account and you’re all set!

    7. 输入系统应考虑的角色,您便已准备就绪!

下载地址
https://downloads.wordpress.org/plugin/dc-role.zip
-EOF-

AI助手支持GPT4.0