array_map() for sanitizing $_POST
It’s probably not a great idea. Firstly, if you’ve got other field types then you should probably use more appropriate functions. For example, textarea fields should be sanitised with sanitize_textarea_field(), and color pickers should be sanitized with sanitize_hex_color(). You should also consider that $_POST likely also contains fields that you don’t want to save, such … Read more