Create action running on trashed_post hook to modify post_meta value
wp_trash_post and trashed_post – from source: function wp_trash_post($post_id = 0) { if ( !EMPTY_TRASH_DAYS ) return wp_delete_post($post_id, true); if ( !$post = wp_get_single_post($post_id, ARRAY_A) ) return $post; if ( $post[‘post_status’] == ‘trash’ ) return false; do_action(‘wp_trash_post’, $post_id); add_post_meta($post_id,’_wp_trash_meta_status’, $post[‘post_status’]); add_post_meta($post_id,’_wp_trash_meta_time’, time()); $post[‘post_status’] = ‘trash’; wp_insert_post($post); wp_trash_post_comments($post_id); do_action(‘trashed_post’, $post_id); return $post; }