前言介紹
- 這款 WordPress 外掛「mmbrs」是 2014-10-01 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2014-10-02,距離現在已有 3867 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.3 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
benwills |
外掛標籤
access | member | capability | capabilities | content access |
內容簡介
mmbrs 外掛允許您使用短代碼限制內容訪問。
您可以根據角色、能力、用戶元和登錄狀態限制內容。
mmbrs 與眾不同的地方:
基於角色、能力、用戶元和登錄狀態限制都在同一個地方。
您可以根據用戶是否為 "not" 進行內容限制。例如:如果用戶不是管理員,則顯示此內容。
您可以將多個變數傳遞給角色和能力短代碼。例如:將此內容顯示給訂閱者、貢獻者或編輯者的用戶。
默認情況下,任何這四個短代碼內的內容不會在源中顯示。您可以設定 showinfeed='yes' 屬性來在源中顯示內容。
它非常精簡,邏輯排序可減少處理過程。這並不意味著很多,但如果您有建議,我很樂意聽取。
四個 mmbrs 短代碼:
[mmbrs_logged_in]
[mmbrs_roles]
[mmbrs_capabilities]
[mmbrs_user_meta]
[mmbrs_logged_in]
[mmbrs_logged_in]內容。[/mmbrs_logged_in]
屬性:無
顯示內容給已登錄的用戶。
[mmbrs_logged_in is='not']內容。[/mmbrs_logged_in]
屬性:is
選填。
只接受 not。
顯示內容給登出的用戶。
不區分大小寫。
[mmbrs_logged_in showinfeed='yes']內容。[/mmbrs_logged_in]
屬性:showinfeed
選填。
僅接受 yes。
在源中顯示內容,忽略顯示在源中時的所有其他屬性。(如果未在源中顯示,所有屬性會生效。)
不區分大小寫。
[mmbrs_roles]
[mmbrs_roles]內容。[/mmbrs_roles]
屬性:無
不返回任何內容。
[mmbrs_roles equals='subscriber']內容。[/mmbrs_roles]
屬性:equals
必填。
可接受多個。例如:equals='subscriber,contributor'
顯示內容給具有 "subscriber" 角色的用戶。
區分大小寫。
[mmbrs_roles is='not' equals='subscriber']內容。[/mmbrs_roles]
屬性:is
選填。
顯示內容給不具有 "subscriber" 角色的用戶。
只接受 not。
不區分大小寫。
[mmbrs_roles showinfeed='yes']內容。[/mmbrs_roles]
屬性:showinfeed
選填。
在源中顯示內容,忽略顯示在源中時的所有其他屬性。(如果未在源中顯示,所有屬性會生效。)
僅接受 yes。
不區分大小寫。
[mmbrs_capabilities]
[mmbrs_capabilities]內容。[/mmbrs_capabilities]
屬性:無
原文外掛簡介
The mmbrs plugin allows you to restrict content access using shortcodes.
Content may be restricted based on role, capability, user meta, and logged-in status.
What makes mmbrs different:
Restriction based on role, capability, user meta, and logged-in status is
all in one place.
You are able to restrict content based on if a user is=’not’. For
example, Show this content if a user is not an administrator.
You can pass multiple variables to the roles and capabilities shortcodes.
For example, Show this content to users who are subscribers,
contributors, or editors.
By default, any content within these four shortcodes is not displayed in
feeds. You may also set the showinfeed=’yes’ attribute to show the
content in feeds.
It is as lean as I could get it, with logic ordering to cut down on
processing. Which isn’t saying much, but if you’ve got suggestions, I’m
open to hearing them.
The four mmbrs shortcodes are:
[mmbrs_logged_in]
[mmbrs_roles]
[mmbrs_capabilities]
[mmbrs_user_meta]
[mmbrs_logged_in]
[mmbrs_logged_in]Content.[/mmbrs_logged_in]
Attribute: none
Shows content to logged in users.
[mmbrs_logged_in is=’not’]Content.[/mmbrs_logged_in]
Attribute: is
Optional.
is only accepts not.
Shows content to logged out users.
Case insensitive.
[mmbrs_logged_in showinfeed=’yes’]Content.[/mmbrs_logged_in]
Attribute: showinfeed
Optional.
showinfeed only accepts yes.
Shows content in the feed and ignores all other attributes when displaying in the feed. (If it is not being displayed in a feed, all of the attributes take effect.)
Case insensitive.
[mmbrs_roles]
[mmbrs_roles]Content.[/mmbrs_roles]
Attribute: none
Returns nothing.
[mmbrs_roles equals=’subscriber’]Content.[/mmbrs_roles]
Attribute: equals
Required.
Accepts multiple. e.g. equals=’subscriber,contributor’
Shows content to users with the ‘subscriber’ role.
Case sensitive.
[mmbrs_roles is=’not’ equals=’subscriber’]Content.[/mmbrs_roles]
Attribute: is
Optional.
Shows content to users who do not have the ‘subscriber’ role.
is only accepts not.
Case insensitive.
[mmbrs_roles showinfeed=’yes’]Content.[/mmbrs_roles]
Attribute: showinfeed
Optional.
Shows content in the feed and ignores all other attributes when displaying in the feed. (If it is not being displayed in a feed, all of the attributes take effect.)
showinfeed only accepts yes.
Case insensitive.
[mmbrs_capabilities]
[mmbrs_capabilities]Content.[/mmbrs_capabilities]
Attribute: none
Returns nothing.
[mmbrs_capabilities can=’delete_others_posts’]Content.[/mmbrs_capabilities]
Attribute: can
Required.
Shows content to users with the ‘delete_others_posts’ capability.
Accepts multiple. e.g. can=’delete_others_posts,edit_others_posts’
Case sensitive.
[mmbrs_capabilities is=’not’ can=’delete_others_posts’]Content.[/mmbrs_capabilities]
Attribute: is
Optional.
Shows content to users who do not have the ‘delete_others_posts’ capability.
is only accepts not.
Case insensitive.
[mmbrs_capabilities showinfeed=’yes’]Content.[/mmbrs_capabilities]
Attribute: showinfeed
Optional.
Shows content in the feed and ignores all other attributes when displaying in the feed. (If it is not being displayed in a feed, all of the attributes take effect.)
showinfeed only accepts yes.
Case insensitive.
[mmbrs_user_meta]
[mmbrs_user_meta]Content.[/mmbrs_user_meta]
Attribute: none
Returns nothing.
[mmbrs_user_meta key=’first_name’][/mmbrs_user_meta]
Attribute: key (with no content)
Required. (key attribute is required. Content is not required.)
Shows a logged-in user’s first_name meta value.
Does NOT accept multiple values when content is null/empty.
Case sensitive.
[mmbrs_user_meta key=’first_name’]Content.[/mmbrs_user_meta]
Attribute: key (with content)
Required. (key attribute is required. Content is not required.)
Shows content to logged-in user with the first_name meta value.
Accepts multiple as OR. e.g. key=’first_name,last_name’
Case sensitive.
[mmbrs_user_meta is=’not’ key=’first_name’]Content.[/mmbrs_user_meta]
Attribute: is
Optional.
Shows content to users who do not have the first_name meta value.
is only accepts not.
Case insensitive.
[mmbrs_user_meta is=’not’ key=’first_name’ equals=’Ben’]Content.[/mmbrs_user_meta]
Attribute: equals
Required.
Shows content to users who do not have the first_name user meta of ‘Ben’.
Case sensitive.
[mmbrs_user_meta showinfeed=’yes’]Content.[/mmbrs_user_meta]
Attribute: showinfeed
Optional.
Shows content in the feed and ignores all other attributes when displaying in the feed. (If it is not being displayed in a feed, all of the attributes take effect.)
showinfeed only accepts ‘yes’.
Case insensitive.
Other Notes:
For every shortcode, except [mmbrs_logged_in], if a user is not logged in, the shortcode will return nothing. The exception is when using is=’not’ in [mmbrs_logged_in], as in [mmbrs_logged_in is=’not’]Content.[/mmbrs_logged_in]
By default, everything is hidden from feeds unless showinfeed=’yes’ is defined.
Motivation for this plugin:
I wrote this plugin to fill some holes, reduce some unnecessary functions, and fix some minor bugs I found in other plugins. I now use this, and only this, to control all shortcode-based content access on my membership-style websites.
The Members plugin checks roles by checking capabilities. You are not supposed to do that. The proper way of checking roles is included here. Notes on this:
WordPress current_user_can() Notes
Aside from that, I love and use the Members plugin and suggest you check it out for other role- and capability-based content access management.
I removed a bunch of stuff from the User Meta Shortcodes plugin that I didn’t want. If you want the additional functionality, I recommend that plugin.
In the end, I wanted very clear control of in-post content via shortcodes. I wasn’t finding anything that was totally stripped down. So I wrote this.
Inspiration and Credits:
Members Plugin
User Meta Shortcodes Plugin
AppThemes User Role Function
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「mmbrs」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Members – Membership & User Role Editor Plugin 》Members 是一個基於 WordPress 會員的權限和能力外掛。它提供強大的工具,讓您可以新增角色和能力,並將它們分配給使用者,調整使用者權限來提供最佳的會員體...。
PublishPress Capabilities – User Role Editor, Access Permissions, User Capabilities, Admin Menus 》PublishPress Capabilities 可以協助您掌控 WordPress 網站中所有權限和許可。我們建立了這款使用者角色編輯外掛,以便您可以輕鬆且強有力地管理使用者。, , ...。
PublishPress Permissions: Control User Access for Posts, Pages, Categories, Tags 》或標籤,你會看到一個名為「權限:編輯此內容」的方塊,它允許你為每個用戶角色、個別用戶或用戶群組設置「啟用」或「拒絕」的權限。你還可以設置所有訪客和...。
Roles & Capabilities 》使用管理區域中強大且簡單的工具來管理您的角色和功能。, 「角色與功能」提供了一組工具,幫助管理員管理其網站的角色和功能,以及網站用戶的功能。, 只有管...。
User Role for Flamingo 》假設你(管理員)在你的網站上透過 Contact Form 7 收取 RSVP 表格,並透過 Flamingo 管理回應。你想讓你的員工監管並處理這些回應。過去,你必須建立一個 Wo...。
Enable Contributor Uploads 》有時候,你可能只想允許擁有「貢獻者」定義使用者角色的使用者在撰寫部落格文章時上傳圖片。啟用此外掛後,它會自動讓貢獻者擁有添加媒體的能力。這是一個輕...。
WP Roles at Registration 》這款外掛讓使用者可以在註冊時從已選擇角色列表中選擇自己在網站中的角色。它也適用於 BuddyPress。它提供了一個界面,供管理員選擇在使用者註冊時顯示哪些角...。
Map Cap 》在您的網站上使用自訂文章類型嗎?, 安裝此外掛程式以控制哪些角色可以發佈、編輯和刪除每個自訂類型的文章。, 為了讓這個外掛程式發揮作用,您的自訂文章類...。
Custom Access Roles 》2.0.0版新增功能:使用自訂角色的使用者現在只會看到分配給他們的文章或頁面。我們還精簡了管理介面,讓配置更輕鬆,同時新增了額外的說明,以協助您將正確的...。
Comment Moderation Role by WPBeginner 》Comment Moderation Role by WPBeginner, 此評論審核外掛可提高 WordPress 網站的評論審核權限。, 插件在您的網站上創建了新角色「WPB Comment Moderator」,...。
User Switcher 》這是一個簡單的工具,讓您可以輕鬆切換使用者帳戶,免去登入和登出的麻煩。它讓您可以查看、檢閱和執行您的站點的操作。, 特點, , , 可在使用者帳戶和訪客用...。
bbPress Capabilities 》這是一個方便的工具,可以觀看、編輯或重置特定使用者的論壇權限。。
Restrict Anonymous Access 》這個外掛可以幫助你隱藏部分內容,例如一個段落或一個圖片等,只需要使用簡單的短代碼就可以對未登入的用戶或其他角色的用戶進行隱藏。, 可以自定義短代碼以...。
DD Roles 》DD-Roles是第一名的角色和能力管理工具!DD-Roles是一個額外的使用者設定頁面,可管理您的角色,但保留預設的角色和能力。您可以新增新角色和更新其能力,移...。
Add Role Site Manager 》如果你的客戶(網站擁有者)不熟悉 WordPress,有時可能會讓你很困擾。將他/她指定為「管理員」角色可能會讓你擔心因為過多權限被指派而毀壞網站。另一方面,...。