CMS Project Sync
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Bulk Smush Hub connection notice.
|
||||
*
|
||||
* @since 3.22.0
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var string $hub_connect_url Hub Connect URL.
|
||||
*/
|
||||
|
||||
?>
|
||||
<div class="sui-notice sui-notice-blue" style="margin-top: 10px">
|
||||
<div class="sui-notice-content smush-content-dark-blue">
|
||||
<div class="sui-notice-message">
|
||||
<i class="sui-notice-icon sui-icon-info sui-md smush-icon-dark-blue" aria-hidden="true"></i>
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e( 'A free WPMU DEV connection is required to use Bulk Smush. Takes seconds to set up — no credit card needed.', 'wp-smushit' );
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<a class="sui-button sui-button-blue smush-button-dark-blue" href="<?php echo esc_url( $hub_connect_url ); ?>"><?php esc_html_e( 'Connect For free', 'wp-smushit' ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Bulk compress dashboard meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var int $uncompressed Number of uncompressed attachments.
|
||||
* @var string $upsell_url Upsell URL.
|
||||
* @var bool $background_processing_enabled Whether background processing is enabled or not.
|
||||
* @var bool $background_in_processing Whether BO is in processing or not.
|
||||
* @var int $total_count Total count.
|
||||
*/
|
||||
?>
|
||||
<div class="sui-notice sui-notice-warning">
|
||||
<div class="sui-notice-content">
|
||||
<div class="sui-notice-message">
|
||||
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
|
||||
<p>
|
||||
<?php
|
||||
printf( /* translators: %d - number of uncompressed attachments */
|
||||
esc_html__( 'You have %d images that needs compressing!', 'wp-smushit' ),
|
||||
(int) $uncompressed
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( $uncompressed > \Smush\Core\Core::get_bulk_pause_limit() ) :
|
||||
?>
|
||||
<div class="sui-notice sui-notice-upsell">
|
||||
<div class="sui-notice-content">
|
||||
<div class="sui-notice-message">
|
||||
<span class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></span>
|
||||
<p>
|
||||
<?php
|
||||
printf( /* translators: %1$s - opening <a> tag, %2$s - closing </a> tag, %3$s - number of images */
|
||||
esc_html__( '%1$sUpgrade to Pro%2$s to bulk smush all images in one click. Free users can smush %3$s images per batch.', 'wp-smushit' ),
|
||||
'<a href="' . esc_url( $upsell_url ) . '" target="_blank" class="smush-upsell-link">',
|
||||
'</a>',
|
||||
(int) \Smush\Core\Core::get_bulk_pause_limit()
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo esc_url( $this->get_url( 'smush-bulk&smush-action=start-bulk-smush' ) ); ?>" class="sui-button sui-button-blue wp-smush-bulk-smush-link">
|
||||
<?php esc_html_e( 'Bulk Smush', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<div class="sui-notice sui-notice-info">
|
||||
<div class="sui-notice-content">
|
||||
<div class="sui-notice-message">
|
||||
<span class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></span>
|
||||
<p><?php esc_html_e( 'We haven’t found any images in your media library yet so there’s no compression to be done!', 'wp-smushit' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="sui-button sui-button-blue" href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>">
|
||||
<?php esc_html_e( 'UPLOAD IMAGES', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* CDN meta box header.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var string $title Meta box title.
|
||||
*/
|
||||
|
||||
use Smush\Core\Membership\Membership;
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<h3 class="sui-box-title"><?php echo esc_html( $title ); ?></h3>
|
||||
|
||||
<?php if ( Membership::get_instance()->is_api_hub_access_required() ) : ?>
|
||||
<div class="sui-actions-left">
|
||||
<span class="sui-tag sui-tag-ghost smush-sui-tag-blue"><?php esc_html_e( 'Free Plan', 'wp-smushit' ); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Bulk compress dashboard meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var int $uncompressed Number of uncompressed attachments.
|
||||
* @var string $upsell_url Upsell URL.
|
||||
* @var bool $scan_background_process_dead Whether Scan background process is dead or not.
|
||||
* @var int $total_count Total count.
|
||||
*/
|
||||
|
||||
use Smush\Core\Membership\Membership;
|
||||
use Smush\Core\Hub_Connector;
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
$msg = __( 'Bulk smush detects images that can be optimized and allows you to compress them in bulk. You can also smush non WordPress images that are outside of your uploads directory.', 'wp-smushit' );
|
||||
?>
|
||||
<p><?php echo esc_html( $msg ); ?></p>
|
||||
|
||||
<?php
|
||||
if ( Membership::get_instance()->is_api_hub_access_required() ) {
|
||||
$this->view( 'dashboard/bulk/connect-free', array( 'hub_connect_url' => Hub_Connector::get_connect_site_url( 'smush-bulk', 'smush_dashboard_bulk_smush_widget_connect' ) ) );
|
||||
} elseif ( $scan_background_process_dead ) {
|
||||
$this->view( 'scan-background-process-dead', array(), 'views/dashboard/bulk' );
|
||||
} elseif ( 0 === $total_count ) {
|
||||
$this->view( 'media-lib-empty', array(), 'views/dashboard/bulk' );
|
||||
} elseif ( 0 === $uncompressed ) {
|
||||
$this->view( 'all-images-smushed-notice', array( 'all_done' => true ), 'common' );
|
||||
} else {
|
||||
$this->view(
|
||||
'exists-uncompressed',
|
||||
array(
|
||||
'uncompressed' => $uncompressed,
|
||||
'upsell_url' => $upsell_url,
|
||||
),
|
||||
'views/dashboard/bulk'
|
||||
);
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
use Smush\Core\Helper;
|
||||
|
||||
$recheck_images_link = Helper::get_recheck_images_link();
|
||||
|
||||
$docs_link = $this->get_utm_link(
|
||||
array(
|
||||
'utm_campaign' => 'smush_troubleshooting_docs',
|
||||
'utm_content' => 'scan_failed_notice',
|
||||
),
|
||||
'https://wpmudev.com/docs/wpmu-dev-plugins/smush/#troubleshooting-guide'
|
||||
);
|
||||
?>
|
||||
<div class="sui-notice sui-notice-error">
|
||||
<div class="sui-notice-content">
|
||||
<div class="sui-notice-message">
|
||||
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: Open span tag <span>, 2: Open a link, 3: Close the link, 4: Close span tag </span>*/
|
||||
esc_html__( 'Scan failed due to limited resources on your site. We have adjusted the scan to use fewer resources the next time. %1$sPlease retry or refer to our %2$stroubleshooting guide%3$s to help resolve this.%4$s', 'wp-smushit' ),
|
||||
'<span style="display:block;margin-top:10px;margin-bottom:5px">',
|
||||
'<a style="text-decoration:underline" target="_blank" href="' . esc_url( $docs_link ) . '">',
|
||||
'</a>',
|
||||
'</span>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="<?php echo esc_url( $recheck_images_link ); ?>" class="sui-button sui-button-blue wp-smush-retry-scan-link">
|
||||
<?php esc_html_e( 'Re-check Images', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* CDN meta box header.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var string $title Meta box title.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<h3 class="sui-box-title"><?php echo esc_html( $title ); ?></h3>
|
||||
|
||||
<div class="sui-actions-left">
|
||||
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Pro', 'wp-smushit' ); ?></span>
|
||||
</div>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* CDN meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var string $cdn_status CDN status.
|
||||
* @var string $upsell_url Upsell URL.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
?>
|
||||
<?php $this->view( 'cdn/header-description' ); ?>
|
||||
|
||||
<a href="<?php echo esc_url( $upsell_url ); ?>" target="_blank" class="sui-button sui-button-purple">
|
||||
<?php esc_html_e( 'Upgrade to Pro', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Directory compress meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var array $images Array of images with errors.
|
||||
* @var int $errors Number of errors.
|
||||
*
|
||||
* @var Smush\App\Abstract_Page $this Dashboard page.
|
||||
*/
|
||||
|
||||
use Smush\Core\Directory\Directory_UI_Controller;
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'In addition to smushing your media uploads, you may want to smush non WordPress images that are outside of your uploads directory. Get started by adding files and folders you wish to optimize.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
|
||||
<?php if ( ! empty( $images ) ) : ?>
|
||||
<?php
|
||||
$directory_smush_ui_controller = new Directory_UI_Controller();
|
||||
$directory_smush_ui_controller->render_scan_result( 20 );
|
||||
?>
|
||||
<a href="<?php echo esc_url( $this->get_url( 'smush-bulk' ) ); ?>&smush__directory-scan=done#directory_smush-settings-row" class="sui-button sui-button-ghost" style="margin-top: 30px;">
|
||||
<span class="sui-icon-eye" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'View All', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<a href="<?php echo esc_url( $this->get_url( 'smush-bulk' ) ); ?>&smush__directory-start#directory_smush-settings-row" class="sui-button sui-button-blue">
|
||||
<?php esc_html_e( 'Choose Directory', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* Integrations meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var array $basic_features Basic features.
|
||||
* @var array $fields Available integration settings.
|
||||
* @var array $settings Settings array.
|
||||
* @var string $upsell_url Upsell link.
|
||||
*/
|
||||
|
||||
use Smush\Core\Settings;
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'Integrate with powerful third-party providers and make compression even easier.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
|
||||
<div class="sui-box-settings-row sui-flushed sui-no-padding">
|
||||
<table class="sui-table sui-table-flushed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php esc_html_e( 'Available Integrations', 'wp-smushit' ); ?></th>
|
||||
<th><?php esc_html_e( 'Status', 'wp-smushit' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ( $fields as $name ) : ?>
|
||||
<?php
|
||||
$disable = apply_filters( 'wp_smush_integration_status_' . $name, false ); // Disable setting.
|
||||
$upsell = ! in_array( $name, $basic_features, true ); // Gray out row, disable setting.
|
||||
$value = ! ( $upsell || empty( $settings[ $name ] ) || $disable ) && $settings[ $name ];
|
||||
?>
|
||||
<tr class="<?php echo $upsell ? 'smush-disabled-table-row' : ''; ?>">
|
||||
<td class="sui-table-item-title">
|
||||
<?php echo esc_html( Settings::get_setting_data( $name, 'short-label' ) ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ( $upsell ) : ?>
|
||||
<span class="sui-tag sui-tag-purple sui-tag-sm"><?php esc_html_e( 'PRO', 'wp-smushit' ); ?></span>
|
||||
<?php elseif ( $value ) : ?>
|
||||
<span class="sui-tag sui-tag-green"><?php esc_html_e( 'Active', 'wp-smushit' ); ?></span>
|
||||
<?php else : ?>
|
||||
<span class="sui-tag"><?php esc_html_e( 'Inactive', 'wp-smushit' ); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p><?php esc_html_e( 'Smush Pro supports hosting images on Amazon S3 and optimizing NextGen Gallery images directly through NextGen Gallery settings.', 'wp-smushit' ); ?></p>
|
||||
<p>
|
||||
<?php
|
||||
printf( /* translators: %1$s - opening <a>, %2$s - closing </a> */
|
||||
esc_html__( '%1$sUnlock now%2$s with a WPMU DEV membership today!', 'wp-smushit' ),
|
||||
'<a href="' . esc_url( $upsell_url ) . '" target="_blank" class="smush-upsell-link">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<a href="<?php echo esc_url( $this->get_url( 'smush-integrations' ) ); ?>" class="sui-button sui-button-ghost">
|
||||
<span class="sui-icon-wrench-tool" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Configure', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* Lazy load meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var bool $is_lazy_load_active Is lazy load module active.
|
||||
* @var bool $is_preload_active Is preload module active.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'Boost your site’s speed and PageSpeed scores with smart image loading. Lazy Load delays offscreen images for faster initial loads, while Image Sizing helps you with properly sized images and adds missing dimensions. Preload Critical Images ensures key above-the-fold content loads instantly—improving LCP and perceived performance.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="sui-box-settings-row sui-flushed sui-no-padding">
|
||||
<table class="sui-table sui-table-flushed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php esc_html_e( 'Available Features', 'wp-smushit' ); ?></th>
|
||||
<th><?php esc_html_e( 'Status', 'wp-smushit' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr class="smush-feature-lazy-load">
|
||||
<td class="sui-table-item-title">
|
||||
<?php esc_html_e( 'Lazy Load', 'wp-smushit' ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ( $is_lazy_load_active ) : ?>
|
||||
<span class="sui-tag sui-tag-green"><?php esc_html_e( 'Active', 'wp-smushit' ); ?></span>
|
||||
<?php else : ?>
|
||||
<span class="sui-tag"><?php esc_html_e( 'Inactive', 'wp-smushit' ); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="smush-disabled-table-row">
|
||||
<td class="sui-table-item-title">
|
||||
<?php esc_html_e( 'Preload Critical Images', 'wp-smushit' ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<span class="sui-tag sui-tag-purple sui-tag-sm"><?php esc_html_e( 'PRO', 'wp-smushit' ); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<a href="<?php echo esc_url( $this->get_url( 'smush-lazy-preload' ) ); ?>" class="sui-button sui-button-ghost">
|
||||
<span class="sui-icon-wrench-tool" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Configure', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Local WebP meta box header.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var string $title Meta box title.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<h3 class="sui-box-title"><?php echo esc_html_e( 'Next-Gen Formats', 'wp-smushit' ); ?></h3>
|
||||
|
||||
<div class="sui-actions-left">
|
||||
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Pro', 'wp-smushit' ); ?></span>
|
||||
</div>
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Local WebP meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*/
|
||||
|
||||
use Smush\Core\Next_Gen\Next_Gen_Manager;
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
$next_gen_manager = Next_Gen_Manager::get_instance();
|
||||
$upsell_url = $this->get_utm_link( array( 'utm_campaign' => 'smush-dashboard-next-gen-upsell' ) );
|
||||
/* translators: %s: Next-Gen format name */
|
||||
$next_gen_description = sprintf( __( 'Serve %1$s versions of your images to supported browsers, and gracefully fall back on JPEGs and PNGs for browsers that don\'t support %1$s.', 'wp-smushit' ), $next_gen_manager->get_active_format_name() );
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php echo esc_html( $next_gen_description ); ?>
|
||||
</p>
|
||||
|
||||
<a href="<?php echo esc_url( $upsell_url ); ?>" target="_blank" class="sui-button sui-button-purple">
|
||||
<?php esc_html_e( 'Upgrade to Pro', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/**
|
||||
* Summary meta box on dashboard page.
|
||||
*
|
||||
* @since 3.8.3
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var string $cdn_status CDN status.
|
||||
* @var string $human_bytes
|
||||
* @var bool $is_cdn CDN module status.
|
||||
* @var bool $is_lazy_load Lazy load status.
|
||||
* @var int $resize_count Number of resizes images.
|
||||
* @var string $upsell_url_cdn CDN upsell URL.
|
||||
* @var string $percent_grade Circle grade class.
|
||||
* @var int|float $percent_metric Metric to calculate circle score.
|
||||
* @var int $percent_optimized Percent optimized.
|
||||
* @var int $total_optimized Total nubmer of images optimized.
|
||||
* @var string|int $stats_percent
|
||||
*/
|
||||
|
||||
use Smush\App\Admin;
|
||||
use Smush\Core\Next_Gen\Next_Gen_Manager;
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
$next_gen_manager = Next_Gen_Manager::get_instance();
|
||||
$next_gen_activated = ( ! $is_cdn ) && $next_gen_manager->is_active();
|
||||
$next_gen_configured = $next_gen_activated && $next_gen_manager->is_configured();
|
||||
$upsell_url_next_gen = $this->get_utm_link(
|
||||
array(
|
||||
'utm_campaign' => 'summary_next-gen',
|
||||
)
|
||||
);
|
||||
|
||||
$this->view(
|
||||
'scan-progress-bar',
|
||||
array(),
|
||||
'common'
|
||||
);
|
||||
|
||||
$this->view(
|
||||
'circle-progress-bar',
|
||||
array(
|
||||
'percent_grade' => $percent_grade,
|
||||
'percent_optimized' => $percent_optimized,
|
||||
'percent_metric' => $percent_metric,
|
||||
),
|
||||
'common'
|
||||
);
|
||||
|
||||
$this->view(
|
||||
'summary-segment',
|
||||
array(
|
||||
'human_bytes' => $human_bytes,
|
||||
'total_optimized' => $total_optimized,
|
||||
'stats_percent' => $stats_percent,
|
||||
'resize_count' => $resize_count,
|
||||
),
|
||||
'common'
|
||||
);
|
||||
?>
|
||||
<div class="sui-summary-segment" style="overflow: visible">
|
||||
<ul class="sui-list">
|
||||
<li>
|
||||
<span class="sui-list-label">
|
||||
<?php esc_html_e( 'CDN', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
<span class="sui-list-detail">
|
||||
<?php
|
||||
$cdn_upsell_tooltip = sprintf(
|
||||
/* translators: %d: Number of CDN PoP locations */
|
||||
esc_attr__( 'Multiply the speed and savings! Serve your images from our CDN from %d blazing fast servers around the world.', 'wp-smushit' ),
|
||||
Admin::get_cdn_pop_locations()
|
||||
);
|
||||
?>
|
||||
<a href="<?php echo esc_url( $upsell_url_cdn ); ?>" target="_blank" class="smush-upgrade-text">
|
||||
<?php esc_html_e( 'Upgrade', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
<span class="sui-tooltip sui-tooltip-constrained sui-tooltip-top-right" style="--tooltip-width: 360px;" data-tooltip="<?php echo esc_attr( $cdn_upsell_tooltip ); ?>">
|
||||
<span class="sui-tag sui-tag-sm sui-tag-purple"><?php esc_html_e( 'Pro', 'wp-smushit' ); ?></span>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<?php if ( ! is_multisite() ) : ?>
|
||||
<li>
|
||||
<span class="sui-list-label">
|
||||
<?php esc_html_e( 'Next-Gen Formats', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
<span class="sui-list-detail">
|
||||
<a href="<?php echo esc_url( $upsell_url_next_gen ); ?>" target="_blank" class="smush-upgrade-text">
|
||||
<?php esc_html_e( 'Upgrade', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
<span class="sui-tooltip sui-tooltip-constrained sui-tooltip-top-right" style="--tooltip-width: 360px;" data-tooltip="<?php esc_attr_e( 'Fix the "Serve images in next-gen format" Google PageSpeed recommendation with a single click! Serve WebP and AVIF images directly from your server to supported browsers, while seamlessly switching to original images for those without WebP or AVIF support. All without relying on a CDN or any server configuration.', 'wp-smushit' ); ?>">
|
||||
<span class="sui-tag sui-tag-sm sui-tag-purple"><?php esc_html_e( 'Pro', 'wp-smushit' ); ?></span>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<span class="sui-list-label">
|
||||
<?php esc_html_e( 'Lazy Load', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
<span class="sui-list-detail">
|
||||
<?php if ( $is_lazy_load ) : ?>
|
||||
<a href="<?php echo esc_url( $this->get_url( 'smush-lazy-preload' ) ); ?>">
|
||||
<span class="sui-tag sui-tag-green"><?php esc_html_e( 'Active', 'wp-smushit' ); ?></span>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<a href="<?php echo esc_url( $this->get_url( 'smush-lazy-preload' ) ); ?>">
|
||||
<span class="sui-tag"><?php esc_html_e( 'Inactive', 'wp-smushit' ); ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php $this->view( 'summary/lossy-level' ); ?>
|
||||
</ul>
|
||||
</div>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Tools meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var bool $is_resize_detection Image resize detection module status.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'Use Tools for extra configurations.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
|
||||
<div class="sui-box-settings-row sui-flushed sui-no-padding">
|
||||
<table class="sui-table sui-table-flushed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php esc_html_e( 'Available Tools', 'wp-smushit' ); ?></th>
|
||||
<th><?php esc_html_e( 'Status', 'wp-smushit' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="sui-table-item-title">
|
||||
<?php esc_html_e( 'Image Resize Detection', 'wp-smushit' ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ( $is_resize_detection ) : ?>
|
||||
<span class="sui-tag sui-tag-green"><?php esc_html_e( 'Active', 'wp-smushit' ); ?></span>
|
||||
<?php else : ?>
|
||||
<span class="sui-tag"><?php esc_html_e( 'Inactive', 'wp-smushit' ); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<a href="<?php echo esc_url( $this->get_url( 'smush-settings' ) ); ?>" class="sui-button sui-button-ghost">
|
||||
<span class="sui-icon-wrench-tool" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'View Tools', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Upsell meta box header.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var string $title Meta box title.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<h3 class="sui-box-title"><?php echo esc_html( $title ); ?></h3>
|
||||
<div class="sui-actions-left">
|
||||
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Pro', 'wp-smushit' ); ?></span>
|
||||
</div>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Upsell meta box.
|
||||
*
|
||||
* @since 3.8.6
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var string $upsell_url Upsell URL.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'Get our full WordPress image optimization suite with Smush Pro and additional benefits of WPMU DEV membership.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
|
||||
<ol class="sui-upsell-list">
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Serve images faster with Ultra compression', 'wp-smushit' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Fix Google PageSpeed image recommendations', 'wp-smushit' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php echo esc_html( $this->whitelabel->whitelabel_string( __( 'Up to 50 GB Smush CDN', 'wp-smushit' ) ) ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Background optimization', 'wp-smushit' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Unlimited image optimization', 'wp-smushit' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Serve WebP & AVIF formats with Next-Gen Conversion', 'wp-smushit' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php esc_html_e( 'Optimize Largest Contentful Paint (LCP) images', 'wp-smushit' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php esc_html_e( '24/7 live WordPress support', 'wp-smushit' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="sui-icon-check sui-md" aria-hidden="true"></span>
|
||||
<?php esc_html_e( '30-day money-back guarantee', 'wp-smushit' ); ?>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<a href="<?php echo esc_url( $upsell_url ); ?>" target="_blank" class="sui-button sui-button-purple sui-margin-top">
|
||||
<?php esc_html_e( 'UNLOCK NOW WITH PRO', 'wp-smushit' ); ?>
|
||||
</a>
|
||||
Reference in New Issue
Block a user