/ Published in: PHP
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 quick_edit_custom_box checks if the action has already been called and prevents it from being called again.
More info [here](http://wp.tutsplus.com/tutorials/extending-the-quick-edit-tool-for-taxonomy-terms/ "Extending the Quick Edit Tool for Taxonomy Terms | Wptuts+")
More info [here](http://wp.tutsplus.com/tutorials/extending-the-quick-edit-tool-for-taxonomy-terms/ "Extending the Quick Edit Tool for Taxonomy Terms | Wptuts+")
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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;