myStickymenu - Version 1.8.6

Version Description

Download this release

Release Info

Developer damiroquai
Plugin Icon 128x128 myStickymenu
Version 1.8.6
Comparing to
See all releases

Code changes from version 1.8.5 to 1.8.6

Files changed (2) hide show
  1. mystickymenu.php +35 -13
  2. readme.txt +5 -9
mystickymenu.php CHANGED
@@ -3,8 +3,9 @@
3
  Plugin Name: myStickymenu
4
  Plugin URI: http://wordpress.transformnews.com/plugins/mystickymenu-simple-sticky-fixed-on-top-menu-implementation-for-twentythirteen-menu-269
5
  Description: Simple sticky (fixed on top) menu implementation for default Twentythirteen navigation menu. For other themes, after install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
- Version: 1.8.5
7
  Author: m.r.d.a
 
8
  Text Domain: mystickymenu
9
  Domain Path: /languages
10
  License: GPLv2 or later
@@ -12,7 +13,7 @@
12
 
13
  defined('ABSPATH') or die("Cannot access pages directly.");
14
 
15
- class MyStickyMenuPage
16
  {
17
 
18
  private $options;
@@ -366,11 +367,20 @@ class MyStickyMenuPage
366
 
367
  }
368
 
369
- if( is_admin() )
370
- $my_settings_page = new MyStickyMenuPage();
 
 
371
 
 
 
 
 
 
 
372
 
373
- function mysticky_remove_more_jump_link($link)
 
374
  {
375
  $offset = strpos($link, '#more-');
376
  if ($offset) {
@@ -382,20 +392,22 @@ class MyStickyMenuPage
382
  return $link;
383
  }
384
 
385
- add_filter('the_content_more_link', 'mysticky_remove_more_jump_link');
386
-
387
 
388
- function mysticky_build_stylesheet_content() {
 
389
 
390
  $mysticky_options = get_option( 'mysticky_option_name' );
391
 
392
- if (isset($mysticky_options['disable_css'])){
 
393
  //do nothing
394
  } else {
395
  $mysticky_options['disable_css'] = false;
396
  };
397
 
398
- if ($mysticky_options ['disable_css'] == false ){
 
399
 
400
  echo
401
  '<style type="text/css">';
@@ -447,9 +459,9 @@ if ($mysticky_options ['disable_css'] == false ){
447
  }
448
  }
449
 
450
- add_action('wp_head', 'mysticky_build_stylesheet_content');
451
 
452
- function mystickymenu_script() {
453
 
454
  $mysticky_options = get_option( 'mysticky_option_name' );
455
 
@@ -487,5 +499,15 @@ if ($mysticky_options ['disable_css'] == false ){
487
  wp_localize_script( 'mystickymenu', 'mysticky_name', $mysticky_translation_array );
488
  }
489
 
490
- add_action( 'wp_enqueue_scripts', 'mystickymenu_script' );
 
 
 
 
 
 
 
 
 
 
491
  ?>
3
  Plugin Name: myStickymenu
4
  Plugin URI: http://wordpress.transformnews.com/plugins/mystickymenu-simple-sticky-fixed-on-top-menu-implementation-for-twentythirteen-menu-269
5
  Description: Simple sticky (fixed on top) menu implementation for default Twentythirteen navigation menu. For other themes, after install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
+ Version: 1.8.6
7
  Author: m.r.d.a
8
+ Author URI: http://wordpress.transformnews.com/
9
  Text Domain: mystickymenu
10
  Domain Path: /languages
11
  License: GPLv2 or later
13
 
14
  defined('ABSPATH') or die("Cannot access pages directly.");
15
 
16
+ class MyStickyMenuBackend
17
  {
18
 
19
  private $options;
367
 
368
  }
369
 
370
+
371
+
372
+ class MyStickyMenuFrontend
373
+ {
374
 
375
+ public function __construct()
376
+ {
377
+ add_action( 'wp_head', array( $this, 'mysticky_build_stylesheet_content' ) );
378
+ add_action( 'wp_enqueue_scripts', array( $this, 'mystickymenu_script' ) );
379
+ add_filter( 'the_content_more_link', array( $this, 'mysticky_remove_more_jump_link' ) );
380
+ }
381
 
382
+
383
+ public function mysticky_remove_more_jump_link($link)
384
  {
385
  $offset = strpos($link, '#more-');
386
  if ($offset) {
392
  return $link;
393
  }
394
 
395
+ // add_filter('the_content_more_link', 'mysticky_remove_more_jump_link');
 
396
 
397
+ public function mysticky_build_stylesheet_content()
398
+ {
399
 
400
  $mysticky_options = get_option( 'mysticky_option_name' );
401
 
402
+ if (isset($mysticky_options['disable_css']))
403
+ {
404
  //do nothing
405
  } else {
406
  $mysticky_options['disable_css'] = false;
407
  };
408
 
409
+ if ($mysticky_options ['disable_css'] == false )
410
+ {
411
 
412
  echo
413
  '<style type="text/css">';
459
  }
460
  }
461
 
462
+ // add_action('wp_head', 'mysticky_build_stylesheet_content');
463
 
464
+ public function mystickymenu_script() {
465
 
466
  $mysticky_options = get_option( 'mysticky_option_name' );
467
 
499
  wp_localize_script( 'mystickymenu', 'mysticky_name', $mysticky_translation_array );
500
  }
501
 
502
+ //add_action( 'wp_enqueue_scripts', 'mystickymenu_script' );
503
+ }
504
+
505
+ if( is_admin() ) {
506
+
507
+ new MyStickyMenuBackend();
508
+
509
+ } else {
510
+
511
+ new MyStickyMenuFrontend();
512
+ }
513
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wordpress.transformnews.com/contact
4
  Tags: sticky, menu, header, sticky menu, sticky header, floating, floating menu
5
  Requires at least: 3.5.1
6
  Tested up to: 4.8
7
- Stable tag: 1.8.5
8
  License: GPLv2 or later
9
 
10
  This lightweight plugin will made your menu or header sticky on top of page, after desired number of pixels when scrolled.
@@ -19,15 +19,17 @@ Plugin is localized (multi language support) and responsive (as far as your them
19
  Plugin is originally designed for Twenty Thirteen template but should work on any theme.
20
 
21
  [Plugin Home + Demo URL][1]
 
22
 
23
  [1]: http://wordpress.transformnews.com/plugins/mystickymenu-simple-sticky-fixed-on-top-menu-implementation-for-twentythirteen-menu-269
 
24
 
25
  == Installation ==
26
  Install like any other plugin. After install activate.
27
  Go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id…
28
- Also make sure that Disable CSS style option is not enabled, you must add myStickymenu CSS style to your style.css file first. [More about disable CSS option][2]
29
 
30
- [2]: http://wordpress.transformnews.com/tutorials/disable-css-style-in-mystickymenu-938
31
 
32
  == Frequently Asked Questions ==
33
 
@@ -46,12 +48,6 @@ In CSS you can style your custom class while not sticky using custom class you a
46
 
47
  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.
48
 
49
- Check [Twenty Thirteen CSS example][3] using default full header id #masthead as a sticky class.
50
- Also here is yet [another header example][4].
51
-
52
- [3]: http://wordpress.transformnews.com/plugins/mystickymenu-simple-sticky-fixed-on-top-menu-implementation-for-twentythirteen-menu-269
53
- [4]: https://wordpress.org/support/topic/logo-in-menu-2
54
-
55
  == Screenshots ==
56
 
57
  1. screenshot-1.png shows administration settings.
4
  Tags: sticky, menu, header, sticky menu, sticky header, floating, floating menu
5
  Requires at least: 3.5.1
6
  Tested up to: 4.8
7
+ Stable tag: 1.8.6
8
  License: GPLv2 or later
9
 
10
  This lightweight plugin will made your menu or header sticky on top of page, after desired number of pixels when scrolled.
19
  Plugin is originally designed for Twenty Thirteen template but should work on any theme.
20
 
21
  [Plugin Home + Demo URL][1]
22
+ [myStickymenu theme support page][2]
23
 
24
  [1]: http://wordpress.transformnews.com/plugins/mystickymenu-simple-sticky-fixed-on-top-menu-implementation-for-twentythirteen-menu-269
25
+ [2]: http://wordpress.transformnews.com/tutorials/mystickymenu-theme-support-682
26
 
27
  == Installation ==
28
  Install like any other plugin. After install activate.
29
  Go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id…
30
+ Also make sure that Disable CSS style option is not enabled, you must add myStickymenu CSS style to your style.css file first. [More about disable CSS option][3]
31
 
32
+ [3: http://wordpress.transformnews.com/tutorials/disable-css-style-in-mystickymenu-938
33
 
34
  == Frequently Asked Questions ==
35
 
48
 
49
  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.
50
 
 
 
 
 
 
 
51
  == Screenshots ==
52
 
53
  1. screenshot-1.png shows administration settings.