Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: blog_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
384           $id = get_current_blog_id();
385
386      if ( get_current_blog_id() == $id )
387           return get_option( $option, $default );
388
389      switch_to_blog( $id );
390      $value = get_option( $option, $default );
391      restore_current_blog();
392
393      return apply_filters( 'blog_option_' . $option, $value, $id );
394 }
395
396 /**
397  * Add a new option for a given blog id.
398  *
399  * You do not need to serialize values. If the value needs to be serialized, then
400  * it will be serialized before it is inserted into the database. Remember,
401  * resources can not be serialized or added as an option.
402  *