Sanitize user input fields before wp_insert_post
If calling, sanitize_text_field(), it actually call an internal function _sanitize_text_fields() and add a filter for override. So First look at _sanitize_text_fields(), which actually do Checks for invalid UTF-8, Converts single < characters to entities Strips all tags <——— including wp_strip_all_tags() here Removes line breaks, tabs, and extra whitespace Strips octets That’s mean if calling sanitize_text_field(), … Read more