I’m working on a system that needs some added functionality in the quick edit box. I can get extra fields in there using a combination of the “manage_posts_columns” and “quick_edit_custom_box” hooks, and I can retrieve the posted information by hooking into “save_post”. That all works great.
What I need, however, is the ability to populate my custom fields with their current values. When adding a custom coumn to the manage posts page (which works similarly to the quick_edit_custom_box hook), this is no problem, because the current post id is passed in as a parameter. quick_edit_custom_box, however, passes in the post type (post or page, I assume) instead of the post id.
I haven’t been able to decipher the order of what is going on in the core, but I know from testing that the quick_edit_custom_box hook must be run at the end, because trying to grab $post returns the last displayed post every time.
- The topic ‘Retrieving current $post data in custom quick edit field’ is closed to new replies.