Sticky Menu (or Anything!) on Scroll - Version 2.23

Version Description

  • 2020-10-01
  • more CSS fixes
  • added promo campaign for WP 301 Redirects
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Sticky Menu (or Anything!) on Scroll
Version 2.23
Comparing to
See all releases

Code changes from version 2.22 to 2.23

assets/js/jq-sticky-anything.js CHANGED
@@ -299,7 +299,7 @@ console.error(
299
  .addClass("element-is-sticky")
300
  .css(
301
  "cssText",
302
- "margin-top: " +
303
  stickyTopMargin +
304
  "px !important; margin-left: 0 !important"
305
  )
@@ -310,10 +310,6 @@ console.error(
310
  .css("padding", paddingSticky)
311
  .css("z-index", stickyZindex);
312
 
313
- $(".sticky-element-original").each(function () {
314
- this.style.setProperty("margin-top", stickyTopMargin, "important");
315
- });
316
-
317
  if (!$(".sticky-element-placeholder").hasClass("sticky-element-active")) {
318
  $(".sticky-element-placeholder")
319
  .addClass("sticky-element-active")
299
  .addClass("element-is-sticky")
300
  .css(
301
  "cssText",
302
+ originalInlineStyles + "margin-top: " +
303
  stickyTopMargin +
304
  "px !important; margin-left: 0 !important"
305
  )
310
  .css("padding", paddingSticky)
311
  .css("z-index", stickyZindex);
312
 
 
 
 
 
313
  if (!$(".sticky-element-placeholder").hasClass("sticky-element-active")) {
314
  $(".sticky-element-placeholder")
315
  .addClass("sticky-element-active")
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
  === Sticky Menu, Sticky Header (or anything!) on Scroll ===
2
- Contributors: webfactory, wpreset, underconstructionpage, googlemapswidget
3
  Tags: sticky header, sticky menu, sticky, header, sticky widget, floating menu, menu
4
  Plugin URI: https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/
5
  Requires at least: 3.6
6
  Tested up to: 5.5
7
- Stable tag: 2.22
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Sticky Menu or Sticky Header lets you stick any element at the top of the screen when you scroll, or create a floating menu.
12
 
13
  == Description ==
14
 
@@ -127,6 +127,11 @@ Please go to the plugin's [support forum on WordPress.org](https://wordpress.org
127
 
128
  == Changelog ==
129
 
 
 
 
 
 
130
  = 2.22 =
131
  * 2020-09-08
132
  * improvement for themes with !important rule at margin top and left within sticky element
1
  === Sticky Menu, Sticky Header (or anything!) on Scroll ===
2
+ Contributors: webfactory
3
  Tags: sticky header, sticky menu, sticky, header, sticky widget, floating menu, menu
4
  Plugin URI: https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/
5
  Requires at least: 3.6
6
  Tested up to: 5.5
7
+ Stable tag: 2.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Sticky Menu or Sticky Header lets you stick any element at the top of the screen when you scroll or create a floating sticky menu.
12
 
13
  == Description ==
14
 
127
 
128
  == Changelog ==
129
 
130
+ = 2.23 =
131
+ * 2020-10-01
132
+ * more CSS fixes
133
+ * added promo campaign for WP 301 Redirects
134
+
135
  = 2.22 =
136
  * 2020-09-08
137
  * improvement for themes with !important rule at margin top and left within sticky element
sticky-menu-or-anything.php CHANGED
@@ -5,11 +5,13 @@ Plugin URI: https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/
5
  Description: Pick any element on the page, and it will stick when it reaches the top of the page when you scroll down. Handy for navigation menus, but can be used for any element on the page.
6
  Author: WebFactory Ltd
7
  Author URI: https://www.webfactoryltd.com/
8
- Version: 2.22
9
  */
10
 
11
  defined('ABSPATH') or die('INSERT COIN');
12
 
 
 
13
 
14
  /**
15
  * === FUNCTIONS ========================================================================================
5
  Description: Pick any element on the page, and it will stick when it reaches the top of the page when you scroll down. Handy for navigation menus, but can be used for any element on the page.
6
  Author: WebFactory Ltd
7
  Author URI: https://www.webfactoryltd.com/
8
+ Version: 2.23
9
  */
10
 
11
  defined('ABSPATH') or die('INSERT COIN');
12
 
13
+ require_once 'wp301/wp301.php';
14
+ new wf_wp301(__FILE__, 'settings_page_stickyanythingmenu');
15
 
16
  /**
17
  * === FUNCTIONS ========================================================================================
wp301/wp301-logo.png ADDED
Binary file
wp301/wp301.js ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Campaign for WP 301 Redirects PRO
3
+ * (c) WebFactory Ltd, 2020
4
+ */
5
+
6
+ jQuery(document).ready(function ($) {
7
+ $('#wp301promo_dismiss').on('click', function (e) {
8
+ e.preventDefault();
9
+
10
+ var slug = $(this).data('plugin-slug');
11
+
12
+ $.get({
13
+ url: ajaxurl,
14
+ data: {
15
+ action: 'wp301_promo_dismiss',
16
+ slug: slug,
17
+ _ajax_nonce: wp301_promo.nonce_wp301_promo_dismiss,
18
+ },
19
+ })
20
+ .always(function (data) {})
21
+ .done(function (data) {
22
+ if (data.success) {
23
+ if (slug == 'dashboard') {
24
+ $('#wp301promo_widget').hide();
25
+ } else {
26
+ $('#wp301-dialog').dialog('close');
27
+ }
28
+ } else {
29
+ alert('Sorry, something is not right. Please reload the page and try again.');
30
+ }
31
+ })
32
+ .fail(function (data) {
33
+ alert('Sorry, something is not right. Please reload the page and try again.');
34
+ });
35
+ }); // dismiss
36
+
37
+
38
+ $('#wp301promo_submit').on('click', function (e) {
39
+ e.preventDefault();
40
+
41
+ var btn = $('#wp301promo_submit');
42
+ var name = $('#wp301promo_name').val();
43
+ var email = $('#wp301promo_email').val();
44
+ var plugin = $('#wp301promo_plugin').val();
45
+ var position = $('#wp301promo_position').val();
46
+ var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
47
+
48
+ if (name.length < 2 || name.length > 128) {
49
+ $('#wp301promo_name').focus();
50
+ alert('Please enter your name. Thank you 👍');
51
+ return false;
52
+ }
53
+ if (!regex.test(email) || email.lenght > 128) {
54
+ $('#wp301promo_email').focus();
55
+ alert('Please enter a valid email address. Thank you 👍');
56
+ return false;
57
+ }
58
+
59
+ $(btn).addClass('disabled');
60
+ $.get({
61
+ url: ajaxurl,
62
+ data: {
63
+ action: 'wp301_promo_submit',
64
+ _ajax_nonce: wp301_promo.nonce_wp301_promo_submit,
65
+ name: name,
66
+ email: email,
67
+ position: position,
68
+ plugin: plugin,
69
+ },
70
+ })
71
+ .always(function (data) {
72
+ $(btn).removeClass('disabled');
73
+ })
74
+ .done(function (data) {
75
+ if (data.success) {
76
+ alert(data.data);
77
+
78
+ if (position == 'dashboard') {
79
+ $('#wp301promo_widget').hide();
80
+ } else {
81
+ $('#wp301-dialog').dialog('close');
82
+ }
83
+ } else {
84
+ alert(data.data);
85
+ }
86
+ })
87
+ .fail(function (data) {
88
+ alert('Sorry, something is not right. Please reload the page and try again.');
89
+ });
90
+ });
91
+
92
+
93
+ $('#wp301promo_name, #wp301promo_email').on('keypress', function (e) {
94
+ if (e.which == 13) {
95
+ $('#wp301promo_submit').trigger('click');
96
+ }
97
+ }); // on enter
98
+
99
+
100
+ if (wp301_promo.open_popup && $('#wp301-dialog').length == 1) {
101
+ $('#wp301-dialog').dialog({
102
+ dialogClass: 'wp-dialog wp301-dialog',
103
+ modal: true,
104
+ resizable: false,
105
+ width: 550,
106
+ height: 'auto',
107
+ show: 'fade',
108
+ hide: 'fade',
109
+ close: function (event, ui) {},
110
+ open: function (event, ui) {
111
+ $(this)
112
+ .siblings()
113
+ .find('span.ui-dialog-title')
114
+ .html('Get a WP 301 Redirects PRO license for FREE <del>$158</del>');
115
+ wp301_fix_dialog_close(event, ui);
116
+ },
117
+ autoOpen: true,
118
+ closeOnEscape: false,
119
+ });
120
+ } // open dialog
121
+ }); // jQuery ready
122
+
123
+
124
+ function wp301_fix_dialog_close(event, ui) {
125
+ jQuery('.ui-widget-overlay').bind('click', function () {
126
+ jQuery('#' + event.target.id).dialog('close');
127
+ });
128
+ } // wp301_fix_dialog_close
wp301/wp301.php ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Campaign for WP 301 Redirects PRO
5
+ * (c) WebFactory Ltd, 2020
6
+ */
7
+
8
+
9
+ if (false == class_exists('wf_wp301')) {
10
+ class wf_wp301
11
+ {
12
+ var $plugin_file = '';
13
+ var $plugin_slug = '';
14
+ var $plugin_screen = '';
15
+ var $options = '';
16
+
17
+
18
+ function __construct($plugin_file, $plugin_screen)
19
+ {
20
+ $this->plugin_file = $plugin_file;
21
+ $this->plugin_slug = basename(dirname($plugin_file));
22
+ $this->plugin_screen = $plugin_screen;
23
+ $this->options = get_option('wp301promo', array());
24
+
25
+ if (!is_admin() || !empty($this->options['email_submitted']) || date('Y-m-d') > '2020-11-05') {
26
+ return;
27
+ } else {
28
+ add_action('admin_init', array($this, 'init'));
29
+ }
30
+ } // __construct
31
+
32
+
33
+ function init()
34
+ {
35
+ add_action('wp_dashboard_setup', array($this, 'add_widget'));
36
+ add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
37
+ add_action('wp_ajax_wp301_promo_submit', array($this, 'ajax_submit'));
38
+ add_action('wp_ajax_wp301_promo_dismiss', array($this, 'ajax_dismiss'));
39
+ add_action('admin_footer', array($this, 'admin_footer'));
40
+ } // init
41
+
42
+
43
+ function admin_enqueue_scripts()
44
+ {
45
+ $screen = get_current_screen();
46
+
47
+ if ($screen->base != 'dashboard' && $screen->id != $this->plugin_screen) {
48
+ return;
49
+ }
50
+
51
+ if ($screen->base == 'dashboard' && !empty($this->options['popup_dismissed_dashboard'])) {
52
+ return;
53
+ }
54
+
55
+ if ($screen->id == $this->plugin_screen) {
56
+ wp_enqueue_style('wp-jquery-ui-dialog');
57
+ wp_enqueue_script('jquery-ui-dialog');
58
+ }
59
+
60
+ wp_enqueue_script('wp301_promo', plugin_dir_url($this->plugin_file) . 'wp301/wp301.js');
61
+
62
+ $js_vars = array(
63
+ 'nonce_wp301_promo_submit' => wp_create_nonce('wp301_submit'),
64
+ 'nonce_wp301_promo_dismiss' => wp_create_nonce('wp301_dismiss'),
65
+ );
66
+
67
+ if (empty($this->options['popup_dismissed_' . $this->plugin_slug])) {
68
+ $js_vars['open_popup'] = true;
69
+ }
70
+
71
+ wp_localize_script('wp301_promo', 'wp301_promo', $js_vars);
72
+ } // admin_enqueue_scripts
73
+
74
+
75
+ function ajax_dismiss()
76
+ {
77
+ if (!wp_verify_nonce(@$_GET['_ajax_nonce'], 'wp301_dismiss')) {
78
+ wp_send_json_error('Something is not right. Please reload the page and try again.');
79
+ }
80
+
81
+ $slug = substr(strip_tags(trim(@$_GET['slug'])), 0, 64);
82
+
83
+ $this->options['popup_dismissed_' . $slug] = true;
84
+ $tmp = update_option('wp301promo', $this->options);
85
+
86
+ if ($tmp) {
87
+ wp_send_json_success();
88
+ } else {
89
+ wp_send_json_error();
90
+ }
91
+ } // ajax_dismiss
92
+
93
+
94
+ function ajax_submit()
95
+ {
96
+ if (!wp_verify_nonce(@$_GET['_ajax_nonce'], 'wp301_submit')) {
97
+ wp_send_json_error('Something is not right. Please reload the page and try again.');
98
+ }
99
+
100
+ $email = strip_tags(trim(@$_GET['email']));
101
+ $name = strip_tags(trim(@$_GET['name']));
102
+ $plugin = strip_tags(trim(@$_GET['plugin'])) . '-' . strip_tags(trim(@$_GET['position']));
103
+
104
+ if (!is_email($email)) {
105
+ wp_send_json_error('Please enter a valid email address.');
106
+ }
107
+
108
+ $url = add_query_arg(array('name' => $name, 'email' => $email, 'plugin' => $plugin), 'https://wp301redirects.com/subscribe/');
109
+
110
+ $response = wp_remote_get($url, array('timeout' => 25));
111
+
112
+ if (is_wp_error($response)) {
113
+ wp_send_json_error('Something is not right. Please reload the page and try again.');
114
+ }
115
+
116
+ $body = @json_decode(wp_remote_retrieve_body($response), true);
117
+ if (empty($body['success'])) {
118
+ wp_send_json_error('Something is not right. Please reload the page and try again.');
119
+ }
120
+
121
+ $this->options['email_submitted'] = true;
122
+ update_option('wp301promo', $this->options);
123
+ wp_send_json_success('Thank you for trusting us with your email! You\'ll hear from us soon 🚀');
124
+ } // ajax_submit
125
+
126
+
127
+ function add_widget()
128
+ {
129
+ if (!empty($this->options['popup_dismissed_dashboard'])) {
130
+ return;
131
+ }
132
+
133
+ add_meta_box('wp301promo_widget', 'Get a WP 301 Redirects PRO license for FREE <del>$158</del>', array($this, 'widget_content'), 'dashboard', 'side', 'high');
134
+ } // add_widget
135
+
136
+
137
+ function widget_content()
138
+ {
139
+ $out = '';
140
+
141
+ $out .= '<style>';
142
+ $out .= '#wp301promo_widget .disabled { pointer-events: none; }';
143
+ $out .= '#wp301promo_widget label { font-weight: normal; display: inline-block; width: 15%; margin-bottom: 10px; }';
144
+ $out .= '#wp301promo_widget input { width: 74%; margin-bottom: 10px; }';
145
+ $out .= '#wp301promo_widget .button-primary { padding: 14px 28px; text-decoration: none; line-height: 1; }';
146
+ $out .= '#wp301promo_dismiss { font-style: italic; display: inline-block; color: #444; text-decoration: none; margin: 8px 0 0 0; }';
147
+ $out .= '#wp301promo_dismiss:hover { text-decoration: underline; }';
148
+ $out .= '#wp301promo_widget, #wp301promo_widget p { font-size: 14px; }';
149
+ $out .= '#wp301promo_widget .title301 { font-weight: 600; margin: 10px 0 -10px 0; }';
150
+ $out .= '#wp301promo_widget img { max-width: 60%; }';
151
+ $out .= '#wp301promo_widget .center { text-align: center; }';
152
+ $out .= '#wp301promo_email { margin-bottom: 0 !important; }';
153
+ $out .= '#wp301promo_widget { background-color: #fafafa; }';
154
+ $out .= '#wp301promo_widget li a { text-decoration: underline; }';
155
+ $out .= '#wp301promo_widget .wp301inside { padding: 25px 12px 0px 12px; position: relative; }';
156
+ $out .= '#wp301promo_widget p { margin-top: 14px; line-height: 1.5; }';
157
+ $out .= '#wp301promo_widget small { margin-left: 17%; }';
158
+ $out .= '#wp301promo_widget ul { font-size: 14px; margin: 0 0 20px 0; list-style-type: disc; list-style-position: inside; }';
159
+ $out .= '#wp301promo_widget li { margin-bottom: 3px; }';
160
+ $out .= '#wp301promo_submit span { display: none; text-decoration: none; margin-right: 10px; animation: wf-spin-animation 1.5s infinite linear; }';
161
+ $out .= '#wp301promo_submit.disabled span { display: inline-block; }';
162
+ $out .= '@keyframes wf-spin-animation {
163
+ from { transform: rotate(0deg); }
164
+ to { transform: rotate(360deg); }
165
+ }';
166
+ $out .= '#wp301promo_widget .inside { overflow: hidden; margin: 0; }
167
+ .ribbon { margin: 0; padding: 11px 20px 10px 20px; background: #007cba; color: #FFF; font-weight: 800; position: absolute; top: -17px; right: -17px; transform: translateX(30%) translateY(0%) rotate(45deg); transform-origin: top left; letter-spacing: 1px; }
168
+ .ribbon:before, .ribbon:after { content: ""; position: absolute; top:0; margin: 0 -1px; width: 100%; height: 100%; background: #007cba; }
169
+ .ribbon:before { right:100%; }
170
+ .ribbon:after { left:100%; }';
171
+ $out .= '</style>';
172
+
173
+ $plugin_url = plugin_dir_url($this->plugin_file);
174
+
175
+ $out .= '<div class="ribbon">FREE</div>';
176
+ $out .= '<div class="wp301inside">';
177
+
178
+ $out .= '<div class="center"><a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-dashboard" target="_blank"><img src="' . $plugin_url . 'wp301/wp301-logo.png' . '" alt="WP 301 Redirects PRO" title="WP 301 Redirects PRO"></a></div>';
179
+
180
+ $out .= '<p>On November 6th <a href="https://www.webfactoryltd.com/" target="_blank">WebFactory Ltd</a> will give away a limited number of lifetime WP 301 Redirect PRO licenses, <b>each for 10 sites</b>. A $158 retail value! 🚀 Leave your email, we\'ll send you a link &amp; download your copy.</p><p style="margin-bottom: 0;"><b>What do I get?</b></p>';
181
+
182
+ $out .= '<ul>';
183
+ $out .= '<li>Automatically fix 404 errors &amp; URL typos</li>';
184
+ $out .= '<li>Create advanced redirect rules &amp; control affiliate links</li>';
185
+ $out .= '<li>Detailed log of all redirects &amp; 404s</li>';
186
+ $out .= '<li>Manage all sites\' licenses from a central Dashboard</li>';
187
+ $out .= '<li>Lifetime license for 10 sites. <a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-dashboard" target="_blank">See all features</a></li>';
188
+ $out .= '</ul>';
189
+
190
+ $out .= '
191
+ <div>
192
+ <label for="wp301promo_name">Name:</label>
193
+ <input type="text" name="wp301promo_name" id="wp301promo_name" placeholder="How shall we call you?"><br>
194
+ <label for="wp301promo_email">Email:</label>
195
+ <input type="text" name="wp301promo_email" id="wp301promo_email" placeholder="Your best email address to get the plugin"><br>
196
+ <small>We hate spam as much as you do and never send it!</small>
197
+ <input type="hidden" id="wp301promo_plugin" value="' . $this->plugin_slug . '">
198
+ <input type="hidden" id="wp301promo_position" value="dashboard">
199
+ </div>
200
+
201
+ <p class="center">
202
+ <a id="wp301promo_submit" class="button button-primary" href="#"><span class="dashicons dashicons-update"></span>I Want My FREE License <del>$158</del></a><br>
203
+ <a id="wp301promo_dismiss" class="" href="#" data-plugin-slug="dashboard">I don\'t want a free license; don\'t show this again</a>
204
+ </p>
205
+ </div>';
206
+
207
+ echo $out;
208
+ } // widget_content
209
+
210
+
211
+ function admin_footer()
212
+ {
213
+ $screen = get_current_screen();
214
+ if ($screen->id != $this->plugin_screen) {
215
+ return;
216
+ }
217
+
218
+ $out = '';
219
+
220
+ $out .= '<style>';
221
+ $out .= '#wp301promo_widget .disabled { pointer-events: none; }';
222
+ $out .= '.wp301-dialog .ui-dialog-titlebar-close { visibility: hidden; }';
223
+ $out .= '#wp301-dialog label { font-weight: normal; display: inline-block; width: 15%; margin-bottom: 10px; }';
224
+ $out .= '#wp301-dialog input { width: 74%; margin-bottom: 10px; }';
225
+ $out .= '#wp301-dialog .button-primary { padding: 14px 28px; text-decoration: none; line-height: 1; }';
226
+ $out .= '#wp301-dialog, #wp301-dialog p { font-size: 14px; }';
227
+ $out .= '#wp301-dialog .title301 { font-size: 1.3em; font-weight: 600; margin: 10px 0 -10px 0; }';
228
+ $out .= '#wp301-dialog img { max-width: 60%; }';
229
+ $out .= '#wp301-dialog li a { text-decoration: underline; }';
230
+ $out .= '#wp301-dialog small { margin-left: 16%; }';
231
+ $out .= '#wp301-dialog .center { text-align: center; }';
232
+ $out .= '#wp301-dialog, .wp301-dialog .ui-dialog-titlebar { background-color: #fafafa; }';
233
+ $out .= '#wp301-dialog .wp301inside { padding: 12px 12px 0px 12px; }';
234
+ $out .= '#wp301-dialog p { margin-top: 14px; line-height: 1.5; }';
235
+ $out .= '#wp301-dialog ul { margin: 0 0 20px 0; list-style-type: disc; list-style-position: inside; }';
236
+ $out .= '#wp301-dialog li { margin-bottom: 3px; }';
237
+ $out .= '#wp301promo_dismiss { display: inline-block; color: #444; text-decoration: none; margin: 8px 0 0 0; }';
238
+ $out .= '#wp301promo_dismiss:hover { text-decoration: underline; }';
239
+ $out .= '#wp301promo_submit span { display: none; text-decoration: none; margin-right: 10px; animation: wf-spin-animation 1.5s infinite linear; }';
240
+ $out .= '#wp301promo_submit.disabled span { display: inline-block; }';
241
+ $out .= '@keyframes wf-spin-animation {
242
+ from { transform: rotate(0deg); }
243
+ to { transform: rotate(360deg); }
244
+ }';
245
+ $out .= '#wp301promo_widget .inside { overflow: hidden; margin: 0; }
246
+ .ribbon { margin: 0; padding: 11px 20px 10px 20px; background: #007cba; color: #FFF; font-weight: 800; position: absolute; top: -17px; right: -17px; transform: translateX(30%) translateY(0%) rotate(45deg); transform-origin: top left; letter-spacing: 1px; }
247
+ .ribbon:before, .ribbon:after { content: ""; position: absolute; top:0; margin: 0 -1px; width: 100%; height: 100%; background: #007cba; }
248
+ .ribbon:before { right:100%; }
249
+ .ribbon:after { left:100%; }';
250
+ $out .= '</style>';
251
+
252
+ $out .= '<div id="wp301-dialog" style="display: none;" title="Get a WP 301 Redirects PRO license for FREE"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
253
+
254
+ $plugin_url = plugin_dir_url($this->plugin_file);
255
+
256
+ $out .= '<div class="wp301inside">';
257
+ $out .= '<div class="ribbon">FREE</div>';
258
+
259
+ $out .= '<div class="center"><a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-popup" target="_blank"><img src="' . $plugin_url . 'wp301/wp301-logo.png' . '" alt="WP 301 Redirects PRO" title="WP 301 Redirects PRO"></a></div>';
260
+
261
+ $out .= '<p>On November 6th <a href="https://www.webfactoryltd.com/" target="_blank">WebFactory Ltd</a> will give away a limited number of lifetime WP 301 Redirect PRO licenses, <b>each for 10 sites</b>. A $158 retail value! 🚀 Leave your email, we\'ll send you a link &amp; download your copy.</p><p style="margin-bottom: 0;"><b>What do I get?</b></p>';
262
+
263
+ $out .= '<ul>';
264
+ $out .= '<li>Automatically fix 404 errors &amp; URL typos</li>';
265
+ $out .= '<li>Create advanced redirect rules &amp; control affiliate links</li>';
266
+ $out .= '<li>Detailed log of all redirects &amp; 404s</li>';
267
+ $out .= '<li>Manage all sites\' licenses from a central Dashboard</li>';
268
+ $out .= '<li>Lifetime license for 10 sites. <a href="https://wp301redirects.com/free-license/?ref=free-' . $this->plugin_slug . '-dashboard" target="_blank">See all features</a></li>';
269
+ $out .= '</ul>';
270
+
271
+ $out .= '
272
+ <div>
273
+ <label for="wp301promo_name">Name:</label>
274
+ <input type="text" name="wp301promo_name" id="wp301promo_name" placeholder="How shall we call you?"><br>
275
+ <label for="wp301promo_email">Email:</label>
276
+ <input type="text" name="wp301promo_email" id="wp301promo_email" placeholder="Your best email address to get the plugin"><br>
277
+ <small>We hate spam as much as you do and never send it!</small>
278
+ <input type="hidden" id="wp301promo_plugin" value="' . $this->plugin_slug . '">
279
+ <input type="hidden" id="wp301promo_position" value="popup">
280
+ </div>
281
+
282
+ <p class="center">
283
+ <a id="wp301promo_submit" class="button button-primary" href="#"><span class="dashicons dashicons-update"></span>I Want My FREE License <del>$158</del></a><br>
284
+ <a id="wp301promo_dismiss" class="" href="#" data-plugin-slug="' . $this->plugin_slug . '">I don\'t want a free license; don\'t show this again</a>
285
+ </p>
286
+
287
+ </div>';
288
+
289
+ $out .= '</div>';
290
+
291
+ echo $out;
292
+ } // wp_footer
293
+ } // wf_wp301
294
+ }