
內容簡介
這個外掛創建短碼以限制訪客、成員或特定角色的訪問。您可以在頁面/文章中創建僅對會員(已登錄用戶)、訪客或特定角色可見的部分.
使用方法是在內容周圍包裝這些短碼: [visitor]、[member] 或 [showifrole]。
您可以使用參數 'is' 和 'msg'。如果您未指定它們,則將使用默認值。
參數 'is' 配合 [showifrole] 短碼使用,以檢查特定用戶。默認值為 'administrator'。
'msg' 是系統要顯示的消息。您可以使用帶有單引號的html代碼。默認值為 null。
示例:
'[visitor]
僅對訪客可見的內容
[/visitor]
[member msg=”您需要登入才能查看此內容。”]
僅對成員可見的內容
[/member]
[showifrole is=administrator]
僅對管理員可見的內容
[/showifrole]
[showifrole is=author msg=”您沒有所需的角色。”]
僅對作者可見的內容
[showifrole]'
外掛標籤
開發者團隊
原文外掛簡介
This plugin create shortcodes to restrict the access to Visitors, Members or specific role. You can create sections in your page/post only visible to members (logged users), visitors or for an specific role.
To use you need to create the content and wrap it with these shortcodes: [visitor], [member] or [showifrole].
You can use the parameters ‘is’ and ‘msg’. If you not specify them, the default value will be use instead.
The paramater ‘is’ is use it with the shortcode [showifrole] to check for that specific user. The default value is ‘administrator’.
And ‘msg’ is the message the system is going to show. You can use html code with single apostrophes (‘). The default value is null.
Examples:
‘[visitor]
content only visible to visitors
[/visitor]
[member msg=”You need to Login to see this content.”]
content only visible to members
[/member]
[showifrole is=administrator]
content only visible for administrators
[/showifrole]
[showifrole is=author msg=”You don’t have the required role.”]
content only visible for authors
[showifrole]’
