WP Retina 2x - Version 5.2.2

Version Description

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

Release Info

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

Code changes from version 5.2.0 to 5.2.2

Files changed (5) hide show
  1. core.php +6 -6
  2. dashboard.php +9 -6
  3. readme.txt +4 -1
  4. wp-retina-2x.php +2 -2
  5. wr2x_admin.php +1 -1
core.php CHANGED
@@ -14,21 +14,21 @@ 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
- require( 'api.php' );
18
 
19
  if ( is_admin() ) {
20
- require( 'ajax.php' );
21
  new Meow_WR2X_Ajax( $this );
22
  if ( !get_option( "wr2x_hide_retina_dashboard" ) ) {
23
- require( 'dashboard.php' );
24
  new Meow_WR2X_Dashboard( $this );
25
  }
26
  if ( !get_option( "wr2x_hide_retina_column" ) ) {
27
- require( 'media-library.php' );
28
  new Meow_WR2X_MediaLibrary( $this );
29
  }
30
  //if ( !get_option( "wr2x_hide_retina_column" ) )
31
- //require( 'wr2x_retina_uploader.php' );
32
  }
33
  }
34
 
@@ -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
- require( '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( '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" ) )
31
+ //include( 'wr2x_retina_uploader.php' );
32
  }
33
  }
34
 
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" );
dashboard.php CHANGED
@@ -23,9 +23,9 @@ class Meow_WR2X_Dashboard {
23
  }
24
 
25
  function dashboard() {
26
- $refresh = isset ( $_GET[ 'refresh' ] ) ? $_GET[ 'refresh' ] : 0;
27
- $clearlogs = isset ( $_GET[ 'clearlogs' ] ) ? $_GET[ 'clearlogs' ] : 0;
28
- $ignore = isset ( $_GET[ 'ignore' ] ) ? $_GET[ 'ignore' ] : false;
29
  if ( $ignore ) {
30
  if ( !$this->core->admin->is_registered() ) {
31
  echo "<div class='error' style='margin-top: 20px;'><p>";
@@ -45,11 +45,14 @@ class Meow_WR2X_Dashboard {
45
  }
46
 
47
  $hide_ads = get_option( 'meowapps_hide_ads', false );
48
- $view = isset ( $_GET[ 'view' ] ) ? $_GET[ 'view' ] : 'issues';
49
- $paged = isset ( $_GET[ 'paged' ] ) ? $_GET[ 'paged' ] : 1;
50
  $s = isset( $_GET[ 's' ] ) && !empty( $_GET[ 's' ] ) ? sanitize_text_field( $_GET[ 's' ] ) : null;
51
  $issues = $count = 0;
52
- $posts_per_page = 15; // TODO: HOW TO GET THE NUMBER OF MEDIA PER PAGES? IT IS NOT get_option('posts_per_page');
 
 
 
53
  $issues = $this->core->get_issues();
54
  $ignored = $this->core->get_ignores();
55
 
23
  }
24
 
25
  function dashboard() {
26
+ $refresh = isset ( $_GET[ 'refresh' ] ) ? sanitize_text_field( $_GET[ 'refresh' ] ) : 0;
27
+ $clearlogs = isset ( $_GET[ 'clearlogs' ] ) ? sanitize_text_field( $_GET[ 'clearlogs' ] ) : 0;
28
+ $ignore = isset ( $_GET[ 'ignore' ] ) ? sanitize_text_field( $_GET[ 'ignore' ] ) : false;
29
  if ( $ignore ) {
30
  if ( !$this->core->admin->is_registered() ) {
31
  echo "<div class='error' style='margin-top: 20px;'><p>";
45
  }
46
 
47
  $hide_ads = get_option( 'meowapps_hide_ads', false );
48
+ $view = isset( $_GET[ 'view' ] ) ? sanitize_text_field( $_GET[ 'view' ] ) : 'issues';
49
+ $paged = isset( $_GET[ 'paged' ] ) ? sanitize_text_field( $_GET[ 'paged' ] ) : 1;
50
  $s = isset( $_GET[ 's' ] ) && !empty( $_GET[ 's' ] ) ? sanitize_text_field( $_GET[ 's' ] ) : null;
51
  $issues = $count = 0;
52
+
53
+ $posts_per_page = get_user_meta( get_current_user_id(), 'upload_per_page', true );
54
+ if ( empty( $posts_per_page ) )
55
+ $posts_per_page = 20;
56
  $issues = $this->core->get_issues();
57
  $ignored = $this->core->get_ignores();
58
 
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.0
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,6 +33,9 @@ More information and tutorial available one http://meowapps.com/wp-retina-2x/.
33
 
34
  == Changelog ==
35
 
 
 
 
36
  = 5.2.0 =
37
  * Fix: When metadata is broken, displays a message.
38
  * Fix: A few icons weren't displayed nicely.
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
 
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.
41
  * Fix: A few icons weren't displayed nicely.
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.0
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.0';
33
  $wr2x_retinajs = '2.0.0';
34
  $wr2x_picturefill = '3.0.2';
35
  $wr2x_lazysizes = '4.0.1';
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
  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';
wr2x_admin.php CHANGED
@@ -207,7 +207,7 @@ class Meow_WR2X_Admin extends MeowApps_Admin {
207
  <div class="meow-box meow-col meow-span_2_of_2">
208
  <h3>How to use</h3>
209
  <div class="inside">
210
- <?php echo _e( 'This plugin works out of the box, the default settings are the best for most installs. However, you should have a look at the <a target="_blank" href="https://meowapps.com/wp-retina-2x/tutorial/">tutorial</a>.', 'meow-gallery' ) ?>
211
  </div>
212
  </div>
213
  </div>
207
  <div class="meow-box meow-col meow-span_2_of_2">
208
  <h3>How to use</h3>
209
  <div class="inside">
210
+ <?php echo _e( 'This plugin works out of the box, the default settings are the best for most installs. However, you should have a look at the <a target="_blank" href="https://meowapps.com/wp-retina-2x/tutorial/">tutorial</a>.', 'wp-retina-2x' ) ?>
211
  </div>
212
  </div>
213
  </div>