Version Description
- Fixed bug with drop-down menu in the Media Library.
- Compression limit notice now links directly to your API dashboard.
- Tweaked styling of the dashboard widget.
Download this release
Release Info
Developer | TinyPNG |
Plugin | Compress JPEG & PNG images |
Version | 2.2.4 |
Comparing to | |
See all releases |
Code changes from version 2.2.3 to 2.2.4
- readme.txt +8 -3
- src/class-tiny-plugin.php +6 -9
- src/class-tiny-settings.php +1 -3
- src/css/admin.css +1 -1
- src/css/bulk-optimization.css +0 -8
- src/css/chart.css +1 -1
- src/css/dashboard-widget.css +62 -128
- src/js/dashboard-widget.js +1 -1
- src/views/account-status-connected.php +1 -1
- src/views/account-status-create-simple.php +1 -1
- src/views/account-status-update.php +0 -32
- src/views/bulk-optimization.php +1 -1
- src/views/compress-details.php +0 -1
- src/views/dashboard-widget.php +20 -19
- tiny-compress-images.php +1 -1
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://tinypng.com/
|
|
4 |
Tags: optimize, compress, shrink, resize, faster, fit, scale, improve, images, tinypng, tinyjpg, jpeg, jpg, png, lossy, jpegmini, crunch, minify, smush, save, bandwidth, website, speed, performance, panda, wordpress app
|
5 |
Requires at least: 3.0.6
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -110,9 +110,14 @@ A: Everything will keep on working, but newly uploaded images will not be optimi
|
|
110 |
A: Yes! After installing the plugin, go to *Media > Bulk Optimization*, and click on the start button to optimize all unoptimized images in your media library.
|
111 |
|
112 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
113 |
= 2.2.3 =
|
114 |
-
*
|
115 |
-
* Fixed compression issue for some fopen users.
|
116 |
|
117 |
= 2.2.2 =
|
118 |
* Improved robustness in case an unexpected network error occurs.
|
4 |
Tags: optimize, compress, shrink, resize, faster, fit, scale, improve, images, tinypng, tinyjpg, jpeg, jpg, png, lossy, jpegmini, crunch, minify, smush, save, bandwidth, website, speed, performance, panda, wordpress app
|
5 |
Requires at least: 3.0.6
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 2.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
110 |
A: Yes! After installing the plugin, go to *Media > Bulk Optimization*, and click on the start button to optimize all unoptimized images in your media library.
|
111 |
|
112 |
== Changelog ==
|
113 |
+
= 2.2.4 =
|
114 |
+
* Fixed bug with drop-down menu in the Media Library.
|
115 |
+
* Compression limit notice now links directly to your API dashboard.
|
116 |
+
* Tweaked styling of the dashboard widget.
|
117 |
+
|
118 |
= 2.2.3 =
|
119 |
+
* Changed links to make it easier to go directly to your API dashboard.
|
120 |
+
* Fixed a compression issue for some fopen users.
|
121 |
|
122 |
= 2.2.2 =
|
123 |
* Improved robustness in case an unexpected network error occurs.
|
src/class-tiny-plugin.php
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
19 |
*/
|
20 |
class Tiny_Plugin extends Tiny_WP_Base {
|
21 |
-
const VERSION = '2.2.
|
22 |
const MEDIA_COLUMN = self::NAME;
|
23 |
const DATETIME_FORMAT = 'Y-m-d G:i:s';
|
24 |
|
@@ -522,13 +522,10 @@ class Tiny_Plugin extends Tiny_WP_Base {
|
|
522 |
$condition = "AND ID IN($ids)";
|
523 |
|
524 |
global $wpdb;
|
525 |
-
return $wpdb->get_results(
|
526 |
-
$wpdb->
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
ORDER BY ID DESC",
|
531 |
-
$condition),
|
532 |
-
ARRAY_A);
|
533 |
}
|
534 |
}
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
19 |
*/
|
20 |
class Tiny_Plugin extends Tiny_WP_Base {
|
21 |
+
const VERSION = '2.2.4';
|
22 |
const MEDIA_COLUMN = self::NAME;
|
23 |
const DATETIME_FORMAT = 'Y-m-d G:i:s';
|
24 |
|
522 |
$condition = "AND ID IN($ids)";
|
523 |
|
524 |
global $wpdb;
|
525 |
+
return $wpdb->get_results( // WPCS: unprepared SQL OK.
|
526 |
+
"SELECT ID, post_title FROM $wpdb->posts
|
527 |
+
WHERE post_type = 'attachment' $condition
|
528 |
+
AND (post_mime_type = 'image/jpeg' OR post_mime_type = 'image/png')
|
529 |
+
ORDER BY ID DESC", ARRAY_A);
|
|
|
|
|
|
|
530 |
}
|
531 |
}
|
src/class-tiny-settings.php
CHANGED
@@ -552,7 +552,7 @@ class Tiny_Settings extends Tiny_WP_Base {
|
|
552 |
update_option( $field, $count );
|
553 |
}
|
554 |
if ( $compressor->limit_reached() ) {
|
555 |
-
$link = '<a href="https://tinypng.com/developers" target="_blank">' .
|
556 |
esc_html__( 'TinyPNG API account', 'tiny-compress-images' ) . '</a>';
|
557 |
|
558 |
$this->notices->add('limit-reached',
|
@@ -588,7 +588,6 @@ class Tiny_Settings extends Tiny_WP_Base {
|
|
588 |
} else {
|
589 |
$status = $this->compressor->get_status();
|
590 |
$status->pending = false;
|
591 |
-
|
592 |
if ( $status->ok ) {
|
593 |
if ( $this->get_api_key_pending() ) {
|
594 |
$this->clear_api_key_pending();
|
@@ -602,7 +601,6 @@ class Tiny_Settings extends Tiny_WP_Base {
|
|
602 |
);
|
603 |
}
|
604 |
}
|
605 |
-
|
606 |
include( dirname( __FILE__ ) . '/views/account-status-connected.php' );
|
607 |
}
|
608 |
}
|
552 |
update_option( $field, $count );
|
553 |
}
|
554 |
if ( $compressor->limit_reached() ) {
|
555 |
+
$link = '<a href="https://tinypng.com/dashboard/developers" target="_blank">' .
|
556 |
esc_html__( 'TinyPNG API account', 'tiny-compress-images' ) . '</a>';
|
557 |
|
558 |
$this->notices->add('limit-reached',
|
588 |
} else {
|
589 |
$status = $this->compressor->get_status();
|
590 |
$status->pending = false;
|
|
|
591 |
if ( $status->ok ) {
|
592 |
if ( $this->get_api_key_pending() ) {
|
593 |
$this->clear_api_key_pending();
|
601 |
);
|
602 |
}
|
603 |
}
|
|
|
604 |
include( dirname( __FILE__ ) . '/views/account-status-connected.php' );
|
605 |
}
|
606 |
}
|
src/css/admin.css
CHANGED
@@ -55,7 +55,7 @@ div.tiny-account-status div.status-pending:before {
|
|
55 |
div.tiny-account-status div.status-loading:before {
|
56 |
left: -2px;
|
57 |
top: 0;
|
58 |
-
background: url(../images/spinner.gif) no-repeat center;
|
59 |
background-size: 20px 20px;
|
60 |
content: "";
|
61 |
}
|
55 |
div.tiny-account-status div.status-loading:before {
|
56 |
left: -2px;
|
57 |
top: 0;
|
58 |
+
background: url("../images/spinner.gif") no-repeat center;
|
59 |
background-size: 20px 20px;
|
60 |
content: "";
|
61 |
}
|
src/css/bulk-optimization.css
CHANGED
@@ -139,8 +139,6 @@ div.tiny-bulk-optimization div.savings div.legend {
|
|
139 |
margin-left: 50%;
|
140 |
}
|
141 |
|
142 |
-
|
143 |
-
|
144 |
div.tiny-bulk-optimization div.savings div.legend {
|
145 |
/* margin-left defined inline */
|
146 |
padding: 22px 0;
|
@@ -213,10 +211,6 @@ div.tiny-bulk-optimization div.optimize div.progressbar div.progress {
|
|
213 |
}
|
214 |
}
|
215 |
|
216 |
-
#tiny-bulk-optimization > div.dashboard > div.statistics td.item.costs > div.cost-currency {
|
217 |
-
display: inline-block;
|
218 |
-
}
|
219 |
-
|
220 |
div.tiny-bulk-optimization div.optimize div.progressbar div.numbers {
|
221 |
position: relative;
|
222 |
z-index: 3;
|
@@ -270,7 +264,6 @@ div.tiny-bulk-optimization table.whitebox {
|
|
270 |
background-color: #fff;
|
271 |
}
|
272 |
|
273 |
-
|
274 |
@media only screen and (max-width: 799px) {
|
275 |
div.tiny-bulk-optimization table.whitebox {
|
276 |
min-width: 250px;
|
@@ -329,4 +322,3 @@ div.tiny-bulk-optimization table.whitebox tr.failed button.toggle-row:before {
|
|
329 |
div.tiny-bulk-optimization table.whitebox tr.failed.is-expanded span.icon {
|
330 |
display: none;
|
331 |
}
|
332 |
-
|
139 |
margin-left: 50%;
|
140 |
}
|
141 |
|
|
|
|
|
142 |
div.tiny-bulk-optimization div.savings div.legend {
|
143 |
/* margin-left defined inline */
|
144 |
padding: 22px 0;
|
211 |
}
|
212 |
}
|
213 |
|
|
|
|
|
|
|
|
|
214 |
div.tiny-bulk-optimization div.optimize div.progressbar div.numbers {
|
215 |
position: relative;
|
216 |
z-index: 3;
|
264 |
background-color: #fff;
|
265 |
}
|
266 |
|
|
|
267 |
@media only screen and (max-width: 799px) {
|
268 |
div.tiny-bulk-optimization table.whitebox {
|
269 |
min-width: 250px;
|
322 |
div.tiny-bulk-optimization table.whitebox tr.failed.is-expanded span.icon {
|
323 |
display: none;
|
324 |
}
|
|
src/css/chart.css
CHANGED
@@ -45,7 +45,7 @@
|
|
45 |
}
|
46 |
|
47 |
@media only screen and (max-width: 400px) {
|
48 |
-
#optimization-chart {
|
49 |
float: none;
|
50 |
width: 100%;
|
51 |
}
|
45 |
}
|
46 |
|
47 |
@media only screen and (max-width: 400px) {
|
48 |
+
div.tiny-bulk-optimization #optimization-chart {
|
49 |
float: none;
|
50 |
width: 100%;
|
51 |
}
|
src/css/dashboard-widget.css
CHANGED
@@ -1,191 +1,125 @@
|
|
1 |
-
div.tiny_dashboard_widget .inside {
|
2 |
-
margin: 0;
|
3 |
min-height: 200px;
|
|
|
4 |
padding-bottom: 0;
|
5 |
overflow: hidden;
|
6 |
}
|
7 |
|
8 |
-
div.tiny_dashboard_widget .inside
|
9 |
position: absolute;
|
10 |
-
|
11 |
-
top: 50%;
|
12 |
-
left: 50%;
|
13 |
-
transform: translate(-50%, -50%);
|
14 |
-
width: 25px;
|
15 |
-
height: 25px;
|
16 |
z-index: 10;
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
}
|
21 |
|
22 |
-
div.tiny_dashboard_widget .inside .sky
|
23 |
position: absolute;
|
24 |
left: 0;
|
25 |
top: 0;
|
26 |
height: 100%;
|
27 |
width: 100%;
|
28 |
-
opacity: 0.
|
29 |
background: linear-gradient(180deg, #c6dde4 0%, #fefeff 100%);
|
30 |
/* ie6-9 */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#33C6DDE4', endColorstr='#33FEFEFF',GradientType=0 );
|
31 |
}
|
32 |
|
33 |
-
div.tiny_dashboard_widget .inside .cloud
|
34 |
-
div.tiny_dashboard_widget .inside .grass {
|
35 |
position: absolute;
|
36 |
right: 0;
|
37 |
-
}
|
38 |
-
|
39 |
-
div.tiny_dashboard_widget .inside .cloud {
|
40 |
top: 0;
|
41 |
height: 240px;
|
42 |
width: 298px;
|
43 |
-
background: url(
|
44 |
background-size: cover;
|
45 |
}
|
46 |
|
47 |
-
div.tiny_dashboard_widget .inside .grass {
|
|
|
|
|
48 |
bottom: 0;
|
49 |
height: 24px;
|
50 |
width: 536px;
|
51 |
-
background: url(
|
52 |
background-size: cover;
|
53 |
}
|
54 |
|
55 |
-
div.tiny_dashboard_widget
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
width: 305px;
|
58 |
height: 105.5px;
|
|
|
|
|
59 |
}
|
60 |
|
61 |
-
div.tiny_dashboard_widget.half-optimized .inside .panda
|
62 |
-
|
63 |
width: 255px;
|
64 |
height: 203px;
|
|
|
|
|
65 |
}
|
66 |
|
67 |
-
div.tiny_dashboard_widget.not-optimized .inside .panda
|
68 |
-
|
69 |
-
|
70 |
-
height: 203px;
|
71 |
-
}
|
72 |
-
|
73 |
-
div.tiny_dashboard_widget.no-images-uploaded .inside .panda-background {
|
74 |
-
background: url('../images/panda-waiting.png');
|
75 |
width: 241px;
|
76 |
height: 203px;
|
77 |
-
}
|
78 |
-
|
79 |
-
div.tiny_dashboard_widget .inside .panda-background {
|
80 |
-
background-repeat: no-repeat !important;
|
81 |
-
-webkit-background-size: 100% !important;
|
82 |
-
background-size: cover !important;
|
83 |
-
background-position: bottom !important;
|
84 |
-
bottom: 0;
|
85 |
-
right: -230px;
|
86 |
margin-right: 45%;
|
87 |
-
|
88 |
-
}
|
89 |
-
|
90 |
-
div.tiny_dashboard_widget.no-image-uploaded .inside .panda-background,
|
91 |
-
div.tiny_dashboard_widget.not-optimized .inside .panda-background {
|
92 |
-
right: -196px;
|
93 |
-
}
|
94 |
-
div.tiny_dashboard_widget.full-optimized .inside .panda-background {
|
95 |
-
right: -175px;
|
96 |
-
}
|
97 |
-
|
98 |
-
div.tiny_dashboard_widget.full-optimized .inside.mobile .panda-background {
|
99 |
-
left: 10%;
|
100 |
-
}
|
101 |
-
|
102 |
-
div.tiny_dashboard_widget .inside.mobile div#optimization-chart {
|
103 |
-
margin-left: 10px;
|
104 |
-
}
|
105 |
-
|
106 |
-
@media only screen and (max-width: 400px) {
|
107 |
-
.inside.mobile div#optimization-chart {
|
108 |
-
width: 50%;
|
109 |
-
float: none;
|
110 |
-
}
|
111 |
}
|
112 |
|
113 |
-
div.tiny_dashboard_widget.
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
div.tiny_dashboard_widget .inside .media-library-optimized {
|
120 |
-
display: none;
|
121 |
position: relative;
|
122 |
z-index: 1;
|
123 |
}
|
124 |
|
125 |
-
div.tiny_dashboard_widget
|
126 |
-
|
127 |
-
|
128 |
-
div.tiny_dashboard_widget.half-optimized .inside #widget-half-optimized {
|
129 |
-
display: block;
|
130 |
-
}
|
131 |
-
|
132 |
-
div.tiny_dashboard_widget .widget-percentage,
|
133 |
-
div.tiny_dashboard_widget .widget-label {
|
134 |
-
color: #40444f;
|
135 |
-
}
|
136 |
-
|
137 |
-
div.tiny_dashboard_widget .widget-label {
|
138 |
-
font-size: 1.2em;
|
139 |
-
}
|
140 |
-
|
141 |
-
div.tiny_dashboard_widget .widget-percentage {
|
142 |
-
margin-bottom: 5px;
|
143 |
-
font-size: 2em;
|
144 |
-
}
|
145 |
-
|
146 |
-
div.tiny_dashboard_widget .media-library-optimized {
|
147 |
-
padding: 10px 20px;
|
148 |
-
padding-bottom: 0px;
|
149 |
-
}
|
150 |
-
|
151 |
-
div.tiny_dashboard_widget .media-library-optimized p {
|
152 |
-
margin-bottom: 0;
|
153 |
-
}
|
154 |
-
|
155 |
-
div.tiny_dashboard_widget div#optimization-chart {
|
156 |
-
margin: 12px 0 40px;
|
157 |
min-width: 160px;
|
158 |
}
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
.ie8 div.tiny_dashboard_widget .inside.mobile .panda-background {
|
165 |
-
right: 0;
|
166 |
-
margin-right: 0;
|
167 |
-
left: auto;
|
168 |
}
|
169 |
|
170 |
-
.ie8
|
171 |
-
|
172 |
}
|
173 |
|
174 |
-
.ie8 div.tiny_dashboard_widget .inside .grass {
|
175 |
-
background-image: url("../images/grass-ie8.png");
|
176 |
-
background-repeat: no-repeat !important;
|
177 |
-
background-position: bottom !important;
|
178 |
width: 100%;
|
|
|
|
|
|
|
179 |
}
|
180 |
|
181 |
-
.ie8 div.tiny_dashboard_widget div#optimization-chart {
|
182 |
-
display: none;
|
183 |
-
}
|
184 |
-
|
185 |
-
#ie8-compressed {
|
186 |
display: none;
|
187 |
}
|
188 |
|
189 |
-
.ie8 #ie8-compressed
|
190 |
-
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
1 |
+
div.tiny_dashboard_widget div.inside {
|
|
|
2 |
min-height: 200px;
|
3 |
+
margin: 0;
|
4 |
padding-bottom: 0;
|
5 |
overflow: hidden;
|
6 |
}
|
7 |
|
8 |
+
div.tiny_dashboard_widget div.inside div.spinner {
|
9 |
position: absolute;
|
10 |
+
visibility: visible;
|
|
|
|
|
|
|
|
|
|
|
11 |
z-index: 10;
|
12 |
+
top: 30%;
|
13 |
+
left: 50%;
|
14 |
+
margin-left: -12px;
|
15 |
}
|
16 |
|
17 |
+
div.tiny_dashboard_widget div.inside div.sky {
|
18 |
position: absolute;
|
19 |
left: 0;
|
20 |
top: 0;
|
21 |
height: 100%;
|
22 |
width: 100%;
|
23 |
+
opacity: 0.3;
|
24 |
background: linear-gradient(180deg, #c6dde4 0%, #fefeff 100%);
|
25 |
/* ie6-9 */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#33C6DDE4', endColorstr='#33FEFEFF',GradientType=0 );
|
26 |
}
|
27 |
|
28 |
+
div.tiny_dashboard_widget div.inside div.cloud {
|
|
|
29 |
position: absolute;
|
30 |
right: 0;
|
|
|
|
|
|
|
31 |
top: 0;
|
32 |
height: 240px;
|
33 |
width: 298px;
|
34 |
+
background-image: url("../images/cloud.png");
|
35 |
background-size: cover;
|
36 |
}
|
37 |
|
38 |
+
div.tiny_dashboard_widget div.inside div.grass {
|
39 |
+
position: absolute;
|
40 |
+
right: 0;
|
41 |
bottom: 0;
|
42 |
height: 24px;
|
43 |
width: 536px;
|
44 |
+
background-image: url("../images/grass.png");
|
45 |
background-size: cover;
|
46 |
}
|
47 |
|
48 |
+
div.tiny_dashboard_widget div.inside div.panda {
|
49 |
+
position: absolute;
|
50 |
+
bottom: 0;
|
51 |
+
background-repeat: no-repeat;
|
52 |
+
-webkit-background-size: 100%;
|
53 |
+
background-size: cover;
|
54 |
+
background-position: bottom;
|
55 |
+
}
|
56 |
+
|
57 |
+
div.tiny_dashboard_widget.full-optimized div.inside div.panda {
|
58 |
+
right: 10%;
|
59 |
width: 305px;
|
60 |
height: 105.5px;
|
61 |
+
margin-right: 0;
|
62 |
+
background-image: url("../images/panda-laying.png");
|
63 |
}
|
64 |
|
65 |
+
div.tiny_dashboard_widget.half-optimized div.inside div.panda {
|
66 |
+
right: -230px;
|
67 |
width: 255px;
|
68 |
height: 203px;
|
69 |
+
margin-right: 45%;
|
70 |
+
background-image: url("../images/panda-eating.png");
|
71 |
}
|
72 |
|
73 |
+
div.tiny_dashboard_widget.not-optimized div.inside div.panda,
|
74 |
+
div.tiny_dashboard_widget.no-images-uploaded div.inside div.panda {
|
75 |
+
right: -196px;
|
|
|
|
|
|
|
|
|
|
|
76 |
width: 241px;
|
77 |
height: 203px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
margin-right: 45%;
|
79 |
+
background-image: url("../images/panda-waiting.png");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
+
div.tiny_dashboard_widget.no-images-uploaded div.inside div.no-images,
|
83 |
+
div.tiny_dashboard_widget.not-optimized div.inside div.not-optimized,
|
84 |
+
div.tiny_dashboard_widget.half-optimized div.inside div.half-optimized,
|
85 |
+
div.tiny_dashboard_widget.full-optimized div.inside div.full-optimized {
|
86 |
+
display: block !important;
|
|
|
|
|
|
|
87 |
position: relative;
|
88 |
z-index: 1;
|
89 |
}
|
90 |
|
91 |
+
div.tiny_dashboard_widget div.inside div#optimization-chart {
|
92 |
+
margin-top: 12px;
|
93 |
+
margin-bottom: 40px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
min-width: 160px;
|
95 |
}
|
96 |
|
97 |
+
div.tiny_dashboard_widget.full-optimized div.inside.mobile div#optimization-chart {
|
98 |
+
width: 100%;
|
99 |
+
margin-top: -5px;
|
100 |
+
margin-bottom: 95px;
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
|
103 |
+
.ie8 div.tiny_dashboard_widget div.inside div.panda {
|
104 |
+
background: none;
|
105 |
}
|
106 |
|
107 |
+
.ie8 div.tiny_dashboard_widget div.inside div.grass {
|
|
|
|
|
|
|
108 |
width: 100%;
|
109 |
+
background-image: url("../images/grass-ie8.png");
|
110 |
+
background-repeat: no-repeat;
|
111 |
+
background-position: bottom;
|
112 |
}
|
113 |
|
114 |
+
.ie8 div.tiny_dashboard_widget div.inside div#optimization-chart {
|
|
|
|
|
|
|
|
|
115 |
display: none;
|
116 |
}
|
117 |
|
118 |
+
.ie8 div.tiny_dashboard_widget.no-images-uploaded div.inside div#ie8-compressed,
|
119 |
+
.ie8 div.tiny_dashboard_widget.not-optimized div.inside div#ie8-compressed,
|
120 |
+
.ie8 div.tiny_dashboard_widget.half-optimized div.inside div#ie8-compressed,
|
121 |
+
.ie8 div.tiny_dashboard_widget.full-optimized div.inside div#ie8-compressed {
|
122 |
+
display: block !important;
|
123 |
+
position: relative;
|
124 |
+
z-index: 1;
|
125 |
}
|
src/js/dashboard-widget.js
CHANGED
@@ -72,12 +72,12 @@
|
|
72 |
jQuery('#tinypng_dashboard_widget').addClass('not-optimized')
|
73 |
} else if ( percentage == 100 ) {
|
74 |
jQuery('#tinypng_dashboard_widget').addClass('full-optimized')
|
75 |
-
jQuery('#ie8-compressed').find('span').html(savingsPercentage)
|
76 |
} else {
|
77 |
jQuery("#uploaded-images").html( stats['uploaded-images'] )
|
78 |
jQuery("#unoptimised-sizes").html( stats['available-unoptimised-sizes'] )
|
79 |
jQuery('#tinypng_dashboard_widget').addClass('half-optimized')
|
80 |
}
|
|
|
81 |
}
|
82 |
|
83 |
function chartOptions(percentage) {
|
72 |
jQuery('#tinypng_dashboard_widget').addClass('not-optimized')
|
73 |
} else if ( percentage == 100 ) {
|
74 |
jQuery('#tinypng_dashboard_widget').addClass('full-optimized')
|
|
|
75 |
} else {
|
76 |
jQuery("#uploaded-images").html( stats['uploaded-images'] )
|
77 |
jQuery("#unoptimised-sizes").html( stats['available-unoptimised-sizes'] )
|
78 |
jQuery('#tinypng_dashboard_widget').addClass('half-optimized')
|
79 |
}
|
80 |
+
jQuery('#ie8-compressed').find('span').html(savingsPercentage)
|
81 |
}
|
82 |
|
83 |
function chartOptions(percentage) {
|
src/views/account-status-connected.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
$compressions = self::get_compression_count();
|
17 |
/* It is not possible to check if a subscription is free or flexible. */
|
18 |
if ( Tiny_Config::MONTHLY_FREE_COMPRESSIONS == $compressions ) {
|
19 |
-
$link = '<a href="https://tinypng.com/developers" target="_blank">' . esc_html__( 'TinyPNG API account', 'tiny-compress-images' ) . '</a>';
|
20 |
printf( esc_html__(
|
21 |
'You have reached your limit of %s compressions this month.',
|
22 |
'tiny-compress-images'
|
16 |
$compressions = self::get_compression_count();
|
17 |
/* It is not possible to check if a subscription is free or flexible. */
|
18 |
if ( Tiny_Config::MONTHLY_FREE_COMPRESSIONS == $compressions ) {
|
19 |
+
$link = '<a href="https://tinypng.com/dashboard/developers" target="_blank">' . esc_html__( 'TinyPNG API account', 'tiny-compress-images' ) . '</a>';
|
20 |
printf( esc_html__(
|
21 |
'You have reached your limit of %s compressions this month.',
|
22 |
'tiny-compress-images'
|
src/views/account-status-create-simple.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
echo ' ';
|
11 |
|
12 |
printf( esc_html__(
|
13 |
-
'If you
|
14 |
'tiny-compress-images'
|
15 |
), $link );
|
16 |
?></p>
|
10 |
echo ' ';
|
11 |
|
12 |
printf( esc_html__(
|
13 |
+
'If needed you can go to the %s to retrieve it.',
|
14 |
'tiny-compress-images'
|
15 |
), $link );
|
16 |
?></p>
|
src/views/account-status-update.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<div class="tiny-account-status" id="tiny-account-status" data-state="missing">
|
2 |
-
<div class="update">
|
3 |
-
<h4><?php echo esc_html__( 'Change your API key', 'tiny-compress-images' ); ?></h4>
|
4 |
-
<p class="introduction"><?php
|
5 |
-
$link = sprintf( '<a href="https://tinypng.com/developers" target="_blank">%s</a>',
|
6 |
-
esc_html__( 'TinyPNG developer section', 'tiny-compress-images' )
|
7 |
-
);
|
8 |
-
|
9 |
-
echo esc_html__( 'Enter your API key.', 'tiny-compress-images' );
|
10 |
-
echo ' ';
|
11 |
-
|
12 |
-
printf( esc_html__(
|
13 |
-
'If you have lost your key, go to the %s to retrieve it.',
|
14 |
-
'tiny-compress-images'
|
15 |
-
), $link );
|
16 |
-
?></p>
|
17 |
-
|
18 |
-
<input type="text" id="<?php echo esc_attr( self::get_prefixed_name( 'api_key' ) ); ?>"
|
19 |
-
name="<?php echo esc_attr( self::get_prefixed_name( 'api_key' ) ); ?>" size="35" spellcheck="false"
|
20 |
-
value="<?php echo esc_attr( $key ); ?>">
|
21 |
-
|
22 |
-
<button class="button button-primary" data-tiny-action="update-key"><?php
|
23 |
-
echo esc_html__( 'Save', 'tiny-compress-images' );
|
24 |
-
?></button>
|
25 |
-
|
26 |
-
<p class="message"></p>
|
27 |
-
|
28 |
-
<p><a href="#" onclick="jQuery('div.tiny-account-status div.update').toggle(); jQuery('div.tiny-account-status div.status').toggle(); return false"><?php
|
29 |
-
echo esc_html__( 'Cancel', 'tiny-compress-images' );
|
30 |
-
?></a></p>
|
31 |
-
</div>
|
32 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/views/bulk-optimization.php
CHANGED
@@ -147,7 +147,7 @@ div.tiny-bulk-optimization div.dashboard div.optimize div.progressbar div.progre
|
|
147 |
) ) ?>
|
148 |
</h3>
|
149 |
<span id="estimated-cost">$ <?php echo number_format( $estimated_costs, 2 ) ?></span>
|
150 |
-
|
151 |
<?php if ( $estimated_costs > 0 ) { ?>
|
152 |
<div class="tooltip">
|
153 |
<span class="dashicons dashicons-info"></span>
|
147 |
) ) ?>
|
148 |
</h3>
|
149 |
<span id="estimated-cost">$ <?php echo number_format( $estimated_costs, 2 ) ?></span>
|
150 |
+
USD
|
151 |
<?php if ( $estimated_costs > 0 ) { ?>
|
152 |
<div class="tooltip">
|
153 |
<span class="dashicons dashicons-info"></span>
|
src/views/compress-details.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
|
3 |
$available_sizes = array_keys( $this->settings->get_sizes() );
|
4 |
$active_sizes = $this->settings->get_sizes();
|
5 |
-
;
|
6 |
$active_tinify_sizes = $this->settings->get_active_tinify_sizes();
|
7 |
$error = $tiny_image->get_latest_error();
|
8 |
$total = $tiny_image->get_count( array( 'modified', 'missing', 'has_been_compressed', 'compressed' ) );
|
2 |
|
3 |
$available_sizes = array_keys( $this->settings->get_sizes() );
|
4 |
$active_sizes = $this->settings->get_sizes();
|
|
|
5 |
$active_tinify_sizes = $this->settings->get_active_tinify_sizes();
|
6 |
$error = $tiny_image->get_latest_error();
|
7 |
$total = $tiny_image->get_count( array( 'modified', 'missing', 'has_been_compressed', 'compressed' ) );
|
src/views/dashboard-widget.php
CHANGED
@@ -1,29 +1,26 @@
|
|
1 |
<?php $link = "<a href='" . admin_url( 'upload.php?page=tiny-bulk-optimization' ) . "'>" . esc_html__( 'bulk optimization', 'tiny-compress-images' ) . '</a>'; ?>
|
2 |
|
3 |
<style type="text/css" >
|
4 |
-
div.
|
5 |
display: none;
|
6 |
}
|
7 |
-
div#optimization-chart {
|
8 |
display: none;
|
9 |
}
|
10 |
-
|
11 |
-
display: none !important;
|
12 |
-
}
|
13 |
-
#optimization-chart svg circle.main {
|
14 |
stroke: <?php echo $admin_colors[2] ?>;
|
15 |
}
|
16 |
</style>
|
17 |
|
18 |
-
<div
|
19 |
-
<div class="sky
|
20 |
<div class="cloud"></div>
|
21 |
-
<div class="panda
|
22 |
<div class="grass"></div>
|
23 |
-
<div class="
|
24 |
<p><?php esc_html_e( 'You do not seem to have uploaded any JPEG or PNG images yet.', 'tiny-compress-images' ) ?></p>
|
25 |
</div>
|
26 |
-
<div class="
|
27 |
<p>
|
28 |
<?php printf( esc_html__( 'Hi %s, you haven’t compressed any images in your media library.', 'tiny-compress-images' ), $this->friendly_user_name() ) ?>
|
29 |
<?php printf( wp_kses( __( 'If you like you can to optimize your whole library in one go with the %s page.', 'tiny-compress-images' ), array(
|
@@ -33,14 +30,7 @@ div#optimization-chart {
|
|
33 |
) ), $link )?>
|
34 |
</p>
|
35 |
</div>
|
36 |
-
<div class="
|
37 |
-
<p><?php printf( esc_html__( '%s, this is great! Your entire library is optimized!', 'tiny-compress-images' ), $this->friendly_user_name() ) ?></p>
|
38 |
-
<p id="ie8-compressed"><?php printf( wp_kses( __( 'You have <strong>saved %s</strong> of your media library size.', 'tiny-compress-images' ), array(
|
39 |
-
'span' => array(),
|
40 |
-
'strong' => array(),
|
41 |
-
) ), '<span></span>%' )?></p>
|
42 |
-
</div>
|
43 |
-
<div class="media-library-optimized" id="widget-half-optimized">
|
44 |
<p>
|
45 |
<?php printf( esc_html__( '%s, you are doing good.', 'tiny-compress-images' ), $this->friendly_user_name() ) ?>
|
46 |
<?php printf( esc_html__( 'With your current settings you can still optimize %1$s image sizes from your %2$s uploaded JPEG and PNG images.', 'tiny-compress-images' ), '<span id="unoptimised-sizes"></span>', '<span id="uploaded-images"></span>' ) ?>
|
@@ -51,5 +41,16 @@ div#optimization-chart {
|
|
51 |
) ), $link )?>
|
52 |
</p>
|
53 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
<?php require_once dirname( __FILE__ ) . '/bulk-optimization-chart.php'; ?>
|
1 |
<?php $link = "<a href='" . admin_url( 'upload.php?page=tiny-bulk-optimization' ) . "'>" . esc_html__( 'bulk optimization', 'tiny-compress-images' ) . '</a>'; ?>
|
2 |
|
3 |
<style type="text/css" >
|
4 |
+
div#tinypng_dashboard_widget div.description {
|
5 |
display: none;
|
6 |
}
|
7 |
+
div#tinypng_dashboard_widget div#optimization-chart {
|
8 |
display: none;
|
9 |
}
|
10 |
+
div#tinypng_dashboard_widget div#optimization-chart svg circle.main {
|
|
|
|
|
|
|
11 |
stroke: <?php echo $admin_colors[2] ?>;
|
12 |
}
|
13 |
</style>
|
14 |
|
15 |
+
<div class="spinner" id="widget-spinner"></div>
|
16 |
+
<div class="sky"></div>
|
17 |
<div class="cloud"></div>
|
18 |
+
<div class="panda"></div>
|
19 |
<div class="grass"></div>
|
20 |
+
<div class="description no-images">
|
21 |
<p><?php esc_html_e( 'You do not seem to have uploaded any JPEG or PNG images yet.', 'tiny-compress-images' ) ?></p>
|
22 |
</div>
|
23 |
+
<div class="description not-optimized">
|
24 |
<p>
|
25 |
<?php printf( esc_html__( 'Hi %s, you haven’t compressed any images in your media library.', 'tiny-compress-images' ), $this->friendly_user_name() ) ?>
|
26 |
<?php printf( wp_kses( __( 'If you like you can to optimize your whole library in one go with the %s page.', 'tiny-compress-images' ), array(
|
30 |
) ), $link )?>
|
31 |
</p>
|
32 |
</div>
|
33 |
+
<div class="description half-optimized">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
<p>
|
35 |
<?php printf( esc_html__( '%s, you are doing good.', 'tiny-compress-images' ), $this->friendly_user_name() ) ?>
|
36 |
<?php printf( esc_html__( 'With your current settings you can still optimize %1$s image sizes from your %2$s uploaded JPEG and PNG images.', 'tiny-compress-images' ), '<span id="unoptimised-sizes"></span>', '<span id="uploaded-images"></span>' ) ?>
|
41 |
) ), $link )?>
|
42 |
</p>
|
43 |
</div>
|
44 |
+
<div class="description full-optimized">
|
45 |
+
<p><?php printf( esc_html__( '%s, this is great! Your entire library is optimized!', 'tiny-compress-images' ), $this->friendly_user_name() ) ?></p>
|
46 |
+
</div>
|
47 |
+
<div class="description" id="ie8-compressed">
|
48 |
+
<p>
|
49 |
+
<?php printf( wp_kses( __( 'You have <strong>saved %s</strong> of your media library size.', 'tiny-compress-images' ), array(
|
50 |
+
'span' => array(),
|
51 |
+
'strong' => array(),
|
52 |
+
) ), '<span></span>%' )?>
|
53 |
+
</p>
|
54 |
+
</div>
|
55 |
|
56 |
<?php require_once dirname( __FILE__ ) . '/bulk-optimization-chart.php'; ?>
|
tiny-compress-images.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Compress JPEG & PNG images
|
4 |
* Description: Speed up your website. Optimize your JPEG and PNG images automatically with TinyPNG.
|
5 |
-
* Version: 2.2.
|
6 |
* Author: TinyPNG
|
7 |
* Author URI: https://tinypng.com
|
8 |
* Text Domain: tiny-compress-images
|
2 |
/**
|
3 |
* Plugin Name: Compress JPEG & PNG images
|
4 |
* Description: Speed up your website. Optimize your JPEG and PNG images automatically with TinyPNG.
|
5 |
+
* Version: 2.2.4
|
6 |
* Author: TinyPNG
|
7 |
* Author URI: https://tinypng.com
|
8 |
* Text Domain: tiny-compress-images
|