| 开发者 | philhoyt |
|---|---|
| 更新时间 | 2026年11月26日 05:55 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
role="dialog" with aria-modal, a title for assistive technology, and a close button. Opening it moves focus into the dialog and locks page scrolling; Escape and the overlay close it. The form uses the theme's wp-block-search and wp-block-button__link classes, so it picks up the same styling as the core Search and Buttons blocks.
The front-end script (MicroModal plus the init call, about 3 KB gzipped) loads only on pages that contain the block. The stylesheet is page-scoped on block themes; classic themes load every registered block's styles on every page.
/wp-content/plugins/.The trigger button inherits your theme's button colours. The form reuses the wp-block-search__input and wp-block-button__link classes, so theme.json styles for the Search and Buttons blocks apply to it. For anything else, target the wp-block-ph-search-modal__* classes in your theme's CSS.
Yes. The form action is rewritten on render to the site's home_url(), so the search goes to the right site.
No. The block carries deprecations for the 1.0.0, 1.1.0, and 1.2.0 markup, so older blocks are migrated when the post is next opened in the editor and keep rendering on the front end until then.
type="search" for the native clear control.src directory to the release.