Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block Hooks: Refactor controller filter to use meta_input.
Prior to this changeset, the function `update_ignored_hooked_blocks_postmeta()` used the core function `update_post_meta()` to write `_wp_ignored_hooked_blocks` data to the database during an operation that is preparing a post to be inserted. Since we have access to the incoming changes that are being prepared we can remove this database operation in favour of writing the data to the post object provided under `meta_input`. Doing this means two things: 1. It allows us to store postmeta for new posts that are about to be created since they don't have an `ID` yet (which is information `update_post_meta()` needs). 2. The core controller will take care of updating postmeta in a more predictable pattern. Props tomjcafferkey, bernhard-reiter. Fixes #61495. git-svn-id: https://develop.svn.wordpress.org/trunk@58578 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information