Code Duplication    Length = 11-11 lines in 2 locations

modules/protect.php 2 locations

@@ 760-770 (lines=11) @@
757
	 *
758
	 * @return bool true if successful, false otherwise
759
	 */
760
	function delete_transient( $transient ) {
761
		if ( is_multisite() && ! is_main_site() ) {
762
			switch_to_blog( $this->get_main_blog_id() );
763
			$return = delete_transient( $transient );
764
			restore_current_blog();
765
766
			return $return;
767
		}
768
769
		return delete_transient( $transient );
770
	}
771
772
	/**
773
	 * Wrapper for WordPress get_transient function, our version gets
@@ 780-790 (lines=11) @@
777
	 *
778
	 * @return mixed Value of transient.
779
	 */
780
	function get_transient( $transient ) {
781
		if ( is_multisite() && ! is_main_site() ) {
782
			switch_to_blog( $this->get_main_blog_id() );
783
			$return = get_transient( $transient );
784
			restore_current_blog();
785
786
			return $return;
787
		}
788
789
		return get_transient( $transient );
790
	}
791
792
	function get_api_host() {
793
		if ( isset( $this->api_endpoint ) ) {