I found the culprit. I had to change the nonce check in save_custom_post_type()
to:
if ( !isset( $_POST['metabox_nonce'] ) || !wp_verify_nonce( $_POST['metabox_nonce'], basename( __FILE__ ) ) ) {
return $post_id;
}
Related Posts:
- How to use wp.hooks.addAction() in React JS/Gutenberg?
- Extend core block in Gutenberg
- Hooking a callback into the code within a Gutenberg block
- What do the args for Gutenberg subpackage “hooks” function “doAction” mean?
- Use useSelect/useDispatch instead of withSelect/withDispatch
- How to use wp.hooks.addAction() in React JS/Gutenberg?
- useSelect second parameter
- Get terms of a taxonomy using useSelect
- Trigger Javascript on Gutenberg (Block Editor) Save
- Set default image link target in Gutenberg image block
- What are all the query parameters for getEntityRecords?
- Show control conditionally in Gutenberg
- Get loading state of wp data selector
- How to get the ToggleControl Gutenberg component working for a PHP Block
- Is there a core Sortable component in Gutenberg?
- getEntityRecord without knowing the post type
- Get updated meta data after save_post hook
- Is there an equivalent of the PHP function sanitize_key in Gutenberg?
- Better post meta efficiency?
- How to add extra attributes to the script tag added via wp_localize_script()
- Is there a client side API for handling transients or options?
- How do I fire a snackbar notice in admin?
- Gutenberg Modify core taxonomy panel element via wp.hooks.addFilter
- What is “open()” in MediaUpload?
- Why is this gutenberg custom format button only available from the toolbar as a dropdown?
- Adding a text element in between title and blocks container
- Setting HTML properties in a Gutenberg plugin using WordPress settings
- Provide specific example for block variation
- Set current tab on a Gutenberg TabPanel component from outside that component
- Block editor: How to check if block editor has initialized and populated the data store?
- Gutenberg block “This block appears to have been modified externally” on save
- How to get value of selected page template in Gutenberg editor?
- @wordpress/components Button variants not styled
- Block Editor: How to get title and post content within the WordPress admin UI in Javascript?
- Custom block SelectControl works but equivalent ComboboxControl gives errors – where’s my mistake?
- Gutenberg passing block attributes to component in ES6/ESNext
- Can the index.asset.php file be used with the enqueue_block_editor_assets action?
- How can I add Block Style support to the core HTML block in Gutenberg?
- var is undefined in a Gutenberg block
- Using wp.data.select get actual tags (not id’s) used in post
- event/callback on block update?
- can a buttongroup have a label?
- How to remove p / br elements from gutenbergs editor
- Programatically update posts in database from one block to another using transform
- InnerBlocks restricting does not work on nested blocks
- Gutenberg: Block validation Failed Richtext undefined
- Add A Tag To A Post Through JavaScript In Gutenberg UI?
- Add custom HTML markup to Gutenberg RichText
- Listening change event of taxonomy term checkboxes in Gutenberg editor
- How to return div with custom attributes(Coding a Gutenberg Block)
- Gutenberg get core data – search
- Get Block Attributes in JSON REST API
- Open Featured Image Modal in WordPress Gutenberg onClick of a button
- How to add classes and events to image in javascript using Gutenberg?
- Checks when fetching data from multiple REST API endpoints in Gutenberg
- Add custom classes for blocks in editor based on custom attributes
- How to display post content in the block editor
- is_front_page() variable not found
- How can I allow HTML in Gutenberg UI elements help text?
- what is the purpose of the namespace argument when customizing blocks?
- Trigger wp-embed via JavaScript to refresh iframe preview?
- How can I import one custom block into another?
- Gutenberg Blocks: how to determine an index of the current inner block?
- Trying to turn the Edit function into a class to be able to use React lifecycle methods
- Gutenberg richtext block vaildation failed
- UnitControl – Block has encountered an error
- Gutenberg select excerpt, use generated excerpt or use more block excerpt
- Custom Gutenberg-Block esnext pass variables
- Building a Featured Gallery component for Gutenberg
- Gutenberg dependencies in package.json
- find out reason of “Updating failed” in Post-editor
- How to read inline-CSS from Gutenberg block?
- Gutenberg RangeControl
- Gutenberg – useEffect manipulate DOM after block re-renders DOM
- Hook a script as the very last one before the closing body tag
- Problem extending a core block
- Cannot read properties of undefined (reading ‘show_ui’) Error on WordPress Post Editor
- Add a Page Screen is Visually Blank
- Refresh Gutenberg with JS for it show updated post
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- Gutenberg sidebar show input field on toggle
- Get the ID of a page in Parent combobox in editor
- Update block once an API request returns with a value
- Gutenberg – dynamically created element: how to set onChange?
- Call javascript function when add_attachment hook fires
- Custom block update rendering when reused
- Gutenberg Edit Block Inspector Controls and save
- Spans in gutenberg
- Custom Media Meta fields to alter the generated image HTML that is inserted into a post for my animated GIF image player?
- WordPress Gutenberg: Attribute overwritten by block duplicate
- Where to include JS library in gutenberg blocks
- How to delete child block for associated parent block
- Passing object to FormTokenField suggestions
- Use add_action to run a script, but only on the post editor page
- Is it possible to add javascript to template parts
- How to add a new attribute to core wp block editor without npm?
- How do i get an Inline style in Gutenberg Block show up in front end?
- WordPress adds and tags into HTML blocks after saving
- Gutenberg core/file add style support in js/ json
- Working with a non-React external library in a custom block