We can still get the benefit of the type hint by making it nullable instead of removing it all together. This will work down to php7.1 which is below the minimum WP version.
See https://3v4l.org/1Mdrl for the deprecation and https://3v4l.org/o764l for the nullable version
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.8 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch gutenberg-merge |
| Focuses: | Cc: |
Per [59523] and [59543], Block Hooks are applied to post content and synced patterns, respectively.
In order to allow inserting hooked blocks as first and last children of a Post Content block (core/post-content), synced pattern (core/block), Template Part block (core/template-part, [60854]), and Navigation block (core/navigation), the block markup gathered from the corresponding post type is temporarily wrapped in a "virtual" instance of the respective block type. That temporary wrapper block furthermore has its metadata.ignoredHookedBlocks attribute set based on the corresponding post meta from the DB.
The Block Hooks algorithm is then applied to the full markup (including the wrapper block), thus reading and/or updating the block wrapper's metadata.ignoredHookedBlocks. (During a write operation, that metadata is then synced back to the post meta in the DB). Finally, the wrapper block is removed.
This pattern -- first introduced for the Navigation block -- is now repeated across a number of block types. It has been suggested by @gziolo that we absorb it into apply_block_hooks_to_content.
Note: See TracTickets for help on using tickets.
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | В Москве приборы в автомобилях ГАИ смогут выявлять машины в розыске | 0 | 5 | 01-07-2026 |
| 2 | Сегодня российской Госавтоинспекции исполняется 90 лет | 0 | 5 | 03-07-2026 |