Version Description
- Added UberMenu 3 compatibility
- Added Cyrillic characters fix (experimental)
Download this release
Release Info
Developer | sevenspark |
Plugin | Responsive Select Menu |
Version | 1.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.3 to 1.6
- readme.txt +8 -2
- responsive-select-menu.php +70 -26
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: sevenspark
|
|
3 |
Donate link: http://bit.ly/DonateResponsiveSelect
|
4 |
Tags: responsive, menu, select, drop down,
|
5 |
Requires at least: 3.6
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -48,6 +48,7 @@ This section describes how to install the plugin and get it working.
|
|
48 |
1. Upload the plugin zip through your WordPress admin
|
49 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
50 |
1. Navigate to Appearance > Responsive Select to configure your menu
|
|
|
51 |
|
52 |
|
53 |
== Frequently Asked Questions ==
|
@@ -71,6 +72,11 @@ If your theme creates a menu the standard way with wp_nav_menu, it should work.
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
|
|
74 |
= 1.5.3 =
|
75 |
* Added UberMenu Conditionals compatibility
|
76 |
* Added filterable first menu item names
|
3 |
Donate link: http://bit.ly/DonateResponsiveSelect
|
4 |
Tags: responsive, menu, select, drop down,
|
5 |
Requires at least: 3.6
|
6 |
+
Tested up to: 4.0
|
7 |
+
Stable tag: 1.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
48 |
1. Upload the plugin zip through your WordPress admin
|
49 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
50 |
1. Navigate to Appearance > Responsive Select to configure your menu
|
51 |
+
1. If you are using UberMenu 3, disable the Responsive Toggle setting in the UberMenu Control Panel > Main UberMenu Configuration > Responsive & Mobile > Responsive Toggle.
|
52 |
|
53 |
|
54 |
== Frequently Asked Questions ==
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 1.6 =
|
76 |
+
|
77 |
+
* Added UberMenu 3 compatibility
|
78 |
+
* Added Cyrillic characters fix (experimental)
|
79 |
+
|
80 |
= 1.5.3 =
|
81 |
* Added UberMenu Conditionals compatibility
|
82 |
* Added filterable first menu item names
|
responsive-select-menu.php
CHANGED
@@ -4,14 +4,14 @@
|
|
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.
|
8 |
Author: Chris Mavricos, SevenSpark
|
9 |
Author URI: http://sevenspark.com
|
10 |
License: GPLv2
|
11 |
Copyright 2011-2014 Chris Mavricos, SevenSpark http://sevenspark.com (email : chris@sevenspark.com)
|
12 |
*/
|
13 |
|
14 |
-
define( 'RESPONSIVE_SELECT_MENU_VERSION', '1.
|
15 |
define( 'RESPONSIVE_SELECT_MENU_SETTINGS', 'responsive-select-menu' );
|
16 |
|
17 |
require_once( 'sparkoptions/SparkOptions.class.php' ); //SevenSpark Options Panel
|
@@ -123,6 +123,9 @@ class ResponsiveMenuSelect{
|
|
123 |
border:none !important;
|
124 |
background:none !important;
|
125 |
box-shadow:none !important;
|
|
|
|
|
|
|
126 |
}
|
127 |
.responsiveSelectContainer ul, ul.responsiveSelectFullMenu, #megaMenu ul.megaMenu.responsiveSelectFullMenu{
|
128 |
display: none !important;
|
@@ -161,6 +164,11 @@ jQuery(document).ready( function($){
|
|
161 |
if( isset( $args['responsiveMenuSelect'] ) && $args['responsiveMenuSelect'] == true ) {
|
162 |
return $args;
|
163 |
}
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
$selectNav = $this->selectNavMenu( $args );
|
166 |
|
@@ -181,6 +189,7 @@ jQuery(document).ready( function($){
|
|
181 |
function selectNavMenu( $args ){
|
182 |
|
183 |
$args['responsiveMenuSelect'] = true;
|
|
|
184 |
|
185 |
$select = wp_nav_menu( $args );
|
186 |
|
@@ -508,7 +517,9 @@ jQuery(document).ready( function($){
|
|
508 |
$responsiveMenuSelect = new ResponsiveMenuSelect();
|
509 |
|
510 |
|
511 |
-
|
|
|
|
|
512 |
|
513 |
|
514 |
class ResponsiveSelectWalker extends Walker_Nav_Menu{
|
@@ -553,36 +564,69 @@ class ResponsiveSelectWalker extends Walker_Nav_Menu{
|
|
553 |
if( $responsiveMenuSelect->getSettings()->op( 'uber-enabled' ) ){
|
554 |
|
555 |
global $uberMenu;
|
556 |
-
$settings = $uberMenu->getSettings();
|
557 |
-
|
558 |
-
//Test override settings
|
559 |
-
$override = $this->getUberOption( $item->ID, 'shortcode' );
|
560 |
-
$overrideOn = /*$depth > 0 && */ $settings->op( 'wpmega-shortcodes' ) && !empty( $override ) ? true : false;
|
561 |
-
|
562 |
-
//Test sidebar settings
|
563 |
-
$sidebar = $this->getUberOption( $item->ID, 'sidebars' );
|
564 |
-
$sidebarOn = ( $settings->op( 'wpmega-top-level-widgets' ) || $depth > 0 ) && $settings->op( 'wpmega-sidebars' ) && !empty( $sidebar ) ? true : false;
|
565 |
|
566 |
-
|
567 |
-
|
|
|
568 |
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
577 |
}
|
578 |
-
if(
|
579 |
-
|
580 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
|
582 |
}
|
583 |
|
584 |
//$attributes = ! empty( $item->url ) ? ' value="' . esc_attr( $item->url ) .'"' : '';
|
585 |
-
$
|
|
|
586 |
|
587 |
if( $responsiveMenuSelect->getSettings()->op( 'current_selected' ) && strpos( $class_names , 'current-menu-item' ) > 0 ){
|
588 |
$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.6
|
8 |
Author: Chris Mavricos, SevenSpark
|
9 |
Author URI: http://sevenspark.com
|
10 |
License: GPLv2
|
11 |
Copyright 2011-2014 Chris Mavricos, SevenSpark http://sevenspark.com (email : chris@sevenspark.com)
|
12 |
*/
|
13 |
|
14 |
+
define( 'RESPONSIVE_SELECT_MENU_VERSION', '1.6' );
|
15 |
define( 'RESPONSIVE_SELECT_MENU_SETTINGS', 'responsive-select-menu' );
|
16 |
|
17 |
require_once( 'sparkoptions/SparkOptions.class.php' ); //SevenSpark Options Panel
|
123 |
border:none !important;
|
124 |
background:none !important;
|
125 |
box-shadow:none !important;
|
126 |
+
height:auto !important;
|
127 |
+
max-height:none !important;
|
128 |
+
visibility:visible !important;
|
129 |
}
|
130 |
.responsiveSelectContainer ul, ul.responsiveSelectFullMenu, #megaMenu ul.megaMenu.responsiveSelectFullMenu{
|
131 |
display: none !important;
|
164 |
if( isset( $args['responsiveMenuSelect'] ) && $args['responsiveMenuSelect'] == true ) {
|
165 |
return $args;
|
166 |
}
|
167 |
+
|
168 |
+
//Ignore menu segments
|
169 |
+
if( isset( $args['uber_segment'] ) ){
|
170 |
+
return $args;
|
171 |
+
}
|
172 |
|
173 |
$selectNav = $this->selectNavMenu( $args );
|
174 |
|
189 |
function selectNavMenu( $args ){
|
190 |
|
191 |
$args['responsiveMenuSelect'] = true;
|
192 |
+
unset( $args['uber_instance'] );
|
193 |
|
194 |
$select = wp_nav_menu( $args );
|
195 |
|
517 |
$responsiveMenuSelect = new ResponsiveMenuSelect();
|
518 |
|
519 |
|
520 |
+
function uber3_get_item_settings( $item_id ){
|
521 |
+
return get_post_meta( $item_id, UBERMENU_MENU_ITEM_META_KEY , true );
|
522 |
+
}
|
523 |
|
524 |
|
525 |
class ResponsiveSelectWalker extends Walker_Nav_Menu{
|
564 |
if( $responsiveMenuSelect->getSettings()->op( 'uber-enabled' ) ){
|
565 |
|
566 |
global $uberMenu;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
567 |
|
568 |
+
//UberMenu 2
|
569 |
+
if( $uberMenu ){
|
570 |
+
$settings = $uberMenu->getSettings();
|
571 |
|
572 |
+
//Test override settings
|
573 |
+
$override = $this->getUberOption( $item->ID, 'shortcode' );
|
574 |
+
$overrideOn = /*$depth > 0 && */ $settings->op( 'wpmega-shortcodes' ) && !empty( $override ) ? true : false;
|
575 |
+
|
576 |
+
//Test sidebar settings
|
577 |
+
$sidebar = $this->getUberOption( $item->ID, 'sidebars' );
|
578 |
+
$sidebarOn = ( $settings->op( 'wpmega-top-level-widgets' ) || $depth > 0 ) && $settings->op( 'wpmega-sidebars' ) && !empty( $sidebar ) ? true : false;
|
579 |
+
|
580 |
+
$notext = $this->getUberOption( $item->ID, 'notext' ) == 'on' || $item->title == UBERMENU_NOTEXT ? true : false;
|
581 |
+
$nolink = $this->getUberOption( $item->ID, 'nolink' ) == 'on' ? true : false;
|
582 |
+
|
583 |
+
if( $nolink && $responsiveMenuSelect->getSettings()->op( 'uber-exclude-nonlinks' ) ){
|
584 |
+
return;
|
585 |
+
}
|
586 |
+
if( $notext && $responsiveMenuSelect->getSettings()->op( 'uber-exclude-notext' ) ){
|
587 |
+
return;
|
588 |
+
}
|
589 |
+
if( $sidebarOn && $responsiveMenuSelect->getSettings()->op( 'uber-exclude-sidebar' ) ){
|
590 |
+
return;
|
591 |
+
}
|
592 |
+
if( $overrideOn && $responsiveMenuSelect->getSettings()->op( 'uber-exclude-content-overrides' ) ){
|
593 |
+
return;
|
594 |
+
}
|
595 |
}
|
596 |
+
else if( function_exists( 'ubermenu' ) ){
|
597 |
+
$settings = uber3_get_item_settings( $item->ID );
|
598 |
+
|
599 |
+
//Nolink
|
600 |
+
if( ( $settings['disable_link'] == on ) && ( $responsiveMenuSelect->getSettings()->op( 'uber-exclude-nonlinks' ) == 'on' ) ){
|
601 |
+
return;
|
602 |
+
}
|
603 |
+
|
604 |
+
//Notext
|
605 |
+
if( ( $settings['disable_text'] == on ) && ( $responsiveMenuSelect->getSettings()->op( 'uber-exclude-notext' ) == 'on' ) ){
|
606 |
+
return;
|
607 |
+
}
|
608 |
+
|
609 |
+
//Sidebar
|
610 |
+
if( ( $settings['widget_area'] || $settings['auto_widget_area'] ) && $responsiveMenuSelect->getSettings()->op( 'uber-exclude-sidebar' ) ){
|
611 |
+
return;
|
612 |
+
}
|
613 |
+
|
614 |
+
//Custom
|
615 |
+
if( $settings['custom_content'] && $responsiveMenuSelect->getSettings()->op( 'uber-exclude-content-overrides' ) ){
|
616 |
+
return;
|
617 |
+
}
|
618 |
+
|
619 |
+
//Advanced
|
620 |
+
if( $item->object == 'ubermenu-custom' ){
|
621 |
+
return;
|
622 |
+
}
|
623 |
+
}
|
624 |
|
625 |
}
|
626 |
|
627 |
//$attributes = ! empty( $item->url ) ? ' value="' . esc_attr( $item->url ) .'"' : '';
|
628 |
+
$item->url = urldecode( $item->url );
|
629 |
+
$attributes = ' value="' . esc_attr( $item->url ) .'"';
|
630 |
|
631 |
if( $responsiveMenuSelect->getSettings()->op( 'current_selected' ) && strpos( $class_names , 'current-menu-item' ) > 0 ){
|
632 |
$attributes.= ' selected="selected"';
|