Adds hidden input fields to the meta box save form.
Description
Hook into this action to print <input type="hidden" ... /> fields, which will be POSTed back to the server when meta boxes are saved.
Parameters
$postWP_Post- The post that is being edited.
Source
do_action( 'block_editor_meta_box_hidden_fields', $post );
Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |
In
save_posthook, to check if the post is published via gutenberg, use thisthen inside
save_postcallback, use