[wp-hackers] WP Auto-Save drafts causing slight havoc with my
lists at alexking.org
Tue Oct 17 17:01:50 GMT 2006
I think this new behavior is going to cause some chaos with various
plugins, and it's worth talking about. A new plugin I'm working on
will be affected here, and I've been trying to figure out th best way
to handle it without adding a large load to each save/update.
Should there be an "auto-save" state that doesn't fire any of the
standard "post creation" hooks? If not, then I think we have to
expect plugins that need to do something "on post save" will likely
cause the auto-save function to become heavier as they each have to
check their existing data, the add/update their meta as needed.
I'm not saying that the WP behavior should change, I'm saying that
plugin devs have likely relied on existing behavior that is now
slightly different because it no longer requires user interaction.
Perhaps a "best practice" doc in codex from someone who is intimate
with all of the "post saving" hooks is a good solution.
On Oct 17, 2006, at 8:08 AM, Jeremy Visser wrote:
> I realise there is an
> update_post_meta function but then I will also have to use
> get_post_meta to see if the meta already exists and whether I should
> use add_post_meta or update_post_meta.
> The AJAX drafting will send only the contents of
> the post, not my custom scoring fields, but the wp_insert_post hook is
> still being called.
More information about the wp-hackers