Reply To: Revive deleted string


Home Forums Front End PM PRO Revive deleted string Reply To: Revive deleted string

#6454
Craig Tucker
Participant

This works to refresh the thread and revive the deleted participants if placed in functions.php


    add_action('save_post', 'undelete_thread');
    function undelete_thread($post_id) {
        $post = get_post($post_id);
        if ($post->post_type = 'fep_message'){
            $participants = fep_get_participants( $post->post_parent );
            foreach( $participants as $participant )        
            {
                delete_post_meta($post->post_parent,'_fep_delete_by_'. $participant );    
            }
        }
    }