get_label();
}
/**
* @inheritdoc
*/
public function display() {
$options = Options::init();
?>
display_wpforms();
$this->display_pro_banner();
}
/**
* License key text for a Lite version of the plugin.
*
* @since 1.5.0
*
* @param Options $options
*/
public static function display_license_key_field_content( $options ) {
?>
🙂
upgrading to PRO .', 'wp-mail-smtp' ),
array(
'a' => array(
'href' => array(),
'class' => array(),
'target' => array(),
'rel' => array(),
),
'strong' => array(),
)
),
esc_url( wp_mail_smtp()->get_upgrade_link( 'general-license-key' ) )
);
?>
%s off, automatically applied at checkout!', 'wp-mail-smtp' ),
array(
'strong' => array(),
'br' => array(),
)
),
'$50'
);
?>
is_pro() ) {
return;
}
$is_dismissed = get_user_meta( get_current_user_id(), 'wp_mail_smtp_pro_banner_dismissed', true );
// Do not display if user dismissed.
if ( (bool) $is_dismissed === true ) {
return;
}
?>
Get WP Mail SMTP Pro Today and Unlock all the Powerful Features »', 'wp-mail-smtp' ),
array(
'a' => array(
'href' => array(),
'target' => array(),
'rel' => array(),
),
'strong' => array(),
)
),
esc_url( wp_mail_smtp()->get_upgrade_link( 'general-cta' ) )
);
?>
Bonus: WP Mail SMTP users get %s off regular price , automatically applied at checkout.', 'wp-mail-smtp' ),
array(
'strong' => array(),
'span' => array(
'class' => array(),
),
)
),
'$50'
);
?>
is_pro() ) {
return;
}
$upgrade_link_url = wp_mail_smtp()->get_upgrade_link(
[
'medium' => 'Backup Connection Settings',
'content' => 'Upgrade to WP Mail SMTP Pro Link',
]
);
?>
Upgrade to WP Mail SMTP Pro!', 'wp-mail-smtp' ),
esc_url( $upgrade_link_url )
),
[
'a' => [
'href' => [],
'rel' => [],
'target' => [],
],
]
);
?>
additional connection, you can select it here.', 'wp-mail-smtp' ),
add_query_arg(
[
'tab' => 'connections',
],
wp_mail_smtp()->get_admin()->get_admin_page_url()
)
),
[
'a' => [
'href' => [],
'target' => [],
'rel' => [],
],
]
);
?>
check_admin_referer();
$connection = wp_mail_smtp()->get_connections_manager()->get_primary_connection();
$connection_settings = new ConnectionSettings( $connection );
$old_data = $connection->get_options()->get_all();
$data = $connection_settings->process( $data, $old_data );
/**
* Filters mail settings before save.
*
* @since 2.2.1
*
* @param array $data Settings data.
*/
$data = apply_filters( 'wp_mail_smtp_settings_tab_process_post', $data );
// All the sanitization is done in Options class.
Options::init()->set( $data, false, false );
$connection_settings->post_process( $data, $old_data );
if ( $connection_settings->get_scroll_to() !== false ) {
// phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotValidated
wp_safe_redirect( sanitize_text_field( wp_unslash( $_POST['_wp_http_referer'] ) ) . $connection_settings->get_scroll_to() );
exit;
}
WP::add_admin_notice(
esc_html__( 'Settings were successfully saved.', 'wp-mail-smtp' ),
WP::ADMIN_NOTICE_SUCCESS
);
}
}