Responsive Select Menu - Version 1.4

Version Description

  • Handles blank menu items better
  • Improves compatibility with latest version of UberMenu
Download this release

Release Info

Developer sevenspark
Plugin Icon wp plugin Responsive Select Menu
Version 1.4
Comparing to
See all releases

Code changes from version 1.3 to 1.4

Files changed (2) hide show
  1. readme.txt +10 -2
  2. responsive-select-menu.php +32 -8
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: sevenspark
3
  Donate link: http://bit.ly/DonateResponsiveSelect
4
  Tags: responsive, menu, select, drop down,
5
  Requires at least: 3.3
6
- Tested up to: 3.5
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -60,7 +60,7 @@ in the menu.
60
 
61
  = It doesn't work =
62
 
63
- If your theme creates a menu the standard way with wp_nav_menu, it should work. If not, make sure you're using 1.3, as this resolves the most common "it doesn't work" issue.
64
 
65
 
66
 
@@ -71,6 +71,10 @@ If your theme creates a menu the standard way with wp_nav_menu, it should work.
71
 
72
  == Changelog ==
73
 
 
 
 
 
74
  = 1.3 =
75
  * Better compatibility with themes that remove the wp_nav_menu 'container' parameter.
76
 
@@ -86,6 +90,10 @@ If your theme creates a menu the standard way with wp_nav_menu, it should work.
86
 
87
  == Upgrade Notice ==
88
 
 
 
 
 
89
  = 1.3 =
90
  * Solves the most common "it doesn't work" scenario. Merry Christmas! :)
91
 
3
  Donate link: http://bit.ly/DonateResponsiveSelect
4
  Tags: responsive, menu, select, drop down,
5
  Requires at least: 3.3
6
+ Tested up to: 3.5.1
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
60
 
61
  = It doesn't work =
62
 
63
+ If your theme creates a menu the standard way with wp_nav_menu, it should work. If not, make sure you're using 1.3+, as this resolves the most common "it doesn't work" issue.
64
 
65
 
66
 
71
 
72
  == Changelog ==
73
 
74
+ = 1.4 =
75
+ * Handles blank menu items better
76
+ * Improves compatibility with latest version of UberMenu
77
+
78
  = 1.3 =
79
  * Better compatibility with themes that remove the wp_nav_menu 'container' parameter.
80
 
90
 
91
  == Upgrade Notice ==
92
 
93
+ = 1.4 =
94
+ * Recommended for UberMenu users
95
+ * Recommended for anyone who uses "dummy" menu items with URL set to '#' or ''
96
+
97
  = 1.3 =
98
  * Solves the most common "it doesn't work" scenario. Merry Christmas! :)
99
 
responsive-select-menu.php CHANGED
@@ -4,13 +4,13 @@
4
  Plugin Name: Responsive Select Menu
5
  Plugin URI: http://wpmegamenu.com/responsive-select-menu
6
  Description: Turn your menu into a select box at small viewport sizes
7
- Version: 1.3
8
  Author: Chris Mavricos, SevenSpark
9
  Author URI: http://sevenspark.com
10
  Copyright 2011-2012 Chris Mavricos, SevenSpark http://sevenspark.com (email : chris@sevenspark.com)
11
  */
12
 
13
- define( 'RESPONSIVE_SELECT_MENU_VERSION', '1.3' );
14
  define( 'RESPONSIVE_SELECT_MENU_SETTINGS', 'responsive-select-menu' );
15
 
16
  require_once( 'sparkoptions/SparkOptions.class.php' ); //SevenSpark Options Panel
@@ -123,7 +123,7 @@ class ResponsiveMenuSelect{
123
  background:none !important;
124
  box-shadow:none !important;
125
  }
126
- .responsiveSelectContainer ul, ul.responsiveSelectFullMenu{
127
  display: none !important;
128
  }
129
  .responsiveSelectContainer select.responsiveMenuSelect, select.responsiveMenuSelect {
@@ -139,7 +139,8 @@ class ResponsiveMenuSelect{
139
  <script type="text/javascript">
140
  jQuery(document).ready( function($){
141
  $( '.responsiveMenuSelect' ).change(function() {
142
- window.location = $(this).find( 'option:selected' ).val();
 
143
  });
144
  });
145
  </script>
@@ -271,7 +272,7 @@ jQuery(document).ready( function($){
271
  $sparkOps->addCheckbox( $basic,
272
  'exclude-hashes',
273
  'Exclude Items Without Links',
274
- 'Exclude any items where the URL is set to "#"',
275
  'on'
276
  );
277
 
@@ -425,10 +426,32 @@ jQuery(document).ready( function($){
425
 
426
  </div>
427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  <div class="cf">
429
  <h4>Agility - Responsive HTML5 WordPress Theme</h4>
430
 
431
- <img src="http://3.s3.envato.com/files/12296998/Preview/01_Agility_-_Responsive_Minimal_HTML5.__large_preview.jpg" alt="Agility" />
432
 
433
  <a href="http://agility.sevenspark.com" class="button save-button" target="_blank">View the demo &rarr;</a>
434
  </div>
@@ -488,7 +511,7 @@ class ResponsiveSelectWalker extends Walker_Nav_Menu{
488
  $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
489
  $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : '';
490
 
491
- if( $item->url == '#' && $responsiveMenuSelect->getSettings()->op( 'exclude-hashes' ) ){
492
  return;
493
  }
494
 
@@ -524,7 +547,8 @@ class ResponsiveSelectWalker extends Walker_Nav_Menu{
524
 
525
  }
526
 
527
- $attributes = ! empty( $item->url ) ? ' value="' . esc_attr( $item->url ) .'"' : '';
 
528
 
529
  if( $responsiveMenuSelect->getSettings()->op( 'current_selected' ) && strpos( $class_names , 'current-menu-item' ) > 0 ){
530
  $attributes.= ' selected="selected"';
4
  Plugin Name: Responsive Select Menu
5
  Plugin URI: http://wpmegamenu.com/responsive-select-menu
6
  Description: Turn your menu into a select box at small viewport sizes
7
+ Version: 1.4
8
  Author: Chris Mavricos, SevenSpark
9
  Author URI: http://sevenspark.com
10
  Copyright 2011-2012 Chris Mavricos, SevenSpark http://sevenspark.com (email : chris@sevenspark.com)
11
  */
12
 
13
+ define( 'RESPONSIVE_SELECT_MENU_VERSION', '1.4' );
14
  define( 'RESPONSIVE_SELECT_MENU_SETTINGS', 'responsive-select-menu' );
15
 
16
  require_once( 'sparkoptions/SparkOptions.class.php' ); //SevenSpark Options Panel
123
  background:none !important;
124
  box-shadow:none !important;
125
  }
126
+ .responsiveSelectContainer ul, ul.responsiveSelectFullMenu, #megaMenu ul.megaMenu.responsiveSelectFullMenu{
127
  display: none !important;
128
  }
129
  .responsiveSelectContainer select.responsiveMenuSelect, select.responsiveMenuSelect {
139
  <script type="text/javascript">
140
  jQuery(document).ready( function($){
141
  $( '.responsiveMenuSelect' ).change(function() {
142
+ var loc = $(this).find( 'option:selected' ).val();
143
+ if( loc != '' && loc != '#' ) window.location = loc;
144
  });
145
  });
146
  </script>
272
  $sparkOps->addCheckbox( $basic,
273
  'exclude-hashes',
274
  'Exclude Items Without Links',
275
+ 'Exclude any items where the URL is set to "#" or blank',
276
  'on'
277
  );
278
 
426
 
427
  </div>
428
 
429
+ <div class="cf">
430
+ <h4>UberMenu - Sticky Menu Extension</h4>
431
+
432
+ <a href="http://wpmegamenu.com/sticky"><img src="http://2.s3.envato.com/files/46737754/UberMenuSticky_packaging_main_1.0.png" alt="UberMenu Sticky Menu" /></a>
433
+
434
+ <p>Turn your UberMenu into a Sticky Menu as your users scroll.</p>
435
+
436
+ <a href="http://wpmegamenu.com/sticky" class="button save-button" target="_blank">Check out the UberMenu Sticky demo &rarr;</a>
437
+
438
+ </div>
439
+
440
+ <div class="cf">
441
+ <h4>UberMenu - Conditionals Extension</h4>
442
+
443
+ <a href="http://wpmegamenu.com/conditionals"><img src="http://0.s3.envato.com/files/35005553/UberMenu_Conditionals_packaging_main.png" alt="UberMenu Conditionals" /></a>
444
+
445
+ <p>Display or hide your menu items based on preset conditions.</p>
446
+
447
+ <a href="http://labs.sevenspark.com/UberMenuConditionals" class="button save-button" target="_blank">Check out the UberMenu Conditionals demo &rarr;</a>
448
+
449
+ </div>
450
+
451
  <div class="cf">
452
  <h4>Agility - Responsive HTML5 WordPress Theme</h4>
453
 
454
+ <img src="http://1.s3.envato.com/files/26983727/01_Agility_Responsive_WordPress_theme.__large_preview.png" alt="Agility" />
455
 
456
  <a href="http://agility.sevenspark.com" class="button save-button" target="_blank">View the demo &rarr;</a>
457
  </div>
511
  $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
512
  $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : '';
513
 
514
+ if( ( $item->url == '#' || $item->url == '' ) && $responsiveMenuSelect->getSettings()->op( 'exclude-hashes' ) ){
515
  return;
516
  }
517
 
547
 
548
  }
549
 
550
+ //$attributes = ! empty( $item->url ) ? ' value="' . esc_attr( $item->url ) .'"' : '';
551
+ $attributes = ' value="' . esc_attr( $item->url ) .'"';
552
 
553
  if( $responsiveMenuSelect->getSettings()->op( 'current_selected' ) && strpos( $class_names , 'current-menu-item' ) > 0 ){
554
  $attributes.= ' selected="selected"';