Code Duplication    Length = 9-11 lines in 3 locations

wp-includes/option.php 3 locations

@@ 338-346 (lines=9) @@
335
		wp_cache_set( 'notoptions', $notoptions, 'options' );
336
	}
337
338
	if ( ! wp_installing() ) {
339
		$alloptions = wp_load_alloptions();
340
		if ( isset( $alloptions[$option] ) ) {
341
			$alloptions[ $option ] = $serialized_value;
342
			wp_cache_set( 'alloptions', $alloptions, 'options' );
343
		} else {
344
			wp_cache_set( $option, $serialized_value, 'options' );
345
		}
346
	}
347
348
	/**
349
	 * Fires after the value of a specific option has been successfully updated.
@@ 439-447 (lines=9) @@
436
	if ( ! $result )
437
		return false;
438
439
	if ( ! wp_installing() ) {
440
		if ( 'yes' == $autoload ) {
441
			$alloptions = wp_load_alloptions();
442
			$alloptions[ $option ] = $serialized_value;
443
			wp_cache_set( 'alloptions', $alloptions, 'options' );
444
		} else {
445
			wp_cache_set( $option, $serialized_value, 'options' );
446
		}
447
	}
448
449
	// This option exists now
450
	$notoptions = wp_cache_get( 'notoptions', 'options' ); // yes, again... we need it to be fresh
@@ 515-525 (lines=11) @@
512
	do_action( 'delete_option', $option );
513
514
	$result = $wpdb->delete( $wpdb->options, array( 'option_name' => $option ) );
515
	if ( ! wp_installing() ) {
516
		if ( 'yes' == $row->autoload ) {
517
			$alloptions = wp_load_alloptions();
518
			if ( is_array( $alloptions ) && isset( $alloptions[$option] ) ) {
519
				unset( $alloptions[$option] );
520
				wp_cache_set( 'alloptions', $alloptions, 'options' );
521
			}
522
		} else {
523
			wp_cache_delete( $option, 'options' );
524
		}
525
	}
526
	if ( $result ) {
527
528
		/**