Visiblix Block Rules

外掛說明

Visiblix Block Rules adds a Visibility Conditions panel to every Gutenberg block. Build AND/OR rules, then show or hide content automatically on the frontend – securely, without injecting tracking scripts.

Features

  • Works with any Gutenberg block
  • Login status and user roles
  • Device (desktop / tablet / mobile) and browser
  • Date and time ranges plus recurring schedules
  • Country detection via CDN headers (no remote geo API)
  • URL parameters and custom fields
  • WooCommerce purchase history
  • Membership levels (MemberPress, Restrict Content Pro, WooCommerce Memberships)
  • Allow-listed PHP callbacks for advanced logic
  • Export / import condition sets as JSON
  • REST API (viblx/v1)
  • Request-aware caching with safe fingerprints
  • Admin Dashboard, Settings, Help Center, and Developers docs
  • Fully translatable (text domain: visiblix-block-rules)

How to use

  1. Activate the plugin.
  2. Open Block Visibility in the WordPress admin menu.
  3. Edit any post or page in the block editor.
  4. Select a block and open Visibility Conditions in the sidebar.
  5. Enable conditions, choose Show or Hide, set AND/OR logic, and add rules.
  6. Update the post and preview on the frontend.

Privacy

Visiblix Block Rules does not phone home. Country rules read local CDN request headers only.

Frequently used hooks

  • viblx_register_conditions – register custom condition types
  • viblx_php_callbacks – allow-list PHP callback conditions
  • viblx_evaluation_context – extend evaluation context
  • viblx_should_render – override final visibility

See Block Visibility > Developers in wp-admin for full hook documentation with examples.

Developer notes

  • Namespace: VisiblixBlockRules\
  • Global helper: viblx()
  • REST namespace: viblx/v1
  • Conditions attribute: viblxConditions on every block

Credits

Built by Mayur Paneliya. Uses the WordPress Block API, Settings API, and REST API.

License

GPLv2 or later.

螢幕擷圖

安裝方式

  1. Upload the visiblix-block-rules folder to /wp-content/plugins/, or install via Plugins > Add New.
  2. Activate Visiblix Block Rules.
  3. Open Block Visibility in the admin menu.
  4. Edit any post, select a block, and configure Visibility Conditions.

常見問題集

Does this work with all blocks?

Yes. Conditions are added to every registered block type via the Block API.

Will hidden blocks disappear in the editor?

No. Rules apply on the frontend so editors can always manage content. An optional dashed outline highlights conditional blocks in the editor.

Does country detection call an external service?

No. The plugin only reads local CDN headers such as Cloudflare CF-IPCountry. You can override detection with the viblx_detect_country filter.

Is any visitor data sent off-site?

No. There is no telemetry.

Why is WooCommerce marked Unavailable?

The WooCommerce Purchase condition requires WooCommerce to be installed and active.

How do I add a custom PHP rule?

Register an allow-listed callable with the viblx_php_callbacks filter, then choose PHP Callback in the block sidebar.

使用者評論

2026 年 7 月 31 日
I’ve used this plugin on my site, and it works really well. It offers a wide range of conditions to hide specific page content blocks. It’s easy to use, simple to manage, and does exactly what I need.
閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Visiblix Block Rules〉的開發相關工作。

參與者

將〈Visiblix Block Rules〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.0

  • Initial release
  • Conditional visibility for all Gutenberg blocks
  • Admin Dashboard, Settings, Help Center, Developers
  • REST API, caching, export/import, multilingual support