Code Duplication    Length = 11-11 lines in 2 locations

modules/protect.php 2 locations

@@ 827-837 (lines=11) @@
824
	 *
825
	 * @return bool true if successful, false otherwise
826
	 */
827
	function delete_transient( $transient ) {
828
		if ( is_multisite() && ! is_main_site() ) {
829
			switch_to_blog( $this->get_main_blog_id() );
830
			$return = delete_transient( $transient );
831
			restore_current_blog();
832
833
			return $return;
834
		}
835
836
		return delete_transient( $transient );
837
	}
838
839
	/**
840
	 * Wrapper for WordPress get_transient function, our version gets
@@ 847-857 (lines=11) @@
844
	 *
845
	 * @return mixed Value of transient.
846
	 */
847
	function get_transient( $transient ) {
848
		if ( is_multisite() && ! is_main_site() ) {
849
			switch_to_blog( $this->get_main_blog_id() );
850
			$return = get_transient( $transient );
851
			restore_current_blog();
852
853
			return $return;
854
		}
855
856
		return get_transient( $transient );
857
	}
858
859
	/**
860
	 * Get the API host.