| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
/** |
| 7 |
* SMTP Sub-page. |
| 8 |
* |
| 9 |
* @since 4.04.04 |
| 10 |
*/ |
| 11 |
class FrmSMTPController { |
| 12 |
|
| 13 |
/** |
| 14 |
* Admin menu page slug. |
| 15 |
* |
| 16 |
* @since 4.04.04 |
| 17 |
* |
| 18 |
* @var string |
| 19 |
*/ |
| 20 |
private $slug = 'formidable-smtp'; |
| 21 |
|
| 22 |
/** |
| 23 |
* @since 4.04.04 |
| 24 |
* |
| 25 |
* @var array |
| 26 |
*/ |
| 27 |
private $config = array( |
| 28 |
'lite_plugin' => 'wp-mail-smtp/wp_mail_smtp.php', |
| 29 |
'lite_download_url' => 'https://downloads.wordpress.org/plugin/wp-mail-smtp.zip', |
| 30 |
'pro_plugin' => 'wp-mail-smtp-pro/wp_mail_smtp.php', |
| 31 |
'smtp_settings' => 'admin.php?page=wp-mail-smtp', |
| 32 |
); |
| 33 |
|
| 34 |
/** |
| 35 |
* Runtime data used for generating page HTML. |
| 36 |
* |
| 37 |
* @since 4.04.04 |
| 38 |
* |
| 39 |
* @var array |
| 40 |
*/ |
| 41 |
private $output_data = array(); |
| 42 |
|
| 43 |
/** |
| 44 |
* Hooks. |
| 45 |
* |
| 46 |
* @since 4.04.04 |
| 47 |
* |
| 48 |
* @return void |
| 49 |
*/ |
| 50 |
public static function load_hooks() { |
| 51 |
add_filter( 'wp_mail_smtp_is_white_labeled', '__return_true' ); |
| 52 |
|
| 53 |
$self = new self(); |
| 54 |
|
| 55 |
if ( wp_doing_ajax() ) { |
| 56 |
add_action( 'wp_ajax_frm_smtp_page_check_plugin_status', array( $self, 'ajax_check_plugin_status' ) ); |
| 57 |
} |
| 58 |
|
| 59 |
add_filter( 'wp_mail_smtp_core_get_upgrade_link', array( $self, 'link' ) ); |
| 60 |
add_action( 'admin_menu', array( $self, 'menu' ), 999 ); |
| 61 |
add_action( 'wp_mail_smtp_core_recommendations_plugins', 'FrmSMTPController::remove_wpforms_nag' ); |
| 62 |
|
| 63 |
// Only load if we are actually on the SMTP page. |
| 64 |
if ( ! FrmAppHelper::is_admin_page( $self->slug ) ) { |
| 65 |
return; |
| 66 |
} |
| 67 |
|
| 68 |
add_action( 'admin_init', array( $self, 'redirect_to_smtp_settings' ) ); |
| 69 |
|
| 70 |
// Hook for addons. |
| 71 |
do_action( 'frm_admin_pages_smtp_hooks' ); |
| 72 |
} |
| 73 |
|
| 74 |
/** |
| 75 |
* Customize the upgrade link. |
| 76 |
* |
| 77 |
* @param string $link |
| 78 |
* |
| 79 |
* @return string |
| 80 |
*/ |
| 81 |
public function link( $link ) { |
| 82 |
$new_link = 'formidableforms.com/go-wp-mail-smtp/?urllink=wpmailsmtp%2Ecom%2Flite%2Dupgrade&'; |
| 83 |
return str_replace( 'wpmailsmtp.com/lite-upgrade/?', $new_link, $link ); |
| 84 |
} |
| 85 |
|
| 86 |
/** |
| 87 |
* Don't nag people to install WPForms |
| 88 |
* |
| 89 |
* @since 4.04.04 |
| 90 |
* |
| 91 |
* @param array $upsell |
| 92 |
* |
| 93 |
* @return array |
| 94 |
*/ |
| 95 |
public static function remove_wpforms_nag( $upsell ) { |
| 96 |
if ( is_array( $upsell ) ) { |
| 97 |
foreach ( $upsell as $k => $plugin ) { |
| 98 |
if ( str_contains( $plugin['slug'], 'wpforms' ) ) { |
| 99 |
unset( $upsell[ $k ] ); |
| 100 |
} |
| 101 |
} |
| 102 |
} |
| 103 |
|
| 104 |
return $upsell; |
| 105 |
} |
| 106 |
|
| 107 |
/** |
| 108 |
* SMTP submenu page. |
| 109 |
* |
| 110 |
* @return void |
| 111 |
*/ |
| 112 |
public function menu() { |
| 113 |
add_submenu_page( 'formidable', __( 'SMTP', 'formidable' ) . ' | Formidable', __( 'SMTP', 'formidable' ), 'activate_plugins', $this->slug, array( $this, 'output' ) ); |
| 114 |
} |
| 115 |
|
| 116 |
/** |
| 117 |
* Generate and output page HTML. |
| 118 |
* |
| 119 |
* @since 4.04.04 |
| 120 |
* |
| 121 |
* @return void |
| 122 |
*/ |
| 123 |
public function output() { |
| 124 |
FrmAppHelper::include_svg(); |
| 125 |
$this->css(); |
| 126 |
|
| 127 |
echo '<div id="frm-admin-smtp" class="wrap frm-wrap frm-admin-plugin-landing">'; |
| 128 |
|
| 129 |
$this->output_section_heading(); |
| 130 |
$this->output_section_screenshot(); |
| 131 |
$this->output_section_step_install(); |
| 132 |
$this->output_section_step_setup(); |
| 133 |
|
| 134 |
echo '</div>'; |
| 135 |
} |
| 136 |
|
| 137 |
/** |
| 138 |
* Generate and output heading section HTML. |
| 139 |
* |
| 140 |
* @since 4.04.04 |
| 141 |
* |
| 142 |
* @return void |
| 143 |
*/ |
| 144 |
protected function output_section_heading() { |
| 145 |
$size = array( |
| 146 |
'height' => 90, |
| 147 |
'width' => 90, |
| 148 |
); |
| 149 |
|
| 150 |
// Heading section. |
| 151 |
// phpcs:disable Generic.WhiteSpace.ScopeIndent |
| 152 |
?> |
| 153 |
<section class="top"> |
| 154 |
<div class="frm-smtp-logos"> |
| 155 |
<?php |
| 156 |
FrmAppHelper::show_logo( $size ); |
| 157 |
FrmAppHelper::icon_by_class( |
| 158 |
'frmfont frm_heart_solid_icon', |
| 159 |
array( |
| 160 |
'aria-label' => 'Loves', |
| 161 |
'style' => 'width:30px;height:30px;margin:0 35px;', |
| 162 |
'color' => '#d11c25', |
| 163 |
) |
| 164 |
); |
| 165 |
$this->stmp_logo(); |
| 166 |
?> |
| 167 |
</div> |
| 168 |
<h1><?php esc_html_e( 'Making Email Deliverability Easy for WordPress', 'formidable' ); ?></h1> |
| 169 |
<p><?php esc_html_e( 'WP Mail SMTP allows you to easily set up WordPress to use a trusted provider to reliably send emails, including form notifications.', 'formidable' ); ?></p><?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?> |
| 170 |
</section> |
| 171 |
<?php |
| 172 |
// phpcs:enable Generic.WhiteSpace.ScopeIndent |
| 173 |
} |
| 174 |
|
| 175 |
/** |
| 176 |
* Generate and output screenshot section HTML. |
| 177 |
* |
| 178 |
* @since 4.04.04 |
| 179 |
* |
| 180 |
* @return void |
| 181 |
*/ |
| 182 |
protected function output_section_screenshot() { |
| 183 |
printf( |
| 184 |
'<section class="screenshot"> |
| 185 |
<div class="cont"> |
| 186 |
<img src="%1$s" alt="%2$s"/> |
| 187 |
</div> |
| 188 |
<ul> |
| 189 |
<li>%3$s %4$s</li> |
| 190 |
<li>%3$s %5$s</li> |
| 191 |
<li>%3$s %6$s</li> |
| 192 |
<li>%3$s %7$s</li> |
| 193 |
</ul> |
| 194 |
</section>', |
| 195 |
esc_url( FrmAppHelper::plugin_url() . '/images/smtp-screenshot-tnail.png' ), |
| 196 |
esc_attr__( 'WP Mail SMTP screenshot', 'formidable' ), |
| 197 |
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 492 492" width="14" height="14"><path d="M484 227L306 49a27 27 0 00-38 0l-16 16a27 27 0 000 38l104 105H27c-15 0-27 11-27 26v23c0 15 12 27 27 27h330L252 389a27 27 0 000 38l16 16a27 27 0 0038 0l178-178a27 27 0 000-38z" fill="#5bbfa5"/></svg> ', // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong |
| 198 |
esc_html__( 'Over 1,000,000 websites use WP Mail SMTP.', 'formidable' ), |
| 199 |
esc_html__( 'Send emails authenticated via trusted parties.', 'formidable' ), |
| 200 |
esc_html__( 'Transactional Mailers: Pepipost, SendinBlue, Mailgun, SendGrid, Amazon SES.', 'formidable' ), |
| 201 |
esc_html__( 'Web Mailers: Gmail, G Suite, Office 365, Outlook.com.', 'formidable' ) |
| 202 |
); |
| 203 |
} |
| 204 |
|
| 205 |
/** |
| 206 |
* Generate and output step 'Install' section HTML. |
| 207 |
* |
| 208 |
* @since 4.04.04 |
| 209 |
* |
| 210 |
* @return void |
| 211 |
*/ |
| 212 |
protected function output_section_step_install() { |
| 213 |
$step = $this->get_data_step_install(); |
| 214 |
|
| 215 |
if ( ! $step ) { |
| 216 |
return; |
| 217 |
} |
| 218 |
|
| 219 |
$icon = FrmAppHelper::icon_by_class( |
| 220 |
'frmfont ' . $step['icon'], |
| 221 |
array( |
| 222 |
'aria-label' => __( 'Step 1', 'formidable' ), |
| 223 |
'echo' => false, |
| 224 |
'style' => 'width:50px;height:50px;', |
| 225 |
) |
| 226 |
); |
| 227 |
|
| 228 |
/* translators: %s: Name of the plugin */ |
| 229 |
$label = sprintf( __( 'Install and Activate %s', 'formidable' ), 'WP Mail SMTP' ); |
| 230 |
|
| 231 |
printf( |
| 232 |
'<section class="step step-install"> |
| 233 |
<aside class="num"> |
| 234 |
%1$s |
| 235 |
<i class="loader hidden"></i> |
| 236 |
</aside> |
| 237 |
<div> |
| 238 |
<h2>%2$s</h2> |
| 239 |
<p>%3$s</p> |
| 240 |
<span><a rel="%4$s" class="button button-primary frm-button-primary %5$s" aria-label="%6$s">%7$s</a></span> |
| 241 |
</div> |
| 242 |
</section>', |
| 243 |
FrmAppHelper::kses( $icon, array( 'a', 'i', 'span', 'use', 'svg' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 244 |
esc_html( $label ), |
| 245 |
esc_html__( 'Install WP Mail SMTP from the WordPress.org plugin repository.', 'formidable' ), |
| 246 |
esc_attr( $step['plugin'] ), |
| 247 |
esc_attr( $step['button_class'] ), |
| 248 |
esc_attr( $step['button_action'] ), |
| 249 |
esc_html( $step['button_text'] ) |
| 250 |
); |
| 251 |
} |
| 252 |
|
| 253 |
/** |
| 254 |
* Generate and output step 'Setup' section HTML. |
| 255 |
* |
| 256 |
* @since 4.04.04 |
| 257 |
* |
| 258 |
* @return void |
| 259 |
*/ |
| 260 |
protected function output_section_step_setup() { |
| 261 |
$step = $this->get_data_step_setup(); |
| 262 |
|
| 263 |
if ( ! $step ) { |
| 264 |
return; |
| 265 |
} |
| 266 |
|
| 267 |
$icon = FrmAppHelper::icon_by_class( |
| 268 |
'frmfont ' . $step['icon'], |
| 269 |
array( |
| 270 |
'aria-label' => __( 'Step 2', 'formidable' ), |
| 271 |
'echo' => false, |
| 272 |
'style' => 'width:50px;height:50px;', |
| 273 |
) |
| 274 |
); |
| 275 |
|
| 276 |
printf( |
| 277 |
'<section class="step step-setup %1$s"> |
| 278 |
<aside class="num"> |
| 279 |
%2$s |
| 280 |
<i class="loader hidden"></i> |
| 281 |
</aside> |
| 282 |
<div> |
| 283 |
<h2>%3$s</h2> |
| 284 |
<p>%4$s</p> |
| 285 |
<span><a href="%5$s" class="button button-primary frm-button-primary %6$s">%7$s</a></span> |
| 286 |
</div> |
| 287 |
</section>', |
| 288 |
esc_attr( $step['section_class'] ), |
| 289 |
FrmAppHelper::kses( $icon, array( 'a', 'i', 'span', 'use', 'svg' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 290 |
esc_html__( 'Set Up WP Mail SMTP', 'formidable' ), |
| 291 |
esc_html__( 'Select and configure your mailer.', 'formidable' ), |
| 292 |
esc_url( admin_url( $this->config['smtp_settings'] ) ), |
| 293 |
esc_attr( $step['button_class'] ), |
| 294 |
esc_html( $step['button_text'] ) |
| 295 |
); |
| 296 |
} |
| 297 |
|
| 298 |
/** |
| 299 |
* Step 'Install' data. |
| 300 |
* |
| 301 |
* @since 4.04.04 |
| 302 |
* |
| 303 |
* @return array Step data. |
| 304 |
*/ |
| 305 |
protected function get_data_step_install() { |
| 306 |
$lite_plugin = new FrmInstallPlugin( array( 'plugin_file' => $this->config['lite_plugin'] ) ); |
| 307 |
$pro_plugin = new FrmInstallPlugin( array( 'plugin_file' => $this->config['pro_plugin'] ) ); |
| 308 |
|
| 309 |
$this->output_data['plugin_installed'] = $lite_plugin->is_installed(); |
| 310 |
$this->output_data['pro_plugin_installed'] = $pro_plugin->is_installed(); |
| 311 |
$this->output_data['plugin_activated'] = false; |
| 312 |
$this->output_data['plugin_setup'] = false; |
| 313 |
|
| 314 |
$step = array( |
| 315 |
'icon' => 'frm_step1_icon', |
| 316 |
'button_action' => '', |
| 317 |
); |
| 318 |
|
| 319 |
$is_installed = $this->output_data['plugin_installed'] || $this->output_data['pro_plugin_installed']; |
| 320 |
|
| 321 |
if ( ! $is_installed ) { |
| 322 |
// Return the download url. |
| 323 |
$step['button_text'] = __( 'Install WP Mail SMTP', 'formidable' ); |
| 324 |
$step['button_class'] = 'frm-install-addon'; |
| 325 |
$step['button_action'] = __( 'Install', 'formidable' ); |
| 326 |
$step['plugin'] = $this->config['lite_download_url']; |
| 327 |
return $step; |
| 328 |
} |
| 329 |
|
| 330 |
$this->output_data['plugin_activated'] = $this->is_smtp_activated(); |
| 331 |
$this->output_data['plugin_setup'] = $this->is_smtp_configured(); |
| 332 |
|
| 333 |
$step['plugin'] = $this->output_data['pro_plugin_installed'] ? $this->config['pro_plugin'] : $this->config['lite_plugin']; |
| 334 |
|
| 335 |
if ( $this->output_data['plugin_activated'] ) { |
| 336 |
$step['icon'] = 'frm_step_complete_icon'; |
| 337 |
$step['button_text'] = __( 'WP Mail SMTP Installed & Activated', 'formidable' ); |
| 338 |
$step['button_class'] = 'grey disabled'; |
| 339 |
} else { |
| 340 |
$step['button_text'] = __( 'Activate WP Mail SMTP', 'formidable' ); |
| 341 |
$step['button_class'] = 'frm-activate-addon'; |
| 342 |
$step['button_action'] = __( 'Activate', 'formidable' ); |
| 343 |
} |
| 344 |
|
| 345 |
return $step; |
| 346 |
} |
| 347 |
|
| 348 |
/** |
| 349 |
* Step 'Setup' data. |
| 350 |
* |
| 351 |
* @since 4.04.04 |
| 352 |
* |
| 353 |
* @return array Step data. |
| 354 |
*/ |
| 355 |
protected function get_data_step_setup() { |
| 356 |
$step = array(); |
| 357 |
|
| 358 |
$step['icon'] = 'frm_step2_icon'; |
| 359 |
$step['section_class'] = $this->output_data['plugin_activated'] ? '' : 'grey'; |
| 360 |
$step['button_text'] = esc_html__( 'Start Setup', 'formidable' ); |
| 361 |
$step['button_class'] = 'grey disabled'; |
| 362 |
|
| 363 |
if ( $this->output_data['plugin_setup'] ) { |
| 364 |
$step['icon'] = 'frm_step_complete_icon'; |
| 365 |
$step['section_class'] = ''; |
| 366 |
$step['button_text'] = esc_html__( 'Go to SMTP settings', 'formidable' ); |
| 367 |
} elseif ( $this->output_data['plugin_activated'] ) { |
| 368 |
$step['button_class'] = ''; |
| 369 |
} |
| 370 |
|
| 371 |
return $step; |
| 372 |
} |
| 373 |
|
| 374 |
/** |
| 375 |
* Whether WP Mail SMTP plugin configured or not. |
| 376 |
* |
| 377 |
* @since 4.04.04 |
| 378 |
* |
| 379 |
* @return bool True if some mailer is selected and configured properly. |
| 380 |
*/ |
| 381 |
protected function is_smtp_configured() { |
| 382 |
if ( ! $this->is_smtp_activated() ) { |
| 383 |
return false; |
| 384 |
} |
| 385 |
|
| 386 |
$mailer = WPMailSMTP\Options::init()->get( 'mail', 'mailer' ); |
| 387 |
$is_mailer_complete = wp_mail_smtp()->get_providers()->get_mailer( $mailer, $this->get_phpmailer() )->is_mailer_complete(); |
| 388 |
|
| 389 |
return 'mail' !== $mailer && $is_mailer_complete; |
| 390 |
} |
| 391 |
|
| 392 |
/** |
| 393 |
* Whether WP Mail SMTP plugin active or not. |
| 394 |
* |
| 395 |
* @since 4.04.04 |
| 396 |
* |
| 397 |
* @return bool True if SMTP plugin is active. |
| 398 |
*/ |
| 399 |
protected function is_smtp_activated() { |
| 400 |
return function_exists( 'wp_mail_smtp' ) && ( is_plugin_active( $this->config['lite_plugin'] ) || is_plugin_active( $this->config['pro_plugin'] ) ); |
| 401 |
} |
| 402 |
|
| 403 |
/** |
| 404 |
* Get $phpmailer instance. |
| 405 |
* |
| 406 |
* @since 4.04.04 |
| 407 |
* |
| 408 |
* @return PHPMailer|\WPMailSMTP\Providers\MailCatcherInterface Instance of PHPMailer. |
| 409 |
*/ |
| 410 |
protected function get_phpmailer() { |
| 411 |
global $phpmailer; |
| 412 |
|
| 413 |
if ( is_object( $phpmailer ) && is_a( $phpmailer, 'PHPMailer' ) ) { |
| 414 |
return $phpmailer; |
| 415 |
} |
| 416 |
|
| 417 |
if ( is_callable( array( wp_mail_smtp(), 'generate_mail_catcher' ) ) ) { |
| 418 |
$phpmailer = wp_mail_smtp()->generate_mail_catcher( true ); // phpcs:ignore |
| 419 |
} else { |
| 420 |
require_once ABSPATH . WPINC . '/class-phpmailer.php'; |
| 421 |
$phpmailer = new PHPMailer( true ); // phpcs:ignore |
| 422 |
} |
| 423 |
|
| 424 |
return $phpmailer; |
| 425 |
} |
| 426 |
|
| 427 |
/** |
| 428 |
* Redirect to SMTP settings page if it is activated.. |
| 429 |
* |
| 430 |
* @since 4.04.04 |
| 431 |
* |
| 432 |
* @return void |
| 433 |
*/ |
| 434 |
public function redirect_to_smtp_settings() { |
| 435 |
if ( $this->is_smtp_configured() ) { |
| 436 |
wp_safe_redirect( admin_url( $this->config['smtp_settings'] ) ); |
| 437 |
exit; |
| 438 |
} |
| 439 |
} |
| 440 |
|
| 441 |
/** |
| 442 |
* @return void |
| 443 |
*/ |
| 444 |
private function stmp_logo() { |
| 445 |
// phpcs:disable Generic.WhiteSpace.ScopeIndent |
| 446 |
?> |
| 447 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" height="90" width="90"><defs><style>.cls-11,.cls-12{fill-rule:evenodd}.cls-4{fill:none}.cls-11{fill:#86a196}.cls-12{fill:#fff}</style></defs><path class="cls-4" d="M-6.3 0h60v60h-60z"/><path d="M16.7 8.1a15.4 15.4 0 00-8 10.2 23.5 23.5 0 1030 0 15.4 15.4 0 00-9.3-10.8 3.4 3.4 0 00-2.1-2.7A4.6 4.6 0 0018.4 3a24.4 24.4 0 00-1.7 5z" fill="#395360" fill-rule="evenodd"/><path fill="#fbaa6f" d="M18 26h12v14H18z"/><path d="M25.9 33.2l-.1-.1a1.4 1.4 0 111.6-2.3 1.9 1.9 0 00-1.2.8 1.9 1.9 0 00-.3 1.6zm-4.5 0a1.8 1.8 0 00-.4-1.6 2 2 0 00-1.2-.8 1.4 1.4 0 011.6 2.3zm7.2-3.2h.5l-1 4.8-2.2 6.5h-4.3l-3.2-5.4 1.1-3.2 2.1 2.7c.6.5 2.7.5 3.8-.6a26.2 26.2 0 003.2-4.8z" fill="#dc7f3c" fill-rule="evenodd"/><path d="M9.7 29H15v-9h-4a13 13 0 017.4-10q1.2-5 2.8-6.8l.1-.1.1-.1a2.3 2.3 0 011.1-.5 2.3 2.3 0 012.2 3.8 1.6 1.6 0 01-.4.3A15 15 0 0023 8a5 5 0 013-1.5 1.4 1.4 0 01.7.2 1.3 1.3 0 01.5 1.8 1.3 1.3 0 01-.6.6 13 13 0 0110.1 11l.1.8H33v8h4.8l1.8 13.4q-6.3 4-15.8 4T8 42.4zM25 38.4q3.8-6.4 3.8-7.6c0-2.2-3.2-4-4.8-4s-4.9 1.7-4.9 4q0 1.2 3.8 7.6a1.2 1.2 0 001 .6 1 1 0 001-.6z" fill="#bdcfc8" fill-rule="evenodd"/><path class="cls-4" d="M19 31h9.6L27 47.2h-6.4l-1.6-16z"/><path d="M39.8 48.8a20 20 0 01-32 0l.8-6a2.7 2.7 0 001 .1 2.8 2.8 0 002.8-2.4v1.2a2.8 2.8 0 005.6 0v1.6a2.9 2.9 0 005.7 0 2.8 2.8 0 005.7 0v-1.6a2.8 2.8 0 105.7 0v-1.2A2.8 2.8 0 0038 43a2.9 2.9 0 001-.2l.8 6z" fill="#809eb0" fill-rule="evenodd"/><path d="M8.3 44.6l.3-1.8a2.7 2.7 0 001 .2 2.8 2.8 0 002.8-2.5v1.2a2.8 2.8 0 005.7 0v1.7a2.9 2.9 0 005.6 0 2.8 2.8 0 005.7 0v-1.7a2.8 2.8 0 105.7 0v-1.2A2.8 2.8 0 0038 43a2.9 2.9 0 001-.2l.3 2a2.9 2.9 0 01-4.1-2.2v1.2a2.8 2.8 0 11-5.7 0v1.6a2.8 2.8 0 01-5.7 0 2.9 2.9 0 01-5.7 0v-1.7a2.8 2.8 0 01-5.7 0v-1.2A2.8 2.8 0 019.6 45a2.9 2.9 0 01-1.3-.3z" fill="#738e9e" fill-rule="evenodd"/><path class="cls-11" d="M37.8 22.4c-1-2.9-3-4.7-4.7-4.5-2.2.2-2.8 3.7-2.3 8s1.7 7.5 3.9 7.3 4-3.9 3.6-8c0 1.2-.5 2.3-1.3 2.4-1.2 0-1.5-1.2-1.6-2.9s-.2-3 1-3a1.5 1.5 0 011.4.7z"/><path class="cls-12" d="M37 21.8c-.6-1.3-1.5-2-2.4-1.9-1.5.1-1.9 2.6-1.6 5.5s1.2 5.1 2.7 5c1.1-.2 2-1.5 2.2-3.4a1.2 1.2 0 01-1 .6c-1 0-1.4-1.2-1.5-2.9s-.1-3 1-3a1.6 1.6 0 01.6 0z"/><path class="cls-11" d="M9.6 22.4c1-2.9 3-4.7 4.7-4.5 2.2.2 2.8 3.7 2.3 8s-1.7 7.5-3.9 7.3-4-3.9-3.7-8c.1 1.2.5 2.3 1.4 2.4 1.1 0 1.5-1.2 1.6-2.9s.1-3-1-3a1.5 1.5 0 00-1.4.7z"/><path class="cls-12" d="M10.4 21.8c.6-1.3 1.5-2 2.4-1.9 1.5.1 1.8 2.6 1.5 5.5s-1.1 5.1-2.6 5c-1.1-.2-2-1.5-2.2-3.4a1.2 1.2 0 00.9.6c1.1 0 1.4-1.2 1.6-2.9s.1-3-1-3a1.7 1.7 0 00-.7 0z"/><path d="M19 28.6a5.3 5.3 0 010-.7c0-2.4 1.2-5.2 4.9-5.2s4.8 2.8 4.8 5.2a4.4 4.4 0 010 1c-.9-1.3-2.4-2.1-4.9-2.1-2.4 0-3.9.7-4.8 1.8z" fill="#f4f8ff" fill-rule="evenodd"/><path class="cls-11" d="M26.5 9.2L23.3 9l4-1.2a1.4 1.4 0 01-.8 1.4zm-3.5-1l-1.3 1a16.8 16.8 0 002-3.8 6.6 6.6 0 00.3-2.7A2.4 2.4 0 0125.2 5a2.4 2.4 0 01-.7 1.5A15 15 0 0023 8.1z"/></svg><?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?> |
| 448 |
<?php |
| 449 |
// phpcs:enable Generic.WhiteSpace.ScopeIndent |
| 450 |
} |
| 451 |
|
| 452 |
/** |
| 453 |
* @return void |
| 454 |
*/ |
| 455 |
private function css() { |
| 456 |
// phpcs:disable Generic.WhiteSpace.ScopeIndent |
| 457 |
?> |
| 458 |
<style> |
| 459 |
#frm-admin-smtp *, #frm-admin-smtp *::before, #frm-admin-smtpp *::after { |
| 460 |
box-sizing: border-box; |
| 461 |
} |
| 462 |
#frm-admin-smtp{ |
| 463 |
width: 700px; |
| 464 |
margin: 0 auto; |
| 465 |
} |
| 466 |
#frm-admin-smtp p { |
| 467 |
font-size: 15px; |
| 468 |
} |
| 469 |
#frm-admin-smtp section{ |
| 470 |
margin: 50px 0; |
| 471 |
text-align: left; |
| 472 |
clear: both; |
| 473 |
} |
| 474 |
#frm-admin-smtp .top{ |
| 475 |
text-align: center; |
| 476 |
} |
| 477 |
.frm-smtp-logos { |
| 478 |
margin-bottom: 38px; |
| 479 |
} |
| 480 |
.frm-smtp-logos svg { |
| 481 |
vertical-align: middle; |
| 482 |
} |
| 483 |
#frm-admin-smtp .top h1 { |
| 484 |
font-size: 26px; |
| 485 |
font-weight: 600; |
| 486 |
margin-bottom: 0; |
| 487 |
padding: 0; |
| 488 |
} |
| 489 |
#frm-admin-smtp .top p { |
| 490 |
font-size: 17px; |
| 491 |
color: #777; |
| 492 |
margin-top: .5em; |
| 493 |
} |
| 494 |
#frm-admin-smtp .screenshot ul { |
| 495 |
display: inline-block; |
| 496 |
margin: 0 0 0 30px; |
| 497 |
list-style-type: none; |
| 498 |
max-width: calc(100% - 350px); |
| 499 |
} |
| 500 |
#frm-admin-smtp .screenshot li { |
| 501 |
margin: 16px 0; |
| 502 |
padding: 0; |
| 503 |
font-size: 15px; |
| 504 |
color: #777; |
| 505 |
} |
| 506 |
#frm-admin-smtp .screenshot .cont img { |
| 507 |
max-width: 100%; |
| 508 |
display: block; |
| 509 |
} |
| 510 |
#frm-admin-smtp .screenshot .cont { |
| 511 |
display: inline-block; |
| 512 |
position: relative; |
| 513 |
width: 315px; |
| 514 |
padding: 5px; |
| 515 |
background-color: #fff; |
| 516 |
border-radius: 3px; |
| 517 |
} |
| 518 |
#frm-admin-smtp .step, |
| 519 |
#frm-admin-smtp .screenshot .cont { |
| 520 |
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.05); |
| 521 |
} |
| 522 |
#frm-admin-smtp .step { |
| 523 |
background-color: #F9F9F9; |
| 524 |
border: 1px solid #E5E5E5; |
| 525 |
margin: 0 0 25px; |
| 526 |
} |
| 527 |
#frm-admin-smtp .screenshot > *, |
| 528 |
#frm-admin-smtp .step > * { |
| 529 |
vertical-align: middle; |
| 530 |
} |
| 531 |
#frm-admin-smtp .step p { |
| 532 |
font-size: 16px; |
| 533 |
color: #777777; |
| 534 |
} |
| 535 |
#frm-admin-smtp .step .num { |
| 536 |
display: inline-block; |
| 537 |
position: relative; |
| 538 |
width: 100px; |
| 539 |
height: 50px; |
| 540 |
text-align: center; |
| 541 |
} |
| 542 |
#frm-admin-smtp .step div { |
| 543 |
display: inline-block; |
| 544 |
width: calc(100% - 104px); |
| 545 |
background-color: #fff; |
| 546 |
padding: 30px; |
| 547 |
border-left: 1px solid #eee; |
| 548 |
} |
| 549 |
#frm-admin-smtp .grey { |
| 550 |
opacity: 0.5; |
| 551 |
background: #F6F6F6 !important; |
| 552 |
border-color: #ddd !important; |
| 553 |
color: #9FA5AA !important; |
| 554 |
} |
| 555 |
#frm-admin-smtp .step h2 { |
| 556 |
font-size: 24px; |
| 557 |
line-height: 22px; |
| 558 |
margin-top: 0; |
| 559 |
margin-bottom: 15px; |
| 560 |
} |
| 561 |
#frm-admin-smtp .button.disabled { |
| 562 |
cursor: default; |
| 563 |
} |
| 564 |
</style> |
| 565 |
<?php |
| 566 |
// phpcs:enable Generic.WhiteSpace.ScopeIndent |
| 567 |
} |
| 568 |
} |
| 569 |
|