Code Duplication    Length = 9-12 lines in 2 locations

class.jetpack-sync.php 1 location

@@ 764-775 (lines=12) @@
761
		$this->register( 'delete_option', $option );
762
	}
763
764
	function updated_option_action() {
765
		// The value of $option isn't passed to the filter
766
		// Calculate it
767
		$option = current_filter();
768
		$prefix = 'update_option_';
769
		if ( 0 !== strpos( $option, $prefix ) ) {
770
			return;
771
		}
772
		$option = substr( $option, strlen( $prefix ) );
773
774
		$this->added_option_action( $option );
775
	}
776
777
	function added_option_action( $option ) {
778
		$this->register( 'option', $option );

class.jetpack-options-sync.php 1 location

@@ 36-44 (lines=9) @@
33
		self::$delete[] = $option;
34
	}
35
36
	static function update_option() {
37
		$option = current_filter();
38
		$prefix = 'update_option_';
39
		if ( 0 !== strpos( $option, $prefix ) ) {
40
			return;
41
		}
42
		$option = substr( $option, strlen( $prefix ) );
43
		self::$sync[] = $option;
44
	}
45
46
	static function add_option( $option ) {
47
		self::$sync[] = $option;