Master Slider – Responsive Touch Slider - Version 3.7.6

Version Description

Download this release

Release Info

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

Code changes from version 3.7.5 to 3.7.6

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.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
 
7
  Requires PHP: 5.4
8
  Requires at least: 5.0
9
  Tested up to: 5.7.0
10
+ Stable tag: 3.7.6
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
 
admin/class-master-slider-admin.php CHANGED
@@ -88,9 +88,6 @@ class Master_Slider_Admin {
88
  // Load admin Stylesheet and JavaScript.
89
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts') );
90
 
91
- // Add some essential content in admin page header
92
- add_action( 'admin_head', array( $this, 'admin_header' ), 9 );
93
-
94
  // Add the options page and menu item.
95
  add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
96
 
@@ -176,6 +173,16 @@ class Master_Slider_Admin {
176
  $screen = get_current_screen();
177
  if ( $this->sliders_screen_hook_suffix == $screen->id ) {
178
  $admin_assets->enqueue_panel_assets();
 
 
 
 
 
 
 
 
 
 
179
  }
180
 
181
  if ( MSWP_SLUG . '_page_' . MSWP_SLUG . '-setting' == $screen->id ) {
@@ -185,35 +192,6 @@ class Master_Slider_Admin {
185
  }
186
 
187
 
188
- /**
189
- * Print essential content in admin page header
190
- *
191
- * @since 1.0.0
192
- *
193
- * @return void
194
- */
195
- public function admin_header() {
196
-
197
- if ( ! isset( $this->sliders_screen_hook_suffix ) ) {
198
- return;
199
- }
200
-
201
- $screen = get_current_screen();
202
- if ( $this->sliders_screen_hook_suffix == $screen->id ) {
203
-
204
- if ( isset( $_REQUEST['slider_id'] ) ) {
205
-
206
- $slider_id = $_REQUEST['slider_id'];
207
- global $mspdb;
208
- $custom_fonts = $mspdb->get_slider_field_val( $slider_id, 'custom_fonts' );
209
-
210
- if ( ! empty( $custom_fonts ) )
211
- printf( "<link rel='stylesheet' id='masterslider-admin-fonts' href='http://fonts.googleapis.com/css?family=%s' type='text/css' />\n", $custom_fonts );
212
- }
213
- }
214
- }
215
-
216
-
217
  /**
218
  * Register the administration menu for this plugin into the WordPress Dashboard menu.
219
  *
88
  // Load admin Stylesheet and JavaScript.
89
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts') );
90
 
 
 
 
91
  // Add the options page and menu item.
92
  add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
93
 
173
  $screen = get_current_screen();
174
  if ( $this->sliders_screen_hook_suffix == $screen->id ) {
175
  $admin_assets->enqueue_panel_assets();
176
+
177
+ if ( isset( $_REQUEST['slider_id'] ) && is_numeric( $_REQUEST['slider_id'] ) ) {
178
+
179
+ $slider_id = sanitize_text_field( $_REQUEST['slider_id'] );
180
+ global $mspdb;
181
+ $custom_fonts = $mspdb->get_slider_field_val( $slider_id, 'custom_fonts' );
182
+
183
+ if ( ! empty( $custom_fonts ) )
184
+ wp_enqueue_style( 'master-slider-admin-fonts', 'http://fonts.googleapis.com/css?family=' . $custom_fonts, [], false, 'all' );
185
+ }
186
  }
187
 
188
  if ( MSWP_SLUG . '_page_' . MSWP_SLUG . '-setting' == $screen->id ) {
192
  }
193
 
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  /**
196
  * Register the administration menu for this plugin into the WordPress Dashboard menu.
197
  *
admin/includes/classes/class-axiom-list-table.php CHANGED
@@ -208,8 +208,8 @@ class Axiom_List_Table {
208
  echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
209
  ?>
210
  <p class="search-box">
211
- <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
212
- <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
213
  <?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
214
  </p>
215
  <?php
@@ -252,9 +252,14 @@ class Axiom_List_Table {
252
  return;
253
 
254
  echo "<ul class='subsubsub'>\n";
 
255
  foreach ( $views as $class => $view ) {
256
- $views[ $class ] = "\t<li class='$class'>$view";
 
 
 
257
  }
 
258
  echo implode( " |</li>\n", $views ) . "</li>\n";
259
  echo "</ul>";
260
  }
@@ -698,7 +703,7 @@ class Axiom_List_Table {
698
  $current_url = remove_query_arg( 'paged', $current_url );
699
 
700
  if ( isset( $_GET['orderby'] ) )
701
- $current_orderby = $_GET['orderby'];
702
  else
703
  $current_orderby = '';
704
 
208
  echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
209
  ?>
210
  <p class="search-box">
211
+ <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ) ?>"><?php echo esc_html( $text ); ?>:</label>
212
+ <input type="search" id="<?php echo esc_attr( $input_id ) ?>" name="s" value="<?php _admin_search_query(); ?>" />
213
  <?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
214
  </p>
215
  <?php
252
  return;
253
 
254
  echo "<ul class='subsubsub'>\n";
255
+
256
  foreach ( $views as $class => $view ) {
257
+ $scaped_class = esc_attr( $class );
258
+ $scaped_view = esc_attr( $view );
259
+
260
+ $views[ $class ] = "\t<li class='$scaped_class'>$scaped_view";
261
  }
262
+
263
  echo implode( " |</li>\n", $views ) . "</li>\n";
264
  echo "</ul>";
265
  }
703
  $current_url = remove_query_arg( 'paged', $current_url );
704
 
705
  if ( isset( $_GET['orderby'] ) )
706
+ $current_orderby = sanitize_sql_orderby( $_GET['orderby'] );
707
  else
708
  $current_orderby = '';
709
 
admin/includes/classes/class-msp-admin-ajax.php CHANGED
@@ -24,7 +24,7 @@ class MSP_Admin_Ajax {
24
  wp_send_json_error( array( 'message' => __( 'Authorization failed! Notice cannot be closed.', 'master-slider' ) ) );
25
  }
26
 
27
- $notice_id = ! empty( $_POST['_id'] ) ? $_POST['_id'] : '';
28
 
29
  if ( empty( $notice_id ) ) {
30
  wp_send_json_error( array( 'message' => __( 'Notice cannot be closed. Notice ID is required ..', 'master-slider' ) ) );
@@ -68,18 +68,18 @@ class MSP_Admin_Ajax {
68
  /////////////////////////////////////////////////////////////////////////////////////////
69
 
70
  // Get the slider id
71
- $slider_id = isset( $_REQUEST['slider_id'] ) ? $_REQUEST['slider_id'] : '';
72
 
73
- if ( empty( $slider_id ) ) {
74
  echo json_encode( array( 'success' => false, 'type' => 'save' , 'message' => __( "Slider id is not defined.", 'master-slider' ) ) );
75
  exit;
76
  }
77
 
78
  // get the slider type
79
- $slider_type = isset( $_REQUEST['slider_type'] ) ? $_REQUEST['slider_type'] : 'custom';
80
 
81
  // get panel data
82
- $msp_data = isset( $_REQUEST['msp_data'] ) ? $_REQUEST['msp_data'] : NULL;
83
 
84
 
85
  // get parse and database tools
@@ -155,7 +155,7 @@ class MSP_Admin_Ajax {
155
  /////////////////////////////////////////////////////////////////////////////////////////
156
 
157
  // Get the slider id
158
- $slider_type = isset( $_REQUEST['slider_type'] ) ? $_REQUEST['slider_type'] : '';
159
 
160
 
161
  // Get new slider id
24
  wp_send_json_error( array( 'message' => __( 'Authorization failed! Notice cannot be closed.', 'master-slider' ) ) );
25
  }
26
 
27
+ $notice_id = ! empty( $_POST['_id'] ) ? sanitize_text_field( $_POST['_id'] ) : '';
28
 
29
  if ( empty( $notice_id ) ) {
30
  wp_send_json_error( array( 'message' => __( 'Notice cannot be closed. Notice ID is required ..', 'master-slider' ) ) );
68
  /////////////////////////////////////////////////////////////////////////////////////////
69
 
70
  // Get the slider id
71
+ $slider_id = isset( $_REQUEST['slider_id'] ) ? sanitize_text_field( $_REQUEST['slider_id'] ) : '';
72
 
73
+ if ( empty( $slider_id ) || ! is_numeric( $slider_id ) ) {
74
  echo json_encode( array( 'success' => false, 'type' => 'save' , 'message' => __( "Slider id is not defined.", 'master-slider' ) ) );
75
  exit;
76
  }
77
 
78
  // get the slider type
79
+ $slider_type = isset( $_REQUEST['slider_type'] ) ? sanitize_key( $_REQUEST['slider_type'] ) : 'custom';
80
 
81
  // get panel data
82
+ $msp_data = isset( $_REQUEST['msp_data'] ) ? $_REQUEST['msp_data'] : NULL;
83
 
84
 
85
  // get parse and database tools
155
  /////////////////////////////////////////////////////////////////////////////////////////
156
 
157
  // Get the slider id
158
+ $slider_type = isset( $_REQUEST['slider_type'] ) ? sanitize_key( $_REQUEST['slider_type'] ) : '';
159
 
160
 
161
  // Get new slider id
admin/includes/classes/class-msp-importer.php CHANGED
@@ -166,7 +166,7 @@ class MSP_Importer {
166
 
167
  <input type="hidden" name="msp-import" value="1">
168
 
169
- <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
170
 
171
  <input type="file" name="msp-import-file" class="msp-select-file">
172
 
@@ -197,7 +197,7 @@ class MSP_Importer {
197
 
198
  if ( $_FILES['msp-import-file']['error'] == UPLOAD_ERR_OK && is_uploaded_file( $_FILES['msp-import-file']['tmp_name'] ) ) {
199
  // get import file content
200
- $import_data = file_get_contents( $_FILES['msp-import-file']['tmp_name'] );
201
  $this->import_data( $import_data );
202
  }
203
 
@@ -214,7 +214,7 @@ class MSP_Importer {
214
 
215
  if( current_user_can('export_masterslider') || apply_filters( 'masterslider_user_can_import_starter_content', 0 ) ) {
216
 
217
- if ( $starter_field = msp_get_slider_starter_field( $_REQUEST['starter_id'] ) ) {
218
 
219
  if ( isset( $starter_field['importdata'] ) && ! empty( $starter_field['importdata'] ) ) {
220
 
@@ -248,7 +248,7 @@ class MSP_Importer {
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 );
166
 
167
  <input type="hidden" name="msp-import" value="1">
168
 
169
+ <input type="hidden" name="max_file_size" value="<?php echo esc_attr( $bytes ); ?>" />
170
 
171
  <input type="file" name="msp-import-file" class="msp-select-file">
172
 
197
 
198
  if ( $_FILES['msp-import-file']['error'] == UPLOAD_ERR_OK && is_uploaded_file( $_FILES['msp-import-file']['tmp_name'] ) ) {
199
  // get import file content
200
+ $import_data = file_get_contents( sanitize_file_name( $_FILES['msp-import-file']['tmp_name'] ) );
201
  $this->import_data( $import_data );
202
  }
203
 
214
 
215
  if( current_user_can('export_masterslider') || apply_filters( 'masterslider_user_can_import_starter_content', 0 ) ) {
216
 
217
+ if ( $starter_field = msp_get_slider_starter_field( sanitize_text_field( $_REQUEST['starter_id'] ) ) ) {
218
 
219
  if ( isset( $starter_field['importdata'] ) && ! empty( $starter_field['importdata'] ) ) {
220
 
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 );
admin/includes/classes/class-msp-list-table.php CHANGED
@@ -48,7 +48,7 @@ class MSP_List_Table extends Axiom_List_Table {
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
  )
@@ -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' => esc_html( $_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' => esc_html( $_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' => esc_html( $_GET['page'] ),
106
  'action' => 'preview',
107
  'slider_id' => $item['ID']
108
  )
@@ -204,7 +204,7 @@ class MSP_List_Table extends Axiom_List_Table {
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'] ) . "%%'" : '';
48
  '<a href="%s">%s</a>',
49
  esc_url( add_query_arg(
50
  array(
51
+ 'page' => sanitize_text_field( $_GET['page'] ),
52
  'action' => 'edit',
53
  'slider_id' => $item['ID' ]
54
  )
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' => sanitize_text_field( $_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' => sanitize_text_field( $_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' => sanitize_text_field( $_GET['page'] ),
106
  'action' => 'preview',
107
  'slider_id' => $item['ID']
108
  )
204
  global $mspdb;
205
 
206
  $offset = ( (int)$paged - 1 ) * $perpage;
207
+ $orderby = isset( $_REQUEST['orderby'] ) ? sanitize_sql_orderby( $_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'] ) . "%%'" : '';
admin/views/index.php CHANGED
@@ -10,9 +10,9 @@
10
  */
11
 
12
  $msp_nonce = wp_create_nonce( 'msp_panel' );
13
- $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
14
- $slider_id = isset( $_REQUEST['slider_id'] ) ? $_REQUEST['slider_id'] : '';
15
- $do = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
16
 
17
 
18
  function msp_thankyou_footer() {
@@ -32,7 +32,7 @@ add_filter( 'admin_footer_text', 'msp_thankyou_footer' );
32
 
33
  ?>
34
 
35
- <div id="msp-main-wrapper" class="wrap" data-nonce="<?php echo $msp_nonce; ?>" >
36
 
37
  <?php
38
 
10
  */
11
 
12
  $msp_nonce = wp_create_nonce( 'msp_panel' );
13
+ $action = isset( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
14
+ $slider_id = isset( $_REQUEST['slider_id'] ) ? sanitize_text_field( $_REQUEST['slider_id'] ) : '';
15
+ $do = isset( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
16
 
17
 
18
  function msp_thankyou_footer() {
32
 
33
  ?>
34
 
35
+ <div id="msp-main-wrapper" class="wrap" data-nonce="<?php echo esc_attr( $msp_nonce ); ?>" >
36
 
37
  <?php
38
 
admin/views/setting/class-settings-api.php CHANGED
@@ -456,7 +456,7 @@ class WeDevs_Settings_API {
456
  function show_forms() {
457
 
458
  foreach ( $this->settings_sections as $form ) { ?>
459
- <div id="<?php echo $form['id']; ?>" class="group">
460
  <form method="post" action="options.php">
461
 
462
  <?php do_action( 'wsa_form_top_' . $form['id'], $form ); ?>
456
  function show_forms() {
457
 
458
  foreach ( $this->settings_sections as $form ) { ?>
459
+ <div id="<?php echo esc_attr( $form['id'] ); ?>" class="group">
460
  <form method="post" action="options.php">
461
 
462
  <?php do_action( 'wsa_form_top_' . $form['id'], $form ); ?>
admin/views/slider-dashboard/list-sliders.php CHANGED
@@ -52,10 +52,10 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
52
  $disabled_msg = isset( $starter_data['disabled_msg'] ) && ! empty( $starter_data['disabled_msg'] ) ? $starter_data['disabled_msg'] : '';
53
 
54
  ?>
55
- <div class="msp-template-figure <?php echo $selected_attr . $is_unavailable; ?>" data-slider-type="<?php echo $starter_data['slidertype']; ?>"
56
- data-starter-uid="<?php echo $starter_data['id']; ?>" data-starter-section="<?php echo $section_id; ?>" data-disabled-msg="<?php echo $disabled_msg; ?>" >
57
  <div class="msp-templte-selected"></div>
58
- <img src="<?php echo $starter_data['screenshot']; ?>" />
59
  <?php if ( $is_unavailable && 'wc-product-slider' !== $starter_data['id'] ):
60
  $demo_url = add_query_arg(
61
  array(
@@ -73,7 +73,7 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
73
  <a href="<?php echo esc_url( $starter_data['test_drive_url'] ); ?>" target="_blank"><img src="<?php echo esc_url( MSWP_AVERTA_ADMIN_URL ); ?>/assets/images/thirdparty/test-drive.png" alt="Test Drive"><?php _e( 'Test Drive', MSWP_TEXT_DOMAIN ); ?></a>
74
  </div>
75
  <?php endif ?>
76
- <div class="msp-template-caption" title="<?php echo esc_attr( $starter_data['label'] ); ?>"><?php echo $starter_data['label']; ?><span></span></div>
77
  </div>
78
  <?php
79
 
@@ -125,7 +125,7 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
125
  <div class="msp-export-wrapper">
126
  <h4 class="msp-dialog-inner-split-header"><?php _e('Export', 'master-slider' ) ?></h4>
127
 
128
- <form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post" class="msp-export-form msp-dialog-inner-section">
129
 
130
  <div class="msp-export-table-container">
131
 
@@ -153,11 +153,11 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
153
  $human_time = human_time_diff( $orig_time );
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>
52
  $disabled_msg = isset( $starter_data['disabled_msg'] ) && ! empty( $starter_data['disabled_msg'] ) ? $starter_data['disabled_msg'] : '';
53
 
54
  ?>
55
+ <div class="msp-template-figure <?php echo esc_attr( $selected_attr . $is_unavailable ); ?>" data-slider-type="<?php echo esc_attr( $starter_data['slidertype'] ); ?>"
56
+ data-starter-uid="<?php echo esc_attr( $starter_data['id'] ); ?>" data-starter-section="<?php echo esc_attr( $section_id ); ?>" data-disabled-msg="<?php echo esc_attr( $disabled_msg ); ?>" >
57
  <div class="msp-templte-selected"></div>
58
+ <img src="<?php echo esc_attr( $starter_data['screenshot'] ); ?>" />
59
  <?php if ( $is_unavailable && 'wc-product-slider' !== $starter_data['id'] ):
60
  $demo_url = add_query_arg(
61
  array(
73
  <a href="<?php echo esc_url( $starter_data['test_drive_url'] ); ?>" target="_blank"><img src="<?php echo esc_url( MSWP_AVERTA_ADMIN_URL ); ?>/assets/images/thirdparty/test-drive.png" alt="Test Drive"><?php _e( 'Test Drive', MSWP_TEXT_DOMAIN ); ?></a>
74
  </div>
75
  <?php endif ?>
76
+ <div class="msp-template-caption" title="<?php echo esc_attr( $starter_data['label'] ); ?>"><?php echo esc_attr( $starter_data['label'] ); ?><span></span></div>
77
  </div>
78
  <?php
79
 
125
  <div class="msp-export-wrapper">
126
  <h4 class="msp-dialog-inner-split-header"><?php _e('Export', 'master-slider' ) ?></h4>
127
 
128
+ <form action="<?php echo esc_attr( $_SERVER['REQUEST_URI'] ); ?>" method="post" class="msp-export-form msp-dialog-inner-section">
129
 
130
  <div class="msp-export-table-container">
131
 
153
  $human_time = human_time_diff( $orig_time );
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 esc_attr( $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 esc_html( $human_time ); ?></abbr></th>
161
  </tr>
162
  <?php } ?>
163
  </tbody>
admin/views/slider-dashboard/preview.php CHANGED
@@ -7,7 +7,7 @@ echo '<div id="ms-preview-wrapper">';
7
 
8
  if( isset( $_REQUEST['slider_params'] ) && ! empty( $_REQUEST['slider_params'] ) ) {
9
 
10
- $slider_params = $_REQUEST['slider_params'];
11
  $slider_shortcodes = msp_panel_data_2_ms_slider_shortcode( $slider_params );
12
  echo do_shortcode( $slider_shortcodes );
13
 
@@ -18,7 +18,7 @@ if( isset( $_REQUEST['slider_params'] ) && ! empty( $_REQUEST['slider_params'] )
18
  printf( "<!-- Custom slider styles -->\n<style>%s</style>", $slider_custom_css );
19
 
20
  } elseif ( isset( $_REQUEST['slider_id'] ) && ! empty( $_REQUEST['slider_id'] ) ) {
21
- $slider_id = $_REQUEST['slider_id'];
22
  $slider_shortcodes = msp_get_ms_slider_shortcode_by_slider_id( $slider_id );
23
  echo do_shortcode( $slider_shortcodes );
24
  // print slider custom css inline in live preview
@@ -57,12 +57,12 @@ if ( isset( $_REQUEST['strip_wp'] ) ) {
57
  #wpcontent {
58
  margin-left:0;
59
  }
60
- html.wp-toolbar {
61
- padding-top:0;
62
  }
63
- #msp-main-wrapper {
64
- margin:0;
65
- display:block;
66
  }
67
  #ms-preview-wrapper{
68
  width:100%;
@@ -73,6 +73,5 @@ html.wp-toolbar {
73
  padding-left: 0;
74
  }
75
  </style>
76
- <?php
77
  }
78
-
7
 
8
  if( isset( $_REQUEST['slider_params'] ) && ! empty( $_REQUEST['slider_params'] ) ) {
9
 
10
+ $slider_params = sanitize_text_field( $_REQUEST['slider_params'] );
11
  $slider_shortcodes = msp_panel_data_2_ms_slider_shortcode( $slider_params );
12
  echo do_shortcode( $slider_shortcodes );
13
 
18
  printf( "<!-- Custom slider styles -->\n<style>%s</style>", $slider_custom_css );
19
 
20
  } elseif ( isset( $_REQUEST['slider_id'] ) && ! empty( $_REQUEST['slider_id'] ) ) {
21
+ $slider_id = sanitize_text_field( $_REQUEST['slider_id'] );
22
  $slider_shortcodes = msp_get_ms_slider_shortcode_by_slider_id( $slider_id );
23
  echo do_shortcode( $slider_shortcodes );
24
  // print slider custom css inline in live preview
57
  #wpcontent {
58
  margin-left:0;
59
  }
60
+ html.wp-toolbar {
61
+ padding-top:0;
62
  }
63
+ #msp-main-wrapper {
64
+ margin:0;
65
+ display:block;
66
  }
67
  #ms-preview-wrapper{
68
  width:100%;
73
  padding-left: 0;
74
  }
75
  </style>
76
+ <?php
77
  }
 
includes/classes/class-msp-db.php CHANGED
@@ -482,21 +482,19 @@ class MSP_DB {
482
  $offset_num = (int) $args['offset'];
483
 
484
  // remove limit if limit number is set to 0
485
- $limit = ( 1 > $limit_num ) ? '' : 'LIMIT '. $limit_num;
486
 
487
  // remove offect if offset number is set to 0
488
- $offset = ( 0 == $offset_num )? '' : 'OFFSET '. $offset_num;
489
 
490
  // add LIKE if defined
491
- $like = empty( $args['like'] ) ? '' : 'LIKE '. $args['like'];
492
 
493
  $where = empty( $args['where'] ) ? '' : 'WHERE '. $args['where'];
494
 
495
  // sanitize sort type
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,7 +505,7 @@ class MSP_DB {
507
  $offset
508
  ";
509
 
510
- return $wpdb->get_results( $wpdb->prepare( $sql ), ARRAY_A );
511
  }
512
 
513
 
482
  $offset_num = (int) $args['offset'];
483
 
484
  // remove limit if limit number is set to 0
485
+ $limit = ( 1 > $limit_num ) ? '' : 'LIMIT '. esc_sql( $limit_num );
486
 
487
  // remove offect if offset number is set to 0
488
+ $offset = ( 0 == $offset_num )? '' : 'OFFSET '. esc_sql( $offset_num );
489
 
490
  // add LIKE if defined
491
+ $like = empty( $args['like'] ) ? '' : 'LIKE '. esc_sql( $args['like'] );
492
 
493
  $where = empty( $args['where'] ) ? '' : 'WHERE '. $args['where'];
494
 
495
  // sanitize sort type
496
  $order = strtolower( $args['order'] ) === 'desc' ? 'DESC' : 'ASC';
497
+ $orderby_clause = $args['orderby'] .' '. sanitize_sql_orderby( $order );
 
 
498
 
499
  $sql = "
500
  SELECT *
505
  $offset
506
  ";
507
 
508
+ return $wpdb->get_results( $sql, ARRAY_A );
509
  }
510
 
511
 
includes/classes/class-msp-main-widget.php CHANGED
@@ -77,7 +77,7 @@ class MSP_Main_Widget extends MSP_Widget {
77
 
78
  echo $before_widget;
79
 
80
- if ( ! empty( $title ) ) { echo $before_title . $title . $after_title; }
81
 
82
  echo get_masterslider( $instance['id'] );
83
 
77
 
78
  echo $before_widget;
79
 
80
+ if ( ! empty( $title ) ) { echo $before_title . esc_html( $title ) . $after_title; }
81
 
82
  echo get_masterslider( $instance['id'] );
83
 
includes/init/define.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined('ABSPATH') ) {
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' );
5
  die();
6
  }
7
 
8
+ define( 'MSWP_AVERTA_VERSION' , '3.7.6' );
9
 
10
  define( 'MSWP_SLUG' , 'master-slider' );
11
  define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
includes/msp-shortcodes.php CHANGED
@@ -397,12 +397,12 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
397
  ?>
398
 
399
  <!-- MasterSlider -->
400
- <div id="<?php echo $puid; ?>" class="master-slider-parent msl <?php echo trim( $wrapper_classes ); ?>" <?php echo $inline_style; ?> >
401
 
402
  <?php echo $inner_template_container_open_tags; ?>
403
 
404
  <!-- MasterSlider Main -->
405
- <div id="<?php echo $uid; ?>" class="master-slider <?php echo $skin; ?>" >
406
  <?php // generate all ms slide shortcodes ?>
407
  <?php echo do_shortcode($content); ?>
408
 
@@ -608,10 +608,6 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
608
  $instance_name, $facebook_username_prop, $facebook_albumid_prop, $facebook_count, $facebook_thumb_size, $facebook_size, $facebook_type );
609
  }
610
 
611
- if ( ! empty( $gfonts ) ) {
612
- $link_tag = sprintf( "<link rel='stylesheet' id='ms-fonts' href='http://fonts.googleapis.com/css?family=%s' type='text/css' media='all' />", $gfonts );
613
- echo "\n\t\t\t\t" . sprintf( '$("head").append( "%s" );', $link_tag ) . "\n";
614
- }
615
  // add slider instance to global scope
616
  echo "\n\t\t\t\twindow.masterslider_instances = window.masterslider_instances || [];";
617
  echo "\n\t\t\t\twindow.masterslider_instances.push( $instance_name );\n";
@@ -622,7 +618,13 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
622
  </script>
623
 
624
  <?php
625
- return apply_filters( "masterslider_ms_slider_shortcode", ob_get_clean(), $mixed );
 
 
 
 
 
 
626
  }
627
 
628
 
@@ -1104,5 +1106,3 @@ function msp_masterslider_slide_flickr_shortcode( $atts, $content = null ) {
1104
 
1105
  return apply_filters( 'masterslider_slide_flickr_shortcode', "\t\t\t\t".$output, $args );
1106
  }
1107
-
1108
-
397
  ?>
398
 
399
  <!-- MasterSlider -->
400
+ <div id="<?php echo esc_attr( $puid ); ?>" class="master-slider-parent msl <?php echo trim( $wrapper_classes ); ?>" <?php echo $inline_style; ?> >
401
 
402
  <?php echo $inner_template_container_open_tags; ?>
403
 
404
  <!-- MasterSlider Main -->
405
+ <div id="<?php echo esc_attr( $uid ); ?>" class="master-slider <?php echo esc_attr( $skin ); ?>" >
406
  <?php // generate all ms slide shortcodes ?>
407
  <?php echo do_shortcode($content); ?>
408
 
608
  $instance_name, $facebook_username_prop, $facebook_albumid_prop, $facebook_count, $facebook_thumb_size, $facebook_size, $facebook_type );
609
  }
610
 
 
 
 
 
611
  // add slider instance to global scope
612
  echo "\n\t\t\t\twindow.masterslider_instances = window.masterslider_instances || [];";
613
  echo "\n\t\t\t\twindow.masterslider_instances.push( $instance_name );\n";
618
  </script>
619
 
620
  <?php
621
+ if ( ! empty( $gfonts ) ) {
622
+ $response = wp_remote_get( 'http://fonts.googleapis.com/css?family=' . $gfonts );
623
+ if ( !is_wp_error( $response ) ) {
624
+ wp_add_inline_style( 'ms-fonts', $response['body'] );
625
+ }
626
+ }
627
+ return apply_filters( "masterslider_ms_slider_shortcode", ob_get_clean(), $mixed );
628
  }
629
 
630
 
1106
 
1107
  return apply_filters( 'masterslider_slide_flickr_shortcode', "\t\t\t\t".$output, $args );
1108
  }
 
 
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.5
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.6
15
  * Author: averta
16
  * Author URI: http://averta.net
17
  * Text Domain: master-slider