Home › Forums › Front End PM PRO › Revive deleted string › Reply To: Revive deleted string
September 14, 2017 at 2:08 pm
#6463
Shamim Hasan
Keymaster
Please use following
add_action('save_post', 'undelete_thread');
function undelete_thread($post_id) {
$post = get_post($post_id);
if ($post->post_type == 'fep_message' && $post->post_parent){
$participants = fep_get_participants( $post->ID );
foreach( $participants as $participant )
{
delete_post_meta($post->post_parent,'_fep_delete_by_'. $participant );
}
}
}