| @@ 469-490 (lines=22) @@ | ||
| 466 | return apply_filters( 'jetpack_idc_first_step_header_lead', $html ); |
|
| 467 | } |
|
| 468 | ||
| 469 | function get_first_step_header_explanation() { |
|
| 470 | $html = wp_kses( |
|
| 471 | sprintf( |
|
| 472 | __( |
|
| 473 | 'Please confirm Safe Mode or fix the Jetpack connection. Select one of the options below or <a href="%1$s">learn |
|
| 474 | more about Safe Mode</a>.', |
|
| 475 | 'jetpack' |
|
| 476 | ), |
|
| 477 | esc_url( self::get_safe_mod_doc_url() ) |
|
| 478 | ), |
|
| 479 | array( 'a' => array( 'href' => array() ) ) |
|
| 480 | ); |
|
| 481 | ||
| 482 | /** |
|
| 483 | * Allows overriding of the default header explanation text in the first step of the Safe Mode notice. |
|
| 484 | * |
|
| 485 | * @since 4.4.0 |
|
| 486 | * |
|
| 487 | * @param string $html The HTML to be displayed |
|
| 488 | */ |
|
| 489 | return apply_filters( 'jetpack_idc_first_step_header_explanation', $html ); |
|
| 490 | } |
|
| 491 | ||
| 492 | function get_confirm_safe_mode_action_explanation() { |
|
| 493 | $html = wp_kses( |
|
| @@ 664-684 (lines=21) @@ | ||
| 661 | return apply_filters( 'jetpack_idc_start_fresh_button_text', $string ); |
|
| 662 | } |
|
| 663 | ||
| 664 | function get_unsure_prompt() { |
|
| 665 | $html = wp_kses( |
|
| 666 | sprintf( |
|
| 667 | __( |
|
| 668 | 'Unsure what to do? <a href="%1$s">Read more about Jetpack Safe Mode</a>', |
|
| 669 | 'jetpack' |
|
| 670 | ), |
|
| 671 | esc_url( self::get_safe_mod_doc_url() ) |
|
| 672 | ), |
|
| 673 | array( 'a' => array( 'href' => array() ) ) |
|
| 674 | ); |
|
| 675 | ||
| 676 | /** |
|
| 677 | * Allows overriding of the default text using in the "Unsure what to do?" prompt. |
|
| 678 | * |
|
| 679 | * @since 4.4.0 |
|
| 680 | * |
|
| 681 | * @param string $html The HTML to be displayed |
|
| 682 | */ |
|
| 683 | return apply_filters( 'jetpack_idc_unsure_prompt', $html ); |
|
| 684 | } |
|
| 685 | ||
| 686 | function get_non_admin_notice_text() { |
|
| 687 | $html = wp_kses( |
|
| @@ 686-706 (lines=21) @@ | ||
| 683 | return apply_filters( 'jetpack_idc_unsure_prompt', $html ); |
|
| 684 | } |
|
| 685 | ||
| 686 | function get_non_admin_notice_text() { |
|
| 687 | $html = wp_kses( |
|
| 688 | sprintf( |
|
| 689 | __( |
|
| 690 | 'Jetpack has been placed into Safe Mode. Learn more about <a href="%1$s">Safe Mode</a>.', |
|
| 691 | 'jetpack' |
|
| 692 | ), |
|
| 693 | esc_url( self::get_safe_mod_doc_url() ) |
|
| 694 | ), |
|
| 695 | array( 'a' => array( 'href' => array() ) ) |
|
| 696 | ); |
|
| 697 | ||
| 698 | /** |
|
| 699 | * Allows overriding of the default text that is displayed to non-admin on the Jetpack admin page. |
|
| 700 | * |
|
| 701 | * @since 4.4.0 |
|
| 702 | * |
|
| 703 | * @param string $html The HTML to be displayed |
|
| 704 | */ |
|
| 705 | return apply_filters( 'jetpack_idc_non_admin_notice_text', $html ); |
|
| 706 | } |
|
| 707 | ||
| 708 | function get_non_admin_contact_admin_text() { |
|
| 709 | $string = esc_html__( 'An administrator of this site can take Jetpack out of Safe Mode.', 'jetpack' ); |
|
| @@ 557-575 (lines=19) @@ | ||
| 554 | * |
|
| 555 | * @return string |
|
| 556 | */ |
|
| 557 | public function get_first_step_header_explanation() { |
|
| 558 | $html = wp_kses( |
|
| 559 | sprintf( |
|
| 560 | /* translators: %s: Safe mode docs URL. */ |
|
| 561 | __( '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' ), |
|
| 562 | esc_url( self::get_safe_mod_doc_url() ) |
|
| 563 | ), |
|
| 564 | array( 'a' => array( 'href' => array() ) ) |
|
| 565 | ); |
|
| 566 | ||
| 567 | /** |
|
| 568 | * Allows overriding of the default header explanation text in the first step of the Safe Mode notice. |
|
| 569 | * |
|
| 570 | * @param string $html The HTML to be displayed. |
|
| 571 | * |
|
| 572 | * @since 4.4.0 |
|
| 573 | */ |
|
| 574 | return apply_filters( 'jetpack_idc_first_step_header_explanation', $html ); |
|
| 575 | } |
|
| 576 | ||
| 577 | /** |
|
| 578 | * Returns the confirm safe mode explanation. |
|
| @@ 785-803 (lines=19) @@ | ||
| 782 | * |
|
| 783 | * @return string |
|
| 784 | */ |
|
| 785 | public function get_unsure_prompt() { |
|
| 786 | $html = wp_kses( |
|
| 787 | sprintf( |
|
| 788 | /* translators: %s: Safe mode docs URL. */ |
|
| 789 | __( 'Unsure what to do? <a href="%1$s">Read more about Jetpack Safe Mode</a>', 'jetpack' ), |
|
| 790 | esc_url( self::get_safe_mod_doc_url() ) |
|
| 791 | ), |
|
| 792 | array( 'a' => array( 'href' => array() ) ) |
|
| 793 | ); |
|
| 794 | ||
| 795 | /** |
|
| 796 | * Allows overriding of the default text using in the "Unsure what to do?" prompt. |
|
| 797 | * |
|
| 798 | * @param string $html The HTML to be displayed. |
|
| 799 | * |
|
| 800 | * @since 4.4.0 |
|
| 801 | */ |
|
| 802 | return apply_filters( 'jetpack_idc_unsure_prompt', $html ); |
|
| 803 | } |
|
| 804 | ||
| 805 | /** |
|
| 806 | * Returns the non-admin notice text. |
|
| @@ 810-828 (lines=19) @@ | ||
| 807 | * |
|
| 808 | * @return string |
|
| 809 | */ |
|
| 810 | public function get_non_admin_notice_text() { |
|
| 811 | $html = wp_kses( |
|
| 812 | sprintf( |
|
| 813 | /* translators: %s: Safe mode docs URL. */ |
|
| 814 | __( 'Jetpack has been placed into Safe Mode. Learn more about <a href="%1$s">Safe Mode</a>.', 'jetpack' ), |
|
| 815 | esc_url( self::get_safe_mod_doc_url() ) |
|
| 816 | ), |
|
| 817 | array( 'a' => array( 'href' => array() ) ) |
|
| 818 | ); |
|
| 819 | ||
| 820 | /** |
|
| 821 | * Allows overriding of the default text that is displayed to non-admin on the Jetpack admin page. |
|
| 822 | * |
|
| 823 | * @param string $html The HTML to be displayed. |
|
| 824 | * |
|
| 825 | * @since 4.4.0 |
|
| 826 | */ |
|
| 827 | return apply_filters( 'jetpack_idc_non_admin_notice_text', $html ); |
|
| 828 | } |
|
| 829 | ||
| 830 | /** |
|
| 831 | * Returns the non-admin contact admin text. |
|