Version Description
- Fix: Properly handle UberMenu Menu Segments when they have been renamed by the user and using multiple segments
Download this release
Release Info
Developer | sevenspark |
Plugin | ShiftNav – Responsive Mobile Menu |
Version | 1.5.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.1.1
- includes/ShiftNavWalker.class.php +11 -4
- readme.txt +5 -2
- shiftnav-responsive-mobile-menu.php +3 -3
includes/ShiftNavWalker.class.php
CHANGED
@@ -117,10 +117,15 @@ class ShiftNavWalker extends Walker_Nav_Menu {
|
|
117 |
* @param int $id Current item ID.
|
118 |
*/
|
119 |
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
|
|
|
|
120 |
|
121 |
-
//if( $item->ID == 1739 ) shiftp( $item );
|
122 |
//Menu Segments
|
123 |
-
|
|
|
|
|
|
|
|
|
124 |
return $this->handle_menu_segment( $output , $item , $depth , $args , $id );
|
125 |
}
|
126 |
|
@@ -393,7 +398,8 @@ class ShiftNavWalker extends Walker_Nav_Menu {
|
|
393 |
// unset( $children_elements[ $id ] );
|
394 |
|
395 |
//This is the part of Walker_Nav_Menu:dispay_element that handles printing children
|
396 |
-
|
|
|
397 |
//$element->shiftnav_menu_segment = 'hi';
|
398 |
//echo $element->ID ;
|
399 |
}
|
@@ -506,7 +512,7 @@ class ShiftNavWalker extends Walker_Nav_Menu {
|
|
506 |
|
507 |
|
508 |
function handle_menu_segment( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
509 |
-
|
510 |
if( !defined( 'UBERMENU_MENU_ITEM_META_KEY' ) ){
|
511 |
return;
|
512 |
}
|
@@ -541,6 +547,7 @@ class ShiftNavWalker extends Walker_Nav_Menu {
|
|
541 |
'depth' => 0,
|
542 |
'shiftnav_segment' => $item->ID,
|
543 |
'shiftnav_instance' => $args->shiftnav,
|
|
|
544 |
//'uber_instance' => $this->args->uber_instance,
|
545 |
//'uber_segment' => $this->ID,
|
546 |
);
|
117 |
* @param int $id Current item ID.
|
118 |
*/
|
119 |
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
120 |
+
// echo $item->ID."<br/>";
|
121 |
+
//if( $item->ID == 2120 ) shiftp( $item );
|
122 |
|
|
|
123 |
//Menu Segments
|
124 |
+
//shiftp( $item );
|
125 |
+
//echo $item->ID . ' :: ' . $item->object.'<br/>';
|
126 |
+
//if( $item->object == 'ubermenu-custom' ) shiftp( $item );
|
127 |
+
|
128 |
+
if( $item->object == 'ubermenu-custom' && $item->type_label == '[UberMenu Menu Segment]' ){
|
129 |
return $this->handle_menu_segment( $output , $item , $depth , $args , $id );
|
130 |
}
|
131 |
|
398 |
// unset( $children_elements[ $id ] );
|
399 |
|
400 |
//This is the part of Walker_Nav_Menu:dispay_element that handles printing children
|
401 |
+
//echo $element->ID . ' :: ' . $element->type_label. '<br/>';
|
402 |
+
if( $element->type_label == '[UberMenu Menu Segment]' && shiftnav_op( 'process_uber_segments' , 'general' ) !== 'off' ){
|
403 |
//$element->shiftnav_menu_segment = 'hi';
|
404 |
//echo $element->ID ;
|
405 |
}
|
512 |
|
513 |
|
514 |
function handle_menu_segment( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
515 |
+
|
516 |
if( !defined( 'UBERMENU_MENU_ITEM_META_KEY' ) ){
|
517 |
return;
|
518 |
}
|
547 |
'depth' => 0,
|
548 |
'shiftnav_segment' => $item->ID,
|
549 |
'shiftnav_instance' => $args->shiftnav,
|
550 |
+
'shiftnav' => $args->shiftnav,
|
551 |
//'uber_instance' => $this->args->uber_instance,
|
552 |
//'uber_segment' => $this->ID,
|
553 |
);
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: sevenspark
|
|
3 |
Donate link: http://shiftnav.io/pro
|
4 |
Tags: responsive, menu, navigation, mobile, off-canvas, app, slide, sidebar
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.5.1
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -56,6 +56,9 @@ Please see the [ShiftNav Quick Setup Guide](http://sevenspark.com/docs/shiftnav-
|
|
56 |
|
57 |
== Changelog ==
|
58 |
|
|
|
|
|
|
|
59 |
= 1.5.1 =
|
60 |
* Update: Update Font Awesome icons to 4.7
|
61 |
|
3 |
Donate link: http://shiftnav.io/pro
|
4 |
Tags: responsive, menu, navigation, mobile, off-canvas, app, slide, sidebar
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.7.2
|
7 |
+
Stable tag: 1.5.1.1
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
+
= 1.5.1.1 =
|
60 |
+
* Fix: Properly handle UberMenu Menu Segments when they have been renamed by the user and using multiple segments
|
61 |
+
|
62 |
= 1.5.1 =
|
63 |
* Update: Update Font Awesome icons to 4.7
|
64 |
|
shiftnav-responsive-mobile-menu.php
CHANGED
@@ -6,10 +6,10 @@ Description: An off-canvas mobile menu for WordPress
|
|
6 |
Author: Chris Mavricos, SevenSpark
|
7 |
Author URI: http://sevenspark.com
|
8 |
License: GPLv2
|
9 |
-
Version: 1.5.1
|
10 |
*/
|
11 |
|
12 |
-
/* Copyright 2014-
|
13 |
|
14 |
// Exit if accessed directly
|
15 |
if ( !defined( 'ABSPATH' ) ) exit;
|
@@ -53,7 +53,7 @@ final class ShiftNav {
|
|
53 |
// Plugin version
|
54 |
|
55 |
if( ! defined( 'SHIFTNAV_VERSION' ) )
|
56 |
-
define( 'SHIFTNAV_VERSION', '1.5.1' );
|
57 |
|
58 |
if( ! defined( 'SHIFTNAV_PRO' ) )
|
59 |
define( 'SHIFTNAV_PRO', false );
|
6 |
Author: Chris Mavricos, SevenSpark
|
7 |
Author URI: http://sevenspark.com
|
8 |
License: GPLv2
|
9 |
+
Version: 1.5.1.1
|
10 |
*/
|
11 |
|
12 |
+
/* Copyright 2014-2017 Chris Mavricos, SevenSpark */
|
13 |
|
14 |
// Exit if accessed directly
|
15 |
if ( !defined( 'ABSPATH' ) ) exit;
|
53 |
// Plugin version
|
54 |
|
55 |
if( ! defined( 'SHIFTNAV_VERSION' ) )
|
56 |
+
define( 'SHIFTNAV_VERSION', '1.5.1.1' );
|
57 |
|
58 |
if( ! defined( 'SHIFTNAV_PRO' ) )
|
59 |
define( 'SHIFTNAV_PRO', false );
|