myStickymenu - Version 2.1.3

Version Description

Fixed variable output warnings bugs

Download this release

Release Info

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

Code changes from version 2.1.2 to 2.1.3

Files changed (2) hide show
  1. mystickymenu.php +25 -23
  2. readme.txt +25 -4
mystickymenu.php CHANGED
@@ -3,16 +3,16 @@
3
Plugin Name: myStickymenu
4
Plugin URI: https://premio.io/
5
Description: Simple sticky (fixed on top) menu implementation for navigation menu. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
- Version: 2.1.2
7
Author: Premio
8
- Author URI: https://premio.io/
9
Text Domain: mystickymenu
10
Domain Path: /languages
11
License: GPLv2 or later
12
*/
13
14
defined('ABSPATH') or die("Cannot access pages directly.");
15
- define( 'MYSTICKY_VERSION', '2.1.2' );
16
17
class MyStickyMenuBackend
18
{
@@ -34,6 +34,7 @@ class MyStickyMenuBackend
34
35
public function mystickymenu_settings_link($links){
36
$settings_link = '<a href="options-general.php?page=my-stickymenu-settings">Settings</a>';
37
array_unshift($links, $settings_link);
38
return $links;
39
}
@@ -91,7 +92,8 @@ class MyStickyMenuBackend
91
92
$mysticky_options = get_option( 'mysticky_option_name');
93
$is_old = get_option("has_sticky_header_old_version");
94
- $is_old = ($is_old == "no")?false:true;
95
?>
96
<style>
97
div#wpcontent {
@@ -108,11 +110,11 @@ class MyStickyMenuBackend
108
<div id="mystickymenu" class="wrap mystickymenu">
109
<div class="sticky-header-menu">
110
<ul>
111
- <li><a href="#sticky-header-settings" class="active"><?php _e('Settings', 'mystickymenu'); ?></a></li>
112
- <li><a href="#sticky-header-upgrade"><?php _e('Upgrade to Pro', 'mystickymenu'); ?></a></li>
113
</ul>
114
</div>
115
- <div style="display: block" id="sticky-header-settings" class="sticky-header-content">
116
<div class="mystickymenu-heading">
117
<div class="myStickymenu-header-title">
118
<h3><?php _e('How To Make a Sticky Header', 'mystickymenu'); ?></h3>
@@ -215,11 +217,11 @@ class MyStickyMenuBackend
215
</td>
216
<td>
217
<label>
218
- <input name="mysticky_option_name[myfixed_fade]" value= "slide" type="radio" <?php checked( $mysticky_options['myfixed_fade'], 'slide' );?> />
219
<?php _e("Slide", 'mystickymenu'); ?>
220
</label>
221
<label>
222
- <input name="mysticky_option_name[myfixed_fade]" value="fade" type="radio" <?php checked( $mysticky_options['myfixed_fade'], 'fade' );?> />
223
<?php _e("Fade", 'mystickymenu'); ?>
224
</label>
225
</td>
@@ -294,7 +296,7 @@ class MyStickyMenuBackend
294
<?php if(!$is_old) { ?><span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span><?php } ?>
295
<p>
296
<label class="mysticky_text">
297
- <input id="myfixed_disable_scroll_down" name="mysticky_option_name[myfixed_disable_scroll_down]" type="checkbox" <?php checked( $mysticky_options['myfixed_disable_scroll_down'], 'on' );?> <?php echo !$is_old?"disabled":"" ?> />
298
<?php _e("Disable sticky menu at scroll down", 'mystickymenu'); ?>
299
</label>
300
</p>
@@ -303,7 +305,7 @@ class MyStickyMenuBackend
303
<label class="mysticky_title css-style-title"><?php _e("CSS style", 'mystickymenu'); ?></label>
304
<span class="mysticky_text"><?php _e( 'Add/edit CSS style. Leave it blank for default style.', 'mystickymenu');?></span>
305
<div class="mystickymenu-input-section">
306
- <textarea type="text" rows="4" cols="60" id="myfixed_cssstyle" name="mysticky_option_name[myfixed_cssstyle]" <?php echo !$is_old?"disabled":"" ?> ><?php echo $mysticky_options['myfixed_cssstyle'];?></textarea>
307
</div>
308
<p><?php esc_html_e( "CSS ID's and Classes to use:", "mystickymenu" );?></p>
309
<p>
@@ -320,7 +322,7 @@ class MyStickyMenuBackend
320
<label class="mysticky_title" for="disable_css"><?php _e("Disable CSS style", 'mystickymenu'); ?></label>
321
<div class="mystickymenu-input-section">
322
<label>
323
- <input id="disable_css" name="mysticky_option_name[disable_css]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['disable_css'], 'on' );?> />
324
<?php _e( 'Use this option if you plan to include CSS Style manually', 'mystickymenu' );?>
325
<label>
326
</div>
@@ -334,55 +336,55 @@ class MyStickyMenuBackend
334
<ul class="mystickymenu-input-multicheckbox">
335
<li>
336
<label>
337
- <input id="mysticky_disable_at_front_home" name="mysticky_option_name[mysticky_disable_at_front_home]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_front_home'], 'on' );?>/>
338
<span><?php _e('front page', 'mystickymenu' );?></span>
339
</label>
340
</li>
341
<li>
342
<label>
343
- <input id="mysticky_disable_at_blog" name="mysticky_option_name[mysticky_disable_at_blog]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_blog'], 'on' );?>/>
344
<span><?php _e('blog page', 'mystickymenu' );?></span>
345
</label>
346
</li>
347
<li>
348
<label>
349
- <input id="mysticky_disable_at_page" name="mysticky_option_name[mysticky_disable_at_page]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_page'], 'on' );?> />
350
<span><?php _e('pages', 'mystickymenu' );?> </span>
351
</label>
352
</li>
353
<li>
354
<label>
355
- <input id="mysticky_disable_at_tag" name="mysticky_option_name[mysticky_disable_at_tag]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_tag'], 'on' );?> />
356
<span><?php _e('tags', 'mystickymenu' );?> </span>
357
</label>
358
</li>
359
<li>
360
<label>
361
- <input id="mysticky_disable_at_category" name="mysticky_option_name[mysticky_disable_at_category]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_category'], 'on' );?>/>
362
<span><?php _e('categories', 'mystickymenu' );?></span>
363
</label>
364
</li>
365
<li>
366
<label>
367
- <input id="mysticky_disable_at_single" name="mysticky_option_name[mysticky_disable_at_single]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_single'], 'on' );?> />
368
<span><?php _e('posts', 'mystickymenu' );?> </span>
369
</label>
370
</li>
371
<li>
372
<label>
373
- <input id="mysticky_disable_at_archive" name="mysticky_option_name[mysticky_disable_at_archive]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_archive'], 'on' );?> />
374
<span><?php _e('archives', 'mystickymenu' );?> </span>
375
</label>
376
</li>
377
<li>
378
<label>
379
- <input id="mysticky_disable_at_search" name="mysticky_option_name[mysticky_disable_at_search]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_search'], 'on' );?> />
380
<span><?php _e('search', 'mystickymenu' );?> </span>
381
</label>
382
</li>
383
<li>
384
<label>
385
- <input id="mysticky_disable_at_404" name="mysticky_option_name[mysticky_disable_at_404]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( $mysticky_options['mysticky_disable_at_404'], 'on' );?>/>
386
<span><?php _e('404', 'mystickymenu' );?> </span>
387
</label>
388
</li>
@@ -432,7 +434,7 @@ class MyStickyMenuBackend
432
</form>
433
<p class="myStickymenu-review"><a href="https://wordpress.org/support/plugin/mystickymenu/reviews/" target="_blank"><?php _e('Leave a review','mystickymenu'); ?></a></p>
434
</div>
435
- <div id="sticky-header-upgrade" class="sticky-header-content">
436
<div id="rpt_pricr" class="rpt_plans rpt_3_plans rpt_style_basic">
437
<p class="udner-title">
438
<strong class="text-primary">Unlock All Features</strong>
@@ -526,7 +528,7 @@ class MyStickyMenuBackend
526
527
global $options;
528
$menu_locations = get_nav_menu_locations();
529
- $menu_object = wp_get_nav_menu_object( $menu_locations['menu-1'] );
530
531
if ( is_object($menu_object) && $menu_object->slug != '' ) {
532
$mysticky_class_id_selector = $menu_object->slug;
3
Plugin Name: myStickymenu
4
Plugin URI: https://premio.io/
5
Description: Simple sticky (fixed on top) menu implementation for navigation menu. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
+ Version: 2.1.3
7
Author: Premio
8
+ Author URI: https://premio.io/downloads/mystickymenu/
9
Text Domain: mystickymenu
10
Domain Path: /languages
11
License: GPLv2 or later
12
*/
13
14
defined('ABSPATH') or die("Cannot access pages directly.");
15
+ define( 'MYSTICKY_VERSION', '2.1.3' );
16
17
class MyStickyMenuBackend
18
{
34
35
public function mystickymenu_settings_link($links){
36
$settings_link = '<a href="options-general.php?page=my-stickymenu-settings">Settings</a>';
37
+ $links['go_pro'] = '<a href="'.admin_url("options-general.php?page=my-stickymenu-settings&type=upgrade").'" style="color: #FF5983;font-weight: bold;">'.__( 'Upgrade', 'stars-testimonials' ).'</a>';
38
array_unshift($links, $settings_link);
39
return $links;
40
}
92
93
$mysticky_options = get_option( 'mysticky_option_name');
94
$is_old = get_option("has_sticky_header_old_version");
95
+ $is_old = ($is_old == "no")?false:true;
96
+
97
?>
98
<style>
99
div#wpcontent {
110
<div id="mystickymenu" class="wrap mystickymenu">
111
<div class="sticky-header-menu">
112
<ul>
113
+ <li><a href="#sticky-header-settings" class="<?php echo (isset($_GET['type'])&&$_GET['type']=="upgrade")?"":"active" ?>"><?php _e('Settings', 'mystickymenu'); ?></a></li>
114
+ <li><a href="#sticky-header-upgrade" class="<?php echo (isset($_GET['type'])&&$_GET['type']=="upgrade")?"active":"" ?>"><?php _e('Upgrade to Pro', 'mystickymenu'); ?></a></li>
115
</ul>
116
</div>
117
+ <div style="display: <?php echo (isset($_GET['type'])&&$_GET['type']=="upgrade")?"none":"block" ?>" id="sticky-header-settings" class="sticky-header-content">
118
<div class="mystickymenu-heading">
119
<div class="myStickymenu-header-title">
120
<h3><?php _e('How To Make a Sticky Header', 'mystickymenu'); ?></h3>
217
</td>
218
<td>
219
<label>
220
+ <input name="mysticky_option_name[myfixed_fade]" value= "slide" type="radio" <?php checked( @$mysticky_options['myfixed_fade'], 'slide' );?> />
221
<?php _e("Slide", 'mystickymenu'); ?>
222
</label>
223
<label>
224
+ <input name="mysticky_option_name[myfixed_fade]" value="fade" type="radio" <?php checked( @$mysticky_options['myfixed_fade'], 'fade' );?> />
225
<?php _e("Fade", 'mystickymenu'); ?>
226
</label>
227
</td>
296
<?php if(!$is_old) { ?><span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="#" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span><?php } ?>
297
<p>
298
<label class="mysticky_text">
299
+ <input id="myfixed_disable_scroll_down" name="mysticky_option_name[myfixed_disable_scroll_down]" type="checkbox" <?php checked( @$mysticky_options['myfixed_disable_scroll_down'], 'on' );?> <?php echo !$is_old?"disabled":"" ?> />
300
<?php _e("Disable sticky menu at scroll down", 'mystickymenu'); ?>
301
</label>
302
</p>
305
<label class="mysticky_title css-style-title"><?php _e("CSS style", 'mystickymenu'); ?></label>
306
<span class="mysticky_text"><?php _e( 'Add/edit CSS style. Leave it blank for default style.', 'mystickymenu');?></span>
307
<div class="mystickymenu-input-section">
308
+ <textarea type="text" rows="4" cols="60" id="myfixed_cssstyle" name="mysticky_option_name[myfixed_cssstyle]" <?php echo !$is_old?"disabled":"" ?> ><?php echo @$mysticky_options['myfixed_cssstyle'];?></textarea>
309
</div>
310
<p><?php esc_html_e( "CSS ID's and Classes to use:", "mystickymenu" );?></p>
311
<p>
322
<label class="mysticky_title" for="disable_css"><?php _e("Disable CSS style", 'mystickymenu'); ?></label>
323
<div class="mystickymenu-input-section">
324
<label>
325
+ <input id="disable_css" name="mysticky_option_name[disable_css]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['disable_css'], 'on' );?> />
326
<?php _e( 'Use this option if you plan to include CSS Style manually', 'mystickymenu' );?>
327
<label>
328
</div>
336
<ul class="mystickymenu-input-multicheckbox">
337
<li>
338
<label>
339
+ <input id="mysticky_disable_at_front_home" name="mysticky_option_name[mysticky_disable_at_front_home]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_front_home'], 'on' );?>/>
340
<span><?php _e('front page', 'mystickymenu' );?></span>
341
</label>
342
</li>
343
<li>
344
<label>
345
+ <input id="mysticky_disable_at_blog" name="mysticky_option_name[mysticky_disable_at_blog]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_blog'], 'on' );?>/>
346
<span><?php _e('blog page', 'mystickymenu' );?></span>
347
</label>
348
</li>
349
<li>
350
<label>
351
+ <input id="mysticky_disable_at_page" name="mysticky_option_name[mysticky_disable_at_page]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_page'], 'on' );?> />
352
<span><?php _e('pages', 'mystickymenu' );?> </span>
353
</label>
354
</li>
355
<li>
356
<label>
357
+ <input id="mysticky_disable_at_tag" name="mysticky_option_name[mysticky_disable_at_tag]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_tag'], 'on' );?> />
358
<span><?php _e('tags', 'mystickymenu' );?> </span>
359
</label>
360
</li>
361
<li>
362
<label>
363
+ <input id="mysticky_disable_at_category" name="mysticky_option_name[mysticky_disable_at_category]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_category'], 'on' );?>/>
364
<span><?php _e('categories', 'mystickymenu' );?></span>
365
</label>
366
</li>
367
<li>
368
<label>
369
+ <input id="mysticky_disable_at_single" name="mysticky_option_name[mysticky_disable_at_single]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_single'], 'on' );?> />
370
<span><?php _e('posts', 'mystickymenu' );?> </span>
371
</label>
372
</li>
373
<li>
374
<label>
375
+ <input id="mysticky_disable_at_archive" name="mysticky_option_name[mysticky_disable_at_archive]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_archive'], 'on' );?> />
376
<span><?php _e('archives', 'mystickymenu' );?> </span>
377
</label>
378
</li>
379
<li>
380
<label>
381
+ <input id="mysticky_disable_at_search" name="mysticky_option_name[mysticky_disable_at_search]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_search'], 'on' );?> />
382
<span><?php _e('search', 'mystickymenu' );?> </span>
383
</label>
384
</li>
385
<li>
386
<label>
387
+ <input id="mysticky_disable_at_404" name="mysticky_option_name[mysticky_disable_at_404]" type="checkbox" <?php echo !$is_old?"disabled":"" ?> <?php checked( @$mysticky_options['mysticky_disable_at_404'], 'on' );?>/>
388
<span><?php _e('404', 'mystickymenu' );?> </span>
389
</label>
390
</li>
434
</form>
435
<p class="myStickymenu-review"><a href="https://wordpress.org/support/plugin/mystickymenu/reviews/" target="_blank"><?php _e('Leave a review','mystickymenu'); ?></a></p>
436
</div>
437
+ <div style="display: <?php echo (isset($_GET['type'])&&$_GET['type']=="upgrade")?"block":"none" ?>" id="sticky-header-upgrade" class="sticky-header-content">
438
<div id="rpt_pricr" class="rpt_plans rpt_3_plans rpt_style_basic">
439
<p class="udner-title">
440
<strong class="text-primary">Unlock All Features</strong>
528
529
global $options;
530
$menu_locations = get_nav_menu_locations();
531
+ $menu_object = isset($menu_locations['menu-1']) ? wp_get_nav_menu_object( $menu_locations['menu-1'] ) : array();
532
533
if ( is_object($menu_object) && $menu_object->slug != '' ) {
534
$mysticky_class_id_selector = $menu_object->slug;
readme.txt CHANGED
@@ -3,13 +3,13 @@ Contributors: tomeraharon, galdub, premio
3
Tags: sticky, menu, header, sticky menu, sticky header, floating, floating menu, floating navigation menu, navigation menu, navigation, sticky navigation menu
4
Requires at least: 3.5.1
5
Tested up to: 5.0
6
- Stable tag: 2.1.2
7
License: GPLv2 or later
8
9
This sticky menu plugin will make your menu or header stick to the top of page, after desired number of pixels when scrolled down and up.
10
11
== Description ==
12
- <strong>This sticky menu plugin will make your menu or header sticky on top of page, after desired number of pixels when scrolled. This lightweight plugin will help your visitors navigate easily and reach to the navigation menu without wasting time. Install My Sticky Menu and improve your website’s user experience! If you want to change the CSS style, disable on scroll down or disable on specific pages. check out the PRO version.</strong>
13
14
By default, sticky menu is designed to use element class ".navbar" as "Sticky Class". That value should be modified in plugin settings for different themes to make it work. Sticky Class is actually nothing more than an element class (or id) of the element that should become sticky.
15
@@ -34,12 +34,12 @@ My Sticky Menu plugin is originally designed for Twenty Thirteen template but sh
34
* Change the sticky transition time
35
* Define the z-index of the sticky header
36
37
- = WHAT DO YOU GET IN THE PRO PLAN? =
38
* Disable floating menu on Desktop/Mobile
39
* Disable floating menu on scroll down
40
* Add CSS style to the floating header
41
* Disable floating header on specific pages
42
- >> See Pro plans here
43
44
= Testimonials =
45
@@ -187,6 +187,25 @@ In CSS you can style your custom class while not sticky using custom class you a
187
188
In some cases you can use the whole header div and than just style it different with .myfixed class, hide what you don’t need using CSS display:none; property, and position logo and menu as you like.
189
190
== Screenshots ==
191
192
1. You can choose your current menu from the dropdown or enter it ID or class manually
@@ -195,6 +214,8 @@ In some cases you can use the whole header div and than just style it different
195
196
197
== Changelog ==
198
= 2.1.2 =
199
Upgrade page change
200
= 2.1.1 =
3
Tags: sticky, menu, header, sticky menu, sticky header, floating, floating menu, floating navigation menu, navigation menu, navigation, sticky navigation menu
4
Requires at least: 3.5.1
5
Tested up to: 5.0
6
+ Stable tag: 2.1.3
7
License: GPLv2 or later
8
9
This sticky menu plugin will make your menu or header stick to the top of page, after desired number of pixels when scrolled down and up.
10
11
== Description ==
12
+ <strong>This sticky menu plugin will make your menu or header sticky on top of page, after desired number of pixels when scrolled. This lightweight plugin will help your visitors navigate easily and reach to the navigation menu without wasting time. Install My Sticky Menu and improve your website’s user experience! If you want to change the CSS style, disable on scroll down or disable on specific pages. check out the <a href="https://premio.io/downloads/mystickymenu/" target="_blank" title="mystickymenu pro plans">Pro version</a>.</strong>
13
14
By default, sticky menu is designed to use element class ".navbar" as "Sticky Class". That value should be modified in plugin settings for different themes to make it work. Sticky Class is actually nothing more than an element class (or id) of the element that should become sticky.
15
34
* Change the sticky transition time
35
* Define the z-index of the sticky header
36
37
+ = WHAT DO YOU GET IN THE PRO PLAN =
38
* Disable floating menu on Desktop/Mobile
39
* Disable floating menu on scroll down
40
* Add CSS style to the floating header
41
* Disable floating header on specific pages
42
+ <a href="https://premio.io/downloads/mystickymenu/" target="_blank" title="mystickymenu pro plans"><strong>>>> See Pro plans here</strong></a>
43
44
= Testimonials =
45
187
188
In some cases you can use the whole header div and than just style it different with .myfixed class, hide what you don’t need using CSS display:none; property, and position logo and menu as you like.
189
190
+ = Is there a time limit for the free plan? =
191
+ No. you can use the free plan as long as you want.
192
+
193
+ = Can I use My Sticky Menu plugin on more than 1 domain? =
194
+ There 2 ways to do it:
195
+ 1. You can install the free Sticky Menu plugin plugin on any website you want
196
+ 2. You can buy the Pro plan that includes licenses for 5 domains, or the Agency plan that includes licenses for 20 domains.
197
+ Check out our <a href="https://premio.io/downloads/mystickymenu/" target="_blank" title="mystickymenu plans page">plans page</a>.
198
+
199
+ = How long is my paid Sticky Menu plugin plugin license valid for? =
200
+ Once you purchase any <a href="https://premio.io/downloads/mystickymenu/" target="_blank" title="mystickymenu plans page">paid plan</a> of my sticky menu, you can use it forever. Support and updates are available for 1 year. You can renew your license each year to get another year of support and updates.
201
+
202
+ = Will Sticky Menu plugin stop working if I don’t renew my license? =
203
+ Of course NOT! 🙂
204
+ Your Sticky Menu plugin plugin and all your settings will continue to work as before; however, you will no longer receive plugin updates including feature additions, improvements, and support.
205
+
206
+ = How do I activate my pro plan? =
207
+ Just follow our <a href="https://premio.io/wordpress-premio-pro-version-installation-guide/" target="_blank" title="WordPress installation guide">pro installation guide</a>.
208
+
209
== Screenshots ==
210
211
1. You can choose your current menu from the dropdown or enter it ID or class manually
214
215
216
== Changelog ==
217
+ = 2.1.3 =
218
+ Fixed variable output warnings bugs
219
= 2.1.2 =
220
Upgrade page change
221
= 2.1.1 =