myStickymenu - Version 2.0.6

Version Description

  • Fixed: Enable / Disable at 404 page
Download this release

Release Info

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

Code changes from version 2.0.5 to 2.0.6

Files changed (2) hide show
  1. mystickymenu.php +28 -4
  2. readme.txt +4 -2
mystickymenu.php CHANGED
@@ -3,7 +3,7 @@
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 navigation menu. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
- Version: 2.0.5
7
  Author: m.r.d.a
8
  Author URI: http://wordpress.transformnews.com/
9
  Text Domain: mystickymenu
@@ -12,7 +12,7 @@
12
  */
13
 
14
  defined('ABSPATH') or die("Cannot access pages directly.");
15
- define( 'MYSTICKY_VERSION', '2.0.5' );
16
 
17
  class MyStickyMenuBackend
18
  {
@@ -392,6 +392,12 @@ class MyStickyMenuBackend
392
  'my-stickymenu-settings',
393
  'setting_section_id'
394
  );
 
 
 
 
 
 
395
 
396
 
397
 
@@ -476,7 +482,9 @@ class MyStickyMenuBackend
476
  if( isset( $input['mysticky_disable_at_search'] ) )
477
  $new_input['mysticky_disable_at_search'] = sanitize_text_field( $input['mysticky_disable_at_search'] );
478
 
479
-
 
 
480
 
481
 
482
 
@@ -775,6 +783,14 @@ class MyStickyMenuBackend
775
  );
776
  _e('<span>search </span>', 'mystickymenu');
777
  printf('</div>');
 
 
 
 
 
 
 
 
778
 
779
  if (isset ( $this->options['mysticky_disable_at_page'] ) == true ) {
780
 
@@ -955,6 +971,7 @@ class MyStickyMenuFrontend
955
  $mysticky_disable_at_single = isset($mysticky_options['mysticky_disable_at_single']);
956
  $mysticky_disable_at_archive = isset($mysticky_options['mysticky_disable_at_archive']);
957
  $mysticky_disable_at_search = isset($mysticky_options['mysticky_disable_at_search']);
 
958
  $mysticky_enable_at_pages = isset($mysticky_options['mysticky_enable_at_pages']) ? $mysticky_options['mysticky_enable_at_pages'] : '';
959
  $mysticky_enable_at_posts = isset($mysticky_options['mysticky_enable_at_posts']) ? $mysticky_options['mysticky_enable_at_posts'] : '';
960
  //$mystickymenu_enable_at_pages_exp = explode( ',', $mystickymenu_enable_at_pages );
@@ -1035,11 +1052,18 @@ class MyStickyMenuFrontend
1035
 
1036
  } elseif ( is_search()){
1037
 
1038
- //Archive
1039
  if ( $mysticky_disable_at_search == false ) {
1040
  $this->mystickymenu_script();
1041
  };
1042
 
 
 
 
 
 
 
 
1043
  }
1044
 
1045
 
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 navigation menu. After install go to Settings / myStickymenu and change Sticky Class to .your_navbar_class or #your_navbar_id.
6
+ Version: 2.0.6
7
  Author: m.r.d.a
8
  Author URI: http://wordpress.transformnews.com/
9
  Text Domain: mystickymenu
12
  */
13
 
14
  defined('ABSPATH') or die("Cannot access pages directly.");
15
+ define( 'MYSTICKY_VERSION', '2.0.6' );
16
 
17
  class MyStickyMenuBackend
18
  {
392
  'my-stickymenu-settings',
393
  'setting_section_id'
394
  );
395
+ add_settings_field(
396
+ 'mysticky_disable_at_404',
397
+ __("Disable at", 'mystickymenu'),
398
+ 'my-stickymenu-settings',
399
+ 'setting_section_id'
400
+ );
401
 
402
 
403
 
482
  if( isset( $input['mysticky_disable_at_search'] ) )
483
  $new_input['mysticky_disable_at_search'] = sanitize_text_field( $input['mysticky_disable_at_search'] );
484
 
485
+ if( isset( $input['mysticky_disable_at_404'] ) )
486
+ $new_input['mysticky_disable_at_404'] = sanitize_text_field( $input['mysticky_disable_at_404'] );
487
+
488
 
489
 
490
 
783
  );
784
  _e('<span>search </span>', 'mystickymenu');
785
  printf('</div>');
786
+
787
+ printf(
788
+ '<div><input id="%1$s" name="mysticky_option_name[mysticky_disable_at_404]" type="checkbox" %2$s /> ',
789
+ 'mysticky_disable_at_404',
790
+ checked( isset( $this->options['mysticky_disable_at_404'] ), true, false )
791
+ );
792
+ _e('<span>404 </span>', 'mystickymenu');
793
+ printf('</div>');
794
 
795
  if (isset ( $this->options['mysticky_disable_at_page'] ) == true ) {
796
 
971
  $mysticky_disable_at_single = isset($mysticky_options['mysticky_disable_at_single']);
972
  $mysticky_disable_at_archive = isset($mysticky_options['mysticky_disable_at_archive']);
973
  $mysticky_disable_at_search = isset($mysticky_options['mysticky_disable_at_search']);
974
+ $mysticky_disable_at_404 = isset($mysticky_options['mysticky_disable_at_404']);
975
  $mysticky_enable_at_pages = isset($mysticky_options['mysticky_enable_at_pages']) ? $mysticky_options['mysticky_enable_at_pages'] : '';
976
  $mysticky_enable_at_posts = isset($mysticky_options['mysticky_enable_at_posts']) ? $mysticky_options['mysticky_enable_at_posts'] : '';
977
  //$mystickymenu_enable_at_pages_exp = explode( ',', $mystickymenu_enable_at_pages );
1052
 
1053
  } elseif ( is_search()){
1054
 
1055
+ //Search
1056
  if ( $mysticky_disable_at_search == false ) {
1057
  $this->mystickymenu_script();
1058
  };
1059
 
1060
+ } elseif ( is_404()){
1061
+
1062
+ //404
1063
+ if ( $mysticky_disable_at_404 == false ) {
1064
+ $this->mystickymenu_script();
1065
+ };
1066
+
1067
  }
1068
 
1069
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: damiroquai
3
  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.9.3
7
- Stable tag: 2.0.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.
@@ -54,6 +54,8 @@ In some cases you can use the whole header div and than just style it different
54
 
55
 
56
  == Changelog ==
 
 
57
  = 2.0.5 =
58
  * Added: Admin settings sidebar right
59
  * Added: Admin separated js script
3
  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: 5.0
7
+ Stable tag: 2.0.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.
54
 
55
 
56
  == Changelog ==
57
+ = 2.0.6 =
58
+ * Fixed: Enable / Disable at 404 page
59
  = 2.0.5 =
60
  * Added: Admin settings sidebar right
61
  * Added: Admin separated js script