I'm using a custom post type for a portfolio. I have a few option in there, bring saved by update_post_meta(), it seems to work fine, but then out of the blue (within the hour), the data deletes its self. I have looked in the DB and all custom metadata values are empty.
I'm a little stumped really.
Here's the code that's saving one of the options.
function update_colour_palette(){ global $post; $color = get_post_custom($post->ID); $palette = $color["palette"][0]; update_post_meta($post->ID, "palette", $_POST["palette"], $palette); } Any help, tips & tricks would be useful.
update_colous_palette()? Because the post saves revisions multiple times via Ajax while the editor is open, you should check for this and not update the post meta if this is the case.