Code Duplication    Length = 20-21 lines in 3 locations

projects/packages/identity-crisis/src/class-identity-crisis.php 3 locations

@@ 723-743 (lines=21) @@
720
	 *
721
	 * @return string
722
	 */
723
	public function get_first_step_header_lead() {
724
		$html = wp_kses(
725
			sprintf(
726
			/* translators: %s: Safe mode docs URL and site URL. */
727
				__( 'Jetpack has been placed into <a href="%1$s">Safe mode</a> because we noticed this is an exact copy of <a href="%2$s">%3$s</a>.', 'jetpack' ),
728
				esc_url( self::get_safe_mod_doc_url() ),
729
				esc_url( self::$wpcom_home_url ),
730
				self::prepare_url_for_display( esc_url_raw( self::$wpcom_home_url ) )
731
			),
732
			array( 'a' => array( 'href' => array() ) )
733
		);
734
735
		/**
736
		 * Allows overriding of the default header text in the first step of the Safe Mode notice.
737
		 *
738
		 * @param string $html The HTML to be displayed.
739
		 *
740
		 * @since 4.4.0
741
		 */
742
		return apply_filters( 'jetpack_idc_first_step_header_lead', $html );
743
	}
744
745
	/**
746
	 * Returns the first step header explanation.
@@ 775-794 (lines=20) @@
772
	 *
773
	 * @return string
774
	 */
775
	public function get_confirm_safe_mode_action_explanation() {
776
		$html = wp_kses(
777
			sprintf(
778
			/* translators: %s: Site URL. */
779
				__( 'Is this website a temporary duplicate of <a href="%1$s">%2$s</a> for the purposes of testing, staging or development? If so, we recommend keeping it in Safe Mode.', 'jetpack' ),
780
				esc_url( untrailingslashit( self::$wpcom_home_url ) ),
781
				self::prepare_url_for_display( esc_url( self::$wpcom_home_url ) )
782
			),
783
			array( 'a' => array( 'href' => array() ) )
784
		);
785
786
		/**
787
		 * Allows overriding of the default text used to explain the confirm safe mode action.
788
		 *
789
		 * @param string $html The HTML to be displayed.
790
		 *
791
		 * @since 4.4.0
792
		 */
793
		return apply_filters( 'jetpack_idc_confirm_safe_mode_explanation', $html );
794
	}
795
796
	/**
797
	 * Returns the confirm safe mode button text.
@@ 819-838 (lines=20) @@
816
	 *
817
	 * @return string
818
	 */
819
	public function get_first_step_fix_connection_action_explanation() {
820
		$html = wp_kses(
821
			sprintf(
822
			/* translators: %s: Site URL. */
823
				__( 'If this is a separate and new website, or the new home of <a href="%1$s">%2$s</a>, we recommend turning Safe Mode off, and re-establishing your connection to WordPress.com.', 'jetpack' ),
824
				esc_url( untrailingslashit( self::$wpcom_home_url ) ),
825
				self::prepare_url_for_display( esc_url( self::$wpcom_home_url ) )
826
			),
827
			array( 'a' => array( 'href' => array() ) )
828
		);
829
830
		/**
831
		 * Allows overriding of the default text used to explain the fix Jetpack connection action.
832
		 *
833
		 * @param string $html The HTML to be displayed.
834
		 *
835
		 * @since 4.4.0
836
		 */
837
		return apply_filters( 'jetpack_idc_first_fix_connection_explanation', $html );
838
	}
839
840
	/**
841
	 * Returns the first step fix connection button text.