Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | User Menus – Nav Menu Visibility |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.1.0
- assets/css/admin-general.css +0 -107
- assets/css/admin-general.css.map +0 -1
- assets/css/admin-general.min.css +0 -1
- assets/images/icon-128x128.png +0 -0
- assets/js/admin-general.min.js +0 -1
- assets/{js/admin-general.js → scripts/admin.js} +107 -108
- assets/scripts/admin.min.js +1 -0
- assets/styles/admin.css +105 -0
- assets/styles/admin.css.map +1 -0
- assets/styles/admin.min.css +1 -0
- assets/{sass/admin-general.scss → styles/sass/admin.scss} +2 -2
- includes/classes/admin/menu-editor.php +9 -17
- includes/classes/admin/reviews.php +0 -478
- includes/classes/importer/menu.php +1 -3
- includes/classes/menu/items.php +2 -9
- includes/classes/walker/nav-menu-edit-custom-fields-deprecated.php +0 -67
- includes/classes/walker/nav-menu-edit-custom-fields.php +0 -74
- includes/classes/walker/nav-menu-edit-deprecated.php +220 -0
- includes/classes/walker/nav-menu-edit.php +224 -0
- languages/user-menus.pot +29 -28
- readme.txt +5 -16
- user-menus.php +31 -11
assets/css/admin-general.css
DELETED
@@ -1,107 +0,0 @@
|
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4tZ2VuZXJhbC5jc3MiLCJzb3VyY2VzIjpbImFkbWluLWdlbmVyYWwuc2NzcyJdLCJzb3VyY2VzQ29udGVudCI6WyIuanB1bS11c2VyLWNvZGVzIHtcblxuICBkaXNwbGF5OiBub25lO1xuXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgcmlnaHQ6IDNweDtcbiAgYm90dG9tOiAycHg7XG5cbiAgPiBidXR0b24ge1xuICAgIGJvcmRlcjogMXB4IHNvbGlkO1xuICAgIGJvcmRlci1yYWRpdXM6IDJweDtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjMyODJkO1xuICAgIGNvbG9yOiAjZWVlO1xuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgZm9udC1zaXplOiAyMnB4O1xuICAgIGhlaWdodDogMjJweDtcbiAgICB3aWR0aDogMjJweDtcbiAgICBwYWRkaW5nOiAwO1xuICAgIG91dGxpbmU6IDA7XG4gICAgZGlzcGxheTogYmxvY2s7XG5cbiAgICAmOmZvY3VzIHtcbiAgICAgIGJvcmRlci1jb2xvcjogIzViOWRkOTtcbiAgICAgIGJveC1zaGFkb3c6IDAgMCAycHggcmdiYSggMzAsIDE0MCwgMTkwLCAwLjggKTtcbiAgICB9XG5cbiAgICAuZGFzaGljb25zIHtcbiAgICAgIHdpZHRoOiAyMHB4O1xuICAgICAgaGVpZ2h0OiAyMHB4O1xuICAgICAgZm9udC1zaXplOiAyMHB4O1xuICAgIH1cbiAgfVxuXG4gICY6aG92ZXIgPiBidXR0b24ge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICMwMDczYWE7XG4gICAgY29sb3I6ICNmZmY7XG4gIH1cblxuICB1bCB7XG4gICAgZGlzcGxheTogbm9uZTtcblxuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICB0b3A6IDFweDtcbiAgICBsZWZ0OiAyMHB4O1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XG4gICAgd2lkdGg6IGF1dG87XG4gICAgei1pbmRleDogOTk5O1xuICAgIC8qYm94LXNoYWRvdzogMXB4IDFweCA1cHggLTFweDsgKi9cblxuICAgIGxpIHtcbiAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgYm9yZGVyLWJvdHRvbTogMXB4IGRhc2hlZCByZ2JhKDAsIDAsIDAsIC4yNSk7XG4gICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjMyODJkO1xuXG4gICAgICA+IGEge1xuICAgICAgICBjb2xvcjogI2VlZTtcbiAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgICBsaW5lLWhlaWdodDogMTtcbiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgcGFkZGluZzogLjVlbTtcblxuICAgICAgICAmOmZvY3VzIHtcbiAgICAgICAgICBjb2xvcjogIzAwNzNhYTtcbiAgICAgICAgICBib3JkZXI6IDA7XG4gICAgICAgICAgYm94LXNoYWRvdzogbm9uZTtcblxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgICY6bGFzdC1jaGlsZCB7XG4gICAgICAgIGJvcmRlci1ib3R0b206IDA7XG4gICAgICB9XG5cbiAgIC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7Q0FFbkI7O0FBUkwsQUFXTSxhQVhPLENBRVgsVUFBVSxDQVFSLHVCQUF1QixDQUNyQixLQUFLLENBQUM7RUFDSixLQUFLLEVBQUUsR0FBRztFQUNWLE9BQU8sRUFBRSxZQUFZO0VBQ3JCLEtBQUssRUFBRSxJQUFJO0VBQ1gsVUFBVSxFQUFFLEdBQUc7Q0FDaEI7O0FBaEJQLEFBcUJNLGFBckJPLENBRVgsVUFBVSxBQWlCUCxtQkFBbUIsQ0FFbEIsZ0JBQWdCLENBQUM7RUFDZixPQUFPLEVBQUUsS0FBSztDQUNmIn0= */
|
106 |
-
|
107 |
-
/*# sourceMappingURL=admin-general.css.map */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/admin-general.css.map
DELETED
@@ -1 +0,0 @@
|
|
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
DELETED
@@ -1 +0,0 @@
|
|
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/images/icon-128x128.png
DELETED
Binary file
|
assets/js/admin-general.min.js
DELETED
@@ -1 +0,0 @@
|
|
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/{js/admin-general.js → scripts/admin.js}
RENAMED
@@ -1,109 +1,108 @@
|
|
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 |
-
$(
|
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 |
-
.
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
}(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 |
+
.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)));
|
assets/scripts/admin.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
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
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4uY3NzIiwic291cmNlcyI6WyJhZG1pbi5zY3NzIl0sInNvdXJjZXNDb250ZW50IjpbIi5qcHVtLXVzZXItY29kZXMge1xuXG4gIGRpc3BsYXk6IG5vbmU7XG5cbiAgcG9zaXRpb246IGFic29sdXRlO1xuICByaWdodDogMXB4O1xuICBib3R0b206IDFweDtcblxuICA+IGJ1dHRvbiB7XG4gICAgYm9yZGVyOiAxcHggc29saWQ7XG4gICAgYm9yZGVyLXJhZGl1czogMnB4O1xuICAgIGJhY2tncm91bmQtY29sb3I6ICMyMzI4MmQ7XG4gICAgY29sb3I6ICNlZWU7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgIC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B0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgICBwYWRkaW5nOiAuNWVtO1xuXG4gICAgICAgICY6Zm9jdXMge1xuICAgICAgICAgIGNvbG9yOiAjMDA3M2FhO1xuICAgICAgICAgIGJvcmRlcjogMDtcbiAgICAgICAgICBib3gtc2hhZG93OiBub25lO1xuXG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgJjpsYXN0LWNoaWxkIHtcbiAgICAgICAgYm9yZGVyLWJvdHRvbTogMDtcbiAgICAgIH1cblxuICAgICAgJjpob3ZlciB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICMwMDczYWE7XG5cbiAgICAgICAgPiBhIHtcbiAgICAgICAgICBjb2xvcjogI2ZmZjtcblxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICB9XG5cbiAgfVxuXG4gICYub3BlbiB1bCB7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gIH1cblxufVxuXG4jbWVudS10by1lZGl0IHtcblxuICAubWVudS1pdGVtIHtcblxuICAgIHAuZGVzY3JpcHRpb24td2lkZSB7XG5cbiAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuICAgIH1cblxuICAgIC5uYXZfaXRlbV9vcHRpb25zLXJvbGVzIHtcbiAgICAgIGxhYmVsIHtcbiAgICAgICAgd2lkdGg6IDMzJTtcbiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgICAgICBmbG9hdDogbGVmdDtcbiAgICAgICAgbWFyZ2luLXRvcDogNXB4O1xuICAgICAgfVxuICAgIH1cblxuICAgICYuc2hvdy1pbnNlcnQtYnV0dG9uIHtcblxuICAgICAgLmpwdW0tdXNlci1jb2RlcyB7XG4gICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgfVxuXG4gICAgfVxuXG4gIH1cblxufVxuIl0sIm1hcHBpbmdzIjoiQUFBQSxBQUFBLGdCQUFnQixDQUF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QXVDZCxFQUFFLENBV0EsRUFBRSxBQTBCQyxNQUFNLEdBR0gsQ0FBQyxDQUFDO0VBQ0YsS0FBSyxFQUFFLElBQUs7Q0FFYjs7QUFsRlQsQUF5RlMsZ0JBekZPLEFBeUZiLEtBQUssQ0FBQyxFQUFFLENBQUM7RUFDUixPQUFPLEVBQUUsS0FBTTtDQUNoQjs7QUFJSCxBQUlLLGFBSlEsQ0FFWCxVQUFVLENBRVIsQ0FBQyxBQUFBLGlCQUFpQixDQUFDO0VBRWpCLFFBQVEsRUFBRSxRQUFTO0NBRXBCOztBQVJMLEFBV00sYUFYTyxDQUVYLFVBQVUsQ0FRUix1QkFBdUIsQ0FDckIsS0FBSyxDQUFDO0VBQ0osS0FBSyxFQUFFLEdBQUk7RUFDWCxPQUFPLEVBQUUsWUFBYTtFQUN0QixLQUFLLEVBQUUsSUFBSztFQUNaLFVBQVUsRUFBRSxHQUFJO0NBQ2pCOztBQWhCUCxBQXFCTSxhQXJCTyxDQUVYLFVBQVUsQUFpQlAsbUJBQW1CLENBRWxCLGdCQUFnQixDQUFDO0VBQ2YsT0FBTyxFQUFFLEtBQU07Q0FDaEIiLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 */
|
104 |
+
|
105 |
+
/*# sourceMappingURL=admin.css.map */
|
assets/styles/admin.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["/source/admin.scss","admin.css"],"names":[],"mappings":"AAAA;EAEE,cAAc;EAEd,mBAAmB;EACnB,WAAW;EACX,YAAY;CAuFb;;AA7FD;EASI,kBAAkB;EAClB,mBAAmB;EACnB,0BAA0B;EAC1B,YAAY;EACZ,mBAAmB;EACnB,gBAAgB;EAChB,gBAAgB;EAChB,aAAa;EACb,YAAY;EACZ,WAAW;EACX,WAAW;EACX,eAAe;CAYhB;;AAhCH;EAuBM,sBAAsB;EACtB,4CAAwB;CACzB;;AAzBL;EA4BM,YAAY;EACZ,aAAa;EACb,gBAAgB;CACjB;;AA/BL;EAmCI,0BAA0B;EAC1B,YAAY;CACb;;AArCH;EAwCI,cAAc;EAEd,mBAAmB;EACnB,SAAS;EACT,WAAW;EACX,uBAAuB;EACvB,YAAY;EACZ,aAAa;EACb,kCAAkC;CAuCnC;;AAvFH;EAmDM,eAAe;EACf,8CAA8B;EAC9B,0BAA0B;CAgC3B;;AArFL;EAwDQ,YAAY;EACZ,gBAAgB;EAChB,eAAe;EACf,oBAAoB;EACpB,sBAAsB;EACtB,eAAe;EACf,cAAc;CAQf;;AAtEP;EAiEU,eAAe;EACf,UAAU;EACV,iBAAiB;CAElB;;AArET;EAyEQ,iBAAiB;CAClB;;AA1EP;EA6EQ,0BAA0B;CAM3B;;AAnFP;EAgFU,YAAY;CAEb;;AAlFT;EA0FI,eAAe;CAChB;;AAIH;EAMM,mBAAmB;CAEpB;;AARL;EAYQ,WAAW;EACX,sBAAsB;EACtB,YAAY;EACZ,gBAAgB;CACjB;;AAhBP;EAsBQ,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+IGJ1dHRvbiB7XG4gICAgYm9yZGVyOiAxcHggc29saWQ7XG4gICAgYm9yZGVyLXJhZGl1czogMnB4O1xuICAgIGJhY2tncm91bmQtY29sb3I6ICMyMzI4MmQ7XG4gICAgY29sb3I6ICNlZWU7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICBmb250LXNpemU6IDIycHg7XG4gICAgaGVpZ2h0OiAyMnB4O1xuICAgIHdpZHRoOiAyMnB4O1xuICAgIHBhZGRpbmc6IDA7XG4gICAgb3V0bGluZTogMDtcbiAgICBkaXNwbGF5OiBibG9jaztcblxuICAgICY6Zm9jdXMge1xuICAgICAgYm9yZGVyLWNvbG9yOiAjNWI5ZGQ5O1xuICAgICAgYm94LXNoYWRvdzogMCAwIDJweCByZ2JhKCAzMCwgMTQwLCAxOTAsIDAuOCApO1xuICAgIH1cblxuICAgIC5kYXNoaWNvbnMge1xuICAgICAgd2lkdGg6IDIwcHg7XG4gICAgICBoZWlnaHQ6IDIwcHg7XG4gICAgICBmb250LXNpemU6IDIwcHg7XG4gICAgfVxuICB9XG5cbiAgJjpob3ZlciA+IGJ1dHRvbiB7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogIzAwNzNhYTtcbiAgICBjb2xvcjogI2ZmZjtcbiAgfVxuXG4gIHVsIHtcbiAgICBkaXNwbGF5OiBub25lO1xuXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHRvcDogMXB4O1xuICAgIGxlZnQ6IDIwcHg7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcbiAgICB3aWR0aDogYXV0bztcbiAgICB6LWluZGV4OiA5OTk7XG4gICAgLypib3gtc2hhZG93OiAxcHggMXB4IDVweCAtMXB4OyAqL1xuXG4gICAgbGkge1xuICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICBib3JkZXItYm90dG9tOiAxcHggZGFzaGVkIHJnYmEoMCwgMCwgMCwgLjI1KTtcbiAgICAgIGJhY2tncm91bmQtY29sb3I6ICMyMzI4MmQ7XG5cbiAgICAgID4gYSB7XG4gICAgICAgIGNvbG9yOiAjZWVlO1xuICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgIGxpbmUtaGVpZ2h0OiAxO1xuICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgICBwYWRkaW5nOiAuNWVtO1xuXG4gICAgICAgICY6Zm9jdXMge1xuICAgICAgICAgIGNvbG9yOiAjMDA3M2FhO1xuICAgICAgICAgIGJvcmRlcjogMDtcbiAgICAgICAgICBib3gtc2hhZG93OiBub25lO1xuXG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgJjpsYXN0LWNoaWxkIHtcbiAgICAgICAgYm9yZGVyLWJvdHRvbTogMDtcbiAgICAgIH1cblxuICAgICAgJjpob3ZlciB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICMwMDczY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FDO0VBQ0osS0FBSyxFQUFFLEdBQUk7RUFDWCxPQUFPLEVBQUUsWUFBYTtFQUN0QixLQUFLLEVBQUUsSUFBSztFQUNaLFVBQVUsRUFBRSxHQUFJO0NBQ2pCOztBQWhCUCxBQXFCTSxhQXJCTyxDQUVYLFVBQVUsQUFpQlAsbUJBQW1CLENBRWxCLGdCQUFnQixDQUFDO0VBQ2YsT0FBTyxFQUFFLEtBQU07Q0FDaEIiLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 */\n"],"sourceRoot":"/source/"}
|
assets/styles/admin.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
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}
|
assets/{sass/admin-general.scss → styles/sass/admin.scss}
RENAMED
@@ -3,8 +3,8 @@
|
|
3 |
display: none;
|
4 |
|
5 |
position: absolute;
|
6 |
-
right:
|
7 |
-
bottom:
|
8 |
|
9 |
> button {
|
10 |
border: 1px solid;
|
3 |
display: none;
|
4 |
|
5 |
position: absolute;
|
6 |
+
right: 1px;
|
7 |
+
bottom: 1px;
|
8 |
|
9 |
> button {
|
10 |
border: 1px solid;
|
includes/classes/admin/menu-editor.php
CHANGED
@@ -17,7 +17,7 @@ class Menu_Editor {
|
|
17 |
* Init
|
18 |
*/
|
19 |
public static function init() {
|
20 |
-
add_filter( 'wp_edit_nav_menu_walker', array( __CLASS__, 'nav_menu_walker' )
|
21 |
add_action( 'admin_head-nav-menus.php', array( __CLASS__, 'register_metaboxes' ) );
|
22 |
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
|
23 |
}
|
@@ -28,23 +28,15 @@ class Menu_Editor {
|
|
28 |
public static function nav_menu_walker( $walker ) {
|
29 |
global $wp_version;
|
30 |
|
31 |
-
if (
|
32 |
-
|
33 |
-
}
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
|
40 |
-
if ( version_compare( $wp_version, '3.6', '>=' ) ) {
|
41 |
-
require_once \JP_User_Menus::$DIR . 'includes/classes/walker/nav-menu-edit-custom-fields.php';
|
42 |
-
} else {
|
43 |
-
require_once \JP_User_Menus::$DIR . 'includes/classes/walker/nav-menu-edit-custom-fields-deprecated.php';
|
44 |
-
}
|
45 |
}
|
46 |
-
|
47 |
-
return 'Walker_Nav_Menu_Edit_Custom_Fields';
|
48 |
}
|
49 |
|
50 |
|
@@ -149,8 +141,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/
|
153 |
-
wp_enqueue_style( 'jpum-styles', \JP_User_Menus::$URL . 'assets/
|
154 |
}
|
155 |
|
156 |
/**
|
17 |
* Init
|
18 |
*/
|
19 |
public static function init() {
|
20 |
+
add_filter( 'wp_edit_nav_menu_walker', array( __CLASS__, 'nav_menu_walker' ) );
|
21 |
add_action( 'admin_head-nav-menus.php', array( __CLASS__, 'register_metaboxes' ) );
|
22 |
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
|
23 |
}
|
28 |
public static function nav_menu_walker( $walker ) {
|
29 |
global $wp_version;
|
30 |
|
31 |
+
if ( version_compare( $wp_version, '4.5.0', '>=' ) ) {
|
32 |
+
require_once \JP_User_Menus::$DIR . 'includes/classes/walker/nav-menu-edit.php';
|
|
|
33 |
|
34 |
+
return '\JP\UM\Walker\Nav_Menu_Edit';
|
35 |
+
} else {
|
36 |
+
require_once \JP_User_Menus::$DIR . 'includes/classes/walker/nav-menu-edit-deprecated.php';
|
37 |
|
38 |
+
return '\JP\UM\Walker\Nav_Menu_Edit_Deprecated';
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
|
|
|
|
40 |
}
|
41 |
|
42 |
|
141 |
// Use minified libraries if SCRIPT_DEBUG is turned off
|
142 |
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
143 |
|
144 |
+
wp_enqueue_script( 'jpum-scripts', \JP_User_Menus::$URL . 'assets/scripts/admin' . $suffix . '.js', array( 'jquery', 'underscore' ), \JP_User_Menus::$VER, true );
|
145 |
+
wp_enqueue_style( 'jpum-styles', \JP_User_Menus::$URL . 'assets/styles/admin' . $suffix . '.css', array( 'dashicons' ), \JP_User_Menus::$VER );
|
146 |
}
|
147 |
|
148 |
/**
|
includes/classes/admin/reviews.php
DELETED
@@ -1,478 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace JP\UM\Admin;
|
4 |
-
|
5 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
-
exit;
|
7 |
-
}
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Class JP\UM\Admin\Reviews
|
11 |
-
*
|
12 |
-
* This class adds a review request system for your plugin or theme to the WP dashboard.
|
13 |
-
*
|
14 |
-
* @since 1.1.0
|
15 |
-
*/
|
16 |
-
class Reviews {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Tracking API Endpoint.
|
20 |
-
*
|
21 |
-
* @var string
|
22 |
-
*/
|
23 |
-
public static $api_url;
|
24 |
-
|
25 |
-
/**
|
26 |
-
*
|
27 |
-
*/
|
28 |
-
public static function init() {
|
29 |
-
add_action( 'init', array( __CLASS__, 'hooks' ) );
|
30 |
-
add_action( 'wp_ajax_jpum_review_action', array( __CLASS__, 'ajax_handler' ) );
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Hook into relevant WP actions.
|
35 |
-
*/
|
36 |
-
public static function hooks() {
|
37 |
-
if ( is_admin() && current_user_can( 'edit_posts' ) ) {
|
38 |
-
self::installed_on();
|
39 |
-
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
|
40 |
-
add_action( 'network_admin_notices', array( __CLASS__, 'admin_notices' ) );
|
41 |
-
add_action( 'user_admin_notices', array( __CLASS__, 'admin_notices' ) );
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Get the install date for comparisons. Sets the date to now if none is found.
|
47 |
-
*
|
48 |
-
* @return false|string
|
49 |
-
*/
|
50 |
-
public static function installed_on() {
|
51 |
-
$installed_on = get_option( 'jpum_reviews_installed_on', false );
|
52 |
-
|
53 |
-
if ( ! $installed_on ) {
|
54 |
-
$installed_on = current_time( 'mysql' );
|
55 |
-
update_option( 'jpum_reviews_installed_on', $installed_on );
|
56 |
-
}
|
57 |
-
|
58 |
-
return $installed_on;
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* AJAX Handler
|
63 |
-
*/
|
64 |
-
public static function ajax_handler() {
|
65 |
-
$args = wp_parse_args( $_REQUEST, array(
|
66 |
-
'group' => self::get_trigger_group(),
|
67 |
-
'code' => self::get_trigger_code(),
|
68 |
-
'pri' => self::get_current_trigger( 'pri' ),
|
69 |
-
'reason' => 'maybe_later',
|
70 |
-
) );
|
71 |
-
|
72 |
-
if ( ! wp_verify_nonce( $_REQUEST['nonce'], 'jpum_review_action' ) ) {
|
73 |
-
wp_send_json_error();
|
74 |
-
}
|
75 |
-
|
76 |
-
try {
|
77 |
-
$user_id = get_current_user_id();
|
78 |
-
|
79 |
-
$dismissed_triggers = self::dismissed_triggers();
|
80 |
-
$dismissed_triggers[ $args['group'] ] = $args['pri'];
|
81 |
-
update_user_meta( $user_id, '_jpum_reviews_dismissed_triggers', $dismissed_triggers );
|
82 |
-
update_user_meta( $user_id, '_jpum_reviews_last_dismissed', current_time( 'mysql' ) );
|
83 |
-
|
84 |
-
switch ( $args['reason'] ) {
|
85 |
-
case 'maybe_later':
|
86 |
-
update_user_meta( $user_id, '_jpum_reviews_last_dismissed', current_time( 'mysql' ) );
|
87 |
-
break;
|
88 |
-
case 'am_now':
|
89 |
-
case 'already_did':
|
90 |
-
self::already_did( true );
|
91 |
-
break;
|
92 |
-
}
|
93 |
-
|
94 |
-
wp_send_json_success();
|
95 |
-
|
96 |
-
} catch ( \Exception $e ) {
|
97 |
-
wp_send_json_error( $e );
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* @return int|string
|
103 |
-
*/
|
104 |
-
public static function get_trigger_group() {
|
105 |
-
static $selected;
|
106 |
-
|
107 |
-
if ( ! isset( $selected ) ) {
|
108 |
-
|
109 |
-
$dismissed_triggers = self::dismissed_triggers();
|
110 |
-
|
111 |
-
$triggers = self::triggers();
|
112 |
-
|
113 |
-
foreach ( $triggers as $g => $group ) {
|
114 |
-
foreach ( $group['triggers'] as $t => $trigger ) {
|
115 |
-
if ( ! in_array( false, $trigger['conditions'] ) && ( empty( $dismissed_triggers[ $g ] ) || $dismissed_triggers[ $g ] < $trigger['pri'] ) ) {
|
116 |
-
$selected = $g;
|
117 |
-
break;
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
if ( isset( $selected ) ) {
|
122 |
-
break;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
}
|
126 |
-
|
127 |
-
return $selected;
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* @return int|string
|
132 |
-
*/
|
133 |
-
public static function get_trigger_code() {
|
134 |
-
static $selected;
|
135 |
-
|
136 |
-
if ( ! isset( $selected ) ) {
|
137 |
-
|
138 |
-
$dismissed_triggers = self::dismissed_triggers();
|
139 |
-
|
140 |
-
foreach ( self::triggers() as $g => $group ) {
|
141 |
-
foreach ( $group['triggers'] as $t => $trigger ) {
|
142 |
-
if ( ! in_array( false, $trigger['conditions'] ) && ( empty( $dismissed_triggers[ $g ] ) || $dismissed_triggers[ $g ] < $trigger['pri'] ) ) {
|
143 |
-
$selected = $t;
|
144 |
-
break;
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
if ( isset( $selected ) ) {
|
149 |
-
break;
|
150 |
-
}
|
151 |
-
}
|
152 |
-
}
|
153 |
-
|
154 |
-
return $selected;
|
155 |
-
}
|
156 |
-
|
157 |
-
/**
|
158 |
-
* @param null $key
|
159 |
-
*
|
160 |
-
* @return bool|mixed|void
|
161 |
-
*/
|
162 |
-
public static function get_current_trigger( $key = null ) {
|
163 |
-
$group = self::get_trigger_group();
|
164 |
-
$code = self::get_trigger_code();
|
165 |
-
|
166 |
-
if ( ! $group || ! $code ) {
|
167 |
-
return false;
|
168 |
-
}
|
169 |
-
|
170 |
-
$trigger = self::triggers( $group, $code );
|
171 |
-
|
172 |
-
return empty( $key ) ? $trigger : ( isset( $trigger[ $key ] ) ? $trigger[ $key ] : false );
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Returns an array of dismissed trigger groups.
|
177 |
-
*
|
178 |
-
* Array contains the group key and highest priority trigger that has been shown previously for each group.
|
179 |
-
*
|
180 |
-
* $return = array(
|
181 |
-
* 'group1' => 20
|
182 |
-
* );
|
183 |
-
*
|
184 |
-
* @return array|mixed
|
185 |
-
*/
|
186 |
-
public static function dismissed_triggers() {
|
187 |
-
$user_id = get_current_user_id();
|
188 |
-
|
189 |
-
$dismissed_triggers = get_user_meta( $user_id, '_jpum_reviews_dismissed_triggers', true );
|
190 |
-
|
191 |
-
if ( ! $dismissed_triggers ) {
|
192 |
-
$dismissed_triggers = array();
|
193 |
-
}
|
194 |
-
|
195 |
-
return $dismissed_triggers;
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Returns true if the user has opted to never see this again. Or sets the option.
|
200 |
-
*
|
201 |
-
* @param bool $set If set this will mark the user as having opted to never see this again.
|
202 |
-
*
|
203 |
-
* @return bool
|
204 |
-
*/
|
205 |
-
public static function already_did( $set = false ) {
|
206 |
-
$user_id = get_current_user_id();
|
207 |
-
|
208 |
-
if ( $set ) {
|
209 |
-
update_user_meta( $user_id, '_jpum_reviews_already_did', true );
|
210 |
-
|
211 |
-
return true;
|
212 |
-
}
|
213 |
-
|
214 |
-
return (bool) get_user_meta( $user_id, '_jpum_reviews_already_did', true );
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Gets a list of triggers.
|
219 |
-
*
|
220 |
-
* @param null $group
|
221 |
-
* @param null $code
|
222 |
-
*
|
223 |
-
* @return bool|mixed|void
|
224 |
-
*/
|
225 |
-
public static function triggers( $group = null, $code = null ) {
|
226 |
-
static $triggers;
|
227 |
-
|
228 |
-
if ( ! isset( $triggers ) ) {
|
229 |
-
|
230 |
-
$time_message = __( 'Hi there! You\'ve been using the User Menus plugin on your site for %s now - We hope it\'s been helpful. If you\'re enjoying the plugin, would you mind rating it 5-stars to help spread the word?', 'user-menus' );
|
231 |
-
$triggers = array(
|
232 |
-
'time_installed' => array(
|
233 |
-
'triggers' => array(
|
234 |
-
'one_week' => array(
|
235 |
-
'message' => sprintf( $time_message, __( '2 weeks', 'user-menus' ) ),
|
236 |
-
'conditions' => array(
|
237 |
-
strtotime( self::installed_on() . ' +2 weeks' ) < time(),
|
238 |
-
),
|
239 |
-
'link' => 'https://wordpress.org/support/plugin/user-menus/reviews/?rate=5#rate-response',
|
240 |
-
'pri' => 10,
|
241 |
-
),
|
242 |
-
'three_months' => array(
|
243 |
-
'message' => sprintf( $time_message, __( '3 months', 'user-menus' ) ),
|
244 |
-
'conditions' => array(
|
245 |
-
strtotime( self::installed_on() . ' +3 months' ) < time(),
|
246 |
-
),
|
247 |
-
'link' => 'https://wordpress.org/support/plugin/user-menus/reviews/?rate=5#rate-response',
|
248 |
-
'pri' => 20,
|
249 |
-
),
|
250 |
-
|
251 |
-
),
|
252 |
-
'pri' => 10,
|
253 |
-
),
|
254 |
-
);
|
255 |
-
|
256 |
-
$triggers = apply_filters( 'jpum_reviews_triggers', $triggers );
|
257 |
-
|
258 |
-
// Sort Groups
|
259 |
-
uasort( $triggers, array( __CLASS__, 'rsort_by_priority' ) );
|
260 |
-
|
261 |
-
// Sort each groups triggers.
|
262 |
-
foreach ( $triggers as $k => $v ) {
|
263 |
-
uasort( $triggers[ $k ]['triggers'], array( __CLASS__, 'rsort_by_priority' ) );
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
if ( isset( $group ) ) {
|
268 |
-
if ( ! isset( $triggers[ $group ] ) ) {
|
269 |
-
return false;
|
270 |
-
}
|
271 |
-
|
272 |
-
return ! isset( $code ) ? $triggers[ $group ] : isset( $triggers[ $group ]['triggers'][ $code ] ) ? $triggers[ $group ]['triggers'][ $code ] : false;
|
273 |
-
}
|
274 |
-
|
275 |
-
return $triggers;
|
276 |
-
}
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Render admin notices if available.
|
280 |
-
*/
|
281 |
-
public static function admin_notices() {
|
282 |
-
if ( self::hide_notices() ) {
|
283 |
-
return;
|
284 |
-
}
|
285 |
-
|
286 |
-
$group = self::get_trigger_group();
|
287 |
-
$code = self::get_trigger_code();
|
288 |
-
$pri = self::get_current_trigger( 'pri' );
|
289 |
-
$trigger = self::get_current_trigger();
|
290 |
-
|
291 |
-
// Used to anonymously distinguish unique site+user combinations in terms of effectiveness of each trigger.
|
292 |
-
$uuid = wp_hash( home_url() . '-' . get_current_user_id() );
|
293 |
-
|
294 |
-
?>
|
295 |
-
|
296 |
-
<script type="text/javascript">
|
297 |
-
(function ($) {
|
298 |
-
var trigger = {
|
299 |
-
group: '<?php echo $group; ?>',
|
300 |
-
code: '<?php echo $code; ?>',
|
301 |
-
pri: '<?php echo $pri; ?>'
|
302 |
-
};
|
303 |
-
|
304 |
-
function dismiss(reason) {
|
305 |
-
$.ajax({
|
306 |
-
method: "POST",
|
307 |
-
dataType: "json",
|
308 |
-
url: ajaxurl,
|
309 |
-
data: {
|
310 |
-
action: 'jpum_review_action',
|
311 |
-
nonce: '<?php echo wp_create_nonce( 'jpum_review_action' ); ?>',
|
312 |
-
group: trigger.group,
|
313 |
-
code: trigger.code,
|
314 |
-
pri: trigger.pri,
|
315 |
-
reason: reason
|
316 |
-
}
|
317 |
-
});
|
318 |
-
|
319 |
-
<?php if ( ! empty( self::$api_url ) ) : ?>
|
320 |
-
$.ajax({
|
321 |
-
method: "POST",
|
322 |
-
dataType: "json",
|
323 |
-
url: '<?php echo self::$api_url; ?>',
|
324 |
-
data: {
|
325 |
-
trigger_group: trigger.group,
|
326 |
-
trigger_code: trigger.code,
|
327 |
-
reason: reason,
|
328 |
-
uuid: '<?php echo $uuid; ?>'
|
329 |
-
}
|
330 |
-
});
|
331 |
-
<?php endif; ?>
|
332 |
-
}
|
333 |
-
|
334 |
-
$(document)
|
335 |
-
.on('click', '.jpum-notice .jpum-dismiss', function (event) {
|
336 |
-
var $this = $(this),
|
337 |
-
reason = $this.data('reason'),
|
338 |
-
notice = $this.parents('.jpum-notice');
|
339 |
-
|
340 |
-
notice.fadeTo(100, 0, function () {
|
341 |
-
notice.slideUp(100, function () {
|
342 |
-
notice.remove();
|
343 |
-
});
|
344 |
-
});
|
345 |
-
|
346 |
-
dismiss(reason);
|
347 |
-
})
|
348 |
-
.ready(function () {
|
349 |
-
setTimeout(function () {
|
350 |
-
$('.jpum-notice button.notice-dismiss').click(function (event) {
|
351 |
-
dismiss('maybe_later');
|
352 |
-
});
|
353 |
-
}, 1000);
|
354 |
-
});
|
355 |
-
}(jQuery));
|
356 |
-
</script>
|
357 |
-
|
358 |
-
<style>
|
359 |
-
.jpum-notice p {
|
360 |
-
margin-bottom: 0;
|
361 |
-
}
|
362 |
-
|
363 |
-
.jpum-notice img.logo {
|
364 |
-
float: right;
|
365 |
-
margin-left: 10px;
|
366 |
-
width: 75px;
|
367 |
-
padding: 0.25em;
|
368 |
-
border: 1px solid #ccc;
|
369 |
-
}
|
370 |
-
</style>
|
371 |
-
|
372 |
-
<div class="notice notice-success is-dismissible jpum-notice">
|
373 |
-
|
374 |
-
<p>
|
375 |
-
<img class="logo" src="<?php echo \JP_User_Menus::$URL; ?>assets/images/icon-128x128.png" />
|
376 |
-
<strong>
|
377 |
-
<?php echo $trigger['message']; ?>
|
378 |
-
<br />
|
379 |
-
<?php
|
380 |
-
|
381 |
-
$names = array(
|
382 |
-
'<a target="_blank" href="https://twitter.com/danieliser" title="Follow Daniel on Twitter">@danieliser</a>',
|
383 |
-
'<a target="_blank" href="https://twitter.com/calumallison" title="Follow Calum on Twitter">@calumallison</a>',
|
384 |
-
);
|
385 |
-
|
386 |
-
shuffle( $names );
|
387 |
-
|
388 |
-
echo '~ ' . implode( ' & ', $names );
|
389 |
-
|
390 |
-
?>
|
391 |
-
</strong>
|
392 |
-
</p>
|
393 |
-
<ul>
|
394 |
-
<li>
|
395 |
-
<a class="jpum-dismiss" target="_blank" href="<?php echo $trigger['link']; ?>>" data-reason="am_now">
|
396 |
-
<strong><?php _e( 'Ok, you deserve it', 'user-menus' ); ?></strong>
|
397 |
-
</a>
|
398 |
-
</li>
|
399 |
-
<li>
|
400 |
-
<a href="#" class="jpum-dismiss" data-reason="maybe_later">
|
401 |
-
<?php _e( 'Nope, maybe later', 'user-menus' ); ?>
|
402 |
-
</a>
|
403 |
-
</li>
|
404 |
-
<li>
|
405 |
-
<a href="#" class="jpum-dismiss" data-reason="already_did">
|
406 |
-
<?php _e( 'I already did', 'user-menus' ); ?>
|
407 |
-
</a>
|
408 |
-
</li>
|
409 |
-
</ul>
|
410 |
-
|
411 |
-
</div>
|
412 |
-
|
413 |
-
<?php
|
414 |
-
}
|
415 |
-
|
416 |
-
/**
|
417 |
-
* Checks if notices should be shown.
|
418 |
-
*
|
419 |
-
* @return bool
|
420 |
-
*/
|
421 |
-
public static function hide_notices() {
|
422 |
-
$code = self::get_trigger_code();
|
423 |
-
|
424 |
-
$conditions = array(
|
425 |
-
self::already_did(),
|
426 |
-
self::last_dismissed() && strtotime( self::last_dismissed() . ' +2 weeks' ) > time(),
|
427 |
-
empty( $code ),
|
428 |
-
);
|
429 |
-
|
430 |
-
return in_array( true, $conditions );
|
431 |
-
}
|
432 |
-
|
433 |
-
/**
|
434 |
-
* Gets the last dismissed date.
|
435 |
-
*
|
436 |
-
* @return false|string
|
437 |
-
*/
|
438 |
-
public static function last_dismissed() {
|
439 |
-
$user_id = get_current_user_id();
|
440 |
-
|
441 |
-
return get_user_meta( $user_id, '_jpum_reviews_last_dismissed', true );
|
442 |
-
}
|
443 |
-
|
444 |
-
/**
|
445 |
-
* Sort array by priority value
|
446 |
-
*
|
447 |
-
* @param $a
|
448 |
-
* @param $b
|
449 |
-
*
|
450 |
-
* @return int
|
451 |
-
*/
|
452 |
-
public static function sort_by_priority( $a, $b ) {
|
453 |
-
if ( ! isset( $a['pri'] ) || ! isset( $b['pri'] ) || $a['pri'] === $b['pri'] ) {
|
454 |
-
return 0;
|
455 |
-
}
|
456 |
-
|
457 |
-
return ( $a['pri'] < $b['pri'] ) ? - 1 : 1;
|
458 |
-
}
|
459 |
-
|
460 |
-
/**
|
461 |
-
* Sort array in reverse by priority value
|
462 |
-
*
|
463 |
-
* @param $a
|
464 |
-
* @param $b
|
465 |
-
*
|
466 |
-
* @return int
|
467 |
-
*/
|
468 |
-
public static function rsort_by_priority( $a, $b ) {
|
469 |
-
if ( ! isset( $a['pri'] ) || ! isset( $b['pri'] ) || $a['pri'] === $b['pri'] ) {
|
470 |
-
return 0;
|
471 |
-
}
|
472 |
-
|
473 |
-
return ( $a['pri'] < $b['pri'] ) ? 1 : - 1;
|
474 |
-
}
|
475 |
-
|
476 |
-
}
|
477 |
-
|
478 |
-
Reviews::init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/classes/importer/menu.php
CHANGED
@@ -19,9 +19,7 @@ if ( ! defined( 'IMPORT_DEBUG' ) ) {
|
|
19 |
}
|
20 |
|
21 |
// Load Importer API
|
22 |
-
|
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';
|
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';
|
includes/classes/menu/items.php
CHANGED
@@ -128,15 +128,8 @@ class Items {
|
|
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,7 +137,7 @@ class Items {
|
|
144 |
switch ( $string ) {
|
145 |
|
146 |
case 'avatar':
|
147 |
-
$replace = get_avatar( $current_user
|
148 |
break;
|
149 |
|
150 |
case 'first_name':
|
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 |
switch ( $string ) {
|
138 |
|
139 |
case 'avatar':
|
140 |
+
$replace = get_avatar( $current_user, self::$current_item->avatar_size );
|
141 |
break;
|
142 |
|
143 |
case 'first_name':
|
includes/classes/walker/nav-menu-edit-custom-fields-deprecated.php
DELETED
@@ -1,67 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! class_exists( 'Walker_Nav_Menu_Edit' ) ) {
|
4 |
-
/** Walker_Nav_Menu_Edit class */
|
5 |
-
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Custom Walker for Nav Menu Editor
|
10 |
-
*
|
11 |
-
* Add wp_nav_menu_item_custom_fields hook to the nav menu editor.
|
12 |
-
*
|
13 |
-
* Credits:
|
14 |
-
* @helgatheviking - Initial concept which has made adding settings in the menu editor in a compatible way.
|
15 |
-
* @kucrut - preg_replace() method so that we no longer have to translate core strings
|
16 |
-
* @danieliser - refactor for less complexity between WP versions & updating versioned classes for proper backward compatibility with the new methods.
|
17 |
-
*
|
18 |
-
* @since WordPress 3.0.0
|
19 |
-
* @uses Walker_Nav_Menu_Edit
|
20 |
-
*/
|
21 |
-
class Walker_Nav_Menu_Edit_Custom_Fields extends Walker_Nav_Menu_Edit {
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Start the element output.
|
25 |
-
*
|
26 |
-
* @see Walker_Nav_Menu_Edit::start_el()
|
27 |
-
*
|
28 |
-
* @param string $output Passed by reference. Used to append additional content.
|
29 |
-
* @param object $item Menu item data object.
|
30 |
-
* @param int $depth Depth of menu item.
|
31 |
-
* @param array $args
|
32 |
-
*/
|
33 |
-
public function start_el( &$output, $item, $depth = 0, $args = array() ) {
|
34 |
-
parent::start_el( $output, $item, $depth, $args );
|
35 |
-
|
36 |
-
$output = preg_replace( '(<p[^>]+class="[^"]*field-description(.|\n)*?<\/p>)', "$1 \n" . $this->get_custom_fields( $item, $depth, $args ), $output, 1 );
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Get custom fields
|
41 |
-
*
|
42 |
-
* @uses do_action() Calls 'menu_item_custom_fields' hook
|
43 |
-
*
|
44 |
-
* @param object $item Menu item data object.
|
45 |
-
* @param int $depth Depth of menu item. Used for padding.
|
46 |
-
* @param array $args Menu item args.
|
47 |
-
*
|
48 |
-
* @return string Additional fields or html for the nav menu editor.
|
49 |
-
*/
|
50 |
-
protected function get_custom_fields( $item, $depth, $args = array() ) {
|
51 |
-
ob_start();
|
52 |
-
$item_id = intval( $item->ID );
|
53 |
-
/**
|
54 |
-
* Get menu item custom fields from plugins/themes
|
55 |
-
*
|
56 |
-
* @param int $item_id post ID of menu
|
57 |
-
* @param object $item Menu item data object.
|
58 |
-
* @param int $depth Depth of menu item. Used for padding.
|
59 |
-
* @param array $args Menu item args.
|
60 |
-
*
|
61 |
-
* @return string Custom fields
|
62 |
-
*/
|
63 |
-
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );
|
64 |
-
|
65 |
-
return ob_get_clean();
|
66 |
-
}
|
67 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/classes/walker/nav-menu-edit-custom-fields.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/** Walker_Nav_Menu_Edit class */
|
4 |
-
if ( ! class_exists( 'Walker_Nav_Menu_Edit' ) ) {
|
5 |
-
global $wp_version;
|
6 |
-
if ( version_compare( $wp_version, '4.4', '>=' ) ) {
|
7 |
-
require_once ABSPATH . 'wp-admin/includes/class-walker-nav-menu-edit.php';
|
8 |
-
} else {
|
9 |
-
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
|
10 |
-
}
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Custom Walker for Nav Menu Editor
|
15 |
-
*
|
16 |
-
* Add wp_nav_menu_item_custom_fields hook to the nav menu editor.
|
17 |
-
*
|
18 |
-
* Credits:
|
19 |
-
* @helgatheviking - Initial concept which has made adding settings in the menu editor in a compatible way.
|
20 |
-
* @kucrut - preg_replace() method so that we no longer have to translate core strings
|
21 |
-
* @danieliser - refactor for less complexity between WP versions & updating versioned classes for proper backward compatibility with the new methods.
|
22 |
-
*
|
23 |
-
* @since WordPress 3.6.0
|
24 |
-
* @uses Walker_Nav_Menu_Edit
|
25 |
-
*/
|
26 |
-
class Walker_Nav_Menu_Edit_Custom_Fields extends Walker_Nav_Menu_Edit {
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Start the element output.
|
30 |
-
*
|
31 |
-
* @see Walker_Nav_Menu_Edit::start_el()
|
32 |
-
*
|
33 |
-
* @param string $output Passed by reference. Used to append additional content.
|
34 |
-
* @param object $item Menu item data object.
|
35 |
-
* @param int $depth Depth of menu item.
|
36 |
-
* @param array $args
|
37 |
-
* @param int $id
|
38 |
-
*/
|
39 |
-
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
40 |
-
parent::start_el( $output, $item, $depth, $args, $id = 0 );
|
41 |
-
|
42 |
-
$output = preg_replace( '(<p[^>]+class="[^"]*field-description(.|\n)*?<\/p>)', "$1 \n" . $this->get_custom_fields( $item, $depth, $args ), $output, 1 );
|
43 |
-
}
|
44 |
-
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get custom fields
|
48 |
-
*
|
49 |
-
* @uses do_action() Calls 'menu_item_custom_fields' hook
|
50 |
-
*
|
51 |
-
* @param object $item Menu item data object.
|
52 |
-
* @param int $depth Depth of menu item. Used for padding.
|
53 |
-
* @param array $args Menu item args.
|
54 |
-
*
|
55 |
-
* @return string Additional fields or html for the nav menu editor.
|
56 |
-
*/
|
57 |
-
protected function get_custom_fields( $item, $depth, $args = array() ) {
|
58 |
-
ob_start();
|
59 |
-
$item_id = intval( $item->ID );
|
60 |
-
/**
|
61 |
-
* Get menu item custom fields from plugins/themes
|
62 |
-
*
|
63 |
-
* @param int $item_id post ID of menu
|
64 |
-
* @param object $item Menu item data object.
|
65 |
-
* @param int $depth Depth of menu item. Used for padding.
|
66 |
-
* @param array $args Menu item args.
|
67 |
-
*
|
68 |
-
* @return string Custom fields
|
69 |
-
*/
|
70 |
-
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );
|
71 |
-
|
72 |
-
return ob_get_clean();
|
73 |
-
}
|
74 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/classes/walker/nav-menu-edit-deprecated.php
ADDED
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace JP\UM\Walker;
|
4 |
+
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Navigation Menu API: (Modifed) Walker_Nav_Menu_Edit class
|
11 |
+
*
|
12 |
+
* Copied from Walker_Nav_Menu_Edit class in core /wp-admin/includes/nav-menu.php
|
13 |
+
*
|
14 |
+
* @since WordPress 4.4.0
|
15 |
+
*/
|
16 |
+
class Nav_Menu_Edit_Deprecated extends \Walker_Nav_Menu {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Start the element output.
|
20 |
+
*
|
21 |
+
* @see Walker_Nav_Menu::start_el()
|
22 |
+
* @since 3.0.0
|
23 |
+
*
|
24 |
+
* @global int $_wp_nav_menu_max_depth
|
25 |
+
*
|
26 |
+
* @param string $output Passed by reference. Used to append additional content.
|
27 |
+
* @param object $item Menu item data object.
|
28 |
+
* @param int $depth Depth of menu item. Used for padding.
|
29 |
+
* @param array $args Not used.
|
30 |
+
* @param int $id Not used.
|
31 |
+
*/
|
32 |
+
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
33 |
+
global $_wp_nav_menu_max_depth;
|
34 |
+
$_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;
|
35 |
+
|
36 |
+
ob_start();
|
37 |
+
$item_id = esc_attr( $item->ID );
|
38 |
+
$removed_args = array(
|
39 |
+
'action',
|
40 |
+
'customlink-tab',
|
41 |
+
'edit-menu-item',
|
42 |
+
'menu-item',
|
43 |
+
'page-tab',
|
44 |
+
'_wpnonce',
|
45 |
+
);
|
46 |
+
|
47 |
+
$original_title = '';
|
48 |
+
if ( 'taxonomy' == $item->type ) {
|
49 |
+
$original_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' );
|
50 |
+
if ( is_wp_error( $original_title ) )
|
51 |
+
$original_title = false;
|
52 |
+
} elseif ( 'post_type' == $item->type ) {
|
53 |
+
$original_object = get_post( $item->object_id );
|
54 |
+
$original_title = get_the_title( $original_object->ID );
|
55 |
+
} elseif ( 'post_type_archive' == $item->type ) {
|
56 |
+
$original_object = get_post_type_object( $item->object );
|
57 |
+
$original_title = $original_object->labels->archives;
|
58 |
+
}
|
59 |
+
|
60 |
+
$classes = array(
|
61 |
+
'menu-item menu-item-depth-' . $depth,
|
62 |
+
'menu-item-' . esc_attr( $item->object ),
|
63 |
+
'menu-item-edit-' . ( ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? 'active' : 'inactive'),
|
64 |
+
);
|
65 |
+
|
66 |
+
$title = $item->title;
|
67 |
+
|
68 |
+
if ( ! empty( $item->_invalid ) ) {
|
69 |
+
$classes[] = 'menu-item-invalid';
|
70 |
+
/* translators: %s: title of menu item which is invalid */
|
71 |
+
$title = sprintf( __( '%s (Invalid)' , 'nav-menu-roles' ), $item->title );
|
72 |
+
} elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) {
|
73 |
+
$classes[] = 'pending';
|
74 |
+
/* translators: %s: title of menu item in draft status */
|
75 |
+
$title = sprintf( __('%s (Pending)', 'nav-menu-roles' ), $item->title );
|
76 |
+
}
|
77 |
+
|
78 |
+
$title = ( ! isset( $item->label ) || '' == $item->label ) ? $title : $item->label;
|
79 |
+
|
80 |
+
$submenu_text = '';
|
81 |
+
if ( 0 == $depth )
|
82 |
+
$submenu_text = 'style="display: none;"';
|
83 |
+
|
84 |
+
?>
|
85 |
+
<li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>">
|
86 |
+
<div class="menu-item-bar">
|
87 |
+
<div class="menu-item-handle">
|
88 |
+
<span class="item-title"><span class="menu-item-title"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' , 'nav-menu-roles' ); ?></span></span>
|
89 |
+
<span class="item-controls">
|
90 |
+
<span class="item-type"><?php echo esc_html( $item->type_label ); ?></span>
|
91 |
+
<span class="item-order hide-if-js">
|
92 |
+
<a href="<?php
|
93 |
+
echo wp_nonce_url(
|
94 |
+
add_query_arg(
|
95 |
+
array(
|
96 |
+
'action' => 'move-up-menu-item',
|
97 |
+
'menu-item' => $item_id,
|
98 |
+
),
|
99 |
+
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
|
100 |
+
),
|
101 |
+
'move-menu_item'
|
102 |
+
);
|
103 |
+
?>" class="item-move-up"><abbr title="<?php esc_attr_e('Move up', 'nav-menu-roles' ); ?>">↑</abbr></a>
|
104 |
+
|
|
105 |
+
<a href="<?php
|
106 |
+
echo wp_nonce_url(
|
107 |
+
add_query_arg(
|
108 |
+
array(
|
109 |
+
'action' => 'move-down-menu-item',
|
110 |
+
'menu-item' => $item_id,
|
111 |
+
),
|
112 |
+
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
|
113 |
+
),
|
114 |
+
'move-menu_item'
|
115 |
+
);
|
116 |
+
?>" class="item-move-down"><abbr title="<?php esc_attr_e('Move down', 'nav-menu-roles' ); ?>">↓</abbr></a>
|
117 |
+
</span>
|
118 |
+
<a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php esc_attr_e('Edit Menu Item', 'nav-menu-roles' ); ?>" href="<?php
|
119 |
+
echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
|
120 |
+
?>"><?php _e( 'Edit Menu Item' , 'nav-menu-roles' ); ?></a>
|
121 |
+
</span>
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
+
|
125 |
+
<div class="menu-item-settings" id="menu-item-settings-<?php echo $item_id; ?>">
|
126 |
+
<?php if ( 'custom' == $item->type ) : ?>
|
127 |
+
<p class="field-url description description-wide">
|
128 |
+
<label for="edit-menu-item-url-<?php echo $item_id; ?>">
|
129 |
+
<?php _e( 'URL' , 'nav-menu-roles' ); ?><br />
|
130 |
+
<input type="text" id="edit-menu-item-url-<?php echo $item_id; ?>" class="widefat code edit-menu-item-url" name="menu-item-url[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->url ); ?>" />
|
131 |
+
</label>
|
132 |
+
</p>
|
133 |
+
<?php endif; ?>
|
134 |
+
<p class="description description-wide">
|
135 |
+
<label for="edit-menu-item-title-<?php echo $item_id; ?>">
|
136 |
+
<?php _e( 'Navigation Label' , 'nav-menu-roles' ); ?><br />
|
137 |
+
<input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title ); ?>" />
|
138 |
+
</label>
|
139 |
+
</p>
|
140 |
+
<p class="field-title-attribute description description-wide">
|
141 |
+
<label for="edit-menu-item-attr-title-<?php echo $item_id; ?>">
|
142 |
+
<?php _e( 'Title Attribute' , 'nav-menu-roles' ); ?><br />
|
143 |
+
<input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" />
|
144 |
+
</label>
|
145 |
+
</p>
|
146 |
+
<p class="field-link-target description">
|
147 |
+
<label for="edit-menu-item-target-<?php echo $item_id; ?>">
|
148 |
+
<input type="checkbox" id="edit-menu-item-target-<?php echo $item_id; ?>" value="_blank" name="menu-item-target[<?php echo $item_id; ?>]"<?php checked( $item->target, '_blank' ); ?> />
|
149 |
+
<?php _e( 'Open link in a new tab' , 'nav-menu-roles' ); ?>
|
150 |
+
</label>
|
151 |
+
</p>
|
152 |
+
<p class="field-css-classes description description-thin">
|
153 |
+
<label for="edit-menu-item-classes-<?php echo $item_id; ?>">
|
154 |
+
<?php _e( 'CSS Classes (optional)' , 'nav-menu-roles' ); ?><br />
|
155 |
+
<input type="text" id="edit-menu-item-classes-<?php echo $item_id; ?>" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php echo $item_id; ?>]" value="<?php echo esc_attr( implode(' ', $item->classes ) ); ?>" />
|
156 |
+
</label>
|
157 |
+
</p>
|
158 |
+
<p class="field-xfn description description-thin">
|
159 |
+
<label for="edit-menu-item-xfn-<?php echo $item_id; ?>">
|
160 |
+
<?php _e( 'Link Relationship (XFN)' , 'nav-menu-roles' ); ?><br />
|
161 |
+
<input type="text" id="edit-menu-item-xfn-<?php echo $item_id; ?>" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->xfn ); ?>" />
|
162 |
+
</label>
|
163 |
+
</p>
|
164 |
+
<p class="field-description description description-wide">
|
165 |
+
<label for="edit-menu-item-description-<?php echo $item_id; ?>">
|
166 |
+
<?php _e( 'Description' , 'nav-menu-roles' ); ?><br />
|
167 |
+
<textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); // textarea_escaped ?></textarea>
|
168 |
+
<span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.', 'nav-menu-roles' ); ?></span>
|
169 |
+
</label>
|
170 |
+
</p>
|
171 |
+
|
172 |
+
<?php
|
173 |
+
/**
|
174 |
+
* This action allows easily extending the admin menu walker class in a useful manner without conflicting with others.
|
175 |
+
*/
|
176 |
+
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args ); ?>
|
177 |
+
|
178 |
+
<p class="field-move hide-if-no-js description description-wide">
|
179 |
+
<label>
|
180 |
+
<span><?php _e( 'Move' , 'nav-menu-roles' ); ?></span>
|
181 |
+
<a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' , 'nav-menu-roles' ); ?></a>
|
182 |
+
<a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' , 'nav-menu-roles' ); ?></a>
|
183 |
+
<a href="#" class="menus-move menus-move-left" data-dir="left"></a>
|
184 |
+
<a href="#" class="menus-move menus-move-right" data-dir="right"></a>
|
185 |
+
<a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' , 'nav-menu-roles' ); ?></a>
|
186 |
+
</label>
|
187 |
+
</p>
|
188 |
+
|
189 |
+
<div class="menu-item-actions description-wide submitbox">
|
190 |
+
<?php if ( 'custom' != $item->type && $original_title !== false ) : ?>
|
191 |
+
<p class="link-to-original">
|
192 |
+
<?php printf( __('Original: %s', 'nav-menu-roles' ), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?>
|
193 |
+
</p>
|
194 |
+
<?php endif; ?>
|
195 |
+
<a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php
|
196 |
+
echo wp_nonce_url(
|
197 |
+
add_query_arg(
|
198 |
+
array(
|
199 |
+
'action' => 'delete-menu-item',
|
200 |
+
'menu-item' => $item_id,
|
201 |
+
),
|
202 |
+
admin_url( 'nav-menus.php' )
|
203 |
+
),
|
204 |
+
'delete-menu_item_' . $item_id
|
205 |
+
); ?>"><?php _e( 'Remove' , 'nav-menu-roles' ); ?></a> <span class="meta-sep hide-if-no-js"> | </span> <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href="<?php echo esc_url( add_query_arg( array( 'edit-menu-item' => $item_id, 'cancel' => time() ), admin_url( 'nav-menus.php' ) ) );
|
206 |
+
?>#menu-item-settings-<?php echo $item_id; ?>"><?php _e('Cancel', 'nav-menu-roles' ); ?></a>
|
207 |
+
</div>
|
208 |
+
|
209 |
+
<input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
|
210 |
+
<input class="menu-item-data-object-id" type="hidden" name="menu-item-object-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object_id ); ?>" />
|
211 |
+
<input class="menu-item-data-object" type="hidden" name="menu-item-object[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object ); ?>" />
|
212 |
+
<input class="menu-item-data-parent-id" type="hidden" name="menu-item-parent-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_item_parent ); ?>" />
|
213 |
+
<input class="menu-item-data-position" type="hidden" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" />
|
214 |
+
<input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->type ); ?>" />
|
215 |
+
</div><!-- .menu-item-settings-->
|
216 |
+
<ul class="menu-item-transport"></ul>
|
217 |
+
<?php
|
218 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+
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Navigation Menu API: (Modifed) Walker_Nav_Menu_Edit class
|
11 |
+
*
|
12 |
+
* Copied from Walker_Nav_Menu_Edit class in core /wp-admin/includes/class-walker-nav-menu-edit.php
|
13 |
+
*
|
14 |
+
* @since WordPress 4.5.0
|
15 |
+
*/
|
16 |
+
class Nav_Menu_Edit extends \Walker_Nav_Menu_Edit {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Start the element output.
|
20 |
+
*
|
21 |
+
* @see Walker_Nav_Menu::start_el()
|
22 |
+
* @since 3.0.0
|
23 |
+
*
|
24 |
+
* @global int $_wp_nav_menu_max_depth
|
25 |
+
*
|
26 |
+
* @param string $output Passed by reference. Used to append additional content.
|
27 |
+
* @param object $item Menu item data object.
|
28 |
+
* @param int $depth Depth of menu item. Used for padding.
|
29 |
+
* @param array $args Not used.
|
30 |
+
* @param int $id Not used.
|
31 |
+
*/
|
32 |
+
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
33 |
+
global $_wp_nav_menu_max_depth;
|
34 |
+
$_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;
|
35 |
+
|
36 |
+
ob_start();
|
37 |
+
$item_id = esc_attr( $item->ID );
|
38 |
+
$removed_args = array(
|
39 |
+
'action',
|
40 |
+
'customlink-tab',
|
41 |
+
'edit-menu-item',
|
42 |
+
'menu-item',
|
43 |
+
'page-tab',
|
44 |
+
'_wpnonce',
|
45 |
+
);
|
46 |
+
|
47 |
+
$original_title = '';
|
48 |
+
if ( 'taxonomy' == $item->type ) {
|
49 |
+
$original_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' );
|
50 |
+
if ( is_wp_error( $original_title ) )
|
51 |
+
$original_title = false;
|
52 |
+
} elseif ( 'post_type' == $item->type ) {
|
53 |
+
$original_object = get_post( $item->object_id );
|
54 |
+
$original_title = get_the_title( $original_object->ID );
|
55 |
+
} elseif ( 'post_type_archive' == $item->type ) {
|
56 |
+
$original_object = get_post_type_object( $item->object );
|
57 |
+
if ( $original_object ) {
|
58 |
+
$original_title = $original_object->labels->archives;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
$classes = array(
|
63 |
+
'menu-item menu-item-depth-' . $depth,
|
64 |
+
'menu-item-' . esc_attr( $item->object ),
|
65 |
+
'menu-item-edit-' . ( ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? 'active' : 'inactive'),
|
66 |
+
);
|
67 |
+
|
68 |
+
$title = $item->title;
|
69 |
+
|
70 |
+
if ( ! empty( $item->_invalid ) ) {
|
71 |
+
$classes[] = 'menu-item-invalid';
|
72 |
+
/* translators: %s: title of menu item which is invalid */
|
73 |
+
$title = sprintf( __( '%s (Invalid)' ), $item->title );
|
74 |
+
} elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) {
|
75 |
+
$classes[] = 'pending';
|
76 |
+
/* translators: %s: title of menu item in draft status */
|
77 |
+
$title = sprintf( __('%s (Pending)'), $item->title );
|
78 |
+
}
|
79 |
+
|
80 |
+
$title = ( ! isset( $item->label ) || '' == $item->label ) ? $title : $item->label;
|
81 |
+
|
82 |
+
$submenu_text = '';
|
83 |
+
if ( 0 == $depth )
|
84 |
+
$submenu_text = 'style="display: none;"';
|
85 |
+
|
86 |
+
?>
|
87 |
+
<li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>">
|
88 |
+
<div class="menu-item-bar">
|
89 |
+
<div class="menu-item-handle">
|
90 |
+
<span class="item-title"><span class="menu-item-title"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' ); ?></span></span>
|
91 |
+
<span class="item-controls">
|
92 |
+
<span class="item-type"><?php echo esc_html( $item->type_label ); ?></span>
|
93 |
+
<span class="item-order hide-if-js">
|
94 |
+
<a href="<?php
|
95 |
+
echo wp_nonce_url(
|
96 |
+
add_query_arg(
|
97 |
+
array(
|
98 |
+
'action' => 'move-up-menu-item',
|
99 |
+
'menu-item' => $item_id,
|
100 |
+
),
|
101 |
+
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
|
102 |
+
),
|
103 |
+
'move-menu_item'
|
104 |
+
);
|
105 |
+
?>" class="item-move-up" aria-label="<?php esc_attr_e( 'Move up' ) ?>">↑</a>
|
106 |
+
|
|
107 |
+
<a href="<?php
|
108 |
+
echo wp_nonce_url(
|
109 |
+
add_query_arg(
|
110 |
+
array(
|
111 |
+
'action' => 'move-down-menu-item',
|
112 |
+
'menu-item' => $item_id,
|
113 |
+
),
|
114 |
+
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
|
115 |
+
),
|
116 |
+
'move-menu_item'
|
117 |
+
);
|
118 |
+
?>" class="item-move-down" aria-label="<?php esc_attr_e( 'Move down' ) ?>">↓</a>
|
119 |
+
</span>
|
120 |
+
<a class="item-edit" id="edit-<?php echo $item_id; ?>" href="<?php
|
121 |
+
echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
|
122 |
+
?>" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><?php _e( 'Edit' ); ?></a>
|
123 |
+
</span>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<div class="menu-item-settings wp-clearfix" id="menu-item-settings-<?php echo $item_id; ?>">
|
128 |
+
<?php if ( 'custom' == $item->type ) : ?>
|
129 |
+
<p class="field-url description description-wide">
|
130 |
+
<label for="edit-menu-item-url-<?php echo $item_id; ?>">
|
131 |
+
<?php _e( 'URL' ); ?><br />
|
132 |
+
<input type="text" id="edit-menu-item-url-<?php echo $item_id; ?>" class="widefat code edit-menu-item-url" name="menu-item-url[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->url ); ?>" />
|
133 |
+
</label>
|
134 |
+
</p>
|
135 |
+
<?php endif; ?>
|
136 |
+
<p class="description description-wide">
|
137 |
+
<label for="edit-menu-item-title-<?php echo $item_id; ?>">
|
138 |
+
<?php _e( 'Navigation Label' ); ?><br />
|
139 |
+
<input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title ); ?>" />
|
140 |
+
</label>
|
141 |
+
</p>
|
142 |
+
|
143 |
+
<?php
|
144 |
+
/**
|
145 |
+
* This action allows easily extending the admin menu walker class in a useful manner without conflicting with others.
|
146 |
+
*/
|
147 |
+
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args ); ?>
|
148 |
+
|
149 |
+
<p class="field-title-attribute field-attr-title description description-wide">
|
150 |
+
<label for="edit-menu-item-attr-title-<?php echo $item_id; ?>">
|
151 |
+
<?php _e( 'Title Attribute' ); ?><br />
|
152 |
+
<input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" />
|
153 |
+
</label>
|
154 |
+
</p>
|
155 |
+
<p class="field-link-target description">
|
156 |
+
<label for="edit-menu-item-target-<?php echo $item_id; ?>">
|
157 |
+
<input type="checkbox" id="edit-menu-item-target-<?php echo $item_id; ?>" value="_blank" name="menu-item-target[<?php echo $item_id; ?>]"<?php checked( $item->target, '_blank' ); ?> />
|
158 |
+
<?php _e( 'Open link in a new tab' ); ?>
|
159 |
+
</label>
|
160 |
+
</p>
|
161 |
+
<p class="field-css-classes description description-thin">
|
162 |
+
<label for="edit-menu-item-classes-<?php echo $item_id; ?>">
|
163 |
+
<?php _e( 'CSS Classes (optional)' ); ?><br />
|
164 |
+
<input type="text" id="edit-menu-item-classes-<?php echo $item_id; ?>" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php echo $item_id; ?>]" value="<?php echo esc_attr( implode(' ', $item->classes ) ); ?>" />
|
165 |
+
</label>
|
166 |
+
</p>
|
167 |
+
<p class="field-xfn description description-thin">
|
168 |
+
<label for="edit-menu-item-xfn-<?php echo $item_id; ?>">
|
169 |
+
<?php _e( 'Link Relationship (XFN)' ); ?><br />
|
170 |
+
<input type="text" id="edit-menu-item-xfn-<?php echo $item_id; ?>" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->xfn ); ?>" />
|
171 |
+
</label>
|
172 |
+
</p>
|
173 |
+
<p class="field-description description description-wide">
|
174 |
+
<label for="edit-menu-item-description-<?php echo $item_id; ?>">
|
175 |
+
<?php _e( 'Description' ); ?><br />
|
176 |
+
<textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); // textarea_escaped ?></textarea>
|
177 |
+
<span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span>
|
178 |
+
</label>
|
179 |
+
</p>
|
180 |
+
|
181 |
+
<p class="field-move hide-if-no-js description description-wide">
|
182 |
+
<label>
|
183 |
+
<span><?php _e( 'Move' ); ?></span>
|
184 |
+
<a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></a>
|
185 |
+
<a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></a>
|
186 |
+
<a href="#" class="menus-move menus-move-left" data-dir="left"></a>
|
187 |
+
<a href="#" class="menus-move menus-move-right" data-dir="right"></a>
|
188 |
+
<a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></a>
|
189 |
+
</label>
|
190 |
+
</p>
|
191 |
+
|
192 |
+
<div class="menu-item-actions description-wide submitbox">
|
193 |
+
<?php if ( 'custom' != $item->type && $original_title !== false ) : ?>
|
194 |
+
<p class="link-to-original">
|
195 |
+
<?php printf( __('Original: %s'), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?>
|
196 |
+
</p>
|
197 |
+
<?php endif; ?>
|
198 |
+
<a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php
|
199 |
+
echo wp_nonce_url(
|
200 |
+
add_query_arg(
|
201 |
+
array(
|
202 |
+
'action' => 'delete-menu-item',
|
203 |
+
'menu-item' => $item_id,
|
204 |
+
),
|
205 |
+
admin_url( 'nav-menus.php' )
|
206 |
+
),
|
207 |
+
'delete-menu_item_' . $item_id
|
208 |
+
); ?>"><?php _e( 'Remove' ); ?></a> <span class="meta-sep hide-if-no-js"> | </span> <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href="<?php echo esc_url( add_query_arg( array( 'edit-menu-item' => $item_id, 'cancel' => time() ), admin_url( 'nav-menus.php' ) ) );
|
209 |
+
?>#menu-item-settings-<?php echo $item_id; ?>"><?php _e('Cancel'); ?></a>
|
210 |
+
</div>
|
211 |
+
|
212 |
+
<input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
|
213 |
+
<input class="menu-item-data-object-id" type="hidden" name="menu-item-object-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object_id ); ?>" />
|
214 |
+
<input class="menu-item-data-object" type="hidden" name="menu-item-object[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object ); ?>" />
|
215 |
+
<input class="menu-item-data-parent-id" type="hidden" name="menu-item-parent-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_item_parent ); ?>" />
|
216 |
+
<input class="menu-item-data-position" type="hidden" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" />
|
217 |
+
<input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->type ); ?>" />
|
218 |
+
</div><!-- .menu-item-settings-->
|
219 |
+
<ul class="menu-item-transport"></ul>
|
220 |
+
<?php
|
221 |
+
$output .= ob_get_clean();
|
222 |
+
}
|
223 |
+
|
224 |
+
}
|
languages/user-menus.pot
CHANGED
@@ -1,41 +1,34 @@
|
|
1 |
-
# Copyright (C)
|
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 |
-
"
|
10 |
-
"
|
11 |
"X-Poedit-Basepath: ..\n"
|
12 |
-
"X-Poedit-
|
|
|
13 |
"X-Poedit-SearchPath-0: .\n"
|
14 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
15 |
-
"
|
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:
|
27 |
msgid "User Links"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: includes/classes/admin/menu-editor.php:
|
31 |
msgid "Login"
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: includes/classes/admin/menu-editor.php:
|
35 |
msgid "Logout"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: includes/classes/admin/menu-editor.php:
|
39 |
msgid "Insert User Menu Codes"
|
40 |
msgstr ""
|
41 |
|
@@ -115,43 +108,43 @@ msgstr ""
|
|
115 |
msgid "I already did"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: includes/classes/importer/menu.php:
|
119 |
msgid "Import Nav Menus"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: includes/classes/importer/menu.php:
|
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:
|
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:
|
131 |
msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: includes/classes/importer/menu.php:
|
135 |
msgid "Sorry, there has been an error."
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: includes/classes/importer/menu.php:
|
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:
|
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:
|
147 |
msgid "The file does not exist, please try again."
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: includes/classes/importer/menu.php:
|
151 |
msgid "All done."
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: includes/classes/importer/menu.php:
|
155 |
msgid "Have fun!"
|
156 |
msgstr ""
|
157 |
|
@@ -186,3 +179,11 @@ msgstr ""
|
|
186 |
#: includes/classes/user/codes.php:25
|
187 |
msgid "Email"
|
188 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:47
|
20 |
msgid "User Links"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: includes/classes/admin/menu-editor.php:59
|
24 |
msgid "Login"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: includes/classes/admin/menu-editor.php:63
|
28 |
msgid "Logout"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: includes/classes/admin/menu-editor.php:154
|
32 |
msgid "Insert User Menu Codes"
|
33 |
msgstr ""
|
34 |
|
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 |
#: 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 ""
|
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:
|
9 |
-
Stable tag: 1.1.
|
10 |
-
|
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,8 +41,6 @@ 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 |
-
** 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,15 +113,6 @@ Bugs can be reported either in our support forum or preferably on the [User Menu
|
|
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 |
-
|
124 |
-
= v1.1.1 =
|
125 |
-
* Fix: Forgot to add new files during commit. Correcting this issue.
|
126 |
-
|
127 |
= v1.1.0 =
|
128 |
* Feature: Added ability to insert user avatar in menu items with size option to match your needs.
|
129 |
* Improvement: Added accessibility enhancements to menu editor. Includes keyboard support, proper focus, tabbing & titles.
|
@@ -131,4 +120,4 @@ Bugs can be reported either in our support forum or preferably on the [User Menu
|
|
131 |
* Tweak: Restyled user code insert elements to better resemble default WP admin.
|
132 |
|
133 |
= v1.0.0 =
|
134 |
-
* Initial Release
|
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.7.2
|
9 |
+
Stable tag: 1.1.0
|
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 |
* 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 |
|
114 |
== Changelog ==
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
= v1.1.0 =
|
117 |
* Feature: Added ability to insert user avatar in menu items with size option to match your needs.
|
118 |
* Improvement: Added accessibility enhancements to menu editor. Includes keyboard support, proper focus, tabbing & titles.
|
120 |
* Tweak: Restyled user code insert elements to better resemble default WP admin.
|
121 |
|
122 |
= v1.0.0 =
|
123 |
+
* Initial Release
|
user-menus.php
CHANGED
@@ -1,20 +1,18 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name:
|
4 |
-
* Plugin URI:
|
5 |
-
* Description:
|
6 |
-
* Version:
|
7 |
-
* Author:
|
8 |
-
* Author URI:
|
9 |
-
*
|
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)
|
18 |
* @since 1.0.0
|
19 |
*
|
20 |
* Prior Work Credits. Big thanks to the following:
|
@@ -39,7 +37,7 @@ class JP_User_Menus {
|
|
39 |
/**
|
40 |
* @var string
|
41 |
*/
|
42 |
-
public static $VER = '1.1.
|
43 |
|
44 |
/**
|
45 |
* @var string
|
@@ -102,7 +100,9 @@ class JP_User_Menus {
|
|
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,7 +113,9 @@ class JP_User_Menus {
|
|
113 |
/**
|
114 |
* Include necessary files
|
115 |
*
|
|
|
116 |
* @since 1.0.0
|
|
|
117 |
*/
|
118 |
private function includes() {
|
119 |
// Menu Items
|
@@ -175,12 +177,30 @@ class JP_User_Menus {
|
|
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 |
/**
|
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.0
|
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 |
/**
|
38 |
* @var string
|
39 |
*/
|
40 |
+
public static $VER = '1.1.0';
|
41 |
|
42 |
/**
|
43 |
* @var string
|
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 |
/**
|
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 |
/**
|
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 |
/**
|