Funciones seguras en WordPress para corregir inputs, mails, etc.
Ejemplo:
<input id=»title» type=»text» name=»title»>
You can sanitize the input data with the sanitize_text_field() function:
$title = sanitize_text_field($_POST[‘title’]);
update_post_meta($post->ID, ‘title’, $title);
Ver más en:
https://developer.wordpress.org/plugins/security/securing-input/