Nav Menu Roles - Version 1.8.4

Version Description

  • Prevent nav menu items edited in the customizer from rendering when they should be excluded
Download this release

Release Info

Developer deployer
Plugin Icon 128x128 Nav Menu Roles
Version 1.8.4
Comparing to
See all releases

Code changes from version 1.8.3 to 1.8.4

Files changed (2) hide show
  1. nav-menu-roles.php +4 -3
  2. readme.txt +4 -1
nav-menu-roles.php CHANGED
@@ -3,10 +3,10 @@
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.8.3
7
  Author: Kathy Darling
8
  Author URI: http://www.kathyisawesome.com
9
- License: GPL2
10
  Text Domain: nav-menu-roles
11
 
12
  Copyright 2014 Kathy Darling(email: kathy.darling@gmail.com)
@@ -125,7 +125,8 @@ class Nav_Menu_Roles {
125
 
126
  // exclude items via filter instead of via custom Walker
127
  if ( ! is_admin() ) {
128
- add_filter( 'wp_get_nav_menu_items', array( $this, 'exclude_menu_items' ) );
 
129
  }
130
 
131
  // upgrade routine
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.8.4
7
  Author: Kathy Darling
8
  Author URI: http://www.kathyisawesome.com
9
+ License: GPL-3.0
10
  Text Domain: nav-menu-roles
11
 
12
  Copyright 2014 Kathy Darling(email: kathy.darling@gmail.com)
125
 
126
  // exclude items via filter instead of via custom Walker
127
  if ( ! is_admin() ) {
128
+ $priority = 20; // Because WP_Customize_Nav_Menu_Item_Setting::filter_wp_get_nav_menu_items() runs at 10.
129
+ add_filter( 'wp_get_nav_menu_items', array( $this, 'exclude_menu_items' ), $priority );
130
  }
131
 
132
  // upgrade routine
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.paypal.me/helgatheviking
5
  Tags: menu, menus, nav menu, nav menus
6
  Requires at least: 4.5.0
7
  Tested up to: 4.7.0
8
- Stable tag: 1.8.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.
@@ -204,6 +204,9 @@ However, the Import plugin only imports certain post meta for menu items. As of
204
 
205
  == Changelog ==
206
 
 
 
 
207
  = 1.8.4 =
208
  * Prevent nav menu items edited in the customizer from rendering when they should be excluded
209
 
5
  Tags: menu, menus, nav menu, nav menus
6
  Requires at least: 4.5.0
7
  Tested up to: 4.7.0
8
+ Stable tag: 1.8.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.
204
 
205
  == Changelog ==
206
 
207
+ = 1.8.5 =
208
+ * Use new Walker for WP4.7
209
+
210
  = 1.8.4 =
211
  * Prevent nav menu items edited in the customizer from rendering when they should be excluded
212