Linux 软件免费装
Banner图

Steuber Block Logic

开发者 rsteuber
更新时间 2026年10月3日 03:35
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

responsive dynamic content animation visibility display conditions

下载

1.0.0

详情介绍:

Steuber Block Logic adds its settings to the blocks you already use, in the block sidebar of the editor. Display conditions Dynamic content Entrance animations Responsive visibility and layout Steuber Block Logic Pro adds more conditions, more dynamic tags, scroll and mouse effects, sticky blocks and custom attributes.

安装:

  1. In your WordPress admin, go to Plugins > Add New Plugin and search for "Steuber Block Logic".
  2. Click Install Now, then Activate.
  3. Open a page or post in the block editor and select a block. The Steuber Block Logic settings appear in the block sidebar.
Steuber Block Logic needs WordPress 6.9 or later and PHP 8.1 or later.

屏幕截图:

  • Combine rules with AND, and add OR groups for alternatives.
  • Dynamic content: fill a heading with the post title, with text before and after it.
  • Entrance animations: choose how a block appears when it scrolls into view.
  • Responsive visibility: hide a block on desktop, tablet or mobile.
  • Layout: stretch a block to the screen width and keep its content aligned with the page.

常见问题:

What happens to settings made with Pro if I switch back to the free version?

Nothing is deleted. Until you edit the affected blocks:

  • a block with a display condition that the free version doesn't have stays hidden for every visitor (the rule fails closed);
  • dynamic content from a tag that the free version doesn't have shows its fallback text, or nothing;
  • scroll and mouse effects, sticky settings and custom attributes are ignored.
An admin notice lists the affected content. When you switch back to Pro, the settings work again.

Are display conditions access control?

No. A block hidden by a display condition is only left out of the page output; its content is still stored in the post. If the plugin is deactivated, every block is shown to every visitor. Don't use display conditions to protect content that must stay private.

Does it work with page caching?

Yes. A page cache serves one stored copy of a page to every visitor, so a rule that depends on the moment of the visit would show everyone the same result. When a page contains a block with an enabled date range rule whose result can still change, the plugin keeps that page out of page caches, whether the block is shown or hidden at that moment: it defines DONOTCACHEPAGE, which most caching plugins respect, and sends no-cache headers when it still can.

  • A rule in a template part, such as a header, affects every page that uses it.
  • Once a date range has ended, or has started and has no end date, its result can't change any more, and the page can be cached again.
  • What a visitor can't see doesn't count: the dynamic content of a hidden block, and the blocks inside it.
Login status and user role rules don't turn caching off, because page caches normally skip logged-in visitors. The current date tag doesn't either: it often sits in a footer on every page. The no-cache headers can only be sent before any output. Block themes build the whole page first; a theme that prints the top of the page before the content may already have sent them, and then only DONOTCACHEPAGE is set. Caches that only look at headers, such as server-level caches and CDNs, can then still store the page, so exclude those pages in their settings. Developers can switch this off with the steuber_block_logic/cache_guard_enabled filter (return false); the steuber_block_logic/uncacheable_render action fires, with the reason, when a page is kept out of the cache.

更新日志:

1.0.0 First public release.