Codex tools: Log in
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
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-includes/formatting.phpin 2.2.3 by changeset 5915.
sanitize_option() is located in
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: