| @@ -31,9 +31,9 @@ | ||
| 31 | 31 | <div class="metasync-stat-item metasync-stat-pending"> |
| 32 | 32 | <span class="metasync-stat-number"><?php echo esc_html(number_format_i18n($stats['unoptimized'])); ?></span> |
| 33 | 33 | <span class="metasync-stat-label"><?php esc_html_e('Unoptimized', 'metasync'); ?></span> |
| 34 | 34 | </div> |
| 35 | - <div class="metasync-stat-item"> | |
| 35 | + <div class="metasync-stat-item metasync-stat-rate"> | |
| 36 | 36 | <div class="metasync-stat-progress-wrap"> |
| 37 | 37 | <div class="metasync-stat-progress-bar"> |
| 38 | 38 | <div class="metasync-stat-progress-fill" style="width: <?php echo esc_attr($stats['percentage']); ?>%;"></div> |
| 39 | 39 | </div> |
| @@ -53,8 +53,9 @@ | ||
| 53 | 53 | <span class="metasync-batch-text" id="metasync-batch-text"> |
| 54 | 54 | <?php |
| 55 | 55 | if ($batch_progress['status'] === 'running') { |
| 56 | 56 | printf( |
| 57 | + /* translators: 1: number of images processed so far, 2: total number of images in the batch. */ | |
| 57 | 58 | esc_html__('Optimizing %1$d of %2$d images...', 'metasync'), |
| 58 | 59 | $batch_progress['processed'], |
| 59 | 60 | $batch_progress['total'] |
| 60 | 61 | ); |
| @@ -94,9 +95,9 @@ | ||
| 94 | 95 | </div> |
| 95 | 96 | |
| 96 | 97 | <!-- List Table --> |
| 97 | 98 | <form method="get" id="metasync-image-library-form"> |
| 98 | - <input type="hidden" name="page" value="<?php echo esc_attr($_REQUEST['page'] ?? ''); ?>" /> | |
| 99 | + <input type="hidden" name="page" value="<?php echo esc_attr($_REQUEST['page'] ?? ''); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only page slug, escaped into a form field ?>" /> | |
| 99 | 100 | <input type="hidden" name="tab" value="image-library" /> |
| 100 | 101 | |
| 101 | 102 | <!-- Unified Toolbar: Optimize All + Search --> |
| 102 | 103 | <div class="metasync-table-toolbar"> |
| @@ -102,14 +103,15 @@ | ||
| 102 | 103 | <div class="metasync-table-toolbar"> |
| 103 | 104 | <div class="metasync-toolbar-left"> |
| 104 | 105 | <button type="button" class="button button-primary" id="metasync-optimize-all" |
| 105 | 106 | <?php disabled($batch_progress['status'] === 'running' || $stats['unoptimized'] === 0); ?>> |
| 106 | - <span class="dashicons dashicons-performance" style="margin-top: 3px;"></span> | |
| 107 | + <span class="dashicons dashicons-performance"></span> | |
| 107 | 108 | <?php esc_html_e('Optimize All', 'metasync'); ?> |
| 108 | 109 | <?php if ($stats['unoptimized'] > 0): ?> |
| 109 | 110 | <span class="metasync-count-badge"><?php echo esc_html(number_format_i18n($stats['unoptimized'])); ?></span> |
| 110 | 111 | <?php endif; ?> |
| 111 | 112 | </button> |
| 113 | + <?php Metasync::render_tooltip_icon('media_optimize_all', "Converts every unoptimized image in the background. If your Conversion Strategy is set to 'Replace', this permanently overwrites all original files — check that setting first."); ?> | |
| 112 | 114 | </div> |
| 113 | 115 | <div class="metasync-toolbar-right"> |
| 114 | 116 | <?php $list_table->search_box(__('Search', 'metasync'), 'metasync-image-search'); ?> |
| 115 | 117 | </div> |