Linux 软件免费装

mmbrs

开发者 benwills
更新时间 2014年10月3日 01:24
捐献地址: 去捐款
PHP版本: 3.3 及以上
WordPress版本: 4.0
版权: GPL2+
版权网址: 版权信息

标签

shortcodes shortcode member members access capabilities roles users membership user role capability memberships restrict access usermeta user meta content access

下载

详情介绍:

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: The four mmbrs shortcodes are: [mmbrs_logged_in]
[mmbrs_logged_in]Content.[/mmbrs_logged_in]
[mmbrs_logged_in is='not']Content.[/mmbrs_logged_in]
[mmbrs_logged_in showinfeed='yes']Content.[/mmbrs_logged_in]
[mmbrs_roles]
[mmbrs_roles]Content.[/mmbrs_roles]
[mmbrs_roles equals='subscriber']Content.[/mmbrs_roles]
[mmbrs_roles is='not' equals='subscriber']Content.[/mmbrs_roles]
[mmbrs_roles showinfeed='yes']Content.[/mmbrs_roles]
[mmbrs_capabilities]
[mmbrs_capabilities]Content.[/mmbrs_capabilities]
[mmbrs_capabilities can='delete_others_posts']Content.[/mmbrs_capabilities]
[mmbrs_capabilities is='not' can='delete_others_posts']Content.[/mmbrs_capabilities]
[mmbrs_capabilities showinfeed='yes']Content.[/mmbrs_capabilities]
[mmbrs_user_meta]
[mmbrs_user_meta]Content.[/mmbrs_user_meta]
[mmbrs_user_meta key='first_name'][/mmbrs_user_meta]
[mmbrs_user_meta key='first_name']Content.[/mmbrs_user_meta]
[mmbrs_user_meta is='not' key='first_name']Content.[/mmbrs_user_meta]
[mmbrs_user_meta is='not' key='first_name' equals='Ben']Content.[/mmbrs_user_meta]
[mmbrs_user_meta showinfeed='yes']Content.[/mmbrs_user_meta]
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: 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:   == Installation ==
  1. Upload plugin-name.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

升级注意事项:

None.

更新日志:

1.0