This page redirects to an external site: https://developer.wordpress.org/reference/functions/sanitize_option/
Sanitizes various option values based on the nature of the option.
This is basically a switch statement which will pass $value through a number of functions depending on the $option. After the value has been handled by these functions, it will be passed through a sanitize_option_$option filter.
<?php sanitize_option( $option, $value ); ?>
Existing options handled by sanitize_option():
New options can be defined by adding an appropriate sanitize_option_$option filter (e.g. 'sanitize_option_avatar' for a filter for an 'avatar' option)
wp-admin/options.php wp-includes/formatting.php in 2.2.3 by changeset 5915.sanitize_option() is located in wp-includes/formatting.php.
sanitize_option() is in a class of functions that help you sanitize potentially unsafe data which allow you to pass an arbitrary variable and receive the clean version based on data type. Others include:
sanitize_option() is called by functions that add and update options: