User Menus – Nav Menu Visibility - Version 1.1.3

Version Description

Download this release

Release Info

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

Code changes from version 1.1.2 to 1.1.3

assets/css/admin-general.css ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .jpum-user-codes {
2
+ display: none;
3
+ position: absolute;
4
+ right: 3px;
5
+ bottom: 2px;
6
+ }
7
+
8
+ .jpum-user-codes > button {
9
+ border: 1px solid;
10
+ border-radius: 2px;
11
+ background-color: #23282d;
12
+ color: #eee;
13
+ text-align: center;
14
+ cursor: pointer;
15
+ font-size: 22px;
16
+ height: 22px;
17
+ width: 22px;
18
+ padding: 0;
19
+ outline: 0;
20
+ display: block;
21
+ }
22
+
23
+ .jpum-user-codes > button:focus {
24
+ border-color: #5b9dd9;
25
+ -webkit-box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
26
+ box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
27
+ }
28
+
29
+ .jpum-user-codes > button .dashicons {
30
+ width: 20px;
31
+ height: 20px;
32
+ font-size: 20px;
33
+ }
34
+
35
+ .jpum-user-codes:hover > button {
36
+ background-color: #0073aa;
37
+ color: #fff;
38
+ }
39
+
40
+ .jpum-user-codes ul {
41
+ display: none;
42
+ position: absolute;
43
+ top: 1px;
44
+ left: 20px;
45
+ background-color: #fff;
46
+ width: auto;
47
+ z-index: 999;
48
+ /*box-shadow: 1px 1px 5px -1px; */
49
+ }
50
+
51
+ .jpum-user-codes ul li {
52
+ display: block;
53
+ border-bottom: 1px dashed rgba(0, 0, 0, 0.25);
54
+ background-color: #23282d;
55
+ }
56
+
57
+ .jpum-user-codes ul li > a {
58
+ color: #eee;
59
+ cursor: pointer;
60
+ line-height: 1;
61
+ white-space: nowrap;
62
+ text-decoration: none;
63
+ display: block;
64
+ padding: .5em;
65
+ }
66
+
67
+ .jpum-user-codes ul li > a:focus {
68
+ color: #0073aa;
69
+ border: 0;
70
+ -webkit-box-shadow: none;
71
+ box-shadow: none;
72
+ }
73
+
74
+ .jpum-user-codes ul li:last-child {
75
+ border-bottom: 0;
76
+ }
77
+
78
+ .jpum-user-codes ul li:hover {
79
+ background-color: #0073aa;
80
+ }
81
+
82
+ .jpum-user-codes ul li:hover > a {
83
+ color: #fff;
84
+ }
85
+
86
+ .jpum-user-codes.open ul {
87
+ display: block;
88
+ }
89
+
90
+ #menu-to-edit .menu-item p.description-wide {
91
+ position: relative;
92
+ }
93
+
94
+ #menu-to-edit .menu-item .nav_item_options-roles label {
95
+ width: 33%;
96
+ display: inline-block;
97
+ float: left;
98
+ margin-top: 5px;
99
+ }
100
+
101
+ #menu-to-edit .menu-item.show-insert-button .jpum-user-codes {
102
+ display: block;
103
+ }
104
+
105
+ /*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4tZ2VuZXJhbC5jc3MiLCJzb3VyY2VzIjpbImFkbWluLWdlbmVyYWwuc2NzcyJdLCJzb3VyY2VzQ29udGVudCI6WyIuanB1bS11c2VyLWNvZGVzIHtcblxuICBkaXNwbGF5OiBub25lO1xuXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgcmlnaHQ6IDNweDtcbiAgYm90dG9tOiAycHg7XG5cbiAgPiBidXR0b24ge1xuICAgIGJvcmRlcjogMXB4IHNvbGlkO1xuICAgIGJvcmRlci1yYWRpdXM6IDJweDtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjMyODJkO1xuICAgIGNvbG9yOiAjZWVlO1xuICAgIHRleH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cbiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgcGFkZGluZzogLjVlbTtcblxuICAgICAgICAmOmZvY3VzIHtcbiAgICAgICAgICBjb2xvcjogIzAwNzNhYTtcbiAgICAgICAgICBib3JkZXI6IDA7XG4gICAgICAgICAgYm94LXNoYWRvdzogbm9uZTtcblxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgICY6bGFzdC1jaGlsZCB7XG4gICAgICAgIGJvcmRlci1ib3R0b206IDA7XG4gICAgICB9XG5cbiAgICAgICY6aG92ZXIge1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjMDA3M2FhO1xuXG4gICAgICAgID4gYSB7XG4gICAgICAgICAgY29sb3I6ICNmZmY7XG5cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgfVxuXG4gIH1cblxuICAmLm9wZW4gdWwge1xuICAgIGRpc3BsYXk6IGJsb2NrO1xuICB9XG5cbn1cblxuI21lbnUtdG8tZWRpdCB7XG5cbiAgLm1lbnUtaXRlbSB7XG5cbiAgICBwLmRlc2NyaXB0aW9uLXdpZGUge1xuXG4gICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG5cbiAgICB9XG5cbiAgICAubmF2X2l0ZW1fb3B0aW9ucy1yb2xlcyB7XG4gICAgICBsYWJlbCB7XG4gICAgICAgIHdpZHRoOiAzMyU7XG4gICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICAgICAgZmxvYXQ6IGxlZnQ7XG4gICAgICAgIG1hcmdpbi10b3A6IDVweDtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAmLnNob3ctaW5zZXJ0LWJ1dHRvbiB7XG5cbiAgICAgIC5qcHVtLXVzZXItY29kZXMge1xuICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgIH1cblxuICAgIH1cblxuIC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Q0FBQztFQUNOLGdCQUFnQixFQUFFLE9BQU87Q0FNMUI7O0FBbkZQLEFBK0VRLGdCQS9FUSxDQXVDZCxFQUFFLENBV0EsRUFBRSxBQTBCQyxNQUFNLEdBR0gsQ0FBQyxDQUFDO0VBQ0YsS0FBSyxFQUFFLElBQUk7Q0FFWjs7QUFsRlQsQUF5RkUsZ0JBekZjLEFBeUZiLEtBQUssQ0FBQyxFQUFFLENBQUM7RUFDUixPQUFPLEVBQUUsS0FBSztDQUNmOztBQUlILEFBSUksYUFKUyxDQUVYLFVBQVUsQ0FFUixDQUFDLEFBQUEsaUJBQWlCLENBQUM7RUFFakIsUUFBUSxFQUFFLFFBQVE7Q0FFbkI7O0FBUkwsQUFXTSxhQVhPLENBRVgsVUFBVSxDQVFSLHVCQUF1QixDQUNyQixLQUFLLENBQUM7RUFDSixLQUFLLEVBQUUsR0FBRztFQUNWLE9BQU8sRUFBRSxZQUFZO0VBQ3JCLEtBQUssRUFBRSxJQUFJO0VBQ1gsVUFBVSxFQUFFLEdBQUc7Q0FDaEI7O0FBaEJQLEFBcUJNLGFBckJPLENBRVgsVUFBVSxBQWlCUCxtQkFBbUIsQ0FFbEIsZ0JBQWdCLENBQUM7RUFDZixPQUFPLEVBQUUsS0FBSztDQUNmIn0= */
106
+
107
+ /*# sourceMappingURL=admin-general.css.map */
assets/css/admin-general.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["admin-general.scss","admin-general.css"],"names":[],"mappings":"AAAA;EAIE,cAAU;EAEV,mBAAW;EAuFZ,WAAA;ECvFC,YAAW;CAuFZ;;AD7FD;EAUI,kBAAkB;EAClB,mBAAkB;EAClB,0BAAW;EACX,YAAY;EACZ,mBAAe;EACf,gBAAe;EACf,gBAAY;EACZ,aAAW;EACX,YAAU;EACV,WAAU;EACV,WAAS;EAYV,eAAA;CCAA;;ADhCH;EAuBM,sBAAqB;EACrB,oDAA6C;UAA7C,4CAA6C;CAC9C;;AAzBL;EA4BM,YAAW;EACX,aAAY;EACZ,gBAAe;CAChB;;AA/BL;EAoCI,0BAAW;EACZ,YAAA;CCAA;;ADrCH;EA0CI,cAAU;EAEV,mBAAU;EACV,SAAA;EACA,WAAW;EACX,uBAAY;EACZ,YAAA;EAuCD,aAAA;ECvCC,kCAAkC;CD+CtC;;AA/FA;EAoDM,eAAkB;EAClB,8CAAyB;EAgC1B,0BAAA;CAMF;;AA3FH;EAwDa,YAAM;EACL,gBAAS;EACf,eAAc;EACd,oBAAmB;EACnB,sBAAqB;EACrB,eAAc;EACd,cAAa;CCQd;;ADtEP;EAAA,eAkDM;EAeW,UAAO;EACN,yBAAC;UAAD,iBAAC;CAGV;;AArET;EA0EO,iBAAA;CCAA;;AD1EP;EAmFO,0BAAA;CAnFP;;AAAA;EAgFiB,YAAI;CCEZ;;ADlFT;EC0FI,eAAc;CDKlB;;ACAA;EAMM,mBAAkB;CAEnB;;AARL;EAYQ,WAAU;EACV,sBAAqB;EACrB,YAAW;EACX,gBAAe;CAChB;;AAhBP;EAsBQ,eAAc;CACf;;AAhBP,k3KAAk3K","file":"admin-general.css","sourcesContent":[".jpum-user-codes {\n\n display: none;\n\n position: absolute;\n right: 3px;\n bottom: 2px;\n\n > button {\n border: 1px solid;\n border-radius: 2px;\n background-color: #23282d;\n color: #eee;\n text-align: center;\n cursor: pointer;\n font-size: 22px;\n height: 22px;\n width: 22px;\n padding: 0;\n outline: 0;\n display: block;\n\n &:focus {\n border-color: #5b9dd9;\n box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );\n }\n\n .dashicons {\n width: 20px;\n height: 20px;\n font-size: 20px;\n }\n }\n\n &:hover > button {\n background-color: #0073aa;\n color: #fff;\n }\n\n ul {\n display: none;\n\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n /*box-shadow: 1px 1px 5px -1px; */\n\n li {\n display: block;\n border-bottom: 1px dashed rgba(0, 0, 0, .25);\n background-color: #23282d;\n\n > a {\n color: #eee;\n cursor: pointer;\n line-height: 1;\n white-space: nowrap;\n text-decoration: none;\n display: block;\n padding: .5em;\n\n &:focus {\n color: #0073aa;\n border: 0;\n box-shadow: none;\n\n }\n }\n\n &:last-child {\n border-bottom: 0;\n }\n\n &:hover {\n background-color: #0073aa;\n\n > a {\n color: #fff;\n\n }\n }\n\n }\n\n }\n\n &.open ul {\n display: block;\n }\n\n}\n\n#menu-to-edit {\n\n .menu-item {\n\n p.description-wide {\n\n position: relative;\n\n }\n\n .nav_item_options-roles {\n label {\n width: 33%;\n display: inline-block;\n float: left;\n margin-top: 5px;\n }\n }\n\n &.show-insert-button {\n\n .jpum-user-codes {\n display: block;\n }\n\n }\n\n }\n\n}\n",".jpum-user-codes {\n\n display: none;\n\n position: absolute;\n right: 3px;\n bottom: 2px;\n\n > button {\n border: 1px solid;\n border-radius: 2px;\n background-color: #23282d;\n color: #eee;\n text-align: center;\n cursor: pointer;\n font-size: 22px;\n height: 22px;\n width: 22px;\n padding: 0;\n outline: 0;\n display: block;\n\n &:focus {\n border-color: #5b9dd9;\n box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );\n }\n\n .dashicons {\n width: 20px;\n height: 20px;\n font-size: 20px;\n }\n }\n\n &:hover > button {\n background-color: #0073aa;\n color: #fff;\n }\n\n ul {\n display: none;\n\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n /*box-shadow: 1px 1px 5px -1px; */\n\n li {\n display: block;\n border-bottom: 1px dashed rgba(0, 0, 0, .25);\n background-color: #23282d;\n\n > a {\n color: #eee;\n cursor: pointer;\n line-height: 1;\n white-space: nowrap;\n text-decoration: none;\n display: block;\n padding: .5em;\n\n &:focus {\n color: #0073aa;\n border: 0;\n box-shadow: none;\n\n }\n }\n\n &:last-child {\n border-bottom: 0;\n }\n\n &:hover {\n background-color: #0073aa;\n\n > a {\n color: #fff;\n\n }\n }\n\n }\n\n }\n\n &.open ul {\n display: block;\n }\n\n}\n\n#menu-to-edit {\n\n .menu-item {\n\n p.description-wide {\n\n position: relative;\n\n }\n\n .nav_item_options-roles {\n label {\n width: 33%;\n display: inline-block;\n float: left;\n margin-top: 5px;\n }\n }\n\n &.show-insert-button {\n\n .jpum-user-codes {\n display: block;\n }\n\n }\n\n }\n\n}\n"]}
assets/css/admin-general.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .jpum-user-codes{display:none;position:absolute;right:3px;bottom:2px}.jpum-user-codes>button{border:1px solid;border-radius:2px;background-color:#23282d;color:#eee;text-align:center;cursor:pointer;font-size:22px;height:22px;width:22px;padding:0;outline:0;display:block}.jpum-user-codes>button:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.jpum-user-codes>button .dashicons{width:20px;height:20px;font-size:20px}.jpum-user-codes:hover>button{background-color:#0073aa;color:#fff}.jpum-user-codes ul{display:none;position:absolute;top:1px;left:20px;background-color:#fff;width:auto;z-index:999}.jpum-user-codes ul li{display:block;border-bottom:1px dashed rgba(0,0,0,.25);background-color:#23282d}.jpum-user-codes ul li>a{color:#eee;cursor:pointer;line-height:1;white-space:nowrap;text-decoration:none;display:block;padding:.5em}.jpum-user-codes ul li>a:focus{color:#0073aa;border:0;-webkit-box-shadow:none;box-shadow:none}.jpum-user-codes ul li:last-child{border-bottom:0}.jpum-user-codes ul li:hover{background-color:#0073aa}.jpum-user-codes ul li:hover>a{color:#fff}#menu-to-edit .menu-item.show-insert-button .jpum-user-codes,.jpum-user-codes.open ul{display:block}#menu-to-edit .menu-item p.description-wide{position:relative}#menu-to-edit .menu-item .nav_item_options-roles label{width:33%;display:inline-block;float:left;margin-top:5px}
assets/{scripts/admin.js → js/admin-general.js} RENAMED
@@ -1,108 +1,109 @@
1
- (function ($, $document) {
2
- "use strict";
3
-
4
- function redirect_type() {
5
- var $this = $(this),
6
- $url = $this.parents('.menu-item').find('.nav_item_options-redirect_url');
7
-
8
- if ($this.val() == 'custom') {
9
- $url.slideDown();
10
- } else {
11
- $url.slideUp();
12
- }
13
- }
14
-
15
- function avatar_check() {
16
- var $label = $(this),
17
- $size = $label.parents('.menu-item').find('.nav_item_options-avatar_size');
18
-
19
- if ($label.val().indexOf('{avatar}') >= 0) {
20
- $size.slideDown();
21
- } else {
22
- $size.slideUp();
23
- }
24
- }
25
-
26
- function which_users() {
27
- var $this = $(this),
28
- $item = $this.parents('.menu-item'),
29
- $roles = $item.find('.nav_item_options-roles'),
30
- $insert_button = $item.find('.jpum-user-codes');
31
-
32
- if ($this.val() === 'logged_in') {
33
- $roles.slideDown();
34
- $item.addClass('show-insert-button');
35
- $insert_button.fadeOut(0).fadeIn();
36
- } else {
37
- $roles.slideUp();
38
- $insert_button.fadeOut(function () {
39
- $item.removeClass('show-insert-button');
40
- });
41
- }
42
- }
43
-
44
-
45
- function toggle_user_codes() {
46
- $(this).parent().toggleClass('open');
47
- }
48
-
49
-
50
- function reset_user_codes(e) {
51
- if (e !== undefined && $(e.target).parents('.jpum-user-codes').length) {
52
- return;
53
- }
54
-
55
- $('.jpum-user-codes').removeClass('open');
56
- }
57
-
58
- function insert_user_code(event) {
59
- var $this = $(this),
60
- $input = $this.parents('p').find('input'),
61
- val = $input.val();
62
-
63
- event.which = event.which || event.keyCode;
64
-
65
- if (event.type === 'keypress' && event.keyCode !== 13 && event.keyCode !== 32 ) {
66
- return;
67
- }
68
-
69
- $input.val(val + "{" + $this.data('code') + "}").trigger('change');
70
- reset_user_codes();
71
-
72
- event.preventDefault();
73
- }
74
-
75
- function append_user_codes() {
76
- return $('input.edit-menu-item-title').each(function () {
77
- var $this = $(this).parents('label'),
78
- template = _.template($('#tmpl-jpum-user-codes').html());
79
-
80
- if (!$this.parents('p').find('.jpum-user-codes').length) {
81
- $this.after(template());
82
- }
83
- });
84
- }
85
-
86
- function refresh_all_items() {
87
- append_user_codes();
88
- $(".nav_item_options-redirect_type select").each(redirect_type);
89
- $('.nav_item_options-which_users select').each(which_users);
90
- $('.nav_item_options-which_users select').each(which_users);
91
- $('input.edit-menu-item-title').each(avatar_check);
92
- }
93
-
94
- $document
95
- .on('change', '.nav_item_options-redirect_type select', redirect_type)
96
- .on('change', '.nav_item_options-which_users select', which_users)
97
- .on('change keyup focusout', 'input.edit-menu-item-title', avatar_check)
98
- .on('click', '.jpum-user-codes > button', toggle_user_codes)
99
- .on('click keypress', '.jpum-user-codes li > a', insert_user_code)
100
- .on('click', reset_user_codes)
101
- .ready(refresh_all_items);
102
-
103
- // Add click event directly to submit buttons to prevent being prevented by default action.
104
- $('.submit-add-to-menu').click(function () {
105
- setTimeout(refresh_all_items, 1000);
106
- });
107
-
 
108
  }(jQuery, jQuery(document)));
1
+ (function ($, $document) {
2
+ "use strict";
3
+
4
+ function redirect_type() {
5
+ var $this = $(this),
6
+ $url = $this.parents('.menu-item').find('.nav_item_options-redirect_url');
7
+
8
+ if ($this.val() == 'custom') {
9
+ $url.slideDown();
10
+ } else {
11
+ $url.slideUp();
12
+ }
13
+ }
14
+
15
+ function avatar_check() {
16
+ var $label = $(this),
17
+ $size = $label.parents('.menu-item').find('.nav_item_options-avatar_size');
18
+
19
+ if ($label.val().indexOf('{avatar}') >= 0) {
20
+ $size.slideDown();
21
+ } else {
22
+ $size.slideUp();
23
+ }
24
+ }
25
+
26
+ function which_users() {
27
+ var $this = $(this),
28
+ $item = $this.parents('.menu-item'),
29
+ $roles = $item.find('.nav_item_options-roles'),
30
+ $insert_button = $item.find('.jpum-user-codes');
31
+
32
+ if ($this.val() === 'logged_in') {
33
+ $roles.slideDown();
34
+ $item.addClass('show-insert-button');
35
+ $insert_button.fadeOut(0).fadeIn();
36
+ } else {
37
+ $roles.slideUp();
38
+ $insert_button.fadeOut(function () {
39
+ $item.removeClass('show-insert-button');
40
+ });
41
+ }
42
+ }
43
+
44
+
45
+ function toggle_user_codes() {
46
+ $(this).parent().toggleClass('open');
47
+ }
48
+
49
+
50
+ function reset_user_codes(e) {
51
+ if (e !== undefined && $(e.target).parents('.jpum-user-codes').length) {
52
+ return;
53
+ }
54
+
55
+ $('.jpum-user-codes').removeClass('open');
56
+ }
57
+
58
+ function insert_user_code(event) {
59
+ var $this = $(this),
60
+ $input = $this.parents('p').find('input'),
61
+ val = $input.val();
62
+
63
+ event.which = event.which || event.keyCode;
64
+
65
+ if (event.type === 'keypress' && event.keyCode !== 13 && event.keyCode !== 32 ) {
66
+ return;
67
+ }
68
+
69
+ $input.val(val + "{" + $this.data('code') + "}").trigger('change');
70
+ reset_user_codes();
71
+
72
+ event.preventDefault();
73
+ }
74
+
75
+ function append_user_codes() {
76
+ return $('input.edit-menu-item-title').each(function () {
77
+ var $this = $(this).parents('label'),
78
+ template = _.template($('#tmpl-jpum-user-codes').html());
79
+
80
+ if (!$this.parents('p').find('.jpum-user-codes').length) {
81
+ $this.after(template());
82
+ }
83
+ });
84
+ }
85
+
86
+ function refresh_all_items() {
87
+ append_user_codes();
88
+ $('.nav_item_options-redirect_type select').each(redirect_type);
89
+ $('.nav_item_options-which_users select').each(which_users);
90
+ $('.nav_item_options-which_users select').each(which_users);
91
+ $('input.edit-menu-item-title').each(avatar_check);
92
+ }
93
+
94
+ $document
95
+ .on('change', '.nav_item_options-redirect_type select', redirect_type)
96
+ .on('change', '.nav_item_options-which_users select', which_users)
97
+ .on('change keyup focusout', 'input.edit-menu-item-title', avatar_check)
98
+ .on('click', '.jpum-user-codes > button', toggle_user_codes)
99
+ .on('click keypress', '.jpum-user-codes li > a', insert_user_code)
100
+ .on('click', reset_user_codes)
101
+ .on('menu-item-added', refresh_all_items)
102
+ .ready(refresh_all_items);
103
+
104
+ // Add click event directly to submit buttons to prevent being prevented by default action.
105
+ $('.submit-add-to-menu').click(function () {
106
+ setTimeout(refresh_all_items, 1000);
107
+ });
108
+
109
  }(jQuery, jQuery(document)));
assets/js/admin-general.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(s,e){"use strict";function t(){var e=s(this),t=e.parents(".menu-item").find(".nav_item_options-redirect_url");"custom"==e.val()?t.slideDown():t.slideUp()}function n(){var e=s(this),t=e.parents(".menu-item").find(".nav_item_options-avatar_size");0<=e.val().indexOf("{avatar}")?t.slideDown():t.slideUp()}function i(){var e=s(this),t=e.parents(".menu-item"),n=t.find(".nav_item_options-roles"),i=t.find(".jpum-user-codes");"logged_in"===e.val()?(n.slideDown(),t.addClass("show-insert-button"),i.fadeOut(0).fadeIn()):(n.slideUp(),i.fadeOut(function(){t.removeClass("show-insert-button")}))}function o(e){void 0!==e&&s(e.target).parents(".jpum-user-codes").length||s(".jpum-user-codes").removeClass("open")}function a(){s("input.edit-menu-item-title").each(function(){var e=s(this).parents("label"),t=_.template(s("#tmpl-jpum-user-codes").html());e.parents("p").find(".jpum-user-codes").length||e.after(t())}),s(".nav_item_options-redirect_type select").each(t),s(".nav_item_options-which_users select").each(i),s(".nav_item_options-which_users select").each(i),s("input.edit-menu-item-title").each(n)}jQuery(document).on("change",".nav_item_options-redirect_type select",t).on("change",".nav_item_options-which_users select",i).on("change keyup focusout","input.edit-menu-item-title",n).on("click",".jpum-user-codes > button",function(){s(this).parent().toggleClass("open")}).on("click keypress",".jpum-user-codes li > a",function(e){var t=s(this),n=t.parents("p").find("input"),i=n.val();e.which=e.which||e.keyCode,"keypress"===e.type&&13!==e.keyCode&&32!==e.keyCode||(n.val(i+"{"+t.data("code")+"}").trigger("change"),o(),e.preventDefault())}).on("click",o).on("menu-item-added",a).ready(a),s(".submit-add-to-menu").click(function(){setTimeout(a,1e3)})}(jQuery);
assets/{styles/sass/admin.scss → sass/admin-general.scss} RENAMED
@@ -3,8 +3,8 @@
3
  display: none;
4
 
5
  position: absolute;
6
- right: 1px;
7
- bottom: 1px;
8
 
9
  > button {
10
  border: 1px solid;
3
  display: none;
4
 
5
  position: absolute;
6
+ right: 3px;
7
+ bottom: 2px;
8
 
9
  > button {
10
  border: 1px solid;
assets/scripts/admin.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e,t){"use strict";function n(){var t=e(this),n=t.parents(".menu-item").find(".nav_item_options-redirect_url");"custom"==t.val()?n.slideDown():n.slideUp()}function i(){var t=e(this),n=t.parents(".menu-item").find(".nav_item_options-avatar_size");t.val().indexOf("{avatar}")>=0?n.slideDown():n.slideUp()}function s(){var t=e(this),n=t.parents(".menu-item"),i=n.find(".nav_item_options-roles"),s=n.find(".jpum-user-codes");"logged_in"===t.val()?(i.slideDown(),n.addClass("show-insert-button"),s.fadeOut(0).fadeIn()):(i.slideUp(),s.fadeOut(function(){n.removeClass("show-insert-button")}))}function o(){e(this).parent().toggleClass("open")}function a(t){void 0!==t&&e(t.target).parents(".jpum-user-codes").length||e(".jpum-user-codes").removeClass("open")}function u(t){var n=e(this),i=n.parents("p").find("input"),s=i.val();t.which=t.which||t.keyCode,"keypress"===t.type&&13!==t.keyCode&&32!==t.keyCode||(i.val(s+"{"+n.data("code")+"}").trigger("change"),a(),t.preventDefault())}function c(){return e("input.edit-menu-item-title").each(function(){var t=e(this).parents("label"),n=_.template(e("#tmpl-jpum-user-codes").html());t.parents("p").find(".jpum-user-codes").length||t.after(n())})}function r(){c(),e(".nav_item_options-redirect_type select").each(n),e(".nav_item_options-which_users select").each(s),e(".nav_item_options-which_users select").each(s),e("input.edit-menu-item-title").each(i)}t.on("change",".nav_item_options-redirect_type select",n).on("change",".nav_item_options-which_users select",s).on("change keyup focusout","input.edit-menu-item-title",i).on("click",".jpum-user-codes > button",o).on("click keypress",".jpum-user-codes li > a",u).on("click",a).ready(r),e(".submit-add-to-menu").click(function(){setTimeout(r,1e3)})}(jQuery,jQuery(document));
 
assets/styles/admin.css DELETED
@@ -1,105 +0,0 @@
1
- .jpum-user-codes {
2
- display: none;
3
- position: absolute;
4
- right: 1px;
5
- bottom: 1px;
6
- }
7
-
8
- .jpum-user-codes > button {
9
- border: 1px solid;
10
- border-radius: 2px;
11
- background-color: #23282d;
12
- color: #eee;
13
- text-align: center;
14
- cursor: pointer;
15
- font-size: 22px;
16
- height: 22px;
17
- width: 22px;
18
- padding: 0;
19
- outline: 0;
20
- display: block;
21
- }
22
-
23
- .jpum-user-codes > button:focus {
24
- border-color: #5b9dd9;
25
- box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
26
- }
27
-
28
- .jpum-user-codes > button .dashicons {
29
- width: 20px;
30
- height: 20px;
31
- font-size: 20px;
32
- }
33
-
34
- .jpum-user-codes:hover > button {
35
- background-color: #0073aa;
36
- color: #fff;
37
- }
38
-
39
- .jpum-user-codes ul {
40
- display: none;
41
- position: absolute;
42
- top: 1px;
43
- left: 20px;
44
- background-color: #fff;
45
- width: auto;
46
- z-index: 999;
47
- /*box-shadow: 1px 1px 5px -1px; */
48
- }
49
-
50
- .jpum-user-codes ul li {
51
- display: block;
52
- border-bottom: 1px dashed rgba(0, 0, 0, 0.25);
53
- background-color: #23282d;
54
- }
55
-
56
- .jpum-user-codes ul li > a {
57
- color: #eee;
58
- cursor: pointer;
59
- line-height: 1;
60
- white-space: nowrap;
61
- text-decoration: none;
62
- display: block;
63
- padding: .5em;
64
- }
65
-
66
- .jpum-user-codes ul li > a:focus {
67
- color: #0073aa;
68
- border: 0;
69
- box-shadow: none;
70
- }
71
-
72
- .jpum-user-codes ul li:last-child {
73
- border-bottom: 0;
74
- }
75
-
76
- .jpum-user-codes ul li:hover {
77
- background-color: #0073aa;
78
- }
79
-
80
- .jpum-user-codes ul li:hover > a {
81
- color: #fff;
82
- }
83
-
84
- .jpum-user-codes.open ul {
85
- display: block;
86
- }
87
-
88
- #menu-to-edit .menu-item p.description-wide {
89
- position: relative;
90
- }
91
-
92
- #menu-to-edit .menu-item .nav_item_options-roles label {
93
- width: 33%;
94
- display: inline-block;
95
- float: left;
96
- margin-top: 5px;
97
- }
98
-
99
- #menu-to-edit .menu-item.show-insert-button .jpum-user-codes {
100
- display: block;
101
- }
102
-
103
- /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4uY3NzIiwic291cmNlcyI6WyJhZG1pbi5zY3NzIl0sInNvdXJjZXND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cHggMXB4IDVweCAtMXB4OyAqL1xuXG4gICAgbGkge1xuICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICBib3JkZXItYm90dG9tOiAxcHggZGFzaGVkIHJnYmEoMCwgMCwgMCwgLjI1KTtcbiAgICAgIGJhY2tncm91bmQtY29sb3I6ICMyMzI4MmQ7XG5cbiAgICAgID4gYSB7XG4gICAgICAgIGNvbG9yOiAjZWVlO1xuICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgIGxpbmUtaGVpZ2h0OiAxO1xuICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgICBwYWRkaW5nOiAuNWVtO1xuXG4gICAgICAgICY6Zm9jdXMge1xuICAgICAgICAgIGNvbG9yOiAjMDA3M2FhO1xuICAgICAgICAgIGJvcmRlcjogMDtcbiAgICAgICAgICBib3gtc2hhZG93OiBub25lO1xuXG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgJjpsYXN0LWNoaWxkIHtcbiAgICAgICAgYm9yZGVyLWJvdHRvbTogMDtcbiAgICAgIH1cblxuICAgICAgJjpob3ZlciB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICMwMDczYWE7XG5cbiAgICAgICAgPiBhIHtcbiAgICAgICAgICBjb2xvcjogI2ZmZjtcblxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICB9XG5cbiAgfVxuXG4gICYub3BlbiB1bCB7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gIH1cblxufVxuXG4jbWVudS10by1lZGl0IHtcblxuICAubWVudS1pdGVtIHtcblxuICAgIHAuZGVzY3JpcHRpb24td2lkZSB7XG5cbiAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuICAgIH1cblxuICAgIC5uYXZfaXRlbV9vcHRpb25zLXJvbGVzIHtcbiAgICAgIGxhYmVsI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Q,eAAe;CAChB;;AChBP,i3KAAi3K","file":"admin.css","sourcesContent":[".jpum-user-codes {\n\n display: none;\n\n position: absolute;\n right: 1px;\n bottom: 1px;\n\n > button {\n border: 1px solid;\n border-radius: 2px;\n background-color: #23282d;\n color: #eee;\n text-align: center;\n cursor: pointer;\n font-size: 22px;\n height: 22px;\n width: 22px;\n padding: 0;\n outline: 0;\n display: block;\n\n &:focus {\n border-color: #5b9dd9;\n box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );\n }\n\n .dashicons {\n width: 20px;\n height: 20px;\n font-size: 20px;\n }\n }\n\n &:hover > button {\n background-color: #0073aa;\n color: #fff;\n }\n\n ul {\n display: none;\n\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n /*box-shadow: 1px 1px 5px -1px; */\n\n li {\n display: block;\n border-bottom: 1px dashed rgba(0, 0, 0, .25);\n background-color: #23282d;\n\n > a {\n color: #eee;\n cursor: pointer;\n line-height: 1;\n white-space: nowrap;\n text-decoration: none;\n display: block;\n padding: .5em;\n\n &:focus {\n color: #0073aa;\n border: 0;\n box-shadow: none;\n\n }\n }\n\n &:last-child {\n border-bottom: 0;\n }\n\n &:hover {\n background-color: #0073aa;\n\n > a {\n color: #fff;\n\n }\n }\n\n }\n\n }\n\n &.open ul {\n display: block;\n }\n\n}\n\n#menu-to-edit {\n\n .menu-item {\n\n p.description-wide {\n\n position: relative;\n\n }\n\n .nav_item_options-roles {\n label {\n width: 33%;\n display: inline-block;\n float: left;\n margin-top: 5px;\n }\n }\n\n &.show-insert-button {\n\n .jpum-user-codes {\n display: block;\n }\n\n }\n\n }\n\n}\n",".jpum-user-codes {\n display: none;\n position: absolute;\n right: 1px;\n bottom: 1px;\n}\n\n.jpum-user-codes > button {\n border: 1px solid;\n border-radius: 2px;\n background-color: #23282d;\n color: #eee;\n text-align: center;\n cursor: pointer;\n font-size: 22px;\n height: 22px;\n width: 22px;\n padding: 0;\n outline: 0;\n display: block;\n}\n\n.jpum-user-codes > button:focus {\n border-color: #5b9dd9;\n box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);\n}\n\n.jpum-user-codes > button .dashicons {\n width: 20px;\n height: 20px;\n font-size: 20px;\n}\n\n.jpum-user-codes:hover > button {\n background-color: #0073aa;\n color: #fff;\n}\n\n.jpum-user-codes ul {\n display: none;\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n /*box-shadow: 1px 1px 5px -1px; */\n}\n\n.jpum-user-codes ul li {\n display: block;\n border-bottom: 1px dashed rgba(0, 0, 0, 0.25);\n background-color: #23282d;\n}\n\n.jpum-user-codes ul li > a {\n color: #eee;\n cursor: pointer;\n line-height: 1;\n white-space: nowrap;\n text-decoration: none;\n display: block;\n padding: .5em;\n}\n\n.jpum-user-codes ul li > a:focus {\n color: #0073aa;\n border: 0;\n box-shadow: none;\n}\n\n.jpum-user-codes ul li:last-child {\n border-bottom: 0;\n}\n\n.jpum-user-codes ul li:hover {\n background-color: #0073aa;\n}\n\n.jpum-user-codes ul li:hover > a {\n color: #fff;\n}\n\n.jpum-user-codes.open ul {\n display: block;\n}\n\n#menu-to-edit .menu-item p.description-wide {\n position: relative;\n}\n\n#menu-to-edit .menu-item .nav_item_options-roles label {\n width: 33%;\n display: inline-block;\n float: left;\n margin-top: 5px;\n}\n\n#menu-to-edit .menu-item.show-insert-button .jpum-user-codes {\n display: block;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4uY3NzIiwic291cmNlcyI6WyJhZG1pbi5zY3NzIl0sInNvdXJjZXNDb250ZW50IjpbIi5qcHVtLXVzZXItY29kZXMge1xuXG4gIGRpc3BsYXk6IG5vbmU7XG5cbiAgcG9zaXRpb246IGFic29sdXRlO1xuICByaWdodDogMXB4O1xuICBib3R0b206IDFweDtcblxuICA+IGJ1dHRvbiB7XG4gICAgYm9yZGVyOiAxcHggc29saWQ7XG4g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cbiAgICAgID4gYSB7XG4gICAgICAgIGNvbG9yOiAjZWVlO1xuICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgIGxpbmUtaGVpZ2h0OiAxO1xuICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgICBwYWRkaW5nOiAuNWVtO1xuXG4gICAgICAgICY6Zm9jdXMge1xuICAgICAgICAgIGNvbG9yOiAjMDA3M2FhO1xuICAgICAgICAgIGJvcmRlcjogMDtcbiAgICAgICAgICBib3gtc2hhZG93OiBub25lO1xuXG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgJjpsYXN0LWNoaWxkIHtcbiAgICAgICAgYm9yZGVyLWJvdHRvbTogMDtcbiAgICAgIH1cblxuICAgICAgJjpob3ZlciB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICMwMDczYWE7XG5cbiAgICAgICAgPiBhIHtcbiAgICAgICAgICBjb2xvcjogI2ZmZjtcblxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICB9XG5cbiAgfVxuXG4gICYub3BlbiB1bCB7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gIH1cblxufVxuXG4jbWVudS10by1lZGl0IHtcblxuICAubWVudS1pdGVtIHtcblxuICAgIHAuZGVzY3JpcHRpb24td2lkZSB7XG5cbiAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuICAgIH1cblxuICAgIC5uYXZfaXRlbV9vcHRpb25zLXJvbGVzIHtcbiAgICAgIGxhYmVsIHtcbiAgICAgICAgd2lkdGg6IDMzJTtcbiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgICAgICBmbG9hdDogbGVmdDtcbiAgICAgICAgbWFyZ2luLXRvcDogNXB4O1xuICAgICAgfVxuICAgIH1cblxuICAgICYuc2hvdy1pbnNlcnQtYnV0dG9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0FBRTtDQUNsQjs7QUExRVAsQUFrREksZ0JBbERZLENBdUNkLEVBQUUsQ0FXQSxFQUFFLEFBMEJDLE1BQU0sQ0FBQztFQUNOLGdCQUFnQixFQUFFLE9BQVE7Q0FNM0I7O0FBbkZQLEFBK0VVLGdCQS9FTSxDQXVDZCxFQUFFLENBV0EsRUFBRSxBQTBCQyxNQUFNLEdBR0gsQ0FBQyxDQUFDO0VBQ0YsS0FBSyxFQUFFLElBQUs7Q0FFYjs7QUFsRlQsQUF5RlMsZ0JBekZPLEFBeUZiLEtBQUssQ0FBQyxFQUFFLENBQUM7RUFDUixPQUFPLEVBQUUsS0FBTTtDQUNoQjs7QUFJSCxBQUlLLGFBSlEsQ0FFWCxVQUFVLENBRVIsQ0FBQyxBQUFBLGlCQUFpQixDQUFDO0VBRWpCLFFBQVEsRUFBRSxRQUFTO0NBRXBCOztBQVJMLEFBV00sYUFYTyxDQUVYLFVBQVUsQ0FRUix1QkFBdUIsQ0FDckIsS0FBSyxDQUFDO0VBQ0osS0FBSyxFQUFFLEdBQUk7RUFDWCxPQUFPLEVBQUUsWUFBYTtFQUN0QixLQUFLLEVBQUUsSUFBSztFQUNaLFVBQVUsRUFBRSxHQUFJO0NBQ2pCOztBQWhCUCxBQXFCTSxhQXJCTyxDQUVYLFVBQVUsQUFpQlAsbUJBQW1CLENBRWxCLGdCQUFnQixDQUFDO0VBQ2YsT0FBTyxFQUFFLEtBQU07Q0FDaEIiLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 */\n"],"sourceRoot":"/source/"}
 
assets/styles/admin.min.css DELETED
@@ -1 +0,0 @@
1
- .jpum-user-codes{display:none;position:absolute;right:1px;bottom:1px}.jpum-user-codes>button{border:1px solid;border-radius:2px;background-color:#23282d;color:#eee;text-align:center;cursor:pointer;font-size:22px;height:22px;width:22px;padding:0;outline:0;display:block}.jpum-user-codes>button:focus{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.jpum-user-codes>button .dashicons{width:20px;height:20px;font-size:20px}.jpum-user-codes:hover>button{background-color:#0073aa;color:#fff}.jpum-user-codes ul{display:none;position:absolute;top:1px;left:20px;background-color:#fff;width:auto;z-index:999}.jpum-user-codes ul li{display:block;border-bottom:1px dashed rgba(0,0,0,.25);background-color:#23282d}.jpum-user-codes ul li>a{color:#eee;cursor:pointer;line-height:1;white-space:nowrap;text-decoration:none;display:block;padding:.5em}.jpum-user-codes ul li>a:focus{color:#0073aa;border:0;box-shadow:none}.jpum-user-codes ul li:last-child{border-bottom:0}.jpum-user-codes ul li:hover{background-color:#0073aa}.jpum-user-codes ul li:hover>a{color:#fff}#menu-to-edit .menu-item.show-insert-button .jpum-user-codes,.jpum-user-codes.open ul{display:block}#menu-to-edit .menu-item p.description-wide{position:relative}#menu-to-edit .menu-item .nav_item_options-roles label{width:33%;display:inline-block;float:left;margin-top:5px}
 
includes/classes/admin/menu-editor.php CHANGED
@@ -149,8 +149,8 @@ class Menu_Editor {
149
  // Use minified libraries if SCRIPT_DEBUG is turned off
150
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
151
 
152
- wp_enqueue_script( 'jpum-scripts', \JP_User_Menus::$URL . 'assets/scripts/admin' . $suffix . '.js', array( 'jquery', 'underscore' ), \JP_User_Menus::$VER, true );
153
- wp_enqueue_style( 'jpum-styles', \JP_User_Menus::$URL . 'assets/styles/admin' . $suffix . '.css', array( 'dashicons' ), \JP_User_Menus::$VER );
154
  }
155
 
156
  /**
149
  // Use minified libraries if SCRIPT_DEBUG is turned off
150
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
151
 
152
+ wp_enqueue_script( 'jpum-scripts', \JP_User_Menus::$URL . 'assets/js/admin-general' . $suffix . '.js', array( 'jquery', 'underscore' ), \JP_User_Menus::$VER, true );
153
+ wp_enqueue_style( 'jpum-styles', \JP_User_Menus::$URL . 'assets/css/admin-general' . $suffix . '.css', array( 'dashicons' ), \JP_User_Menus::$VER );
154
  }
155
 
156
  /**
includes/classes/importer/menu.php CHANGED
@@ -19,7 +19,9 @@ if ( ! defined( 'IMPORT_DEBUG' ) ) {
19
  }
20
 
21
  // Load Importer API
22
- require_once ABSPATH . 'wp-admin/includes/import.php';
 
 
23
 
24
  if ( ! class_exists( 'WP_Importer' ) ) {
25
  require_once ABSPATH . 'wp-admin/includes/class-wp-importer.php';
19
  }
20
 
21
  // Load Importer API
22
+ if ( ! function_exists( 'get_importers' ) ) {
23
+ require_once ABSPATH . 'wp-admin/includes/import.php';
24
+ }
25
 
26
  if ( ! class_exists( 'WP_Importer' ) ) {
27
  require_once ABSPATH . 'wp-admin/includes/class-wp-importer.php';
includes/classes/menu/items.php CHANGED
@@ -128,8 +128,15 @@ class Items {
128
 
129
  foreach ( $matches as $string ) {
130
 
131
- if ( $current_user->ID == 0 || ! array_key_exists( $string, Codes::valid_codes() ) ) {
132
 
 
 
 
 
 
 
 
 
133
  $replace = '';
134
 
135
  } else {
@@ -137,7 +144,7 @@ class Items {
137
  switch ( $string ) {
138
 
139
  case 'avatar':
140
- $replace = get_avatar( $current_user, self::$current_item->avatar_size );
141
  break;
142
 
143
  case 'first_name':
128
 
129
  foreach ( $matches as $string ) {
130
 
 
131
 
132
+ if ( ! array_key_exists( $string, Codes::valid_codes() ) ) {
133
+
134
+ // If its not a valid code it is likely a fallback.
135
+ $replace = $string;
136
+
137
+ } else if ( $current_user->ID == 0 && array_key_exists( $string, Codes::valid_codes() ) ) {
138
+
139
+ // If the code exists & user is not logged in, return nothing.
140
  $replace = '';
141
 
142
  } else {
144
  switch ( $string ) {
145
 
146
  case 'avatar':
147
+ $replace = get_avatar( $current_user->ID, self::$current_item->avatar_size );
148
  break;
149
 
150
  case 'first_name':
languages/user-menus.pot CHANGED
@@ -1,20 +1,27 @@
1
- # Copyright (C) 2017 user-menus
2
  # This file is distributed under the same license as the user-menus package.
3
  msgid ""
4
  msgstr ""
5
  "Project-Id-Version: user-menus\n"
6
- "Report-Msgid-Bugs-To: danieliser@wizardinternetsolutions.com\n"
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
10
- "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
11
- "Language-Team: Daniel Iser <danieliser@wizardinternetsolutions.com>\n"
12
  "X-Poedit-Basepath: ..\n"
13
- "X-Poedit-SourceCharset: UTF-8\n"
14
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
  "X-Poedit-SearchPathExcluded-0: *.js\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n\n"
 
 
 
 
 
 
 
 
 
18
 
19
  #: includes/classes/admin/menu-editor.php:55
20
  msgid "User Links"
@@ -108,43 +115,43 @@ msgstr ""
108
  msgid "I already did"
109
  msgstr ""
110
 
111
- #: includes/classes/importer/menu.php:97
112
  msgid "Import Nav Menus"
113
  msgstr ""
114
 
115
- #: includes/classes/importer/menu.php:104
116
  msgid "A new version of this importer is available. Please update to version %s to ensure compatibility with newer export files."
117
  msgstr ""
118
 
119
- #: includes/classes/importer/menu.php:114
120
  msgid "Upload your WordPress export (WXR) file and import the Nav Menus and any meta for the Nav Menu items."
121
  msgstr ""
122
 
123
- #: includes/classes/importer/menu.php:115
124
  msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
125
  msgstr ""
126
 
127
- #: includes/classes/importer/menu.php:130, includes/classes/importer/menu.php:135, includes/classes/importer/menu.php:145, includes/classes/importer/menu.php:206, includes/classes/importer/menu.php:217
128
  msgid "Sorry, there has been an error."
129
  msgstr ""
130
 
131
- #: includes/classes/importer/menu.php:136
132
  msgid "The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem."
133
  msgstr ""
134
 
135
- #: includes/classes/importer/menu.php:154
136
  msgid "This WXR file (version %s) may not be supported by this version of the importer. Please consider updating."
137
  msgstr ""
138
 
139
- #: includes/classes/importer/menu.php:207
140
  msgid "The file does not exist, please try again."
141
  msgstr ""
142
 
143
- #: includes/classes/importer/menu.php:278
144
  msgid "All done."
145
  msgstr ""
146
 
147
- #: includes/classes/importer/menu.php:278
148
  msgid "Have fun!"
149
  msgstr ""
150
 
@@ -179,11 +186,3 @@ msgstr ""
179
  #: includes/classes/user/codes.php:25
180
  msgid "Email"
181
  msgstr ""
182
-
183
- #: user-menus.php:172
184
- msgid "The %4$s %1$s %5$s plugin requires %2$s version %3$s or greater."
185
- msgstr ""
186
-
187
- #: user-menus.php:174
188
- msgid "Plugin Activation Error"
189
- msgstr ""
1
+ # Copyright (C) 2019 user-menus
2
  # This file is distributed under the same license as the user-menus package.
3
  msgid ""
4
  msgstr ""
5
  "Project-Id-Version: user-menus\n"
 
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
+ "Language-Team: WP Popup Maker <support@wppopupmaker.com>\n"
10
+ "Report-Msgid-Bugs-To: https://wppopupmaker.com/support/\n"
11
  "X-Poedit-Basepath: ..\n"
12
+ "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
 
13
  "X-Poedit-SearchPath-0: .\n"
14
  "X-Poedit-SearchPathExcluded-0: *.js\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+
18
+ #: user-menus.php:170
19
+ msgid "The %4$s %1$s %5$s plugin requires %2$s version %3$s or greater."
20
+ msgstr ""
21
+
22
+ #: user-menus.php:172
23
+ msgid "Plugin Activation Error"
24
+ msgstr ""
25
 
26
  #: includes/classes/admin/menu-editor.php:55
27
  msgid "User Links"
115
  msgid "I already did"
116
  msgstr ""
117
 
118
+ #: includes/classes/importer/menu.php:99
119
  msgid "Import Nav Menus"
120
  msgstr ""
121
 
122
+ #: includes/classes/importer/menu.php:106
123
  msgid "A new version of this importer is available. Please update to version %s to ensure compatibility with newer export files."
124
  msgstr ""
125
 
126
+ #: includes/classes/importer/menu.php:116
127
  msgid "Upload your WordPress export (WXR) file and import the Nav Menus and any meta for the Nav Menu items."
128
  msgstr ""
129
 
130
+ #: includes/classes/importer/menu.php:117
131
  msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
132
  msgstr ""
133
 
134
+ #: includes/classes/importer/menu.php:132, includes/classes/importer/menu.php:137, includes/classes/importer/menu.php:147, includes/classes/importer/menu.php:208, includes/classes/importer/menu.php:219
135
  msgid "Sorry, there has been an error."
136
  msgstr ""
137
 
138
+ #: includes/classes/importer/menu.php:138
139
  msgid "The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem."
140
  msgstr ""
141
 
142
+ #: includes/classes/importer/menu.php:156
143
  msgid "This WXR file (version %s) may not be supported by this version of the importer. Please consider updating."
144
  msgstr ""
145
 
146
+ #: includes/classes/importer/menu.php:209
147
  msgid "The file does not exist, please try again."
148
  msgstr ""
149
 
150
+ #: includes/classes/importer/menu.php:280
151
  msgid "All done."
152
  msgstr ""
153
 
154
+ #: includes/classes/importer/menu.php:280
155
  msgid "Have fun!"
156
  msgstr ""
157
 
186
  #: includes/classes/user/codes.php:25
187
  msgid "Email"
188
  msgstr ""
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
- === User Menus ===
2
  Contributors: jungleplugins, danieliser
3
  Author URI: https://jungleplugins.com/
4
  Plugin URI: https://wordpress.org/plugins/user-menus/
5
  Donate link: https://jungleplugins.com/donate/
6
  Tags: menu, menus, user-menu, logout, nav-menu, nav-menus, user, user-role, user-roles
7
  Requires at least: 3.6
8
- Tested up to: 4.9.4
9
- Stable tag: 1.1.2
10
- Minimum PHP: 5.3
11
  License: GNU Version 3 or Any Later Version
12
 
13
  Show/hide menu items to logged in users, logged out users or specific user roles. Display logged in user details in menu. Add a logout link to menu.
@@ -41,6 +41,8 @@ User Menus allows you to do the following:
41
  * Add a logout link to menu (optional redirect settings)
42
  * Add a login link to menu (optional redirect settings)
43
 
 
 
44
  = Created by Jungle Plugins =
45
 
46
  User Menus is built by the [Jungle Plugins][jungleplugins] team. Our mission is to make building membership & community websites easy with WordPress.
@@ -113,6 +115,9 @@ Bugs can be reported either in our support forum or preferably on the [User Menu
113
 
114
  == Changelog ==
115
 
 
 
 
116
  = v1.1.2 =
117
  * Improvement: Made changes to the nav menu editor to make it more compatible with other plugins.
118
 
1
+ === User Menus - Nav Menu Visibility ===
2
  Contributors: jungleplugins, danieliser
3
  Author URI: https://jungleplugins.com/
4
  Plugin URI: https://wordpress.org/plugins/user-menus/
5
  Donate link: https://jungleplugins.com/donate/
6
  Tags: menu, menus, user-menu, logout, nav-menu, nav-menus, user, user-role, user-roles
7
  Requires at least: 3.6
8
+ Tested up to: 5.1
9
+ Stable tag: 1.1.3
10
+ Requires PHP: 5.3
11
  License: GNU Version 3 or Any Later Version
12
 
13
  Show/hide menu items to logged in users, logged out users or specific user roles. Display logged in user details in menu. Add a logout link to menu.
41
  * Add a logout link to menu (optional redirect settings)
42
  * Add a login link to menu (optional redirect settings)
43
 
44
+ ** Includes a custom Menu Importer that will allow migrating User Menus data with the normal menu export/import.
45
+
46
  = Created by Jungle Plugins =
47
 
48
  User Menus is built by the [Jungle Plugins][jungleplugins] team. Our mission is to make building membership & community websites easy with WordPress.
115
 
116
  == Changelog ==
117
 
118
+ = v1.1.3 =
119
+ * Improvement: Corrected usage of get_avatar to ensure compatibility with 3rd party avatar plugins.
120
+
121
  = v1.1.2 =
122
  * Improvement: Made changes to the nav menu editor to make it more compatible with other plugins.
123
 
user-menus.php CHANGED
@@ -1,18 +1,20 @@
1
  <?php
2
  /**
3
- * Plugin Name: User Menus
4
- * Plugin URI: https://wordpress.org/plugins/user-menus/
5
- * Description: Quickly customize & extend your menus with user based functionality.
6
- * Version: 1.1.2
7
- * Author: Jungle Plugins
8
- * Author URI: https://jungleplugins.com/
9
- * Text Domain: user-menus
 
 
10
  *
11
  * Minimum PHP: 5.3
12
  * Minimum WP: 3.6
13
  *
14
  * @author Daniel Iser
15
- * @copyright Copyright (c) 2016, Jungle Plugins
16
  * @since 1.0.0
17
  *
18
  * Prior Work Credits. Big thanks to the following:
@@ -37,7 +39,7 @@ class JP_User_Menus {
37
  /**
38
  * @var string
39
  */
40
- public static $VER = '1.1.2';
41
 
42
  /**
43
  * @var string
@@ -100,9 +102,7 @@ class JP_User_Menus {
100
  /**
101
  * Setup plugin constants
102
  *
103
- * @access private
104
  * @since 1.0.0
105
- * @return void
106
  */
107
  private function setup_constants() {
108
  self::$DIR = self::$instance->plugin_path();
@@ -113,9 +113,7 @@ class JP_User_Menus {
113
  /**
114
  * Include necessary files
115
  *
116
- * @access private
117
  * @since 1.0.0
118
- * @return void
119
  */
120
  private function includes() {
121
  // Menu Items
@@ -177,30 +175,12 @@ class JP_User_Menus {
177
  /**
178
  * Internationalization
179
  *
180
- * @access public
181
  * @since 1.0.0
182
- * @return void
183
  */
184
  public function load_textdomain() {
185
  load_plugin_textdomain( 'user-menus' );
186
  }
187
 
188
- /**
189
- * Get the template path.
190
- * @return string
191
- */
192
- public function template_path() {
193
- return apply_filters( 'jpum_template_path', self::$TEMPLATE_PATH );
194
- }
195
-
196
- /**
197
- * Get Ajax URL.
198
- * @return string
199
- */
200
- public function ajax_url() {
201
- return admin_url( 'admin-ajax.php', 'relative' );
202
- }
203
-
204
  }
205
 
206
  /**
1
  <?php
2
  /**
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.1.3
7
+ * Author: Jungle Plugins
8
+ * Author URI: https://jungleplugins.com/
9
+ * License: GPL2 or later
10
+ * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
+ * Text Domain: user-menus
12
  *
13
  * Minimum PHP: 5.3
14
  * Minimum WP: 3.6
15
  *
16
  * @author Daniel Iser
17
+ * @copyright Copyright (c) 2019, Code Atlantic LLC
18
  * @since 1.0.0
19
  *
20
  * Prior Work Credits. Big thanks to the following:
39
  /**
40
  * @var string
41
  */
42
+ public static $VER = '1.1.3';
43
 
44
  /**
45
  * @var string
102
  /**
103
  * Setup plugin constants
104
  *
 
105
  * @since 1.0.0
 
106
  */
107
  private function setup_constants() {
108
  self::$DIR = self::$instance->plugin_path();
113
  /**
114
  * Include necessary files
115
  *
 
116
  * @since 1.0.0
 
117
  */
118
  private function includes() {
119
  // Menu Items
175
  /**
176
  * Internationalization
177
  *
 
178
  * @since 1.0.0
 
179
  */
180
  public function load_textdomain() {
181
  load_plugin_textdomain( 'user-menus' );
182
  }
183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  }
185
 
186
  /**