Master Slider – Responsive Touch Slider - Version 3.7.5

Version Description

Download this release

Release Info

Developer averta
Plugin Icon 128x128 Master Slider – Responsive Touch Slider
Version 3.7.5
Comparing to
See all releases

Code changes from version 3.7.1 to 3.7.5

README.txt CHANGED
@@ -7,7 +7,7 @@ Tags: slider, image slider, wordpress slider, video slider, best slider plugin,
7
  Requires PHP: 5.4
8
  Requires at least: 5.0
9
  Tested up to: 5.7.0
10
- Stable tag: 3.7.1
11
 
12
  Build SEO friendly sliders fast and easy with Master Slider. The most advanced responsive HTML5 WordPress slider plugin, with touch swipe navigation that works smoothly on desktop and devices.
13
 
@@ -237,10 +237,10 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
237
 
238
  == Changelog ==
239
 
240
- = 3.7.1 =
241
 
242
- = Version 3.7.1/ (28.04.2021) =
243
- - [Improvement]: Security improvements applied.
244
 
245
  = Version 3.7.0/ (31.03.2021) =
246
  - [Improvement]: Compatibility with WordPress 5.7 applied.
@@ -493,4 +493,4 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
493
  == Upgrade Notice ==
494
 
495
  = Version 3.7.1/ (28.04.2021) =
496
- - [Improvement]: Security improvements applied.
7
  Requires PHP: 5.4
8
  Requires at least: 5.0
9
  Tested up to: 5.7.0
10
+ Stable tag: 3.7.5
11
 
12
  Build SEO friendly sliders fast and easy with Master Slider. The most advanced responsive HTML5 WordPress slider plugin, with touch swipe navigation that works smoothly on desktop and devices.
13
 
237
 
238
  == Changelog ==
239
 
240
+ = 3.7.5 =
241
 
242
+ = Version 3.7.5/ (06.05.2021) =
243
+ - [Improvement]: Security improvements were applied.
244
 
245
  = Version 3.7.0/ (31.03.2021) =
246
  - [Improvement]: Compatibility with WordPress 5.7 applied.
493
  == Upgrade Notice ==
494
 
495
  = Version 3.7.1/ (28.04.2021) =
496
+ - [Improvement]: Security improvements were applied.
admin/includes/classes/class-msp-admin-assets.php CHANGED
@@ -125,7 +125,7 @@ class MSP_Admin_Assets {
125
  // get and print slider id
126
  if ( isset( $_REQUEST['slider_id'] ) ) {
127
 
128
- $slider_id = $_REQUEST['slider_id'];
129
 
130
  } else {
131
  global $mspdb;
125
  // get and print slider id
126
  if ( isset( $_REQUEST['slider_id'] ) ) {
127
 
128
+ $slider_id = sanitize_text_field( $_REQUEST['slider_id'] );
129
 
130
  } else {
131
  global $mspdb;
admin/includes/classes/class-msp-importer.php CHANGED
@@ -248,7 +248,7 @@ class MSP_Importer {
248
 
249
  if( check_admin_referer('export-msp-sliders') ) {
250
 
251
- $sliders = isset( $_POST['msp-export-sliders'] ) ? $_POST['msp-export-sliders'] : '';
252
 
253
  if( ! empty( $sliders ) || ! empty( $args ) ) {
254
  $this->export_slider_data_in_file( $sliders, $args );
248
 
249
  if( check_admin_referer('export-msp-sliders') ) {
250
 
251
+ $sliders = isset( $_POST['msp-export-sliders'] ) ? sanitize_text_field( $_POST['msp-export-sliders'] ) : '';
252
 
253
  if( ! empty( $sliders ) || ! empty( $args ) ) {
254
  $this->export_slider_data_in_file( $sliders, $args );
admin/includes/classes/class-msp-list-table.php CHANGED
@@ -48,12 +48,12 @@ class MSP_List_Table extends Axiom_List_Table {
48
  '<a href="%s">%s</a>',
49
  esc_url( add_query_arg(
50
  array(
51
- 'page' => $_GET['page'],
52
  'action' => 'edit',
53
  'slider_id' => $item['ID' ]
54
  )
55
  )),
56
- $item['title']
57
  );
58
 
59
  }
@@ -70,7 +70,7 @@ class MSP_List_Table extends Axiom_List_Table {
70
  '<a class="action-duplicate msp-ac-btn msp-btn-gray msp-iconic" href="%s"><span></span>%s</a>',
71
  esc_url( add_query_arg(
72
  array(
73
- 'page' => $_GET['page'],
74
  'action' => 'duplicate',
75
  'slider_id' => $item['ID'],
76
  'paged' => $paged
@@ -85,7 +85,7 @@ class MSP_List_Table extends Axiom_List_Table {
85
  '<a class="action-delete msp-ac-btn msp-btn-red msp-iconic" href="%s" onClick="return confirm(\'%s\');" ><span></span>%s</a>',
86
  esc_url( add_query_arg(
87
  array(
88
- 'page' => $_GET['page'],
89
  'action' => 'delete',
90
  'slider_id' => $item['ID'],
91
  'paged' => $paged
@@ -102,7 +102,7 @@ class MSP_List_Table extends Axiom_List_Table {
102
  '<a class="action-preview msp-ac-btn msp-btn-blue msp-iconic" href="%s" onClick="lunchMastersliderPreviewBySliderID(%s);return false;" ><span></span>%s</a>',
103
  esc_url( add_query_arg(
104
  array(
105
- 'page' => $_GET['page'],
106
  'action' => 'preview',
107
  'slider_id' => $item['ID']
108
  )
@@ -118,7 +118,7 @@ class MSP_List_Table extends Axiom_List_Table {
118
 
119
  function process_bulk_action() {
120
 
121
- $slider_id = isset( $_REQUEST['slider_id'] ) ? $_REQUEST['slider_id'] : '';
122
 
123
  // check if a delete request recieved
124
  if( current_user_can( 'delete_masterslider' ) && 'delete' === $this->current_action() ) {
@@ -204,10 +204,10 @@ class MSP_List_Table extends Axiom_List_Table {
204
  global $mspdb;
205
 
206
  $offset = ( (int)$paged - 1 ) * $perpage;
207
- $orderby = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : 'ID';
208
- $order = isset( $_REQUEST['order'] ) ? $_REQUEST['order'] : 'ASC';
209
 
210
- $search = isset( $_REQUEST['s'] ) ? " AND title LIKE '%%" . $_REQUEST['s'] . "%%'" : '';
211
 
212
  return $mspdb->get_sliders( $perpage, $offset, $orderby, $order, $where.$search );
213
  }
@@ -255,4 +255,3 @@ class MSP_List_Table extends Axiom_List_Table {
255
  // global $master_list_table;
256
  // $master_list_table = new Master_List_Table();
257
  // $master_list_table->prepare_items();
258
-
48
  '<a href="%s">%s</a>',
49
  esc_url( add_query_arg(
50
  array(
51
+ 'page' => esc_html( $_GET['page'] ),
52
  'action' => 'edit',
53
  'slider_id' => $item['ID' ]
54
  )
55
  )),
56
+ esc_html( $item['title'] )
57
  );
58
 
59
  }
70
  '<a class="action-duplicate msp-ac-btn msp-btn-gray msp-iconic" href="%s"><span></span>%s</a>',
71
  esc_url( add_query_arg(
72
  array(
73
+ 'page' => esc_html( $_GET['page'] ),
74
  'action' => 'duplicate',
75
  'slider_id' => $item['ID'],
76
  'paged' => $paged
85
  '<a class="action-delete msp-ac-btn msp-btn-red msp-iconic" href="%s" onClick="return confirm(\'%s\');" ><span></span>%s</a>',
86
  esc_url( add_query_arg(
87
  array(
88
+ 'page' => esc_html( $_GET['page'] ),
89
  'action' => 'delete',
90
  'slider_id' => $item['ID'],
91
  'paged' => $paged
102
  '<a class="action-preview msp-ac-btn msp-btn-blue msp-iconic" href="%s" onClick="lunchMastersliderPreviewBySliderID(%s);return false;" ><span></span>%s</a>',
103
  esc_url( add_query_arg(
104
  array(
105
+ 'page' => esc_html( $_GET['page'] ),
106
  'action' => 'preview',
107
  'slider_id' => $item['ID']
108
  )
118
 
119
  function process_bulk_action() {
120
 
121
+ $slider_id = isset( $_REQUEST['slider_id'] ) ? sanitize_text_field( $_REQUEST['slider_id'] ) : '';
122
 
123
  // check if a delete request recieved
124
  if( current_user_can( 'delete_masterslider' ) && 'delete' === $this->current_action() ) {
204
  global $mspdb;
205
 
206
  $offset = ( (int)$paged - 1 ) * $perpage;
207
+ $orderby = isset( $_REQUEST['orderby'] ) ? sanitize_text_field( $_REQUEST['orderby'] ) : 'ID';
208
+ $order = isset( $_REQUEST['order'] ) ? sanitize_text_field( $_REQUEST['order'] ) : 'ASC';
209
 
210
+ $search = isset( $_REQUEST['s'] ) ? " AND title LIKE '%%" . sanitize_text_field( $_REQUEST['s'] ) . "%%'" : '';
211
 
212
  return $mspdb->get_sliders( $perpage, $offset, $orderby, $order, $where.$search );
213
  }
255
  // global $master_list_table;
256
  // $master_list_table = new Master_List_Table();
257
  // $master_list_table->prepare_items();
 
admin/views/slider-dashboard/list-sliders.php CHANGED
@@ -154,10 +154,10 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
154
  ?>
155
  <tr>
156
  <th class="export-column export-field-cb" ><input type="checkbox" name="msp-export-sliders[]" class="export-slider-cb" value="<?php echo $slider['ID']; ?>" /></th>
157
- <th class="export-column export-field-ID" ><?php echo $slider['ID']; ?></th>
158
- <th class="export-column export-field-title" ><?php echo $slider['title']; ?></th>
159
- <th class="export-column export-field-type" ><?php echo $slider['type']; ?></th>
160
- <th class="export-column export-field-lastmodify" ><abbr title="<?php echo $time; ?>"><?php echo $human_time; ?></abbr></th>
161
  </tr>
162
  <?php } ?>
163
  </tbody>
@@ -182,5 +182,3 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
182
  </div>
183
 
184
  <?php } ?>
185
-
186
-
154
  ?>
155
  <tr>
156
  <th class="export-column export-field-cb" ><input type="checkbox" name="msp-export-sliders[]" class="export-slider-cb" value="<?php echo $slider['ID']; ?>" /></th>
157
+ <th class="export-column export-field-ID" ><?php echo esc_html( $slider['ID'] ); ?></th>
158
+ <th class="export-column export-field-title" ><?php echo esc_html( $slider['title'] ); ?></th>
159
+ <th class="export-column export-field-type" ><?php echo esc_html( $slider['type'] ); ?></th>
160
+ <th class="export-column export-field-lastmodify" ><abbr title="<?php echo esc_attr( $time ); ?>"><?php echo $human_time; ?></abbr></th>
161
  </tr>
162
  <?php } ?>
163
  </tbody>
182
  </div>
183
 
184
  <?php } ?>
 
 
includes/classes/class-msp-db.php CHANGED
@@ -392,8 +392,7 @@ class MSP_DB {
392
  return null;
393
  }
394
 
395
- $sql = $wpdb->prepare( "SELECT * FROM {$this->sliders} WHERE ID = %d", (int)$slider_id );
396
- $result = $wpdb->get_row( $sql, ARRAY_A );
397
 
398
  return $this->maybe_unserialize_fields($result);
399
  }
@@ -497,7 +496,7 @@ class MSP_DB {
497
  $order = strtolower( $args['order'] ) === 'desc' ? 'DESC' : 'ASC';
498
  $orderby_clause = $args['orderby'] .' '. $order;
499
 
500
- $orderby_clause = sanitize_sql_orderby( $orderby_clause );
501
 
502
  $sql = "
503
  SELECT *
@@ -508,7 +507,7 @@ class MSP_DB {
508
  $offset
509
  ";
510
 
511
- return $wpdb->get_results( $sql, ARRAY_A );
512
  }
513
 
514
 
@@ -611,10 +610,10 @@ class MSP_DB {
611
  );
612
 
613
  // check if key already exist in master slider options table
614
- $sql = $wpdb->prepare( "SELECT * FROM {$this->options} WHERE option_name = %s", $option_name );
615
  // skip adding option if option added to options table before
616
- if( $result = $wpdb->get_row( $sql, ARRAY_A ) )
617
  return false;
 
618
 
619
  // An array of formats to be mapped to each of the value in $data
620
  $format = array('%s', '%s');
@@ -652,8 +651,7 @@ class MSP_DB {
652
  // query the value if value is not available in cache
653
  if( false === $value ) {
654
 
655
- $sql = $wpdb->prepare( "SELECT * FROM {$this->options} WHERE option_name = %s", $option_name );
656
- $result = $wpdb->get_row( $sql, ARRAY_A );
657
 
658
  $value = $result && isset( $result['option_value'] ) ? $result['option_value'] : $default_value;
659
 
392
  return null;
393
  }
394
 
395
+ $result = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$this->sliders} WHERE ID = %d", (int) $slider_id ), ARRAY_A );
 
396
 
397
  return $this->maybe_unserialize_fields($result);
398
  }
496
  $order = strtolower( $args['order'] ) === 'desc' ? 'DESC' : 'ASC';
497
  $orderby_clause = $args['orderby'] .' '. $order;
498
 
499
+ $orderby_clause = sanitize_sql_orderby( $orderby_clause );
500
 
501
  $sql = "
502
  SELECT *
507
  $offset
508
  ";
509
 
510
+ return $wpdb->get_results( $wpdb->prepare( $sql ), ARRAY_A );
511
  }
512
 
513
 
610
  );
611
 
612
  // check if key already exist in master slider options table
 
613
  // skip adding option if option added to options table before
614
+ if( $result = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$this->options} WHERE option_name = %s", $option_name ), ARRAY_A ) ){
615
  return false;
616
+ }
617
 
618
  // An array of formats to be mapped to each of the value in $data
619
  $format = array('%s', '%s');
651
  // query the value if value is not available in cache
652
  if( false === $value ) {
653
 
654
+ $result = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$this->options} WHERE option_name = %s", $option_name ), ARRAY_A );
 
655
 
656
  $value = $result && isset( $result['option_value'] ) ? $result['option_value'] : $default_value;
657
 
includes/init/define.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined('ABSPATH') ) {
5
  die();
6
  }
7
 
8
- define( 'MSWP_AVERTA_VERSION' , '3.7.1' );
9
 
10
  define( 'MSWP_SLUG' , 'master-slider' );
11
  define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
5
  die();
6
  }
7
 
8
+ define( 'MSWP_AVERTA_VERSION' , '3.7.5' );
9
 
10
  define( 'MSWP_SLUG' , 'master-slider' );
11
  define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
master-slider.php CHANGED
@@ -11,7 +11,7 @@
11
  * Plugin Name: Master Slider
12
  * Plugin URI: https://wordpress.org/plugins/master-slider/
13
  * Description: Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.
14
- * Version: 3.7.1
15
  * Author: averta
16
  * Author URI: http://averta.net
17
  * Text Domain: master-slider
11
  * Plugin Name: Master Slider
12
  * Plugin URI: https://wordpress.org/plugins/master-slider/
13
  * Description: Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.
14
+ * Version: 3.7.5
15
  * Author: averta
16
  * Author URI: http://averta.net
17
  * Text Domain: master-slider