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
$post
WP_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_post
hook, to check if the post is published via gutenberg, use thisthen inside
save_post
callback, use