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