myStickymenu - Version 2.5.4

Version Description

Poptin support was added, you can now launch Poptin pop ups

Download this release

Release Info

Developer galdub
Plugin Icon 128x128 myStickymenu
Version 2.5.4
Comparing to
See all releases

Code changes from version 2.5.3 to 2.5.4

css/mystickymenu-admin.css CHANGED
@@ -1702,7 +1702,7 @@ p.udner-title {
1702
  .mysticky-welcomebar-setting-content-right select ,
1703
  .mysticky-welcomebar-setting-content-right input[type="text"] ,
1704
  .mysticky-welcomebar-setting-content-right textarea {
1705
- width: 310px;
1706
  height: 42px;
1707
  border-radius: 20px;
1708
  color: #32373c;
@@ -1714,6 +1714,13 @@ p.udner-title {
1714
  font-size: 14px;
1715
  font-weight: 400;
1716
  }
 
 
 
 
 
 
 
1717
  .mysticky-welcomebar-setting-content-right select {
1718
  padding-right: 22px;
1719
  }
@@ -2288,4 +2295,16 @@ div#wp-mysticky_bar_text-wrap {
2288
  position: absolute;
2289
  bottom: -8px;
2290
  left: 25px;
2291
- }
 
 
 
 
 
 
 
 
 
 
 
 
1702
  .mysticky-welcomebar-setting-content-right select ,
1703
  .mysticky-welcomebar-setting-content-right input[type="text"] ,
1704
  .mysticky-welcomebar-setting-content-right textarea {
1705
+ width: 400px;
1706
  height: 42px;
1707
  border-radius: 20px;
1708
  color: #32373c;
1714
  font-size: 14px;
1715
  font-weight: 400;
1716
  }
1717
+
1718
+ .mysticky-welcomebar-setting-content-right input::placeholder,
1719
+ .mysticky-welcomebar-setting-content-right input:-ms-input-placeholder,
1720
+ .mysticky-welcomebar-setting-content-right input::-ms-input-placeholder {
1721
+ color: #b5b7b9;
1722
+ opacity:0.6;
1723
+ }
1724
  .mysticky-welcomebar-setting-content-right select {
1725
  padding-right: 22px;
1726
  }
2295
  position: absolute;
2296
  bottom: -8px;
2297
  left: 25px;
2298
+ }
2299
+
2300
+ .mysticky-welcomebar-poptin-content{
2301
+ font-size: 18px;
2302
+ display: flex;
2303
+ align-content: center;
2304
+ }
2305
+ .mysticky-welcomebar-poptin-content a{
2306
+ display: inline-block;
2307
+ padding: 0 5px;
2308
+ text-decoration: none;
2309
+ }
2310
+ .mysticky-welcome-poptin-logo{width: 100px;}
js/mystickymenu-admin.js CHANGED
@@ -19,10 +19,10 @@
19
  }
20
  })
21
  });
22
-
23
  var handle = $( "#custom-handle" );
24
  $( "#slider" ).slider({
25
- create: function() {
26
  handle.text( $( this ).slider( "value" ) );
27
  handle.text( $('#myfixed_opacity').val() );
28
  handle.css('left', $('#myfixed_opacity').val() + '%')
@@ -79,7 +79,7 @@
79
 
80
  var flag = 0;
81
  $( "#mystickymenu-select option" ).each(function( i ) {
82
-
83
  if ($('select#mystickymenu-select option:selected').val() !== '' ) {
84
  flag = 1;
85
  }
@@ -93,7 +93,7 @@
93
  $('#mysticky_class_selector').show();
94
  $("select#mystickymenu-select option[value=custom]").attr('selected', 'selected');
95
  }
96
-
97
  $("#mystickymenu-select").on( 'change', function() {
98
  if ($(this).val() == 'custom' ) {
99
  $('#mysticky_class_selector').show();
@@ -112,6 +112,11 @@
112
  $( '.mysticky-welcomebar-redirect' ).hide();
113
  $( '.mysticky-welcomebar-redirect-container' ).hide();
114
  }
 
 
 
 
 
115
  if ( $('.mysticky-welcomebar-action option:selected').attr('data-href') !== '' && mysticky_welcomebar_action == 'thankyou_screen' ) {
116
  window.open( $( '.mysticky-welcomebar-action option:selected' ).attr('data-href') , '_blank');
117
  }
@@ -147,13 +152,13 @@
147
  $( '.mysticky-page-options-html' ).remove();
148
 
149
  $( '#mysticky_create-rule' ).on( 'click', function(){
150
-
151
  var append_html = mysticky_page_option_content.replace(/__count__/g, mysticky_total_page_option, mysticky_page_option_content);
152
  mysticky_total_page_option++;
153
  $( '.mysticky-page-options' ).append( append_html );
154
  $( '.mysticky-page-options .mysticky-page-option' ).removeClass( 'last' );
155
  $( '.mysticky-page-options .mysticky-page-option:last' ).addClass( 'last' );
156
-
157
  if( $( '.mysticky-page-option .myStickymenu-upgrade' ).length > 0 ) {
158
  $( this ).remove();
159
  }
@@ -184,8 +189,8 @@
184
  change: function(event, ui){
185
  var color_id = $(this).attr('id');
186
  var slug = $(this).data('slug');
187
-
188
- var color_code = ui.color.toString();
189
  if ( color_id === 'mysticky_welcomebar_bgcolor'){
190
  $('.mysticky-welcomebar-fixed').css('background-color', color_code );
191
  }
@@ -278,17 +283,17 @@
278
  $( '.mysticky-welcomebar-fixed p' ).css( 'font-size', mysticky_welcomebar_fontsize_val + 'px' );
279
  $( '.mysticky-welcomebar-btn a' ).css( 'font-size', mysticky_welcomebar_fontsize_val + 'px' );
280
  } );
281
-
282
  $( '#wp-mysticky_bar_text-wrap .wp-editor-tabs button' ).on( 'click', function(){
283
  if ( $("#wp-mysticky_bar_text-wrap").hasClass("tmce-active") ){
284
 
285
  }
286
  } );
287
-
288
  $( document ).on( 'click', '#qt_mysticky_bar_text_toolbar .ed_button', function(){
289
  $( 'textarea[name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]"]' ).trigger( 'change keyup click' );
290
  } );
291
-
292
  $( 'textarea[name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]"]' ).on( 'change keyup click', function(e){
293
  var mysticky_bar_text_val = $( this ).val().replace(/(?:\r\n|\r|\n)/g, '<br />');
294
  $( '.mysticky-welcomebar-content' ).html( "<p>" + mysticky_bar_text_val + "</p>");
@@ -296,17 +301,17 @@
296
 
297
  $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_text]"]' ).on( 'keyup', function(){
298
  var mysticky_btn_text_val = $( this ).val();
299
-
300
  $( '.mysticky-welcomebar-btn a' ).text( mysticky_btn_text_val );
301
  } );
302
-
303
  /* DATE: 11-12-2019 start */
304
- $( 'select[name="mysticky_option_welcomebar[mysticky_welcomebar_attentionselect]"]' ).on( 'change', function(){
305
  $(".mysticky-welcomebar-fixed").removeClass (function (index, className) {
306
  return (className.match (/(^|\s)mysticky-welcomebar-attention-\S+/g) || []).join(' ');
307
  });
308
  $( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-attention-' + $(this).val() );
309
-
310
  } );
311
  /* DATE: 11-12-2019 End */
312
  $("#myStickymenu-entry-effect").on( 'change', function() {
@@ -321,8 +326,43 @@
321
 
322
  });
323
  $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
324
-
325
  $( '.mysticky-welcomebar-submit input#submit' ).on( 'click', function(e){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  if ( $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_enable]"]' ).prop( 'checked' ) == false && $( 'input#save_welcome_bar' ).val() == '' ) {
327
  e.preventDefault();
328
  $( "#mysticky-welcomebar-save-confirm" ).dialog({
19
  }
20
  })
21
  });
22
+
23
  var handle = $( "#custom-handle" );
24
  $( "#slider" ).slider({
25
+ create: function() {
26
  handle.text( $( this ).slider( "value" ) );
27
  handle.text( $('#myfixed_opacity').val() );
28
  handle.css('left', $('#myfixed_opacity').val() + '%')
79
 
80
  var flag = 0;
81
  $( "#mystickymenu-select option" ).each(function( i ) {
82
+
83
  if ($('select#mystickymenu-select option:selected').val() !== '' ) {
84
  flag = 1;
85
  }
93
  $('#mysticky_class_selector').show();
94
  $("select#mystickymenu-select option[value=custom]").attr('selected', 'selected');
95
  }
96
+
97
  $("#mystickymenu-select").on( 'change', function() {
98
  if ($(this).val() == 'custom' ) {
99
  $('#mysticky_class_selector').show();
112
  $( '.mysticky-welcomebar-redirect' ).hide();
113
  $( '.mysticky-welcomebar-redirect-container' ).hide();
114
  }
115
+ if ( mysticky_welcomebar_action == 'poptin_popup' ) {
116
+ $( '.mysticky-welcomebar-poptin-popup' ).show();
117
+ } else {
118
+ $( '.mysticky-welcomebar-poptin-popup' ).hide();
119
+ }
120
  if ( $('.mysticky-welcomebar-action option:selected').attr('data-href') !== '' && mysticky_welcomebar_action == 'thankyou_screen' ) {
121
  window.open( $( '.mysticky-welcomebar-action option:selected' ).attr('data-href') , '_blank');
122
  }
152
  $( '.mysticky-page-options-html' ).remove();
153
 
154
  $( '#mysticky_create-rule' ).on( 'click', function(){
155
+
156
  var append_html = mysticky_page_option_content.replace(/__count__/g, mysticky_total_page_option, mysticky_page_option_content);
157
  mysticky_total_page_option++;
158
  $( '.mysticky-page-options' ).append( append_html );
159
  $( '.mysticky-page-options .mysticky-page-option' ).removeClass( 'last' );
160
  $( '.mysticky-page-options .mysticky-page-option:last' ).addClass( 'last' );
161
+
162
  if( $( '.mysticky-page-option .myStickymenu-upgrade' ).length > 0 ) {
163
  $( this ).remove();
164
  }
189
  change: function(event, ui){
190
  var color_id = $(this).attr('id');
191
  var slug = $(this).data('slug');
192
+
193
+ var color_code = ui.color.toString();
194
  if ( color_id === 'mysticky_welcomebar_bgcolor'){
195
  $('.mysticky-welcomebar-fixed').css('background-color', color_code );
196
  }
283
  $( '.mysticky-welcomebar-fixed p' ).css( 'font-size', mysticky_welcomebar_fontsize_val + 'px' );
284
  $( '.mysticky-welcomebar-btn a' ).css( 'font-size', mysticky_welcomebar_fontsize_val + 'px' );
285
  } );
286
+
287
  $( '#wp-mysticky_bar_text-wrap .wp-editor-tabs button' ).on( 'click', function(){
288
  if ( $("#wp-mysticky_bar_text-wrap").hasClass("tmce-active") ){
289
 
290
  }
291
  } );
292
+
293
  $( document ).on( 'click', '#qt_mysticky_bar_text_toolbar .ed_button', function(){
294
  $( 'textarea[name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]"]' ).trigger( 'change keyup click' );
295
  } );
296
+
297
  $( 'textarea[name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]"]' ).on( 'change keyup click', function(e){
298
  var mysticky_bar_text_val = $( this ).val().replace(/(?:\r\n|\r|\n)/g, '<br />');
299
  $( '.mysticky-welcomebar-content' ).html( "<p>" + mysticky_bar_text_val + "</p>");
301
 
302
  $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_btn_text]"]' ).on( 'keyup', function(){
303
  var mysticky_btn_text_val = $( this ).val();
304
+
305
  $( '.mysticky-welcomebar-btn a' ).text( mysticky_btn_text_val );
306
  } );
307
+
308
  /* DATE: 11-12-2019 start */
309
+ $( 'select[name="mysticky_option_welcomebar[mysticky_welcomebar_attentionselect]"]' ).on( 'change', function(){
310
  $(".mysticky-welcomebar-fixed").removeClass (function (index, className) {
311
  return (className.match (/(^|\s)mysticky-welcomebar-attention-\S+/g) || []).join(' ');
312
  });
313
  $( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-attention-' + $(this).val() );
314
+
315
  } );
316
  /* DATE: 11-12-2019 End */
317
  $("#myStickymenu-entry-effect").on( 'change', function() {
326
 
327
  });
328
  $( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
329
+
330
  $( '.mysticky-welcomebar-submit input#submit' ).on( 'click', function(e){
331
+ var welcomebar_action = $('.mysticky-welcomebar-action').find(":selected").val();
332
+ var poptin_popup_link = $('#mysticky_welcomebar_poptin_popup_link').val().toLowerCase();
333
+ var welcome_save_anyway = $('#welcome_save_anyway').val();
334
+ console.log(poptin_popup_link);
335
+ if ( welcomebar_action == 'poptin_popup' && welcome_save_anyway == '' && (poptin_popup_link == '' || poptin_popup_link.indexOf('popt.in') == '-1' ) ) {
336
+ e.preventDefault();
337
+ $( "#mysticky-welcomebar-poptin-popup-confirm" ).dialog({
338
+ resizable: false,
339
+ modal: true,
340
+ draggable: false,
341
+ height: 'auto',
342
+ width: 500,
343
+ buttons: {
344
+ "Keep editing": {
345
+ click:function () {
346
+ $( this ).dialog('close');
347
+ $("body,html").animate({
348
+ scrollTop: $("#mysticky_welcomebar_poptin_popup_link").offset().top - 200
349
+ }, 500)
350
+ $('#mysticky_welcomebar_poptin_popup_link').focus();
351
+ $('#mysticky_welcomebar_poptin_popup_link').css( 'border', '1px solid #FF0000' );
352
+ },
353
+ text: 'Keep editing',
354
+ class: 'green-btn'
355
+ },
356
+ "Save anyway": function () {
357
+ $( 'input#welcome_save_anyway' ).val('1');
358
+ $( '.mysticky-welcomebar-submit input#submit' ).trigger('click');
359
+ $( this ).dialog( 'close' );
360
+ }
361
+ }
362
+ });
363
+ return false;
364
+ }
365
+
366
  if ( $( 'input[name="mysticky_option_welcomebar[mysticky_welcomebar_enable]"]' ).prop( 'checked' ) == false && $( 'input#save_welcome_bar' ).val() == '' ) {
367
  e.preventDefault();
368
  $( "#mysticky-welcomebar-save-confirm" ).dialog({
mystickymenu.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: myStickymenu
4
  Plugin URI: https://premio.io/
5
  Description: Simple sticky (fixed on top) menu implementation for navigation menu and Welcome bar for announcements and promotion. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
- Version: 2.5.3
7
  Author: Premio
8
  Author URI: https://premio.io/downloads/mystickymenu/
9
  Text Domain: mystickymenu
@@ -12,7 +12,7 @@ License: GPLv2 or later
12
  */
13
 
14
  defined('ABSPATH') or die("Cannot access pages directly.");
15
- define( 'MYSTICKY_VERSION', '2.5.3' );
16
  define('MYSTICKYMENU_URL', plugins_url('/', __FILE__)); // Define Plugin URL
17
  define('MYSTICKYMENU_PATH', plugin_dir_path(__FILE__)); // Define Plugin Directory Path
18
 
3
  Plugin Name: myStickymenu
4
  Plugin URI: https://premio.io/
5
  Description: Simple sticky (fixed on top) menu implementation for navigation menu and Welcome bar for announcements and promotion. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
+ Version: 2.5.4
7
  Author: Premio
8
  Author URI: https://premio.io/downloads/mystickymenu/
9
  Text Domain: mystickymenu
12
  */
13
 
14
  defined('ABSPATH') or die("Cannot access pages directly.");
15
+ define( 'MYSTICKY_VERSION', '2.5.4' );
16
  define('MYSTICKYMENU_URL', plugins_url('/', __FILE__)); // Define Plugin URL
17
  define('MYSTICKYMENU_PATH', plugin_dir_path(__FILE__)); // Define Plugin Directory Path
18
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: tomeraharon, galdub, premio
3
  Tags:floating bar, notification bar, menu, header, sticky menu, sticky header, floating menu, floating navigation menu, navigation menu, navigation, sticky navigation menu, welcome bar, hello bar, top bar, sticky bar
4
  Requires at least: 3.5.1
5
  Tested up to: 5.8
6
- Stable tag: 2.5.3
7
  License: GPLv2 or later
8
 
9
  Create a beautiful welcome notification bar. This sticky menu plugin will also make your menu or header stick to the top of page, when scrolled down and up.
@@ -35,6 +35,7 @@ My Sticky Menu is tested and compatible with Elementor website builder, Divi, WP
35
 
36
  = WITH WELCOME BAR FEATURES YOU CAN: =
37
  * Display your floating bar at top position
 
38
  * Change the background and button colors for your hello bar
39
  * Change display frequency after submission - show the announcement bar on every page, once a visit, or don't show the announcement bar after it's submitted
40
  * Add an attention effect to your button and increase conversion and CTR
@@ -267,6 +268,8 @@ After installing the plugin, you’ll have the option to turn on the welcome bar
267
 
268
 
269
  == Changelog ==
 
 
270
  = 2.5.3 =
271
  Support route changed
272
  = 2.5.2 =
3
  Tags:floating bar, notification bar, menu, header, sticky menu, sticky header, floating menu, floating navigation menu, navigation menu, navigation, sticky navigation menu, welcome bar, hello bar, top bar, sticky bar
4
  Requires at least: 3.5.1
5
  Tested up to: 5.8
6
+ Stable tag: 2.5.4
7
  License: GPLv2 or later
8
 
9
  Create a beautiful welcome notification bar. This sticky menu plugin will also make your menu or header stick to the top of page, when scrolled down and up.
35
 
36
  = WITH WELCOME BAR FEATURES YOU CAN: =
37
  * Display your floating bar at top position
38
+ * When the user clicks on the welcome bar button you can close the bar, redirect to another URL, or launch a <a href="https://www.poptin.com/?utm_source=msm" target="_blank" title="Poptin pop up">Poptin pop up</a>
39
  * Change the background and button colors for your hello bar
40
  * Change display frequency after submission - show the announcement bar on every page, once a visit, or don't show the announcement bar after it's submitted
41
  * Add an attention effect to your button and increase conversion and CTR
268
 
269
 
270
  == Changelog ==
271
+ = 2.5.4 =
272
+ Poptin support was added, you can now launch Poptin pop ups
273
  = 2.5.3 =
274
  Support route changed
275
  = 2.5.2 =
welcome-bar.php CHANGED
@@ -180,7 +180,7 @@ function mysticky_welcome_bar_backend() {
180
  <div class="mysticky-welcomebar-setting-content">
181
  <label><?php _e('Button Text', 'myStickymenu'); ?></label>
182
  <div class="mysticky-welcomebar-setting-content-right">
183
- <input type="text" id="mysticky_welcomebar_btn_text" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_btn_text]" value="<?php echo $welcomebar['mysticky_welcomebar_btn_text'];?>" />
184
  </div>
185
  </div>
186
  <!-- -->
@@ -208,6 +208,7 @@ function mysticky_welcome_bar_backend() {
208
  <select name="mysticky_option_welcomebar[mysticky_welcomebar_actionselect]" class="mysticky-welcomebar-action mysticky_welcomebar_disable">
209
  <option value="redirect_to_url" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'redirect_to_url' ); ?>><?php _e( 'Redirect to URL', 'myStickymenu' );?></option>
210
  <option value="close_bar" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'close_bar' ); ?>><?php _e( 'Close bar', 'myStickymenu' );?></option>
 
211
  <option value="thankyou_screen" data-href="<?php echo esc_url($upgarde_url); ?>"><?php _e( 'Thank you screen (Upgrade Now)', 'myStickymenu' );?></option>
212
  </select>
213
  </div>
@@ -215,13 +216,28 @@ function mysticky_welcome_bar_backend() {
215
  </div>
216
  </div>
217
 
218
- <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  <label><?php _e('Redirection link', 'myStickymenu'); ?></label>
220
  <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-action mysticky-welcomebar-redirect" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?> >
221
  <input type="text" id="mysticky_welcomebar_redirect" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_redirect]" value="<?php echo esc_url($welcomebar['mysticky_welcomebar_redirect']);?>" placeholder="<?php echo esc_url("https://www.yourdomain.com"); ?>" />
222
  </div>
223
  </div>
224
- <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
225
  <label><?php _e( 'Open in a new tab', 'mystickymenu' );?></label>
226
  <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-newtab mysticky-welcomebar-redirect" >
227
  <label class="mysticky-welcomebar-switch">
@@ -231,7 +247,7 @@ function mysticky_welcome_bar_backend() {
231
  <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
232
  </div>
233
  </div>
234
- <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?>>
235
  <label><?php _e('rel Attribute', 'myStickymenu'); ?>
236
  <span class="mysticky-custom-fields-tooltip">
237
  <a href="javascript:void(0);" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a>
@@ -400,7 +416,7 @@ function mysticky_welcome_bar_backend() {
400
  <?php echo wpautop(isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase");?>
401
  </div>
402
  <div class="mysticky-welcomebar-btn">
403
- <a href="#" ><?php echo isset($welcomebar['mysticky_welcomebar_btn_text']) ? $welcomebar['mysticky_welcomebar_btn_text'] : "Got it!";?></a>
404
  </div>
405
  <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a>
406
  </div>
@@ -428,6 +444,12 @@ function mysticky_welcome_bar_backend() {
428
  <?php _e('Your Welcome Bar is currently turned off, would you like to save and show it on your site?', 'mystickymenu' ); ?>
429
  </p>
430
  </div>
 
 
 
 
 
 
431
  <script>
432
  jQuery(".mysticky-welcomebar-fixed").on(
433
  "animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd",
@@ -986,19 +1008,15 @@ function mysticky_welcome_bar_frontend(){
986
  $display_main_class = "mysticky-welcomebar-position-" . $welcomebar['mysticky_welcomebar_position'] . $mysticky_welcomebar_showx_desktop . $mysticky_welcomebar_showx_mobile . $mysticky_welcomebar_btn_desktop . $mysticky_welcomebar_btn_mobile . $mysticky_welcomebar_display_desktop . $mysticky_welcomebar_display_mobile .$display . $display_entry_effect;
987
 
988
  if( isset($welcomebar['mysticky_welcomebar_actionselect']) ) {
 
989
  if( $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' ) {
990
- $mysticky_welcomebar_actionselect_url = esc_url( $welcomebar['mysticky_welcomebar_redirect'] );
991
- } else {
992
- $mysticky_welcomebar_actionselect_url = 'javascript:void(0)';
993
- }
994
- }
995
- /*if( isset($welcomebar['mysticky_welcomebar_enable']) ) {
996
- if ( $welcomebar['mysticky_welcomebar_position'] == 'top' ) {
997
- $welcomebar_enable_block = "top: -60px";
998
- } else {
999
- $welcomebar_enable_block = "bottom: -60px";
1000
- }
1001
- }*/
1002
 
1003
  ?>
1004
  <div class="mysticky-welcomebar-fixed <?php echo $display_main_class; ?>" style="<?php //echo $welcomebar_enable_block; ?>" data-after-triger="after_a_few_seconds" data-triger-sec="0" data-position="<?php echo esc_attr($welcomebar['mysticky_welcomebar_position']);?>" data-height="<?php echo esc_attr($welcomebar['mysticky_welcomebar_height']);?>" data-rediect="<?php echo esc_attr($welcomebar['mysticky_welcomebar_actionselect']);?>" data-aftersubmission="<?php echo esc_attr($welcomebar['mysticky_welcomebar_aftersubmission']);?>">
@@ -1007,7 +1025,7 @@ function mysticky_welcome_bar_frontend(){
1007
  <?php echo wpautop( isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase" );?>
1008
  </div>
1009
  <div class="mysticky-welcomebar-btn">
1010
- <a href="<?php echo $mysticky_welcomebar_actionselect_url; ?>" <?php if( isset($welcomebar['mysticky_welcomebar_redirect_newtab']) && $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' && $welcomebar['mysticky_welcomebar_redirect_newtab']== 1):?> target="_blank" <?php endif;?>><?php echo isset($welcomebar['mysticky_welcomebar_btn_text'])?$welcomebar['mysticky_welcomebar_btn_text']:"Got it!";?></a>
1011
  </div>
1012
  <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a>
1013
  </div>
180
  <div class="mysticky-welcomebar-setting-content">
181
  <label><?php _e('Button Text', 'myStickymenu'); ?></label>
182
  <div class="mysticky-welcomebar-setting-content-right">
183
+ <input type="text" id="mysticky_welcomebar_btn_text" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_btn_text]" value="<?php echo stripslashes($welcomebar['mysticky_welcomebar_btn_text']);?>" />
184
  </div>
185
  </div>
186
  <!-- -->
208
  <select name="mysticky_option_welcomebar[mysticky_welcomebar_actionselect]" class="mysticky-welcomebar-action mysticky_welcomebar_disable">
209
  <option value="redirect_to_url" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'redirect_to_url' ); ?>><?php _e( 'Redirect to URL', 'myStickymenu' );?></option>
210
  <option value="close_bar" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'close_bar' ); ?>><?php _e( 'Close bar', 'myStickymenu' );?></option>
211
+ <option value="poptin_popup" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'poptin_popup' ); ?> ><?php _e( 'Launch a Poptin pop-up', 'myStickymenu' );?></option>
212
  <option value="thankyou_screen" data-href="<?php echo esc_url($upgarde_url); ?>"><?php _e( 'Thank you screen (Upgrade Now)', 'myStickymenu' );?></option>
213
  </select>
214
  </div>
216
  </div>
217
  </div>
218
 
219
+ <div class="mysticky-welcomebar-poptin-popup" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] != 'poptin_popup' ) : ?> style="display:none;" <?php endif;?>>
220
+ <div class="mysticky-welcomebar-setting-content">
221
+ <p class="mysticky-welcomebar-poptin-content" >Sign up at <a href="https://www.poptin.com/?utm_source=msm" target="_blank">Poptin</a> for free and launch pop-ups on <a href="https://help.poptin.com/article/show/72942-how-to-show-a-poptin-when-the-visitor-clicks-on-a-button-link-on-your-site" target="_blank">click</a>
222
+ </p>
223
+ </div>
224
+ <div class="mysticky-welcomebar-setting-content">
225
+ <label><?php _e('Poptin pop-up direct link', 'myStickymenu'); ?></label>
226
+ <div class="mysticky-welcomebar-setting-content-right">
227
+ <input type="text" id="mysticky_welcomebar_poptin_popup_link" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_poptin_popup_link]" value="<?php echo (isset($welcomebar['mysticky_welcomebar_poptin_popup_link'])) ? $welcomebar['mysticky_welcomebar_poptin_popup_link'] : '';?>" placeholder="<?php echo esc_url("https://app.popt.in/APIRequest/click/some_id_here"); ?>" />
228
+ <input type="hidden" id="welcome_save_anyway" value='' />
229
+ </div>
230
+ </div>
231
+ </div>
232
+ <!-- -->
233
+
234
+ <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] != 'redirect_to_url' ) : ?> style="display:none;" <?php endif;?>>
235
  <label><?php _e('Redirection link', 'myStickymenu'); ?></label>
236
  <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-action mysticky-welcomebar-redirect" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?> >
237
  <input type="text" id="mysticky_welcomebar_redirect" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_redirect]" value="<?php echo esc_url($welcomebar['mysticky_welcomebar_redirect']);?>" placeholder="<?php echo esc_url("https://www.yourdomain.com"); ?>" />
238
  </div>
239
  </div>
240
+ <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] != 'redirect_to_url' ) : ?> style="display:none;" <?php endif;?>>
241
  <label><?php _e( 'Open in a new tab', 'mystickymenu' );?></label>
242
  <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-newtab mysticky-welcomebar-redirect" >
243
  <label class="mysticky-welcomebar-switch">
247
  <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span>
248
  </div>
249
  </div>
250
+ <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-redirect-container" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] != 'redirect_to_url' ) : ?> style="display:none;" <?php endif;?>>
251
  <label><?php _e('rel Attribute', 'myStickymenu'); ?>
252
  <span class="mysticky-custom-fields-tooltip">
253
  <a href="javascript:void(0);" class="mysticky-tooltip mysticky-new-custom-btn"><i class="dashicons dashicons-editor-help"></i></a>
416
  <?php echo wpautop(isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase");?>
417
  </div>
418
  <div class="mysticky-welcomebar-btn">
419
+ <a href="#" ><?php echo isset($welcomebar['mysticky_welcomebar_btn_text']) ? stripslashes($welcomebar['mysticky_welcomebar_btn_text']) : "Got it!";?></a>
420
  </div>
421
  <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a>
422
  </div>
444
  <?php _e('Your Welcome Bar is currently turned off, would you like to save and show it on your site?', 'mystickymenu' ); ?>
445
  </p>
446
  </div>
447
+
448
+ <div id="mysticky-welcomebar-poptin-popup-confirm" style="display:none;" title="<?php esc_attr_e( 'Poptin pop-up is not configured properly', 'mystickymenu' ); ?>">
449
+ <p>
450
+ Seems like you haven't filled up the Poptin pop-up direct link field properly. Please <a href="https://help.poptin.com/article/show/72942-how-to-show-a-poptin-when-the-visitor-clicks-on-a-button-link-on-your-site" target="_blank">check the guide</a> to know how you can copy direct link of a pop-up from Poptin.
451
+ </p>
452
+ </div>
453
  <script>
454
  jQuery(".mysticky-welcomebar-fixed").on(
455
  "animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd",
1008
  $display_main_class = "mysticky-welcomebar-position-" . $welcomebar['mysticky_welcomebar_position'] . $mysticky_welcomebar_showx_desktop . $mysticky_welcomebar_showx_mobile . $mysticky_welcomebar_btn_desktop . $mysticky_welcomebar_btn_mobile . $mysticky_welcomebar_display_desktop . $mysticky_welcomebar_display_mobile .$display . $display_entry_effect;
1009
 
1010
  if( isset($welcomebar['mysticky_welcomebar_actionselect']) ) {
1011
+
1012
  if( $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' ) {
1013
+ $mysticky_welcomebar_actionselect_url = esc_url( $welcomebar['mysticky_welcomebar_redirect'] );
1014
+ } else if( $welcomebar['mysticky_welcomebar_actionselect'] == 'poptin_popup'){
1015
+ $mysticky_welcomebar_actionselect_url = esc_url( $welcomebar['mysticky_welcomebar_poptin_popup_link'] );
1016
+ } else {
1017
+ $mysticky_welcomebar_actionselect_url = 'javascript:void(0)';
1018
+ }
1019
+ }
 
 
 
 
 
1020
 
1021
  ?>
1022
  <div class="mysticky-welcomebar-fixed <?php echo $display_main_class; ?>" style="<?php //echo $welcomebar_enable_block; ?>" data-after-triger="after_a_few_seconds" data-triger-sec="0" data-position="<?php echo esc_attr($welcomebar['mysticky_welcomebar_position']);?>" data-height="<?php echo esc_attr($welcomebar['mysticky_welcomebar_height']);?>" data-rediect="<?php echo esc_attr($welcomebar['mysticky_welcomebar_actionselect']);?>" data-aftersubmission="<?php echo esc_attr($welcomebar['mysticky_welcomebar_aftersubmission']);?>">
1025
  <?php echo wpautop( isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase" );?>
1026
  </div>
1027
  <div class="mysticky-welcomebar-btn">
1028
+ <a href="<?php echo $mysticky_welcomebar_actionselect_url; ?>" <?php if( isset($welcomebar['mysticky_welcomebar_redirect_newtab']) && $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' && $welcomebar['mysticky_welcomebar_redirect_newtab']== 1):?> target="_blank" <?php endif;?>><?php echo isset($welcomebar['mysticky_welcomebar_btn_text'])? stripslashes($welcomebar['mysticky_welcomebar_btn_text']) :"Got it!";?></a>
1029
  </div>
1030
  <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a>
1031
  </div>