How to force field validation first, then its values saved durning edit profile?

Unfortunately I didn’t receive any reply. I did it a little different … and it works. I just combine them both and I have that result which works fine. add_action( ‘user_profile_update_errors’, ‘validate_steamid_field’ , 10, 3); function validate_steamid_field(&$validation_errors, $update = null, &$user){ if ( isset( $_FILES[‘custom_avatar’] ) && !empty($_FILES[‘custom_avatar’]) && file_exists($_FILES[‘custom_avatar’][‘tmp_name’]) ) { //we check if … Read more

Trigger a custom function when option are saved in admin area

Here is the solution: update_option_{option_name}: Runs after the option with name “option_name” has been updated. For example, for the option with name “foo”: add_action(‘update_option_foo’, ‘my_custom_function’, 10, 2); update_option: Runs before an option gets updated. Example: add_action(‘update_option’, ‘my_custom_function’, 10, 3); updated_option: Runs after an an option has been updated. Example: add_action(‘updated_option’, ‘my_custom_function’, 10, 3);