Initial commit: Atomaste website
This commit is contained in:
@@ -0,0 +1,164 @@
|
||||
<?php
|
||||
/**
|
||||
* LiteSpeed Cache Cloudflare Settings
|
||||
*
|
||||
* @package LiteSpeed
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
namespace LiteSpeed;
|
||||
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
$this->form_action();
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php esc_html_e( 'Cloudflare Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cdn/' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $option_id = Base::O_CDN_CLOUDFLARE; ?>
|
||||
<?php $this->title( $option_id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $option_id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php printf( esc_html__( 'Use %s API functionality.', 'litespeed-cache' ), 'Cloudflare' ); ?>
|
||||
</div>
|
||||
<div class="litespeed-block">
|
||||
<div class='litespeed-col'>
|
||||
<label class="litespeed-form-label"><?php esc_html_e( 'Global API Key / API Token', 'litespeed-cache' ); ?></label>
|
||||
<?php $this->build_input( Base::O_CDN_CLOUDFLARE_KEY ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php printf( esc_html__( 'Your API key / token is used to access %s APIs.', 'litespeed-cache' ), 'Cloudflare' ); ?>
|
||||
<?php printf( esc_html__( 'Get it from %s.', 'litespeed-cache' ), '<a href="https://dash.cloudflare.com/profile/api-tokens" target="_blank" rel="noopener">Cloudflare</a>' ); ?>
|
||||
<?php esc_html_e( 'Recommended to generate the token from Cloudflare API token template "WordPress".', 'litespeed-cache' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='litespeed-col'>
|
||||
<label class="litespeed-form-label"><?php esc_html_e( 'Email Address', 'litespeed-cache' ); ?></label>
|
||||
<?php $this->build_input( Base::O_CDN_CLOUDFLARE_EMAIL ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php printf( esc_html__( 'Your Email address on %s.', 'litespeed-cache' ), 'Cloudflare' ); ?>
|
||||
<?php esc_html_e( 'Optional when API token used.', 'litespeed-cache' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='litespeed-col'>
|
||||
<label class="litespeed-form-label"><?php esc_html_e( 'Domain', 'litespeed-cache' ); ?></label>
|
||||
<?php
|
||||
$cf_zone = $this->conf( Base::O_CDN_CLOUDFLARE_ZONE );
|
||||
$cls = $cf_zone ? ' litespeed-input-success' : ' litespeed-input-warning';
|
||||
$this->build_input( Base::O_CDN_CLOUDFLARE_NAME, $cls );
|
||||
?>
|
||||
<div class="litespeed-desc">
|
||||
<?php esc_html_e( 'You can just type part of the domain.', 'litespeed-cache' ); ?>
|
||||
<?php esc_html_e( 'Once saved, it will be matched with the current list and completed automatically.', 'litespeed-cache' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $option_id = Base::O_CDN_CLOUDFLARE_CLEAR; ?>
|
||||
<?php $this->title( $option_id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $option_id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php printf( esc_html__( 'Clear %s cache when "Purge All" is run.', 'litespeed-cache' ), 'Cloudflare' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
$this->form_end();
|
||||
$cf_on = $this->conf( Base::O_CDN_CLOUDFLARE );
|
||||
$cf_domain = $this->conf( Base::O_CDN_CLOUDFLARE_NAME );
|
||||
$cf_zone = $this->conf( Base::O_CDN_CLOUDFLARE_ZONE );
|
||||
if ( ! $cf_domain ) {
|
||||
$cf_domain = '-';
|
||||
}
|
||||
if ( ! $cf_zone ) {
|
||||
$cf_zone = '-';
|
||||
}
|
||||
|
||||
$curr_status = CDN\Cloudflare::get_option( CDN\Cloudflare::ITEM_STATUS, array() );
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title"><?php esc_html_e( 'Cloudflare', 'litespeed-cache' ); ?></h3>
|
||||
|
||||
<?php if ( ! $cf_on ) : ?>
|
||||
<div class="litespeed-callout notice notice-error inline">
|
||||
<h4><?php esc_html_e( 'WARNING', 'litespeed-cache' ); ?></h4>
|
||||
<p>
|
||||
<?php esc_html_e( 'To enable the following functionality, turn ON Cloudflare API in CDN Settings.', 'litespeed-cache' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<p><?php esc_html_e( 'Cloudflare Domain', 'litespeed-cache' ); ?>: <code><?php echo esc_textarea( $cf_domain ); ?></code></p>
|
||||
<p><?php esc_html_e( 'Cloudflare Zone', 'litespeed-cache' ); ?>: <code><?php echo esc_textarea( $cf_zone ); ?></code></p>
|
||||
|
||||
<p>
|
||||
<b><?php esc_html_e( 'Development Mode', 'litespeed-cache' ); ?>:</b>
|
||||
<a href="<?php echo esc_url( Utility::build_url( Router::ACTION_CDN_CLOUDFLARE, CDN\Cloudflare::TYPE_SET_DEVMODE_ON ) ); ?>" class="button litespeed-btn-warning">
|
||||
<?php esc_html_e( 'Turn ON', 'litespeed-cache' ); ?>
|
||||
</a>
|
||||
<a href="<?php echo esc_url( Utility::build_url( Router::ACTION_CDN_CLOUDFLARE, CDN\Cloudflare::TYPE_SET_DEVMODE_OFF ) ); ?>" class="button litespeed-btn-warning">
|
||||
<?php esc_html_e( 'Turn OFF', 'litespeed-cache' ); ?>
|
||||
</a>
|
||||
<a href="<?php echo esc_url( Utility::build_url( Router::ACTION_CDN_CLOUDFLARE, CDN\Cloudflare::TYPE_GET_DEVMODE ) ); ?>" class="button litespeed-btn-success">
|
||||
<?php esc_html_e( 'Check Status', 'litespeed-cache' ); ?>
|
||||
</a>
|
||||
|
||||
<?php if ( $curr_status ) : ?>
|
||||
<span class="litespeed-desc">
|
||||
<?php
|
||||
if ( time() >= $curr_status['devmode_expired'] ) {
|
||||
$expired_at = gmdate( 'm/d/Y H:i:s', $curr_status['devmode_expired'] + LITESPEED_TIME_OFFSET );
|
||||
$curr_status['devmode'] = 'OFF';
|
||||
printf(
|
||||
esc_html__( 'Current status is %1$s since %2$s.', 'litespeed-cache' ),
|
||||
'<code>' . esc_html( strtoupper( $curr_status['devmode'] ) ) . '</code>',
|
||||
'<code>' . esc_html( $expired_at ) . '</code>'
|
||||
);
|
||||
} else {
|
||||
$expired_at = $curr_status['devmode_expired'] - time();
|
||||
$expired_at = Utility::readable_time( $expired_at, 3600 * 3, true );
|
||||
printf(
|
||||
esc_html__( 'Current status is %s.', 'litespeed-cache' ),
|
||||
'<code>' . esc_html( strtoupper( $curr_status['devmode'] ) ) . '</code>'
|
||||
);
|
||||
printf(
|
||||
esc_html__( 'Development mode will be automatically turned off in %s.', 'litespeed-cache' ),
|
||||
'<code>' . esc_html( $expired_at ) . '</code>'
|
||||
);
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
<?php esc_html_e( 'Temporarily bypass Cloudflare cache. This allows changes to the origin server to be seen in realtime.', 'litespeed-cache' ); ?>
|
||||
<br>
|
||||
<?php esc_html_e( 'Development Mode will be turned off automatically after three hours.', 'litespeed-cache' ); ?>
|
||||
<?php printf( esc_html__( '%1$sLearn More%2$s', 'litespeed-cache' ), '<a href="https://support.cloudflare.com/hc/en-us/articles/200168246" target="_blank" rel="noopener">', '</a>' ); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b><?php esc_html_e( 'Cloudflare Cache', 'litespeed-cache' ); ?>:</b>
|
||||
<?php if ( ! $cf_on ) : ?>
|
||||
<a href="#" class="button button-secondary disabled">
|
||||
<?php else : ?>
|
||||
<a href="<?php echo esc_url( Utility::build_url( Router::ACTION_CDN_CLOUDFLARE, CDN\Cloudflare::TYPE_PURGE_ALL ) ); ?>" class="button litespeed-btn-danger">
|
||||
<?php endif; ?>
|
||||
<?php esc_html_e( 'Purge Everything', 'litespeed-cache' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* LiteSpeed Cache CDN Settings
|
||||
*
|
||||
* @package LiteSpeed
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
namespace LiteSpeed;
|
||||
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
$menu_list = array(
|
||||
'qc' => esc_html__( 'QUIC.cloud', 'litespeed-cache' ),
|
||||
'cf' => esc_html__( 'Cloudflare', 'litespeed-cache' ),
|
||||
'other' => esc_html__( 'Other Static CDN', 'litespeed-cache' ),
|
||||
);
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h1 class="litespeed-h1">
|
||||
<?php esc_html_e( 'LiteSpeed Cache CDN', 'litespeed-cache' ); ?>
|
||||
</h1>
|
||||
<span class="litespeed-desc">
|
||||
<?php echo esc_html( 'v' . Core::VER ); ?>
|
||||
</span>
|
||||
<hr class="wp-header-end">
|
||||
</div>
|
||||
|
||||
<div class="litespeed-wrap">
|
||||
<h2 class="litespeed-header nav-tab-wrapper">
|
||||
<?php GUI::display_tab_list( $menu_list ); ?>
|
||||
</h2>
|
||||
|
||||
<div class="litespeed-body">
|
||||
<?php
|
||||
foreach ( $menu_list as $menu_key => $menu_value ) {
|
||||
printf(
|
||||
'<div data-litespeed-layout="%s">',
|
||||
esc_attr( $menu_key )
|
||||
);
|
||||
require LSCWP_DIR . "tpl/cdn/$menu_key.tpl.php";
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,218 @@
|
||||
<?php
|
||||
/**
|
||||
* LiteSpeed Cache CDN Settings
|
||||
*
|
||||
* @package LiteSpeed
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
namespace LiteSpeed;
|
||||
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
$home_url = home_url( '/' );
|
||||
$parsed = wp_parse_url( $home_url );
|
||||
$home_url = str_replace( $parsed['scheme'] . ':', '', $home_url );
|
||||
|
||||
$cdn_mapping = $this->conf( Base::O_CDN_MAPPING );
|
||||
// Special handler: Append one row if somehow the DB default preset value got deleted
|
||||
if ( ! $cdn_mapping ) {
|
||||
$this->load_default_vals();
|
||||
$cdn_mapping = self::$_default_options[ Base::O_CDN_MAPPING ];
|
||||
}
|
||||
|
||||
$this->form_action();
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php esc_html_e( 'CDN Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cdn/' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $option_id = Base::O_CDN; ?>
|
||||
<?php $this->title( $option_id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $option_id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php
|
||||
printf(
|
||||
esc_html__( 'Turn this setting %s if you are using a traditional Content Delivery Network (CDN) or a subdomain for static content with QUIC.cloud CDN.', 'litespeed-cache' ),
|
||||
'<code>' . esc_html__( 'ON', 'litespeed-cache' ) . '</code>'
|
||||
);
|
||||
?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cdn/#use-cdn-mapping' ); ?>
|
||||
<br>
|
||||
<?php
|
||||
printf(
|
||||
esc_html__( 'NOTE: QUIC.cloud CDN and Cloudflare do not use CDN Mapping. If you are only using QUIC.cloud or Cloudflare, leave this setting %s.', 'litespeed-cache' ),
|
||||
'<code>' . esc_html__( 'OFF', 'litespeed-cache' ) . '</code>'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="litespeed-padding-left"></th>
|
||||
<td>
|
||||
<?php $this->enroll( Base::O_CDN_MAPPING . '[' . Base::CDN_MAPPING_URL . '][]' ); ?>
|
||||
<?php $this->enroll( Base::O_CDN_MAPPING . '[' . Base::CDN_MAPPING_INC_IMG . '][]' ); ?>
|
||||
<?php $this->enroll( Base::O_CDN_MAPPING . '[' . Base::CDN_MAPPING_INC_CSS . '][]' ); ?>
|
||||
<?php $this->enroll( Base::O_CDN_MAPPING . '[' . Base::CDN_MAPPING_INC_JS . '][]' ); ?>
|
||||
<?php $this->enroll( Base::O_CDN_MAPPING . '[' . Base::CDN_MAPPING_FILETYPE . '][]' ); ?>
|
||||
|
||||
<div id="litespeed_cdn_mapping_div"></div>
|
||||
|
||||
<script type="text/babel">
|
||||
ReactDOM.render(
|
||||
<CDNMapping list={ <?php echo wp_json_encode( $cdn_mapping ); ?> } />,
|
||||
document.getElementById( 'litespeed_cdn_mapping_div' )
|
||||
);
|
||||
</script>
|
||||
|
||||
<div class="litespeed-warning">
|
||||
<?php esc_html_e( 'NOTE', 'litespeed-cache' ); ?>:
|
||||
<?php esc_html_e( 'To randomize CDN hostname, define multiple hostnames for the same resources.', 'litespeed-cache' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="litespeed-desc">
|
||||
<b><?php $this->title( Base::CDN_MAPPING_INC_IMG ); ?></b>:
|
||||
<?php
|
||||
printf(
|
||||
esc_html__( 'Serve all image files through the CDN. This will affect all attachments, HTML %1$s tags, and CSS %2$s attributes.', 'litespeed-cache' ),
|
||||
'<code><img</code>',
|
||||
'<code>url()</code>'
|
||||
);
|
||||
?>
|
||||
<br>
|
||||
<b><?php $this->title( Base::CDN_MAPPING_INC_CSS ); ?></b>:
|
||||
<?php esc_html_e( 'Serve all CSS files through the CDN. This will affect all enqueued WP CSS files.', 'litespeed-cache' ); ?>
|
||||
<br>
|
||||
<b><?php $this->title( Base::CDN_MAPPING_INC_JS ); ?></b>:
|
||||
<?php esc_html_e( 'Serve all JavaScript files through the CDN. This will affect all enqueued WP JavaScript files.', 'litespeed-cache' ); ?>
|
||||
<br>
|
||||
<b><?php $this->title( Base::CDN_MAPPING_FILETYPE ); ?></b>:
|
||||
<?php esc_html_e( 'Static file type links to be replaced by CDN links.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
<?php
|
||||
printf(
|
||||
esc_html__( 'This will affect all tags containing attributes: %s.', 'litespeed-cache' ),
|
||||
'<code>src=""</code> <code>data-src=""</code> <code>href=""</code>'
|
||||
);
|
||||
?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cdn/#include-file-types', esc_html__( 'Default value', 'litespeed-cache' ) ); ?>
|
||||
<br>
|
||||
<?php
|
||||
printf(
|
||||
esc_html__( 'If you turn any of the above settings OFF, please remove the related file types from the %s box.', 'litespeed-cache' ),
|
||||
'<b>' . esc_html__( 'Include File Types', 'litespeed-cache' ) . '</b>'
|
||||
);
|
||||
?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cdn/#include-file-types' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $option_id = Base::O_CDN_ATTR; ?>
|
||||
<?php $this->title( $option_id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<div class="litespeed-textarea-recommended">
|
||||
<div>
|
||||
<?php $this->build_textarea( $option_id, 40 ); ?>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->recommended( $option_id ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="litespeed-desc">
|
||||
<?php esc_html_e( 'Specify which HTML element attributes will be replaced with CDN Mapping.', 'litespeed-cache' ); ?>
|
||||
<?php esc_html_e( 'Only attributes listed here will be replaced.', 'litespeed-cache' ); ?>
|
||||
<br>
|
||||
<?php
|
||||
printf(
|
||||
esc_html__( 'Use the format %1$s or %2$s (element is optional).', 'litespeed-cache' ),
|
||||
'<code>element.attribute</code>',
|
||||
'<code>.attribute</code>'
|
||||
);
|
||||
?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="litespeed-padding-left">
|
||||
<?php $option_id = Base::O_CDN_ORI; ?>
|
||||
<?php $this->title( $option_id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $option_id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php
|
||||
printf(
|
||||
esc_html__( 'Site URL to be served through the CDN. Beginning with %1$s. For example, %2$s.', 'litespeed-cache' ),
|
||||
'<code>//</code>',
|
||||
'<code>' . esc_html( $home_url ) . '</code>'
|
||||
);
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
printf(
|
||||
esc_html__( 'Wildcard %1$s supported (match zero or more characters). For example, to match %2$s and %3$s, use %4$s.', 'litespeed-cache' ),
|
||||
'<code>*</code>',
|
||||
'<code>//www.aa.com</code>',
|
||||
'<code>//aa.com</code>',
|
||||
'<code>//*aa.com</code>'
|
||||
);
|
||||
?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="litespeed-padding-left">
|
||||
<?php $option_id = Base::O_CDN_ORI_DIR; ?>
|
||||
<?php $this->title( $option_id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<div class="litespeed-textarea-recommended">
|
||||
<div>
|
||||
<?php $this->build_textarea( $option_id, 40 ); ?>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->recommended( $option_id ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="litespeed-desc">
|
||||
<?php esc_html_e( 'Only files within these directories will be pointed to the CDN.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="litespeed-padding-left">
|
||||
<?php $option_id = Base::O_CDN_EXC; ?>
|
||||
<?php $this->title( $option_id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $option_id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php esc_html_e( 'Paths containing these strings will not be served from the CDN.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php $this->form_end(); ?>
|
||||
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
/**
|
||||
* LiteSpeed Cache QUIC.cloud CDN Settings
|
||||
*
|
||||
* @package LiteSpeed
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
namespace LiteSpeed;
|
||||
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
$__cloud = Cloud::cls();
|
||||
$__cloud->finish_qc_activation( 'cdn' );
|
||||
$cloud_summary = Cloud::get_summary();
|
||||
?>
|
||||
|
||||
<div class="litespeed-flex-container litespeed-column-with-boxes">
|
||||
<div class="litespeed-width-7-10 litespeed-column-left litespeed-cdn-summary-wrapper">
|
||||
<div class="litespeed-column-left-inside">
|
||||
<h3>
|
||||
<?php if ( $__cloud->activated() ) : ?>
|
||||
<a class="button button-small litespeed-right litespeed-learn-more" href="<?php echo esc_url( Utility::build_url( Router::ACTION_CLOUD, Cloud::TYPE_SYNC_STATUS ) ); ?>">
|
||||
<span class="dashicons dashicons-update"></span> <?php esc_html_e( 'Refresh Status', 'litespeed-cache' ); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<span class="litespeed-quic-icon"></span> <?php esc_html_e( 'QUIC.cloud CDN Status Overview', 'litespeed-cache' ); ?>
|
||||
</h3>
|
||||
<p class="litespeed-desc"><?php esc_html_e( 'Check the status of your most important settings and the health of your CDN setup here.', 'litespeed-cache' ); ?></p>
|
||||
|
||||
<?php if ( ! $__cloud->activated() ) : ?>
|
||||
<div class="litespeed-dashboard-unlock litespeed-dashboard-unlock--inline">
|
||||
<div>
|
||||
<h3 class="litespeed-dashboard-unlock-title"><strong class="litespeed-qc-text-gradient"><?php esc_html_e( 'Accelerate, Optimize, Protect', 'litespeed-cache' ); ?></strong></h3>
|
||||
<p class="litespeed-dashboard-unlock-desc">
|
||||
<?php echo wp_kses_post( __( 'Speed up your WordPress site even further with <strong>QUIC.cloud Online Services and CDN</strong>.', 'litespeed-cache' ) ); ?>
|
||||
</p>
|
||||
<p><?php esc_html_e( 'Free monthly quota available.', 'litespeed-cache' ); ?></p>
|
||||
<p>
|
||||
<a class="button button-primary" href="<?php echo esc_url( Utility::build_url( Router::ACTION_CLOUD, Cloud::TYPE_ACTIVATE, false, null, array( 'ref' => 'cdn' ) ) ); ?>">
|
||||
<span class="dashicons dashicons-yes"></span><?php esc_html_e( 'Enable QUIC.cloud services', 'litespeed-cache' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
<p class="litespeed-dashboard-unlock-footer">
|
||||
<?php esc_html_e( 'QUIC.cloud provides CDN and online optimization services, and is not required. You may use many features of this plugin without QUIC.cloud.', 'litespeed-cache' ); ?><br>
|
||||
<a href="https://www.quic.cloud/" target="_blank" rel="noopener"><?php esc_html_e( 'Learn More about QUIC.cloud', 'litespeed-cache' ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php elseif ( empty( $cloud_summary['qc_activated'] ) || 'cdn' !== $cloud_summary['qc_activated'] ) : ?>
|
||||
<div class="litespeed-top20">
|
||||
<?php if ( ! empty( $cloud_summary['qc_activated'] ) && 'linked' === $cloud_summary['qc_activated'] ) : ?>
|
||||
<p><?php echo wp_kses_post( __( 'QUIC.cloud CDN is currently <strong>fully disabled</strong>.', 'litespeed-cache' ) ); ?></p>
|
||||
<?php else : ?>
|
||||
<p><?php echo wp_kses_post( __( 'QUIC.cloud CDN is <strong>not available</strong> for anonymous (unlinked) users.', 'litespeed-cache' ) ); ?></p>
|
||||
<?php endif; ?>
|
||||
<p>
|
||||
<?php
|
||||
$btn_title = esc_html__( 'Link & Enable QUIC.cloud CDN', 'litespeed-cache' );
|
||||
if ( ! empty( $cloud_summary['qc_activated'] ) && 'linked' === $cloud_summary['qc_activated'] ) {
|
||||
$btn_title = esc_html__( 'Enable QUIC.cloud CDN', 'litespeed-cache' );
|
||||
}
|
||||
Doc::learn_more(
|
||||
esc_url( Utility::build_url( Router::ACTION_CLOUD, Cloud::TYPE_ENABLE_CDN, false, null, array( 'ref' => 'cdn' ) ) ),
|
||||
'<span class="dashicons dashicons-yes"></span>' . $btn_title,
|
||||
true,
|
||||
'button button-primary litespeed-button-cta'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<h3 class="litespeed-title-section"><?php esc_html_e( 'Content Delivery Network Service', 'litespeed-cache' ); ?></h3>
|
||||
<p class="litespeed-text-md">
|
||||
<?php esc_html_e( 'Serve your visitors fast', 'litespeed-cache' ); ?> <strong class="litespeed-qc-text-gradient"><?php esc_html_e( 'no matter where they live.', 'litespeed-cache' ); ?></strong>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Link tags */
|
||||
esc_html__( 'Best available WordPress performance, globally fast TTFB, easy setup, and %smore%s!', 'litespeed-cache' ),
|
||||
'<a href="https://www.quic.cloud/quic-cloud-services-and-features/litespeed-cache-service/" target="_blank" rel="noopener">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo wp_kses_post( $__cloud->load_qc_status_for_dash( 'cdn_dash' ) ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="litespeed-width-3-10 litespeed-column-right">
|
||||
<div class="postbox litespeed-postbox">
|
||||
<div class="inside">
|
||||
<h3 class="litespeed-title">
|
||||
<?php esc_html_e( 'QUIC.cloud CDN Options', 'litespeed-cache' ); ?>
|
||||
</h3>
|
||||
<?php if ( ! empty( $cloud_summary['partner'] ) && ! empty( $cloud_summary['partner']['disable_qc_login'] ) ) : ?>
|
||||
<?php if ( ! empty( $cloud_summary['partner']['logo'] ) ) : ?>
|
||||
<?php if ( ! empty( $cloud_summary['partner']['url'] ) ) : ?>
|
||||
<a href="<?php echo esc_url( $cloud_summary['partner']['url'] ); ?>" target="_blank" rel="noopener">
|
||||
<img src="<?php echo esc_url( $cloud_summary['partner']['logo'] ); ?>" alt="<?php echo esc_attr( $cloud_summary['partner']['name'] ); ?>">
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<img src="<?php echo esc_url( $cloud_summary['partner']['logo'] ); ?>" alt="<?php echo esc_attr( $cloud_summary['partner']['name'] ); ?>">
|
||||
<?php endif; ?>
|
||||
<?php elseif ( ! empty( $cloud_summary['partner']['name'] ) ) : ?>
|
||||
<?php if ( ! empty( $cloud_summary['partner']['url'] ) ) : ?>
|
||||
<a href="<?php echo esc_url( $cloud_summary['partner']['url'] ); ?>" target="_blank" rel="noopener">
|
||||
<span class="postbox-partner-name"><?php echo esc_html( $cloud_summary['partner']['name'] ); ?></span>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<span class="postbox-partner-name"><?php echo esc_html( $cloud_summary['partner']['name'] ); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! $__cloud->activated() ) : ?>
|
||||
<p><?php esc_html_e( 'To manage your QUIC.cloud options, go to your hosting provider\'s portal.', 'litespeed-cache' ); ?></p>
|
||||
<?php else : ?>
|
||||
<p><?php esc_html_e( 'To manage your QUIC.cloud options, please contact your hosting provider.', 'litespeed-cache' ); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<?php if ( ! $__cloud->activated() ) : ?>
|
||||
<p><?php esc_html_e( 'To manage your QUIC.cloud options, go to QUIC.cloud Dashboard.', 'litespeed-cache' ); ?></p>
|
||||
<p class="litespeed-top20">
|
||||
<button type="button" class="button button-primary disabled">
|
||||
<?php esc_html_e( 'Link to QUIC.cloud', 'litespeed-cache' ); ?>
|
||||
</button>
|
||||
</p>
|
||||
<?php elseif ( 'anonymous' === $cloud_summary['qc_activated'] ) : ?>
|
||||
<p><?php esc_html_e( 'You are currently using services as an anonymous user. To manage your QUIC.cloud options, use the button below to create an account and link to the QUIC.cloud Dashboard.', 'litespeed-cache' ); ?></p>
|
||||
<p class="litespeed-top20">
|
||||
<a href="<?php echo esc_url( Utility::build_url( Router::ACTION_CLOUD, Cloud::TYPE_LINK, false, null, array( 'ref' => 'cdn' ) ) ); ?>" class="button button-<?php echo ( empty( $cloud_summary['qc_activated'] ) || 'cdn' !== $cloud_summary['qc_activated'] ) ? 'secondary' : 'primary'; ?>">
|
||||
<?php esc_html_e( 'Link to QUIC.cloud', 'litespeed-cache' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php elseif ( 'linked' === $cloud_summary['qc_activated'] ) : ?>
|
||||
<p class="litespeed-top20">
|
||||
<a href="<?php echo esc_url( $__cloud->qc_link() ); ?>" target="qc" rel="noopener" class="button button-<?php echo ( empty( $cloud_summary['qc_activated'] ) || 'cdn' !== $cloud_summary['qc_activated'] ) ? 'secondary' : 'primary'; ?>">
|
||||
<?php esc_html_e( 'My QUIC.cloud Dashboard', 'litespeed-cache' ); ?> <span class="dashicons dashicons-external"></span>
|
||||
</a>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<p><?php esc_html_e( 'To manage your QUIC.cloud options, go to QUIC.cloud Dashboard.', 'litespeed-cache' ); ?></p>
|
||||
<p class="litespeed-top20">
|
||||
<a href="<?php echo esc_url( $__cloud->qc_link() ); ?>" target="qc" rel="noopener" class="button button-<?php echo ( empty( $cloud_summary['qc_activated'] ) || 'cdn' !== $cloud_summary['qc_activated'] ) ? 'secondary' : 'primary'; ?>">
|
||||
<?php esc_html_e( 'My QUIC.cloud Dashboard', 'litespeed-cache' ); ?> <span class="dashicons dashicons-external"></span>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $promo_mini = $__cloud->load_qc_status_for_dash( 'promo_mini' ); ?>
|
||||
<?php if ( $promo_mini ) : ?>
|
||||
<?php echo wp_kses_post( $promo_mini ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user