Linux 软件免费装
Banner图

Hide This

开发者 andrezrv
更新时间 2018年2月13日 07:29
捐献地址: 去捐款
PHP版本: 3.0 及以上
WordPress版本: 4.9
版权: GPLv2 or later
版权网址: 版权信息

标签

content hide user role capability

下载

1.0 1.1 1.1.1 1.1.2 1.1.3

详情介绍:

Hide This provides a [hide] shortcode that lets you hide some parts of the content from your posts and pages. You can easily manage inclusions and exclusions for hidden content in three levels: absolute, groups and capabilities, and specific user. Maybe some part of your post should not be published yet? Or maybe you want to show some specific parts of your content to a certain group or users, let's say your logged in users or your clients? This plugin may be the solution you need. It's very important to note that the content wrapped within the shortcode won't even be printed as HTML. It will be really, really hidden. There are a lot of great plugins that hide the content via CSS and Javascript, but this is not the case. If you want your content to not be visible, but still printed as HTML, you should try one of those. Basic usage: [hide]Lorem ipsum dolor sit amet.[/hide] This example will hide that content for all the site visitors. But you can be more specific by using attributes. Accepted attributes: Some useful examples: Hide your content to all visitors: [hide]Lorem ipsum dolor sit amet.[/hide] Hide your content to all visitors, except for a specific user: [hide for="all" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide] Hide your content to all non-logged visitors: [hide for="!logged"]Lorem ipsum dolor sit amet.[/hide] Hide your content to all logged in visitors: [hide for="logged"]Lorem ipsum dolor sit amet.[/hide] Hide your content to all logged in visitors, except for a specific user: [hide for="logged" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide] Hide your content for some specific role: [hide for="contributor"]Lorem ipsum dolor sit amet.[/hide] Hide your content for two specific roles: [hide for="editor, contributor"]Lorem ipsum dolor sit amet.[/hide] Hide your content for all visitors except for a specific role: [hide for="!administrator"]Lorem ipsum dolor sit amet.[/hide] [hide for="all" exclude="administrator"]Lorem ipsum dolor sit amet.[/hide] Hide your content for all visitors except for two specific roles: [hide for="!administrator, !editor"]Lorem ipsum dolor sit amet.[/hide] [hide for="all" exclude="administrator, editor"]Lorem ipsum dolor sit amet.[/hide] Hide your content for users with a specific role and a specific capability: [hide for="some_role:do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide] Hide your content for users with a specific role, not having a specific capability: [hide for="some_role:!do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide] Hide your content for users with a specific capability: [hide for=":do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide] Hide your content for a specific user by user name: [hide for="username:foo"]Lorem ipsum dolor sit amet.[/hide] Hide your content for a specific user by user ID: [hide for="userid:42"]Lorem ipsum dolor sit amet.[/hide] Hide your content for a specific user by user email: [hide for="useremail:foo@mail.com"]Lorem ipsum dolor sit amet.[/hide] Hide your content for everyone except for a specific user by user name: [hide for="username:!foo"]Lorem ipsum dolor sit amet.[/hide] You should get the idea by now. Notice how you can use ! to deny values such as login status, roles, capabilities and user values. Extending This plugin offers hooks for filters, so you can modify its functionality or add your own. 贡献 You can make suggestions and submit your own modifications to this plugin on Github.

安装:

  1. Unzip hide-this.zip and upload the hide-this folder to your /wp-content/plugins/ directory.
  2. Activate the plugin through the "Plugins" menu in WordPress.
  3. Start using the [hide] shortcode to hide the content you want.

更新日志:

1.1.3 1.1.2 1.1.1 1.1 1.0 First release!