This commit is contained in:
2024-05-20 15:37:46 +03:00
commit 00b7dbd0b7
10404 changed files with 3285853 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<?php
/**
* CDN disabled meta box.
*
* @since 3.0
* @package WP_Smush
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-block-content-center">
<?php if ( ! apply_filters( 'wpmudev_branding_hide_branding', false ) ) : ?>
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/graphic-smush-cdn-default.png' ); ?>"
srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/graphic-smush-cdn-default@2x.png' ); ?> 2x"
alt="<?php esc_html_e( 'Smush CDN', 'wp-smushit' ); ?>">
<?php endif; ?>
<p>
<?php
esc_html_e(
'Multiply the speed and savings! Upload huge images and the Smush CDN will perfectly resize the files, safely convert to a Next-Gen format (WebP), and delivers them directly to your visitors from our blazing-fast multi-location globe servers.',
'wp-smushit'
);
?>
</p>
<button class="sui-button sui-button-blue" id="smush-enable-cdn">
<span class="sui-loading-text"><?php esc_html_e( 'GET STARTED', 'wp-smushit' ); ?></span>
<i class="sui-icon-loader sui-loading" aria-hidden="true"></i>
</button>
</div>

View File

@ -0,0 +1,27 @@
<?php
/**
* CDN meta box header.
*
* @package WP_Smush
*
* @var string $title Title.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<h3 class="sui-box-title">
<?php esc_html_e( 'CDN', 'wp-smushit' ); ?>
</h3>
<div class="sui-actions-right">
<span class="sui-field-prefix">
<?php esc_html_e( 'How Smush CDN works?', 'wp-smushit' ); ?>
</span>
<span class="sui-tooltip sui-tooltip-constrained sui-tooltip-top-right" data-tooltip="<?php esc_attr_e( 'When someone visits a page on your site, the CDN will check if images are cached on the CDN. Images that are cached will be immediately served from the server closest to the user. Any image that is not yet cached will first be sent to the Smush API for optimization, then cached so the next time it is requested, the cached version will be served.', 'wp-smushit' ); ?>">
<span class="sui-icon-info" aria-hidden="true"></span>
</span>
</div>

View File

@ -0,0 +1,122 @@
<?php
/**
* CDN meta box.
*
* @since 3.0
* @package WP_Smush
*
* @var array $cdn_group CDN settings keys.
* @var string $class CDN status class (for icon color).
* @var array $settings Settings.
* @var string $status CDN status.
* @var string $status_msg CDN status messages.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<p>
<?php
esc_html_e( 'Take a load off your server by delivering your images from our blazingly-fast CDN. The Smush CDN is a multi-location network ensuring faster delivery of site content, as users will be served optimized and cached versions of files from the server closest to them.', 'wp-smushit' );
?>
</p>
<div class="sui-notice sui-notice-<?php echo esc_attr( $class ); ?>">
<div class="sui-notice-content">
<div class="sui-notice-message">
<i class="sui-notice-icon sui-icon-<?php echo 'enabled' === $status ? 'check-tick' : 'info'; ?> sui-md" aria-hidden="true"></i>
<p><?php echo wp_kses_post( $status_msg ); ?></p>
<?php if ( 'error' === $class && 'overcap' === $status ) : ?>
<p>
<a href="https://wpmudev.com/hub/account/" target="_blank" class="sui-button">
<?php esc_html_e( 'Upgrade Plan', 'wp-smushit' ); ?>
</a>
</p>
<?php endif; ?>
</div>
</div>
</div>
<div class="sui-box-settings-row">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label">
<?php esc_html_e( 'Supported Media Types', 'wp-smushit' ); ?>
</span>
<span class="sui-description">
<?php
esc_html_e( 'Heres a list of the media types we serve from the CDN.', 'wp-smushit' );
?>
</span>
</div>
<div class="sui-box-settings-col-2">
<span class="smush-filename-extension smush-extension-jpg">
<?php esc_html_e( 'jpg', 'wp-smushit' ); ?>
</span>
<span class="smush-filename-extension smush-extension-png">
<?php esc_html_e( 'png', 'wp-smushit' ); ?>
</span>
<span class="smush-filename-extension smush-extension-gif">
<?php esc_html_e( 'gif', 'wp-smushit' ); ?>
</span>
<?php if ( $settings['webp'] ) : ?>
<span class="smush-filename-extension smush-extension-webp">
<?php esc_html_e( 'webp', 'wp-smushit' ); ?>
</span>
<?php endif; ?>
<span class="sui-description">
<?php
esc_html_e(
'At this time, we dont support videos. We recommend uploading your media to a third-party provider and embedding the videos into your posts/pages.',
'wp-smushit'
);
?>
</span>
</div>
</div>
<?php
foreach ( $cdn_group as $name ) {
if ( 'cdn' === $name ) {
continue;
}
do_action( 'wp_smush_render_setting_row', $name, $settings[ $name ] );
}
?>
<div class="sui-box-settings-row">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label">
<?php esc_html_e( 'Deactivate', 'wp-smushit' ); ?>
</span>
<span class="sui-description">
<?php
esc_html_e(
'If you no longer require your images to be hosted from our CDN, you can disable this feature.',
'wp-smushit'
);
?>
</span>
</div>
<div class="sui-box-settings-col-2">
<button class="sui-button sui-button-ghost" id="smush-cancel-cdn">
<span class="sui-loading-text">
<i class="sui-icon-power-on-off" aria-hidden="true"></i>
<?php esc_html_e( 'Deactivate', 'wp-smushit' ); ?>
</span>
<i class="sui-icon-loader sui-loading" aria-hidden="true"></i>
</button>
<span class="sui-description">
<?php
esc_html_e(
'Note: You wont lose any images by deactivating, all of your attachments are still stored locally on your own server.',
'wp-smushit'
);
?>
</span>
</div>
</div>

View File

@ -0,0 +1,44 @@
<?php
/**
* Upsell CDN meta box.
*
* @since 3.0
* @package WP_Smush
*/
use Smush\Core\Helper;
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-block-content-center">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/graphic-smush-cdn-free-tier.png' ); ?>"
srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/graphic-smush-cdn-free-tier@2x.png' ); ?> 2x"
alt="<?php esc_html_e( 'Smush CDN', 'wp-smushit' ); ?>">
<p>
<?php esc_html_e( 'Multiply the speed and savings! Upload huge images and the Smush CDN will perfectly resize the files, safely convert to a Next-Gen format (WebP), and delivers them directly to your visitors from our blazing-fast multi-location globe servers.', 'wp-smushit' ); ?>
</p>
<ol class="sui-upsell-list">
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php esc_html_e( 'Fix Google PageSpeeds properly size images suggestion', 'wp-smushit' ); ?>
</li>
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php esc_html_e( 'WebP conversion with CDN', 'wp-smushit' ); ?>
</li>
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php esc_html_e( 'Serve background images from the CDN', 'wp-smushit' ); ?>
</li>
</ol>
<a href="<?php echo esc_url( Helper::get_url( 'smush_cdn_upgrade_button' ) ); ?>" class="sui-button sui-button-purple sui-margin-top" target="_blank">
<?php esc_html_e( 'UNLOCK NOW WITH PRO', 'wp-smushit' ); ?>
</a>
</div>