跳到内容

WST Block Timer

v1.0.1

webtatsu · 2026年9月11日 上架

A container block that shows its contents only between a start and end date/time, and hides them automatically the rest of the time.

正在使用
10 以下
评分
暂无
累计下载
277
最近更新
2026年11月20日
需要 WordPress 7.0+已测试到 7.1.5PHP 8.2+

贡献者

截图

The Block Timer block in the editor, with start and end fields in the sidebar
The Block Timer block in the editor, with start and end fields in the sidebar
Settings screen (preview toggle and preview permission)
Settings screen (preview toggle and preview permission)
The front-end marker shown to permitted signed-in users for out-of-range content
The front-end marker shown to permitted signed-in users for out-of-range content

WST Block Timer adds a single container block. Put any blocks inside it and set a start and/or end date and time; the contents appear on the front end only during that period. Before the start and after the end, the block outputs nothing.

Use it for time-limited announcements, seasonal banners, campaign notices, or any content that should appear and disappear on a schedule without you editing the page again.

Key features

  • One container block (“Block Timer”) that holds any inner blocks
  • Set a start, an end, or both — leave a side empty to leave it open-ended
  • For regular visitors, out-of-range content is left off the page
  • Optional preview: signed-in staff can see out-of-range content in a dashed box, to check it before it goes live
  • Choose who sees that preview: Administrators only, Editors and above, or Authors and above
  • Times are evaluated in your site’s timezone
  • While a preview is active, that page’s full-page cache is disabled so out-of-range content is not served to regular visitors
  • If WST Date Simulator (by the same author) is also active, both plugins use the same simulated time as “now”, so a scheduled display period can be previewed together with scheduled posts

About permissions

  • Viewing the preview and changing the plugin’s settings use separate permission checks
  • Changing the settings always requires an Administrator (manage_options)
  • Who can view the preview is configurable on the settings screen (Editors and above, by default)

Good to know

  • This is a presentational schedule, not access control. Hidden content still exists in the post and may be reachable through revisions, feeds, or the REST API. Do not use it to protect secret information.
  • Crossing the start or end time does not change a cached page until it is regenerated. Shorten your cache lifetime or exclude the affected pages if exact switch timing matters.
  • Deactivating the plugin stops the schedule. Content saved by this plugin is stored in a form that is usually not shown by the browser, but this is not a security measure.

Plums

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

导航

说明

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

© 2026 Plums