Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: WP Sweep and Topic changelogs

@robin-w

Moderator

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 );
}
Skip to toolbar