[wp-hackers] uninstall post meta with get_post issue
scribu
scribu at gmail.com
Mon Aug 30 20:02:43 UTC 2010
On Mon, Aug 30, 2010 at 10:45 PM, Ken <Ken at adcstudio.com> wrote:
> I put this in uninstall.php in the root folder of my plugin. For some
> reason it won't delete anything the meta of drafts. Am I doing something
> wrong?
>
Instead of
'post_status' => null
you should have
'post_status' => 'any'
Personally, I would do a single direct query:
$wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key IN ('foo', 'bar')"
);
--
http://scribu.net
More information about the wp-hackers
mailing list