Master Slider – Responsive Touch Slider - Version 3.4.5

Version Description

Download this release

Release Info

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

Code changes from version 3.4.1 to 3.4.5

README.txt CHANGED
@@ -6,8 +6,8 @@ License URI: http://www.gnu.org/licenses/gpl.html
6
  Tags: slider, image slider, wordpress slider, video slider, best slider plugin, slideshow, swipe, touch slider, content slider, SEO, vertical slider, HTML5 slider, hardware accelerate, animation, mobile slider, iOS, android, youtube slider, horizontal slider, responsive slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery, lightweight slider
7
  Requires PHP: 5.3
8
  Requires at least: 4.6
9
- Tested up to: 4.9.2
10
- Stable tag: 3.4.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,7 +237,14 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
237
 
238
  == Changelog ==
239
 
240
- = 3.4.1 =
 
 
 
 
 
 
 
241
 
242
  = Version 3.4.1/ (17.12.2017) =
243
  - [Fix]: Improvement in wp transient API while object cache is enabled on some web hosts.
@@ -454,5 +461,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
454
 
455
  == Upgrade Notice ==
456
 
457
- = Version 3.4.1/ (17.12.2017) =
458
- - [Fix]: Improvement in wp transient API while object cache is enabled on some web hosts.
6
  Tags: slider, image slider, wordpress slider, video slider, best slider plugin, slideshow, swipe, touch slider, content slider, SEO, vertical slider, HTML5 slider, hardware accelerate, animation, mobile slider, iOS, android, youtube slider, horizontal slider, responsive slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery, lightweight slider
7
  Requires PHP: 5.3
8
  Requires at least: 4.6
9
+ Tested up to: 5.0.0
10
+ Stable tag: 3.4.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.4.5 =
241
+
242
+ = Version 3.4.5/ (29.04.2018) =
243
+ - [Fix]: An issue with accessing the sample sliders panel fixed.
244
+
245
+ = Version 3.4.4/ (18.04.2018) =
246
+ - [Fix]: An issue with dynamic tags in tab control fixed.
247
+ - [Improvement]: Bug fix and performance improvement.
248
 
249
  = Version 3.4.1/ (17.12.2017) =
250
  - [Fix]: Improvement in wp transient API while object cache is enabled on some web hosts.
461
 
462
  == Upgrade Notice ==
463
 
464
+ = Version 3.4.5/ (29.04.2018) =
465
+ - [Fix]: An issue with accessing the sample sliders panel fixed.
admin/assets/css/global.css CHANGED
@@ -18,4 +18,28 @@
18
  }
19
  /** visual composer element **/
20
  .icon-vc-msslider-el ,
21
- .wpb_masterslider_pb .wpb_element_wrapper { background-image: url( ../images/thirdparty/master-slider-32x32.png ) !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  }
19
  /** visual composer element **/
20
  .icon-vc-msslider-el ,
21
+ .wpb_masterslider_pb .wpb_element_wrapper { background-image: url( ../images/thirdparty/master-slider-32x32.png ) !important; }
22
+
23
+ .msp-banner-wrapper.updated {
24
+ margin-left:0;
25
+ border:none;
26
+ padding:0;
27
+ clear:both;
28
+ position:relative;
29
+ }
30
+ .msp-banner-wrapper.updated > p {
31
+ padding:15px;
32
+ }
33
+ .msp-banner-wrapper .msp-banner-media {
34
+ display:block;
35
+ text-align:center;
36
+ width:100%;
37
+ }
38
+ .msp-banner-wrapper .msp-banner-media > * {
39
+ margin-left:auto;
40
+ margin-right:auto;
41
+ }
42
+ .msp-banner-wrapper.updated .notice-dismiss{
43
+ padding:7px;
44
+ top:7px;
45
+ }
admin/assets/css/msp-general.css CHANGED
@@ -810,3 +810,4 @@ tbody .latest-updates {
810
  .msp-type-masterslider_pro_custom_samples1 .msp-ac-btn:focus{
811
  color: #fff;
812
  }
 
810
  .msp-type-masterslider_pro_custom_samples1 .msp-ac-btn:focus{
811
  color: #fff;
812
  }
813
+
admin/assets/js/admin.js CHANGED
@@ -6,7 +6,7 @@
6
  $(function () {
7
 
8
  var $add_new_slider = $('#msp-add-slider');
9
- if( ! $add_new_slider.length ) return;
10
 
11
 
12
  // get markup for slider types
@@ -27,9 +27,9 @@
27
  $slider_types_markup.dialog('close');
28
  });
29
  },
30
- position: {
31
- my: "center",
32
- at: "center"
33
  }
34
  });
35
 
@@ -60,7 +60,7 @@
60
 
61
  // if the template is disabled and disabled_msg is set, display the text on click
62
  var $slider_types_disabled = $('#msp-slider-type-select .msp-template-figure.is-unavailable');
63
-
64
  $slider_types_disabled.on('click', function(event){
65
  var disabled_alert_text = $(this).data('disabled-msg');
66
  if( disabled_alert_text )
@@ -73,7 +73,7 @@
73
  $create_slider_btn.on('click', function(event){
74
  event.preventDefault();
75
  var $create_btn = $(this);
76
-
77
 
78
  var $selected_item = $('#msp-slider-type-select .msp-template-figure.selected').eq(0);
79
 
@@ -94,7 +94,7 @@
94
  slider_type : slider_type
95
  },
96
  function(res){
97
-
98
  if( res.success === true ){
99
  $create_btn.text( __MSP_GEN_LAN.genl_003 );
100
  window.location.href = res.redirect;
@@ -113,7 +113,7 @@
113
  });
114
 
115
  });
116
-
117
 
118
 
119
  // Live preview
@@ -148,12 +148,12 @@
148
  $preview_wrapper.dialog('close');
149
  });
150
  },
151
- position: {
152
- my: "center",
153
- at: "center"
154
  }
155
  });
156
-
157
  $preview_wrapper.prop( 'src', __MS.msp_plugin_url + '/admin/views/slider-dashboard/get-preview.html?cn=' + Math.random() ).dialog('open');
158
 
159
  window.onbeforeunload = function(){
@@ -170,7 +170,6 @@
170
  };
171
 
172
 
173
-
174
  window.lunchMastersliderPreviewBySliderID = function( slider_id ){
175
 
176
  var $preview_wrapper = $('#msp-slider-preview');
@@ -199,16 +198,16 @@
199
  $preview_wrapper.dialog('close');
200
  });
201
  },
202
- position: {
203
- my: "center",
204
- at: "center"
205
  }
206
  });
207
 
208
  $preview_wrapper.load(function(){
209
  console.log('preview loaded compeletely.');
210
  });
211
-
212
  $preview_wrapper.prop( 'src', __MS.msp_menu_page + '&action=preview&strip_wp&slider_id=' + slider_id ).dialog('open');
213
 
214
  window.onbeforeunload = function(){
@@ -244,16 +243,16 @@
244
  show: 'fade',
245
  dialogClass: 'msp-container msp-dialog msp-import-export-dialog',
246
  close: function( event, ui ) {
247
-
248
  },
249
  open: function(){
250
  $('.ui-widget-overlay').bind('click',function(){
251
  $import_export_wrapper.dialog('close');
252
  });
253
  },
254
- position: {
255
- my: "center",
256
- at: "center"
257
  }
258
  });
259
 
@@ -270,7 +269,6 @@
270
 
271
  // check all btn in export dialog
272
  $('.export-check-all').bind( 'click', function(){
273
-
274
  var $this = $(this);
275
  var isChecked = $this.prop('checked');
276
  $('.msp-export-sliders-table .export-slider-cb').prop( 'checked', isChecked );
@@ -284,14 +282,39 @@
284
  }
285
  });
286
 
287
- // help button position
288
  if( $('#msp-header').length ){
289
  var help_btn_top_offset = $('#msp-header')[0].getBoundingClientRect().top - 6;
290
  $('#contextual-help-link-wrap').css( 'top', help_btn_top_offset );
291
  }
292
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  });
294
-
295
 
296
 
297
- }(jQuery));
 
 
 
6
  $(function () {
7
 
8
  var $add_new_slider = $('#msp-add-slider');
9
+ if( ! $add_new_slider.length ) return;
10
 
11
 
12
  // get markup for slider types
27
  $slider_types_markup.dialog('close');
28
  });
29
  },
30
+ position: {
31
+ my: "center",
32
+ at: "center"
33
  }
34
  });
35
 
60
 
61
  // if the template is disabled and disabled_msg is set, display the text on click
62
  var $slider_types_disabled = $('#msp-slider-type-select .msp-template-figure.is-unavailable');
63
+
64
  $slider_types_disabled.on('click', function(event){
65
  var disabled_alert_text = $(this).data('disabled-msg');
66
  if( disabled_alert_text )
73
  $create_slider_btn.on('click', function(event){
74
  event.preventDefault();
75
  var $create_btn = $(this);
76
+
77
 
78
  var $selected_item = $('#msp-slider-type-select .msp-template-figure.selected').eq(0);
79
 
94
  slider_type : slider_type
95
  },
96
  function(res){
97
+
98
  if( res.success === true ){
99
  $create_btn.text( __MSP_GEN_LAN.genl_003 );
100
  window.location.href = res.redirect;
113
  });
114
 
115
  });
116
+
117
 
118
 
119
  // Live preview
148
  $preview_wrapper.dialog('close');
149
  });
150
  },
151
+ position: {
152
+ my: "center",
153
+ at: "center"
154
  }
155
  });
156
+
157
  $preview_wrapper.prop( 'src', __MS.msp_plugin_url + '/admin/views/slider-dashboard/get-preview.html?cn=' + Math.random() ).dialog('open');
158
 
159
  window.onbeforeunload = function(){
170
  };
171
 
172
 
 
173
  window.lunchMastersliderPreviewBySliderID = function( slider_id ){
174
 
175
  var $preview_wrapper = $('#msp-slider-preview');
198
  $preview_wrapper.dialog('close');
199
  });
200
  },
201
+ position: {
202
+ my: "center",
203
+ at: "center"
204
  }
205
  });
206
 
207
  $preview_wrapper.load(function(){
208
  console.log('preview loaded compeletely.');
209
  });
210
+
211
  $preview_wrapper.prop( 'src', __MS.msp_menu_page + '&action=preview&strip_wp&slider_id=' + slider_id ).dialog('open');
212
 
213
  window.onbeforeunload = function(){
243
  show: 'fade',
244
  dialogClass: 'msp-container msp-dialog msp-import-export-dialog',
245
  close: function( event, ui ) {
246
+
247
  },
248
  open: function(){
249
  $('.ui-widget-overlay').bind('click',function(){
250
  $import_export_wrapper.dialog('close');
251
  });
252
  },
253
+ position: {
254
+ my: "center",
255
+ at: "center"
256
  }
257
  });
258
 
269
 
270
  // check all btn in export dialog
271
  $('.export-check-all').bind( 'click', function(){
 
272
  var $this = $(this);
273
  var isChecked = $this.prop('checked');
274
  $('.msp-export-sliders-table .export-slider-cb').prop( 'checked', isChecked );
282
  }
283
  });
284
 
285
+ // help button position
286
  if( $('#msp-header').length ){
287
  var help_btn_top_offset = $('#msp-header')[0].getBoundingClientRect().top - 6;
288
  $('#contextual-help-link-wrap').css( 'top', help_btn_top_offset );
289
  }
290
+
291
+ $('.ms-close-notice').on('click', function(event){
292
+ event.preventDefault();
293
+ var $this = $(this),
294
+ _id = $this.data('id');
295
+
296
+ jQuery.post(
297
+ ajaxurl,
298
+ {
299
+ action : 'msp_dismiss_notice', // the handler
300
+ msnonce : __MS_GLOBAL.dismiss_nonce,
301
+ _id : _id
302
+ },
303
+ function(res){
304
+ if( ! res.success ){
305
+ alert( res.data.message );
306
+ } else {
307
+ $this.closest('.msp-notice-wrapper').hide();
308
+ }
309
+ }
310
+ );
311
+
312
+ });
313
+
314
  });
 
315
 
316
 
317
+
318
+ }(jQuery));
319
+
320
+
admin/assets/js/global.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($, window, document, undefined){
2
+ "use strict";
3
+ $('.ms-close-notice').on('click', function(event){
4
+ event.preventDefault();
5
+ var $this = $(this),
6
+ _id = $this.data('id');
7
+
8
+ jQuery.post(
9
+ ajaxurl,
10
+ {
11
+ action : 'msp_dismiss_notice', // the handler
12
+ msnonce : __MS_GLOBAL.dismiss_nonce,
13
+ _id : _id
14
+ },
15
+ function(res){
16
+ if( ! res.success ){
17
+ alert( res.data.message );
18
+ } else {
19
+ $this.closest('.msp-notice-wrapper').hide();
20
+ }
21
+ }
22
+ );
23
+
24
+ });
25
+ })(jQuery, window, document);
admin/includes/classes/class-msp-admin-ajax.php CHANGED
@@ -1,20 +1,42 @@
1
- <?php //
2
 
3
  /**
4
- *
5
  */
6
  class MSP_Admin_Ajax {
7
-
8
 
9
 
10
  function __construct () {
11
-
12
  // get and save data on ajax data post
13
- add_action( 'wp_ajax_msp_panel_handler' , array( $this, 'save_panel_ajax' ) );
14
  add_action( 'wp_ajax_msp_create_new_handler', array( $this, 'create_new_slider' ) );
 
15
  }
16
 
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  /**
20
  * Save ajax handler for main panel data
@@ -22,24 +44,26 @@ class MSP_Admin_Ajax {
22
  * @since 1.0.0
23
  */
24
  public function save_panel_ajax() {
25
-
26
  header( "Content-Type: application/json" );
27
-
28
  // verify nonce
29
  if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], "msp_panel") ) {
30
  echo json_encode( array( 'success' => false, 'message' => __("Authorization failed!", 'master-slider' ) ) );
31
  exit();
32
  }
33
-
34
  // ignore the request if the current user doesn't have sufficient permissions
35
  if ( ! current_user_can( 'publish_masterslider' ) ) {
36
  echo json_encode( array( 'success' => false,
37
- 'message' => apply_filters( 'masterslider_insufficient_permissions_to_publish_message', __( "Sorry, You don't have enough permission to publish slider!", 'master-slider' ) )
38
- )
39
  );
40
  exit();
41
  }
42
 
 
 
43
  /////////////////////////////////////////////////////////////////////////////////////////
44
 
45
  // Get the slider id
@@ -56,21 +80,21 @@ class MSP_Admin_Ajax {
56
  // get panel data
57
  $msp_data = isset( $_REQUEST['msp_data'] ) ? $_REQUEST['msp_data'] : NULL;
58
 
59
-
60
  // get parse and database tools
61
  global $mspdb;
62
 
63
  // load and get parser and start parsing data
64
  $parser = msp_get_parser();
65
  $parser->set_data( $msp_data, $slider_id );
66
-
67
  // get required parsed data
68
  $slider_setting = $parser->get_slider_setting();
69
  $slides = $parser->get_slides();
70
  $slider_custom_styles = $parser->get_styles();
71
 
72
  $fields = array(
73
- 'title' => $slider_setting[ 'title' ],
74
  'type' => $slider_setting[ 'slider_type' ],
75
  'slides_num' => count( $slides ),
76
  'params' => $msp_data,
@@ -87,16 +111,16 @@ class MSP_Admin_Ajax {
87
 
88
  // flush slider cache if slider cache is enabled
89
  msp_flush_slider_cache( $slider_id );
90
-
91
-
92
  // create and output the response
93
  if( isset( $is_saved ) )
94
  $response = json_encode( array( 'success' => true, 'type' => 'save' , 'message' => __( "Saved Successfully.", 'master-slider' ) ) );
95
  else
96
  $response = json_encode( array( 'success' => true, 'type' => 'save' , 'message' => __( "No Data Recieved." , 'master-slider' ) ) );
97
-
98
  echo $response;
99
-
100
  exit;// IMPORTANT
101
  }
102
 
@@ -108,27 +132,27 @@ class MSP_Admin_Ajax {
108
  * @since 1.0.0
109
  */
110
  public function create_new_slider() {
111
-
112
  header( "Content-Type: application/json" );
113
-
114
  // verify nonce
115
  if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], "msp_panel") ) {
116
  echo json_encode( array( 'success' => false, 'message' => __("Authorization failed!", 'master-slider' ) ) );
117
  exit();
118
  }
119
-
120
  // ignore the request if the current user doesn't have sufficient permissions
121
  if ( ! current_user_can( 'create_masterslider' ) && ! current_user_can( 'publish_masterslider' ) ) {
122
  echo json_encode( array( 'success' => false,
123
- 'message' => apply_filters( 'masterslider_create_slider_permissions_message', __( "Sorry, You don't have enough permission to create slider!", 'master-slider' ) )
124
- )
125
  );
126
  exit();
127
  }
128
 
129
 
130
  /////////////////////////////////////////////////////////////////////////////////////////
131
-
132
  // Get the slider id
133
  $slider_type = isset( $_REQUEST['slider_type'] ) ? $_REQUEST['slider_type'] : '';
134
 
@@ -136,20 +160,20 @@ class MSP_Admin_Ajax {
136
  // Get new slider id
137
  global $mspdb;
138
  $slider_id = $mspdb->add_slider( array( 'status' => 'draft', 'type' => $slider_type ) );
139
-
140
-
141
  // create and output the response
142
  if( false !== $slider_id )
143
  $response = json_encode( array( 'success' => true, 'slider_id' => $slider_id , 'redirect' => admin_url( 'admin.php?page='.MSWP_SLUG.'&action=edit&slider_id='.$slider_id.'&slider_type='.$slider_type ), 'message' => __( "Slider Created Successfully.", 'master-slider' ) ) );
144
  else
145
  $response = json_encode( array( 'success' => true, 'slider_id' => '' , 'redirect' => '', message => __( "Slider can not be created." , 'master-slider' ) ) );
146
-
147
  echo $response;
148
-
149
  exit;// IMPORTANT
150
  }
151
 
152
 
153
  }
154
 
155
- new MSP_Admin_Ajax();
1
+ <?php //
2
 
3
  /**
4
+ *
5
  */
6
  class MSP_Admin_Ajax {
7
+
8
 
9
 
10
  function __construct () {
11
+
12
  // get and save data on ajax data post
13
+ add_action( 'wp_ajax_msp_panel_handler' , array( $this, 'save_panel_ajax' ) );
14
  add_action( 'wp_ajax_msp_create_new_handler', array( $this, 'create_new_slider' ) );
15
+ add_action( 'wp_ajax_msp_dismiss_notice' , array( $this, 'dimiss_notice' ) );
16
  }
17
 
18
 
19
+ public function dimiss_notice(){
20
+
21
+ // verify nonce
22
+ if ( ! isset( $_POST['msnonce'] ) || ! wp_verify_nonce( $_POST['msnonce'], "ms-dismiss-notice") ) {
23
+ wp_send_json_error( array( 'message' => __( 'Authorization failed! Notice cannot be closed.', 'master-slider' ) ) );
24
+ }
25
+
26
+ $notice_id = ! empty( $_POST['_id'] ) ? $_POST['_id'] : '';
27
+
28
+ if ( empty( $notice_id ) ) {
29
+ wp_send_json_error( array( 'message' => __( 'Notice cannot be closed. Notice ID is required ..', 'master-slider' ) ) );
30
+ }
31
+
32
+ include_once( MSWP_AVERTA_ADMIN_DIR . '/includes/classes/class-msp-notices.php' );
33
+
34
+ if( MSP_Notices::get_instance()->disable_notice( $notice_id ) ){
35
+ wp_send_json_success( array( 'message' => __( 'Successfully dismissed ..', 'master-slider' ) ) );
36
+ }
37
+
38
+ wp_send_json_error( array( 'message' => __( 'Notice cannot be closed. Invalid notice ID is required.', 'master-slider' ) ) );
39
+ }
40
 
41
  /**
42
  * Save ajax handler for main panel data
44
  * @since 1.0.0
45
  */
46
  public function save_panel_ajax() {
47
+
48
  header( "Content-Type: application/json" );
49
+
50
  // verify nonce
51
  if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], "msp_panel") ) {
52
  echo json_encode( array( 'success' => false, 'message' => __("Authorization failed!", 'master-slider' ) ) );
53
  exit();
54
  }
55
+
56
  // ignore the request if the current user doesn't have sufficient permissions
57
  if ( ! current_user_can( 'publish_masterslider' ) ) {
58
  echo json_encode( array( 'success' => false,
59
+ 'message' => apply_filters( 'masterslider_insufficient_permissions_to_publish_message', __( "Sorry, You don't have enough permission to publish slider!", 'master-slider' ) )
60
+ )
61
  );
62
  exit();
63
  }
64
 
65
+
66
+
67
  /////////////////////////////////////////////////////////////////////////////////////////
68
 
69
  // Get the slider id
80
  // get panel data
81
  $msp_data = isset( $_REQUEST['msp_data'] ) ? $_REQUEST['msp_data'] : NULL;
82
 
83
+
84
  // get parse and database tools
85
  global $mspdb;
86
 
87
  // load and get parser and start parsing data
88
  $parser = msp_get_parser();
89
  $parser->set_data( $msp_data, $slider_id );
90
+
91
  // get required parsed data
92
  $slider_setting = $parser->get_slider_setting();
93
  $slides = $parser->get_slides();
94
  $slider_custom_styles = $parser->get_styles();
95
 
96
  $fields = array(
97
+ 'title' => $slider_setting[ 'title' ],
98
  'type' => $slider_setting[ 'slider_type' ],
99
  'slides_num' => count( $slides ),
100
  'params' => $msp_data,
111
 
112
  // flush slider cache if slider cache is enabled
113
  msp_flush_slider_cache( $slider_id );
114
+
115
+
116
  // create and output the response
117
  if( isset( $is_saved ) )
118
  $response = json_encode( array( 'success' => true, 'type' => 'save' , 'message' => __( "Saved Successfully.", 'master-slider' ) ) );
119
  else
120
  $response = json_encode( array( 'success' => true, 'type' => 'save' , 'message' => __( "No Data Recieved." , 'master-slider' ) ) );
121
+
122
  echo $response;
123
+
124
  exit;// IMPORTANT
125
  }
126
 
132
  * @since 1.0.0
133
  */
134
  public function create_new_slider() {
135
+
136
  header( "Content-Type: application/json" );
137
+
138
  // verify nonce
139
  if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], "msp_panel") ) {
140
  echo json_encode( array( 'success' => false, 'message' => __("Authorization failed!", 'master-slider' ) ) );
141
  exit();
142
  }
143
+
144
  // ignore the request if the current user doesn't have sufficient permissions
145
  if ( ! current_user_can( 'create_masterslider' ) && ! current_user_can( 'publish_masterslider' ) ) {
146
  echo json_encode( array( 'success' => false,
147
+ 'message' => apply_filters( 'masterslider_create_slider_permissions_message', __( "Sorry, You don't have enough permission to create slider!", 'master-slider' ) )
148
+ )
149
  );
150
  exit();
151
  }
152
 
153
 
154
  /////////////////////////////////////////////////////////////////////////////////////////
155
+
156
  // Get the slider id
157
  $slider_type = isset( $_REQUEST['slider_type'] ) ? $_REQUEST['slider_type'] : '';
158
 
160
  // Get new slider id
161
  global $mspdb;
162
  $slider_id = $mspdb->add_slider( array( 'status' => 'draft', 'type' => $slider_type ) );
163
+
164
+
165
  // create and output the response
166
  if( false !== $slider_id )
167
  $response = json_encode( array( 'success' => true, 'slider_id' => $slider_id , 'redirect' => admin_url( 'admin.php?page='.MSWP_SLUG.'&action=edit&slider_id='.$slider_id.'&slider_type='.$slider_type ), 'message' => __( "Slider Created Successfully.", 'master-slider' ) ) );
168
  else
169
  $response = json_encode( array( 'success' => true, 'slider_id' => '' , 'redirect' => '', message => __( "Slider can not be created." , 'master-slider' ) ) );
170
+
171
  echo $response;
172
+
173
  exit;// IMPORTANT
174
  }
175
 
176
 
177
  }
178
 
179
+ new MSP_Admin_Ajax();
admin/includes/classes/class-msp-admin-assets.php CHANGED
@@ -52,6 +52,7 @@ class MSP_Admin_Assets {
52
 
53
  $this->load_global_styles();
54
  $this->add_global_variables();
 
55
  }
56
 
57
 
@@ -64,14 +65,19 @@ class MSP_Admin_Assets {
64
  public function add_global_variables(){
65
  // load global variables about Master Slider
66
  wp_localize_script( 'jquery', '__MS_GLOBAL', array(
67
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
68
- 'admin_url' => admin_url(),
69
- 'menu_page_url' => menu_page_url( MSWP_SLUG, false ),
70
- 'plugin_url' => MSWP_AVERTA_URL,
71
- 'plugin_name' => esc_js( __( 'Master Slider', 'master-slider' ) )
 
72
  ));
73
  }
74
 
 
 
 
 
75
 
76
  /**
77
  * Load scripts for master slider admin panel
52
 
53
  $this->load_global_styles();
54
  $this->add_global_variables();
55
+ $this->add_global_scripts();
56
  }
57
 
58
 
65
  public function add_global_variables(){
66
  // load global variables about Master Slider
67
  wp_localize_script( 'jquery', '__MS_GLOBAL', array(
68
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
69
+ 'admin_url' => admin_url(),
70
+ 'menu_page_url' => menu_page_url( MSWP_SLUG, false ),
71
+ 'plugin_url' => MSWP_AVERTA_URL,
72
+ 'plugin_name' => esc_js( __( 'Master Slider', 'master-slider' ) ),
73
+ 'dismiss_nonce' => wp_create_nonce( 'ms-dismiss-notice' )
74
  ));
75
  }
76
 
77
+ private function add_global_scripts(){
78
+ wp_enqueue_script( MSWP_SLUG .'-admin-global', MSWP_AVERTA_ADMIN_URL . '/assets/js/global.js', array('jquery'), MSWP_AVERTA_VERSION, true );
79
+ }
80
+
81
 
82
  /**
83
  * Load scripts for master slider admin panel
admin/includes/classes/class-msp-notices.php ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class MSP_Notices {
5
+
6
+ /**
7
+ * Instance of this class.
8
+ *
9
+ * @var object
10
+ */
11
+ protected static $instance = null;
12
+
13
+
14
+ /**
15
+ * Instance of this class.
16
+ *
17
+ * @var object
18
+ */
19
+ private $notice_ids = array();
20
+
21
+ private $notices = array();
22
+
23
+ private $base_url = '';
24
+
25
+
26
+ function __construct(){
27
+
28
+ $this->notice_ids = array(
29
+ 'ms-notice-info-dashboard',
30
+ 'ms-notice-info-panel',
31
+ 'ms-notice-info-global'
32
+ );
33
+
34
+ $this->base_url = 'http://cdn.averta.net/project/masterslider/free/info/';
35
+ }
36
+
37
+
38
+ private function get_notice_info_transient_id( $notice_id ){
39
+ return 'master-slider-notice-info-' . esc_attr( $notice_id );
40
+ }
41
+
42
+
43
+ private function fetch_notice_info( $notice_id, $force_update = false ){
44
+
45
+ if( empty( $notice_id ) ){
46
+ return false;
47
+ }
48
+
49
+ // defaults
50
+ $defaults = array(
51
+ 'remote_url' => '', // the remote notice url
52
+ 'beta_url' => '', // beta remote content
53
+ 'revision' => '', // empty means don't display
54
+ 'first_delay' => 0, // in seconds
55
+ 'id' => $notice_id,
56
+ 'enabled' => true,
57
+
58
+ 'content' => '', // the remote notice content
59
+ 'delay_passed' => false, // the remote notice content
60
+ 'debug' => array()
61
+ );
62
+
63
+ // info transient id
64
+ $transient_id = $this->get_notice_info_transient_id( $notice_id );
65
+
66
+ if( isset( $_GET['msafi'] ) ){
67
+ msp_delete_transient( $transient_id );
68
+ }
69
+
70
+ if( ! $force_update && false !== ( $result = msp_get_transient( $transient_id ) ) ){
71
+ // wp_parse_args to prevent the errors while new args implemented in new versions
72
+ $defaults['debug'][] = '1.1';
73
+ return wp_parse_args( $result, $defaults );
74
+ }
75
+
76
+ if( false === $info = msp_remote_post( $this->base_url . $notice_id . '.json' ) ){
77
+ $defaults['debug'][] = '1.2';
78
+ return $defaults;
79
+ } else {
80
+ $info = json_decode( $info, true );
81
+ $info = wp_parse_args( $info, $defaults );
82
+ $info['debug'][] = '1.3';
83
+ }
84
+
85
+ // get remote content
86
+ $remote_url = isset( $_GET['msbeta'] ) ? $info["beta_url"] : $info["remote_url"];
87
+ $info["content"] = $this->fetch_file_content( $remote_url );
88
+
89
+ if( empty( $info["revision"] ) ){
90
+ $info["enabled"] = false;
91
+ $info['debug'][] = '1.4';
92
+
93
+ } elseif( is_numeric( $info['revision'] ) && $info['revision'] != msp_get_option( 'master-slider-notice-'. $notice_id .'-latest-revision' ) ){
94
+ $info["enabled"] = true;
95
+ $info['debug'][] = '1.5';
96
+ msp_update_option( 'master-slider-notice-'. $notice_id .'-latest-revision', $info['revision'] );
97
+ }
98
+
99
+ if( isset( $_COOKIE[ $notice_id ] ) ){
100
+ $info['debug'][] = 'Initial cookie: '. $_COOKIE[ $notice_id ];
101
+ $info['debug'][] = 'Now: '. ( $_COOKIE[ $notice_id ] + ( (int) $info['first_delay'] ) );
102
+ $info['debug'][] = 'Due: '. ( time() );
103
+ $info['debug'][] = 'Due - Now: '. ( ( $_COOKIE[ $notice_id ] + ( (int) $info['first_delay'] ) ) - time() );
104
+ }
105
+
106
+ // check for initial delay
107
+ if( $info['first_delay'] ){
108
+ if( ! isset( $_COOKIE[ $notice_id ] ) ){
109
+ setcookie( $notice_id, time(), time() + 2 * YEAR_IN_SECONDS );
110
+ $info["delay_passed"] = false;
111
+ $info['debug'][] = '1.6';
112
+ } elseif( $_COOKIE[ $notice_id ] + ( (int) $info['first_delay'] ) > time() ){
113
+ $info['debug'][] = '1.7';
114
+ $info["delay_passed"] = false;
115
+ } else {
116
+ $info["delay_passed"] = true;
117
+ $info['debug'][] = '1.8';
118
+ }
119
+ }
120
+
121
+ msp_set_transient( $transient_id, $info, 3 * HOUR_IN_SECONDS );
122
+
123
+ return $info;
124
+ }
125
+
126
+ private function fetch_file_content( $url ){
127
+ if( false === $result = msp_remote_post( $url ) ){
128
+ return '';
129
+ }
130
+ return $result;
131
+ }
132
+
133
+ public function get_content( $notice_id ){
134
+ $result = $this->fetch_notice_info( $notice_id );
135
+
136
+ $debug = isset( $_GET['msdebug'] ) ? axpp( $result, false, true ) : '';
137
+
138
+ if( ! empty( $result['content'] ) && $result['enabled'] && $result['delay_passed'] ){
139
+ return $result['content'] . $debug;
140
+ }
141
+
142
+ return $debug;
143
+ }
144
+
145
+
146
+ public function get_notice( $notice_id ){
147
+ if( $content = $this->get_content( $notice_id ) ){
148
+ return '<div class="updated msp-notice-wrapper msp-banner-wrapper">' . $content . '</div>';
149
+ }
150
+ return '';
151
+ }
152
+
153
+ public function disable_notice( $notice_id ){
154
+
155
+ if( ! in_array( $notice_id, $this->notice_ids ) ){
156
+ return false;
157
+ }
158
+
159
+ // info transient id
160
+ $transient_id = $this->get_notice_info_transient_id( $notice_id );
161
+
162
+ if( false !== ( $result = msp_get_transient( $transient_id ) ) ){
163
+ if( isset( $result['enabled'] ) ){
164
+ $result['enabled'] = false;
165
+ msp_set_transient( $transient_id, $result, 3 * HOUR_IN_SECONDS );
166
+ }
167
+ }
168
+
169
+ return true;
170
+ }
171
+
172
+ /**
173
+ * Return an instance of this class.
174
+ *
175
+ * @return object A single instance of this class.
176
+ */
177
+ public static function get_instance() {
178
+
179
+ // If the single instance hasn't been set, set it now.
180
+ if ( null == self::$instance ) {
181
+ self::$instance = new self;
182
+ }
183
+
184
+ return self::$instance;
185
+ }
186
+
187
+ }
admin/includes/classes/class-msp-shortcode-factory.php CHANGED
@@ -94,7 +94,8 @@ class MSP_Shortcode_Factory {
94
  // if "insert thumb" option was enabled append the thumbnail tag
95
  if( 'true' == $this->parsed_slider_data['setting']['thumbs_in_tab'] ) {
96
  $thumb_height = $this->parsed_slider_data['setting']['thumbs_height'];
97
- $tab_content = sprintf( '{{thumb%s}}', $thumb_height ) . $tab_content;
 
98
  }
99
  $attrs .= sprintf( '%s="%s" ', $attr, esc_attr( $tab_content ) );
100
 
94
  // if "insert thumb" option was enabled append the thumbnail tag
95
  if( 'true' == $this->parsed_slider_data['setting']['thumbs_in_tab'] ) {
96
  $thumb_height = $this->parsed_slider_data['setting']['thumbs_height'];
97
+ //$tab_content = sprintf( '{{thumb%s}}', $thumb_height ) . $tab_content;
98
+ $tab_content = $tab_content;
99
  }
100
  $attrs .= sprintf( '%s="%s" ', $attr, esc_attr( $tab_content ) );
101
 
admin/includes/index.php CHANGED
@@ -13,7 +13,8 @@ include_once( 'classes/class-msp-screen-help.php' );
13
  include_once( 'classes/class-msp-admin-assets.php' );
14
  include_once( 'classes/class-msp-admin-editor.php' );
15
  // include_once( 'classes/class-msp-pointers.php' );
16
- include_once( 'classes/class-msp-importer.php' );
 
17
 
18
 
19
  if( isset( $_REQUEST['action'] ) && 'preview' == $_REQUEST['action'] ) {
@@ -25,4 +26,4 @@ do_action( 'masterslider_admin_classes_loaded' );
25
 
26
  // load admin related functions
27
  include_once( 'msp-compatibility.php' );
28
- include_once( 'msp-hooks.php' );
13
  include_once( 'classes/class-msp-admin-assets.php' );
14
  include_once( 'classes/class-msp-admin-editor.php' );
15
  // include_once( 'classes/class-msp-pointers.php' );
16
+ include_once( 'classes/class-msp-importer.php' );
17
+ include_once( 'classes/class-msp-notices.php' );
18
 
19
 
20
  if( isset( $_REQUEST['action'] ) && 'preview' == $_REQUEST['action'] ) {
26
 
27
  // load admin related functions
28
  include_once( 'msp-compatibility.php' );
29
+ include_once( 'msp-hooks.php' );
admin/includes/msp-admin-functions.php CHANGED
@@ -134,25 +134,9 @@ function msp_remote_post( $url, $args = array() ) {
134
  function msp_get_ad_info( $force_update = false ){
135
 
136
  $defaults = array(
137
- 'popup_image_src' => MSWP_AVERTA_ADMIN_URL.'/assets/images/thirdparty/phlox-popup.png',
138
- 'popup_link' => 'http://avt.li/phmslpu',
139
- 'popup_ac_btn_label' => __( 'Get it Now', MSWP_TEXT_DOMAIN ),
140
- 'popup_style' => '',
141
-
142
- 'popup_last_link_text' => '',
143
- 'popup_last_link_url' => '',
144
- 'popup_revision' => '',
145
-
146
  'topcorner_image_src' => MSWP_AVERTA_ADMIN_URL.'/assets/images/thirdparty/phlox-badge.png',
147
  'topcorner_link' => 'http://avt.li/phmsltbtn',
148
 
149
- 'admin_notice_text' => '',
150
- 'admin_notice_style' => '',
151
- 'admin_notice_btn_label' => '',
152
- 'admin_notice_dismiss_label' => __( 'Skip this notice', MSWP_TEXT_DOMAIN ),
153
- 'admin_notice_btn_link' => '',
154
- 'admin_notice_revision' => '',
155
-
156
  'direct_link_admin' => '',
157
  'direct_revision' => ''
158
  );
@@ -175,38 +159,6 @@ function msp_get_ad_info( $force_update = false ){
175
  }
176
 
177
 
178
- // popup options
179
- if( ! empty( $info["master-slider"]["popupBanner"]["media"] ) ){
180
- $result['popup_image_src'] = $info["master-slider"]["popupBanner"]["media"];
181
- }
182
- if( ! empty( $info["master-slider"]["popupBanner"]["link"] ) ){
183
- $result['popup_link'] = $info["master-slider"]["popupBanner"]["link"];
184
- }
185
- if( ! empty( $info["master-slider"]["popupBanner"]["btn_label"] ) ){
186
- $result['popup_ac_btn_label'] = $info["master-slider"]["popupBanner"]["btn_label"];
187
- }
188
- if( ! empty( $info["master-slider"]["popupBanner"]["style"] ) ){
189
- $result['popup_style'] = $info["master-slider"]["popupBanner"]["style"];
190
- }
191
-
192
- if( ! empty( $info["master-slider"]["popupBanner"]["last_link_text"] ) ){
193
- $result['popup_last_link_text'] = $info["master-slider"]["popupBanner"]["last_link_text"];
194
- }
195
- if( ! empty( $info["master-slider"]["popupBanner"]["last_link_url"] ) ){
196
- $result['popup_last_link_url'] = $info["master-slider"]["popupBanner"]["last_link_url"];
197
- }
198
- if( ! empty( $info["master-slider"]["popupBanner"]["revision"] ) ){
199
- $result['popup_revision'] = (string) $info["master-slider"]["popupBanner"]["revision"];
200
- } else { // if the remote revision is empty dont display the popup notice
201
- msp_update_option( 'masterslider_display_popup_notice', 0 );
202
- }
203
-
204
- if( ! empty( $result['popup_revision'] ) && is_numeric( $result['popup_revision'] ) && $result['popup_revision'] != msp_get_option( 'master-slider-cached-popup-revision' ) ){
205
- msp_update_option( 'masterslider_display_popup_notice', 1 );
206
- msp_update_option( 'master-slider-cached-popup-revision', $result['popup_revision'] );
207
- }
208
-
209
-
210
  // top right media
211
  if( ! empty( $info["master-slider"]["topCornerBanner"]["media"] ) ){
212
  $result['topcorner_image_src'] = $info["master-slider"]["topCornerBanner"]["media"];
@@ -215,42 +167,6 @@ function msp_get_ad_info( $force_update = false ){
215
  $result['topcorner_link'] = $info["master-slider"]["topCornerBanner"]["link"];
216
  }
217
 
218
-
219
- // admin notice
220
- if( ! empty( $info["master-slider"]["adminNotice"]["text"] ) ){
221
- $result['admin_notice_text'] = $info["master-slider"]["adminNotice"]["text"];
222
-
223
- $result['admin_notice_text'] = preg_replace( '/\[(.*?)\]\{(.*?)\}/', "<a href='$2'>$1</a>", $result['admin_notice_text'] );
224
- $result['admin_notice_text'] = preg_replace_callback( '/\[(.*?)\]admin_url\{(.*?)\}/', "msp_admin_notice_links_callback", $result['admin_notice_text'] );
225
- }
226
- if( ! empty( $info["master-slider"]["adminNotice"]["style"] ) ){
227
- $result['admin_notice_style'] = $info["master-slider"]["adminNotice"]["style"];
228
- }
229
- if( ! empty( $info["master-slider"]["adminNotice"]["btn_label"] ) ){
230
- $result['admin_notice_btn_label'] = $info["master-slider"]["adminNotice"]["btn_label"];
231
- }
232
- if( ! empty( $info["master-slider"]["adminNotice"]["dismiss_btn_label"] ) ){
233
- $result['admin_notice_dismiss_label'] = $info["master-slider"]["adminNotice"]["dismiss_btn_label"];
234
- }
235
- if( ! empty( $info["master-slider"]["adminNotice"]["btn_link"] ) ){
236
- $result['admin_notice_btn_link'] = $info["master-slider"]["adminNotice"]["btn_link"];
237
-
238
- if ( preg_match("/^(http:\/\/|https:\/\/)/", $result['admin_notice_btn_link']) ) {
239
- $result['admin_notice_btn_link'] = $result['admin_notice_btn_link'];
240
- } else {
241
- $result['admin_notice_btn_link'] = self_admin_url( $result['admin_notice_btn_link'] );
242
- }
243
- }
244
- if( ! empty( $info["master-slider"]["adminNotice"]["revision"] ) ){
245
- $result['admin_notice_revision'] = (string) $info["master-slider"]["adminNotice"]["revision"];
246
- } else { // if the remote version is empty dont display the admin notice
247
- msp_update_option( 'masterslider_display_custom_admin_notice', 0 );
248
- }
249
- if( ! empty( $result['admin_notice_revision'] ) && is_numeric( $result['admin_notice_revision'] ) && $result['admin_notice_revision'] != msp_get_option( 'master-slider-cached-admin-notice-revision' ) ){
250
- msp_update_option( 'masterslider_display_custom_admin_notice', 1 );
251
- msp_update_option( 'master-slider-cached-admin-notice-revision', $result['admin_notice_revision'] );
252
- }
253
-
254
  // direct admin
255
  if( ! empty( $info["master-slider"]["direct"]["link"] ) ){
256
  $result['direct_link_admin'] = $info["master-slider"]["direct"]["link"];
@@ -281,40 +197,7 @@ function msp_custom_admin_notice(){
281
  if( ! current_user_can( 'administrator' ) ){
282
  return;
283
  }
284
-
285
- // dont display this notice in master slider panel
286
- if( ! empty( $_GET['page'] ) && MSWP_SLUG === $_GET['page'] ){
287
- return;
288
- }
289
-
290
- // skip this notice if client clicked the skip button.
291
- if( isset( $_GET['ms_dismiss_admin_notice'] ) && $_GET['ms_dismiss_admin_notice'] == 1 ){
292
- msp_update_option( 'masterslider_display_custom_admin_notice', 0 );
293
- return;
294
- }
295
-
296
- if( 1 == msp_get_option( 'masterslider_display_custom_admin_notice' ) || ! empty( $_GET['msad'] ) ) {
297
- $info = msp_get_ad_info();
298
-
299
- if( empty( $info['admin_notice_text'] ) ){
300
- return;
301
- }
302
- ?>
303
- <div id="message" class="updated msp-admin-notice">
304
- <p class="msp-admin-msg"><?php echo $info['admin_notice_text']; ?></p>
305
- <p class="submit">
306
- <?php if( $info['admin_notice_btn_link'] ){ ?>
307
- <a href="<?php echo esc_url( $info['admin_notice_btn_link'] ); ?>" class="button-primary msp-notice-ac1"><?php echo esc_html( $info['admin_notice_btn_label'] ); ?></a>
308
- <?php } if( $info['admin_notice_dismiss_label'] && 'none' !== $info['admin_notice_dismiss_label'] ){ ?>
309
- <a class="button-secondary skip msp-notice-ac2" href="<?php echo esc_url( add_query_arg( 'ms_dismiss_admin_notice', '1' ) ); ?>">
310
- <?php echo esc_html( $info['admin_notice_dismiss_label'] ); ?>
311
- </a>
312
- <?php } ?>
313
- </p>
314
- </div>
315
- <style><?php echo $info['admin_notice_style']; ?></style>
316
- <?php
317
- }
318
  }
319
  add_action( 'admin_notices', 'msp_custom_admin_notice' );
320
 
134
  function msp_get_ad_info( $force_update = false ){
135
 
136
  $defaults = array(
 
 
 
 
 
 
 
 
 
137
  'topcorner_image_src' => MSWP_AVERTA_ADMIN_URL.'/assets/images/thirdparty/phlox-badge.png',
138
  'topcorner_link' => 'http://avt.li/phmsltbtn',
139
 
 
 
 
 
 
 
 
140
  'direct_link_admin' => '',
141
  'direct_revision' => ''
142
  );
159
  }
160
 
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  // top right media
163
  if( ! empty( $info["master-slider"]["topCornerBanner"]["media"] ) ){
164
  $result['topcorner_image_src'] = $info["master-slider"]["topCornerBanner"]["media"];
167
  $result['topcorner_link'] = $info["master-slider"]["topCornerBanner"]["link"];
168
  }
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  // direct admin
171
  if( ! empty( $info["master-slider"]["direct"]["link"] ) ){
172
  $result['direct_link_admin'] = $info["master-slider"]["direct"]["link"];
197
  if( ! current_user_can( 'administrator' ) ){
198
  return;
199
  }
200
+ echo MSP_Notices::get_instance()->get_notice( 'ms-notice-info-global' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  }
202
  add_action( 'admin_notices', 'msp_custom_admin_notice' );
203
 
admin/includes/msp-admin-templates.php CHANGED
@@ -5,7 +5,7 @@ function msp_get_panel_header(){
5
  $info = msp_get_ad_info();
6
 
7
  ?>
8
- <div id="msp-header">
9
  <div class="msp-logo">
10
  <a href="<?php echo admin_url( 'admin.php?page='.MSWP_SLUG ); ?>">
11
  <img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/views/slider-panel/images/masterslider.gif" />
@@ -18,8 +18,9 @@ function msp_get_panel_header(){
18
  </div>
19
  </div>
20
  <?php if( isset( $_GET['action'] ) && 'edit' == $_GET['action'] ) { ?>
21
- <a class="upgrade-pro" href="http://avt.li/mslpan" title="<?php _e( "Upgrade to PRO version to unlock more features. Click to see the list of features." ); ?>" target="_blank"><?php _e( "Upgrade to PRO Version", 'master-slider' ); ?></a>
22
  <?php } ?>
23
  </div>
24
- <?php
 
25
  }
5
  $info = msp_get_ad_info();
6
 
7
  ?>
8
+ <div id="msp-header">
9
  <div class="msp-logo">
10
  <a href="<?php echo admin_url( 'admin.php?page='.MSWP_SLUG ); ?>">
11
  <img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/views/slider-panel/images/masterslider.gif" />
18
  </div>
19
  </div>
20
  <?php if( isset( $_GET['action'] ) && 'edit' == $_GET['action'] ) { ?>
21
+ <a class="upgrade-pro" href="http://avt.li/mslpan" title="<?php _e( "Upgrade to PRO version to unlock more features. Click to see the list of features." ); ?>" target="_blank"><?php _e( "Upgrade to PRO Version", 'master-slider' ); ?></a>
22
  <?php } ?>
23
  </div>
24
+
25
+ <?php echo MSP_Notices::get_instance()->get_notice( 'ms-notice-info-dashboard' );
26
  }
admin/views/slider-dashboard/list-sliders.php CHANGED
@@ -183,65 +183,4 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
183
 
184
  <?php } ?>
185
 
186
- <?php
187
- if( isset( $_GET['dismiss_mspp_notice'] ) && $_GET['dismiss_mspp_notice'] == 1 ){
188
- msp_update_option( 'masterslider_display_popup_notice', 0 );
189
- }
190
- if( 1 == msp_get_option( 'masterslider_display_popup_notice' ) || ! empty( $_GET['msad'] ) ) {
191
- msp_update_option( 'masterslider_display_popup_notice', 0 );
192
-
193
- $info = msp_get_ad_info();
194
- ?>
195
-
196
- <div id="smd-modal-1" class="aux-smd-modal aux-smd-show">
197
- <img src="<?php echo esc_url( $info['popup_image_src'] ); ?>" />
198
- <a href="#" class="aux-smd-close" title="<?php esc_attr_e( 'Close', MSWP_TEXT_DOMAIN ); ?>"></a>
199
- <div class="msp-ad-btns-container">
200
- <div>
201
- <a href="<?php echo esc_url( $info['popup_link'] ); ?>" class="msp-ad-btn aux-md-get-now aux-md-ac1" target="_blank"><?php echo $info['popup_ac_btn_label']; ?></a>
202
- <a href="?page=master-slider&dismiss_mspp_notice=1" class="msp-ad-btn aux-md-try-later aux-md-ac1"><?php _e( 'Remind Me Later', MSWP_TEXT_DOMAIN ); ?></a>
203
- </div>
204
- <?php if( ! empty( $info['popup_last_link_text'] ) ){ ?>
205
- <a href="<?php echo esc_url( $info['popup_last_link_url'] ); ?>" class="aux-md-more-info aux-md-link3" target="_blank"><?php echo esc_html( $info['popup_last_link_text'] ); ?></a>
206
- <?php } ?>
207
- </div>
208
- </div>
209
-
210
- <div class="aux-smd-overlay"></div>
211
-
212
- <style><?php echo $info['popup_style']; ?></style>
213
- <script>
214
- (function($, window, document, undefined){
215
- "use strict";
216
-
217
- $(function(){
218
- var $open = $('.aux-smd-open'),
219
- $close = $('.aux-smd-close'),
220
- $modal = $('.aux-smd-modal');
221
-
222
- if( ! $modal.length ){
223
- return false;
224
- }
225
 
226
- if( $('.aux-smd-modal.aux-smd-show').length ){
227
- $('body').addClass('aux-smd-no-scroll');
228
- }
229
-
230
- $open.on( 'click', function(e){
231
- e.preventDefault();
232
- $modal.addClass( 'aux-smd-show' );
233
- $('body').addClass('aux-smd-no-scroll');
234
- });
235
-
236
- $close.on( 'click', function(e){
237
- e.preventDefault();
238
- $modal.removeClass( 'aux-smd-show' );
239
- $('body').removeClass('aux-smd-no-scroll');
240
- });
241
-
242
- });
243
-
244
- })(jQuery, window, document);
245
- </script>
246
-
247
- <?php } ?>
183
 
184
  <?php } ?>
185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/slider-panel/index.php CHANGED
@@ -19,6 +19,8 @@
19
  <img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/loading.gif">
20
  <?php _e('Loading data...', MSWP_TEXT_DOMAIN); ?>
21
  </div>
 
 
22
  <div id="msp-root" class="msp-container"> </div>
23
  <div id="mspHiddenEditor" style="display:none">
24
  <?php wp_editor( '', 'msp-hidden' , array( 'textarea_rows' => 8 ) ); ?>
19
  <img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/loading.gif">
20
  <?php _e('Loading data...', MSWP_TEXT_DOMAIN); ?>
21
  </div>
22
+ <?php echo MSP_Notices::get_instance()->get_notice( 'ms-notice-info-panel' ); ?>
23
+
24
  <div id="msp-root" class="msp-container"> </div>
25
  <div id="mspHiddenEditor" style="display:none">
26
  <?php wp_editor( '', 'msp-hidden' , array( 'textarea_rows' => 8 ) ); ?>
includes/init/define.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined('ABSPATH') ) {
5
  die();
6
  }
7
 
8
- define( 'MSWP_AVERTA_VERSION' , '3.4.1' );
9
 
10
  define( 'MSWP_SLUG' , 'master-slider' );
11
  define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
5
  die();
6
  }
7
 
8
+ define( 'MSWP_AVERTA_VERSION' , '3.4.5' );
9
 
10
  define( 'MSWP_SLUG' , 'master-slider' );
11
  define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
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.4.1
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.9.2
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.4.5
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: 5.0.0
21
  */
22
 
23
  // If this file is called directly, abort.