Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wp-smush.../app/views/bulk
File: meta-box.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Bulk Smush meta box.
[2] Fix | Delete
*
[3] Fix | Delete
* @since 2.9.0
[4] Fix | Delete
* @package WP_Smush
[5] Fix | Delete
*
[6] Fix | Delete
* @var Smush\Core\Core $core Instance of Smush\Core\Core
[7] Fix | Delete
* @var bool $can_use_background Check if user can use BO.
[8] Fix | Delete
* @var bool $total_count
[9] Fix | Delete
* @var integer $unsmushed_count Count of the images that need smushing.
[10] Fix | Delete
* @var integer $resmush_count Count of the images that need re-smushing.
[11] Fix | Delete
* @var integer $remaining_count Remaining count of all images to smush. Unsmushed images + images to re-smush.
[12] Fix | Delete
* @var string $bulk_upgrade_url Bulk Smush upgrade to PRO url.
[13] Fix | Delete
* @var string $upsell_cdn_url Upsell CDN URL.
[14] Fix | Delete
* @var bool $background_processing_enabled Background optimization is enabled.
[15] Fix | Delete
* @var bool $background_in_processing Background optimization in progressing or not.
[16] Fix | Delete
* @var string $background_in_processing_notice
[17] Fix | Delete
* @var string $in_processing_notice
[18] Fix | Delete
*/
[19] Fix | Delete
use Smush\Core\Stats\Global_Stats;
[20] Fix | Delete
use Smush\App\Admin;
[21] Fix | Delete
[22] Fix | Delete
if ( ! defined( 'WPINC' ) ) {
[23] Fix | Delete
die;
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
$start_bulk_webp_conversion = ! empty( $_GET['smush-action'] ) && 'start-bulk-webp-conversion' === wp_unslash( $_GET['smush-action'] );
[27] Fix | Delete
[28] Fix | Delete
if ( 0 !== absint( $total_count ) ) :
[29] Fix | Delete
if ( $start_bulk_webp_conversion && $this->settings->is_webp_module_active() ) {
[30] Fix | Delete
$msg = __( 'When Local WebP is enabled, Bulk Smush will convert your images to .webp format in addition to its regular smushing for optimal performance.', 'wp-smushit' );
[31] Fix | Delete
} elseif ( $background_processing_enabled ) {
[32] Fix | Delete
$msg = __( 'Bulk smush detects images that can be optimized and allows you to compress them in bulk in the background without any quality loss.', 'wp-smushit' );
[33] Fix | Delete
} else {
[34] Fix | Delete
$msg = __( 'Bulk smush detects images that can be optimized and allows you to compress them in bulk.', 'wp-smushit' );
[35] Fix | Delete
}
[36] Fix | Delete
?>
[37] Fix | Delete
<p><?php echo esc_html( $msg ); ?></p>
[38] Fix | Delete
<?php endif; ?>
[39] Fix | Delete
[40] Fix | Delete
<?php
[41] Fix | Delete
$this->view(
[42] Fix | Delete
'loopback-error-dialog',
[43] Fix | Delete
array(),
[44] Fix | Delete
'modals'
[45] Fix | Delete
);
[46] Fix | Delete
[47] Fix | Delete
// If there are no images in media library.
[48] Fix | Delete
if ( 0 === absint( $total_count ) ) {
[49] Fix | Delete
$this->view( 'media-lib-empty', array(), 'views/bulk' );
[50] Fix | Delete
return;
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
$this->view( 'auto-bulk-smush-notification', array(
[54] Fix | Delete
'background_processing_enabled' => $background_processing_enabled,
[55] Fix | Delete
), 'views/bulk' );
[56] Fix | Delete
[57] Fix | Delete
if ( ! $can_use_background ) {
[58] Fix | Delete
$this->view(
[59] Fix | Delete
'limit-reached-notice',
[60] Fix | Delete
array(),
[61] Fix | Delete
'views/bulk'
[62] Fix | Delete
);
[63] Fix | Delete
}
[64] Fix | Delete
// Progress bar.
[65] Fix | Delete
$this->view(
[66] Fix | Delete
'progress-bar',
[67] Fix | Delete
array(
[68] Fix | Delete
'count' => $remaining_count,
[69] Fix | Delete
'background_in_processing_notice' => $background_in_processing_notice,
[70] Fix | Delete
'background_processing_enabled' => $background_processing_enabled,
[71] Fix | Delete
'in_processing_notice' => $in_processing_notice,
[72] Fix | Delete
),
[73] Fix | Delete
'common'
[74] Fix | Delete
);
[75] Fix | Delete
[76] Fix | Delete
// All images are smushed.
[77] Fix | Delete
$this->view( 'all-images-smushed-notice', array( 'all_done' => empty( $remaining_count ) ), 'common' );
[78] Fix | Delete
[79] Fix | Delete
// List errors.
[80] Fix | Delete
$this->view( 'list-errors', array(), 'views/bulk' );
[81] Fix | Delete
[82] Fix | Delete
?>
[83] Fix | Delete
<div class="wp-smush-bulk-wrapper sui-border-frame<?php echo empty( $remaining_count ) || $background_in_processing ? ' sui-hidden' : ''; ?>">
[84] Fix | Delete
<div id="wp-smush-bulk-content">
[85] Fix | Delete
<?php WP_Smush::get_instance()->admin()->print_pending_bulk_smush_content( $remaining_count, $resmush_count, $unsmushed_count ); ?>
[86] Fix | Delete
</div>
[87] Fix | Delete
<?php
[88] Fix | Delete
$bulk_smush_class = $background_processing_enabled ? 'wp-smush-bo-start' : 'wp-smush-all';
[89] Fix | Delete
[90] Fix | Delete
if ( Global_Stats::get()->is_outdated() && ! $background_in_processing ) {
[91] Fix | Delete
$bulk_smush_class .= ' wp-smush-scan-and-bulk-smush';
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
?>
[95] Fix | Delete
<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' ); ?>">
[96] Fix | Delete
<?php esc_html_e( 'BULK SMUSH', 'wp-smushit' ); ?>
[97] Fix | Delete
</button>
[98] Fix | Delete
</div>
[99] Fix | Delete
<?php
[100] Fix | Delete
if ( ! $can_use_background ) {
[101] Fix | Delete
$global_upsell_desc = sprintf(
[102] Fix | Delete
/* translators: %d: Number of CDN PoP locations */
[103] Fix | Delete
__( 'Process images 2x faster, leave this page while Bulk Smush runs in the background, and serve streamlined next-gen images via Smush’s %d-point CDN and Local WebP features.', 'wp-smushit' ),
[104] Fix | Delete
Admin::CDN_POP_LOCATIONS
[105] Fix | Delete
);
[106] Fix | Delete
[107] Fix | Delete
$this->view(
[108] Fix | Delete
'global-upsell',
[109] Fix | Delete
array(
[110] Fix | Delete
'bulk_upgrade_url' => $bulk_upgrade_url,
[111] Fix | Delete
'global_upsell_desc' => $global_upsell_desc,
[112] Fix | Delete
),
[113] Fix | Delete
'views/bulk'
[114] Fix | Delete
);
[115] Fix | Delete
} else {
[116] Fix | Delete
$this->view(
[117] Fix | Delete
'retry-bulk-smush-notice',
[118] Fix | Delete
array(),
[119] Fix | Delete
'modals'
[120] Fix | Delete
);
[121] Fix | Delete
[122] Fix | Delete
if ( ! WP_Smush::is_pro() ) {
[123] Fix | Delete
$this->view(
[124] Fix | Delete
'cdn-upsell',
[125] Fix | Delete
array(
[126] Fix | Delete
'background_in_processing' => $background_in_processing,
[127] Fix | Delete
'bulk_upgrade_url' => $upsell_cdn_url,
[128] Fix | Delete
),
[129] Fix | Delete
'views/bulk'
[130] Fix | Delete
);
[131] Fix | Delete
}
[132] Fix | Delete
}
[133] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function