Nav Menu Roles - Version 1.9.5

Version Description

  • Fix: PHP Notice: Undefined variable $item
Download this release

Release Info

Developer helgatheviking
Plugin Icon 128x128 Nav Menu Roles
Version 1.9.5
Comparing to
See all releases

Code changes from version 1.9.4 to 1.9.5

Files changed (2) hide show
  1. nav-menu-roles.php +4 -4
  2. readme.txt +5 -2
nav-menu-roles.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Nav Menu Roles
4
  Plugin URI: http://www.kathyisawesome.com/449/nav-menu-roles/
5
  Description: Hide custom menu items based on user roles.
6
- Version: 1.9.4
7
  Author: Kathy Darling
8
  Author URI: http://www.kathyisawesome.com
9
  License: GPL-3.0
@@ -54,7 +54,7 @@ class Nav_Menu_Roles {
54
  * @constant string version number
55
  * @since 1.7.0
56
  */
57
- CONST VERSION = '1.9.4';
58
 
59
  /**
60
  * Main Nav Menu Roles Instance
@@ -442,8 +442,8 @@ class Nav_Menu_Roles {
442
  $new_classes[] = 'nmr-logged-out';
443
  break;
444
  default:
445
- if ( is_array( $item->roles ) && ! empty( $item->roles ) ) {
446
- foreach ( $item->roles as $role ) {
447
  $new_classes[] = 'nmr-' . $role;
448
  }
449
  }
3
  Plugin Name: Nav Menu Roles
4
  Plugin URI: http://www.kathyisawesome.com/449/nav-menu-roles/
5
  Description: Hide custom menu items based on user roles.
6
+ Version: 1.9.5
7
  Author: Kathy Darling
8
  Author URI: http://www.kathyisawesome.com
9
  License: GPL-3.0
54
  * @constant string version number
55
  * @since 1.7.0
56
  */
57
+ CONST VERSION = '1.9.5';
58
 
59
  /**
60
  * Main Nav Menu Roles Instance
442
  $new_classes[] = 'nmr-logged-out';
443
  break;
444
  default:
445
+ if ( is_array( $menu_item->roles ) && ! empty( $menu_item->roles ) ) {
446
+ foreach ( $menu_item->roles as $role ) {
447
  $new_classes[] = 'nmr-' . $role;
448
  }
449
  }
readme.txt CHANGED
@@ -4,8 +4,8 @@ Contributors: helgatheviking
4
  Donate link: https://www.paypal.com/fundraiser/charity/1451316
5
  Tags: menu, menus, nav menu, nav menus
6
  Requires at least: 4.5.0
7
- Tested up to: 5.0.2
8
- Stable tag: 1.9.4
9
  License: GPLv3
10
 
11
  Hide custom menu items based on user roles. PLEASE READ THE FAQ IF YOU ARE NOT SEEING THE SETTINGS.
@@ -238,6 +238,9 @@ Yes, but manually. WPML developers have informed me that the meta data for nav m
238
 
239
  == Changelog ==
240
 
 
 
 
241
  = 1.9.4 =
242
  * Add the NMR roles as css classes to the menu output
243
  * Improve menu editor role checkbox list UX, by making list items full-width. Props @lkraav
4
  Donate link: https://www.paypal.com/fundraiser/charity/1451316
5
  Tags: menu, menus, nav menu, nav menus
6
  Requires at least: 4.5.0
7
+ Tested up to: 5.3.0
8
+ Stable tag: 1.9.5
9
  License: GPLv3
10
 
11
  Hide custom menu items based on user roles. PLEASE READ THE FAQ IF YOU ARE NOT SEEING THE SETTINGS.
238
 
239
  == Changelog ==
240
 
241
+ = 1.9.5 =
242
+ * Fix: PHP Notice: Undefined variable $item
243
+
244
  = 1.9.4 =
245
  * Add the NMR roles as css classes to the menu output
246
  * Improve menu editor role checkbox list UX, by making list items full-width. Props @lkraav