Nav Menu Roles - Version 2.0.2

Version Description

  • Fix: PHP Fatal error: Uncaught Error: Call to undefined method WP_Customize_Manager::settings_previewed(). settings_previewed() does not exist until WordPress 3.9.0+.
Download this release

Release Info

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

Code changes from version 2.0.1 to 2.0.2

dist/js/customize.js CHANGED
File without changes
dist/js/customize.js.map CHANGED
File without changes
dist/js/roles.js CHANGED
File without changes
dist/js/roles.js.map CHANGED
File without changes
inc/class-nav-menu-roles-import.php CHANGED
File without changes
inc/class-walker-nav-menu-edit-roles-4.5.php CHANGED
File without changes
inc/class-walker-nav-menu-edit-roles-4.7.php CHANGED
File without changes
inc/class-walker-nav-menu-edit-roles.php CHANGED
File without changes
inc/customizer.php CHANGED
File without changes
languages/nav-menu-roles-fa.mo CHANGED
File without changes
languages/nav-menu-roles-fa.po CHANGED
File without changes
languages/nav-menu-roles-it.mo CHANGED
File without changes
languages/nav-menu-roles-it.po CHANGED
File without changes
languages/nav-menu-roles.pot CHANGED
File without changes
nav-menu-roles.php CHANGED
File without changes
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: menu, menus, nav menu, nav menus
6
  Requires at least: 4.5.0
7
  Tested up to: 5.7.0
8
  Requires PHP: 5.3.2
9
- Stable tag: 2.0.1
10
  License: GPLv3
11
 
12
  Hide custom menu items based on user roles. PLEASE READ THE FAQ IF YOU ARE NOT SEEING THE SETTINGS.
@@ -221,12 +221,30 @@ If every item in your menu is configured to display to logged in users (either a
221
 
222
  Therefore, if you have no items to display, WordPress will end up displaying ALL your pages!!
223
 
224
- If you don't want this, you must set the fallback argument to be a null string.
225
 
226
  `
227
  wp_nav_menu( array( 'theme_location' => 'primary-menu', 'fallback_cb' => '' ) );
228
  `
229
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  = What happened to my menu roles on import/export? =
231
 
232
  The Nav Menu Roles plugin stores 1 piece of post *meta* to every menu item/post. This is exported just fine by the default Export tool.
@@ -247,6 +265,9 @@ Yes, but manually. WPML developers have informed me that the meta data for nav m
247
 
248
  == Changelog ==
249
 
 
 
 
250
  = 2.0.1 =
251
  * Tweak: Alphabetically sort role names.
252
 
6
  Requires at least: 4.5.0
7
  Tested up to: 5.7.0
8
  Requires PHP: 5.3.2
9
+ Stable tag: 2.0.2
10
  License: GPLv3
11
 
12
  Hide custom menu items based on user roles. PLEASE READ THE FAQ IF YOU ARE NOT SEEING THE SETTINGS.
221
 
222
  Therefore, if you have no items to display, WordPress will end up displaying ALL your pages!!
223
 
224
+ If you don't want this, you must set the fallback argument to be a null string.
225
 
226
  `
227
  wp_nav_menu( array( 'theme_location' => 'primary-menu', 'fallback_cb' => '' ) );
228
  `
229
 
230
+ You must do this for every effected instance of `wp_nav_menu()` in your theme templates. It is not possible for me to tell you where they are located, but `header.php` is a very common location for the main menu.
231
+
232
+ Alternatively, you could do this universally by adding the following snippet to your child theme's *function.php* file or by adding it via the [Code Snippets](https://wordpress.org/plugins/code-snippets/) plugin:
233
+
234
+ `
235
+ /**
236
+ * Disables the fallback page menu for all menus
237
+ *
238
+ * @param array $args Array of wp_nav_menu() arguments.
239
+ * @return array
240
+ */
241
+ function kia_nav_menu_args( $args ) {
242
+ $args['fallback_cb'] = '';
243
+ return $args;
244
+ }
245
+ add_filter( 'wp_nav_menu_args', 'kia_nav_menu_args' );
246
+ `
247
+
248
  = What happened to my menu roles on import/export? =
249
 
250
  The Nav Menu Roles plugin stores 1 piece of post *meta* to every menu item/post. This is exported just fine by the default Export tool.
265
 
266
  == Changelog ==
267
 
268
+ = 2.0.2 =
269
+ * Fix: PHP Fatal error: Uncaught Error: Call to undefined method WP_Customize_Manager::settings_previewed(). settings_previewed() does not exist until WordPress 3.9.0+.
270
+
271
  = 2.0.1 =
272
  * Tweak: Alphabetically sort role names.
273