CMS Project Sync

This commit is contained in:
2026-04-15 15:59:53 -04:00
parent 015ea75186
commit a747e2a1d9
11220 changed files with 2590467 additions and 0 deletions
@@ -0,0 +1,68 @@
<?php
/**
* Settings meta box.
*
* @package WP_Smush
*
* @var array $basic_features Basic features list.
* @var bool $cdn_enabled CDN status.
* @var array $settings Settings values.
* @var bool $backup_exists Number of attachments with backups.
*/
use Smush\Core\Settings;
if ( ! defined( 'WPINC' ) ) {
die;
}
// Original Images Move Notice.
$smush_admin = WP_Smush::get_instance()->admin();
$notice_hidden = $smush_admin->is_notice_dismissed( 'original-images-move' );
$should_show_notice = false;
if ( ! $notice_hidden ) {
$event_times = get_site_option( 'wp_smush_event_times' );
$should_show_notice = ! empty( $event_times['plugin_upgraded'] );
}
if ( $should_show_notice ) :
?>
<div class="is-dismissible smush-dismissible-notice" data-key="original-images-move" style="margin-bottom: 30px;">
<div class="sui-notice sui-notice-info">
<div class="sui-notice-content">
<div class="sui-notice-message">
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
<p>
<?php
printf(
/* translators: 1: <strong> 2: </strong> */
esc_html__( 'We\'ve moved the %1$sOriginal Images settings%2$s to %1$sAdvanced Settings section%2$s below.', 'wp-smushit' ),
'<strong>',
'</strong>'
);
?>
</p>
</div>
<div class="sui-notice-actions">
<button class="sui-button-icon smush-dismiss-notice-button">
<i class="sui-icon-close" aria-hidden="true"></i>
<span class="sui-screen-reader-text">
<?php esc_html_e( 'Dismiss', 'wp-smushit' ); ?>
</span>
</button>
</div>
</div>
</div>
</div>
<?php
endif;
do_action( 'wp_smush_bulk_smush_settings', $grouped_settings );
do_action_deprecated(
'wp_smush_after_basic_settings',
array(),
'3.21.0',
'wp_smush_after_advanced_settings',
__( 'The wp_smush_after_basic_settings hook is deprecated. Use wp_smush_after_advanced_settings instead.', 'wp-smushit' )
);
@@ -0,0 +1,20 @@
<?php
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-box-body" style="padding: 6px 25px; display:flex; align-items: center;">
<img style="margin-right: 15px" src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-config-icon.png' ); ?>" srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-config-icon.png' ); ?> 1x, <?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-config-icon@2x.png' ); ?> 2x" alt="<?php esc_attr_e( 'Smush Logo', 'wp-smushit' ); ?>"/>
<p>
<span style="display:block; margin-bottom:10px;">
<?php
printf(
/* translators: 1: Opening strong tag, 2: Closing strong tag */
esc_html__( 'Optimization is in progress. Please %1$sdo not close this tab or navigate away%2$s from this page, to avoid process failure.', 'wp-smushit' ),
'<strong>',
'</strong>'
);
?>
</span>
</p>
</div>
@@ -0,0 +1,17 @@
<?php
/**
* Notification for auto Bulk Smush on scan completed while re-checking images.
*/
?>
<div class="sui-notice sui-notice-grey wp-smush-auto-bulk-smush-notification sui-hidden">
<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( 'Once Smush completes the recheck process it will begin the Smush, it is recommended to keep this page open to initiate bulk image compression.', 'wp-smushit' );
?>
</p>
</div>
</div>
</div>
@@ -0,0 +1,26 @@
<?php
$docs_link = $this->get_utm_link(
array(
'utm_campaign' => 'smush_troubleshooting_docs_cron_disabled',
),
'https://wpmudev.com/docs/wpmu-dev-plugins/smush/#troubleshooting-guide'
);
?>
<div class="sui-notice sui-notice-warning smush-cron-disabled-notice">
<div class="sui-notice-content">
<div class="sui-notice-message">
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
<p>
<?php
printf(
/* translators: %s1$d - Open link, %2$s - Close the link */
esc_html__( 'It seems cron is disabled on your site. Please enable cron before running Bulk Smush to ensure everything works as expected. %1$sLearn More%2$s', 'wp-smushit' ),
'<a href="' . esc_url( $docs_link ) . '" target="_blank"><strong>',
'</strong></a>'
);
?>
</p>
</div>
<div class="sui-notice-actions"><button class="sui-button-icon" data-notice-close="smush-box-cron-disabled-notice" type="button"><span class="sui-icon-check" aria-hidden="true"></span><span class="sui-screen-reader-text"><?php esc_html_e( 'Close this notice', 'wp-smushit' ); ?></span></button></div>
</div>
</div>
@@ -0,0 +1,25 @@
<?php
/**
* Show Unlimited upsell on Bulk Smush completed.
*
* @var string $bulk_upgrade_url Upgrade pro url.
* @var string $global_upsell_desc Upgrade pro notice description.
*/
?>
<div class="sui-box-body sui-margin-top wp-smush-global-upsell wp-smush-upsell-on-completed sui-hidden">
<div class="smush-box-image">
<img class="sui-image-icon" src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/bulk-smush/global-upsell-icon.png' ); ?>"
srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/bulk-smush/global-upsell-icon@2x.png' ); ?> 2x"
alt="<?php esc_html_e( 'Smush Upsell Icon', 'wp-smushit' ); ?>">
</div>
<div class="sui-box-content">
<p>
<?php echo esc_html( $global_upsell_desc ); ?>
</p>
<a href="<?php echo esc_url( $bulk_upgrade_url ); ?>" class="smush-upsell-link" target="_blank">
<?php
esc_html_e( 'Get Smush Pro', 'wp-smushit' );
?>
</a>
</div>
</div>
@@ -0,0 +1,122 @@
<?php
/**
* Hub connect section template for Smush bulk optimization page.
*
* @package WP_Smush
* @since 3.22.0
*
* @var int $images_count Number of images found for optimization.
* @var string $connect_url URL for connecting to WPMU DEV.
*/
?>
<div class="smush-hub-connect">
<div class="smush-hub-connect-box sui-box-body">
<div class="smush-connect-message sui-block-content-center sui-message sui-margin-top sui-spacing-top--40">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/bulk-smush/hub-connect.png' ); ?>"
srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/bulk-smush/hub-connect@2x.png' ); ?> 2x"
alt="<?php esc_attr_e( 'Graphic CDN', 'wp-smushit' ); ?>">
<div class="smush-connect-content sui-message-content">
<?php if ( ! is_network_admin() && $images_count > 0 ) : ?>
<p class="smush-images-found-text sui-no-margin">
<?php
printf(
/* translators: %s: number of images found */
esc_html__( 'Smush found %s images waiting to be compressed', 'wp-smushit' ),
'<strong>' . esc_html( $images_count ) . '</strong>'
);
?>
</p>
<?php endif; ?>
<h2 class="smush-connect-title">
<?php esc_html_e( 'Connect Now to Unlock Bulk Smush', 'wp-smushit' ); ?>
</h2>
<p class="smush-connect-description sui-no-margin">
<?php
printf(
/* translators: %1$s: opening strong tag, %2$s: closing strong tag */
esc_html__( 'To start smushing your images, you\'ll just need to connect your site to WPMU DEV. It\'s %1$stotally free%2$s. It\'ll take just a %1$sfew seconds%2$s and there\'s %1$sno credit card%2$s needed or fiddly API key copy-pasting involved.', 'wp-smushit' ),
'<strong>',
'</strong>',
);
?>
</p>
<a href="<?php echo esc_url( $connect_url ); ?>"
class="smush-connect-button sui-button sui-button-blue sui-margin-top smush-button-dark-blue"
>
<?php esc_html_e( 'CONNECT MY SITE', 'wp-smushit' ); ?>
</a>
</div>
</div>
</div>
<div class="smush-hub-connect-benefits">
<div class="smush-benefits-container sui-box-body">
<h2 class="smush-benefits-title sui-box-body sui-spacing-bottom--50">
<?php esc_html_e( 'When you connect, you\'ll get', 'wp-smushit' ); ?>
</h2>
<div class="smush-benefits-grid benefits-grid sui-margin-bottom">
<div class="smush-benefit-item benefit-item">
<div class="smush-benefit-icon benefit-icon">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/bulk-smush/api-connect-icon.svg' ); ?>" alt="<?php esc_attr_e( 'Bulk Smush API Access Icon', 'wp-smushit' ); ?>">
</div>
<div class="smush-benefit-content benefit-content">
<h3 class="smush-benefit-title">
<?php esc_html_e( 'Instant access to Bulk Smush API', 'wp-smushit' ); ?>
</h3>
<p class="smush-benefit-description">
<?php esc_html_e( 'Optimize everything in your Media Library to make your site as light as a feather.', 'wp-smushit' ); ?>
</p>
</div>
</div>
<div class="smush-benefit-item benefit-item">
<div class="smush-benefit-icon benefit-icon">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/bulk-smush/unlimited-smush-icon.svg' ); ?>" alt="<?php esc_attr_e( 'Unlimited Smushing Icon', 'wp-smushit' ); ?>">
</div>
<div class="smush-benefit-content benefit-content">
<h3 class="smush-benefit-title">
<?php esc_html_e( 'Unlimited Bulk Smushing', 'wp-smushit' ); ?>
</h3>
<p class="smush-benefit-description">
<?php esc_html_e( 'Compress ALL your images - no limits or additional credits required.', 'wp-smushit' ); ?>
</p>
</div>
</div>
<div class="smush-benefit-item benefit-item">
<div class="smush-benefit-icon benefit-icon">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/bulk-smush/directory-smush-icon.svg' ); ?>" alt="<?php esc_attr_e( 'PNG to JPEG Conversion Icon', 'wp-smushit' ); ?>">
</div>
<div class="smush-benefit-content benefit-content">
<h3 class="smush-benefit-title">
<?php esc_html_e( 'Directory Smush', 'wp-smushit' ); ?>
</h3>
<p class="smush-benefit-description">
<?php esc_html_e( 'Automatically bulk Smush images in a directory outside the Media Library.', 'wp-smushit' ); ?>
</p>
</div>
</div>
<div class="smush-benefit-item benefit-item">
<div class="smush-benefit-icon benefit-icon">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/bulk-smush/auto-smush-icon.svg' ); ?>"
alt="<?php esc_attr_e( 'Auto-Smushing Icon', 'wp-smushit' ); ?>">
</div>
<div class="smush-benefit-content benefit-content">
<h3 class="smush-benefit-title">
<?php esc_html_e( 'Auto-Smushing on Upload', 'wp-smushit' ); ?>
</h3>
<p class="smush-benefit-description">
<?php esc_html_e( 'Optimize all new images as soon as they\'re uploaded, keeping your site fast effortlessly.', 'wp-smushit' ); ?>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,32 @@
<?php
/**
* Limit reached notice metabox on bulk smush page.
*
* @var bool $smush_type Whether the notice is for directory smush or bulk smush.
*/
$smush_type = $smush_type ?? 'bulk-smush';
?>
<div id="<?php echo esc_attr( $smush_type ); ?>-limit-reached-notice" class="sui-notice sui-notice-warning sui-hidden smush-limit-reached-notice">
<div class="sui-notice-content">
<div class="sui-notice-message">
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
<p>
<?php
$is_directory_smush = 'directory-smush' === $smush_type;
$upgrade_url = $this->get_utm_link(
array(
'utm_campaign' => $is_directory_smush ? 'smush_directory_smush_paused_50_limit' : 'smush_bulk_smush_paused_50_limit',
)
);
printf(
/* translators: %s1$d - bulk smush limit, %2$s - upgrade link, %3$s - <strong>, %4$s - </strong>, %5$s - Bulk Smush limit */
esc_html__( 'The free version of Smush only allows you to compress %1$d images at a time. Skip limits, save time. Bulk Smush unlimited images — %2$sGet Smush Pro!%3$s', 'wp-smushit' ),
(int) Smush\Core\Core::get_bulk_pause_limit(),
'<a class="smush-upsell-link" href="' . esc_url( $upgrade_url ) . '" target="_blank">',
'</a>',
);
?>
</p>
</div>
</div>
</div>
@@ -0,0 +1,25 @@
<div class="smush-final-log bulk-smush-final-log sui-hidden">
<div class="smush-bulk-error-header">
<div class="smush-bulk-error-row">
<div class="smush-bulk-image-data">
<div class="smush-bulk-image-title">
<?php esc_html_e( 'File Name', 'wp-smushit' ); ?>
</div>
<div class="smush-image-error"><?php esc_html_e( 'Status', 'wp-smushit' ); ?></div>
</div>
<div class="smush-bulk-image-actions">
<?php esc_html_e( 'Actions', 'wp-smushit' ); ?>
</div>
</div>
</div>
<div class="smush-bulk-errors"></div>
<div class="smush-bulk-errors-actions sui-hidden">
<a href="<?php echo esc_url( apply_filters( 'smush_unsmushed_media_filter_url', admin_url( 'upload.php?mode=list&attachment-filter=post_mime_type:image&smush-filter=failed_processing' ) ) ); ?>" class="sui-button">
<i class="sui-icon-eye" aria-hidden="true"></i>
<?php esc_html_e( 'View all in library', 'wp-smushit' ); ?>
</a>
<span class="sui-button sui-button-ghost wp_smush_ignore_all_failed_items">
<?php esc_html_e( 'Ignore all', 'wp-smushit' ); ?>
</span>
</div>
</div>
@@ -0,0 +1,152 @@
<?php
/**
* Compression Level.
*
* @var $name string Compression field name.
* @var $value mixed Current compression value.
*/
use Smush\Core\Settings;
$settings = Settings::get_instance();
$lossy_level_setting = $settings->get_lossy_level_setting();
$level_basic = Settings::get_level_lossless();
$level_super = Settings::get_level_super_lossy();
$level_ultra = Settings::get_level_ultra_lossy();
$level_labels = array(
Settings::get_level_lossless() => __( 'Basic', 'wp-smushit' ),
Settings::get_level_super_lossy() => __( 'Super', 'wp-smushit' ),
Settings::get_level_ultra_lossy() => __( 'Ultra', 'wp-smushit' ),
);
$level_notices = array(
Settings::get_level_lossless() => sprintf(
/* translators: 1: opening <strong>, 2: closing </strong> */
__( '%1$sBasic:%2$s Achieve flawless, lossless compression for pixel-perfect images. Minimal file size reduction, negligible impact on speed.', 'wp-smushit' ),
'<strong>',
'</strong>'
),
Settings::get_level_super_lossy() => sprintf(
/* translators: 1: opening <strong>, 2: closing </strong> */
__( '%1$sSuper:%2$s Harness the power of lossy compression for substantial file size reduction with excellent image clarity. Accelerate page loads for better performance.', 'wp-smushit' ),
'<strong>',
'</strong>'
),
Settings::get_level_ultra_lossy() => sprintf(
/* translators: 1: opening <strong>, 2: closing </strong> */
__( '%1$sUltra:%2$s Unlock unprecedented compression levels up to 5x greater than Super, while preserving remarkable image quality. The ultimate choice for unparalleled performance.', 'wp-smushit' ),
'<strong>',
'</strong>'
),
);
?>
<div class="sui-tabs sui-side-tabs wp-smush-lossy-level-tabs">
<div role="tablist" class="sui-tabs-menu">
<!-- Basic -->
<button
type="button"
role="tab"
id="lossy-level__basic"
class="sui-tab-item<?php echo $level_basic === $lossy_level_setting ? ' active' : ''; ?>"
aria-controls="lossy-level__basic-notice">
<?php echo esc_html( $settings->get_lossy_level_label( $level_basic ) ); ?>
</button>
<input
type="radio"
class="sui-screen-reader-text"
aria-hidden="true"
name="<?php echo esc_attr( $name ); ?>"
aria-labelledby="<?php echo esc_attr( $name . '-label' ); ?>"
aria-describedby="<?php echo esc_attr( $name . '-desc' ); ?>"
value="<?php echo (int) $level_basic; ?>"
<?php checked( $lossy_level_setting, $level_basic, true ); ?> />
<!-- Super -->
<button
type="button"
role="tab"
id="lossy-level__super"
class="sui-tab-item<?php echo $level_super === $lossy_level_setting ? ' active' : ''; ?>"
aria-controls="lossy-level__super-notice"
tabindex="-1">
<?php echo esc_html( $settings->get_lossy_level_label( $level_super ) ); ?>
</button>
<input
type="radio"
class="sui-screen-reader-text"
aria-hidden="true"
name="<?php echo esc_attr( $name ); ?>"
aria-labelledby="<?php echo esc_attr( $name . '-label' ); ?>"
aria-describedby="<?php echo esc_attr( $name . '-desc' ); ?>"
value="<?php echo (int) $level_super; ?>"
<?php checked( $lossy_level_setting, $level_super, true ); ?> />
<!-- Ultra -->
<?php
$utm_link = $this->get_utm_link(
array(
'utm_campaign' => 'smush_ultra_bulksmush_radio',
)
);
?>
<a target="_blank" href="<?php echo esc_url( $utm_link ); ?>" class="sui-tab-item wp-smush-ultra-compression-link wp-smush-upsell-ultra-compression">
<?php esc_html_e( '🚀 Ultra - unlock 5x more compression', 'wp-smushit' ); ?>
<span class="sui-icon-open-new-window" aria-hidden="true"></span>
</a>
</div>
<div class="sui-tabs-content">
<div role="tabpanel"
id="lossy-level__basic-notice"
class="sui-tab-content<?php echo $level_basic === $lossy_level_setting ? ' active' : ''; ?>"
aria-labelledby="lossy-level__basic"
tabindex="0">
<p>
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
<?php
echo wp_kses(
$level_notices[ $level_basic ],
array(
'strong' => array(),
)
);
?>
</p>
</div>
<div role="tabpanel"
id="lossy-level__super-notice"
class="sui-tab-content<?php echo $level_super === $lossy_level_setting ? ' active' : ''; ?>"
aria-labelledby="lossy-level__super"
tabindex="0"
hidden>
<p>
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
<?php
echo wp_kses(
$level_notices[ $level_super ],
array(
'strong' => array(),
)
);
?>
</p>
</div>
<div role="tabpanel"
id="lossy-level__ultra-notice"
class="sui-tab-content<?php echo $level_ultra === $lossy_level_setting ? ' active' : ''; ?>"
aria-labelledby="lossy-level__ultra"
tabindex="0"
hidden>
<p>
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
<?php
echo wp_kses(
$level_notices[ $level_ultra ],
array(
'strong' => array(),
)
);
?>
</p>
</div>
</div>
</div>
@@ -0,0 +1,19 @@
<div class="sui-message">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-no-media.png' ); ?>"
srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-no-media.png' ); ?>, <?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-no-media@2x.png' ); ?> 2x"
alt="<?php esc_attr_e( 'No attachments found - Upload some images', 'wp-smushit' ); ?>"
class="sui-image"
>
<div class="sui-message-content">
<p>
<?php esc_html_e( 'We havent found any images in your media library yet so theres no smushing to be done!', 'wp-smushit' ); ?><br>
<?php esc_html_e( 'Once you upload images, reload this page and start playing!', 'wp-smushit' ); ?>
</p>
<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>
</div>
</div>
@@ -0,0 +1,41 @@
<?php
/**
* Bulk Smush meta box header.
*
* @package WP_Smush
*
* @var string $title Title.
*/
use Smush\Core\Next_Gen\Next_Gen_Manager;
if ( ! defined( 'WPINC' ) ) {
die;
}
$start_bulk_webp_conversion = ! empty( $_GET['smush-action'] ) && 'start-bulk-next-gen-conversion' === wp_unslash( $_GET['smush-action'] );
$next_gen_manager = Next_Gen_Manager::get_instance();
?>
<h3 class="sui-box-title">
<?php
echo esc_html( $title );
if ( $start_bulk_webp_conversion ) {
echo ' ';
// translators: %s - Next-Gen Conversion.
printf( esc_html__( 'with %s Conversion', 'wp-smushit' ), esc_html( $next_gen_manager->get_active_format_name() ) );
}
?>
</h3>
<div class="sui-actions-right">
<small>
<?php
printf(
/* translators: %1$s - a href opening tag, %2$s - a href closing tag */
esc_html__( 'Smush individual images via your %1$sMedia Library%2$s', 'wp-smushit' ),
'<a href="' . esc_url( admin_url( 'upload.php' ) ) . '" title="' . esc_html__( 'Media Library', 'wp-smushit' ) . '">',
'</a>'
);
?>
</small>
</div>
@@ -0,0 +1,97 @@
<?php
/**
* Bulk Smush meta box.
*
* @since 2.9.0
* @package WP_Smush
*
* @var Smush\Core\Core $core Instance of Smush\Core\Core
* @var bool $total_count
* @var integer $unsmushed_count Count of the images that need smushing.
* @var integer $resmush_count Count of the images that need re-smushing.
* @var integer $remaining_count Remaining count of all images to smush. Unsmushed images + images to re-smush.
* @var string $bulk_upgrade_url Bulk Smush upgrade to PRO url.
* @var string $upsell_cdn_url Upsell CDN URL.
* @var string $in_processing_notice
*/
use Smush\Core\Stats\Global_Stats;
if ( ! defined( 'WPINC' ) ) {
die;
}
if ( 0 !== absint( $total_count ) ) :
$msg = __( 'Bulk smush detects images that can be optimized and allows you to compress them in bulk.', 'wp-smushit' );
?>
<p><?php echo esc_html( $msg ); ?></p>
<?php endif; ?>
<?php
$this->view(
'loopback-error-dialog',
array(),
'modals'
);
// If there are no images in media library.
if ( 0 === absint( $total_count ) ) {
$this->view( 'media-lib-empty', array(), 'views/bulk' );
return;
}
$this->view(
'auto-bulk-smush-notification',
array(),
'views/bulk'
);
$this->view(
'limit-reached-notice',
array(),
'views/bulk'
);
// Progress bar.
$this->view(
'progress-bar',
array(
'count' => $remaining_count,
'in_processing_notice' => $in_processing_notice,
),
'common'
);
// All images are smushed.
$this->view( 'all-images-smushed-notice', array( 'all_done' => empty( $remaining_count ) ), 'common' );
// List errors.
$this->view( 'list-errors', array(), 'views/bulk' );
?>
<div class="wp-smush-bulk-wrapper sui-border-frame<?php echo empty( $remaining_count ) ? ' sui-hidden' : ''; ?>">
<div id="wp-smush-bulk-content">
<?php WP_Smush::get_instance()->admin()->print_pending_bulk_smush_content( $remaining_count, $resmush_count, $unsmushed_count ); ?>
</div>
<?php
$bulk_smush_class = 'wp-smush-all';
if ( Global_Stats::get()->is_outdated() ) {
$bulk_smush_class .= ' wp-smush-scan-and-bulk-smush';
}
?>
<button type="button" class="<?php echo esc_attr( $bulk_smush_class ); ?> sui-button sui-button-blue" title="<?php esc_attr_e( 'Click to start Bulk Smushing images in Media Library', 'wp-smushit' ); ?>">
<?php esc_html_e( 'BULK SMUSH', 'wp-smushit' ); ?>
</button>
</div>
<?php
$global_upsell_desc = __( 'Smush Pro lets you optimize in the background. Unlock Ultra Smush, blazing-fast CDN, and more.', 'wp-smushit' );
$this->view(
'global-upsell',
array(
'bulk_upgrade_url' => $bulk_upgrade_url,
'global_upsell_desc' => $global_upsell_desc,
),
'views/bulk'
);
@@ -0,0 +1,9 @@
<p>
<?php
$cdn_resize_message = __(
'Multiply the speed and savings! Upload huge images and the Smush CDN will perfectly add the missing image sizes, safely convert to a Next-Gen format (WebP or AVIF), and deliver them directly to your visitors from our blazing-fast multi-location global servers.',
'wp-smushit'
);
echo esc_html( $this->whitelabel->whitelabel_string( $cdn_resize_message ) );
?>
</p>
@@ -0,0 +1,45 @@
<?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 sui-message sui-no-padding">
<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( 'Graphic CDN', 'wp-smushit' ); ?>">
<div class="sui-message-content">
<?php $this->view( 'cdn/header-description' ); ?>
<ol class="sui-upsell-list">
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php esc_html_e( "Fix the 'Properly Size Images' audit on Google PageSpeed", 'wp-smushit' ); ?>
</li>
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php esc_html_e( 'Automatic Next-Gen conversion (WebP and AVIF) via CDN', 'wp-smushit' ); ?>
</li>
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php
echo esc_html( $this->whitelabel->whitelabel_string( __( 'Up to 50 GB Smush CDN included', '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>
</div>
@@ -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>
@@ -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>
@@ -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 havent found any images in your media library yet so theres 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>
@@ -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; ?>
@@ -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'
);
}
@@ -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>
@@ -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>
@@ -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>
@@ -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; ?>
@@ -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>
@@ -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 sites 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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -0,0 +1,108 @@
<?php //phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<div class="summary-compression" style="max-width:600px;margin:0px auto;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="margin:0px auto;padding:0 0;max-width:600px;">
<tbody>
<tr>
<td colspan="3" style="margin:0px auto;padding:0 0;max-width:600px;">
<div style="padding:0 25px;margin:0px auto;max-width:600px;">
<h2 style="color:#333;font-family:inherit;font-size: 25px;line-height:30px;color:inherit;margin:0px auto;max-width: 600px;padding-top:10px;padding-bottom: 35px">
<?php
$clean_site_url = preg_replace( '#http(s)?://(www.)?#', '', $site_url );
printf(
esc_html( $mail_title ),
'<a href="' . esc_url( $site_url ) . '" style="text-decoration: none">' . esc_html( $clean_site_url ) . '</a>'
);
?>
</h2>
<p style="color: #1A1A1A; font-family: Roboto, Arial, sans-serif; font-size: 16px; font-weight: normal; line-height: 24px; margin:0px auto;max-width: 600px; padding: 0 0 24px; text-align: left; word-wrap: normal;">
<?php
printf(
/* translators: %s - Name */
esc_html__( 'Hi %s,', 'wp-smushit' ),
esc_html( $name )
);
?>
</p>
<p style="color: #1A1A1A; font-family: Roboto, Arial, sans-serif; font-size: 16px; font-weight: normal; line-height: 24px; margin:0px auto;max-width: 600px; padding: 0 0 32px; text-align: left; word-wrap: normal;letter-spacing: 0;">
<span><?php echo esc_html( $mail_desc ); ?></span>
</p>
</div>
</td>
</tr>
<tr>
<td style="margin:0px auto;max-width:600px;padding:3px 25px;border-top:1px solid #F8F8F8;border-bottom:1px solid #F8F8F8" class="smush-summary-row">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="color:#1A1A1A;font-family: Roboto, Arial, sans-serif; font-size: 16px; margin: 0 auto;max-width:600px">
<tbody>
<tr>
<td align="left" style="width:30px;vertical-align:top;text-align:left; padding:10px 0 0 0;">
<img style="max-width:100%;color:#666666;width:auto;height:16px;" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/info.png'; ?>" alt="" />
</td>
<td align="left" style="vertical-align:top;padding:10px 0;text-align:left;line-height: 25px;">
<strong style="font-family: Roboto, Arial, sans-serif;font-size: 16px;font-weight:500;letter-spacing:-0.25px;color:#1A1A1A;">
<?php echo esc_html( $total_title ); ?>
</strong>
<span style="line-height:18px;padding-top:3px;display:block;font-family: Roboto, Arial, sans-serif;font-size: 13px;font-weight:400;letter-spacing:-0.307692px;color:#1A1A1A;"><?php echo esc_html( $total_desc ); ?></span>
</td>
<td align="right" width="60" style="vertical-align:top;padding:10px 0;text-align:right;white-space:nowrap;font-family: Roboto, Arial, sans-serif;font-size: 16px;font-weight:800;color:#1A1A1A;">
<?php echo number_format( $total_items ); ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="margin:0px auto;max-width:600px;padding:3px 25px;border-top:1px solid #F8F8F8;border-bottom:1px solid #F8F8F8" class="smush-summary-row">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="color:#1A1A1A;font-family: Roboto, Arial, sans-serif; font-size: 16px; margin: 0 auto;max-width:600px;">
<tbody>
<tr>
<td align="left" style="width:30px;vertical-align:top;text-align:left;padding:14px 0 0 0;">
<img style="max-width:100%;color:#11bf9c;width:auto;height:16px;" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/success.png'; ?>" alt="✔" />
</td>
<td align="left" style="vertical-align:top;padding:14px 0;text-align:left;line-height: 25px;">
<strong style="font-family: Roboto, Arial, sans-serif;font-size: 16px;font-weight:500;letter-spacing:-0.25px;color:#1A1A1A;">
<?php echo esc_html( $smushed_title ); ?>
</strong>
<span style="line-height:18px;padding-top:3px;display:block;font-family: Roboto, Arial, sans-serif;font-size: 13px;font-weight:400;letter-spacing:-0.307692px;color:#1A1A1A;"><?php echo esc_html( $smushed_desc ); ?></span>
</td>
<td align="right" width="60" style="vertical-align:top;padding:14px 0;text-align:right;white-space:nowrap;font-family: Roboto, Arial, sans-serif;font-size: 16px;font-weight:800;color:#1A1A1A;">
<?php echo number_format( $smushed_items ); ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="margin:0px auto;max-width:600px;padding:3px 25px;border-top:1px solid #F8F8F8;border-bottom:1px solid #F8F8F8" class="smush-summary-row">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="color:#1A1A1A;font-family: Roboto, Arial, sans-serif; font-size: 16px; margin: 0 auto;max-width:600px">
<tbody>
<tr>
<td align="left" style="width:30px;vertical-align:top;text-align:left; padding:10px 0 0 0;">
<img style="max-width:100%;color:#fb6e07;width:auto;height:16px;" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/warning.png'; ?>" alt="⚠" />
</td>
<td align="left" style="vertical-align:top;padding:10px 0;text-align:left;line-height: 25px;">
<strong style="font-family: Roboto, Arial, sans-serif;font-size: 16px;font-weight:500;letter-spacing:-0.25px;color:#1A1A1A;">
<?php echo esc_html( $failed_title ); ?>
</strong>
<span style="line-height:18px;padding-top:3px;display:block;font-family: Roboto, Arial, sans-serif;font-size: 13px;font-weight:400;letter-spacing:-0.307692px;color:#1A1A1A;">
<?php echo esc_html( $failed_desc ); ?>
</span>
</td>
<td align="right" width="60" style="vertical-align:top;padding:10px 0;text-align:right;white-space:nowrap;font-family: Roboto, Arial, sans-serif;font-size: 16px;font-weight:800;color:#1A1A1A;">
<?php echo number_format( $failed_items ); ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p style="margin:27px 0 11px;padding: 0;text-align: center">
<a class="button"
style="background:#0059FF;border-radius: 6px;font-family: Roboto, Arial, sans-serif;font-size: 13px;width: 141px;height:40px;padding: 0!important;font-weight: 500;line-height: 40px;text-align: center;margin-bottom: 0;display:inline-block!important;color:#fff!important;text-decoration:none!important;"
href="<?php echo esc_url( $redirect_url ); ?>"><?php esc_html_e( 'View Full Report', 'wp-smushit' ); ?></a>
</p>
</div>
<?php //phpcs:enable ?>
@@ -0,0 +1,5 @@
<!-- END footer -->
</div>
</body>
</html>
@@ -0,0 +1,409 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title><?php echo esc_html( $title ); ?></title>
<meta http-equiv="X-UA-Compatible">
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="x-apple-disable-message-reformatting">
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<style type="text/css">
:root {
color-scheme: light dark;
supported-color-schemes:light dark;
}
</style>
<style type="text/css">
#outlook a {
padding: 0;
}
body {
margin: 0;
padding: 0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
table,
td {
border-collapse: collapse;
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
img {
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
p {
display: block;
margin: 13px 0;
}
</style>
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<!--[if lte mso 11]>
<style type="text/css">
.mj-outlook-group-fix { width:100% !important; }
</style>
<![endif]-->
<!--[if !mso]><!-->
<link href="https://fonts.bunny.net/css?family=roboto:400,500,700&display=swap" rel="stylesheet" type="text/css">
<style type="text/css">
@import url(https://fonts.bunny.net/css?family=roboto:400,500,700&display=swap);
</style>
<style type="text/css">
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.p-30 {
margin-bottom: 30px !important;
}
h1 {
font-size: 25px;
line-height: 35px;
}
h2 {
font-size: 20px;
line-height: 30px;
}
p,
li {
font-size: 14px;
line-height: 30px;
}
a {
text-decoration: underline !important;
color: #fff !important;
transition: color 0.5s;
}
a:hover {
color: #f5f5f5 !important;
}
.hidden-img img {
display: none !important;
}
.button a,
a.button,
a.button-cta {
font-family: Roboto, arial, sans-serif;
font-size: 13px !important;
line-height: 20px;
font-weight: bold;
background: #0059FF;
text-decoration: none !important;
padding: 10px 15px;
color: #ffffff !important;
border-radius: 10px;
display: inline-block;
margin: 20px auto;
text-transform: unset !important;
min-width: unset !important;
transition: background 0.5s;
}
small {
font-size: 10px;
line-height: 24px;
}
.main-content img {
max-width: 100% !important;
}
.main-content .button {
background: #0059FF !important;
color:#fff !important;
transition: background 0.5s;
}
.main-content .button:hover {
background: #0C33A9 !important;
}
@media (min-width: 600px) {
p,
li {
font-size: 16px;
}
}
</style>
<!--<![endif]-->
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 {
width: 100% !important;
max-width: 100%;
}
}
</style>
<style type="text/css">
@media only screen and (max-width:480px) {
h2{
font-size: 22px !important;
line-height: 28px !important;
}
h3{
font-size: 20px !important;
line-height: 30px !important;
}
#smush-cdn-upto2x .smush-cdn-title-box{
padding-top: 20px !important;
}
table.mj-full-width-mobile {
width: 100% !important;
}
td.mj-full-width-mobile {
width: auto !important;
}
}
</style>
<style>
@media only screen and (max-width:430px) {
h2{
font-size: 20px !important;
}
h3 {
font-size: 19px !important;
}
td.smush-cdn-title-box{
width: 55% !important;
}
td.smush-cdn-image-box {
width: 45% !important;
}
.smush-whitelabel-summary > tbody > tr > td{
padding-top: 5px !important;
}
.smush-summary-row span{
padding-top: 6px !important;
font-size: 12px !important;
}
.summary-compression .button{
margin-top: 45px !important;
}
#smush-cdn-upto2x .button{
margin-top: 12px !important;
}
}
</style>
<style>
@media only screen and (max-width:360px) {
.summary-compression td strong{
font-size:14px!important;
}
.summary-compression td span{
font-size:11px!important;
}
}
</style>
<style>
@media only screen and (prefers-color-scheme: dark) {
body,
.smush-mail-body,
.summary-compression-body
.summary-compression > table,
.smush-whitelabel-summary,
.smush-whitelabel-summary table {
background: #1A1A1A !important;
}
.smush-header-logo{
background: #2DC4E0 !important;
}
.smush-header-logo span{
color: #fff !important;
}
.main-content,.main-content-inner,.main-content-outlook {
background: #212121 !important;
color:#F8F8F8;
}
.main-content .button {
background: #0059FF !important;
color:#fff !important;
}
.main-content .button:hover {
background: #0C33A9 !important;
}
h2 {
color: #f2f2f2 !important;
}
h2 a{
color: #0059FF !important;
}
h2 a:hover{
color: #0C33A9 !important;
}
a {
color: #0059FF !important;
}
a:hover {
color: #0C33A9 !important;
}
.main-content p, .summary-compression p,.summary-compression td, .summary-compression strong, .summary-compression span{
color: #F8F8F8 !important;
}
.summary-compression .smush-summary-row {
border-top-color: #323339 !important;
border-bottom-color: #323339 !important;
}
#smush-cdn-upto2x {
background: #C0EDF6 !important;
color: #121212 !important;
}
#smush-cdn-upto2x li{
color: #333333;
}
#smush-cdn-upto2x h3, #smush-cdn-upto2x p, #smush-cdn-upto2x td{
color: #121212 !important;
}
.wpmudev-footer-logo{
background: #EAF9FC !important;
}
.wpmudev-follow-us span, .wpmudev-follow-us td{
color: #E6E6E6 !important;
}
.wpmudev-footer div{
color: #aaa !important;
}
.smush-light-img{
display: inline-block !important;
display: none !important;
width:0 !important;
margin:0 !important;
padding:0 !important;
visibility:hidden !important;
}
.smush-light-img img{
display: none!important;
width: 0 !important;
height: 0 !important;
margin:0 !important;
visibility:hidden !important;
}
.smush-dark-img {
display: inline !important;
width:auto !important;
visibility: visible !important;
}
}
</style>
<!-- Dark mode for outlook -->
<style>
[data-ogsc] .smush-mail-body {
background: #1A1A1A !important;
}
[data-ogsc] .smush-header-logo{
background: #2DC4E0 !important;
}
[data-ogsc] .smush-header-logo span{
color: #fff !important;
}
[data-ogsc] .main-content,[data-ogsc] .main-content-inner,[data-ogsc] .main-content-outlook {
background: #212121 !important;
color:#F8F8F8;
}
[data-ogsc] .main-content .button {
background: #0059FF !important;
color:#fff !important;
}
[data-ogsc] .main-content .button:hover {
background: #0C33A9 !important;
}
[data-ogsc] .main-content .button:hover{
background: #0C33A9 !important;
}
[data-ogsc] h2 {
color: #f2f2f2 !important;
}
[data-ogsc] h2 a{
color: #0059FF !important;
}
[data-ogsc] h2 a:hover{
color: #0C33A9 !important;
}
[data-ogsc] .main-content p, [data-ogsc] .summary-compression p, [data-ogsc] .summary-compression td, [data-ogsc] .summary-compression strong, [data-ogsc] .summary-compression span{
color: #F8F8F8 !important;
}
[data-ogsc] .summary-compression .smush-summary-row {
border-top-color: #323339 !important;
border-bottom-color: #323339 !important;
}
[data-ogsc] #smush-cdn-upto2x {
background: #C0EDF6 !important;
color: #121212 !important;
}
[data-ogsc] #smush-cdn-upto2x li{
color: #333333;
}
[data-ogsc] #smush-cdn-upto2x h3, [data-ogsc] #smush-cdn-upto2x p, [data-ogsc] #smush-cdn-upto2x td{
color: #121212 !important;
}
[data-ogsc] .wpmudev-footer-logo{
background: #EAF9FC !important;
}
[data-ogsc] .wpmudev-follow-us span, [data-ogsc] .wpmudev-follow-us td{
color: #E6E6E6 !important;
}
[data-ogsc] .wpmudev-footer div{
color: #aaa !important;
}
[data-ogsc] .smush-light-img{
display: inline-block !important;
display: none !important;
width:0 !important;
margin:0 !important;
padding:0 !important;
visibility:hidden !important;
}
[data-ogsc] .smush-light-img img{
display: none!important;
width: 0 !important;
height: 0 !important;
margin:0 !important;
visibility:hidden !important;
}
[data-ogsc] .smush-dark-img {
display: inline !important;
width:auto !important;
visibility: visible !important;
}
</style>
</head>
<body style="word-spacing:normal;background-color:#F6F6F6;">
<div class="smush-mail-body" style="background-color:#F6F6F6;">
@@ -0,0 +1,31 @@
<?php require 'header.php'; ?>
<!-- Main content -->
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="main-content-outlook" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div class="main-content" style="margin:0px auto;max-width:600px;">
<table class="smush-whitelabel-summary" align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="margin:0px auto;max-width:600px;width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:45px 0 32px;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:550px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#fff;background-color:#fff;vertical-align:top;margin:0px auto;max-width: 600px;border-radius: 20px;border-top-left-radius: 20px;border-top-right-radius: 20px;border-bottom-left-radius: 20px;border-bottom-right-radius: 20px;overflow:hidden" width="100%">
<tbody>
<tr>
<td align="left" style="font-size:0px;padding:45px 0;word-break:break-word;margin:0px auto;max-width: 600px;">
<div style="margin:0px auto;max-width: 600px;font-family:Roboto, Arial, sans-serif;font-size:18px;letter-spacing:-.25px;line-height:30px;text-align:left;color:#1A1A1A;">
<?php echo $content_body;//phpcs:ignore ?>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
<!-- END Main content -->
<?php require 'footer.php'; ?>
@@ -0,0 +1,272 @@
<?php require 'header.php'; ?>
<!-- Header image -->
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:38px 0 0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td class="smush-header-logo" style="background-color:#2DC4E0;border-radius:15px 15px 0 0;vertical-align:top;padding:25px 0;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="" width="100%">
<tbody>
<tr>
<td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
<tbody>
<tr>
<td>
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/email/logo.png' ); ?>" style="border:0;outline:none;text-decoration:none;height:30px;width:auto;vertical-align:middle;" alt="">
<span style="color: #FFFFFF;font-family: Roboto, Arial, sans-serif;font-size: 20px;font-weight: 700;text-align: left;margin-left: 16px;line-height:30px; vertical-align:middle;">
<?php echo esc_html( $title ); ?>
</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
<!-- END Header image -->
<!-- Main content -->
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="main-content-outlook" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table class="main-content" align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:20px 0 45px;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:550px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="margin:0px auto;max-width: 600px;vertical-align:top;" width="100%">
<tbody>
<tr>
<td align="left" style="font-size:0px;padding:0;word-break:break-word;">
<div style="margin:0px auto;max-width: 600px;font-family:Roboto, Arial, sans-serif;font-size:18px;letter-spacing:-.25px;line-height:30px;text-align:left;color:#1A1A1A;">
<?php echo $content_body;//phpcs:ignore ?>
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="margin:0px auto;max-width: 600px;padding:0 0;">
<tbody>
<tr>
<td style="margin:0 0;padding:0 25px;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="margin:0 auto;max-width:600px;padding:0;">
<tbody>
<tr>
<td style="margin:0;padding:0 0 10px;">
<!--Cheers block-->
<p style="color:#1A1A1A;font-family:Roboto,Arial,sans-serif;font-size:16px;font-weight:normal;line-height:30px;margin:30px 0 0;padding:0;text-align:left;">
<?php esc_html_e( 'Cheers,', 'wp-smushit' ); ?>
<br/>
<?php esc_html_e( 'The WPMU DEV Team.', 'wp-smushit' ); ?>
</p>
<!--End Cheers block-->
</td>
</tr>
</tbody>
</table>
<?php
if( ! empty( $content_upsell ) ) {
echo $content_upsell;//phpcs:ignore
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
<!-- END Main content -->
<!-- Footer -->
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div style="margin:0px auto;border-radius:0 0 15px 15px;max-width:600px;">
<table class="wpmudev-footer-logo" align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#E7F1FB;background-color:#E7F1FB;width:100%;border-radius:0 0 15px 15px;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tbody>
<tr>
<td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
<tbody>
<tr>
<td style="width:168px;">
<img height="auto" src="https://mcusercontent.com/53a1e972a043d1264ed082a5b/images/e60c4943-5368-4e02-3f35-021bbfc3eea4.png" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="168" />
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div class="wpmudev-follow-us" style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:25px 20px 15px;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tbody>
<tr>
<td align="center" style="font-size:0px;padding:0;word-break:break-word;">
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" ><tr><td><![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
<tr class="hidden-img">
<td style="padding:1px;vertical-align:middle;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:transparent;border-radius:3px;width:0;">
<tr>
<td style="font-size:0;height:0;vertical-align:middle;width:0;">
<img height="0" style="border-radius:3px;display:block;" width="0" alt="" />
</td>
</tr>
</table>
</td>
<td style="vertical-align:middle;">
<span style="color:#333333;font-size:13px;font-weight:700;font-family:Roboto, Arial, sans-serif;line-height:25px;text-decoration:none;"> Follow us </span>
</td>
</tr>
</table>
<!--[if mso | IE]></td><td><![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
<tr>
<td style="padding:1px;vertical-align:middle;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:transparent;border-radius:3px;width:25px;">
<tr>
<td style="font-size:0;height:25px;vertical-align:middle;width:25px;">
<a href="https://www.facebook.com/wpmudev" target="_blank">
<span class="smush-light-img">
<img height="25" src="https://ci3.googleusercontent.com/meips/ADKq_NZAhxcXF5H6F6zqEl6kws6_d-WEBGVfkcejYfTMHmaUUMDGS55LWNdYEoAqPTD8TCwXZwpjr4NU-gjknIql97H63Sieiwn-wQ=s0-d-e1-ft" style="border-radius:3px;display:block;" width="25" alt="" />
</span>
<span class="smush-dark-img" style="display:inline-block;display:none;width:0;height:0;visibility:hidden;margin:0;padding:0">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/email/facebook-dark-mode.png' ); ?>" style="border-radius:3px;display:block;" width="25" height="25" alt="" />
</span>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]></td><td><![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
<tr>
<td style="padding:1px;vertical-align:middle;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:transparent;border-radius:3px;width:25px;">
<tr>
<td style="font-size:0;height:25px;vertical-align:middle;width:25px;">
<a href="https://www.instagram.com/wpmu_dev/" target="_blank">
<span class="smush-light-img">
<img height="25" src="https://ci3.googleusercontent.com/meips/ADKq_NYj1QdHLge1_Ks9F7COiJVae93tgjThv7s0fYjAmteGWAcIFKEm2LRdjcmc9n40_FmTmMShEFxdFu6XwwvljQvGNKVpzBU8R88=s0-d-e1-ft" style="border-radius:3px;display:block;" width="25" alt="" />
</span>
<span class="smush-dark-img" style="display:inline-block;display:none;width:0;height:0;visibility:hidden;margin:0;padding:0">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/email/instagram-dark-mode.png' ); ?>" style="border-radius:3px;display:block;" width="25" height="25" alt="" />
</span>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]></td><td><![endif]-->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
<tr>
<td style="padding:1px;vertical-align:middle;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:transparent;border-radius:3px;width:25px;">
<tr>
<td style="font-size:0;height:25px;vertical-align:middle;width:25px;">
<a href="https://twitter.com/wpmudev" target="_blank">
<span class="smush-light-img">
<img height="25" src="https://ci3.googleusercontent.com/meips/ADKq_NblzavICscMS8Fhx3ppS_aNUNPUthQJaoele9REZh5x2Cu522fm-JdO6OtccsDnIewUjjkIIZwuqqaldUw9oGf21JxCTS8fIDA=s0-d-e1-ft" style="border-radius:3px;display:block;" width="25" alt="" />
</span>
<span class="smush-dark-img" style="display:inline-block;display:none;width:0;height:0;visibility:hidden;margin:0;padding:0">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/email/twitter-dark-mode.png' ); ?>" style="border-radius:3px;display:block;" width="25" height="25" alt="" />
</span>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
<div class="wpmudev-footer" style="margin:0px auto;max-width:600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:0;text-align:center;">
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]-->
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
<tbody>
<tr>
<td align="center" style="font-size:0px;padding:0 0 15px;word-break:break-word;">
<div style="font-family:Roboto, Arial, sans-serif;font-size:9px;letter-spacing:-.25px;line-height:30px;text-align:center;color:#505050;">INCSUB PO BOX 163, ALBERT PARK, VICTORIA.3206 AUSTRALIA</div>
</td>
</tr>
<tr>
<td align="center" style="font-size:0px;padding:0 0 25px;word-break:break-word;">
<div style="font-family:Roboto, Arial, sans-serif;font-size:10px;letter-spacing:-.25px;line-height:30px;text-align:center;color:#1A1A1A;"></div>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
<?php require 'footer.php'; ?>
@@ -0,0 +1,71 @@
<?php
/**
* Background optimization email upsell template for old free users.
*/
?>
<div style="margin:0px auto;padding:0;max-width:600px;">
<table id="smush-cdn-faster-delivery" border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="max-width:600px;border-collapse:collapse;margin:10px auto 0;padding:0 0;color:#fff">
<tbody>
<tr>
<td class="smush-cdn-title-box" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;border:0;width:59.5%;max-width:222px;">
</td>
<td class="smush-cdn-image-box" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;border-spacing:0px;border:0;width:40.5%;max-width:222px;">
<a href="#" style="text-decoration:none!important;cursor:default;max-width:222px!important;height:auto;display:block;"><img style="width:100%;max-width:222px!important;height:auto;display:block;" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/faster-delivery-with-cdn.png'; ?>" alt=""></a>
</td>
</tr>
</tbody>
</table>
<table id="smush-cdn-upto2x" border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="margin:0px auto;max-width:600px;border-collapse:collapse;padding:0 0;color:#fff;background:#2F1D4D;border-radius: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;">
<tbody>
<tr>
<td class="smush-cdn-title-box" border="0" cellpadding="0" cellspacing="0" style="width:59.5%;max-width:222px;border-collapse:collapse;border-spacing:0px;border:0;padding:32px 0 0 20px;vertical-align:top;">
<h3 style="font-family:Roboto, Arial, sans-serif;font-size: 22px;letter-spacing:-0.25px;line-height:33px;font-weight: 600;color:inherit;margin:0;padding-bottom:10px;max-width: 316px;">
<?php esc_html_e( 'Serve images 2X faster with Smush Pros CDN', 'wp-smushit' ); ?>
</h3>
</td>
<td class="smush-cdn-image-box" border="0" cellpadding="0" cellspacing="0" style="width:40.5%;max-width:222px;border-collapse:collapse;border-spacing:0px;border:0;vertical-align:top;">
<a href="#" style="text-decoration:none!important;cursor:default;"><img style="width:100%;max-width:222px!important;height:auto" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/upto-2x.png'; ?>" alt=""></a>
</td>
</tr>
<tr>
<td border="0" cellpadding="0" cellspacing="0" colspan="2" style="border-collapse:collapse;border-spacing:0px;border:0;padding:4px 20px 0;">
<p style="color:#fff;font-size:13px;font-weight:400;margin:0;padding:0;font-family:Roboto, Arial, sans-serif;line-height:22px;text-decoration:none;">
<?php
printf( esc_html__( 'Unlock Ultra Smush, blazing-fast CDN, and more. %1$sGet Smush Pro%2$s&#128640;', 'wp-smushit' ),
'<a href="' . esc_url( $upsell_url ) . '" target="_blank">',
'</a>'
);
?>
</p>
</td>
</tr>
<tr>
<td border="0" cellpadding="0" cellspacing="0" colspan="2" style="border-collapse:collapse;border-spacing:0px;border:0;padding:13px 20px 0">
<p style="padding-left:4px;letter-spacing:0px;font-family:Roboto, Arial, sans-serif;margin:0;line-height:24px;text-decoration:none;font-size:13px;maring:0;font-weight:600;font-style:normal;">
<span class="smush-light-img">
<img onerror="arguments[0].currentTarget.style.display='none'" style="width:16px;margin-top:16px;margin-right:12px;" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/valid.png'; ?>" />
</span>
<span class="smush-dark-img" style="display:inline-block;display:none;width:0;height:0;visibility:hidden;margin:0;padding:0">
<img onerror="arguments[0].currentTarget.style.display='none'" style="width:16px;margin-top:16px;margin-right:12px;" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/valid-dark.png'; ?>" />
</span>
<?php esc_html_e( 'Includes better GIF performance', 'wp-smushit' ); ?>
</p>
<p style="padding-left:4px;letter-spacing:0px;font-family:Roboto, Arial, sans-serif;margin:0;line-height:24px;text-decoration:none;font-size:13px;maring:0;font-weight:600;font-style:normal;">
<span class="smush-light-img">
<img onerror="arguments[0].currentTarget.style.display='none'" style="width:16px;margin-top:16px;margin-right:12px;" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/valid.png'; ?>" />
</span>
<span class="smush-dark-img" style="display:inline-block;display:none;width:0;height:0;visibility:hidden;margin:0;padding:0">
<img onerror="arguments[0].currentTarget.style.display='none'" style="width:16px;margin-top:16px;margin-right:12px;" src="<?php echo WP_SMUSH_URL . 'app/assets/images/email/valid-dark.png'; ?>" />
</span>
<?php esc_html_e( 'Get Smush Pro', 'wp-smushit' ); ?>
</p>
<p style="margin:0;padding:20px 0 35px;">
<a class="button"
style="display:inline-block;background:#0059FF;border-radius:6px;font-family:Roboto,Arial,sans-serif;font-size:13px;width:176px;height:40px;padding:0!important;font-weight:500;line-height:40px;text-align:center;margin:0;display:inline-block!important;color:#fff!important;text-decoration:none!important;"
href="<?php echo esc_url( $upsell_url ); ?>"><?php esc_html_e( 'Learn more about Pro', 'wp-smushit' ); ?></a>
</p>
</td>
</tr>
</tbody>
</table>
</div>
@@ -0,0 +1,50 @@
<?php
/**
* Integrations meta box
*
* @package WP_Smush
*
* @var array $basic_features Basic features array.
* @var array $integration_group Integration group.
* @var array $settings Settings array.
*
* @var Abstract_Page $this
*/
use Smush\Core\Helper;
if ( ! defined( 'WPINC' ) ) {
die;
}
foreach ( $integration_group as $name ) {
$is_pro_field = $this->settings->is_pro_field( $name ); // Gray out row, disable setting.
$is_integration_disabled = apply_filters( 'wp_smush_integration_status_' . $name, $is_pro_field ); // Disable setting.
$is_disabled_field = $is_integration_disabled || $is_pro_field;
$value = $is_disabled_field || empty( $settings[ $name ] ) ? false : $settings[ $name ];
$show_pro_tag = $is_pro_field;
$upsell = false;
do_action( 'wp_smush_render_setting_row', $name, $value, $is_disabled_field, $upsell, $show_pro_tag );
}
?>
<div class="sui-upsell-notice sui-padding sui-padding-bottom__desktop--hidden">
<div class="sui-upsell-notice__content">
<div class="sui-notice sui-notice-purple">
<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( 'Smush Pro supports hosting images on Amazon S3 and optimizating NextGen Gallery images directly through NextGen Gallery settings. Try it with a WPMU DEV membership today!', 'wp-smushit' );
?>
</p>
<p>
<a href="<?php echo esc_url( Helper::get_url( 'smush-nextgen-settings-upsell' ) ); ?>" target="_blank" class="sui-button sui-button-purple">
<?php esc_html_e( 'UNLOCK NOW WITH PRO', 'wp-smushit' ); ?>
</a>
</p>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,30 @@
<?php
/**
* Lazy loading disabled meta box.
*
* @since 3.2.0
* @package WP_Smush
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/graphic-smush-lazyload-default.png' ); ?>"
srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/graphic-smush-lazyload-default@2x.png' ); ?> 2x"
alt="<?php esc_html_e( 'Lazy Load', 'wp-smushit' ); ?>" class="sui-image">
<div class="sui-message-content">
<p>
<?php esc_html_e( 'This feature delays loading offscreen images until they\'re in view, helping your page load faster, use less bandwidth, and meet Google PageSpeed recommendations such as deferring offscreen images, properly sizing them, and setting explicit width and height.', 'wp-smushit' ); ?>
</p>
<button class="sui-button sui-button-blue" id="smush-enable-lazyload">
<span class="sui-loading-text"><?php esc_html_e( 'Activate', 'wp-smushit' ); ?></span>
<i class="sui-icon-loader sui-loading" aria-hidden="true"></i>
</button>
</div>
@@ -0,0 +1,71 @@
<?php
/**
* Meta box layout.
*
* @package WP_Smush
*
* @var Abstract_Page $this
*
* @var array $args Array of arguments.
* @var array $callback Callback for meta box content.
* @var array $callback_footer Callback for meta box footer.
* @var array $callback_header Callback for meta box header.
* @var string $id Meta box DOM ID.
* @var string $orig_id Meta box code ID.
* @var string $title Meta box title.
*/
use Smush\App\Abstract_Page;
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div id="smush-box-<?php echo esc_attr( $id ); ?>" class="sui-<?php echo esc_attr( $id ); ?> <?php echo esc_attr( $args['box_class'] ); ?>">
<?php if ( is_callable( $callback_header ) ) : ?>
<div class="<?php echo esc_attr( $args['box_header_class'] ); ?>">
<?php call_user_func( $callback_header ); ?>
</div>
<?php elseif ( $this->view_exists( $orig_id . '/meta-box-header' ) ) : ?>
<div class="<?php echo esc_attr( $args['box_header_class'] ); ?>">
<?php $this->view( $orig_id . '/meta-box-header', compact( 'title' ) ); ?>
</div>
<?php elseif ( $title ) : ?>
<div class="<?php echo esc_attr( $args['box_header_class'] ); ?>">
<h3 class="sui-box-title"><?php echo esc_html( $title ); ?></h3>
</div>
<?php endif; ?>
<?php if ( $args['box_content_class'] ) : ?>
<div class="<?php echo esc_attr( $args['box_content_class'] ); ?>">
<?php if ( is_callable( $callback ) ) : ?>
<?php call_user_func( $callback ); ?>
<?php else : ?>
<?php $this->view( $orig_id . '-meta-box' ); ?>
<?php endif; ?>
</div>
<?php elseif ( is_callable( $callback ) ) : ?>
<?php call_user_func( $callback ); ?>
<?php else : ?>
<?php $this->view( $orig_id . '-meta-box' ); ?>
<?php endif; ?>
<?php if ( is_callable( $callback_footer ) ) : ?>
<div class="<?php echo esc_attr( $args['box_footer_class'] ); ?>">
<?php call_user_func( $callback_footer ); ?>
</div>
<?php elseif ( $this->view_exists( $orig_id . '/meta-box-footer' ) ) : ?>
<div class="<?php echo esc_attr( $args['box_footer_class'] ); ?>">
<?php $this->view( $orig_id . '/meta-box-footer' ); ?>
</div>
<?php endif; ?>
<?php if ( $this->view_exists( $orig_id . '/meta-box-upsell' ) ) : ?>
<?php $this->view( $orig_id . '/meta-box-upsell' ); ?>
<?php endif; ?>
<?php // Allows you to output any content within the stats box at the end. ?>
<?php do_action( 'wp_smush_after_stats' ); ?>
</div><!-- end box-<?php echo esc_attr( $id ); ?> -->
@@ -0,0 +1,45 @@
<?php
/**
* Upsell NextGen meta box.
*
* @since 3.0
* @package WP_Smush
*/
use Smush\Core\Helper;
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-block-content-center sui-message smush-box-next-gen-upsell">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/graphic-smush-next-gen-free-tier.png' ); ?>"
srcset="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/graphic-smush-next-gen-free-tier@2x.png' ); ?> 2x"
alt="<?php esc_html_e( 'Graphic NextGen', 'wp-smushit' ); ?>">
<div class="sui-message-content">
<p><?php esc_html_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' ); ?></p>
<ol class="sui-upsell-list">
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php esc_html_e( 'Activate the Next-Gen Formats feature with a single click; no server configuration required.', 'wp-smushit' ); ?>
</li>
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php esc_html_e( 'Fix “Serve images in next-gen format" Google PageSpeed recommendation.', 'wp-smushit' ); ?>
</li>
<li>
<span class="sui-icon-check sui-sm" aria-hidden="true"></span>
<?php esc_html_e( 'Serve WebP and AVIF version of images in the browsers that support it and fall back to JPEGs and PNGs for unsupported browsers.', 'wp-smushit' ); ?>
</li>
</ol>
<p class="sui-margin-top">
<a href="<?php echo esc_url( Helper::get_url( 'smush_next-gen_upgrade_button' ) ); ?>" class="sui-button sui-button-purple" target="_blank">
<?php esc_html_e( 'UNLOCK NEXT-GEN FORMATS WITH PRO', 'wp-smushit' ); ?>
</a>
</p>
</div>
</div>
@@ -0,0 +1,15 @@
<?php
/**
* Preload meta box.
*
* @package WP_Smush
*
* @var bool $lcp_preload_enabled LCP preload status.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<h3 class="sui-box-title"><?php esc_html_e( 'Preload Critical Images', 'wp-smushit' ); ?></h3>
<span style="margin-left:15px" class="sui-tag sui-tag-pro"><?php esc_html_e( 'Pro', 'wp-smushit' ); ?></span>
@@ -0,0 +1,136 @@
<?php
/**
* Preload meta box.
*
* @package WP_Smush
*
* @var bool $lcp_preload_enabled LCP preload status.
* @var bool $preload_settings LCP preload settings.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<p>
<?php
esc_html_e( 'Preload helps improve the Largest Contentful Paint (LCP) metric by optimizing images that form the main viewport content. When enabled, Smush also overrides WordPress default fetchpriority=high with smarter detection to enhance lazy loading and help meet Googles recommended 2.5-second benchmark for good user experience.', 'wp-smushit' );
?>
</p>
<div class="sui-box-settings-row" id="preload-images-settings-row">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label">
<?php esc_html_e( 'Preload Critical Images', 'wp-smushit' ); ?>
</span>
<span class="sui-description">
<?php esc_html_e( 'Get a faster initial load and optimize your LCP audit by automatically preloading your most critical image.', 'wp-smushit' ); ?>
</span>
</div>
<div class="sui-box-settings-col-2">
<div class="sui-form-field">
<label for="preload-images" class="sui-toggle">
<input
type="checkbox"
id="preload-images"
name="preload_images"
aria-labelledby="preload-images-label"
aria-describedby="preload-images-description"
disabled
<?php checked( $lcp_preload_enabled ); ?>
/>
<span class="sui-toggle-slider" aria-hidden="true"></span>
<span id="noscript-label" class="sui-toggle-label">
<?php esc_html_e( 'Enable Preloading Critical Images', 'wp-smushit' ); ?>
</span>
</label>
<?php
$upgrade_url = $this->get_utm_link(
array(
'utm_campaign' => 'smush_lazyload-preload_preload-critical-images',
)
);
?>
<span id="preload-images-description" class="sui-description">
<a style="margin-left:44px;" class="smush-upsell-link" href="<?php echo esc_url( $upgrade_url ); ?>" target="_blank">
<strong>
<?php
esc_html_e( 'For Faster Load Times & Optimized LCP Get Smush Pro', 'wp-smushit' );
?>
</strong>
<span class="sui-icon-open-new-window" aria-hidden="true"></span>
</a>
</span>
</div>
</div>
</div>
<div class="sui-box-settings-row" id="preload-exclude-settings-row" style="display: <?php echo $lcp_preload_enabled ? 'flex' : 'none'; ?>">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label">
<?php esc_html_e( 'Exclude', 'wp-smushit' ); ?>
</span>
<span class="sui-description">
<?php esc_html_e( 'Disable preload for specific pages or posts that you wish to prevent preload on', 'wp-smushit' ); ?>
</span>
</div>
<div class="sui-box-settings-col-2">
<div class="sui-form-field">
<strong><?php esc_html_e( 'Post, Pages & URLs', 'wp-smushit' ); ?></strong>
<div class="sui-description">
<?php esc_html_e( 'Specify URLs of the pages or posts you want to disable preload on.', 'wp-smushit' ); ?>
</div>
<?php
$strings = '';
if ( isset( $preload_settings['exclude-pages'] ) && is_array( $preload_settings['exclude-pages'] ) ) {
$strings = join( PHP_EOL, $preload_settings['exclude-pages'] );
}
?>
<textarea class="sui-form-control" name="exclude-pages" placeholder="<?php esc_attr_e( 'E.g. /page', 'wp-smushit' ); ?>"><?php echo esc_attr( $strings ); ?></textarea>
<div class="sui-description">
<?php
printf(
/* translators: %1$s - opening strong tag, %2$s - closing strong tag */
esc_html__( 'Add one page or post URL per line in relative format. I.e. %1$s/example-page%2$s or %1$s/example-page/sub-page/%2$s.', 'wp-smushit' ),
'<strong>',
'</strong>'
);
?>
</div>
</div>
</div>
</div>
<div class="sui-box-settings-row" id="preload-images-fetchpriority-settings-row" style="display: <?php echo $lcp_preload_enabled ? 'flex' : 'none'; ?>">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label">
<?php esc_html_e( 'Optimize LCP Fetchpriority', 'wp-smushit' ); ?>
</span>
<span class="sui-description">
<?php esc_html_e( 'Replace WordPress default fetchpriority=high with smarter LCP detection for better lazy loading, image handling, and faster page performance.', 'wp-smushit' ); ?>
</span>
</div>
<div class="sui-box-settings-col-2">
<div class="sui-form-field">
<label for="lcp-fetchpriority" class="sui-toggle">
<input
type="checkbox"
id="lcp-fetchpriority"
name="lcp_fetchpriority"
aria-labelledby="lcp-fetchpriority-label"
aria-describedby="lcp-fetchpriority-description"
<?php checked( isset( $preload_settings['lcp_fetchpriority'] ) && $preload_settings['lcp_fetchpriority'] ); ?>
/>
<span class="sui-toggle-slider" aria-hidden="true"></span>
<span id="lcp-fetchpriority-label" class="sui-toggle-label">
<?php esc_html_e( 'Enable Fetchpriority', 'wp-smushit' ); ?>
</span>
</label>
</div>
</div>
</div>
@@ -0,0 +1,86 @@
<?php
/**
* Settings row layout.
*
* @package WP_Smush
*
* @var \Smush\App\Abstract_Page $this
*
* @var string $name Setting name.
* @var bool $value Setting value.
* @var bool $disable Disabled status.
* @var bool $upsell Upsell status.
* @var bool $show_pro_tag Show pro tag status.
*/
use Smush\Core\Settings;
if ( ! defined( 'WPINC' ) ) {
die;
}
$default_settings = Settings::get_instance()->get_defaults();
$custom_fields = array(
'lossy' => 'bulk/lossy-level',
);
?>
<div class="sui-box-settings-row <?php echo $upsell ? 'sui-box-upsell-row' : ''; ?> <?php echo $disable && ! $upsell ? 'sui-disabled' : ''; ?> <?php echo esc_attr( $name ); ?>-settings-row" id="<?php echo esc_attr( $name ); ?>-settings-row">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label <?php echo 'gutenberg' === $name ? 'sui-settings-label-with-tag' : ''; ?>">
<?php echo esc_html( Settings::get_setting_data( $name, 'short-label' ) ); ?>
<?php if ( ! empty( $show_pro_tag ) ) : ?>
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Pro', 'wp-smushit' ); ?></span>
<?php endif; ?>
<?php do_action( 'smush_setting_column_tag', $name ); ?>
</span>
<span class="sui-description">
<?php echo wp_kses_post( Settings::get_setting_data( $name, 'desc' ) ); ?>
</span>
</div>
<div class="sui-box-settings-col-2" id="column-<?php echo esc_attr( $name ); ?>">
<?php if ( isset( $custom_fields[ $name ]) ) : ?>
<span style="font-weight:500" id="<?php echo esc_attr( $name . '-label' ); ?>" class="sui-toggle-label">
<?php echo esc_html( Settings::get_setting_data( $name, 'label' ) ); ?>
</span>
<div class="sui-form-field">
<?php
$template_part = $custom_fields[ $name ];
$this->view(
$template_part,
array(
'name' => $name,
)
);
?>
<!-- Print/Perform action in right setting column -->
<?php do_action( 'smush_setting_column_right_inside', $name ); ?>
</div>
<?php do_action( 'smush_setting_column_right_additional', $name ); ?>
<?php elseif ( isset( $default_settings[ $name ] ) ) : ?>
<div class="sui-form-field">
<label for="<?php echo esc_attr( $name ); ?>" class="sui-toggle">
<input
type="checkbox"
id="<?php echo esc_attr( $name ); ?>"
name="<?php echo esc_attr( $name ); ?>"
aria-labelledby="<?php echo esc_attr( $name . '-label' ); ?>"
aria-describedby="<?php echo esc_attr( $name . '-desc' ); ?>"
<?php checked( $value, 1, true ); ?>
<?php disabled( $disable ); ?>
/>
<span class="sui-toggle-slider" aria-hidden="true"></span>
<span id="<?php echo esc_attr( $name . '-label' ); ?>" class="sui-toggle-label">
<?php echo esc_html( Settings::get_setting_data( $name, 'label' ) ); ?>
</span>
<!-- Print/Perform action in right setting column -->
<?php do_action( 'smush_setting_column_right_inside', $name ); ?>
</label>
<?php do_action( 'smush_setting_column_right_additional', $name ); ?>
</div>
<?php endif; ?>
<!-- Print/Perform action in right setting column -->
<?php do_action( 'smush_setting_column_right_outside', $name ); ?>
</div>
</div>
@@ -0,0 +1,23 @@
<?php
/**
* Accessibility settings meta box.
*
* @since 3.0
* @package WP_Smush
*
* @var bool $accessible_colors High contrast mode status.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-box-settings-row">
<p>
<?php esc_html_e( 'Enable support for any accessibility enhancements available in the plugin interface.', 'wp-smushit' ); ?>
</p>
</div>
<?php do_action( 'wp_smush_render_setting_row', 'accessible_colors', $accessible_colors ); ?>
@@ -0,0 +1,61 @@
<?php
/**
* Data settings meta box.
*
* @since 3.0
* @package WP_Smush
*
* @var bool $keep_data Keep data during uninstall.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-box-settings-row">
<p>
<?php esc_html_e( 'Control what to do with your settings and data. Settings are each modules configuration options. Data includes the compression savings, statistics and other pieces of information stored over time.', 'wp-smushit' ); ?>
</p>
</div>
<div class="sui-box-settings-row" id="data-uninstallation-settings-row">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label"><?php esc_html_e( 'Data', 'wp-smushit' ); ?></span>
<span class="sui-description">
<?php esc_html_e( 'Choose how you want us to handle your plugin data.', 'wp-smushit' ); ?>
</span>
</div>
<div class="sui-box-settings-col-2">
<strong><?php esc_html_e( 'Uninstallation', 'wp-smushit' ); ?></strong>
<span class="sui-description">
<?php esc_html_e( 'When you uninstall the plugin, what do you want to do with your settings? You can save them for next time, or wipe them back to factory settings.', 'wp-smushit' ); ?>
</span>
<div class="sui-side-tabs">
<div class="sui-tabs-menu">
<label for="keep_data-true" class="sui-tab-item <?php echo $keep_data ? 'active' : ''; ?>">
<input type="radio" name="keep_data" value="1" id="keep_data-true" <?php checked( $keep_data ); ?>>
<?php esc_html_e( 'Keep', 'wp-smushit' ); ?>
</label>
<label for="keep_data-false" class="sui-tab-item <?php echo $keep_data ? '' : 'active'; ?>">
<input type="radio" name="keep_data" value="0" id="keep_data-false" <?php checked( ! $keep_data ); ?>>
<?php esc_html_e( 'Delete', 'wp-smushit' ); ?>
</label>
</div>
</div>
<strong><?php esc_html_e( 'Reset Factory Settings', 'wp-smushit' ); ?></strong>
<span class="sui-description">
<?php esc_html_e( 'Need to revert back to the default settings? This button will instantly reset your settings to the defaults.', 'wp-smushit' ); ?>
</span>
<button type="button" class="sui-button sui-button-ghost" data-modal-open="reset-settings-dialog" data-modal-open-focus="reset-setting-confirm" data-modal-mask="true">
<i class="sui-icon-undo" aria-hidden="true"></i>
<?php esc_html_e( 'Reset Settings', 'wp-smushit' ); ?>
</button>
</div>
</div>
@@ -0,0 +1,27 @@
<?php
/**
* General settings meta box.
*
* @since 3.0
* @package WP_Smush
*
* @var bool $detection Detection settings.
* @var string $site_language Site language.
* @var bool $tracking Tracking status.
* @var string $translation_link Link to plugin translation page.
* @var $image_dimensions
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-box-settings-row">
<p>
<?php esc_html_e( 'Configure general settings for this plugin.', 'wp-smushit' ); ?>
</p>
</div>
<?php do_action( 'wp_smush_render_general_setting_rows' ); ?>
@@ -0,0 +1,133 @@
<?php
/**
* Permissions settings meta box.
*
* @since 3.0
* @package WP_Smush
*
* @var mixed $networkwide Network wide settings.
*/
use Smush\Core\Hub_Connector;
use Smush\Core\Membership\Membership;
use Smush\Core\Settings;
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-box-settings-row" id="permissions-subsite-controls-settings-row">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label">
<?php esc_html_e( 'Subsite Controls', 'wp-smushit' ); ?>
</span>
<span class="sui-description">
<?php esc_html_e( 'By default, subsites will inherit your network settings. Choose which modules you want to allow subsite admins to override.', 'wp-smushit' ); ?>
</span>
</div>
<div class="sui-box-settings-col-2">
<div class="sui-side-tabs sui-tabs">
<?php if ( Membership::get_instance()->is_api_hub_access_required() ) : ?>
<a class="sui-button sui-button-blue smush-button-dark-blue" href="<?php echo esc_url( Hub_Connector::get_connect_site_url( 'smush-bulk', 'smush_settings_permissions_subsite_controls' ) ); ?>">
<span class="sui-icon-plug-connected" aria-hidden="true"></span>
<?php esc_html_e( 'Connect My Site', 'wp-smushit' ); ?>
</a>
<span class="sui-description" style="margin-top:10px">
<?php
/* translators: 1: Open strong tag, 2: Close strong tag */
printf( esc_html__( 'Connect your site to the %1$sfree%2$s WPMU DEV Hub to enable Subsite Controls. Setup takes seconds — 100%% free, no card required.', 'wp-smushit' ), '<strong>', '</strong>' );
?>
</span>
<?php else : ?>
<div data-tabs>
<?php $selected = is_array( $networkwide ) ? 'custom' : $networkwide; ?>
<label for="access-none" class="sui-tab-item <?php echo ! $networkwide ? 'active' : ''; ?>">
<input type="radio" name="wp-smush-subsite-access" value="0" id="access-none" <?php checked( $selected, false ); ?>>
<?php esc_html_e( 'None', 'wp-smushit' ); ?>
</label>
<label for="access-all" class="sui-tab-item <?php echo '1' === $networkwide ? 'active' : ''; ?>">
<input type="radio" name="wp-smush-subsite-access" value="1" id="access-all" <?php checked( $selected, '1' ); ?>>
<?php esc_html_e( 'All', 'wp-smushit' ); ?>
</label>
<label for="access-custom" class="sui-tab-item <?php echo is_array( $networkwide ) ? 'active' : ''; ?>">
<input type="radio" name="wp-smush-subsite-access" value="custom" id="access-custom" <?php checked( $selected, 'custom' ); ?>>
<?php esc_html_e( 'Custom', 'wp-smushit' ); ?>
</label>
</div>
<div data-panes>
<div class="sui-notice sui-notice-info <?php echo ! $networkwide ? 'active' : ''; ?>">
<div class="sui-notice-content">
<div class="sui-notice-message">
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
<p><?php esc_html_e( "Subsite admins can't override any module settings and will always inherit your network settings.", 'wp-smushit' ); ?></p>
</div>
</div>
</div>
<div class="sui-notice sui-notice-info <?php echo '1' === $networkwide ? 'active' : ''; ?>">
<div class="sui-notice-content">
<div class="sui-notice-message">
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
<p><?php esc_html_e( 'Subsite admins can override all module settings.', 'wp-smushit' ); ?></p>
</div>
</div>
</div>
<div class="sui-tab-boxed <?php echo is_array( $networkwide ) ? 'active' : ''; ?>">
<p class="sui-description">
<?php esc_html_e( 'Choose which modules settings subsite admins have access to.', 'wp-smushit' ); ?>
</p>
<?php
$is_bulk_smush_active = ! is_array( $networkwide ) || in_array( 'bulk', $networkwide, true );
$is_directory_smush_active = $is_bulk_smush_active && ( ! is_array( $networkwide ) || in_array( 'directory_smush', $networkwide, true ) );
?>
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
<input
type="checkbox"
id="module-bulk"
name="wp-smush-access[]"
value="bulk"
<?php checked( $is_bulk_smush_active ); ?>
onchange="(() => {
const directorySmushEl = document.getElementById( 'module-directory_smush' );
if ( ! directorySmushEl ) {
return;
}
if ( ! this.checked ) {
directorySmushEl.checked = false;
directorySmushEl.disabled = true;
} else {
directorySmushEl.disabled = false;
}
})();">
<span aria-hidden="true">&nbsp;</span>
<span><?php esc_html_e( 'Bulk Smush', 'wp-smushit' ); ?></span>
</label>
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
<input type="checkbox" id="module-directory_smush" name="wp-smush-access[]" <?php echo $is_bulk_smush_active ? '' : 'disabled'; ?> value="directory_smush" <?php checked( $is_directory_smush_active ); ?>>
<span aria-hidden="true">&nbsp;</span>
<span><?php esc_html_e( 'Directory Smush', 'wp-smushit' ); ?></span>
</label>
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
<input type="checkbox" id="module-integrations" name="wp-smush-access[]" value="integrations" <?php checked( ! is_array( $networkwide ) || in_array( 'integrations', $networkwide, true ) ); ?>>
<span aria-hidden="true">&nbsp;</span>
<span><?php esc_html_e( 'Integrations', 'wp-smushit' ); ?></span>
</label>
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
<input type="checkbox" id="module-lazy_load" name="wp-smush-access[]" value="<?php echo esc_attr( Settings::get_lazy_preload_module_name() ); ?>" <?php checked( ! is_array( $networkwide ) || in_array( 'lazy_load', $networkwide, true ) ); ?>>
<span aria-hidden="true">&nbsp;</span>
<span><?php esc_html_e( 'Lazy Load & Preload', 'wp-smushit' ); ?></span>
</label>
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
<input type="checkbox" id="module-cdn" name="wp-smush-access[]" value="cdn" <?php checked( ! is_array( $networkwide ) || in_array( 'cdn', $networkwide, true ) ); ?>>
<span aria-hidden="true">&nbsp;</span>
<span><?php esc_html_e( 'CDN', 'wp-smushit' ); ?></span>
</label>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
@@ -0,0 +1,15 @@
<?php
/**
* Render Smush NextGen pages.
*
* @package WP_Smush
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
$this->do_meta_boxes( 'summary' );
$this->do_meta_boxes( 'bulk' );
$this->view( 'footer-links', array(), 'common' );
@@ -0,0 +1,68 @@
<?php
/**
* Render Smush pages.
*
* @package WP_Smush
*
* @var Abstract_Page $this
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
// Some pages don't need to have wrapped in a form.
$page_without_forms = array();
$page_has_form = ! in_array( $this->get_slug(), $page_without_forms, true );
$this->do_meta_boxes( 'summary' );
?>
<?php if ( ! $this->get_current_tab() ) : ?>
<?php if ( $page_has_form ) : ?>
<form id="<?php echo esc_attr( $this->get_slug() ); ?>-form" class="wp-smush-settings-form" method="post">
<?php endif; ?>
<?php $this->do_meta_boxes(); ?>
<?php if ( 'smush-next-gen' === $this->get_slug() && $this->is_wizard() ) : ?>
<div id="smush-box-webp-wizard" class="sui-webp-wizard sui-box"></div>
<?php endif; ?>
<?php if ( $page_has_form ) : ?>
</form>
<?php endif; ?>
<?php else : ?>
<?php if ( 'configs' !== $this->get_current_tab() ) : ?>
<form id="<?php echo esc_attr( $this->get_slug() ); ?>-form" method="post">
<?php endif; ?>
<?php do_action( 'wp_smush_admin_page_before_sidenav', $this->get_slug(), $this->get_current_tab() ); ?>
<div class="sui-row-with-sidenav">
<?php $this->show_tabs(); ?>
<?php $this->do_meta_boxes( $this->get_current_tab() ); ?>
<?php if ( 'configs' === $this->get_current_tab() ) : ?>
<div id="smush-box-configs"></div>
<?php endif; ?>
</div>
<input type="hidden" name="tab" value="<?php echo esc_attr( $this->get_current_tab() ); ?>">
<?php if ( 'configs' !== $this->get_current_tab() ) : ?>
</form>
<?php endif; ?>
<?php endif; ?>
<?php if ( $this->has_meta_boxes( 'box-dashboard-left' ) || $this->has_meta_boxes( 'box-dashboard-right' ) ) : ?>
<div class="sui-row">
<div class="sui-col-lg-6">
<?php $this->do_meta_boxes( 'box-dashboard-left' ); ?>
</div>
<div class="sui-col-lg-6">
<?php $this->do_meta_boxes( 'box-dashboard-right' ); ?>
<?php if ( ! is_multisite() || is_network_admin() ) : ?>
<div id="smush-widget-configs"></div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php
$this->view( 'footer-links', array(), 'common' );
@@ -0,0 +1,230 @@
<?php
/**
* Smush PRO upgrade page.
*
* @since 3.2.3
* @package WP_Smush
*/
use Smush\App\Admin;
$upgrade_url = add_query_arg(
array(
'utm_source' => 'smush',
'utm_medium' => 'plugin',
),
'https://wpmudev.com/project/wp-smush-pro/'
);
?>
<div class="sui-upgrade-page">
<div class="sui-upgrade-page-header">
<div class="sui-upgrade-page__container">
<div class="sui-upgrade-page-header__content">
<h1><?php esc_html_e( 'Upgrade to Smush Pro', 'wp-smushit' ); ?></h1>
<p>
<?php
printf(
/* translators: %d: Number of CDN PoP locations */
esc_html__( "Get Smush Pro and bulk optimize every image you've ever added to your site with one click. Smush images in the background and serve them in stunning high quality from %d locations around the globe with our blazing-fast CDN.", 'wp-smushit' ),
Admin::get_cdn_pop_locations()
);
?>
</p>
<p>
<?php
printf(
/* translators: 1: Opening <strong>, 2: Closing </strong> */
esc_html__( 'Automatically compress and resize huge images without any size limitations. %1$sGet up to 5x better savings with Ultra compression%2$s and fix your Google PageSpeed score with the best image optimizer WordPress has ever known.', 'wp-smushit' ),
'<strong>',
'</strong>'
);
?>
</p>
<a href="<?php echo esc_url( add_query_arg( 'utm_campaign', 'smush_propage_topbutton', $upgrade_url ) ); ?>" class="sui-button sui-button-lg sui-button-purple" target="_blank">
<?php esc_html_e( 'UPGRADE TO PRO', 'wp-smushit' ); ?>
</a>
<div class="sui-reviews">
<span class="sui-reviews__stars"></span>
<div class="sui-reviews__rating"><span class="sui-reviews-rating">-</span> / <?php esc_html_e( '5.0 rating from', 'wp-smushit' ); ?> <span class="sui-reviews-customer-count">-</span> <?php esc_html_e( 'customers', 'wp-smushit' ); ?></div>
<a class="sui-reviews__link" href="https://www.reviews.io/company-reviews/store/wpmudev-org" target="_blank">
Reviews.io<i class="sui-icon-arrow-right" aria-hidden="true"></i>
</a>
</div>
</div>
<div class="sui-upgrade-page-header__image"></div>
</div>
</div>
<div class="smush-stats">
<div class="smush-stats-item">
<div><span>65.83</span> <?php esc_html_e( 'Billion', 'wp-smushit' ); ?></div>
<div class="smush-stats-description"><?php esc_html_e( 'Images Optimized', 'wp-smushit' ); ?></div>
</div>
<div class="smush-stats-item">
<div><span>726,410</span></div>
<div class="smush-stats-description"><?php esc_html_e( 'Sites Optimized', 'wp-smushit' ); ?></div>
</div>
<div class="smush-stats-item">
<div><span>287,038</span> GB</div>
<div class="smush-stats-description"><?php esc_html_e( 'Total Savings', 'wp-smushit' ); ?></div>
</div>
</div>
<div class="sui-upgrade-page-features">
<div class="sui-upgrade-page-features__header" style="margin-top: 70px">
<h2><?php esc_html_e( 'Optimize unlimited images with Smush Pro', 'wp-smushit' ); ?></h2>
<p><?php esc_html_e( 'Learn why Smush Pro is the best image optimization plugin.', 'wp-smushit' ); ?></p>
<div class="thumbnail-container">
<img src="<?php echo esc_url( WP_SMUSH_URL . 'app/assets/images/smush-thumbnail@2x.png' ); ?>" alt="<?php esc_attr_e( 'Play', 'wp-smushit' ); ?>" id="wistia-play-button" role="button">
</div>
<span id="wistia_oegnwrdag1"></span>
<script>
document.addEventListener("DOMContentLoaded", function() {
var trigger = document.getElementById("wistia-play-button");
window.wistiaSmushEmbed = null;
window.wistiaInit = function(Wistia) {
window.wistiaSmushEmbed = Wistia.embed("oegnwrdag1", {
version: "v2",
videoWidth: 1280,
videoHeight: 720,
playerColor: "14485f",
videoQuality: "hd-only",
popover: true,
popoverPreventScroll: true,
popoverContent: 'html'
});
};
if (trigger) {
trigger.addEventListener("click", function(e) {
e.preventDefault();
if (window.wistiaSmushEmbed) {
window.wistiaSmushEmbed.play();
}
});
}
});
</script>
</div>
</div>
<div class="sui-upgrade-page-features">
<div class="sui-upgrade-page-features__header">
<h2><?php esc_html_e( 'Pro Features', 'wp-smushit' ); ?></h2>
<p><?php esc_html_e( 'Upgrading to Pro will get you the following benefits.', 'wp-smushit' ); ?></p>
</div>
</div>
<div class="sui-upgrade-page__container">
<div class="sui-upgrade-page-features__items">
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-performance" aria-hidden="true"></i>
<h3><?php esc_html_e( 'Serve images faster with Ultra Compression', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( 'Experience up to 5x better compression than Super Smush. Optimize your images even further and make your pages load faster than ever.', 'wp-smushit' ); ?></p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-unlock" aria-hidden="true"></i>
<h3><?php esc_html_e( 'No limits, no restrictions', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( 'Need a one-click bulk optimization solution to quickly and easily compress your entire image library? Remove the per batch bulk smushing restriction and increase the image size limit from 5MB to completely unlimited.', 'wp-smushit' ); ?></p>
</div>
<div class="sui-upgrade-page-features__item">
<span class="sui-icon-loader" aria-hidden="true"></span>
<h3><?php esc_html_e( 'Compress images in the background', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( 'Thanks to Background Optimization, you can leave the plugin interface while images are still being compressed. Smush will continue to work its magic in the background, leaving you free to do other things!', 'wp-smushit' ); ?></p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-web-globe-world" aria-hidden="true"></i>
<h3>
<?php
echo esc_html( $this->whitelabel->whitelabel_string( __( 'Streamline your images with Smush CDN', 'wp-smushit' ) ) );
?>
</h3>
<p>
<?php
printf(
/* translators: %d: Number of CDN PoP locations */
esc_html__( 'Use the blazing-fast Smush image CDN to automatically resize your files to the perfect size and serve WebP files (25%% smaller than PNG and JPG) from %d locations around the globe.', 'wp-smushit' ),
Admin::get_cdn_pop_locations()
);
?>
</p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-photo-picture" aria-hidden="true"></i>
<h3>
<?php
echo esc_html( $this->whitelabel->whitelabel_string( __( 'Serve next-gen WebP images (without Smush CDN)', 'wp-smushit' ) ) );
?>
</h3>
<p>
<?php
$cdn_next_gen_message = __( "Prefer not to use Smush CDN? Our standalone WebP feature allows you to serve next-gen images without sacrificing quality. You can also gracefully fall back to the older image formats for browsers that aren't compatible.", 'wp-smushit' );
echo esc_html( $this->whitelabel->whitelabel_string( $cdn_next_gen_message ) );
?>
</p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-wand-magic" aria-hidden="true"></i>
<h3><?php esc_html_e( 'Auto-convert PNGs to JPEGs (lossy)', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( "Smush looks for additional savings and automatically converts PNG files to JPEG if it will further reduce the size without a visible drop in quality. Now that's smart image compression.", 'wp-smushit' ); ?></p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-hummingbird" aria-hidden="true"></i>
<h3><?php esc_html_e( 'Get faster sites with Hummingbird Pro', 'wp-smushit' ); ?></h3>
<p>
<?php
printf(
/* translators: %d: Number of CDN PoP locations */
esc_html__( 'Optimize the performance of your site and ace that Google PageSpeed score with a full caching suite, automatic asset optimization, and our blazing-fast %d-point CDN.', 'wp-smushit' ),
Admin::get_cdn_pop_locations()
);
?>
</p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-graph-bar" aria-hidden="true"></i>
<h3><?php esc_html_e( 'Automated white label reports', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( 'Customize, style, schedule and send white label client and developer reports in just a few clicks. Each report includes embedded performance, security, SEO, and analytics data.', 'wp-smushit' ); ?></p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-hub" aria-hidden="true"></i>
<h3><?php esc_html_e( 'Manage unlimited WP sites with The Hub', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( 'Automate site updates, backups, security, and performance all from one central site management dashboard. Call on our expert 24/7 live support directly from your interface at anytime.', 'wp-smushit' ); ?></p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-gdpr" aria-hidden="true"></i>
<h3><?php esc_html_e( 'Premium WordPress plugins', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( 'Along with Smush, you get WPMU DEVs (the developers of Smush) full suite of premium WP plugins. Covering everything from security and backups, to marketing and SEO. Use these bonus tools on unlimited sites and keep them free, forever!', 'wp-smushit' ); ?></p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-help-support" aria-hidden="true"></i>
<h3><?php esc_html_e( '24/7 live WordPress support', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( 'We cant stress this enough: Our outstanding WordPress support is available with live chat 24/7, and well help you with absolutely any WordPress issue, not just our products. Its an expert WordPress team on call whenever you need them.', 'wp-smushit' ); ?></p>
</div>
<div class="sui-upgrade-page-features__item">
<i class="sui-icon-wpmudev-logo" aria-hidden="true"></i>
<h3><?php esc_html_e( 'Zero risk, 30-day money-back guarantee', 'wp-smushit' ); ?></h3>
<p><?php esc_html_e( 'We offer a full 30-day money-back guarantee. So if Smush isnt the best image optimizer youve ever used, let us know and well refund all of your money immediately.', 'wp-smushit' ); ?></p>
</div>
</div>
</div>
<div class="sui-upgrade-page-cta">
<div class="sui-upgrade-page-cta__inner">
<h2><?php esc_html_e( 'Join 1 Million+ Happy Users', 'wp-smushit' ); ?></h2>
<p><?php esc_html_e( "Discover why we're trusted by 97% of our customers and unlock the ultimate image optimization capabilities to deliver blazing-fast websites with stunning visuals.", 'wp-smushit' ); ?></p>
<div>
<a href="<?php echo esc_url( add_query_arg( 'utm_campaign', 'smush_propage_bottombutton', $upgrade_url ) ); ?>" class="sui-button sui-button-lg sui-button-purple" target="_blank">
<?php esc_html_e( 'Get Smush Pro for a faster WP SITE', 'wp-smushit' ); ?>
</a>
</div>
<small>
<?php esc_html_e( 'Includes a 30-day money-back guarantee', 'wp-smushit' ); ?>
</small>
</div>
</div>
</div>
<?php
$this->view( 'footer-links', array(), 'common' );
@@ -0,0 +1,32 @@
<?php
use Smush\Core\Settings;
use Smush\Core\Membership\Membership;
use Smush\Core\Hub_Connector;
$lossy_level_setting = Settings::get_instance()->get_lossy_level_setting();
$is_super_active = Settings::get_level_super_lossy() === $lossy_level_setting;
$class_names = array();
$class_names[] = 'smush-upsell-link wp-smush-upsell-ultra-compression';
$is_dashboard_page = 'smush' === $this->get_slug();
$location = $is_dashboard_page ? 'dashboard_summary' : 'bulksmush_summary';
$utm_link = $this->get_utm_link(
array(
'utm_campaign' => "smush_ultra_{$location}",
)
);
?>
<li class="smush-summary-row-compression-type">
<span class="sui-list-label"><?php esc_html_e( 'Smush Mode', 'wp-smushit' ); ?></span>
<span class="sui-list-detail">
<?php if ( Membership::get_instance()->is_api_hub_access_required() ) : ?>
<a class="sui-button sui-button-blue smush-button-dark-blue" href="<?php echo esc_url( Hub_Connector::get_connect_site_url( 'smush-bulk', 'smush_summary_mode_connect' ) ); ?>"><?php _e( 'Connect For free', 'wp-smushit' ); ?></a>
<?php else : ?>
<span class="wp-smush-current-compression-level sui-tag sui-tag-green"><?php echo esc_html( Settings::get_instance()->get_current_lossy_level_label() ); ?></span>
<a target="_blank" href="<?php echo isset( $utm_link ) ? esc_url( $utm_link ) : esc_url( $this->get_url( 'smush-bulk' ) ) . '#lossy-settings-row'; ?>" class="<?php echo esc_attr( join( ' ', $class_names ) ); ?>" title="<?php esc_attr_e( 'Choose the level of compression that suits your needs.', 'wp-smushit' ); ?>">
<?php esc_html_e( '5x your compression with Ultra', 'wp-smushit' ); ?>
<span class="sui-icon-open-new-window" aria-hidden="true"></span>
</a>
<?php endif; ?>
</span>
</li>
@@ -0,0 +1,65 @@
<?php
/**
* Summary meta box on dashboard page.
*
* @package WP_Smush
*
* @var string $human_bytes
* @var int $remaining
* @var int $resize_count
* @var bool $resize_enabled
* @var int $resize_savings
* @var string|int $stats_percent
* @var int $total_optimized
* @var string $percent_grade
* @var int|float $percent_metric
* @var int $percent_optimized
*
* @var Smush\App\Abstract_Page $this Page.
*/
use Smush\Core\Settings;
if ( ! defined( 'WPINC' ) ) {
die;
}
$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">
<ul class="sui-list smush-stats-list">
<?php
/**
* Allows to output Directory Smush stats
*/
do_action( 'stats_ui_after_resize_savings' );
?>
</ul>
</div>
@@ -0,0 +1,36 @@
<?php
/**
* Tabs layout
*
* @package WP_Smush
*
* @var \Smush\App\Abstract_Page $this
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<div class="sui-sidenav smush-sidenav">
<ul class="sui-vertical-tabs sui-sidenav-hide-md">
<?php foreach ( $this->get_tabs() as $tab_id => $name ) : ?>
<li class="sui-vertical-tab <?php echo esc_attr( 'smush-' . $tab_id ); ?> <?php echo ( $tab_id === $this->get_current_tab() ) ? 'current' : null; ?>">
<a href="<?php echo esc_url( $this->get_tab_url( $tab_id ) ); ?>">
<?php echo esc_html( $name ); ?>
</a>
<?php do_action( 'wp_smush_admin_after_tab_' . $this->get_slug(), $tab_id ); ?>
</li>
<?php endforeach; ?>
</ul>
<div class="sui-sidenav-hide-lg">
<label class="sui-label"><?php esc_html_e( 'Navigate', 'wp-smushit' ); ?></label>
<select class="sui-mobile-nav" style="margin-bottom: 20px;">
<?php foreach ( $this->get_tabs() as $tab_id => $name ) : ?>
<option value="<?php echo esc_url( $this->get_tab_url( $tab_id ) ); ?>" <?php selected( $this->get_current_tab(), $tab_id ); ?>><?php echo esc_html( $name ); ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
@@ -0,0 +1,67 @@
<?php
/**
* WebP status meta box when the server configurations is not configured.
*
* @package WP_Smush
*/
use Smush\Core\Webp\Webp_Configuration;
if ( ! defined( 'WPINC' ) ) {
die;
}
$webp_configuration = Webp_Configuration::get_instance();
$error_message = $webp_configuration->server_configuration()->get_configuration_message();
$is_next_gen_page = 'smush-next-gen' === $this->get_slug();
?>
<div class="sui-notice sui-notice-warning">
<div class="sui-notice-content">
<div class="sui-notice-message">
<i class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></i>
<p><?php echo esc_html( $error_message ); ?></p>
<p>
<?php
$direct_conversion_link = sprintf(
'<a href="javascript:void(0);" onclick="window?.WP_Smush?.WebP && window.WP_Smush.WebP.switchMethod(\'%s\');">%s</a>',
esc_attr( Webp_Configuration::get_direct_conversion_method_key() ),
esc_html__( 'Direct Conversion', 'wp-smushit' )
);
if ( apply_filters( 'wpmudev_branding_hide_doc_link', false ) ) {
printf(
/* translators: %s: Direct Conversion link */
esc_html__( 'Please try the %s method if you don\'t have server access.', 'wp-smushit' ),
$direct_conversion_link
);
} else {
$support_link = '<a href="https://wpmudev.com/hub2/support/#get-support" target="_blank">' . esc_html__( 'contact support', 'wp-smushit' ) . '</a>';
printf(
/* translators: 1: Direct Conversion link, 2: Premium support link */
esc_html__( 'Please try the %1$s method if you don\'t have server access or %2$s for further assistance.', 'wp-smushit' ),
$direct_conversion_link,
$support_link
);
}
?>
</p>
<?php if ( $is_next_gen_page ) : ?>
<div style="margin-top:15px">
<button type="button" id="smush-webp-recheck" class="sui-button" data-is-configured="0">
<span class="sui-loading-text"><i class="sui-icon-update"></i><?php esc_html_e( 'Re-check status', 'wp-smushit' ); ?></span>
<i class="sui-icon-loader sui-loading" aria-hidden="true"></i>
</button>
<button id="smush-webp-toggle-wizard" type="button" class="sui-button sui-button-ghost" style="margin-left: 0;">
<span class="sui-loading-text">
<?php esc_html_e( 'Reconfigure', 'wp-smushit' ); ?>
</span>
<span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
</button>
</div>
<?php endif; ?>
</div>
</div>
</div>