Master Slider – Responsive Touch Slider - Version 3.1.0

Version Description

Download this release

Release Info

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

Code changes from version 3.0.2 to 3.1.0

README.txt CHANGED
@@ -4,9 +4,9 @@ Donate link: http://averta.net/
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: banner rotator, carousel, content slider, gallery, image slider, responsive slider, showcase, slideshow, swipe, touch slider, video gallery, SEO, vertical slide, HTML5 slider, hardware accelerate, best slider, animation, mobile slider, iOS, android, video slider, youtube slider, horizontal slider, vertical slider, fullwidth slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery
7
- Requires at least: 4.5
8
- Tested up to: 4.8.1
9
- Stable tag: 3.0.2
10
 
11
  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.
12
 
@@ -236,7 +236,10 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
236
 
237
  == Changelog ==
238
 
239
- = 3.0.0 =
 
 
 
240
 
241
  = Version 3.0.2 / (12.07.2017) =
242
  - [Improvement]: Some minor bugs fixed.
@@ -441,5 +444,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
441
 
442
  == Upgrade Notice ==
443
 
444
- = Version 3.0.2 / (12.07.2017) =
445
- - [Improvement]: Some minor bugs fixed.
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: banner rotator, carousel, content slider, gallery, image slider, responsive slider, showcase, slideshow, swipe, touch slider, video gallery, SEO, vertical slide, HTML5 slider, hardware accelerate, best slider, animation, mobile slider, iOS, android, video slider, youtube slider, horizontal slider, vertical slider, fullwidth slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery
7
+ Requires at least: 4.6
8
+ Tested up to: 4.8.0
9
+ Stable tag: 3.1.0
10
 
11
  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.
12
 
236
 
237
  == Changelog ==
238
 
239
+ = 3.1.0 =
240
+
241
+ = Version 3.1.0/ (16.08.2017) =
242
+ - [Improvement]: Performance improvement and bug fix.
243
 
244
  = Version 3.0.2 / (12.07.2017) =
245
  - [Improvement]: Some minor bugs fixed.
444
 
445
  == Upgrade Notice ==
446
 
447
+ = Version 3.1.0/ (16.08.2017) =
448
+ - [Improvement]: Performance improvement and bug fix.
admin/assets/css/msp-general.css CHANGED
@@ -213,9 +213,18 @@ msp-ac-btn:active {
213
  padding-top: 6px;
214
  }
215
 
216
- @media only screen and (max-width: 1500px) {
217
- .msp-template-caption { min-height:40px; }
218
- }
 
 
 
 
 
 
 
 
 
219
 
220
  @media only screen and (max-width: 1530px) {
221
  .column-date_created { display:none; }
@@ -314,7 +323,7 @@ tbody .latest-updates {
314
  #msp-slider-type-select .msp-template-figure.is-unavailable {
315
  opacity: 0.8;
316
  }
317
- #msp-slider-type-select .msp-template-figure[data-starter-section="masterslider_pro_custom_samples1"].is-unavailable .msp-templte-selected {
318
  background: url(../images/thirdparty/premium.png) no-repeat;
319
  display: block;
320
  height: 57px;
@@ -330,15 +339,18 @@ tbody .latest-updates {
330
  float: left;
331
  padding: 10px 1px;
332
  position: absolute;
333
- bottom: 68px;
334
  transition: all 0.6s;
335
  box-sizing: border-box;
336
- margin-left: 1px;
337
  }
338
- #msp-slider-type-select .msp-template-figure[data-starter-section="masterslider_pro_custom_samples1"].is-unavailable:hover .msp-template-info {
339
  visibility: visible;
340
  opacity: 1;
341
  }
 
 
 
342
  #msp-slider-type-select .msp-template-figure .msp-template-info a {
343
  color: #ffffff;
344
  text-align: center;
@@ -418,7 +430,7 @@ tbody .latest-updates {
418
  font-size: 11px;
419
  }
420
  #msp-slider-type-select .msp-template-figure .msp-template-info img {
421
- width: 14px;
422
  }
423
  }
424
  @media only screen and (max-width: 1200px) {
@@ -753,3 +765,40 @@ tbody .latest-updates {
753
  .master-list .msp-logo .msp-phlox-badge img {
754
  margin:0;
755
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  padding-top: 6px;
214
  }
215
 
216
+ .msp-templates-list,
217
+ .msp-templates-list *{
218
+ box-sizing: border-box;
219
+ }
220
+
221
+ .msp-templates-list .msp-template-caption {
222
+ padding: 14px 7px;
223
+
224
+ text-overflow: ellipsis;
225
+ white-space: nowrap;
226
+ overflow: hidden;
227
+ }
228
 
229
  @media only screen and (max-width: 1530px) {
230
  .column-date_created { display:none; }
323
  #msp-slider-type-select .msp-template-figure.is-unavailable {
324
  opacity: 0.8;
325
  }
326
+ #msp-slider-type-select .msp-template-figure.is-unavailable .msp-templte-selected {
327
  background: url(../images/thirdparty/premium.png) no-repeat;
328
  display: block;
329
  height: 57px;
339
  float: left;
340
  padding: 10px 1px;
341
  position: absolute;
342
+ bottom: 48px;
343
  transition: all 0.6s;
344
  box-sizing: border-box;
345
+ margin-left: 0;
346
  }
347
+ #msp-slider-type-select .msp-template-figure.is-unavailable:hover .msp-template-info {
348
  visibility: visible;
349
  opacity: 1;
350
  }
351
+ #msp-slider-type-select .msp-template-figure .msp-template-info a:hover {
352
+ text-decoration: underline;
353
+ }
354
  #msp-slider-type-select .msp-template-figure .msp-template-info a {
355
  color: #ffffff;
356
  text-align: center;
430
  font-size: 11px;
431
  }
432
  #msp-slider-type-select .msp-template-figure .msp-template-info img {
433
+ width: 25px;
434
  }
435
  }
436
  @media only screen and (max-width: 1200px) {
765
  .master-list .msp-logo .msp-phlox-badge img {
766
  margin:0;
767
  }
768
+
769
+ /* The pro sample sliders activation title */
770
+
771
+ .msp-dialog-inner-title.msp-type-masterslider_pro_custom_samples1 > div{
772
+ padding: 12px 25px 10px;
773
+ border-top: 1px solid #eee;
774
+ border-bottom: 1px solid #eee;
775
+ background: #f1f1f1 url( ../images/misc/prebuilt-sliders-banner.png ) right center no-repeat;
776
+ }
777
+
778
+ .msp-type-masterslider_pro_custom_samples1 h4,
779
+ .msp-type-masterslider_pro_custom_samples1 p{
780
+ margin-top:0;
781
+ }
782
+
783
+ .msp-type-masterslider_pro_custom_samples1 h4{
784
+ margin-bottom:5px;
785
+ }
786
+
787
+ .msp-type-masterslider_pro_custom_samples1 p{
788
+ margin-bottom:10px;
789
+ }
790
+
791
+ .msp-type-masterslider_pro_custom_samples1 a{
792
+ font-size: 12px;
793
+ padding-right: 30px;
794
+ padding-left: 30px;
795
+ font-weight: 500;
796
+ }
797
+
798
+ .msp-type-masterslider_pro_custom_samples1 a:hover{
799
+ border-bottom-width: 3px;
800
+ }
801
+
802
+ .msp-type-masterslider_pro_custom_samples1 .msp-ac-btn:focus{
803
+ color: #fff;
804
+ }
admin/assets/images/misc/prebuilt-sliders-banner.png ADDED
Binary file
admin/includes/msp-hooks.php CHANGED
@@ -70,7 +70,7 @@ function msp_request_remote_sample_sliders( $force_to_fetch = false ) {
70
  return $result;
71
  }
72
 
73
- $response = wp_remote_post( 'http://demo.averta.net/themes/lotus/dummy-agency/api/' ,
74
  array(
75
  'body' => $request_body,
76
  'timeout' => 30
@@ -134,7 +134,9 @@ function msp_premium_sliders( $demos ) {
134
  foreach ( $online_demos as $demo ) {
135
  if ( 'custom' == $demo['slidertype'] ) {
136
  $demos['masterslider_pro_custom_samples1'][] = $demo;
137
- } elseif( 'post' == $demo['slidertype'] ) {
 
 
138
  $demos['masterslider_pro_post_samples1'][] = $demo;
139
  }
140
  }
@@ -143,3 +145,38 @@ function msp_premium_sliders( $demos ) {
143
  return $demos;
144
  }
145
  add_filter( 'masterslider_starter_fields', 'msp_premium_sliders' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  return $result;
71
  }
72
 
73
+ $response = wp_remote_get( 'http://api.averta.net/products/masterslider/samples/' ,
74
  array(
75
  'body' => $request_body,
76
  'timeout' => 30
134
  foreach ( $online_demos as $demo ) {
135
  if ( 'custom' == $demo['slidertype'] ) {
136
  $demos['masterslider_pro_custom_samples1'][] = $demo;
137
+ } elseif( in_array( $demo['slidertype'], array( 'post', 'wc-product', 'flickr' ) ) ) {
138
+ $demos['masterslider_dynamic_group'][] = $demo;
139
+ } else {
140
  $demos['masterslider_pro_post_samples1'][] = $demo;
141
  }
142
  }
145
  return $demos;
146
  }
147
  add_filter( 'masterslider_starter_fields', 'msp_premium_sliders' );
148
+
149
+
150
+ /**
151
+ * Expires/Flushes all sliders cache after publishing new post
152
+ *
153
+ * @param int $post_id Post ID
154
+ * @param WP_Post $post Post object.
155
+ * @param bool $update Whether this is an existing post being updated or not.
156
+ */
157
+ function msp_flush_cashe_after_publishing_new_post( $post_id, $post, $update ) {
158
+
159
+ // If the cache is disabled, skip
160
+ $is_cache_enabled = ( 'on' == msp_get_setting( '_enable_cache', 'msp_general_setting', 'off' ) );
161
+ if( ! $is_cache_enabled ){
162
+ return;
163
+ }
164
+
165
+ // If this is just a revision, skip
166
+ if ( wp_is_post_revision( $post_id ) ){
167
+ return;
168
+ }
169
+
170
+ $post_type = get_post_type( $post_id );
171
+
172
+ // If this isn't a know post type, skip
173
+ if ( ! in_array( $post_type, array( 'post', 'page', 'portfolio', 'product', 'news' ) ) ){
174
+ return;
175
+ }
176
+
177
+ // Expires all sliders cache
178
+ msp_flush_all_sliders_cache( array( 'post', 'wc-product' ) );
179
+ }
180
+
181
+ add_action( 'save_post', 'msp_flush_cashe_after_publishing_new_post', 10, 3 );
182
+
admin/includes/msp-sample-sliders.php CHANGED
@@ -4,18 +4,24 @@ function msp_get_slider_starter_sections () {
4
 
5
  $sections = array(
6
  array(
7
- 'id' => 'main_types',
8
  'title' => __( 'Slider Types', 'master-slider' ),
9
  'desc' => ''
10
  ),
11
  array(
12
- 'id' => 'masterslider_samples_group1',
13
  'title' => __( 'Sample Sliders', 'master-slider' ),
14
  'desc' => ''
15
  ),
16
  array(
17
- 'id' => 'masterslider_pro_custom_samples1',
18
- 'title' => sprintf( __( 'Sample Sliders for PRO version %s', 'master-slider' ), '( <a href="http://avt.li/msfunlock" target="_blank">'. __( 'Upgrade to unlock', 'master-slider' ) .'</a> )' ),
 
 
 
 
 
 
19
  'desc' => ''
20
  )
21
  );
4
 
5
  $sections = array(
6
  array(
7
+ 'id' => 'main_types',
8
  'title' => __( 'Slider Types', 'master-slider' ),
9
  'desc' => ''
10
  ),
11
  array(
12
+ 'id' => 'masterslider_samples_group1',
13
  'title' => __( 'Sample Sliders', 'master-slider' ),
14
  'desc' => ''
15
  ),
16
  array(
17
+ 'id' => 'masterslider_pro_custom_samples1',
18
+ 'title' => '',
19
+ 'desc' => '',
20
+ 'content' => '<h4>'. __( 'Starter Templates (Pro version)', MSWP_TEXT_DOMAIN ) .'</h4><p>'. __( 'To kick start with Master Slider ready to use sliders.', MSWP_TEXT_DOMAIN ) .'</p><a href="http://avt.li/msfunlock" class="msp-ac-btn msp-btn-blue" target="_blank">'. __( 'Upgrade to unlock', MSWP_TEXT_DOMAIN ) .'</a>'
21
+ ),
22
+ array(
23
+ 'id' => 'masterslider_dynamic_group',
24
+ 'title' => __( 'Dynamic Sliders', MSWP_TEXT_DOMAIN ),
25
  'desc' => ''
26
  )
27
  );
admin/views/slider-dashboard/list-sliders.php CHANGED
@@ -33,10 +33,14 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
33
 
34
  foreach ( $starter_sections as $starter_section ) {
35
  ?>
36
- <div class="msp-dialog-inner-title ui-helper-clearfix">
37
- <span><?php echo $starter_section['title']; ?></span>
38
- </div>
39
  <?php
 
 
 
 
 
 
40
 
41
  $section_id = $starter_section['id'];
42
  $section_fields = isset( $starter_fields[ $section_id ] ) ? $starter_fields[ $starter_section['id'] ] : array();
@@ -52,13 +56,24 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
52
  data-starter-uid="<?php echo $starter_data['id']; ?>" data-starter-section="<?php echo $section_id; ?>" data-disabled-msg="<?php echo $disabled_msg; ?>" >
53
  <div class="msp-templte-selected"></div>
54
  <img src="<?php echo $starter_data['screenshot']; ?>" />
55
- <?php if ( $is_unavailable && 'wc-product-slider' !== $starter_data['id'] ): ?>
 
 
 
 
 
 
 
 
 
 
 
56
  <div class="msp-template-info">
57
- <a href="<?php echo esc_url( $starter_data['demo_url'] ); ?>" target="_blank"><img src="<?php echo esc_url( MSWP_AVERTA_ADMIN_URL ); ?>/assets/images/thirdparty/preview.png" alt="Preview"><?php _e( 'Preview', MSWP_TEXT_DOMAIN ); ?></a>
58
  <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>
59
  </div>
60
  <?php endif ?>
61
- <div class="msp-template-caption"><?php echo $starter_data['label']; ?><span></span></div>
62
  </div>
63
  <?php
64
 
33
 
34
  foreach ( $starter_sections as $starter_section ) {
35
  ?>
36
+ <div class="msp-dialog-inner-title ui-helper-clearfix msp-type-<? echo esc_attr( $starter_section['id'] ); ?>">
 
 
37
  <?php
38
+ if( ! empty( $starter_section['title'] ) ) {
39
+ echo '<span>' . $starter_section['title'] . '</span>';
40
+ } elseif( ! empty( $starter_section['content'] ) ) {
41
+ echo '<div>' . $starter_section['content'] . '</div>';
42
+ }
43
+ echo "</div>";
44
 
45
  $section_id = $starter_section['id'];
46
  $section_fields = isset( $starter_fields[ $section_id ] ) ? $starter_fields[ $starter_section['id'] ] : array();
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(
62
+ 'utm_source' => 'usersite',
63
+ 'utm_medium' => 'lite',
64
+ 'v' => MSWP_AVERTA_VERSION,
65
+ 'utm_content' => 'samplepreview',
66
+ 'utm_campaign'=> 'masterslider'
67
+ ),
68
+ $starter_data['demo_url']
69
+ );
70
+ ?>
71
  <div class="msp-template-info">
72
+ <a href="<?php echo esc_url( $demo_url ); ?>" target="_blank"><img src="<?php echo esc_url( MSWP_AVERTA_ADMIN_URL ); ?>/assets/images/thirdparty/preview.png" alt="Preview"><?php _e( 'Preview', MSWP_TEXT_DOMAIN ); ?></a>
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
 
admin/views/slider-panel/css/msp-style.css CHANGED
@@ -2060,7 +2060,7 @@ button.msp-savepreset {
2060
  .msp-templte-selected {
2061
  position: absolute;
2062
  top: 0;
2063
- right: -1px;
2064
  width: 22px;
2065
  height: 22px;
2066
  background: url(../images/ui-spritesheet.png) -194px -146px no-repeat #2EA2CC;
2060
  .msp-templte-selected {
2061
  position: absolute;
2062
  top: 0;
2063
+ right: 0;
2064
  width: 22px;
2065
  height: 22px;
2066
  background: url(../images/ui-spritesheet.png) -194px -146px no-repeat #2EA2CC;
includes/init/define.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined('ABSPATH') ) {
5
  die();
6
  }
7
 
8
- define( 'MSWP_AVERTA_VERSION' , '3.0.2' );
9
 
10
  define( 'MSWP_SLUG' , 'master-slider' );
11
  define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
5
  die();
6
  }
7
 
8
+ define( 'MSWP_AVERTA_VERSION' , '3.1.0' );
9
 
10
  define( 'MSWP_SLUG' , 'master-slider' );
11
  define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
includes/msp-functions.php CHANGED
@@ -138,22 +138,37 @@ function msp_flush_slider_cache( $slider_id ){
138
  /**
139
  * Flush and re-cache all slideres if slider cache is enabled
140
  *
 
 
141
  * @return bool True if the cache is flushed and false otherwise
142
  */
143
- function msp_flush_all_sliders_cache(){
144
 
145
  $is_cache_enabled = ( 'on' == msp_get_setting( '_enable_cache', 'msp_general_setting', 'off' ) );
146
  if( ! $is_cache_enabled ){ return false; }
147
 
148
- $all_sliders = get_masterslider_names();
149
- foreach ( $all_sliders as $slider_id => $slider_name ) {
150
- msp_generate_slider_output( $slider_id, true );
 
 
151
  }
152
 
153
  return true;
154
  }
155
 
156
 
 
 
 
 
 
 
 
 
 
 
 
157
  /**
158
  * Takes a slider ID and returns slider's parsed data in an array
159
  * You can use this function to access slider data (setting, slides, layers, styles)
138
  /**
139
  * Flush and re-cache all slideres if slider cache is enabled
140
  *
141
+ * @param int $slider_type The list of slider types that you intent to flush. Empty means flush all sliders types.
142
+ *
143
  * @return bool True if the cache is flushed and false otherwise
144
  */
145
+ function msp_flush_all_sliders_cache( $slider_types = array() ){
146
 
147
  $is_cache_enabled = ( 'on' == msp_get_setting( '_enable_cache', 'msp_general_setting', 'off' ) );
148
  if( ! $is_cache_enabled ){ return false; }
149
 
150
+ $all_sliders = get_mastersliders();
151
+ foreach ( $all_sliders as $slider_info ) {
152
+ if( empty( $slider_types ) || ( ! empty( $slider_info['type'] ) && in_array( $slider_info['type'] , $slider_types ) ) ){
153
+ msp_delete_slider_transient( $slider_info['ID'] );
154
+ }
155
  }
156
 
157
  return true;
158
  }
159
 
160
 
161
+ /**
162
+ * Remove the value of a slider output transient.
163
+ *
164
+ * @param int $slider_id The slider id
165
+ * @return mixed true if successful, false otherwise
166
+ */
167
+ function msp_delete_slider_transient( $slider_id ) {
168
+ return delete_transient( 'masterslider_output_' . $slider_id );
169
+ }
170
+
171
+
172
  /**
173
  * Takes a slider ID and returns slider's parsed data in an array
174
  * You can use this function to access slider data (setting, slides, layers, styles)
master-slider.php CHANGED
@@ -11,13 +11,13 @@
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.0.2
15
  * Author: averta
16
  * Author URI: http://averta.net
17
  * Text Domain: master-slider
18
  * License URI: license.txt
19
  * Domain Path: /languages
20
- * Tested up to: 4.7.3
21
  */
22
 
23
  // If this file is called directly, abort.
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.1.0
15
  * Author: averta
16
  * Author URI: http://averta.net
17
  * Text Domain: master-slider
18
  * License URI: license.txt
19
  * Domain Path: /languages
20
+ * Tested up to: 4.8.0
21
  */
22
 
23
  // If this file is called directly, abort.