html-admin-header-skeleton.php
4 weeks ago
html-admin-page-addons.php
1 year ago
html-admin-page-builder.php
4 months ago
html-admin-page-dashboard.php
2 years ago
html-admin-page-entries-view.php
4 weeks ago
html-admin-page-export.php
1 year ago
html-admin-page-form-migrator.php
2 years ago
html-admin-page-form-templates.php
4 months ago
html-admin-page-import.php
1 year ago
html-admin-page-payments.php
4 weeks ago
html-admin-page-setting.php
2 years ago
html-admin-page-smart-smtp-setup.php
4 weeks ago
html-admin-page-tools-logs.php
2 months ago
html-admin-page-tools.php
3 months ago
html-admin-settings.php
4 weeks ago
html-deactivation-popup.php
3 years ago
html-notice-allow-usage.php
2 months ago
html-notice-custom.php
3 months ago
html-notice-email-failed-notice.php
3 months ago
html-notice-php-deprecation.php
3 months ago
html-notice-review.php
3 months ago
html-notice-survey.php
3 months ago
html-notice-update.php
3 months ago
html-notice-updated.php
3 months ago
html-notice-updating.php
3 months ago
html-admin-page-smart-smtp-setup.php
144 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin Page SMTP Installation Settings. |
| 4 | * |
| 5 | * @package EverestForms/Admin/SMTP |
| 6 | */ |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | $everest_forms_image_path = evf()->plugin_url() . '/assets/images/everest-forms-logo.png'; |
| 11 | $smart_smtp_image_path = evf()->plugin_url() . '/assets/images/smart-smtp-logo.png'; |
| 12 | $checked_image_path = evf()->plugin_url() . '/assets/images/evf-checked.png'; |
| 13 | $redirect_url = evf_get_smart_smtp_google_workspace_setup_url(); |
| 14 | $support_url = 'https://wordpress.org/support/plugin/smart-smtp/?utm_source=everest_forms_dashboard'; |
| 15 | $documentation_url = 'https://docs.themegrill.com/docs/smartsmtp/?utm_source=everest_forms_dashboard'; |
| 16 | |
| 17 | $all_active_plugins = get_option( 'active_plugins', array() ); |
| 18 | $all_installed_plugins = get_plugins(); |
| 19 | |
| 20 | $is_smtp_active = 0; |
| 21 | $is_smtp_installed = 0; |
| 22 | |
| 23 | if ( in_array( 'smart-smtp/smart-smtp.php', $all_active_plugins ) ) { |
| 24 | $is_smtp_active = 1; |
| 25 | } else { |
| 26 | $is_smtp_active = 0; |
| 27 | } |
| 28 | |
| 29 | if ( isset($all_installed_plugins['smart-smtp/smart-smtp.php']) ) { |
| 30 | $is_smtp_installed = 1; |
| 31 | } else { |
| 32 | $is_smtp_installed = 0; |
| 33 | } |
| 34 | |
| 35 | ?> |
| 36 | <div class="wrap everest-forms"> |
| 37 | <div class="everest-forms-smart-smtp-page__wrapper"> |
| 38 | <div class="everest-forms-smart-smtp-page-features__wrapper"> |
| 39 | <div class="everest-forms-smart-smtp-page-features__images"> |
| 40 | <img src="<?php echo esc_attr( $everest_forms_image_path ); ?>" alt="<?php echo esc_attr__( 'Everest Forms Logo', 'everest-forms' ); ?>" id="everest-forms-smart-smtp-page-features__everest-forms-logo"/> |
| 41 | <span>|</span> |
| 42 | <img src="<?php echo esc_attr( $smart_smtp_image_path ); ?>" alt="<?php echo esc_attr__( 'Smart SMTP Logo', 'everest-forms' ); ?>" id="everest-forms-smart-smtp-page-features__smart-smtp-logo"/> |
| 43 | </div> |
| 44 | <h2 class="everest-forms-smart-smtp-page-features__heading"> |
| 45 | <?php echo esc_html__( 'Reliable Email Delivery with SmartSMTP', 'everest-forms' ); ?> |
| 46 | </h2> |
| 47 | <p class="everest-forms-smart-smtp-page-features__description"> |
| 48 | <?php |
| 49 | echo esc_html__( 'Are you struggling to send emails from your WordPress site? With SmartSMTP, you can guarantee reliable email delivery directly from your WordPress website.', 'everest-forms' ) |
| 50 | ?> |
| 51 | </p> |
| 52 | <ul class="everest-forms-smart-smtp-page-features__listing"> |
| 53 | <li> |
| 54 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 55 | <path d="M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.059 8.833 19 7" stroke="#32BA7C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
| 56 | </svg> |
| 57 | <?php echo esc_html__( 'Prevent Spam', 'everest-forms' ); ?> |
| 58 | </li> |
| 59 | <li> |
| 60 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 61 | <path d="M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.059 8.833 19 7" stroke="#32BA7C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
| 62 | </svg> |
| 63 | <?php echo esc_html__( 'Avoid Blocks', 'everest-forms' ); ?> |
| 64 | </li> |
| 65 | <li> |
| 66 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 67 | <path d="M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.059 8.833 19 7" stroke="#32BA7C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
| 68 | </svg> |
| 69 | <?php echo esc_html__( 'Track Emails', 'everest-forms' ); ?> |
| 70 | </li> |
| 71 | <li> |
| 72 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 73 | <path d="M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.059 8.833 19 7" stroke="#32BA7C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
| 74 | </svg> |
| 75 | <?php echo esc_html__( 'Secure Setup', 'everest-forms' ); ?> |
| 76 | </li> |
| 77 | <li> |
| 78 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 79 | <path d="M5 14.5C5 14.5 6.5 14.5 8.5 18C8.5 18 14.059 8.833 19 7" stroke="#32BA7C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
| 80 | </svg> |
| 81 | <?php echo esc_html__( 'Improve Credibility', 'everest-forms' ); ?> |
| 82 | </li> |
| 83 | </ul> |
| 84 | </div> |
| 85 | |
| 86 | <div class="everest-forms-smart-smtp-page-setup__wrapper"> |
| 87 | <div class="everest-forms-smart-smtp-page-setup__inner-wrapper"> |
| 88 | <div class="everest-forms-smart-smtp-page__install-and-activate"> |
| 89 | <?php if ( 1 === $is_smtp_active ) { ?> |
| 90 | <img src="<?php echo esc_attr( $checked_image_path ); ?>" alt="<?php echo esc_attr__( 'Everest Forms Checked Icon', 'everest-forms' ); ?>" id="everest-forms-smart-smtp-page-features__checked-icon" style="margin-top:20px; margin-bottom:7px"/> |
| 91 | <?php } else { ?> |
| 92 | <p class="everest-forms-smart-smtp-page__installation-step-one"> |
| 93 | <?php echo esc_html__( '1', 'everest-forms' ); ?> |
| 94 | </p> |
| 95 | <?php } ?> |
| 96 | <h2 class="everest-forms-smart-smtp-page__installation-step-one__title"> |
| 97 | <?php |
| 98 | if ( 1 === $is_smtp_installed ) { |
| 99 | echo esc_html__( 'Activate SmartSMTP', 'everest-forms' ); |
| 100 | } else { |
| 101 | echo esc_html__( 'Install and Activate SmartSMTP', 'everest-forms' ); |
| 102 | } |
| 103 | ?> |
| 104 | |
| 105 | </h2> |
| 106 | <p class="everest-forms-smart-smtp-page__installation-step-one__description"> |
| 107 | <?php echo esc_html__( 'Download and activate the SmartSMTP plugin directly from the WordPress.org repository.', 'everest-forms' ); ?> |
| 108 | </p> |
| 109 | <?php if ( 0 === $is_smtp_active ) { ?> |
| 110 | <button type="submit" class="everest-forms-btn everest-forms-btn-primary everest_forms_install_and_activate_smart_smtp" name="everest-forms-install-and-activate-smart-smtp"><?php echo ( 1 === $is_smtp_installed ) ? esc_html__( 'Activate SmartSMTP', 'everest-forms' ) : esc_html__( 'Install & Activate SmartSMTP', 'everest-forms' ); ?></button> |
| 111 | <?php } else { ?> |
| 112 | <button type="submit" class="everest-forms-btn everest-forms-btn-secondary everest_forms_install_and_activated_smart_smtp" name="everest-forms-install-and-activated-smart-smtp" style='pointer-events: none;'><?php echo esc_html__( 'Installed & Activated SmartSMTP', 'everest-forms' ); ?></button> |
| 113 | <?php } ?> |
| 114 | </div> |
| 115 | |
| 116 | <div class="everest-forms-smart-smtp-page__setup-smart-smtp <?php echo (0 === $is_smtp_active) ? 'everest-forms-smart-smtp-page__setup-disabled' : ''; ?>"> |
| 117 | <p class="everest-forms-smart-smtp-page__setup-step-two"> |
| 118 | <?php echo esc_html__( '2', 'everest-forms' ); ?> |
| 119 | </p> |
| 120 | <h2 class="everest-forms-smart-smtp-page__setup-step-two__title"> |
| 121 | <?php echo esc_html__( 'Set Up SmartSMTP Settings', 'everest-forms' ); ?> |
| 122 | </h2> |
| 123 | <p class="everest-forms-smart-smtp-page__setup-step-two__description"> |
| 124 | <?php echo esc_html__( 'Choose your preferred mailer and complete the setup process.', 'everest-forms' ); ?> |
| 125 | </p> |
| 126 | <a href="<?php echo ( 0 !== $is_smtp_active ) ? esc_url( $redirect_url ) : '#'; ?>" |
| 127 | class="everest-forms-btn everest-forms-btn-primary everest_forms_setup_smart_smtp" |
| 128 | <?php echo ( 0 === $is_smtp_active ) ? "style='pointer-events: none;'" : ''; ?>> |
| 129 | <?php echo esc_html__( 'View SmartSMTP Settings', 'everest-forms' ); ?> |
| 130 | </a> |
| 131 | </div> |
| 132 | </div> |
| 133 | </div> |
| 134 | |
| 135 | <div class="everest-forms-smart-smtp-page__support-links"> |
| 136 | <a href = <?php echo esc_url( $support_url ); ?> target="_blank"><?php echo esc_html__( 'Support', 'everest-forms' ); ?></a> |
| 137 | <span style="color:#DFDFDF">|</span> |
| 138 | <a href = <?php echo esc_url( $documentation_url ); ?> target="_blank"><?php echo esc_html__( 'Documentation', 'everest-forms' ); ?></a> |
| 139 | </div> |
| 140 | </div> |
| 141 | </div> |
| 142 | <?php |
| 143 | do_action( 'html_admin_page_smart_smtp_settings_page' ); |
| 144 |