I have mentioned that I want the ability to revive a deleted string if one side has not deleted the string and has posted again on the string. What hook would I use to add an action before the message is posted to do something like this:
$query ="SELECT meta_id FROM wp_postmeta WHERE post_id = %s and <code>meta_key</code> = '_fep_delete_by_%s'";
$queryp1 = $wpdb->prepare($query, array($post->post_parent, $post->post_author));
if (!empty($queryp1)) {
delete_post_meta($queryp1,'_fep_delete_by_' . $post->post_author);
}
$queryp2 = $wpdb->prepare($query, array($post->post_parent, $post->ID));
if (!empty($queryp2)) {
delete_post_meta($queryp2,'_fep_delete_by_' . $post->ID);
}
I think that would do it. So is there a hook that I can use to facilitate this?