Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Quick edit clearing the meta data of registered metaboxes #103

Open
rafasashi opened this issue Jun 28, 2023 · 0 comments
Open

Quick edit clearing the meta data of registered metaboxes #103

rafasashi opened this issue Jun 28, 2023 · 0 comments

Comments

@rafasashi
Copy link
Contributor

rafasashi commented Jun 28, 2023

Since "Quick Edit" triggers the save_post hook the following function might end up clearing the meta data of registered metaboxes that are not included in the Quick Edit form:

$fields = apply_filters( $post_type . '_custom_fields', array(), $post_type );

This issue is referenced here:

https://wordpress.stackexchange.com/questions/4931/quick-edit-update-clears-out-my-custom-meta-values

I suggest replacing

if( !$post_id )

by

if( !$post_id || isset($_POST['_inline_edit']) )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant