-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdashboard-widget.php
More file actions
97 lines (95 loc) · 2.79 KB
/
dashboard-widget.php
File metadata and controls
97 lines (95 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
$link = "<a href='" . admin_url( 'upload.php?page=tiny-bulk-optimization' ) . "'>" . esc_html__( 'bulk optimization', 'tiny-compress-images' ) . '</a>';
?>
<style type="text/css" >
div#tinypng_dashboard_widget div.description {
display: none;
}
div#tinypng_dashboard_widget div#optimization-chart {
display: none;
}
div#tinypng_dashboard_widget div#optimization-chart svg circle.main {
stroke: <?php echo $admin_colors[2]; ?>;
}
</style>
<div class="spinner" id="widget-spinner"></div>
<div class="sky"></div>
<div class="cloud"></div>
<div class="panda"></div>
<div class="grass"></div>
<div class="description no-images">
<p><?php esc_html_e( 'You do not seem to have uploaded any JPEG, PNG or WebP images yet.', 'tiny-compress-images' ); ?></p>
</div>
<div class="description not-optimized">
<p>
<?php
/* translators: %s: friendly user name */
printf( esc_html__( 'Hi %s, you haven’t compressed any images in your media library.', 'tiny-compress-images' ), $this->friendly_user_name() );
echo ' ';
printf(
wp_kses(
/* translators: %s: bulk optimization page */
__( 'If you like you can to optimize your whole library in one go with the %s page.', 'tiny-compress-images' ),
array(
'a' => array(
'href' => array(),
),
)
),
$link
);
?>
</p>
</div>
<div class="description half-optimized">
<p>
<?php
/* translators: %s: friendly user name */
printf( esc_html__( '%s, you are doing good.', 'tiny-compress-images' ), $this->friendly_user_name() );
echo ' ';
/* translators: %s: number of optimizable sizes and number of uploaded images */
printf( esc_html__( 'With your current settings you can still optimize %1$s image sizes from your %2$s uploaded JPEG, PNG, and WebP images.', 'tiny-compress-images' ), '<span id="unoptimized-sizes"></span>', '<span id="uploaded-images"></span>' );
echo ' ';
printf(
wp_kses(
/* translators: %s: bulk optimization link */
__( 'Start the %s to optimize the remainder of your library.', 'tiny-compress-images' ),
array(
'a' => array(
'href' => array(),
),
)
),
$link
);
?>
</p>
</div>
<div class="description full-optimized">
<p>
<?php
/* translators: %s: friendly user name */
printf( esc_html__( '%s, this is great! Your entire library is optimized!', 'tiny-compress-images' ), $this->friendly_user_name() );
echo ' ';
require __DIR__ . '/request-review.php';
?>
</p>
</div>
<div class="description" id="ie8-compressed">
<p>
<?php
printf(
wp_kses(
/* translators: %s: savings percentage */
__( 'You have <strong>saved %s</strong> of your media library size.', 'tiny-compress-images' ),
array(
'span' => array(),
'strong' => array(),
)
),
'<span></span>%'
);
?>
</p>
</div>
<?php require_once __DIR__ . '/optimization-chart.php'; ?>