printf(esc_html__('%s, you are doing great!', 'tiny-compress-images'), $this->friendly_user_name()); } else { printf(esc_html__('%s, you are doing good.', 'tiny-compress-images'), $this->friendly_user_name()); } echo ' '; printf(esc_html__('%d%% of your image library is optimized.', 'tiny-compress-images'), $percentage_of_files); echo ' '; printf(esc_html__('Start the bulk optimization to optimize the remainder of your library.', 'tiny-compress-images')); } else { esc_html_e('Here you can start optimizing your entire library. Press the big button to start improving your website speed instantly!', 'tiny-compress-images'); } ?> </p> <p> <?php if (Tiny_Settings::wr2x_active()) { esc_html_e('Notice that the WP Retina 2x sizes will not be compressed using this page. You will need to bulk generate the retina sizes separately from the WP Retina 2x page.', 'tiny-compress-images'); } ?> </p> <table class="totals"> <tr> <td class="item"> <h3> <?php echo wp_kses(__('Uploaded <br> images', 'tiny-compress-images'), array('br' => array())); ?> </h3> <span id="uploaded-images"> <?php echo $stats['uploaded-images'];
if (!is_object($size)) { $size = new Tiny_Image_Size(); } ?> <tr class="<?php echo 0 == $i % 2 ? 'even' : 'odd'; ?> "> <?php echo '<td>'; echo Tiny_Image::is_original($size_name) ? esc_html__('Original', 'tiny-compress-images') : esc_html__(ucfirst(rtrim($size_name, '_wr2x'))); echo ' '; if (!array_key_exists($size_name, $active_sizes) && !Tiny_Image::is_retina($size_name)) { echo '<em>' . esc_html__('(not in use)', 'tiny-compress-images') . '</em>'; } else { if ($size->missing() && (Tiny_Settings::wr2x_active() || !Tiny_Image::is_retina($size_name))) { echo '<em>' . esc_html__('(file removed)', 'tiny-compress-images') . '</em>'; } else { if ($size->modified()) { echo '<em>' . esc_html__('(modified after compression)', 'tiny-compress-images') . '</em>'; } else { if (Tiny_Image::is_retina($size_name)) { echo '<em>' . esc_html__('(WP Retina 2x)', 'tiny-compress-images') . '</em>'; } else { if ($size->resized()) { printf('<em>' . esc_html__('(resized to %dx%d)', 'tiny-compress-images') . '</em>', $size->meta['output']['width'], $size->meta['output']['height']); } } } } }
private function parse_tiny_metadata($tiny_metadata) { if (is_null($tiny_metadata)) { $tiny_metadata = get_post_meta($this->id, self::META_KEY, true); } if ($tiny_metadata) { foreach ($tiny_metadata as $size => $meta) { if (!isset($this->sizes[$size])) { if (self::is_retina($size) && Tiny_Settings::wr2x_active()) { $retina_path = wr2x_get_retina($this->sizes[rtrim($size, '_wr2x')]->filename); $this->sizes[$size] = new Tiny_Image_Size($retina_path); } else { $this->sizes[$size] = new Tiny_Image_Size(); } } $this->sizes[$size]->meta = $meta; } } }