WP Retina 2x - Version 5.2.6

Version Description

  • Fix: Avoid re-generating non-retina thumbnails when Generate is used.
  • Fix: Use DIR to include plugin's files.
  • Fix: Better explanation.
Download this release

Release Info

Developer TigrouMeow
Plugin Icon 128x128 WP Retina 2x
Version 5.2.6
Comparing to
See all releases

Code changes from version 5.2.3 to 5.2.6

Files changed (7) hide show
  1. ajax.php +4 -4
  2. common/admin.css +142 -142
  3. common/admin.php +30 -10
  4. core.php +5 -5
  5. dashboard.php +1 -1
  6. readme.txt +12 -7
  7. wp-retina-2x.php +6 -6
ajax.php CHANGED
@@ -502,12 +502,12 @@ class Meow_WR2X_Ajax {
502
  $this->core->delete_attachment( $attachmentId, false );
503
 
504
  // Regenerate the Thumbnails
505
- $file = get_attached_file( $attachmentId );
506
- $meta = wp_generate_attachment_metadata( $attachmentId, $file );
507
- wp_update_attachment_metadata( $attachmentId, $meta );
508
 
509
  // Regenerate Retina
510
- //$meta = wp_get_attachment_metadata( $attachmentId );
511
  $this->core->generate_images( $meta );
512
 
513
  // RESULTS FOR RETINA DASHBOARD
502
  $this->core->delete_attachment( $attachmentId, false );
503
 
504
  // Regenerate the Thumbnails
505
+ //$file = get_attached_file( $attachmentId );
506
+ //$meta = wp_generate_attachment_metadata( $attachmentId, $file );
507
+ //wp_update_attachment_metadata( $attachmentId, $meta );
508
 
509
  // Regenerate Retina
510
+ $meta = wp_get_attachment_metadata( $attachmentId );
511
  $this->core->generate_images( $meta );
512
 
513
  // RESULTS FOR RETINA DASHBOARD
common/admin.css CHANGED
@@ -1,164 +1,164 @@
1
  /* MEOW BOX (SETTINGS BOX) */
2
 
3
  .meow-box {
4
- box-sizing: border-box;
5
- border: 1px solid #e5e5e5;
6
- box-shadow: 2px 2px 1px rgba(0,0,0,.02);
7
- background: #fff;
8
- color: #444;
9
- margin-bottom: 15px;
10
- font-size: 13px !important;
11
- border-top-right-radius: 8px;
12
  }
13
 
14
  .meow-box input, .meow-box th, .meow-box label, .meow-box select {
15
- font-size: 13px !important;
16
  }
17
 
18
  .meow-box small {
19
- font-size: 12px !important;
20
  }
21
 
22
  .meow-box h3 {
23
- font-size: 13px;
24
- padding: 4px 12px;
25
- margin: 0;
26
- background: #3c3c3c;
27
- color: #ffffff;
28
- text-transform: uppercase;
29
- border-top-right-radius: 8px;
30
- /*border-bottom: 1px solid #eee;*/
31
  }
32
 
33
  .meow-box h3 .dashicons {
34
- position: relative;
35
- top: 0px;
36
- margin-right: 5px;
37
  }
38
 
39
  .meow-box .pro_info {
40
- padding: 5px;
41
- margin: 10px -10px 5px -10px;
42
- font-size: 11px;
43
- line-height: 13px;
44
  }
45
 
46
  .meow-box .pro_info.enabled {
47
- background: #4482d2;
48
- border-left: 5px solid #4482d2;
49
- color: white;
50
  }
51
 
52
  .meow-box .pro_info.disabled {
53
- background: #96555b;
54
- border-left: 5px solid #632329;
55
- color: white;
56
  }
57
 
58
  .meow-box .pro_info.disabled a {
59
- background: #96555b;
60
- color: red;
61
- text-decoration: none;
62
  }
63
 
64
  .meow-box .inside {
65
- margin: 10px;
66
  }
67
 
68
  .meow-box th {
69
- padding: 10px 10px 10px 0px;
70
- width: 22%;
71
  }
72
 
73
  .meow-box td {
74
- padding: 10px 10px;
75
  }
76
 
77
  .meow-box p.submit {
78
- text-align: right;
79
- margin: 10px -10px -10px -10px;
80
- padding: 7px 10px 10px 0px !important;
81
- border-top: 1px solid #eee !important;
82
- max-width: inherit;
83
- background: rgba(125, 125, 125, 0.04);
84
- border-radius: 0px;
85
  }
86
 
87
  .meow-box [type="text"], .meow-box select {
88
- width: 100%;
89
  }
90
 
91
  /* CONTROLS INSIDE A COLUMN (LABEL ON THE LEFT, VALUE ON THE RIGHT) */
92
  .meow-box td [type="text"], .meow-box td [type="checkbox"], .meow-box td select {
93
- margin-top: -3px;
94
  }
95
 
96
  .meow-header-ad {
97
- float: right;
98
  }
99
 
100
  /* BUTTONS */
101
 
102
  .meow-button-xs {
103
- font-size: 10px !important;
104
- height: 20px !important;
105
- line-height: 18px !important;
106
- position: relative !important;
107
- top: 1px !important;
108
- text-align: center !important
109
  }
110
 
111
  /* MODAL */
112
 
113
- #meow-modal-info-backdrop {
114
- background: rgba(0, 0, 0, 0.75);
115
- position: fixed;
116
- top: 0px;
117
- bottom: 0px;
118
- right: 0px;
119
- left: 0px;
120
- z-index: 10000;
121
- }
122
-
123
- #meow-modal-info {
124
- background: white;
125
- box-shadow: 0px 0px 5px black;
126
- padding: 15px;
127
- overflow-y: scroll;
128
- position: fixed;
129
- z-index: 10000;
130
- left: 100px;
131
- right: 100px;
132
- top: 50px;
133
- bottom: 50px;
134
- }
135
-
136
- #meow-modal-info h3 {
137
- height: 25px;
138
- border-bottom: 2px solid #808080;
139
- }
140
-
141
- #meow-modal-info td {
142
- text-align: center;
143
- font-size: 11px;
144
- border: 1px solid #D3DCFF;
145
- padding: 10px 15px;
146
- background: #EFF8FF;
147
- }
148
-
149
- #meow-modal-info .close {
150
- float: right;
151
- font-size: 18px;
152
- font-weight: bold;
153
- font-family: Verdana;
154
- cursor: pointer;
155
- }
156
-
157
- #meow-modal-info .loading {
158
- background-color: #F2F2F2;
159
- text-align: center;
160
- padding-top: 10px;
161
- background-size: 32px 32px;
162
  }
163
 
164
  #meow-modal-info .meow-sized-image {
@@ -191,106 +191,106 @@
191
  }
192
 
193
  .meow-sized-images:after {
194
- clear: both;
195
- content:""; display:table;
196
  }
197
 
198
  .meow-sized-images + span {
199
- position: relative;
200
- top: -12px;
201
  }
202
 
203
  /* MEOW COLORS */
204
 
205
  .meow-bk-blue {
206
  background: #3C82C7 !important;
207
- color: white;
208
  }
209
 
210
  .meow-bk-orange {
211
  background: #f1900e !important;
212
- color: white;
213
  }
214
 
215
  .meow-bk-red {
216
  background: #c53a47 !important;
217
- color: white;
218
  }
219
 
220
  .meow-bk-gray {
221
  background: gray !important;
222
- color: white;
223
  }
224
 
225
  .meow-bk-green {
226
  background: #2b9463 !important;
227
- color: white;
228
  }
229
 
230
  .meow-bk-black {
231
- background: #3c3c3c !important;
232
- color: white;
233
  }
234
 
235
  .meow-bk-purple {
236
- background: #984c96 !important;
237
- color: white;
238
  }
239
 
240
  /* DASHBOARD */
241
 
242
  .meow-dashboard .meow-box li {
243
- border-bottom: 1px solid #eee;
244
- padding: 0px 10px 10px 10px;
245
  }
246
 
247
  .meow-dashboard .meow-box li:last-child {
248
- border: none;
249
- padding-bottom: 0px;
250
  }
251
 
252
  .meow-button-xs .dashicons {
253
- font-size: 18px !important;
254
  }
255
 
256
  .meow-button-xs.updating-message:before {
257
- margin-top: 0px !important;
258
  }
259
 
260
  .meow-button-xs.updating-message * {
261
- display: none;
262
  }
263
 
264
  #phpinfo {
265
- font-size: 11px;
266
  }
267
 
268
  #phpinfo .e {
269
- padding: 5px;
270
- background: lightgray;
271
  }
272
 
273
  #phpinfo .h th {
274
- padding: 5px;
275
- color: white;
276
- background: gray;
277
- text-align: left;
278
- font-size: 14px !important;
279
  }
280
 
281
  #phpinfo h1 {
282
- padding: 10px 0px;
283
- font-weight: bold;
284
  }
285
 
286
  #phpinfo h2 {
287
- padding: 10px 0px;
288
- font-weight: bold;
289
- font-size: 20px;
290
  }
291
 
292
  #error_log {
293
- font-size: 12px;
294
  }
295
 
296
  /* ROWS AND COLUMNS */
@@ -314,9 +314,9 @@
314
  .meow-span_1_of_2 { width: 49.2%; }
315
 
316
  @media only screen and (max-width: 480px) {
317
- .meow-col { margin: 0 0 0px 0;}
318
- .meow-span_3_of_3, .meow-span_2_of_3, .meow-span_1_of_3 { width: 100%; }
319
- .meow-span_2_of_2, .meow-span_1_of_2 { width: 100%; }
320
- .meow-header-ad { display: none !important; }
321
- .meow-box [type="text"] { width: 100% !important; }
322
  }
1
  /* MEOW BOX (SETTINGS BOX) */
2
 
3
  .meow-box {
4
+ box-sizing: border-box;
5
+ border: 1px solid #e5e5e5;
6
+ box-shadow: 2px 2px 1px rgba(0,0,0,.02);
7
+ background: #fff;
8
+ color: #444;
9
+ margin-bottom: 15px;
10
+ font-size: 13px !important;
11
+ border-top-right-radius: 8px;
12
  }
13
 
14
  .meow-box input, .meow-box th, .meow-box label, .meow-box select {
15
+ font-size: 13px !important;
16
  }
17
 
18
  .meow-box small {
19
+ font-size: 12px !important;
20
  }
21
 
22
  .meow-box h3 {
23
+ font-size: 13px;
24
+ padding: 4px 12px;
25
+ margin: 0;
26
+ background: #3c3c3c;
27
+ color: #ffffff;
28
+ text-transform: uppercase;
29
+ border-top-right-radius: 8px;
30
+ /*border-bottom: 1px solid #eee;*/
31
  }
32
 
33
  .meow-box h3 .dashicons {
34
+ position: relative;
35
+ top: 0px;
36
+ margin-right: 5px;
37
  }
38
 
39
  .meow-box .pro_info {
40
+ padding: 5px;
41
+ margin: 10px -10px 5px -10px;
42
+ font-size: 11px;
43
+ line-height: 13px;
44
  }
45
 
46
  .meow-box .pro_info.enabled {
47
+ background: #4482d2;
48
+ border-left: 5px solid #4482d2;
49
+ color: white;
50
  }
51
 
52
  .meow-box .pro_info.disabled {
53
+ background: #96555b;
54
+ border-left: 5px solid #632329;
55
+ color: white;
56
  }
57
 
58
  .meow-box .pro_info.disabled a {
59
+ background: #96555b;
60
+ color: red;
61
+ text-decoration: none;
62
  }
63
 
64
  .meow-box .inside {
65
+ margin: 10px;
66
  }
67
 
68
  .meow-box th {
69
+ padding: 10px 10px 10px 0px;
70
+ width: 22%;
71
  }
72
 
73
  .meow-box td {
74
+ padding: 10px 10px;
75
  }
76
 
77
  .meow-box p.submit {
78
+ text-align: right;
79
+ margin: 10px -10px -10px -10px;
80
+ padding: 7px 10px 10px 0px !important;
81
+ border-top: 1px solid #eee !important;
82
+ max-width: inherit;
83
+ background: rgba(125, 125, 125, 0.04);
84
+ border-radius: 0px;
85
  }
86
 
87
  .meow-box [type="text"], .meow-box select {
88
+ width: 100%;
89
  }
90
 
91
  /* CONTROLS INSIDE A COLUMN (LABEL ON THE LEFT, VALUE ON THE RIGHT) */
92
  .meow-box td [type="text"], .meow-box td [type="checkbox"], .meow-box td select {
93
+ margin-top: -3px;
94
  }
95
 
96
  .meow-header-ad {
97
+ float: right;
98
  }
99
 
100
  /* BUTTONS */
101
 
102
  .meow-button-xs {
103
+ font-size: 10px !important;
104
+ height: 20px !important;
105
+ line-height: 18px !important;
106
+ position: relative !important;
107
+ top: 1px !important;
108
+ text-align: center !important
109
  }
110
 
111
  /* MODAL */
112
 
113
+ #meow-modal-info-backdrop {
114
+ background: rgba(0, 0, 0, 0.75);
115
+ position: fixed;
116
+ top: 0px;
117
+ bottom: 0px;
118
+ right: 0px;
119
+ left: 0px;
120
+ z-index: 10000;
121
+ }
122
+
123
+ #meow-modal-info {
124
+ background: white;
125
+ box-shadow: 0px 0px 5px black;
126
+ padding: 15px;
127
+ overflow-y: scroll;
128
+ position: fixed;
129
+ z-index: 10000;
130
+ left: 100px;
131
+ right: 100px;
132
+ top: 50px;
133
+ bottom: 50px;
134
+ }
135
+
136
+ #meow-modal-info h3 {
137
+ height: 25px;
138
+ border-bottom: 2px solid #808080;
139
+ }
140
+
141
+ #meow-modal-info td {
142
+ text-align: center;
143
+ font-size: 11px;
144
+ border: 1px solid #D3DCFF;
145
+ padding: 10px 15px;
146
+ background: #EFF8FF;
147
+ }
148
+
149
+ #meow-modal-info .close {
150
+ float: right;
151
+ font-size: 18px;
152
+ font-weight: bold;
153
+ font-family: Verdana;
154
+ cursor: pointer;
155
+ }
156
+
157
+ #meow-modal-info .loading {
158
+ background-color: #F2F2F2;
159
+ text-align: center;
160
+ padding-top: 10px;
161
+ background-size: 32px 32px;
162
  }
163
 
164
  #meow-modal-info .meow-sized-image {
191
  }
192
 
193
  .meow-sized-images:after {
194
+ clear: both;
195
+ content:""; display:table;
196
  }
197
 
198
  .meow-sized-images + span {
199
+ position: relative;
200
+ top: -12px;
201
  }
202
 
203
  /* MEOW COLORS */
204
 
205
  .meow-bk-blue {
206
  background: #3C82C7 !important;
207
+ color: white;
208
  }
209
 
210
  .meow-bk-orange {
211
  background: #f1900e !important;
212
+ color: white;
213
  }
214
 
215
  .meow-bk-red {
216
  background: #c53a47 !important;
217
+ color: white;
218
  }
219
 
220
  .meow-bk-gray {
221
  background: gray !important;
222
+ color: white;
223
  }
224
 
225
  .meow-bk-green {
226
  background: #2b9463 !important;
227
+ color: white;
228
  }
229
 
230
  .meow-bk-black {
231
+ background: #3c3c3c !important;
232
+ color: white;
233
  }
234
 
235
  .meow-bk-purple {
236
+ background: #984c96 !important;
237
+ color: white;
238
  }
239
 
240
  /* DASHBOARD */
241
 
242
  .meow-dashboard .meow-box li {
243
+ border-bottom: 1px solid #eee;
244
+ padding: 0px 10px 10px 10px;
245
  }
246
 
247
  .meow-dashboard .meow-box li:last-child {
248
+ border: none;
249
+ padding-bottom: 0px;
250
  }
251
 
252
  .meow-button-xs .dashicons {
253
+ font-size: 18px !important;
254
  }
255
 
256
  .meow-button-xs.updating-message:before {
257
+ margin-top: 0px !important;
258
  }
259
 
260
  .meow-button-xs.updating-message * {
261
+ display: none;
262
  }
263
 
264
  #phpinfo {
265
+ font-size: 11px;
266
  }
267
 
268
  #phpinfo .e {
269
+ padding: 5px;
270
+ background: lightgray;
271
  }
272
 
273
  #phpinfo .h th {
274
+ padding: 5px;
275
+ color: white;
276
+ background: gray;
277
+ text-align: left;
278
+ font-size: 14px !important;
279
  }
280
 
281
  #phpinfo h1 {
282
+ padding: 10px 0px;
283
+ font-weight: bold;
284
  }
285
 
286
  #phpinfo h2 {
287
+ padding: 10px 0px;
288
+ font-weight: bold;
289
+ font-size: 20px;
290
  }
291
 
292
  #error_log {
293
+ font-size: 12px;
294
  }
295
 
296
  /* ROWS AND COLUMNS */
314
  .meow-span_1_of_2 { width: 49.2%; }
315
 
316
  @media only screen and (max-width: 480px) {
317
+ .meow-col { margin: 0 0 0px 0;}
318
+ .meow-span_3_of_3, .meow-span_2_of_3, .meow-span_1_of_3 { width: 100%; }
319
+ .meow-span_2_of_2, .meow-span_1_of_2 { width: 100%; }
320
+ .meow-header-ad { display: none !important; }
321
+ .meow-box [type="text"] { width: 100% !important; }
322
  }
common/admin.php CHANGED
@@ -11,7 +11,7 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
11
  public $mainfile; // plugin main file (media-file-renamer.php)
12
  public $domain; // domain used for translation (media-file-renamer)
13
 
14
- public function __construct( $prefix, $mainfile, $domain ) {
15
 
16
  // Core Admin (used by all Meow Apps plugins)
17
  if ( !MeowApps_Admin::$loaded ) {
@@ -36,9 +36,11 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
36
  if ( ( !empty( $license ) ) && !file_exists( plugin_dir_path( $this->mainfile ) . 'common/meowapps/admin.php' ) ) {
37
  add_action( 'admin_notices', array( $this, 'admin_notices_licensed_free' ) );
38
  }
39
- $rating_date = $this->create_rating_date();
40
- if ( time() > $rating_date ) {
41
- add_action( 'admin_notices', array( $this, 'admin_notices_rating' ) );
 
 
42
  }
43
  }
44
  }
@@ -57,7 +59,7 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
57
  $rating_date = get_option( $this->prefix . '_rating_date' );
58
  if ( empty( $rating_date ) ) {
59
  $two_months = strtotime( '+2 months' );
60
- $six_months = strtotime( '+6 months' );
61
  $rating_date = mt_rand( $two_months, $six_months );
62
  update_option( $this->prefix . '_rating_date', $rating_date, false );
63
  }
@@ -73,18 +75,18 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
73
  return;
74
  }
75
  else if ( isset( $_POST[$this->prefix . '_never_remind_me'] ) ) {
76
- $twenty_years = strtotime( '+20 years' );
77
  update_option( $this->prefix . '_rating_date', $twenty_years, false );
78
  return;
79
  }
80
  else if ( isset( $_POST[$this->prefix . '_did_it'] ) ) {
81
- $twenty_years = strtotime( '+100 years' );
82
  update_option( $this->prefix . '_rating_date', $twenty_years, false );
83
  return;
84
  }
85
  $rating_date = get_option( $this->prefix . '_rating_date' );
86
  echo '<div class="notice notice-success" data-rating-date="' . date( 'Y-m-d', $rating_date ) . '">';
87
- echo '<p style="font-size: 100%;">You have been using <b>' . $this->nice_name_from_file( $this->mainfile ) . '</b> for some time now. If you enjoy it, could you share your thoughts and give the developers a sweet spike of motivation? In that case, please: <a target="_blank" href="https://wordpress.org/support/plugin/' . $this->nice_short_url_from_file( $this->mainfile ) . '/reviews/?rate=5#new-post">review it</a>. Thank you :)';
88
  echo '<p>
89
  <form method="post" action="" style="float: right;">
90
  <input type="hidden" name="' . $this->prefix . '_never_remind_me" value="true">
@@ -245,9 +247,10 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
245
 
246
  function check_install( $plugin ) {
247
  $pro = false;
248
- $pluginpath = trailingslashit( dirname( __FILE__ ) ) . '../../' . $plugin . '-pro';
 
249
  if ( !file_exists( $pluginpath ) ) {
250
- $pluginpath = trailingslashit( dirname( __FILE__ ) ) . '../../' . $plugin;
251
  if ( !file_exists( $pluginpath ) ) {
252
  $url = wp_nonce_url( "update.php?action=install-plugin&plugin=$plugin", "install-plugin_$plugin" );
253
  return "<a href='$url'><small><span class='' style='float: right;'>install</span></small></a>";
@@ -381,8 +384,25 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
381
  </ul>
382
  </div>
383
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  </div>
385
 
 
386
  <?php
387
 
388
  }
11
  public $mainfile; // plugin main file (media-file-renamer.php)
12
  public $domain; // domain used for translation (media-file-renamer)
13
 
14
+ public function __construct( $prefix, $mainfile, $domain, $disableReview = false ) {
15
 
16
  // Core Admin (used by all Meow Apps plugins)
17
  if ( !MeowApps_Admin::$loaded ) {
36
  if ( ( !empty( $license ) ) && !file_exists( plugin_dir_path( $this->mainfile ) . 'common/meowapps/admin.php' ) ) {
37
  add_action( 'admin_notices', array( $this, 'admin_notices_licensed_free' ) );
38
  }
39
+ if ( !$disableReview ) {
40
+ $rating_date = $this->create_rating_date();
41
+ if ( time() > $rating_date ) {
42
+ add_action( 'admin_notices', array( $this, 'admin_notices_rating' ) );
43
+ }
44
  }
45
  }
46
  }
59
  $rating_date = get_option( $this->prefix . '_rating_date' );
60
  if ( empty( $rating_date ) ) {
61
  $two_months = strtotime( '+2 months' );
62
+ $six_months = strtotime( '+4 months' );
63
  $rating_date = mt_rand( $two_months, $six_months );
64
  update_option( $this->prefix . '_rating_date', $rating_date, false );
65
  }
75
  return;
76
  }
77
  else if ( isset( $_POST[$this->prefix . '_never_remind_me'] ) ) {
78
+ $twenty_years = strtotime( '+5 years' );
79
  update_option( $this->prefix . '_rating_date', $twenty_years, false );
80
  return;
81
  }
82
  else if ( isset( $_POST[$this->prefix . '_did_it'] ) ) {
83
+ $twenty_years = strtotime( '+10 years' );
84
  update_option( $this->prefix . '_rating_date', $twenty_years, false );
85
  return;
86
  }
87
  $rating_date = get_option( $this->prefix . '_rating_date' );
88
  echo '<div class="notice notice-success" data-rating-date="' . date( 'Y-m-d', $rating_date ) . '">';
89
+ echo '<p style="font-size: 100%;">You have been using <b>' . $this->nice_name_from_file( $this->mainfile ) . '</b> for some time now. Thank you! Could you kindly share your opinion with me, along with, maybe, features you would like to see implemented? Then, please <a style="font-weight: bold; color: #b926ff;" target="_blank" href="https://wordpress.org/support/plugin/' . $this->nice_short_url_from_file( $this->mainfile ) . '/reviews/?rate=5#new-post">write a little review</a>. That will also bring me joy and motivation, and I will get back to you :) <u>In the case you already have written a review</u>, please check again. Many reviews got removed from WordPress recently.';
90
  echo '<p>
91
  <form method="post" action="" style="float: right;">
92
  <input type="hidden" name="' . $this->prefix . '_never_remind_me" value="true">
247
 
248
  function check_install( $plugin ) {
249
  $pro = false;
250
+
251
+ $pluginpath = trailingslashit( plugin_dir_path( __FILE__ ) ) . '../../' . $plugin . '-pro';
252
  if ( !file_exists( $pluginpath ) ) {
253
+ $pluginpath = trailingslashit( plugin_dir_path( __FILE__ ) ) . '../../' . $plugin;
254
  if ( !file_exists( $pluginpath ) ) {
255
  $url = wp_nonce_url( "update.php?action=install-plugin&plugin=$plugin", "install-plugin_$plugin" );
256
  return "<a href='$url'><small><span class='' style='float: right;'>install</span></small></a>";
384
  </ul>
385
  </div>
386
  </div>
387
+
388
+ <div class="meow-box meow-col meow-span_1_of_3">
389
+ <h3><span class="dashicons dashicons-admin-tools"></span> Post Types (used by this install)</h3>
390
+ <div class="inside">
391
+ <?php
392
+ global $wpdb;
393
+ // Maybe we could avoid to check more post_types.
394
+ // SELECT post_type, COUNT(*) FROM `wp_posts` GROUP BY post_type
395
+ $types = $wpdb->get_results( "SELECT post_type as 'type', COUNT(*) as 'count' FROM $wpdb->posts GROUP BY post_type" );
396
+ $result = array();
397
+ foreach( $types as $type )
398
+ array_push( $result, "{$type->type} ({$type->count})" );
399
+ echo implode( $result, ', ' );
400
+ ?>
401
+ </div>
402
+ </div>
403
  </div>
404
 
405
+
406
  <?php
407
 
408
  }
core.php CHANGED
@@ -14,17 +14,17 @@ class Meow_WR2X_Core {
14
  add_filter( 'retina_validate_src', array( $this, 'validate_src' ) );
15
  add_filter( 'wp_calculate_image_srcset', array( $this, 'calculate_image_srcset' ), 1000, 3 );
16
  add_action( 'init', array( $this, 'init' ) );
17
- include( 'api.php' );
18
 
19
  if ( is_admin() ) {
20
- include( 'ajax.php' );
21
  new Meow_WR2X_Ajax( $this );
22
  if ( !get_option( "wr2x_hide_retina_dashboard" ) ) {
23
- include( 'dashboard.php' );
24
  new Meow_WR2X_Dashboard( $this );
25
  }
26
  if ( !get_option( "wr2x_hide_retina_column" ) ) {
27
- include( 'media-library.php' );
28
  new Meow_WR2X_MediaLibrary( $this );
29
  }
30
  //if ( !get_option( "wr2x_hide_retina_column" ) )
@@ -101,7 +101,7 @@ class Meow_WR2X_Core {
101
  if ( !isset( $buffer ) || trim( $buffer ) === '' )
102
  return $buffer;
103
  if ( !function_exists( "str_get_html" ) )
104
- include( 'inc/simple_html_dom.php' );
105
 
106
  $lazysize = get_option( "wr2x_picturefill_lazysizes" ) && $this->admin->is_registered();
107
  $killsrc = !get_option( "wr2x_picturefill_keep_src" );
14
  add_filter( 'retina_validate_src', array( $this, 'validate_src' ) );
15
  add_filter( 'wp_calculate_image_srcset', array( $this, 'calculate_image_srcset' ), 1000, 3 );
16
  add_action( 'init', array( $this, 'init' ) );
17
+ include( __DIR__ . '/api.php' );
18
 
19
  if ( is_admin() ) {
20
+ include( __DIR__ . '/ajax.php' );
21
  new Meow_WR2X_Ajax( $this );
22
  if ( !get_option( "wr2x_hide_retina_dashboard" ) ) {
23
+ include( __DIR__ . '/dashboard.php' );
24
  new Meow_WR2X_Dashboard( $this );
25
  }
26
  if ( !get_option( "wr2x_hide_retina_column" ) ) {
27
+ include( __DIR__ . '/media-library.php' );
28
  new Meow_WR2X_MediaLibrary( $this );
29
  }
30
  //if ( !get_option( "wr2x_hide_retina_column" ) )
101
  if ( !isset( $buffer ) || trim( $buffer ) === '' )
102
  return $buffer;
103
  if ( !function_exists( "str_get_html" ) )
104
+ include( __DIR__ . '/inc/simple_html_dom.php' );
105
 
106
  $lazysize = get_option( "wr2x_picturefill_lazysizes" ) && $this->admin->is_registered();
107
  $killsrc = !get_option( "wr2x_picturefill_keep_src" );
dashboard.php CHANGED
@@ -202,7 +202,7 @@ class Meow_WR2X_Dashboard {
202
  ?>
203
 
204
  <p>
205
- <?php printf( __( 'The full-size images should have a resolution of <b>%d×%d</b> at least for the plugin to be able generate the <b>%d retina images</b> required by your website.', 'wp-retina-2x' ), $max_width, $max_height, count( $active_sizes ) ); ?>
206
  <?php if ( $full_size_needed ) printf( __( "You <b>also need</b> to upload a retina image for the Full-Size image (might be <b>%d×%d</b>).", 'wp-retina-2x' ), $max_width * 2, $max_height * 2 ); ?>
207
  <?php _e("You can upload or replace the images by drag & drop.", 'wp-retina-2x' ); ?>
208
  <?php printf( __( "Your PHP configuration allows uploads of <b>%dMB</b> maximum.", 'wp-retina-2x'), $upload_max_size / 1000000 ); ?>
202
  ?>
203
 
204
  <p>
205
+ <?php printf( __( 'Based on your <i>image sizes</i> settings, the full-size images should be uploaded at a resolution of at least <b>%d×%d</b> for the plugin to be able generate the <b>%d retina images</b>. Please note that it vares depending on your needs for each image (you will need to discuss this with your developer).', 'wp-retina-2x' ), $max_width, $max_height, count( $active_sizes ) ); ?>
206
  <?php if ( $full_size_needed ) printf( __( "You <b>also need</b> to upload a retina image for the Full-Size image (might be <b>%d×%d</b>).", 'wp-retina-2x' ), $max_width * 2, $max_height * 2 ); ?>
207
  <?php _e("You can upload or replace the images by drag & drop.", 'wp-retina-2x' ); ?>
208
  <?php printf( __( "Your PHP configuration allows uploads of <b>%dMB</b> maximum.", 'wp-retina-2x'), $upload_max_size / 1000000 ); ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: TigrouMeow
3
  Tags: retina, images, image, responsive, lazysizes, lazy, attachment, media, files, iphone, ipad, high-dpi
4
  Requires at least: 3.5
5
  Tested up to: 4.9
6
- Stable tag: 5.2.3
7
 
8
  Make your website look beautiful and crisp on modern displays by creating and displaying retina images. WP 4.4+ is also supported and enhanced.
9
 
@@ -23,7 +23,7 @@ This plugin does two things: it creates the image files required by the High-DPI
23
 
24
  **CSS & Background Images**. The plugin cannot inject CSS to handles the images added through CSS, that's both too dangerous and potentially very incorrect. However, in its Pro version and with PictureFill, you get an option to replace the inline CSS background image by their retina equivalent.
25
 
26
- More information and tutorial available one http://meowapps.com/wp-retina-2x/.
27
 
28
  = Quickstart =
29
 
@@ -33,6 +33,11 @@ More information and tutorial available one http://meowapps.com/wp-retina-2x/.
33
 
34
  == Changelog ==
35
 
 
 
 
 
 
36
  = 5.2.3 =
37
  * Fix: Sanitization to avoid cross-site scripting.
38
  * Fix: Additional security fixes.
@@ -58,7 +63,7 @@ More information and tutorial available one http://meowapps.com/wp-retina-2x/.
58
  * Fix: Disabled sizes weren't really disabled in the UI.
59
  * Fix: Notices about Ignore appearing in other screens.
60
  * Add: Handles incompatibility with JetPack's Photon.
61
- * Info: If you are using Lightroom, please have a look at my plugin for synchronizing your Lightroom to WordPress: http://meowapps.com/wplr-sync/. And if youi love my Retina plugin, please write a little review here: https://wordpress.org/support/plugin/wp-retina-2x/reviews/?rate=5#new-post. Thank you :)
62
 
63
  = 4.7.7 =
64
  * Add: The Generate button (and the bulk Generate) will now also Re-Generate the thumbnails as well (like the Renerate Thumbnails plugin). If you are interested in a option to disable this behavior, please say so in the WP forums.
@@ -104,7 +109,7 @@ More information and tutorial available one http://meowapps.com/wp-retina-2x/.
104
  * Update: Ignore Responsive Images support if the media ID is not existent (in case of broken HTML).
105
 
106
  = 4.4.0 =
107
- * Info: Please read my blog post about WP 4.4 + Retina on http://meowapps.com/wordpress-4-4-retina/.
108
  * Add: New "Responsive Images" method.
109
  * Add: Lot more information is available in the Retina settings, to help the newbies :)
110
  * Update: Headers are compliant to WP 4.4.
@@ -156,7 +161,7 @@ More information and tutorial available one http://meowapps.com/wp-retina-2x/.
156
  * Add: (PRO) New pop-up screen with detailed information.
157
  * Add: (PRO) Added Retina for Full-Size with upload feature. Please note that Full-Size Retina also works with the normal version but you will have to manually resize and upload them.
158
  * Add: (PRO) Option to avoid removing img's src when using PictureFill.
159
- * Info: The serial for the Pro version can be bought at http://meowapps.com/wp-retina-2x. Thanks for all your support, the plugin is going to be 3 years old this year! :)
160
 
161
  = 2.6.0 =
162
  * Add: Support Manual Image Crop, resize the @2x as the user manually cropped them (that's cool!).
@@ -217,11 +222,11 @@ Quick and easy installation:
217
  2. Activate the plugin through the 'Plugins' menu in WordPress.
218
  3. Check the settings of WP Retina 2x in the WordPress administration screen.
219
  4. Check the Retina Dashboard.
220
- 6. Read the tutorial about the plugin: <a href='http://meowapps.com/wp-retina-2x/tutorial/'>WP Retina 2x Tutorial</a>.
221
 
222
  == Frequently Asked Questions ==
223
 
224
- Users, you will find the FAQ here: http://meowapps.com/wp-retina-2x/faq/.
225
 
226
  Developers, WP Retina 2x has a little API. Here are a few filters and actions you might want to use.
227
 
3
  Tags: retina, images, image, responsive, lazysizes, lazy, attachment, media, files, iphone, ipad, high-dpi
4
  Requires at least: 3.5
5
  Tested up to: 4.9
6
+ Stable tag: 5.2.6
7
 
8
  Make your website look beautiful and crisp on modern displays by creating and displaying retina images. WP 4.4+ is also supported and enhanced.
9
 
23
 
24
  **CSS & Background Images**. The plugin cannot inject CSS to handles the images added through CSS, that's both too dangerous and potentially very incorrect. However, in its Pro version and with PictureFill, you get an option to replace the inline CSS background image by their retina equivalent.
25
 
26
+ More information and tutorial available one https://meowapps.com/wp-retina-2x/.
27
 
28
  = Quickstart =
29
 
33
 
34
  == Changelog ==
35
 
36
+ = 5.2.6 =
37
+ * Fix: Avoid re-generating non-retina thumbnails when Generate is used.
38
+ * Fix: Use ___DIR___ to include plugin's files.
39
+ * Fix: Better explanation.
40
+
41
  = 5.2.3 =
42
  * Fix: Sanitization to avoid cross-site scripting.
43
  * Fix: Additional security fixes.
63
  * Fix: Disabled sizes weren't really disabled in the UI.
64
  * Fix: Notices about Ignore appearing in other screens.
65
  * Add: Handles incompatibility with JetPack's Photon.
66
+ * Info: If you are using Lightroom, please have a look at my plugin for synchronizing your Lightroom to WordPress: https://meowapps.com/wplr-sync/. And if youi love my Retina plugin, please write a little review here: https://wordpress.org/support/plugin/wp-retina-2x/reviews/?rate=5#new-post. Thank you :)
67
 
68
  = 4.7.7 =
69
  * Add: The Generate button (and the bulk Generate) will now also Re-Generate the thumbnails as well (like the Renerate Thumbnails plugin). If you are interested in a option to disable this behavior, please say so in the WP forums.
109
  * Update: Ignore Responsive Images support if the media ID is not existent (in case of broken HTML).
110
 
111
  = 4.4.0 =
112
+ * Info: Please read my blog post about WP 4.4 + Retina on https://meowapps.com/wordpress-4-4-retina/.
113
  * Add: New "Responsive Images" method.
114
  * Add: Lot more information is available in the Retina settings, to help the newbies :)
115
  * Update: Headers are compliant to WP 4.4.
161
  * Add: (PRO) New pop-up screen with detailed information.
162
  * Add: (PRO) Added Retina for Full-Size with upload feature. Please note that Full-Size Retina also works with the normal version but you will have to manually resize and upload them.
163
  * Add: (PRO) Option to avoid removing img's src when using PictureFill.
164
+ * Info: The serial for the Pro version can be bought at https://meowapps.com/wp-retina-2x. Thanks for all your support, the plugin is going to be 3 years old this year! :)
165
 
166
  = 2.6.0 =
167
  * Add: Support Manual Image Crop, resize the @2x as the user manually cropped them (that's cool!).
222
  2. Activate the plugin through the 'Plugins' menu in WordPress.
223
  3. Check the settings of WP Retina 2x in the WordPress administration screen.
224
  4. Check the Retina Dashboard.
225
+ 6. Read the tutorial about the plugin: <a href='https://meowapps.com/wp-retina-2x/tutorial/'>WP Retina 2x Tutorial</a>.
226
 
227
  == Frequently Asked Questions ==
228
 
229
+ Users, you will find the FAQ here: https://meowapps.com/wp-retina-2x/faq/.
230
 
231
  Developers, WP Retina 2x has a little API. Here are a few filters and actions you might want to use.
232
 
wp-retina-2x.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Retina 2x
4
- Plugin URI: http://meowapps.com
5
  Description: Make your website look beautiful and crisp on modern displays by creating + displaying retina images.
6
- Version: 5.2.3
7
  Author: Jordy Meow
8
- Author URI: http://meowapps.com
9
  Text Domain: wp-retina-2x
10
  Domain Path: /languages
11
 
@@ -14,8 +14,8 @@ http://www.opensource.org/licenses/mit-license.php
14
  http://www.gnu.org/licenses/gpl.html
15
 
16
  Originally developed for two of my websites:
17
- - Jordy Meow (http://offbeatjapan.org)
18
- - Haikyo (http://haikyo.org)
19
  */
20
 
21
  if ( class_exists( 'Meow_WR2X_Core' ) ) {
@@ -29,7 +29,7 @@ if ( class_exists( 'Meow_WR2X_Core' ) ) {
29
  global $wr2x_picturefill, $wr2x_retinajs, $wr2x_lazysizes,
30
  $wr2x_retina_image, $wr2x_core;
31
 
32
- $wr2x_version = '5.2.3';
33
  $wr2x_retinajs = '2.0.0';
34
  $wr2x_picturefill = '3.0.2';
35
  $wr2x_lazysizes = '4.0.1';
1
  <?php
2
  /*
3
  Plugin Name: WP Retina 2x
4
+ Plugin URI: https://meowapps.com
5
  Description: Make your website look beautiful and crisp on modern displays by creating + displaying retina images.
6
+ Version: 5.2.6
7
  Author: Jordy Meow
8
+ Author URI: https://meowapps.com
9
  Text Domain: wp-retina-2x
10
  Domain Path: /languages
11
 
14
  http://www.gnu.org/licenses/gpl.html
15
 
16
  Originally developed for two of my websites:
17
+ - Jordy Meow (https://offbeatjapan.org)
18
+ - Haikyo (https://haikyo.org)
19
  */
20
 
21
  if ( class_exists( 'Meow_WR2X_Core' ) ) {
29
  global $wr2x_picturefill, $wr2x_retinajs, $wr2x_lazysizes,
30
  $wr2x_retina_image, $wr2x_core;
31
 
32
+ $wr2x_version = '5.2.6';
33
  $wr2x_retinajs = '2.0.0';
34
  $wr2x_picturefill = '3.0.2';
35
  $wr2x_lazysizes = '4.0.1';