| 1 |
<?php |
| 2 |
if (! defined('ABSPATH')) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- This template is included from PrintFriendly_WordPress::config_page(); its top-level variables are function-scoped, not global. |
| 6 |
$pf_urlInfo = wp_parse_url(get_option('siteurl')); |
| 7 |
$domain = ( isset($pf_urlInfo['host']) ? $pf_urlInfo['host'] : '' ); |
| 8 |
|
| 9 |
// don't throw a PHP notice if license_date is not defined |
| 10 |
$pf_license_date = $this->getVal('license_date', ''); |
| 11 |
|
| 12 |
if (! empty($pf_license_date)) { |
| 13 |
$pf_license_date = date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $pf_license_date / 1000 + get_option('gmt_offset') * HOUR_IN_SECONDS); |
| 14 |
} |
| 15 |
|
| 16 |
?> |
| 17 |
<div class="pf-bu-block pf-bu-card"> |
| 18 |
<div class="pf-bu-card-content"> |
| 19 |
|
| 20 |
<div id="pf-pro" class="pf-notice pf-pro"> |
| 21 |
<h3 style="margin: 1rem 0 0 0">Pro - <span id="pf-pro-status-header"></span></h3> |
| 22 |
<p class="pf-alert-success">PrintFriendly is <strong>GDPR Compliant</strong> <a href="https://www.printfriendly.com/privacy" target="_blank"><?php esc_html_e('Learn more', 'printfriendly'); ?></a>. |
| 23 |
|
| 24 |
</p> |
| 25 |
<div class="pf-col-1 "> |
| 26 |
<?php |
| 27 |
if (! ( empty($this->getVal('pro_email')) && in_array($this->getVal('license_status'), array( 'pro' ), true) )) { |
| 28 |
$pf_email = $this->getVal('pro_email'); |
| 29 |
if (empty($pf_email)) { |
| 30 |
$pf_email = get_option('admin_email'); |
| 31 |
} |
| 32 |
?> |
| 33 |
<label class="pf-no-margin"> |
| 34 |
<strong><?php esc_html_e('Email', 'printfriendly'); ?></strong><span class="description">(<?php esc_html_e('To send account details', 'printfriendly'); ?>)</span><br> |
| 35 |
<input id="pf-pro-email" type="email" class="regular-text" maxlength="80" name="<?php echo esc_attr($this->option_name); ?>[pro_email]" value="<?php echo esc_attr($pf_email); ?>" placeholder="hello@my-website.com" /> |
| 36 |
<br> |
| 37 |
<span id="pf-pro-email-error" class="pf-error"><?php esc_html_e('Email is invalid', 'printfriendly'); ?></span> |
| 38 |
</label> |
| 39 |
<?php } ?> |
| 40 |
|
| 41 |
<label> |
| 42 |
<strong><?php esc_html_e('Website Domain', 'printfriendly'); ?></strong><br/> |
| 43 |
<input id="pf-pro-domain" type="text" class="regular-text" readonly name="<?php echo esc_attr($this->option_name); ?>[pro_domain]" value="<?php echo esc_attr($domain); ?>" /> |
| 44 |
<br /> |
| 45 |
<span id="pf-pro-domain-error" class="pf-error"><?php esc_html_e('Domain is invalid', 'printfriendly'); ?></span> |
| 46 |
</label> |
| 47 |
|
| 48 |
<p id="pf-pro-activate" class="pf-hidden"> |
| 49 |
<button id="pf-pro-activate-btn" type="button" class="button-primary"><?php esc_html_e('Activate', 'printfriendly'); ?></button> |
| 50 |
<span class="pf-btn-message"><?php esc_html_e('Free 30 days trial, no credit card required.', 'printfriendly'); ?></span> |
| 51 |
</p> |
| 52 |
|
| 53 |
<p id="pf-pro-buy" class="pf-hidden"> |
| 54 |
<a id="pf-pro-buy-btn" class="button-primary"><?php esc_html_e('Buy Now', 'printfriendly'); ?></a> |
| 55 |
<span id="pf-pro-status-message" class="pf-btn-message"></span> |
| 56 |
</p> |
| 57 |
|
| 58 |
<p id="pf-pro-details" class="pf-hidden"> |
| 59 |
<span class="pf-btn-message"><?php esc_html_e('Last Checked', 'printfriendly'); ?>: <?php echo esc_html($pf_license_date); ?></span> |
| 60 |
<input type="hidden" name="<?php echo esc_attr($this->option_name); ?>[license_status]" id="license_status"> |
| 61 |
<input type="hidden" name="<?php echo esc_attr($this->option_name); ?>[license_date]" id="license_date"> |
| 62 |
</p> |
| 63 |
|
| 64 |
<p id="pf-pro-loading" class="pf-hidden"> |
| 65 |
<b class="pf-text-success"><span id="pf-pro-loading-message"></span><?php esc_html_e('Please wait', 'printfriendly'); ?>...</b> |
| 66 |
</p> |
| 67 |
|
| 68 |
<p id="pf-pro-communication-error" class="pf-hidden"> |
| 69 |
<b class="pf-text-error"><span id="pf-pro-communication-error-message"></span></b> |
| 70 |
</p> |
| 71 |
</div> |
| 72 |
|
| 73 |
<div class="pf-col-2 pf-pro-features"> |
| 74 |
<strong><?php esc_html_e('Pro Features', 'printfriendly'); ?></strong> |
| 75 |
<ol> |
| 76 |
<li><?php esc_html_e('Faster, better experience for end-user', 'printfriendly'); ?></li> |
| 77 |
<li><?php esc_html_e('Cache-free, so any updates are instantly included', 'printfriendly'); ?></li> |
| 78 |
<li><?php esc_html_e('Ad-Free for companies and organizations', 'printfriendly'); ?></li> |
| 79 |
<li><?php esc_html_e('Works on all sites (Password protected, Angular/React/Ember)', 'printfriendly'); ?></li> |
| 80 |
<li><?php esc_html_e('Email support', 'printfriendly'); ?></li> |
| 81 |
</ol> |
| 82 |
<p><?php esc_html_e('Have a development/staging domain?', 'printfriendly'); ?> <a href="https://support.printfriendly.com/pro/staging-development-domain/" target="_blank"><?php esc_html_e('Add Free Development Domain', 'printfriendly'); ?></a>.</p> |
| 83 |
</div> |
| 84 |
<br /> |
| 85 |
</div> |
| 86 |
|
| 87 |
</div> |
| 88 |
</div> |
| 89 |
|