Code Duplication    Length = 19-22 lines in 6 locations

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

@@ 729-747 (lines=19) @@
726
	 *
727
	 * @return string
728
	 */
729
	public function get_first_step_header_explanation() {
730
		$html = wp_kses(
731
			sprintf(
732
			/* translators: %s: Safe mode docs URL. */
733
				__( 'Please confirm Safe Mode or fix the Jetpack connection. Select one of the options below or <a href="%1$s">learn more about Safe Mode</a>.', 'jetpack' ),
734
				esc_url( self::get_safe_mod_doc_url() )
735
			),
736
			array( 'a' => array( 'href' => array() ) )
737
		);
738
739
		/**
740
		 * Allows overriding of the default header explanation text in the first step of the Safe Mode notice.
741
		 *
742
		 * @param string $html The HTML to be displayed.
743
		 *
744
		 * @since 4.4.0
745
		 */
746
		return apply_filters( 'jetpack_idc_first_step_header_explanation', $html );
747
	}
748
749
	/**
750
	 * Returns the confirm safe mode explanation.
@@ 957-975 (lines=19) @@
954
	 *
955
	 * @return string
956
	 */
957
	public function get_unsure_prompt() {
958
		$html = wp_kses(
959
			sprintf(
960
			/* translators: %s: Safe mode docs URL. */
961
				__( 'Unsure what to do? <a href="%1$s">Read more about Jetpack Safe Mode</a>', 'jetpack' ),
962
				esc_url( self::get_safe_mod_doc_url() )
963
			),
964
			array( 'a' => array( 'href' => array() ) )
965
		);
966
967
		/**
968
		 * Allows overriding of the default text using in the "Unsure what to do?" prompt.
969
		 *
970
		 * @param string $html The HTML to be displayed.
971
		 *
972
		 * @since 4.4.0
973
		 */
974
		return apply_filters( 'jetpack_idc_unsure_prompt', $html );
975
	}
976
977
	/**
978
	 * Returns the non-admin notice text.
@@ 982-1000 (lines=19) @@
979
	 *
980
	 * @return string
981
	 */
982
	public function get_non_admin_notice_text() {
983
		$html = wp_kses(
984
			sprintf(
985
			/* translators: %s: Safe mode docs URL. */
986
				__( 'Jetpack has been placed into Safe Mode. Learn more about <a href="%1$s">Safe Mode</a>.', 'jetpack' ),
987
				esc_url( self::get_safe_mod_doc_url() )
988
			),
989
			array( 'a' => array( 'href' => array() ) )
990
		);
991
992
		/**
993
		 * Allows overriding of the default text that is displayed to non-admin on the Jetpack admin page.
994
		 *
995
		 * @param string $html The HTML to be displayed.
996
		 *
997
		 * @since 4.4.0
998
		 */
999
		return apply_filters( 'jetpack_idc_non_admin_notice_text', $html );
1000
	}
1001
1002
	/**
1003
	 * Returns the non-admin contact admin text.

projects/plugins/jetpack/class.jetpack-idc.php 3 locations

@@ 473-494 (lines=22) @@
470
		return apply_filters( 'jetpack_idc_first_step_header_lead', $html );
471
	}
472
473
	function get_first_step_header_explanation() {
474
		$html = wp_kses(
475
			sprintf(
476
				__(
477
					'Please confirm Safe Mode or fix the Jetpack connection. Select one of the options below or <a href="%1$s">learn
478
					more about Safe Mode</a>.',
479
					'jetpack'
480
				),
481
				esc_url( self::get_safe_mod_doc_url() )
482
			),
483
			array( 'a' => array( 'href' => array() ) )
484
		);
485
486
		/**
487
		 * Allows overriding of the default header explanation text in the first step of the Safe Mode notice.
488
		 *
489
		 * @since 4.4.0
490
		 *
491
		 * @param string $html The HTML to be displayed
492
		 */
493
		return apply_filters( 'jetpack_idc_first_step_header_explanation', $html );
494
	}
495
496
	function get_confirm_safe_mode_action_explanation() {
497
		$html = wp_kses(
@@ 668-688 (lines=21) @@
665
		return apply_filters( 'jetpack_idc_start_fresh_button_text', $string );
666
	}
667
668
	function get_unsure_prompt() {
669
		$html = wp_kses(
670
			sprintf(
671
				__(
672
					'Unsure what to do? <a href="%1$s">Read more about Jetpack Safe Mode</a>',
673
					'jetpack'
674
				),
675
				esc_url( self::get_safe_mod_doc_url() )
676
			),
677
			array( 'a' => array( 'href' => array() ) )
678
		);
679
680
		/**
681
		 * Allows overriding of the default text using in the "Unsure what to do?" prompt.
682
		 *
683
		 * @since 4.4.0
684
		 *
685
		 * @param string $html The HTML to be displayed
686
		 */
687
		return apply_filters( 'jetpack_idc_unsure_prompt', $html );
688
	}
689
690
	function get_non_admin_notice_text() {
691
		$html = wp_kses(
@@ 690-710 (lines=21) @@
687
		return apply_filters( 'jetpack_idc_unsure_prompt', $html );
688
	}
689
690
	function get_non_admin_notice_text() {
691
		$html = wp_kses(
692
			sprintf(
693
				__(
694
					'Jetpack has been placed into Safe Mode. Learn more about <a href="%1$s">Safe Mode</a>.',
695
					'jetpack'
696
				),
697
				esc_url( self::get_safe_mod_doc_url() )
698
			),
699
			array( 'a' => array( 'href' => array() ) )
700
		);
701
702
		/**
703
		 * Allows overriding of the default text that is displayed to non-admin on the Jetpack admin page.
704
		 *
705
		 * @since 4.4.0
706
		 *
707
		 * @param string $html The HTML to be displayed
708
		 */
709
		return apply_filters( 'jetpack_idc_non_admin_notice_text', $html );
710
	}
711
712
	function get_non_admin_contact_admin_text() {
713
		$string = esc_html__( 'An administrator of this site can take Jetpack out of Safe Mode.', 'jetpack' );