Safe mode because we noticed this is an exact copy of %3$s.',
'jetpack'
),
esc_url( self::SAFE_MODE_DOC_LINK ),
esc_url( self::$wpcom_home_url ),
self::prepare_url_for_display( esc_url_raw( self::$wpcom_home_url ) )
),
array( 'a' => array( 'href' => array() ) )
);
/**
* Allows overriding of the default header text in the first step of the Safe Mode notice.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_first_step_header_lead', $html );
}
function get_first_step_header_explanation() {
$html = wp_kses(
sprintf(
__(
'Please confirm Safe Mode or fix the Jetpack connection. Select one of the options below or learn
more about Safe Mode.',
'jetpack'
),
esc_url( self::SAFE_MODE_DOC_LINK )
),
array( 'a' => array( 'href' => array() ) )
);
/**
* Allows overriding of the default header explanation text in the first step of the Safe Mode notice.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_first_step_header_explanation', $html );
}
function get_confirm_safe_mode_action_explanation() {
$html = wp_kses(
sprintf(
__(
'Is this website a temporary duplicate of %2$s for the purposes
of testing, staging or development? If so, we recommend keeping it in Safe Mode.',
'jetpack'
),
esc_url( untrailingslashit( self::$wpcom_home_url ) ),
self::prepare_url_for_display( esc_url( self::$wpcom_home_url ) )
),
array( 'a' => array( 'href' => array() ) )
);
/**
* Allows overriding of the default text used to explain the confirm safe mode action.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_confirm_safe_mode_explanation', $html );
}
function get_confirm_safe_mode_button_text() {
$string = esc_html__( 'Confirm Safe Mode', 'jetpack' );
/**
* Allows overriding of the default text used for the confirm safe mode action button.
*
* @since 4.4.0
*
* @param string $string The string to be displayed
*/
return apply_filters( 'jetpack_idc_confirm_safe_mode_button_text', $string );
}
function get_first_step_fix_connection_action_explanation() {
$html = wp_kses(
sprintf(
__(
'If this is a separate and new website, or the new home of %2$s,
we recommend turning Safe Mode off, and re-establishing your connection to WordPress.com.',
'jetpack'
),
esc_url( untrailingslashit( self::$wpcom_home_url ) ),
self::prepare_url_for_display( esc_url( self::$wpcom_home_url ) )
),
array( 'a' => array( 'href' => array() ) )
);
/**
* Allows overriding of the default text used to explain the fix Jetpack connection action.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_first_fix_connection_explanation', $html );
}
function get_first_step_fix_connection_button_text() {
$string = esc_html__( "Fix Jetpack's Connection", 'jetpack' );
/**
* Allows overriding of the default text used for the fix Jetpack connection action button.
*
* @since 4.4.0
*
* @param string $string The string to be displayed
*/
return apply_filters( 'jetpack_idc_first_step_fix_connection_button_text', $string );
}
function get_second_step_header_lead() {
$string = sprintf(
esc_html__(
'Is %1$s the new home of %2$s?',
'jetpack'
),
untrailingslashit( Jetpack::normalize_url_protocol_agnostic( get_home_url() ) ),
untrailingslashit( Jetpack::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) )
);
/**
* Allows overriding of the default header text in the second step of the Safe Mode notice.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_second_step_header_lead', $string );
}
function get_migrate_site_action_explanation() {
$html = wp_kses(
sprintf(
__(
'Yes. %2$s is replacing %4$s. I would like to
migrate my stats and subscribers from %4$s to %2$s.',
'jetpack'
),
esc_url( get_home_url() ),
self::prepare_url_for_display( get_home_url() ),
esc_url( self::$wpcom_home_url ),
untrailingslashit( Jetpack::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) )
),
array( 'a' => array( 'href' => array() ) )
);
/**
* Allows overriding of the default text for explaining the migrate site action.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_migrate_site_explanation', $html );
}
function get_migrate_site_button_text() {
$string = esc_html__( 'Migrate Stats & Subscribers', 'jetpack' );
/**
* Allows overriding of the default text used for the migrate site action button.
*
* @since 4.4.0
*
* @param string $string The string to be displayed
*/
return apply_filters( 'jetpack_idc_migrate_site_button_text', $string );
}
function get_start_fresh_action_explanation() {
$html = wp_kses(
sprintf(
__(
'No. %2$s is a new and different website that\'s separate from
%4$s. It requires a new connection to WordPress.com for new stats and subscribers.',
'jetpack'
),
esc_url( get_home_url() ),
self::prepare_url_for_display( get_home_url() ),
esc_url( self::$wpcom_home_url ),
untrailingslashit( Jetpack::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) )
),
array( 'a' => array( 'href' => array() ) )
);
/**
* Allows overriding of the default text for explaining the start fresh action.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_start_fresh_explanation', $html );
}
function get_start_fresh_button_text() {
$string = esc_html__( 'Start Fresh & Create New Connection', 'jetpack' );
/**
* Allows overriding of the default text used for the start fresh action button.
*
* @since 4.4.0
*
* @param string $string The string to be displayed
*/
return apply_filters( 'jetpack_idc_start_fresh_button_text', $string );
}
function get_unsure_prompt() {
$html = wp_kses(
sprintf(
__(
'Unsure what to do? Read more about Jetpack Safe Mode',
'jetpack'
),
esc_url( self::SAFE_MODE_DOC_LINK )
),
array( 'a' => array( 'href' => array() ) )
);
/**
* Allows overriding of the default text using in the "Unsure what to do?" prompt.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_unsure_prompt', $html );
}
function get_non_admin_notice_text() {
$html = wp_kses(
sprintf(
__(
'Jetpack has been placed into Safe Mode. Learn more about Safe Mode.',
'jetpack'
),
esc_url( self::SAFE_MODE_DOC_LINK )
),
array( 'a' => array( 'href' => array() ) )
);
/**
* Allows overriding of the default text that is displayed to non-admin on the Jetpack admin page.
*
* @since 4.4.0
*
* @param string $html The HTML to be displayed
*/
return apply_filters( 'jetpack_idc_non_admin_notice_text', $html );
}
function get_non_admin_contact_admin_text() {
$string = esc_html__( 'An administrator of this site can take Jetpack out of Safe Mode.', 'jetpack' );
/**
* Allows overriding of the default text that is displayed to non-admins prompting them to contact an admin.
*
* @since 4.4.0
*
* @param string $string The string to be displayed
*/
return apply_filters( 'jetpack_idc_non_admin_contact_admin_text', $string );
}
}
Jetpack_IDC::init();