Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: all_options

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
368           if ( 'siteurl' == $option->option_name )
369                $option->option_value = preg_replace('|/+$|', '', $option->option_value);
370           if ( 'home' == $option->option_name )
371                $option->option_value = preg_replace('|/+$|', '', $option->option_value);
372           if ( 'category_base' == $option->option_name )
373                $option->option_value = preg_replace('|/+$|', '', $option->option_value);
374           $value = maybe_unserialize($option->option_value);
375           $all_options->{$option->option_name} = apply_filters('pre_option_' . $option->option_name, $value);
376      }
377      return apply_filters('all_options', $all_options);
378 }
379
380 // expects $option_name to NOT be SQL-escaped
381 function update_option($option_name, $newvalue) {
382      global $wpdb;
383
384      $safe_option_name = $wpdb->escape($option_name);
385
386      if ( is_string($newvalue) )