Hi Jason,
As i assumed there is problem with wp_insert_post method of your class.
During quick edit meta data are not sent so your script delete them:
$value = @$_POST[$key];
if (empty($value))
{
delete_post_meta($post_id, $key);
continue;
}
You should check nonce during saving of post and if there is no nonce or
it is invalid you should not update (or delete) your metadata.
Please check http://codex.wordpress.org/Function_Reference/add_meta_box.
There is example with everything what you need.
Patrik
On 06/16/2010 07:07 AM, Jason Bobich wrote:
Hello Patrik,
Thanks for the response.
So I have removed all code from my functions.php except for the class which has to do
with the custom post type and it's taxonomies. I'm not using any plugins. And I'm still
having the issue that when you click "Quick Edit" on the Edit Posts page for
the custom post type, all custom fields attached to the post associated with the meta box
I created get deleted.
Here is the code I'm working with:
http://themeblvd.com/podcast-30.txt
-Jason
Date: Tue, 15 Jun 2010 20:05:10 +0200
From: [email protected]
To: [email protected]
Subject: Re: [wp-testers] Custom fields are deleted from custom post types with
"Quick Edit"
It can be related... please paste your code here, or try to remove whole
content of functions.php (and deactivate all plugins) if it will help.
Patrik
On 06/15/2010 05:00 PM, Jason Bobich wrote:
In my class where I setup my custom post type, I do use the add_meta_box() function to
create a meta box. The custom fields that I'm saying are being deleted when using
"Quick Edit" are custom fields created with this meta box.
Does that have any significance?
Date: Tue, 15 Jun 2010 15:18:29 +0200
From: [email protected]
To: [email protected]
Subject: Re: [wp-testers] Custom fields are deleted from custom post types with
"Quick Edit"
Do you have any add_meta_box() funcionality in your theme's functions.php ?
Patrik
On 06/15/2010 07:29 AM, Jason Bobich wrote:
This is a fresh installation of Wordpress. I have no plugins at all.
Is there anything that could have been done when registering the custom post
type or taxonomies that would cause this?
From: [email protected]
Date: Tue, 15 Jun 2010 01:09:17 -0400
To: [email protected]
Subject: Re: [wp-testers] Custom fields are deleted from custom post types with
"Quick Edit"
On Tue, Jun 15, 2010 at 12:32 AM, Jason Bobich<[email protected]>wrote:
I have a custom post type setup and when I'm on edit.php and use the "Quick
Edit" and click "Update", any custom fields attached to that post are
deleted. Has anyone else run into this? Any possible causes for this?
If I had to guess, a plugin. Most issues we've seen relating to things like
this are being caused by a plugin.
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers