
內容簡介
Visiblix Block Rules 為每個 Gutenberg 區塊新增可見性條件面板,允許使用者建立 AND/OR 規則,自動在前端顯示或隱藏內容,並且不需注入追蹤腳本,確保安全性。
【主要功能】
• 支援任何 Gutenberg 區塊
• 根據登入狀態與使用者角色設定
• 依裝置與瀏覽器進行內容顯示
• 設定日期、時間範圍及重複排程
• 國家偵測透過 CDN 標頭
• WooCommerce 購買歷史整合
外掛標籤
開發者團隊
原文外掛簡介
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.
Author: Mayur Paneliya
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
Activate the plugin.
Open Block Visibility in the WordPress admin menu.
Edit any post or page in the block editor.
Select a block and open Visibility Conditions in the sidebar.
Enable conditions, choose Show or Hide, set AND/OR logic, and add rules.
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
Support
In-plugin Help Center and Developers pages
GitHub: https://github.com/mayurptl1994/smart-conditional-blocks
Author site: https://mayurpaneliya.blog/
Credits
Built by Mayur Paneliya. Uses the WordPress Block API, Settings API, and REST API.
License
GPLv2 or later.
