Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: add_site_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
838           $notoptions = wp_cache_get( 'notoptions', 'site-options' ); // yes, again... we need it to be fresh
839           if ( is_array( $notoptions ) && isset( $notoptions[$option] ) ) {
840                unset( $notoptions[$option] );
841                wp_cache_set( 'notoptions', $notoptions, 'site-options' );
842           }
843      }
844
845      if ( $result ) {
846           do_action( "add_site_option_{$option}", $option, $value );
847           do_action( "add_site_option", $option, $value );
848           return true;
849      }
850      return false;
851 }
852
853 /**
854  * Removes site option by name.
855  *
856  * @see delete_option()