Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: sanitize_option_{$option}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2526                     $value = esc_url_raw($value);
2527                } else {
2528                     $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization
2529                     if ( function_exists('add_settings_error') )
2530                          add_settings_error('home', 'invalid_home', __('The Site address you entered did not appear to be a valid URL. Please enter a valid URL.'));
2531                }
2532                break;
2533
2534           default :
2535                $value = apply_filters("sanitize_option_{$option}", $value, $option);
2536                break;
2537      }
2538
2539      return $value;
2540 }
2541
2542 /**
2543  * Parses a string into variables to be stored in an array.
2544  *