How to validate inputs with filter in register_setting callback
First of all I would recommend you to rename your function to wpPartSanitize_settings, because this function doesn’t validate anything. As it doesn’t validate anything, then you aren’t able to “inform” administrator that one input is invalid. Nevertheless, to create your hook for wpPartValidate_settings filter, just do it like this: add_filter( ‘wpPartValidate_settings’, ‘wpse8170_sanitize_settings’, 10, 2 ); … Read more