Adding custom fields to the quick edit panel in Wordpress is easy using built-in hooks. However, the hook to add fields seems to be called multiple times, adding duplicate fields to the quick edit panel. Adding this code to the top of the function being called by quickeditcustom_box checks if the action has already been called and prevents it from being called again.
More info here
- global $post;
- //if post is a custom post type and only during the first execution of the action quick_edit_custom_box
- if ( $post->post_type != 'post' || did_action( 'quick_edit_custom_box' ) !== 1 ) return;
You need to login to post a comment.