User Menus – Nav Menu Visibility - Version 1.2.3

Version Description

Download this release

Release Info

Developer danieliser
Plugin Icon 128x128 User Menus – Nav Menu Visibility
Version 1.2.3
Comparing to
See all releases

Code changes from version 1.2.2 to 1.2.3

includes/classes/admin/menu-editor.php CHANGED
@@ -17,7 +17,12 @@ class Menu_Editor {
17
  * Init
18
  */
19
  public static function init() {
20
- add_filter( 'wp_edit_nav_menu_walker', array( __CLASS__, 'nav_menu_walker' ), 999999999 );
 
 
 
 
 
21
  add_action( 'admin_head-nav-menus.php', array( __CLASS__, 'register_metaboxes' ) );
22
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
23
  }
17
  * Init
18
  */
19
  public static function init() {
20
+ global $wp_version;
21
+
22
+ if ( version_compare( $wp_version, '5.4-alpha.1', '<' ) ) {
23
+ add_filter( 'wp_edit_nav_menu_walker', array( __CLASS__, 'nav_menu_walker' ), 999999999 );
24
+ }
25
+
26
  add_action( 'admin_head-nav-menus.php', array( __CLASS__, 'register_metaboxes' ) );
27
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
28
  }
includes/classes/admin/menu-settings.php CHANGED
@@ -18,6 +18,7 @@ class Menu_Settings {
18
  */
19
  public static function init() {
20
  add_action( 'wp_nav_menu_item_custom_fields', array( __CLASS__, 'fields' ), 10, 4 );
 
21
  add_action( 'wp_update_nav_menu_item', array( __CLASS__, 'save' ), 10, 2 );
22
  }
23
 
18
  */
19
  public static function init() {
20
  add_action( 'wp_nav_menu_item_custom_fields', array( __CLASS__, 'fields' ), 10, 4 );
21
+ // add_action( 'wp_nav_menu_item_custom_fields_customize_template', array( __CLASS__, 'fields' ) );
22
  add_action( 'wp_update_nav_menu_item', array( __CLASS__, 'save' ), 10, 2 );
23
  }
24
 
languages/user-menus.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2019 user-menus
2
  # This file is distributed under the same license as the user-menus package.
3
  msgid ""
4
  msgstr ""
@@ -23,23 +23,23 @@ msgstr ""
23
  msgid "Plugin Activation Error"
24
  msgstr ""
25
 
26
- #: includes/classes/admin/menu-editor.php:55
27
  msgid "User Links"
28
  msgstr ""
29
 
30
- #: includes/classes/admin/menu-editor.php:67
31
  msgid "Login"
32
  msgstr ""
33
 
34
- #: includes/classes/admin/menu-editor.php:71
35
  msgid "Register"
36
  msgstr ""
37
 
38
- #: includes/classes/admin/menu-editor.php:76
39
  msgid "Logout"
40
  msgstr ""
41
 
42
- #: includes/classes/admin/menu-editor.php:176
43
  msgid "Insert User Menu Codes"
44
  msgstr ""
45
 
@@ -51,51 +51,51 @@ msgstr ""
51
  msgid "Import nav menus and other menu item meta skipped by the default importer"
52
  msgstr ""
53
 
54
- #: includes/classes/admin/menu-settings.php:40
55
  msgid "Avatar Size"
56
  msgstr ""
57
 
58
- #: includes/classes/admin/menu-settings.php:52
59
  msgid "Everyone"
60
  msgstr ""
61
 
62
- #: includes/classes/admin/menu-settings.php:53
63
  msgid "Logged Out Users"
64
  msgstr ""
65
 
66
- #: includes/classes/admin/menu-settings.php:54
67
  msgid "Logged In Users"
68
  msgstr ""
69
 
70
- #: includes/classes/admin/menu-settings.php:60
71
  msgid "Current Page"
72
  msgstr ""
73
 
74
- #: includes/classes/admin/menu-settings.php:61
75
  msgid "Home Page"
76
  msgstr ""
77
 
78
- #: includes/classes/admin/menu-settings.php:62
79
  msgid "Custom URL"
80
  msgstr ""
81
 
82
- #: includes/classes/admin/menu-settings.php:69
83
  msgid "Where should users be taken afterwards?"
84
  msgstr ""
85
 
86
- #: includes/classes/admin/menu-settings.php:87
87
  msgid "Enter a url user should be redirected to"
88
  msgstr ""
89
 
90
- #: includes/classes/admin/menu-settings.php:99, includes/classes/admin/menu-settings.php:123
91
  msgid "Who can see this link?"
92
  msgstr ""
93
 
94
- #: includes/classes/admin/menu-settings.php:141
95
  msgid "Choose which roles can see this link"
96
  msgstr ""
97
 
98
- #: includes/classes/admin/menu-settings.php:148
99
  msgid "Choose which roles won't see this link"
100
  msgstr ""
101
 
1
+ # Copyright (C) 2020 user-menus
2
  # This file is distributed under the same license as the user-menus package.
3
  msgid ""
4
  msgstr ""
23
  msgid "Plugin Activation Error"
24
  msgstr ""
25
 
26
+ #: includes/classes/admin/menu-editor.php:60
27
  msgid "User Links"
28
  msgstr ""
29
 
30
+ #: includes/classes/admin/menu-editor.php:72
31
  msgid "Login"
32
  msgstr ""
33
 
34
+ #: includes/classes/admin/menu-editor.php:76
35
  msgid "Register"
36
  msgstr ""
37
 
38
+ #: includes/classes/admin/menu-editor.php:81
39
  msgid "Logout"
40
  msgstr ""
41
 
42
+ #: includes/classes/admin/menu-editor.php:181
43
  msgid "Insert User Menu Codes"
44
  msgstr ""
45
 
51
  msgid "Import nav menus and other menu item meta skipped by the default importer"
52
  msgstr ""
53
 
54
+ #: includes/classes/admin/menu-settings.php:41
55
  msgid "Avatar Size"
56
  msgstr ""
57
 
58
+ #: includes/classes/admin/menu-settings.php:53
59
  msgid "Everyone"
60
  msgstr ""
61
 
62
+ #: includes/classes/admin/menu-settings.php:54
63
  msgid "Logged Out Users"
64
  msgstr ""
65
 
66
+ #: includes/classes/admin/menu-settings.php:55
67
  msgid "Logged In Users"
68
  msgstr ""
69
 
70
+ #: includes/classes/admin/menu-settings.php:61
71
  msgid "Current Page"
72
  msgstr ""
73
 
74
+ #: includes/classes/admin/menu-settings.php:62
75
  msgid "Home Page"
76
  msgstr ""
77
 
78
+ #: includes/classes/admin/menu-settings.php:63
79
  msgid "Custom URL"
80
  msgstr ""
81
 
82
+ #: includes/classes/admin/menu-settings.php:70
83
  msgid "Where should users be taken afterwards?"
84
  msgstr ""
85
 
86
+ #: includes/classes/admin/menu-settings.php:88
87
  msgid "Enter a url user should be redirected to"
88
  msgstr ""
89
 
90
+ #: includes/classes/admin/menu-settings.php:100, includes/classes/admin/menu-settings.php:124
91
  msgid "Who can see this link?"
92
  msgstr ""
93
 
94
+ #: includes/classes/admin/menu-settings.php:142
95
  msgid "Choose which roles can see this link"
96
  msgstr ""
97
 
98
+ #: includes/classes/admin/menu-settings.php:149
99
  msgid "Choose which roles won't see this link"
100
  msgstr ""
101
 
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
- === User Menus - Nav Menu Visibility ===
2
  Contributors: codeatlantic, danieliser
3
  Author URI: https://code-atlantic.com/
4
  Plugin URI: https://wordpress.org/plugins/user-menus/
5
  Donate link: https://code-atlantic.com/donate/
6
  Tags: menu, menus, user-menu, logout, nav-menu, nav-menus, user, user-role, user-roles
7
  Requires at least: 4.6
8
- Tested up to: 5.3
9
- Stable tag: 1.2.2
10
  Requires PHP: 5.3
11
  License: GPLv3 or Any Later Version
12
 
@@ -115,6 +115,9 @@ Bugs can be reported either in our support forum or preferably on the [User Menu
115
 
116
  == Changelog ==
117
 
 
 
 
118
  = v1.2.2 - 12/17/2019 =
119
  * Improvement: Login, Register & Logout menu links now hint at who they will be visible for.
120
  * Fix: Deprecation notice for sites using PHP 7.4
1
+ === User Menus - Nav Menu Visibility ===
2
  Contributors: codeatlantic, danieliser
3
  Author URI: https://code-atlantic.com/
4
  Plugin URI: https://wordpress.org/plugins/user-menus/
5
  Donate link: https://code-atlantic.com/donate/
6
  Tags: menu, menus, user-menu, logout, nav-menu, nav-menus, user, user-role, user-roles
7
  Requires at least: 4.6
8
+ Tested up to: 5.4
9
+ Stable tag: 1.2.3
10
  Requires PHP: 5.3
11
  License: GPLv3 or Any Later Version
12
 
115
 
116
  == Changelog ==
117
 
118
+ = v1.2.3 - 3/23/2020 =
119
+ * Tweak: Add compatibility fix for WP 5.4 menu walker
120
+
121
  = v1.2.2 - 12/17/2019 =
122
  * Improvement: Login, Register & Logout menu links now hint at who they will be visible for.
123
  * Fix: Deprecation notice for sites using PHP 7.4
user-menus.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: User Menus
4
  * Plugin URI: https://wordpress.org/plugins/user-menus/
5
  * Description: Quickly customize your menus with a user's name & avatar, or show items based on user role.
6
- * Version: 1.2.2
7
  * Author: Code Atlantic
8
  * Author URI: https://code-atlantic.com/
9
  * License: GPL2 or later
@@ -74,7 +74,7 @@ class JP_User_Menus {
74
  /**
75
  * @var string
76
  */
77
- public static $VER = '1.2.2';
78
 
79
  /**
80
  * @var string
3
  * Plugin Name: User Menus
4
  * Plugin URI: https://wordpress.org/plugins/user-menus/
5
  * Description: Quickly customize your menus with a user's name & avatar, or show items based on user role.
6
+ * Version: 1.2.3
7
  * Author: Code Atlantic
8
  * Author URI: https://code-atlantic.com/
9
  * License: GPL2 or later
74
  /**
75
  * @var string
76
  */
77
+ public static $VER = '1.2.3';
78
 
79
  /**
80
  * @var string