跳到内容

User Block Visibility

v1.0

noraconley · 2019年4月13日 上架

Allows authors to restrict access to blocks by user roles.

正在使用
10+
评分
5.0 / 5
累计下载
1,880
最近更新
2019年4月13日
2 条评价需要 WordPress 5.0+已测试到 5.1.29PHP 5.6+

贡献者

截图

Showing a block with visibility restricted for subscribers and users who are not logged in.
Showing a block with visibility restricted for subscribers and users who are not logged in.

Allows authors to restrict access to blocks by user roles.

This plugin is meant to be lightweight, limited in scope, while maintaining extensibility. If you need a hook, please reach out!

Developer API

User Block Visibility is meant to be extensible. For example, use the filter ubv_built_in_user_roles to restrict the built-in roles that are available.

To create custom restriction options, use ubv_additional_roles and the built-in WordPress filter render_block.

To restrict access to this functionality, use ubv_do_enqueue_sidebar.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums