do_action( 'connect/before_message', $activation_state ) ?>
apply_filters( 'connect_error_esc_html', esc_html( $error ) ) ?>
is_plugin_update() ) {
echo $fs->apply_filters( 'connect-header', sprintf(
'
%s
',
esc_html( fs_text_inline( 'Never miss an important update', 'connect-header' ) )
) );
} else {
echo $fs->apply_filters( 'connect-header_on-update', sprintf(
'
%s
',
sprintf(
esc_html(
/* translators: %1$s: plugin name (e.g., "Awesome Plugin"); %2$s: version (e.g., "1.2.3") */
fs_text_inline('Thank you for updating to %1$s v%2$s!', 'connect-header_on-update' )
),
esc_html( $fs->get_plugin_name() ),
$fs->get_plugin_version()
)
) );
}
}
?>
apply_filters( 'pending_activation_message', sprintf(
/* translators: %s: name (e.g. Thanks John!) */
fs_text_inline( 'Thanks %s!', 'thanks-x', $slug ) . '
' .
fs_text_inline( 'You should receive a confirmation email for %s to your mailbox at %s. Please make sure you click the button in that email to %s.', 'pending-activation-message', $slug ),
$first_name,
'' . $fs->get_plugin_name() . '',
'' . $current_user->user_email . '',
fs_text_inline( 'complete the opt-in', 'complete-the-opt-in', $slug )
) );
} else if ( $require_license_key ) {
$button_label = fs_text_inline( 'Activate License', 'activate-license', $slug );
$message = $fs->apply_filters(
'connect-message_on-premium',
sprintf( fs_text_inline( 'Welcome to %s! To get started, please enter your license key:', 'thanks-for-purchasing', $slug ), '' . $fs->get_plugin_name() . '' ),
$first_name,
$fs->get_plugin_name()
);
} else {
$filter = 'connect_message';
if ( ! $fs->is_plugin_update() ) {
$default_optin_message = esc_html(
sprintf(
/* translators: %s: module type (plugin, theme, or add-on) */
fs_text_inline( 'Opt in to get email notifications for security & feature updates, educational content, and occasional offers, and to share some basic WordPress environment info. This will help us make the %s more compatible with your site and better at doing what you need it to.', 'connect-message', $slug ),
$fs->get_module_label( true )
)
);
} else {
// If Freemius was added on a plugin update, set different
// opt-in message.
/* translators: %s: module type (plugin, theme, or add-on) */
$default_optin_message = esc_html( sprintf( fs_text_inline( 'We have introduced this opt-in so you never miss an important update and help us make the %s more compatible with your site and better at doing what you need it to.', 'connect-message_on-update_why' ), $fs->get_module_label( true ) ) );
$default_optin_message .= '
' . esc_html( fs_text_inline( 'Opt in to get email notifications for security & feature updates, educational content, and occasional offers, and to share some basic WordPress environment info.', 'connect-message_on-update', $slug ) );
if ( $fs->is_enable_anonymous() ) {
$default_optin_message .= ' ' . esc_html( fs_text_inline( 'If you skip this, that\'s okay! %1$s will still work just fine.', 'connect-message_on-update_skip', $slug ) );
}
// If user customized the opt-in message on update, use
// that message. Otherwise, fallback to regular opt-in
// custom message if exists.
if ( $fs->has_filter( 'connect_message_on_update' ) ) {
$filter = 'connect_message_on_update';
}
}
$message = $fs->apply_filters(
$filter,
sprintf(
$default_optin_message,
'' . esc_html( $fs->get_plugin_name() ) . '',
'' . $current_user->user_login . '',
'' . $site_url . '',
$freemius_activation_terms_html
),
$first_name,
$fs->get_plugin_name(),
$current_user->user_login,
'' . $site_url . '',
$freemius_activation_terms_html,
true
);
}
if ( $is_network_upgrade_mode ) {
$network_integration_text = esc_html( fs_text_inline( 'We\'re excited to introduce the Freemius network-level integration.', 'connect_message_network_upgrade', $slug ) );
if ($is_premium_code){
$message = $network_integration_text . ' ' . sprintf( fs_text_inline( 'During the update process we detected %d site(s) that are still pending license activation.', 'connect_message_network_upgrade-premium', $slug ), count( $sites ) );
$message .= '
' . sprintf( fs_text_inline( 'If you\'d like to use the %s on those sites, please enter your license key below and click the activation button.', 'connect_message_network_upgrade-premium-activate-license', $slug ), $is_premium_only ? $fs->get_module_label( true ) : sprintf(
/* translators: %s: module type (plugin, theme, or add-on) */
fs_text_inline( "%s's paid features", 'x-paid-features', $slug ),
$fs->get_module_label( true )
) );
/* translators: %s: module type (plugin, theme, or add-on) */
$message .= ' ' . sprintf( fs_text_inline( 'Alternatively, you can skip it for now and activate the license later, in your %s\'s network-level Account page.', 'connect_message_network_upgrade-premium-skip-license', $slug ), $fs->get_module_label( true ) );
}else {
$message = $network_integration_text . ' ' . sprintf( fs_text_inline( 'During the update process we detected %s site(s) in the network that are still pending your attention.', 'connect_message_network_upgrade-free', $slug ), count( $sites ) ) . '
' . ( fs_starts_with( $message, $hey_x_text . '
' ) ? substr( $message, strlen( $hey_x_text . '
' ) ) : $message );
}
}
echo $message;
?>
do_action( 'connect/after_license_input', $activation_state );
?>
- %s',
$fs->get_text_inline( 'Yes', 'yes' ),
$fs->get_text_inline( 'send me security & feature updates, educational content and offers.', 'send-updates' )
);
$do_not_send_updates_text = sprintf(
'%s
- %s',
$fs->get_text_inline( 'No', 'no' ),
sprintf(
$fs->get_text_inline( 'do %sNOT%s send me security & feature updates, educational content and offers.', 'do-not-send-updates' ),
'
',
''
)
);
?>
$fs->get_id(),
'sites' => $sites,
'require_license_key' => $require_license_key
);
echo fs_get_template( 'partials/network-activation.php', $vars );
?>
do_action( 'connect/after_message', $activation_state ) ?>
is_permission_requested( 'newsletter' ) ) {
$permissions[] = $permission_manager->get_newsletter_permission();
}
$permissions = $permission_manager->get_permissions(
$require_license_key,
$permissions
);
if ( ! empty( $permissions ) ) : ?>