Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: delete_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
1210      }
1211
1212      /**
1213       * Fires immediately before an option is deleted.
1214       *
1215       * @since 2.9.0
1216       *
1217       * @param string $option Name of the option to delete.
1218       */
1219      do_action( 'delete_option', $option );
1220
1221      $result = $wpdb->delete( $wpdb->options, array( 'option_name' => $option ) );
1222
1223      if ( ! wp_installing() ) {
1224           if ( in_array( $row->autoload, wp_autoload_values_to_autoload(), true ) ) {
1225                $alloptions = wp_load_alloptions( true );
1226
1227                if ( is_array( $alloptions ) && isset( $alloptions[ $option ] ) ) {
1228                     unset( $alloptions[ $option ] );