Forums
-
- Forum
- Posts
-
- Installation
- 28,529
- Troubleshooting
- 62,964
- Themes
- 10,453
- Plugins
- 15,408
- Requests & Feedback
- 15,048
- Showcase
- 3,252
-
Actually, this is the (I hope) correct code for revisions
foreach ( $query as $id ) {
$post_parent_id = wp_get_post_parent_id ($id) ;
$type = get_post_type ($post_parent_id) ;
if ($type != 'topic' && $type != 'reply' )
wp_delete_post_revision( (int) $id );
}