WordPress at a glance
filter is not described

sanitize_option_(option) filter-hook . WP 2.3.0

Filters an option value following sanitization.

Usage

add_filter( 'sanitize_option_(option)', 'filter_function_name_1052', 10, 3 );
function filter_function_name_1052( $value, $option, $original_value ){
	// filter...

	return $value;
}
$value(string)
The sanitized option value.
$option(string)
The option name.
$original_value(string)
The original value passed to the function.

Notes

  • Since 4.3.0 Added the $original_value parameter.

Where the hook is called

sanitize_option()
sanitize_option_(option)
wp-includes/formatting.php 4315
return apply_filters( "sanitize_option_{$option}", $value, $option, $original_value );

Where the hook is used (in WP core)

wp-includes/option.php 2026
add_filter( "sanitize_option_{$option_name}", $args['sanitize_callback'] );
wp-includes/option.php 2082
remove_filter( "sanitize_option_{$option_name}", $deprecated );
wp-includes/option.php 2088
remove_filter( "sanitize_option_{$option_name}", $wp_registered_settings[ $option_name ]['sanitize_callback'] );