WP Retina 2x - Version 5.2.3

Version Description

  • Fix: Sanitization to avoid cross-site scripting.
  • Fix: Additional security fixes.
Download this release

Release Info

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

Code changes from version 5.2.2 to 5.2.3

Files changed (4) hide show
  1. common/admin.php +2 -2
  2. readme.txt +3 -2
  3. wp-retina-2x.php +11 -5
  4. wr2x_admin.php +5 -3
common/admin.php CHANGED
@@ -245,9 +245,9 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
245
 
246
  function check_install( $plugin ) {
247
  $pro = false;
248
- $pluginpath = get_home_path() . 'wp-content/plugins/' . $plugin . '-pro';
249
  if ( !file_exists( $pluginpath ) ) {
250
- $pluginpath = get_home_path() . 'wp-content/plugins/' . $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>";
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>";
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.2
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
 
@@ -33,8 +33,9 @@ More information and tutorial available one http://meowapps.com/wp-retina-2x/.
33
 
34
  == Changelog ==
35
 
36
- = 5.2.2 =
37
  * Fix: Sanitization to avoid cross-site scripting.
 
38
 
39
  = 5.2.0 =
40
  * Fix: When metadata is broken, displays a message.
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
 
33
 
34
  == Changelog ==
35
 
36
+ = 5.2.3 =
37
  * Fix: Sanitization to avoid cross-site scripting.
38
+ * Fix: Additional security fixes.
39
 
40
  = 5.2.0 =
41
  * Fix: When metadata is broken, displays a message.
wp-retina-2x.php CHANGED
@@ -3,7 +3,7 @@
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.2
7
  Author: Jordy Meow
8
  Author URI: http://meowapps.com
9
  Text Domain: wp-retina-2x
@@ -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.2';
33
  $wr2x_retinajs = '2.0.0';
34
  $wr2x_picturefill = '3.0.2';
35
  $wr2x_lazysizes = '4.0.1';
@@ -51,14 +51,19 @@ $wr2x_admin->core = $wr2x_core;
51
  add_action( 'admin_notices', 'wr2x_meow_old_version_admin_notices' );
52
 
53
  function wr2x_meow_old_version_admin_notices() {
 
 
54
  if ( isset( $_POST['wr2x_reset_sub'] ) ) {
55
- delete_transient( 'wr2x_validated' );
56
- delete_option( 'wr2x_pro_serial' );
57
- delete_option( 'wr2x_pro_status' );
 
 
58
  }
59
  $subscr_id = get_option( 'wr2x_pro_serial', "" );
60
  if ( empty( $subscr_id ) )
61
  return;
 
62
  $forever = strpos( $subscr_id, 'F-' ) !== false;
63
  $yearly = strpos( $subscr_id, 'I-' ) !== false;
64
  if ( !$forever && !$yearly )
@@ -72,6 +77,7 @@ function wr2x_meow_old_version_admin_notices() {
72
  <p>
73
  <form method="post" action="">
74
  <input type="hidden" name="wr2x_reset_sub" value="true">
 
75
  <input type="submit" name="submit" id="submit" class="button" value="Got it. Clear this!">
76
  <br /><small><b>Make sure you followed the instruction before clicking this button.</b></small>
77
  </form>
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
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';
51
  add_action( 'admin_notices', 'wr2x_meow_old_version_admin_notices' );
52
 
53
  function wr2x_meow_old_version_admin_notices() {
54
+ if ( !current_user_can( 'install_plugins' ) )
55
+ return;
56
  if ( isset( $_POST['wr2x_reset_sub'] ) ) {
57
+ if ( check_admin_referer( 'wr2x_remove_expired_data' ) ) {
58
+ delete_transient( 'wr2x_validated' );
59
+ delete_option( 'wr2x_pro_serial' );
60
+ delete_option( 'wr2x_pro_status' );
61
+ }
62
  }
63
  $subscr_id = get_option( 'wr2x_pro_serial', "" );
64
  if ( empty( $subscr_id ) )
65
  return;
66
+
67
  $forever = strpos( $subscr_id, 'F-' ) !== false;
68
  $yearly = strpos( $subscr_id, 'I-' ) !== false;
69
  if ( !$forever && !$yearly )
77
  <p>
78
  <form method="post" action="">
79
  <input type="hidden" name="wr2x_reset_sub" value="true">
80
+ <?php wp_nonce_field( 'wr2x_remove_expired_data' ); ?>
81
  <input type="submit" name="submit" id="submit" class="button" value="Got it. Clear this!">
82
  <br /><small><b>Make sure you followed the instruction before clicking this button.</b></small>
83
  </form>
wr2x_admin.php CHANGED
@@ -18,9 +18,11 @@ class Meow_WR2X_Admin extends MeowApps_Admin {
18
  }
19
 
20
  function admin_notices() {
21
- if ( delete_transient( 'wr2x_flush_rules' ) ) {
22
- global $wp_rewrite;
23
- Meow_WR2X_Admin::generate_rewrite_rules( $wp_rewrite, true );
 
 
24
  }
25
  if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
26
  echo "<div class='error' style='margin-top: 20px;'><p>";
18
  }
19
 
20
  function admin_notices() {
21
+ if ( current_user_can( 'activate_plugins' ) ) {
22
+ if ( delete_transient( 'wr2x_flush_rules' ) ) {
23
+ global $wp_rewrite;
24
+ Meow_WR2X_Admin::generate_rewrite_rules( $wp_rewrite, true );
25
+ }
26
  }
27
  if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
28
  echo "<div class='error' style='margin-top: 20px;'><p>";