PluginProbe ʕ •ᴥ•ʔ
TinyPNG – JPEG, PNG & WebP image compression / 3.6.13
TinyPNG – JPEG, PNG & WebP image compression v3.6.13
3.7.0 3.6.14 trunk 1.0.0 1.1.0 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.4.0 1.5.0 1.6.0 1.7.0 1.7.1 1.7.2 2.0.0 2.0.1 2.0.2 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.0.0 3.0.1 3.1.0 3.2.0 3.2.1 3.3 3.4 3.4.1 3.4.2 3.4.4 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.10 3.6.11 3.6.12 3.6.13 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9
tiny-compress-images / src / views / optimization-chart.php
tiny-compress-images / src / views Last commit date
account-status-connected.php 5 months ago account-status-create-advanced.php 5 months ago account-status-create-simple.php 5 months ago account-status-loading.php 3 years ago bulk-optimization-form.php 5 months ago bulk-optimization-upgrade-notice.php 5 months ago bulk-optimization.php 2 months ago compress-details-processing.php 5 months ago compress-details.php 5 months ago dashboard-widget.php 2 months ago notice-feedback.php 2 months ago optimization-chart.php 5 months ago request-review.php 2 months ago settings-conversion-delivery.php 2 months ago settings-conversion-enabled.php 2 months ago settings-conversion-output.php 2 months ago settings-conversion.php 2 months ago settings-diagnostics.php 5 months ago settings-original-image-original.php 2 months ago settings-original-image-preserve.php 2 months ago settings-original-image.php 2 months ago settings.php 2 months ago
optimization-chart.php
56 lines
1 <?php
2
3 $chart = array();
4
5 if ( isset( $stats ) ) {
6 $chart['percentage'] = $stats['display-percentage'];
7 } else {
8 $chart['percentage'] = 0;
9 }
10
11 $chart['size'] = 160;
12 $chart['radius'] = $chart['size'] / 2 * 0.9;
13 $chart['main-radius'] = $chart['radius'] * 0.88;
14 $chart['center'] = $chart['size'] / 2;
15 $chart['stroke'] = $chart['radius'] / 2;
16 $chart['dash-stroke'] = $chart['radius'] / 4;
17 $chart['inner-radius'] = $chart['radius'] - $chart['stroke'] / 2;
18 $chart['circle-size'] = 2 * pi() * $chart['main-radius'];
19 $chart['dash-array-size'] = $chart['percentage'] / 100 * $chart['circle-size'];
20
21 ?>
22 <style>
23
24 div.tiny-optimization-chart svg circle.main {
25 stroke-width: <?php echo $chart['dash-stroke']; ?>;
26 stroke-dasharray: <?php echo $chart['dash-array-size'] . ' ' . $chart['circle-size']; ?>;
27 }
28
29 div.tiny-optimization-chart div.value {
30 min-width: <?php echo $chart['size']; ?>px;
31 }
32
33 <?php if ( isset( $stats ) ) { ?>
34 @keyframes shwoosh {
35 from {
36 stroke-dasharray: <?php echo '0' . ' ' . $chart['circle-size']; ?>
37 }
38 to {
39 stroke-dasharray: <?php echo $chart['dash-array-size'] . ' ' . $chart['circle-size']; ?>
40 }
41 }
42 <?php } ?>
43
44 </style>
45
46 <div id="optimization-chart" class="tiny-optimization-chart" data-full-circle-size="<?php echo $chart['circle-size']; ?>" data-percentage-factor="<?php echo $chart['main-radius']; ?>" >
47 <svg width="<?php echo $chart['size']; ?>" height="<?php echo $chart['size']; ?>">
48 <circle class="main" transform="rotate(-90, <?php echo $chart['center']; ?>, <?php echo $chart['center']; ?>)" r="<?php echo $chart['main-radius']; ?>" cx="<?php echo $chart['center']; ?>" cy="<?php echo $chart['center']; ?>"/>
49 <circle class="inner" r="<?php echo $chart['inner-radius']; ?>" cx="<?php echo $chart['center']; ?>" cy="<?php echo $chart['center']; ?>" />
50 </svg>
51 <div class="value">
52 <div class="percentage" id="savings-percentage"><span><?php echo $chart['percentage']; ?></span>%</div>
53 <div class="label" ><?php esc_html_e( 'savings', 'tiny-compress-images' ); ?></div>
54 </div>
55 </div>
56