=== yuiami.jp Hidden Blocks ===
Contributors: ejointjp
Tags: blocks, schedule, visibility, hide, date
Requires at least: 6.6
Tested up to: 7.1
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show or hide any block on a schedule. No settings screen — just two fields on every block.

== Description ==

yuiami.jp Hidden Blocks adds a simple visibility schedule to every block. Pick a start date, an end date, or both, and the block is shown only inside that window. Outside the window, the block's HTML is not rendered at all.

Built to stay simple:

* No settings screen. Install it and every block gets a "Visibility schedule" panel.
* Two fields per block: "Show from" and "Show until". That's it.
* Works with every block — core, third-party, and nested blocks.
* Output is removed server-side, so hidden content never leaks into HTML, feeds, or search engines.
* Scheduled blocks are marked in the editor with a dashed outline and a clock icon. Blocks that are currently hidden on the front end are dimmed instead, with a grey outline and a hidden icon.
* A button in the block toolbar opens the schedule, so it is always one click away.
* Times follow your site's timezone setting.
* No settings, no database tables. Nothing is left behind on uninstall.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/yuiamijp-hidden-blocks` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Select any block in the editor and open the "Visibility schedule" panel in the sidebar.

== Frequently Asked Questions ==

= A block did not appear or disappear at the scheduled time =

If you use a page cache (a caching plugin, a host-level cache, or a CDN), visitors keep getting the cached copy until it expires. A block can stay visible after its end time, and stay missing after its start time.

Shorten the cache lifetime, or purge the cache at the scheduled time. A cache often sits outside WordPress, so this plugin cannot clear it for you.

= Can I rely on this to take something down at an exact time? =

No. Read the schedule as "around then", not "at that second". On a cached site the change lands whenever the cache expires, which can be hours later.

Don't use it for anything that has to be gone on time: a price, a discount that has ended, a legal notice, terms of sale, or any deadline you are accountable for. Edit or unpublish that content instead.

= Does hiding a block delete its content? =

No. The content stays in the editor. Only the front-end output is suppressed while the block is outside its schedule.

= Can hidden content still show up in WordPress's site search? =

Yes. A hidden block's text is still stored as part of the post, and WordPress's built-in site search matches against that stored content. So the post itself can still appear in site search results because of words inside a currently hidden block, even though the block's output stays suppressed on the page. Don't rely on this plugin to hide sensitive information.

= Which timezone is used? =

The site timezone from Settings → General.

== Screenshots ==

1. The "Visibility schedule" panel in the block sidebar.
2. Scheduled blocks in the editor: a clock icon while visible, a hidden icon while hidden.

== Development ==

The editor script in `build/` is compiled from the sources in `src/`, which ship with this plugin. Building it yourself needs Node.js and pnpm:

`pnpm install`
`pnpm build`

The build runs @wordpress/scripts and writes `build/index.js`, `build/index.css`, `build/index-rtl.css` and `build/index.asset.php`. The plugin reads its script dependencies and version from `build/index.asset.php`, so the editor only picks up a change after a build.

== Changelog ==

= 1.0.0 =
* Initial release.
