PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 3.2.3
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v3.2.3
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / templates / minify / cached-file-log.php

cached-file-log.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 3.2.3, at templates/minify/cached-file-log.php

24 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?>
2 <h5><?php echo esc_html($log->header); ?></h5>
3 <ul><?php
4 foreach ((array) $log->files as $handle => $file) {
5 $file_path = untrailingslashit(get_home_path()) . $file->url;
6 $file_size = file_exists($file_path) ? ' (' . WP_Optimize()->format_size(@filesize($file_path)) . ')' : ''; // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
7
8 echo '<li'.($file->success ? '' : ' class="failed"').'><span class="wpo_min_file_url"><a href="'.esc_url(get_home_url().$file->url).'" target="_blank">'.htmlspecialchars($file->url).'</a>'.$file_size.'</span>';
9 if (property_exists($file, 'debug')) echo '<span class="wpo_min_file_debug">'.htmlspecialchars($file->debug).'</span>';
10 echo ' <span class="wrapper">';
11 printf(' <a href="#" data-url="%1$s" class="exclude">%2$s</a>', htmlspecialchars($file->url), __('Exclude', 'wp-optimize'));
12 $minify_config = get_option('wpo_minify_config');
13 if (preg_match('/\.js$/i', $file->url, $matches)) {
14 if ('individual' === $minify_config['enable_defer_js']) {
15 printf(' | <a href="#" data-url="%1$s" class="defer">%2$s</a>', htmlspecialchars($file->url), __('Defer loading', 'wp-optimize'));
16 }
17 } elseif (preg_match('/\.css$/i', $file->url, $matches)) {
18 printf(' | <a href="#" data-url="%1$s" class="async">%2$s</a>', htmlspecialchars($file->url), __('Load asynchronously', 'wp-optimize'));
19 }
20 echo '</span></li>';
21 }
22 ?>
23 </ul>
24