Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_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
27  *
28  * @param string $option Name of option to retrieve. Expected to not be SQL-escaped.
29  * @param mixed $default Optional. Default value to return if the option does not exist.
30  * @return mixed Value set for the option.
31  */
32 function get_option( $option, $default = false ) {
33      global $wpdb;
34
35      // Allow plugins to short-circuit options.
36      $pre = apply_filters( 'pre_option_' . $option, false );
37      if ( false !== $pre )
38           return $pre;
39
40      $option = trim($option);
41      if ( empty($option) )
42           return false;
43
44      if ( defined( 'WP_SETUP_CONFIG' ) )
45           return false;