[wp-hackers] Autosave API for custom post types?
TV productions
info at tv-productions.org
Tue Mar 4 23:02:38 UTC 2014
Andrew,
I believe it does so, but it doesn't submit the whole post form.
This is the post data that a typical autosave request has (after the
title has changed)
==================================
action autosave
autosave true
autosavenonce ebb79c8859
catslist
comment_status open
content
excerpt
ping_status open
post_author 1
post_id 2996
post_name a
post_title Ab
post_type easy-photo-album
==================================
I hope my problem is a bit more clear now.
Ties
---
TV productions :: Web development and stuff
http://tv-productions.org
On 04-03-2014 23:57, Andrew Bartel wrote:
> Does autosave not trigger the save_post and/or edit_post actions? You
> could probably hook on to those.
>
> -Andrew
>
>
> On Tue, Mar 4, 2014 at 2:50 PM, TV productions
> <info at tv-productions.org>wrote:
>
> Hi wp-hackers,
>
> I have a plugin (http://wordpress.org/plugins/easy-photo-album/) with a
> custom post type and as update I've added successfully support for
> revisions. But when I restore an autosave, the metadata (that is saved
> with
> the revisions) is empty. After digging into the code, I found out that
> autosave only checks the title and the content (which in my plugin
> doesn't
> exists on the edit page) for differences and saves only them.
>
> So I was wondering if there is (or will be in the near future) a
> autosave
> API that allows to save also "custom data". And, if that is not the
> case,
> does anyone know a workaround to save my metadata with autosave?
>
> Best regards,
>
> Ties
>
> --
> TV productions :: Web development and stuff
> http://tv-productions.org
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list