Title: mmbrs
Author: benwills
Published: <strong>Ọ̀wàrà 2, 2014</strong>
Last modified: Ọ̀wàrà 2, 2014

---

Ṣàwárí àwọn plugin

Plugin yìí **kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress**.
Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu
nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

![](https://s.w.org/plugins/geopattern-icon/mmbrs.svg)

# mmbrs

 Láti ọwọ́ [benwills](https://profiles.wordpress.org/benwills/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/mmbrs.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/mmbrs/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/mmbrs/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/mmbrs/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/mmbrs/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/mmbrs/)

## Àpèjúwe

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=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’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Ìtumọ̀ Yorùbá: ’t saying much, but if youÌtumọ̀ Yorùbá: ’ve got suggestions,
   IÌtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’not’]Content.[/mmbrs_logged_in]

 * Attribute: is
    - Optional.
    - **is** only accepts **not**.
    - Shows content to logged out users.
    - Case insensitive.

> [mmbrs_logged_in showinfeed=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’subscriber’]Content.[/mmbrs_roles]

 * Attribute: equals
    - Required.
    - Accepts multiple. e.g. equals=Ìtumọ̀ Yorùbá: ’subscriber,contributor’
    - Shows content to users with the ‘subscriber’ role.
    - Case sensitive.

> [mmbrs_roles is=Ìtumọ̀ Yorùbá: ’not’ equals=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’delete_others_posts’]Content.[/mmbrs_capabilities]

 * Attribute: can
    - Required.
    - Shows content to users with the ‘delete_others_posts’ capability.
    - Accepts multiple. e.g. **can=Ìtumọ̀ Yorùbá: ’delete_others_posts,edit_others_posts’**
    - Case sensitive.

> [mmbrs_capabilities is=Ìtumọ̀ Yorùbá: ’not’ can=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’first_name’][/mmbrs_user_meta]

 * Attribute: key (with no content)
    - Required. (**key** attribute is required. Content is not required.)
    - Shows a logged-in userÌtumọ̀ Yorùbá: ’s **first_name** meta value.
    - Does NOT accept multiple values when content is null/empty.
    - Case sensitive.

> [mmbrs_user_meta key=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’first_name,last_name’**
    - Case sensitive.

> [mmbrs_user_meta is=Ìtumọ̀ Yorùbá: ’not’ key=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’not’ key=Ìtumọ̀ Yorùbá: ’first_name’ equals
> =Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’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=Ìtumọ̀ Yorùbá: ’
not’** in **[mmbrs_logged_in]**, as in **[mmbrs_logged_in is=Ìtumọ̀ Yorùbá: ’not’]
Content.[/mmbrs_logged_in]**

By default, everything is hidden from feeds unless **showinfeed=Ìtumọ̀ Yorùbá: ’
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](https://codex.wordpress.org/Function_Reference/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Ìtumọ̀
Yorùbá: ’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Ìtumọ̀
Yorùbá: ’t finding anything that was totally stripped down. So I wrote this.

#### Inspiration and Credits:

 * [Members Plugin](https://wordpress.org/plugins/members/)
 * [User Meta Shortcodes Plugin](https://wordpress.org/plugins/user-meta-shortcodes/)
 * [AppThemes User Role Function](http://docs.appthemes.com/tutorials/wordpress-check-user-role-function/)

 

## Ìgbéwọlẹ̀

 1. Upload **plugin-name.php** to the **/wp-content/plugins/** directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

None. Yet.

## Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

## Àwọn Olùkópa & Olùgbéejáde

“mmbrs” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin
yìí.

Àwọn Olùkópa

 *   [ benwills ](https://profiles.wordpress.org/benwills/)

[Túmọ̀ “mmbrs” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/mmbrs)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/mmbrs/), ṣàyẹ̀wò [ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/mmbrs/),
tàbí ṣe àgbékalẹ̀ sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/mmbrs/)
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/mmbrs/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 1.0

 * 2014.10.01
 * Released

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **1.0**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọdún 12 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **10+**
 *  Ẹ̀yà WordPress ** 3.3 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **4.0.38**
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/mmbrs/)
 * Àwọn àmì
 * [access](https://yor.wordpress.org/plugins/tags/access/)[capabilities](https://yor.wordpress.org/plugins/tags/capabilities/)
   [capability](https://yor.wordpress.org/plugins/tags/capability/)[content access](https://yor.wordpress.org/plugins/tags/content-access/)
   [member](https://yor.wordpress.org/plugins/tags/member/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/mmbrs/advanced/)

## Àwọn ìbò

 5 lára àwọn ìràwọ̀ 5.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/mmbrs/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/mmbrs/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/mmbrs/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/mmbrs/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/mmbrs/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/mmbrs/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/mmbrs/reviews/)

## Àwọn Olùkópa

 *   [ benwills ](https://profiles.wordpress.org/benwills/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/mmbrs/)

## Ṣe ìtọrẹ

Ṣé o fẹ́ ṣe àtìlẹ́yìn fún ìlọsíwájú plugin yìí?

 [ Ṣe ìtọrẹ sí plugin yìí ](http://compassionate.co/)