partials
1 month ago
Check_Email_Analyzer.php
1 month ago
Check_Email_BasePage.php
1 month ago
Check_Email_Dashboard.php
1 month ago
Check_Email_Error_Tracker_list.php
1 month ago
Check_Email_HelpSupport_Page.php
2 years ago
Check_Email_Log_List_Page.php
1 month ago
Check_Email_PremiumFeatures_Page.php
2 years ago
Check_Email_Settings_Page.php
1 month ago
Check_Email_Status_Page.php
1 month ago
Check_Email_UpgradeToPro_Page.php
2 years ago
Check_Email_Wizard_Page.php
1 month ago
Check_Email_Dashboard.php
158 lines
| 1 | <?php |
| 2 | |
| 3 | namespace CheckEmail\Core\UI\Page; |
| 4 | |
| 5 | defined('ABSPATH') || exit; // Exit if accessed directly. |
| 6 | |
| 7 | |
| 8 | class Check_Email_Dashboard extends Check_Email_BasePage |
| 9 | { |
| 10 | |
| 11 | /** |
| 12 | * Page slug. |
| 13 | */ |
| 14 | const PAGE_SLUG = 'check-email-status'; |
| 15 | const DASHBOARD_SLUG = 'check-email-dashboard'; |
| 16 | |
| 17 | |
| 18 | |
| 19 | /** |
| 20 | * Specify additional hooks. |
| 21 | * |
| 22 | * @inheritdoc |
| 23 | */ |
| 24 | public function load() |
| 25 | { |
| 26 | parent::load(); |
| 27 | add_action('admin_enqueue_scripts', array($this, 'checkemail_assets')); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Register page. |
| 32 | */ |
| 33 | public function register_page() |
| 34 | { |
| 35 | $this->page = add_submenu_page( |
| 36 | Check_Email_Status_Page::PAGE_SLUG, |
| 37 | esc_html__('Dashboard', 'check-email'), |
| 38 | esc_html__('Dashboard', 'check-email'), |
| 39 | 'manage_check_email', |
| 40 | self::DASHBOARD_SLUG, |
| 41 | array($this, 'render_page'), |
| 42 | 0 |
| 43 | ); |
| 44 | } |
| 45 | |
| 46 | public function render_page() |
| 47 | { |
| 48 | ?> |
| 49 | <div class="wrap"> |
| 50 | <div style="display:flex; align-items:center; justify-content:space-between;"> |
| 51 | <h1 style="margin-left:5px;"><?php esc_html_e('Check & Log Email', 'check-email'); ?></h1> |
| 52 | <div> |
| 53 | <?php |
| 54 | // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound |
| 55 | $banner = apply_filters('check_mail_pro_upgrade_banner', '', []); |
| 56 | |
| 57 | if ( ! empty( $banner ) ) { |
| 58 | echo wp_kses_post( $banner ); |
| 59 | } |
| 60 | ?> |
| 61 | </div> |
| 62 | </div> |
| 63 | <div class="ck_dashboard-container"> |
| 64 | <div class="ck_dashboard-box wrap"> |
| 65 | <h2><?php echo esc_html__('Email Testing', 'check-email'); ?></h2> |
| 66 | <span class="ck_dashboard-free"><?php echo esc_html__('Free', 'check-email'); ?></span> |
| 67 | <hr/> |
| 68 | <p style="overflow:hidden;"><?php echo esc_html__('Email testing ensures emails are delivered correctly and effectively. Thorough testing, businesses can improve email performance and maintain a positive sender reputation', 'check-email'); ?></p> |
| 69 | <a class="button button-primary" href="<?php echo esc_url(admin_url('admin.php?page=check-email-status')); ?>"><?php echo esc_html__( "Go to Email Testing Module", 'check-email' ); ?></a> |
| 70 | <a class="ck_dashboard-learn-more" target="_blank" href="<?php echo esc_url('https://check-email.tech/docs/'); ?>"><?php echo esc_html__( "Learn More", 'check-email' ); ?></a> |
| 71 | </div> |
| 72 | <div class="ck_dashboard-box wrap"> |
| 73 | <h2><?php echo esc_html__('Spam Analyzer', 'check-email'); ?></h2> |
| 74 | <span class="ck_dashboard-free"><?php echo esc_html__('Free', 'check-email'); ?></span> |
| 75 | <hr/> |
| 76 | <p style="overflow:hidden;"><?php echo esc_html__('Email Spam Testing of your mail for accurate delivery', 'check-email'); ?> |
| 77 | <?php echo esc_html__('One of its kind FREE tool in WordPress', 'check-email'); ?> |
| 78 | <?php echo esc_html__("Did you know that 70% of the emails don't get visibility because of the wrong configuration", 'check-email'); ?></p> |
| 79 | <a class="button button-primary" href="<?php echo esc_url(admin_url('admin.php?page=spam-analyzer')); ?>"><?php echo esc_html__( "Go to Spam Analyzer Module", 'check-email' ); ?></a> |
| 80 | <a class="ck_dashboard-learn-more" target="_blank" href="<?php echo esc_url('https://check-email.tech/docs/knowledge-base/how-to-use-the-email-spam-analyzer-an-essential-tool-for-every-e-commerce-store/'); ?>"><?php echo esc_html__( "Learn More", 'check-email' ); ?></a> |
| 81 | </div> |
| 82 | <div class="ck_dashboard-box wrap"> |
| 83 | <h2><?php echo esc_html__('Email Logs', 'check-email'); ?></h2> |
| 84 | <span class="ck_dashboard-free"><?php echo esc_html__('Free', 'check-email'); ?></span> |
| 85 | <hr/> |
| 86 | <p style="overflow:hidden;"><?php echo esc_html__('In need of a tool that allows you to easily log and view all emails sent from WordPress? Logs helps you store sent emails for auditing purposes, as well as debug email related problems in your site.', 'check-email'); ?></p> |
| 87 | <a class="button button-primary" href="<?php echo esc_url(admin_url('admin.php?page=check-email-logs')); ?>"><?php echo esc_html__( "Go to Email Logs Module", 'check-email' ); ?></a> |
| 88 | <a class="ck_dashboard-learn-more" target="_blank" href="<?php echo esc_url('https://check-email.tech/docs/'); ?>"><?php echo esc_html__( "Learn More", 'check-email' ); ?></a> |
| 89 | </div> |
| 90 | |
| 91 | <div class="ck_dashboard-box wrap"> |
| 92 | <h2><?php echo esc_html__('Error Tracker', 'check-email'); ?></h2> |
| 93 | <span class="ck_dashboard-free"><?php echo esc_html__('Free', 'check-email'); ?></span> |
| 94 | <hr/> |
| 95 | <p style="overflow:hidden;"><?php echo esc_html__('Error tracker is essential to ensure smooth deliverability.', 'check-email'); ?> |
| 96 | <?php echo esc_html__('It helps you identify and resolve issues during email sending.', 'check-email'); ?> |
| 97 | <?php echo esc_html__("Monitor failed email deliveries in real-time.", 'check-email'); ?></p> |
| 98 | <?php |
| 99 | $option = get_option( 'check-email-log-core' ); |
| 100 | |
| 101 | if ( is_array( $option ) && array_key_exists( 'email_error_tracking', $option ) && 'true' === strtolower( $option['email_error_tracking'] ) ) { ?> |
| 102 | <a class="button button-primary" href="<?php echo esc_url(admin_url('admin.php?page=check-email-error-tracker')); ?>"><?php echo esc_html__( "Go to Error Tracker Module", 'check-email' ); ?></a> |
| 103 | <?php } else { |
| 104 | $nonce = wp_create_nonce('ck_error_tracker'); |
| 105 | $base_url = admin_url('admin.php'); |
| 106 | $url_with_nonce = add_query_arg( |
| 107 | array( |
| 108 | 'page' => 'check-email-error-tracker', |
| 109 | 'enable-error-tracker' => true, |
| 110 | '_wpnonce' => $nonce |
| 111 | ), |
| 112 | $base_url |
| 113 | ); |
| 114 | ?> |
| 115 | <a class="button button-primary" target="_blank" href="<?php echo esc_url($url_with_nonce); ?>"><?php echo esc_html__( "Enable This Module", 'check-email' ); ?></a> |
| 116 | <?php } ?> |
| 117 | <a class="ck_dashboard-learn-more" target="_blank" href="<?php echo esc_url('https://check-email.tech/docs/'); ?>"><?php echo esc_html__( "Learn More", 'check-email' ); ?></a> |
| 118 | </div> |
| 119 | <?php if(!defined('CK_MAIL_PRO_VERSION')){ ?> |
| 120 | <div class="ck_dashboard-box wrap"> |
| 121 | <h2><?php echo esc_html__('Triggered Data', 'check-email'); ?></h2><a class="ck_dashboard-free" style="background:#f57429; text-decoration:none;" target="_blank" href="https://check-email.tech/pricing/#pricings"><?php echo esc_html__('Pro', 'check-email'); ?></a> |
| 122 | <hr/> |
| 123 | <p style="overflow:hidden;"><?php echo esc_html__('Triggered data helps you in debugging by showing the exact code that is sending that email.', 'check-email'); ?></p> |
| 124 | <a class="button button-primary" target="_blank" href="https://check-email.tech/pricing/#pricings"><?php echo esc_html__( "Upgrade to Premium to Enable", 'check-email' ); ?></a> |
| 125 | <a class="ck_dashboard-learn-more" target="_blank" href="<?php echo esc_url('https://check-email.tech/docs/knowledge-base/how-to-use-the-trigger-option-to-debug-emails-by-identifying-the-exact-code/'); ?>"><?php echo esc_html__( "Learn More", 'check-email' ); ?></a> |
| 126 | </div> |
| 127 | <?php } ?> |
| 128 | <div id="CKE_banner" style="padding:30px; margin:10px 18px 0px 0px"> |
| 129 | <h2> |
| 130 | <?php // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage, PluginCheck.CodeAnalysis.Offloading.OffloadedContent ?> |
| 131 | <img draggable="false" role="img" class="emoji" alt="👉" src="https://s.w.org/images/core/emoji/13.0.1/svg/1f449.svg"> |
| 132 | <?php esc_html_e('Suggest a new feature!', 'check-email') ?> |
| 133 | <?php // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage, PluginCheck.CodeAnalysis.Offloading.OffloadedContent ?> |
| 134 | <img draggable="false" role="img" class="emoji" alt="👈" src="https://s.w.org/images/core/emoji/13.0.1/svg/1f448.svg"> |
| 135 | </h2> |
| 136 | <p style="overflow:hidden;"><?php esc_html_e('Help us build the next set of features for Check & Log Email. Tell us what you think and we will make it happen!', 'check-email') ?></p> |
| 137 | <a target="_blank" rel="noreferrer noopener" href="https://check-email.tech/contact/" class="button button-primary button-hero"><?php esc_html_e('Click here', 'check-email') ?></a> |
| 138 | </div> |
| 139 | </div> |
| 140 | </div> |
| 141 | <?php |
| 142 | } |
| 143 | |
| 144 | public function checkemail_assets() |
| 145 | { |
| 146 | $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; |
| 147 | $check_email = wpchill_check_email(); |
| 148 | $plugin_dir_url = plugin_dir_url($check_email->get_plugin_file()); |
| 149 | wp_enqueue_style('checkemail-css', $plugin_dir_url . 'assets/css/admin/checkemail' . $suffix . '.css', array(), $check_email->get_version()); |
| 150 | wp_enqueue_script('checkemail', $plugin_dir_url . 'assets/js/admin/checkemail' . $suffix . '.js', array('jquery', 'updates'), $check_email->get_version(), true); |
| 151 | |
| 152 | $data['ajax_url'] = admin_url('admin-ajax.php'); |
| 153 | $data['ck_mail_security_nonce'] = wp_create_nonce('ck_mail_security_nonce'); |
| 154 | |
| 155 | wp_localize_script('checkemail', 'checkemail_data', $data); |
| 156 | } |
| 157 | } |
| 158 |