Version Description
- Expanded/Collapsed states now saved for each user
- Trash functionality added
- Trashing pages now redirects to Nested Pages view
- Trash link added to quickly get to a list of trashed pages
- New "Add link" functionality creates custom link menu items
- Additional options added for generated menu items - title attribute, css classes, link target
Download this release
Release Info
Developer | kylephillips |
Plugin | Nested Pages |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- assets/css/fonts/nestedpages.eot +0 -0
- assets/css/fonts/nestedpages.svg +7 -0
- assets/css/fonts/nestedpages.ttf +0 -0
- assets/css/fonts/nestedpages.woff +0 -0
- assets/css/nestedpages.css +1 -1
- assets/js/lib/nestedpages.js +414 -8
- assets/js/nestedpages.min.js +1 -1
- assets/screenshot-1.png +0 -0
- assets/screenshot-2.png +0 -0
- assets/screenshot-3.gif +0 -0
- assets/scss/_buttons.scss +3 -1
- assets/scss/_icons.scss +22 -0
- assets/scss/_mixins.scss +14 -0
- assets/scss/_page-listing.scss +4 -1
- assets/scss/_quick-edit.scss +34 -10
- assets/scss/nestedpages.scss +3 -1
- includes/class-nestedpages.php +10 -0
- includes/class-np-activate.php +1 -1
- includes/class-np-dependencies.php +22 -6
- includes/class-np-handler-base.php +1 -1
- includes/class-np-handler-quickedit.php +1 -0
- includes/class-np-navmenu.php +52 -10
- includes/class-np-pagelisting.php +162 -49
- includes/class-np-validation.php +27 -0
- languages/nestedpages.mo +0 -0
- languages/nestedpages.pot +169 -61
- nestedpages.php +1 -1
- readme.txt +15 -2
- views/pages.php +24 -5
- views/quickedit.php +42 -11
- views/row.php +29 -15
assets/css/fonts/nestedpages.eot
CHANGED
Binary file
|
assets/css/fonts/nestedpages.svg
CHANGED
@@ -20,4 +20,11 @@
|
|
20 |
<glyph unicode="" d="M400 416h-288c-26.51 0-48-21.49-48-48v-16h384v16c0 26.51-21.49 48-48 48zM316.16 448l7.058-50.5h-134.436l7.057 50.5h120.321zM320 480h-128c-13.2 0-25.495-10.696-27.321-23.769l-9.357-66.962c-1.827-13.073 7.478-23.769 20.678-23.769h160c13.2 0 22.505 10.696 20.679 23.769l-9.357 66.962c-1.827 13.073-14.122 23.769-27.322 23.769v0zM408 320h-304c-17.6 0-30.696-14.341-29.103-31.869l26.206-288.263c1.593-17.527 17.297-31.868 34.897-31.868h240c17.6 0 33.304 14.341 34.897 31.868l26.205 288.263c1.594 17.528-11.502 31.869-29.102 31.869zM192 32h-48l-16 224h64v-224zM288 32h-64v224h64v-224zM368 32h-48v224h64l-16-224z" />
|
21 |
<glyph unicode="" d="M256 384c-111.659 0-208.441-65.021-256-160 47.559-94.979 144.341-160 256-160 111.657 0 208.439 65.021 256 160-47.558 94.979-144.343 160-256 160zM382.225 299.148c30.081-19.187 55.571-44.887 74.717-75.148-19.146-30.261-44.637-55.961-74.718-75.149-37.797-24.108-81.445-36.851-126.224-36.851-44.78 0-88.428 12.743-126.225 36.852-30.080 19.186-55.57 44.886-74.717 75.148 19.146 30.262 44.637 55.962 74.717 75.148 1.959 1.25 3.938 2.461 5.929 3.65-4.979-13.664-7.704-28.411-7.704-43.798 0-70.692 57.308-128 128-128s128 57.308 128 128c0 15.387-2.725 30.134-7.704 43.799 1.99-1.189 3.969-2.401 5.929-3.651zM256 275c0-26.51-21.49-48-48-48s-48 21.49-48 48 21.49 48 48 48 48-21.49 48-48z" />
|
22 |
<glyph unicode="" d="M419.661 331.792c38.822-27.515 70.685-64.546 92.339-107.792-47.561-94.979-144.343-160-256-160-31.283 0-61.396 5.106-89.589 14.542l38.978 38.978c16.529-3.65 33.486-5.52 50.611-5.52 44.779 0 88.427 12.743 126.223 36.852 30.081 19.188 55.572 44.888 74.718 75.149-18.526 29.283-43.007 54.275-71.825 73.247l34.545 34.544zM256 131c-11.362 0-22.376 1.488-32.864 4.267l156.593 156.592c2.781-10.486 4.271-21.497 4.271-32.859 0-70.692-57.308-128-128-128zM480 480h-26.869l-109.806-109.806c-27.538 8.962-56.877 13.806-87.325 13.806-111.659 0-208.441-65.021-256-160 21.329-42.596 52.564-79.154 90.597-106.534l-90.597-90.597v-26.869h26.869l453.131 453.131v26.869zM208 323c24.022 0 43.923-17.647 47.446-40.685l-54.762-54.762c-23.037 3.524-40.684 23.425-40.684 47.447 0 26.51 21.49 48 48 48zM55.058 224c19.146 30.262 44.637 55.962 74.717 75.148 1.959 1.25 3.938 2.461 5.929 3.65-4.979-13.664-7.704-28.411-7.704-43.798 0-29.262 9.825-56.224 26.349-77.781l-29.275-29.275c-28.036 18.821-51.877 43.386-70.016 72.056z" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
</font></defs></svg>
|
20 |
<glyph unicode="" d="M400 416h-288c-26.51 0-48-21.49-48-48v-16h384v16c0 26.51-21.49 48-48 48zM316.16 448l7.058-50.5h-134.436l7.057 50.5h120.321zM320 480h-128c-13.2 0-25.495-10.696-27.321-23.769l-9.357-66.962c-1.827-13.073 7.478-23.769 20.678-23.769h160c13.2 0 22.505 10.696 20.679 23.769l-9.357 66.962c-1.827 13.073-14.122 23.769-27.322 23.769v0zM408 320h-304c-17.6 0-30.696-14.341-29.103-31.869l26.206-288.263c1.593-17.527 17.297-31.868 34.897-31.868h240c17.6 0 33.304 14.341 34.897 31.868l26.205 288.263c1.594 17.528-11.502 31.869-29.102 31.869zM192 32h-48l-16 224h64v-224zM288 32h-64v224h64v-224zM368 32h-48v224h64l-16-224z" />
|
21 |
<glyph unicode="" d="M256 384c-111.659 0-208.441-65.021-256-160 47.559-94.979 144.341-160 256-160 111.657 0 208.439 65.021 256 160-47.558 94.979-144.343 160-256 160zM382.225 299.148c30.081-19.187 55.571-44.887 74.717-75.148-19.146-30.261-44.637-55.961-74.718-75.149-37.797-24.108-81.445-36.851-126.224-36.851-44.78 0-88.428 12.743-126.225 36.852-30.080 19.186-55.57 44.886-74.717 75.148 19.146 30.262 44.637 55.962 74.717 75.148 1.959 1.25 3.938 2.461 5.929 3.65-4.979-13.664-7.704-28.411-7.704-43.798 0-70.692 57.308-128 128-128s128 57.308 128 128c0 15.387-2.725 30.134-7.704 43.799 1.99-1.189 3.969-2.401 5.929-3.651zM256 275c0-26.51-21.49-48-48-48s-48 21.49-48 48 21.49 48 48 48 48-21.49 48-48z" />
|
22 |
<glyph unicode="" d="M419.661 331.792c38.822-27.515 70.685-64.546 92.339-107.792-47.561-94.979-144.343-160-256-160-31.283 0-61.396 5.106-89.589 14.542l38.978 38.978c16.529-3.65 33.486-5.52 50.611-5.52 44.779 0 88.427 12.743 126.223 36.852 30.081 19.188 55.572 44.888 74.718 75.149-18.526 29.283-43.007 54.275-71.825 73.247l34.545 34.544zM256 131c-11.362 0-22.376 1.488-32.864 4.267l156.593 156.592c2.781-10.486 4.271-21.497 4.271-32.859 0-70.692-57.308-128-128-128zM480 480h-26.869l-109.806-109.806c-27.538 8.962-56.877 13.806-87.325 13.806-111.659 0-208.441-65.021-256-160 21.329-42.596 52.564-79.154 90.597-106.534l-90.597-90.597v-26.869h26.869l453.131 453.131v26.869zM208 323c24.022 0 43.923-17.647 47.446-40.685l-54.762-54.762c-23.037 3.524-40.684 23.425-40.684 47.447 0 26.51 21.49 48 48 48zM55.058 224c19.146 30.262 44.637 55.962 74.717 75.148 1.959 1.25 3.938 2.461 5.929 3.65-4.979-13.664-7.704-28.411-7.704-43.798 0-29.262 9.825-56.224 26.349-77.781l-29.275-29.275c-28.036 18.821-51.877 43.386-70.016 72.056z" />
|
23 |
+
<glyph unicode="" d="M192 448h320v-64h-320v64zM192 256h320v-64h-320v64zM192 64h320v-64h-320v64zM0 416c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM0 224c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM0 32c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64z" />
|
24 |
+
<glyph unicode="" d="M426.671 480h-341.328c-46.937 0-85.343-38.405-85.343-85.345v-341.311c0-46.969 38.406-85.344 85.343-85.344h341.328c46.938 0 85.329 38.375 85.329 85.345v341.31c0 46.94-38.391 85.345-85.329 85.345zM426.671 416c3.994 0 7.773-1.167 11.010-3.171l-181.681-150.202-181.677 150.2c3.239 2.005 7.022 3.173 11.020 3.173h341.328zM85.343 32c-0.962 0-1.91 0.073-2.842 0.204l112.813 156.483-14.628 14.627-116.686-116.685v305.569l192-232.198 192 232.197v-305.568l-116.686 116.685-14.627-14.627 112.814-156.484c-0.929-0.13-1.873-0.203-2.831-0.203h-341.327z" />
|
25 |
+
<glyph unicode="" d="M256 480c-141.385 0-256-114.615-256-256s114.615-256 256-256 256 114.615 256 256-114.615 256-256 256zM408.028 71.972c-19.759-19.758-42.756-35.266-68.354-46.093-6.503-2.75-13.107-5.164-19.8-7.246v38.367c0 20.167-6.917 35-20.75 44.5 8.667 0.833 16.625 2 23.875 3.5s14.917 3.667 23 6.5 15.333 6.208 21.75 10.125 12.583 9 18.5 15.25 10.875 13.333 14.875 21.25 7.167 17.417 9.5 28.5 3.5 23.292 3.5 36.625c0 25.833-8.417 47.833-25.25 66 7.667 20 6.833 41.75-2.5 65.25l-6.25 0.75c-4.333 0.5-12.125-1.333-23.375-5.5s-23.875-11-37.875-20.5c-19.833 5.5-40.417 8.25-61.75 8.25-21.5 0-42-2.75-61.5-8.25-8.833 6-17.208 10.958-25.125 14.875s-14.25 6.583-19 8-9.167 2.292-13.25 2.625-6.708 0.417-7.875 0.25-2-0.333-2.5-0.5c-9.333-23.667-10.167-45.417-2.5-65.25-16.833-18.167-25.25-40.167-25.25-66 0-13.333 1.167-25.542 3.5-36.625s5.5-20.583 9.5-28.5 8.958-15 14.875-21.25 12.083-11.333 18.5-15.25 13.667-7.292 21.75-10.125 15.75-5 23-6.5 15.208-2.667 23.875-3.5c-13.667-9.333-20.5-24.167-20.5-44.5v-39.115c-7.549 2.247-14.99 4.902-22.3 7.994-25.597 10.827-48.594 26.335-68.353 46.093-19.758 19.759-35.267 42.756-46.093 68.354-11.199 26.479-16.878 54.631-16.878 83.674s5.679 57.195 16.879 83.675c10.827 25.597 26.335 48.594 46.093 68.353s42.756 35.267 68.353 46.093c26.48 11.2 54.632 16.879 83.675 16.879s57.195-5.679 83.675-16.879c25.598-10.827 48.595-26.335 68.354-46.093 19.758-19.758 35.266-42.756 46.093-68.353 11.199-26.48 16.878-54.632 16.878-83.675s-5.679-57.195-16.879-83.675c-10.827-25.597-26.335-48.595-46.093-68.353z" />
|
26 |
+
<glyph unicode="" d="M64 224.004c0-74.013 44.161-137.984 108.215-168.289l-91.589 244.392c-10.654-23.254-16.626-48.991-16.626-76.103zM385.614 233.436c0 23.117-8.527 39.118-15.827 51.571-9.729 15.41-18.86 28.447-18.86 43.858 0 17.187 13.383 33.188 32.243 33.188 0.852 0 1.66-0.102 2.488-0.151-34.158 30.485-79.67 49.098-129.654 49.098-67.080 0-126.093-33.523-160.422-84.284 4.505-0.141 8.753-0.227 12.356-0.227 20.077 0 51.17 2.376 51.17 2.376 10.345 0.591 11.566-14.217 1.229-15.411 0 0-10.405-1.184-21.976-1.775l69.917-202.553 42.022 122.728-29.911 79.825c-10.344 0.592-20.139 1.775-20.139 1.775-10.351 0.596-9.136 16.001 1.219 15.411 0 0 31.7-2.376 50.567-2.376 20.073 0 51.175 2.376 51.175 2.376 10.351 0.591 11.57-14.217 1.223-15.411 0 0-10.417-1.186-21.974-1.775l69.39-201.009 19.156 62.316c8.29 25.875 14.608 44.45 14.608 60.45zM259.371 207.648l-57.613-163.029c17.208-4.929 35.397-7.619 54.244-7.619 22.358 0 43.802 3.759 63.759 10.6-0.509 0.801-0.987 1.652-1.375 2.577l-59.015 157.471zM424.481 313.714c0.826-5.955 1.294-12.343 1.294-19.229 0-18.965-3.646-40.298-14.601-66.975l-58.643-165.136c57.081 32.414 95.469 92.644 95.469 161.629 0 32.515-8.53 63.080-23.519 89.711zM256 480c-141.385 0-256-114.615-256-256s114.615-256 256-256 256 114.615 256 256-114.615 256-256 256zM256 0c-123.712 0-224 100.288-224 224s100.288 224 224 224 224-100.288 224-224-100.288-224-224-224z" />
|
27 |
+
<glyph unicode="" d="M426 480h-340c-47.3 0-86-38.7-86-86v-340c0-47.3 38.7-86 86-86h340c47.3 0 86 38.7 86 86v340c0 47.3-38.7 86-86 86zM192 64h-64v224h64v-224zM160 320c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zM416 64h-64v128c0 17.673-14.327 32-32 32s-32-14.327-32-32v-128h-64v224h64v-39.736c13.199 18.132 33.376 39.736 56 39.736 39.765 0 72-35.817 72-80v-144z" />
|
28 |
+
<glyph unicode="" d="M476.698 442.679l-2.014 2.021c-47.074 47.067-124.097 47.067-171.163 0l-109.053-109.068c-47.067-47.066-47.067-124.088 0-171.155l2.013-2.013c3.916-3.924 8.073-7.462 12.368-10.729l39.924 39.925c-4.651 2.747-9.063 6.036-13.058 10.030l-2.021 2.021c-25.557 25.549-25.557 67.136 0 92.695l109.064 109.056c25.558 25.559 67.137 25.559 92.693 0l2.021-2.012c25.55-25.558 25.55-67.146 0-92.695l-49.343-49.343c8.566-21.154 12.624-43.7 12.269-66.193l76.302 76.302c47.067 47.068 47.067 124.089-0.002 171.158zM315.521 285.533c-3.916 3.916-8.073 7.461-12.368 10.72l-39.924-39.916c4.652-2.748 9.063-6.037 13.058-10.031l2.021-2.020c25.558-25.558 25.558-67.136 0-92.694l-109.065-109.067c-25.559-25.551-67.138-25.551-92.694 0l-2.021 2.021c-25.549 25.56-25.549 67.138 0 92.694l49.344 49.343c-8.567 21.153-12.623 43.701-12.269 66.193l-76.301-76.299c-47.068-47.066-47.068-124.089 0-171.162l2.013-2.016c47.076-47.064 124.096-47.064 171.164 0l109.055 109.059c47.067 47.066 47.067 124.097 0 171.163l-2.013 2.012z" />
|
29 |
+
<glyph unicode="" d="M0 18.286v128q0 12 11.428 16.857 11.143 4.857 19.715-4l41.143-41.143 101.428 101.428-101.428 101.428-41.143-41.143q-5.428-5.428-12.857-5.428-3.428 0-6.857 1.428-11.428 4.857-11.428 16.857v128q0 7.428 5.428 12.857t12.857 5.429h128q12 0 16.857-11.429 4.857-11.143-4-19.714l-41.143-41.143 101.428-101.428 101.428 101.428-41.143 41.143q-8.857 8.572-4 19.714 4.857 11.429 16.857 11.429h128q7.428 0 12.857-5.429t5.428-12.857v-128q0-12-11.143-16.857-3.714-1.428-7.143-1.428-7.428 0-12.857 5.428l-41.143 41.143-101.428-101.428 101.428-101.428 41.143 41.143q8.286 8.857 20 4 11.143-4.857 11.143-16.857v-128q0-7.428-5.428-12.857t-12.857-5.428h-128q-12 0-16.857 11.428-4.857 11.143 4 19.714l41.143 41.143-101.428 101.428-101.428-101.428 41.143-41.143q8.857-8.572 4-19.714-4.857-11.428-16.857-11.428h-128q-7.428 0-12.857 5.428t-5.428 12.857z" />
|
30 |
</font></defs></svg>
|
assets/css/fonts/nestedpages.ttf
CHANGED
Binary file
|
assets/css/fonts/nestedpages.woff
CHANGED
Binary file
|
assets/css/nestedpages.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@font-face{font-family:'nestedpages';src:url('fonts/nestedpages.eot?-cjbqo6');src:url('fonts/nestedpages.eot?#iefix-cjbqo6') format('embedded-opentype'),url('fonts/nestedpages.woff?-cjbqo6') format('woff'),url('fonts/nestedpages.ttf?-cjbqo6') format('truetype'),url('fonts/nestedpages.svg?-cjbqo6#nestedpages') format('svg');font-weight:normal;font-style:normal;}[class^="np-icon-"],[class*=" np-icon-"]{font-family:'nestedpages';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.np-icon-no:before{content:"\e601";}.np-icon-yes:before{content:"\e602";}.np-icon-menu:before{content:"\e603";}.np-icon-arrow-down:before{content:"\e604";}.np-icon-arrow-right:before{content:"\e605";}.np-icon-sub-menu:before{content:"\e600";}.np-icon-pencil:before{content:"\e608";}.np-icon-bubble:before{content:"\e607";}.np-icon-lock:before{content:"\e609";}.np-icon-remove:before{content:"\e60a";}.np-icon-menu2:before{content:"\e606";}.np-icon-eye:before{content:"\e60b";}.np-icon-eye-blocked:before{content:"\e60c";}.np-btn,.np-toggle-edit{text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:3px 8px;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0, 0, 0, 0.08);-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.np-btn:hover,.np-toggle-edit:hover{background-color:#0074a2;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:0 1px 0 rgba(0, 0, 0, 0.08);}.np-btn-trash{background-color:#e14d43;border-color:#e14d43;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3),0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3),0 1px 0 rgba(0, 0, 0, 0.08);color:#ffffff;}.np-btn-trash:hover{background-color:#ba251e;border-color:#ba251e;}.np-toggle-edit{display:none;float:right;margin-right:10px;}.np-toggle-edit.active{background-color:#0074a2;color:#ffffff;-webkit-box-shadow:none;box-shadow:none;border-color:#0074a2;}@media (max-width: 767px){.np-toggle-edit{display:inline-block;}}.np-quickedit-error{border-left:4px solid #dd3d36;padding:4px 0 4px 8px;margin-bottom:10px;background-color:#f9f9f9;}.nestedpages-toggleall{float:right;margin-top:-30px;}.np-toggle-publish{color:#999999;}.np-toggle-publish.active{color:#333;font-weight:bold;}.np-sync-menu-cont{float:right;margin:-27px 15px 0px 0px;}#nested-loading{display:none;float:right;width:30px;margin:-31px 120px 0 0;}.wppages-top-tools{margin-bottom:20px;padding-top:10px;}.wppages-top-tools a{text-decoration:none;}.wppages-handle-expand{float:left;background-color:#f2f2f2;font-size:18px;width:46px;height:46px;margin-right:5px;text-align:center;border-right:1px solid #e1e1e1;}.wppages-handle-expand div{background-color:#ffffff;border:1px solid #e1e1e1;width:24px;height:24px;line-height:24px;-webkit-border-radius:15px;border-radius:15px;margin-top:9px;cursor:pointer;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.wppages-handle-expand div:hover{background-color:#0074a2;border-color:#0074a2;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages{clear:both;-webkit-border-radius:4px;border-radius:4px;}.nestedpages .ui-sortable-placeholder{display:block !important;position:relative;min-height:46px;border:0;border:1px dashed #0074a2 !important;background-color:#effaff;margin:0;}.nestedpages .ui-sortable-helper{opacity:0.8;-webkit-box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.5);box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.5);}.nestedpages ol{list-style-type:none;clear:both;margin:0;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.06);box-shadow:0 1px 1px rgba(0, 0, 0, 0.06);border:1px solid #e5e5e5;-webkit-border-radius:3px;border-radius:3px;}.nestedpages ol a{text-decoration:none;}.nestedpages ol .page-link{line-height:26px;}.nestedpages ol .page-link .edit-indicator{margin-left:10px;display:none;}.nestedpages ol .page-link .edit-indicator i{font-size:12px;margin-right:3px;}.nestedpages ol .page-link:hover .edit-indicator{display:inline-block;}.nestedpages ol .locked{color:#333;margin-left:20px;}.nestedpages ol .locked em{font-style:normal;}.nestedpages ol .status{color:#999999;margin:0px 10px;}.nestedpages ol .np-icon-eye-blocked{color:#999999;}.nestedpages ol .nav-status{color:#b3b3b3;}.nestedpages ol .np-hide{display:none;}.nestedpages ol .np-seo-indicator{display:block;float:right;width:12px;height:12px;-webkit-border-radius:8px;border-radius:8px;background-color:#999999;margin:6px 10px 0 0;}.nestedpages ol .np-seo-indicator.good{background-color:#7ad03a;}.nestedpages ol .np-seo-indicator.ok{background-color:#ffba00;}.nestedpages ol .np-seo-indicator.poor{background-color:#ee7c1b;}.nestedpages ol .np-seo-indicator.bad{background-color:#dd3d36;}.nestedpages ol .np-seo-indicator.warn{background-color:maroon;}.nestedpages ol .np-seo-indicator.wrong{background-color:red;}.nestedpages ol li{margin:0;border-top:1px solid #e1e1e1;background-color:#0074a2;}.nestedpages ol li.first{border:0;}.nestedpages ol li:first-child{border:0;}.nestedpages ol li.no-border{border:0;}.nestedpages ol ol{display:none;-webkit-border-radius:0;border-radius:0;list-style-type:none;border:0;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid #e1e1e1;}.nestedpages .child-toggle{float:left;margin:-10px 10px 0 0;width:46px;height:46px;background-color:#f0f0f0;text-align:center;}.nestedpages .child-toggle a{display:inline-block;margin-top:7px;width:28px;height:28px;background-color:#ffffff;border:1px solid #e1e1e1;-webkit-border-radius:20px;border-radius:20px;font-size:20px;line-height:30px;color:#333;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages .child-toggle a i{line-height:26px;}.nestedpages .child-toggle a:hover{background-color:#0074a2;color:#ffffff;border-color:#0074a2;}.nestedpages .handle{display:inline-block;cursor:move;font-size:20px;color:#b3b3b3;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;position:relative;top:3px;}.nestedpages .handle:hover{-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;color:#0074a2;}.nestedpages .np-icon-sub-menu{display:none;color:#999999;position:relative;left:2px;}.nestedpages .handle,.nestedpages .np-icon-sub-menu{width:30px;height:46px;line-height:36px;margin-top:-10px;}.nestedpages li ol .row .np-icon-sub-menu{display:inline-block;}.nestedpages li ol .row .handle{display:none;}.nestedpages li ol .row:hover .np-icon-sub-menu{display:none;}.nestedpages li ol .row:hover .handle{display:inline-block;}.nestedpages .row{background-color:#ffffff;display:block;padding:10px 0px 0px 0px;height:36px;zoom:1;}.nestedpages .row:before,.nestedpages .row:after{content:" ";display:table;}.nestedpages .row:after{clear:both;}.nestedpages .row:hover{background-color:#f0f0f0;}.nestedpages .row.np-updated{background-color:#e9f7df;-webkit-transition:background-color 400ms ease;-o-transition:background-color 400ms ease;transition:background-color 400ms ease;}.nestedpages .row.np-updated-show{background-color:#ffffff;-webkit-transition:background-color 400ms ease;-o-transition:background-color 400ms ease;transition:background-color 400ms ease;}.nestedpages ol li ol .row-inner{padding-left:86px;}.nestedpages ol li ol li ol .row-inner{padding-left:116px;}.nestedpages ol li ol li ol li ol .row-inner{padding-left:156px;}.nestedpages .action-buttons{display:none;float:right;margin:0 10px 0 0;}.nestedpages .action-buttons a{margin-left:5px;}@media (min-width: 768px){.nestedpages .row:hover .action-buttons{display:block;}}@media (max-width: 767px){.nestedpages ol .page-link{line-height:24px;}.nestedpages ol .page-link:hover span{display:none;}.nestedpages ol .locked em{display:none;}.nestedpages .child-toggle{background:transparent;}.nestedpages .row{height:auto;}.nestedpages .action-buttons{display:none;background-color:#0074a2;float:none;margin:0;padding:8px;}.nestedpages .action-buttons a{margin-left:5px;}}.nestedpages .quick-edit{background-color:#ffffff;-webkit-border-radius:0;border-radius:0;}.nestedpages .quick-edit .form-interior{padding:10px;}.nestedpages .quick-edit h3{margin:0 0 8px 0;font-size:14px;}.nestedpages .quick-edit .fields{margin-bottom:10px;background:url('../images/border.png') repeat-y;background-position:center;zoom:1;}.nestedpages .quick-edit .fields:before,.nestedpages .quick-edit .fields:after{content:" ";display:table;}.nestedpages .quick-edit .fields:after{clear:both;}.nestedpages .quick-edit .left{float:left;width:48%;}.nestedpages .quick-edit .right{float:right;width:48%;}.nestedpages .quick-edit label{font-style:oblique;}.nestedpages .quick-edit .buttons{clear:both;zoom:1;background-color:#404040;padding:8px;}.nestedpages .quick-edit .buttons:before,.nestedpages .quick-edit .buttons:after{content:" ";display:table;}.nestedpages .quick-edit .buttons:after{clear:both;}.nestedpages .quick-edit .form-control{clear:both;zoom:1;margin-bottom:5px;}.nestedpages .quick-edit .form-control:before,.nestedpages .quick-edit .form-control:after{content:" ";display:table;}.nestedpages .quick-edit .form-control:after{clear:both;}.nestedpages .quick-edit .form-control input[type='text'],.nestedpages .quick-edit .form-control input[type='password'],.nestedpages .quick-edit .form-control select{float:right;width:75%;}.nestedpages .quick-edit .form-control label{float:left;width:20%;}.nestedpages .quick-edit .comments{float:right;width:75%;margin-bottom:10px;zoom:1;}.nestedpages .quick-edit .comments:before,.nestedpages .quick-edit .comments:after{content:" ";display:table;}.nestedpages .quick-edit .comments:after{clear:both;}.nestedpages .quick-edit .dates{float:right;width:75%;margin-bottom:6px;}.nestedpages .quick-edit .dates select{width:25%;}.nestedpages .quick-edit .dates input{width:12%;}.nestedpages .quick-edit .np-qe-loading{display:none;float:right;width:25px;height:25px;margin:2px 10px 0 0;background:url('../images/loading-white.gif') no-repeat;}.nestedpages .quick-edit .np-toggle-taxonomies{clear:both;float:right;width:71%;text-align:center;}.nestedpages .quick-edit .np-taxonomies{display:none;clear:both;background-color:#f9f9f9;padding:8px;zoom:1;}.nestedpages .quick-edit .np-taxonomies:before,.nestedpages .quick-edit .np-taxonomies:after{content:" ";display:table;}.nestedpages .quick-edit .np-taxonomies:after{clear:both;}.nestedpages .quick-edit .np-taxonomy{float:left;width:30%;margin-right:3.33%;}.nestedpages .quick-edit .np-taxonomy .title{font-weight:bold;margin-bottom:4px;display:block;}.nestedpages .quick-edit .np-taxonomy li{background-color:#ffffff;border:0;}@media (max-width: 767px){.nestedpages .quick-edit .fields{background:transparent;}.nestedpages .quick-edit .left,.nestedpages .quick-edit .right{float:none;width:100%;}.nestedpages .quick-edit .form-control{margin-bottom:10px;}.nestedpages .quick-edit .form-control input[type='text'],.nestedpages .quick-edit .form-control input[type='password'],.nestedpages .quick-edit .form-control select{float:none;width:100%;}.nestedpages .quick-edit .form-control label{display:block;float:none;width:100%;margin-bottom:4px;}.nestedpages .quick-edit .comments{float:none;width:100%;}.nestedpages .quick-edit .dates{float:none;width:100%;margin-bottom:6px;}}
|
1 |
+
@font-face{font-family:'nestedpages';src:url('fonts/nestedpages.eot?-cjbqo6');src:url('fonts/nestedpages.eot?#iefix-cjbqo6') format('embedded-opentype'),url('fonts/nestedpages.woff?-cjbqo6') format('woff'),url('fonts/nestedpages.ttf?-cjbqo6') format('truetype'),url('fonts/nestedpages.svg?-cjbqo6#nestedpages') format('svg');font-weight:normal;font-style:normal;}[class^="np-icon-"],[class*=" np-icon-"]{font-family:'nestedpages';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}.np-icon-no:before{content:"\e601";}.np-icon-yes:before{content:"\e602";}.np-icon-menu:before{content:"\e603";}.np-icon-arrow-down:before{content:"\e604";}.np-icon-arrow-right:before{content:"\e605";}.np-icon-sub-menu:before{content:"\e600";}.np-icon-arrows-alt:before{content:"\f0b2";}.np-icon-pencil:before{content:"\e608";}.np-icon-bubble:before{content:"\e607";}.np-icon-lock:before{content:"\e609";}.np-icon-remove:before{content:"\e60a";}.np-icon-list:before{content:"\e60d";}.np-icon-menu2:before{content:"\e606";}.np-icon-link:before{content:"\e612";}.np-icon-eye:before{content:"\e60b";}.np-icon-eye-blocked:before{content:"\e60c";}.np-icon-mail:before{content:"\e60e";}.np-icon-github:before{content:"\e60f";}.np-icon-wordpress:before{content:"\e610";}.np-icon-linkedin:before{content:"\e611";}.np-btn,.np-toggle-edit{text-decoration:none;color:#555;display:inline-block;background-color:#f7f7f7;border:1px solid #e1e1e1;padding:3px 8px;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0, 0, 0, 0.08);-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.np-btn:hover,.np-toggle-edit:hover{background-color:#0074a2;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25),0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25),0 1px 0 rgba(0, 0, 0, 0.08);border-color:#0074a2;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.np-btn-trash{background-color:#e14d43;border-color:#e14d43;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3),0 1px 0 rgba(0, 0, 0, 0.08);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3),0 1px 0 rgba(0, 0, 0, 0.08);color:#ffffff;}.np-btn-trash:hover{background-color:#ba251e;border-color:#ba251e;}.np-toggle-edit{display:none;float:right;margin-right:10px;}.np-toggle-edit.active{background-color:#0074a2;color:#ffffff;-webkit-box-shadow:none;box-shadow:none;border-color:#0074a2;}@media (max-width: 767px){.np-toggle-edit{display:inline-block;}}.np-quickedit-error{border-left:4px solid #dd3d36;padding:4px 0 4px 8px;margin-bottom:10px;background-color:#f9f9f9;}.modal-open{overflow:hidden;}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:99999;-webkit-overflow-scrolling:touch;outline:0;}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform 0.3s ease-out;-o-transition:-o-transform 0.3s ease-out;transition:transform 0.3s ease-out;}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0);}.modal-open .modal{overflow-x:hidden;overflow-y:auto;}.modal-dialog{position:relative;width:auto;margin:10px auto 0px auto;max-width:500px;}.modal-content{position:relative;background-color:#ffffff;-webkit-box-shadow:0 3px 9px rgba(0, 0, 0, 0.5);box-shadow:0 3px 9px rgba(0, 0, 0, 0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0;}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:0.85;}.modal-header{padding:8px;background-color:#ebebeb;}.modal-header .sr-only{display:none;}.modal-header .close{margin-top:-2px;}.modal-title{margin:0;}.modal-body{position:relative;padding:10px;}.modal-footer{padding:10px;text-align:right;background-color:#404040;zoom:1;}.modal-footer:before,.modal-footer:after{content:" ";display:table;}.modal-footer:after{clear:both;}.modal-footer .modal-close{float:left;}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll;}.nestedpages-toggleall{float:right;margin-top:-30px;}.np-toggle-publish{color:#999999;}.np-toggle-publish.active{color:#333;font-weight:bold;}.np-sync-menu-cont{float:right;margin:-27px 15px 0px 0px;}#nested-loading{display:none;float:right;width:30px;margin:-31px 120px 0 0;}.wppages-top-tools{margin-bottom:20px;padding-top:10px;}.wppages-top-tools a{text-decoration:none;}.wppages-handle-expand{float:left;background-color:#f2f2f2;font-size:18px;width:46px;height:46px;margin-right:5px;text-align:center;border-right:1px solid #e1e1e1;}.wppages-handle-expand div{background-color:#ffffff;border:1px solid #e1e1e1;width:24px;height:24px;line-height:24px;-webkit-border-radius:15px;border-radius:15px;margin-top:9px;cursor:pointer;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.wppages-handle-expand div:hover{background-color:#0074a2;border-color:#0074a2;color:#ffffff;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages{clear:both;-webkit-border-radius:4px;border-radius:4px;}.nestedpages .ui-sortable-placeholder{display:block !important;position:relative;min-height:46px;border:0;border:1px dashed #0074a2 !important;background-color:#effaff;margin:0;}.nestedpages .ui-sortable-helper{opacity:0.8;-webkit-box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.5);box-shadow:2px 2px 3px 0px rgba(0, 0, 0, 0.5);}.nestedpages ol{list-style-type:none;clear:both;margin:0;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.06);box-shadow:0 1px 1px rgba(0, 0, 0, 0.06);border:1px solid #e5e5e5;-webkit-border-radius:3px;border-radius:3px;}.nestedpages ol a{text-decoration:none;}.nestedpages ol .page-link{line-height:26px;}.nestedpages ol .page-link .edit-indicator{margin-left:10px;display:none;}.nestedpages ol .page-link .edit-indicator i{font-size:12px;margin-right:3px;}.nestedpages ol .page-link:hover .edit-indicator{display:inline-block;}.nestedpages ol .locked{color:#333;margin-left:20px;}.nestedpages ol .locked em{font-style:normal;}.nestedpages ol .status{color:#999999;margin:0px 10px;}.nestedpages ol .np-icon-eye-blocked{color:#999999;}.nestedpages ol .nav-status{color:#b3b3b3;}.nestedpages ol .np-hide{display:none;}.nestedpages ol .np-seo-indicator{display:block;float:right;width:12px;height:12px;-webkit-border-radius:8px;border-radius:8px;background-color:#999999;margin:6px 10px 0 0;}.nestedpages ol .np-seo-indicator.good{background-color:#7ad03a;}.nestedpages ol .np-seo-indicator.ok{background-color:#ffba00;}.nestedpages ol .np-seo-indicator.poor{background-color:#ee7c1b;}.nestedpages ol .np-seo-indicator.bad{background-color:#dd3d36;}.nestedpages ol .np-seo-indicator.warn{background-color:maroon;}.nestedpages ol .np-seo-indicator.wrong{background-color:red;}.nestedpages ol li{margin:0;border-top:1px solid #e1e1e1;background-color:#0074a2;}.nestedpages ol li.first{border:0;}.nestedpages ol li:first-child{border:0;}.nestedpages ol li.no-border{border:0;}.nestedpages ol ol{display:none;-webkit-border-radius:0;border-radius:0;list-style-type:none;border:0;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid #e1e1e1;}.nestedpages .child-toggle{float:left;margin:-10px 10px 0 0;width:46px;height:46px;background-color:#f0f0f0;text-align:center;}.nestedpages .child-toggle a{display:inline-block;margin-top:7px;width:28px;height:28px;background-color:#ffffff;border:1px solid #e1e1e1;-webkit-border-radius:20px;border-radius:20px;font-size:20px;line-height:30px;color:#333;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;}.nestedpages .child-toggle a i{line-height:26px;}.nestedpages .child-toggle a:hover{background-color:#0074a2;color:#ffffff;border-color:#0074a2;}.nestedpages .handle{display:inline-block;cursor:move;font-size:20px;color:#b3b3b3;-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;position:relative;top:3px;}.nestedpages .handle:hover{-webkit-transition:all 200ms ease;-o-transition:all 200ms ease;transition:all 200ms ease;color:#0074a2;}.nestedpages .np-icon-sub-menu{display:none;color:#999999;position:relative;left:2px;}.nestedpages .handle,.nestedpages .np-icon-sub-menu{width:30px;height:46px;line-height:36px;margin-top:-10px;}.nestedpages li ol .row .np-icon-sub-menu{display:inline-block;}.nestedpages li ol .row .handle{display:none;}.nestedpages li ol .row:hover .np-icon-sub-menu{display:none;}.nestedpages li ol .row:hover .handle{display:inline-block;}.nestedpages .row{background-color:#ffffff;display:block;padding:10px 0px 0px 0px;height:36px;zoom:1;}.nestedpages .row:before,.nestedpages .row:after{content:" ";display:table;}.nestedpages .row:after{clear:both;}.nestedpages .row:hover{background-color:#f0f0f0;}.nestedpages .row.np-updated{background-color:#e9f7df;-webkit-transition:background-color 400ms ease;-o-transition:background-color 400ms ease;transition:background-color 400ms ease;}.nestedpages .row.np-updated-show{background-color:#ffffff;-webkit-transition:background-color 400ms ease;-o-transition:background-color 400ms ease;transition:background-color 400ms ease;}.nestedpages ol li ol .row-inner{padding-left:86px;}.nestedpages ol li ol li ol .row-inner{padding-left:116px;}.nestedpages ol li ol li ol li ol .row-inner{padding-left:156px;}.nestedpages .action-buttons{display:none;float:right;margin:0 10px 0 0;}.nestedpages .action-buttons a{margin:0 0 0 -5px;}.nestedpages .action-buttons a.np-btn-trash{margin-left:4px;}@media (min-width: 768px){.nestedpages .row:hover .action-buttons{display:block;}}@media (max-width: 767px){.nestedpages ol .page-link{line-height:24px;}.nestedpages ol .page-link:hover span{display:none;}.nestedpages ol .locked em{display:none;}.nestedpages .child-toggle{background:transparent;}.nestedpages .row{height:auto;}.nestedpages .action-buttons{display:none;background-color:#0074a2;float:none;margin:0;padding:8px;}.nestedpages .action-buttons a{margin-left:5px;}}.nestedpages .quick-edit{background-color:#ffffff;-webkit-border-radius:0;border-radius:0;}.nestedpages .quick-edit .form-interior{padding:10px;}.nestedpages .quick-edit h3{margin:0 0 8px 0;font-size:14px;}.nestedpages .quick-edit .fields{margin-bottom:10px;background:url('../images/border.png') repeat-y;background-position:center;zoom:1;}.nestedpages .quick-edit .fields:before,.nestedpages .quick-edit .fields:after{content:" ";display:table;}.nestedpages .quick-edit .fields:after{clear:both;}.nestedpages .quick-edit .left{float:left;width:48%;}.nestedpages .quick-edit .right{float:right;width:48%;}.nestedpages .quick-edit label{font-style:oblique;}.nestedpages .quick-edit .buttons{clear:both;zoom:1;background-color:#404040;padding:8px;}.nestedpages .quick-edit .buttons:before,.nestedpages .quick-edit .buttons:after{content:" ";display:table;}.nestedpages .quick-edit .buttons:after{clear:both;}.nestedpages .quick-edit .form-control{clear:both;zoom:1;margin-bottom:5px;}.nestedpages .quick-edit .form-control:before,.nestedpages .quick-edit .form-control:after{content:" ";display:table;}.nestedpages .quick-edit .form-control:after{clear:both;}.nestedpages .quick-edit .form-control input[type='text'],.nestedpages .quick-edit .form-control input[type='password'],.nestedpages .quick-edit .form-control select{float:right;width:75%;}.nestedpages .quick-edit .form-control label{float:left;width:20%;}.nestedpages .quick-edit .comments{float:right;width:75%;margin-bottom:10px;zoom:1;}.nestedpages .quick-edit .comments:before,.nestedpages .quick-edit .comments:after{content:" ";display:table;}.nestedpages .quick-edit .comments:after{clear:both;}.nestedpages .quick-edit .dates{float:right;width:75%;margin-bottom:6px;}.nestedpages .quick-edit .dates select{width:25%;}.nestedpages .quick-edit .dates input{width:12%;}.nestedpages .quick-edit .np-toggle-taxonomies,.nestedpages .quick-edit .np-toggle-menuoptions{clear:both;float:right;width:71%;text-align:center;}.nestedpages .quick-edit .np-taxonomies,.nestedpages .quick-edit .np-menuoptions{display:none;clear:both;background-color:#f9f9f9;padding:8px;zoom:1;margin-top:5px;}.nestedpages .quick-edit .np-taxonomies:before,.nestedpages .quick-edit .np-taxonomies:after,.nestedpages .quick-edit .np-menuoptions:before,.nestedpages .quick-edit .np-menuoptions:after{content:" ";display:table;}.nestedpages .quick-edit .np-taxonomies:after,.nestedpages .quick-edit .np-menuoptions:after{clear:both;}.nestedpages .quick-edit .np-taxonomy{float:left;width:30%;margin-right:3.33%;}.nestedpages .quick-edit .np-taxonomy .title{font-weight:bold;margin-bottom:4px;display:block;}.nestedpages .quick-edit .np-taxonomy li{background-color:#ffffff;border:0;}.nestedpages .quick-edit .np-menuoptions{padding:15px;}.nestedpages .quick-edit .np-menuoptions label,.nestedpages .quick-edit .np-menuoptions input[type="text"]{display:block;float:none;width:100%;}.nestedpages .quick-edit .np-menuoptions .menuoptions-left{float:left;width:47%;}.nestedpages .quick-edit .np-menuoptions .menuoptions-right{float:right;width:47%;padding-top:18px;}.nestedpages .quick-edit .np-menuoptions .menuoptions-right label{margin-bottom:10px;}.np-qe-loading{display:none;float:right;width:25px;height:25px;margin:2px 10px 0 0;background:url('../images/loading-white.gif') no-repeat;}@media (max-width: 767px){.nestedpages .quick-edit .fields{background:transparent;}.nestedpages .quick-edit .left,.nestedpages .quick-edit .right{float:none;width:100%;}.nestedpages .quick-edit .form-control{margin-bottom:10px;}.nestedpages .quick-edit .form-control input[type='text'],.nestedpages .quick-edit .form-control input[type='password'],.nestedpages .quick-edit .form-control select{float:none;width:100%;}.nestedpages .quick-edit .form-control label{display:block;float:none;width:100%;margin-bottom:4px;}.nestedpages .quick-edit .comments{float:none;width:100%;}.nestedpages .quick-edit .dates{float:none;width:100%;margin-bottom:6px;}}.np-modal-form .form-interior{zoom:1;background:url('../images/border.png') repeat-y;background-position:center;padding:5px 0;}.np-modal-form .form-interior:before,.np-modal-form .form-interior:after{content:" ";display:table;}.np-modal-form .form-interior:after{clear:both;}.np-modal-form .form-control{zoom:1;margin-bottom:10px;}.np-modal-form .form-control:before,.np-modal-form .form-control:after{content:" ";display:table;}.np-modal-form .form-control:after{clear:both;}.np-modal-form .checkbox{margin-bottom:10px;}.np-modal-form .left{float:left;width:45%;}.np-modal-form .right{float:right;width:45%;padding-top:18px;}.np-modal-form label{display:block;}.np-modal-form input[type="text"],.np-modal-form select{width:100%;}.np-modal-form .buttons{clear:both;}
|
assets/js/lib/nestedpages.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
*
|
3 |
* @author Kyle Phillips
|
4 |
*/
|
5 |
jQuery(function($){
|
@@ -28,6 +28,7 @@ jQuery(function($){
|
|
28 |
$(this).find('i').toggleClass('np-icon-arrow-down').toggleClass('np-icon-arrow-right');
|
29 |
$(submenu).toggle();
|
30 |
np_set_borders();
|
|
|
31 |
});
|
32 |
|
33 |
/**
|
@@ -52,6 +53,7 @@ jQuery(function($){
|
|
52 |
revert_quick_edit();
|
53 |
np_set_borders();
|
54 |
}
|
|
|
55 |
});
|
56 |
|
57 |
/**
|
@@ -62,12 +64,12 @@ jQuery(function($){
|
|
62 |
var action = $(this).attr('href');
|
63 |
if ( action === 'show' ){
|
64 |
$(this).attr('href', 'hide');
|
65 |
-
$(this).text(
|
66 |
$('.np-hide').removeClass('shown').hide();
|
67 |
np_set_borders();
|
68 |
} else {
|
69 |
$(this).attr('href', 'show');
|
70 |
-
$(this).text(
|
71 |
$('.np-hide').addClass('shown').show();
|
72 |
np_set_borders();
|
73 |
}
|
@@ -244,9 +246,20 @@ jQuery(function($){
|
|
244 |
|
245 |
/**
|
246 |
* ------------------------------------------------------------------------
|
247 |
-
* Sync Menu
|
248 |
* ------------------------------------------------------------------------
|
249 |
**/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
$('.np-sync-menu').on('change', function(){
|
251 |
var setting = ( $(this).is(':checked') ) ? 'sync' : 'nosync';
|
252 |
np_updated_sync_menu(setting);
|
@@ -278,7 +291,7 @@ jQuery(function($){
|
|
278 |
|
279 |
/**
|
280 |
* ------------------------------------------------------------------------
|
281 |
-
* Quick Edit
|
282 |
* ------------------------------------------------------------------------
|
283 |
**/
|
284 |
|
@@ -311,6 +324,11 @@ jQuery(function($){
|
|
311 |
$(this).parents('form').find('.np-taxonomies').toggle();
|
312 |
});
|
313 |
|
|
|
|
|
|
|
|
|
|
|
314 |
|
315 |
/**
|
316 |
* Set Quick Edit data
|
@@ -332,7 +350,10 @@ jQuery(function($){
|
|
332 |
minute : $(item).attr('data-minute'),
|
333 |
navstatus : $(item).attr('data-navstatus'),
|
334 |
npstatus : $(item).attr('data-np-status'),
|
335 |
-
navtitle : $(item).attr('data-navtitle')
|
|
|
|
|
|
|
336 |
};
|
337 |
var parent_li = $(item).closest('.row').parent('li');
|
338 |
|
@@ -370,6 +391,8 @@ jQuery(function($){
|
|
370 |
$(form).find('.np_template').val(data.template);
|
371 |
$(form).find('.np_status').val(data.status);
|
372 |
$(form).find('.np_nav_title').val(data.navtitle);
|
|
|
|
|
373 |
if ( data.cs === 'open' ) $(form).find('.np_cs').prop('checked', 'checked');
|
374 |
|
375 |
if ( data.npstatus === 'hide' ){
|
@@ -383,6 +406,12 @@ jQuery(function($){
|
|
383 |
} else {
|
384 |
$(form).find('.np_nav_status').removeAttr('checked');
|
385 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
|
387 |
// Date Fields
|
388 |
$(form).find('select[name="mm"]').val(data.month);
|
@@ -484,9 +513,13 @@ jQuery(function($){
|
|
484 |
$(button).attr('data-commentstatus', data.comment_status);
|
485 |
$(button).attr('data-status', data._status);
|
486 |
$(button).attr('data-author', data.post_author);
|
487 |
-
$(button).attr('data-navstatus', data.nav_status);
|
488 |
$(button).attr('data-np-status', data.np_status);
|
|
|
|
|
489 |
$(button).attr('data-navtitle', data.np_nav_title);
|
|
|
|
|
|
|
490 |
|
491 |
$(button).attr('data-month', data.mm);
|
492 |
$(button).attr('data-day', data.jj);
|
@@ -555,7 +588,7 @@ jQuery(function($){
|
|
555 |
*/
|
556 |
function np_remove_qe_loading(form)
|
557 |
{
|
558 |
-
$(form).find('.np-save-quickedit').removeAttr('disabled');
|
559 |
$(form).find('.np-qe-loading').hide();
|
560 |
}
|
561 |
|
@@ -575,4 +608,377 @@ jQuery(function($){
|
|
575 |
}
|
576 |
|
577 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
578 |
}); //$
|
1 |
/**
|
2 |
+
* Scripts Required by Nested Pages Plugin
|
3 |
* @author Kyle Phillips
|
4 |
*/
|
5 |
jQuery(function($){
|
28 |
$(this).find('i').toggleClass('np-icon-arrow-down').toggleClass('np-icon-arrow-right');
|
29 |
$(submenu).toggle();
|
30 |
np_set_borders();
|
31 |
+
np_sync_user_toggles();
|
32 |
});
|
33 |
|
34 |
/**
|
53 |
revert_quick_edit();
|
54 |
np_set_borders();
|
55 |
}
|
56 |
+
np_sync_user_toggles();
|
57 |
});
|
58 |
|
59 |
/**
|
64 |
var action = $(this).attr('href');
|
65 |
if ( action === 'show' ){
|
66 |
$(this).attr('href', 'hide');
|
67 |
+
$(this).text(nestedpages.show_hidden);
|
68 |
$('.np-hide').removeClass('shown').hide();
|
69 |
np_set_borders();
|
70 |
} else {
|
71 |
$(this).attr('href', 'show');
|
72 |
+
$(this).text(nestedpages.hide_hidden);
|
73 |
$('.np-hide').addClass('shown').show();
|
74 |
np_set_borders();
|
75 |
}
|
246 |
|
247 |
/**
|
248 |
* ------------------------------------------------------------------------
|
249 |
+
* Sync Menu
|
250 |
* ------------------------------------------------------------------------
|
251 |
**/
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Sync menu to catch any trash updates
|
255 |
+
*/
|
256 |
+
$(document).ready(function(){
|
257 |
+
if ( nestedpages.syncmenu === '1' ) np_updated_sync_menu('sync');
|
258 |
+
});
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Checkbox Toggle
|
262 |
+
*/
|
263 |
$('.np-sync-menu').on('change', function(){
|
264 |
var setting = ( $(this).is(':checked') ) ? 'sync' : 'nosync';
|
265 |
np_updated_sync_menu(setting);
|
291 |
|
292 |
/**
|
293 |
* ------------------------------------------------------------------------
|
294 |
+
* Quick Edit - Pages
|
295 |
* ------------------------------------------------------------------------
|
296 |
**/
|
297 |
|
324 |
$(this).parents('form').find('.np-taxonomies').toggle();
|
325 |
});
|
326 |
|
327 |
+
// Toggle the Menu Options
|
328 |
+
$(document).on('click', '.np-toggle-menuoptions', function(e){
|
329 |
+
$(this).parents('form').find('.np-menuoptions').toggle();
|
330 |
+
});
|
331 |
+
|
332 |
|
333 |
/**
|
334 |
* Set Quick Edit data
|
350 |
minute : $(item).attr('data-minute'),
|
351 |
navstatus : $(item).attr('data-navstatus'),
|
352 |
npstatus : $(item).attr('data-np-status'),
|
353 |
+
navtitle : $(item).attr('data-navtitle'),
|
354 |
+
navtitleattr : $(item).attr('data-navtitleattr'),
|
355 |
+
navcss : $(item).attr('data-navcss'),
|
356 |
+
linktarget : $(item).attr('data-linktarget')
|
357 |
};
|
358 |
var parent_li = $(item).closest('.row').parent('li');
|
359 |
|
391 |
$(form).find('.np_template').val(data.template);
|
392 |
$(form).find('.np_status').val(data.status);
|
393 |
$(form).find('.np_nav_title').val(data.navtitle);
|
394 |
+
$(form).find('.np_title_attribute').val(data.navtitleattr);
|
395 |
+
$(form).find('.np_nav_css_classes').val(data.navcss);
|
396 |
if ( data.cs === 'open' ) $(form).find('.np_cs').prop('checked', 'checked');
|
397 |
|
398 |
if ( data.npstatus === 'hide' ){
|
406 |
} else {
|
407 |
$(form).find('.np_nav_status').removeAttr('checked');
|
408 |
}
|
409 |
+
|
410 |
+
if ( data.linktarget === "_blank" ) {
|
411 |
+
$(form).find('.link_target').prop('checked', 'checked');
|
412 |
+
} else {
|
413 |
+
$(form).find('.link_target').removeAttr('checked');
|
414 |
+
}
|
415 |
|
416 |
// Date Fields
|
417 |
$(form).find('select[name="mm"]').val(data.month);
|
513 |
$(button).attr('data-commentstatus', data.comment_status);
|
514 |
$(button).attr('data-status', data._status);
|
515 |
$(button).attr('data-author', data.post_author);
|
|
|
516 |
$(button).attr('data-np-status', data.np_status);
|
517 |
+
|
518 |
+
$(button).attr('data-navstatus', data.nav_status);
|
519 |
$(button).attr('data-navtitle', data.np_nav_title);
|
520 |
+
$(button).attr('data-linktarget', data.link_target);
|
521 |
+
$(button).attr('data-navtitleattr', data.np_title_attribute);
|
522 |
+
$(button).attr('data-navcss', data.np_nav_css_classes);
|
523 |
|
524 |
$(button).attr('data-month', data.mm);
|
525 |
$(button).attr('data-day', data.jj);
|
588 |
*/
|
589 |
function np_remove_qe_loading(form)
|
590 |
{
|
591 |
+
$(form).find('.np-save-quickedit, .np-save-quickedit-redirect').removeAttr('disabled');
|
592 |
$(form).find('.np-qe-loading').hide();
|
593 |
}
|
594 |
|
608 |
}
|
609 |
|
610 |
|
611 |
+
|
612 |
+
|
613 |
+
|
614 |
+
/**
|
615 |
+
* ------------------------------------------------------------------------
|
616 |
+
* Quick Edit - Redirect
|
617 |
+
* ------------------------------------------------------------------------
|
618 |
+
**/
|
619 |
+
$(document).on('click', '.np-quick-edit-redirect', function(e){
|
620 |
+
e.preventDefault();
|
621 |
+
revert_quick_edit();
|
622 |
+
set_redirect_quick_edit_data($(this));
|
623 |
+
});
|
624 |
+
|
625 |
+
// Submit the form
|
626 |
+
$(document).on('click', '.np-save-quickedit-redirect', function(e){
|
627 |
+
e.preventDefault();
|
628 |
+
$('.row').removeClass('np-updated').removeClass('np-updated-show');
|
629 |
+
var form = $(this).parents('form');
|
630 |
+
$(this).attr('disabled', 'disabled');
|
631 |
+
$(form).find('.np-qe-loading').show();
|
632 |
+
submit_np_quickedit_redirect(form);
|
633 |
+
});
|
634 |
+
|
635 |
+
/**
|
636 |
+
* Set the Redirect Quick edit data & create form
|
637 |
+
*/
|
638 |
+
function set_redirect_quick_edit_data(item)
|
639 |
+
{
|
640 |
+
var data = {
|
641 |
+
id : $(item).attr('data-id'),
|
642 |
+
url : $(item).attr('data-url'),
|
643 |
+
title : $(item).attr('data-title'),
|
644 |
+
status : $(item).attr('data-status'),
|
645 |
+
navstatus : $(item).attr('data-navstatus'),
|
646 |
+
npstatus : $(item).attr('data-np-status'),
|
647 |
+
linktarget : $(item).attr('data-linktarget'),
|
648 |
+
parentid : $(item).attr('data-parentid'),
|
649 |
+
navtitleattr : $(item).attr('data-navtitleattr'),
|
650 |
+
navcss : $(item).attr('data-navcss')
|
651 |
+
};
|
652 |
+
var parent_li = $(item).closest('.row').parent('li');
|
653 |
+
|
654 |
+
// Append the form to the list item
|
655 |
+
if ( $(parent_li).children('ol').length > 0 ){
|
656 |
+
var child_ol = $(parent_li).children('ol');
|
657 |
+
var newform = $('.quick-edit-form-redirect').clone().insertBefore(child_ol);
|
658 |
+
} else {
|
659 |
+
var newform = $('.quick-edit-form-redirect').clone().appendTo(parent_li);
|
660 |
+
}
|
661 |
+
|
662 |
+
var row = $(newform).siblings('.row').hide();
|
663 |
+
$(newform).show();
|
664 |
+
|
665 |
+
populate_redirect_quick_edit(newform, data);
|
666 |
+
}
|
667 |
+
|
668 |
+
/**
|
669 |
+
* Populate the Quick Edit Form
|
670 |
+
*/
|
671 |
+
function populate_redirect_quick_edit(form, data)
|
672 |
+
{
|
673 |
+
$(form).find('.np_id').val(data.id);
|
674 |
+
$(form).find('.np_title').val(data.title);
|
675 |
+
$(form).find('.np_author select').val(data.author);
|
676 |
+
$(form).find('.np_status').val(data.status);
|
677 |
+
$(form).find('.np_content').val(data.url);
|
678 |
+
$(form).find('.np_parent_id').val(data.parentid);
|
679 |
+
$(form).find('.np_title_attribute').val(data.navtitleattr);
|
680 |
+
$(form).find('.np_nav_css_classes').val(data.navcss);
|
681 |
+
|
682 |
+
if ( data.npstatus === 'hide' ){
|
683 |
+
$(form).find('.np_status').prop('checked', 'checked');
|
684 |
+
} else {
|
685 |
+
$(form).find('.np_status').removeAttr('checked');
|
686 |
+
}
|
687 |
+
|
688 |
+
if ( data.navstatus === 'hide' ) {
|
689 |
+
$(form).find('.np_nav_status').prop('checked', 'checked');
|
690 |
+
} else {
|
691 |
+
$(form).find('.np_nav_status').removeAttr('checked');
|
692 |
+
}
|
693 |
+
|
694 |
+
if ( data.linktarget === "_blank" ) {
|
695 |
+
$(form).find('.link_target').prop('checked', 'checked');
|
696 |
+
} else {
|
697 |
+
$(form).find('.link_target').removeAttr('checked');
|
698 |
+
}
|
699 |
+
|
700 |
+
$(form).show();
|
701 |
+
}
|
702 |
+
|
703 |
+
|
704 |
+
/**
|
705 |
+
* Submit the Quick Edit Form for Redirects
|
706 |
+
*/
|
707 |
+
function submit_np_quickedit_redirect(form)
|
708 |
+
{
|
709 |
+
$('.np-quickedit-error').hide();
|
710 |
+
var syncmenu = ( $('.np-sync-menu').is(':checked') ) ? 'sync' : 'nosync';
|
711 |
+
$.ajax({
|
712 |
+
url: ajaxurl,
|
713 |
+
type: 'post',
|
714 |
+
datatype: 'json',
|
715 |
+
data: $(form).serialize() + '&action=npquickeditredirect&nonce=' + nestedpages.np_nonce + '&syncmenu=' + syncmenu,
|
716 |
+
success: function(data){
|
717 |
+
console.log(data);
|
718 |
+
if (data.status === 'error'){
|
719 |
+
np_remove_qe_loading(form);
|
720 |
+
$(form).find('.np-quickedit-error').text(data.message).show();
|
721 |
+
} else {
|
722 |
+
np_remove_qe_loading(form);
|
723 |
+
np_update_qe_redirect_data(form, data.post_data);
|
724 |
+
np_qe_update_animate(form);
|
725 |
+
}
|
726 |
+
},
|
727 |
+
error: function(){
|
728 |
+
np_remove_qe_loading(form);
|
729 |
+
$(form).find('.np-quickedit-error').text('The form could not be saved at this time.').show();
|
730 |
+
}
|
731 |
+
});
|
732 |
+
}
|
733 |
+
|
734 |
+
|
735 |
+
/**
|
736 |
+
* Update Row Data after Quick Edit (Redirect)
|
737 |
+
*/
|
738 |
+
function np_update_qe_redirect_data(form, data)
|
739 |
+
{
|
740 |
+
var row = $(form).parent('.quick-edit').siblings('.row');
|
741 |
+
$(row).find('.title').html(data.post_title + ' <i class="np-icon-link"></i>');
|
742 |
+
|
743 |
+
var status = $(row).find('.status');
|
744 |
+
if ( (data._status !== 'publish') && (data._status !== 'future') ){
|
745 |
+
$(status).text('(' + data._status + ')');
|
746 |
+
} else {
|
747 |
+
$(status).text('');
|
748 |
+
}
|
749 |
+
|
750 |
+
// Hide / Show in Nav
|
751 |
+
var nav_status = $(row).find('.nav-status');
|
752 |
+
if ( (data.nav_status == 'hide') ){
|
753 |
+
$(nav_status).text('(Hidden)');
|
754 |
+
} else {
|
755 |
+
$(nav_status).text('');
|
756 |
+
}
|
757 |
+
|
758 |
+
// Hide / Show in Nested Pages
|
759 |
+
var li = $(row).parent('li');
|
760 |
+
if ( (data.np_status == 'hide') ){
|
761 |
+
$(li).addClass('np-hide');
|
762 |
+
$(row).find('.status').after('<i class="np-icon-eye-blocked"></i>');
|
763 |
+
} else {
|
764 |
+
$(li).removeClass('np-hide');
|
765 |
+
$(row).find('.np-icon-eye-blocked').remove();
|
766 |
+
}
|
767 |
+
|
768 |
+
var button = $(row).find('.np-quick-edit-redirect');
|
769 |
+
|
770 |
+
$(button).attr('data-id', data.post_id);
|
771 |
+
$(button).attr('data-title', data.post_title);
|
772 |
+
$(button).attr('data-url', data.post_content);
|
773 |
+
$(button).attr('data-status', data._status);
|
774 |
+
$(button).attr('data-navstatus', data.nav_status);
|
775 |
+
$(button).attr('data-np-status', data.np_status);
|
776 |
+
$(button).attr('data-linktarget', data.link_target);
|
777 |
+
$(button).attr('data-navtitleattr', data.np_title_attribute);
|
778 |
+
$(button).attr('data-navcss', data.np_nav_css_classes);
|
779 |
+
}
|
780 |
+
|
781 |
+
|
782 |
+
|
783 |
+
|
784 |
+
|
785 |
+
/**
|
786 |
+
* ------------------------------------------------------------------------
|
787 |
+
* Add new Redirect link (modal)
|
788 |
+
* ------------------------------------------------------------------------
|
789 |
+
**/
|
790 |
+
$(document).on('click', '.open-redirect-modal', function(e){
|
791 |
+
e.preventDefault();
|
792 |
+
var parent_id = $(this).attr('data-parentid');
|
793 |
+
$('.np-modal-form').find('input').val('');
|
794 |
+
$('.np-modal-form').find('.parent_id').val(parent_id);
|
795 |
+
if (parent_id === '0'){
|
796 |
+
$('#np-add-link-title').text(nestedpages.add_link);
|
797 |
+
} else {
|
798 |
+
$('#np-add-link-title').text(nestedpages.add_child_link);
|
799 |
+
}
|
800 |
+
$('#np-link-modal').modal('show');
|
801 |
+
});
|
802 |
+
|
803 |
+
$(document).on('click', '.np-save-link', function(e){
|
804 |
+
e.preventDefault();
|
805 |
+
$('.np-new-link-error').hide();
|
806 |
+
$('.np-link-loading').show();
|
807 |
+
$(this).attr('disabled', 'disabled');
|
808 |
+
np_save_new_link();
|
809 |
+
});
|
810 |
+
|
811 |
+
/**
|
812 |
+
* Remove loading state from link form
|
813 |
+
*/
|
814 |
+
function np_remove_link_loading()
|
815 |
+
{
|
816 |
+
$('.np-link-loading').hide();
|
817 |
+
$('.np-save-link').removeAttr('disabled');
|
818 |
+
}
|
819 |
+
|
820 |
+
/**
|
821 |
+
* Set new link data
|
822 |
+
*/
|
823 |
+
function np_save_new_link()
|
824 |
+
{
|
825 |
+
$('.np-new-link-error').hide();
|
826 |
+
var data = $('.np-new-link-form').serialize();
|
827 |
+
var syncmenu = ( $('.np-sync-menu').is(':checked') ) ? 'sync' : 'nosync';
|
828 |
+
|
829 |
+
$.ajax({
|
830 |
+
url: ajaxurl,
|
831 |
+
type: 'post',
|
832 |
+
datatype: 'json',
|
833 |
+
data: data + '&action=npnewredirect&nonce=' + nestedpages.np_nonce + '&syncmenu=' + syncmenu,
|
834 |
+
success: function(data){
|
835 |
+
console.log(data);
|
836 |
+
if (data.status === 'error'){
|
837 |
+
np_remove_link_loading();
|
838 |
+
$('.np-new-link-error').text(data.message).show();
|
839 |
+
} else {
|
840 |
+
np_remove_link_loading();
|
841 |
+
np_create_redirect_row(data.post_data);
|
842 |
+
}
|
843 |
+
}
|
844 |
+
});
|
845 |
+
}
|
846 |
+
|
847 |
+
/**
|
848 |
+
* Create the new row and append where needed
|
849 |
+
*/
|
850 |
+
function np_create_redirect_row(data)
|
851 |
+
{
|
852 |
+
var html = '<li id="menuItem_' + data.id + '" class="page-row';
|
853 |
+
if ( data._status === 'publish' ){
|
854 |
+
html += ' published';
|
855 |
+
}
|
856 |
+
html += '">'
|
857 |
+
|
858 |
+
html += '<div class="row"><div class="child-toggle"></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="' + data.np_link_content + '" class="page-link page-title" target="_blank"><span class="title">' + data.np_link_title + ' <i class="np-icon-link"></i></span>';
|
859 |
+
|
860 |
+
// Post Status
|
861 |
+
if ( data._status !== 'publish' ){
|
862 |
+
html += '<span class="status">' + data._status + '</span>';
|
863 |
+
} else {
|
864 |
+
html += '<span class="status"></span>';
|
865 |
+
}
|
866 |
+
|
867 |
+
// Nested Pages Status
|
868 |
+
if ( data.np_status === "hide" ){
|
869 |
+
html += '<i class="np-icon-eye-blocked"></i>';
|
870 |
+
}
|
871 |
+
|
872 |
+
// Nav Menu Status
|
873 |
+
if ( data.nav_status === "hide" ){
|
874 |
+
html += '<span class="nav-status">(Hidden)</span>';
|
875 |
+
} else {
|
876 |
+
html += '<span class="nav-status"></span>';
|
877 |
+
}
|
878 |
+
|
879 |
+
// Quick Edit Button
|
880 |
+
html += '</a><a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ';
|
881 |
+
html += 'data-id="' + data.id + '"';
|
882 |
+
html += 'data-parentid="' + data.parent_id + '"';
|
883 |
+
html += 'data-title="' + data.np_link_title + '" ';
|
884 |
+
html += 'data-url="' + data.np_link_content + '" ';
|
885 |
+
html += 'data-status="' + data._status + '" ';
|
886 |
+
html += 'data-np-status="' + data.np_status + '" ';
|
887 |
+
html += 'data-navstatus="' + data.nav_status + '" ';
|
888 |
+
html += 'data-linktarget="' + data.link_target + '">'
|
889 |
+
html += 'Quick Edit</a>';
|
890 |
+
html += '</div></div></div></li>';
|
891 |
+
|
892 |
+
if ( data.parent_id === "0" ){
|
893 |
+
$('.nplist:first li:first').after(html);
|
894 |
+
} else {
|
895 |
+
np_append_child_link(html, data);
|
896 |
+
}
|
897 |
+
|
898 |
+
$('#np-link-modal').modal('hide');
|
899 |
+
|
900 |
+
var row = $('#menuItem_' + data.id).find('.row');
|
901 |
+
np_qe_update_redirect_animate(row);
|
902 |
+
}
|
903 |
+
|
904 |
+
|
905 |
+
/**
|
906 |
+
* Append a child link
|
907 |
+
*/
|
908 |
+
function np_append_child_link(html, data)
|
909 |
+
{
|
910 |
+
var parent_row = $('#menuItem_' + data.parent_id);
|
911 |
+
if ( $(parent_row).children('ol').length === 0 ){
|
912 |
+
html = '<ol class="sortable nplist" style="display:block;">' + html + '</ol>';
|
913 |
+
$(parent_row).append(html);
|
914 |
+
} else {
|
915 |
+
$(parent_row).find('ol:first').prepend(html);
|
916 |
+
}
|
917 |
+
add_remove_submenu_toggles();
|
918 |
+
np_sync_user_toggles();
|
919 |
+
}
|
920 |
+
|
921 |
+
|
922 |
+
/**
|
923 |
+
* Show quick edit update animation after adding redirect
|
924 |
+
*/
|
925 |
+
function np_qe_update_redirect_animate(row)
|
926 |
+
{
|
927 |
+
$(row).addClass('np-updated');
|
928 |
+
np_set_borders();
|
929 |
+
setTimeout(function(){
|
930 |
+
$(row).addClass('np-updated-show');
|
931 |
+
}, 1500);
|
932 |
+
}
|
933 |
+
|
934 |
+
|
935 |
+
|
936 |
+
|
937 |
+
|
938 |
+
/**
|
939 |
+
* ------------------------------------------------------------------------
|
940 |
+
* Sync User's Toggled Pages
|
941 |
+
* ------------------------------------------------------------------------
|
942 |
+
**/
|
943 |
+
|
944 |
+
/**
|
945 |
+
* Get an array of visible pages' ids
|
946 |
+
* @return array
|
947 |
+
*/
|
948 |
+
function np_get_visible_rows()
|
949 |
+
{
|
950 |
+
var visible_ids = [];
|
951 |
+
var visible = $('.page-row:visible');
|
952 |
+
$.each(visible, function(i, v){
|
953 |
+
var id = $(this).attr('id');
|
954 |
+
visible_ids.push(id.replace("menuItem_", ""));
|
955 |
+
});
|
956 |
+
return visible_ids;
|
957 |
+
}
|
958 |
+
|
959 |
+
/**
|
960 |
+
* Sync the user's stored toggle status
|
961 |
+
*/
|
962 |
+
function np_sync_user_toggles()
|
963 |
+
{
|
964 |
+
var ids = np_get_visible_rows();
|
965 |
+
$.ajax({
|
966 |
+
url: ajaxurl,
|
967 |
+
type: 'post',
|
968 |
+
datatype: 'json',
|
969 |
+
data: {
|
970 |
+
action : 'npnesttoggle',
|
971 |
+
nonce : nestedpages.np_nonce,
|
972 |
+
ids : ids
|
973 |
+
},
|
974 |
+
success: function(data){
|
975 |
+
if ( data.status !== 'success' ){
|
976 |
+
console.log('There was an error saving toggled pages.');
|
977 |
+
}
|
978 |
+
}
|
979 |
+
});
|
980 |
+
}
|
981 |
+
|
982 |
+
|
983 |
+
|
984 |
}); //$
|
assets/js/nestedpages.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(t){function e(){var e=t(".nplist");t(".page-row").removeClass("no-border"),t.each(e,function(){t(this).find(".page-row:visible:first").addClass("no-border")})}function a(e){var a=t(e.placeholder).parents("ol").length,i=t(".sortable").width(),s=40*a-40,o=i-s;t(e.placeholder).width(o).css("margin-left",s+"px"),n(e)}function n(e){var a=t(e.placeholder).parent("ol");t(a).is(":visible")||t(a).show()}function s(){t(".child-toggle").each(function(){var e=t(this).parent(".row").parent("li");if(t(e).children("ol").length>0){var a=t(e).children("ol:visible").length>0?"np-icon-arrow-down":"np-icon-arrow-right";t(this).html('<a href="#"><i class="'+a+'"></i></a>')}else t(this).empty()})}function o(){t("#np-error").hide(),t("#nested-loading").show();var e=t(".np-sync-menu").is(":checked")?"sync":"nosync";list=t("ol.sortable").nestedSortable("toHierarchy",{startDepthCount:0}),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npsort",nonce:nestedpages.np_nonce,list:list,syncmenu:e},success:function(e){"error"===e.status?(t("#np-error").text(e.message).show(),t("#nested-loading").hide()):t("#nested-loading").hide()}})}function r(e){t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npsyncmenu",nonce:nestedpages.np_nonce,syncmenu:e},success:function(t){"error"===t.status&&alert("There was an error saving the sync setting.")}})}function d(e){var a={id:t(e).attr("data-id"),title:t(e).attr("data-title"),slug:t(e).attr("data-slug"),author:t(e).attr("data-author"),cs:t(e).attr("data-commentstatus"),status:t(e).attr("data-status"),template:t(e).attr("data-template"),month:t(e).attr("data-month"),day:t(e).attr("data-day"),year:t(e).attr("data-year"),hour:t(e).attr("data-hour"),minute:t(e).attr("data-minute"),navstatus:t(e).attr("data-navstatus"),npstatus:t(e).attr("data-np-status"),navtitle:t(e).attr("data-navtitle")},n=t(e).closest(".row").parent("li");a.taxonomies=[];var s=t(n).attr("class").split(/\s+/);for(i=0;i<s.length;i++)"in-"===s[i].substring(0,3)&&a.taxonomies.push(s[i]);if(t(n).children("ol").length>0)var o=t(n).children("ol"),r=t(".quick-edit-form").clone().insertBefore(o);else var r=t(".quick-edit-form").clone().appendTo(n);t(r).siblings(".row").hide();l(r,a)}function l(e,a){if(t(e).find(".np_id").val(a.id),t(e).find(".np_title").val(a.title),t(e).find(".np_slug").val(a.slug),t(e).find(".np_author select").val(a.author),t(e).find(".np_template").val(a.template),t(e).find(".np_status").val(a.status),t(e).find(".np_nav_title").val(a.navtitle),"open"===a.cs&&t(e).find(".np_cs").prop("checked","checked"),"hide"===a.npstatus?t(e).find(".np_status").prop("checked","checked"):t(e).find(".np_status").removeAttr("checked"),"hide"===a.navstatus?t(e).find(".np_nav_status").prop("checked","checked"):t(e).find(".np_nav_status").removeAttr("checked"),t(e).find('select[name="mm"]').val(a.month),t(e).find('input[name="jj"]').val(a.day),t(e).find('input[name="aa"]').val(a.year),t(e).find('input[name="hh"]').val(a.hour),t(e).find('input[name="mn"]').val(a.minute),a.hasOwnProperty("taxonomies")){var n=a.taxonomies;for(i=0;i<n.length;i++){var s="#"+n[i];t(e).find(s).prop("checked","checked")}}t(e).show()}function c(){t(".np-quickedit-error").hide(),t(".sortable .quick-edit").remove(),t(".row").show()}function u(e){t(".np-quickedit-error").hide();var a=t(".np-sync-menu").is(":checked")?"sync":"nosync";t.ajax({url:ajaxurl,type:"post",datatype:"json",data:t(e).serialize()+"&action=npquickedit&nonce="+nestedpages.np_nonce+"&syncmenu="+a,success:function(a){"error"===a.status?(g(e),t(e).find(".np-quickedit-error").text(a.message).show()):(g(e),p(e,a.post_data),m(e))}})}function p(e,a){var n=t(e).parent(".quick-edit").siblings(".row");t(n).find(".title").text(a.post_title);var i=t(n).find(".status");t(i).text("publish"!==a._status&&"future"!==a._status?"("+a._status+")":"");var s=t(n).find(".nav-status");t(s).text("hide"==a.nav_status?"(Hidden)":"");var o=t(n).parent("li");"hide"==a.np_status?(t(o).addClass("np-hide"),t(n).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(o).removeClass("np-hide"),t(n).find(".np-icon-eye-blocked").remove());var r=t(n).find(".np-quick-edit");t(r).attr("data-id",a.post_id),t(r).attr("data-template",a.page_template),t(r).attr("data-title",a.post_title),t(r).attr("data-slug",a.post_name),t(r).attr("data-commentstatus",a.comment_status),t(r).attr("data-status",a._status),t(r).attr("data-author",a.post_author),t(r).attr("data-navstatus",a.nav_status),t(r).attr("data-np-status",a.np_status),t(r).attr("data-navtitle",a.np_nav_title),t(r).attr("data-month",a.mm),t(r).attr("data-day",a.jj),t(r).attr("data-year",a.aa),t(r).attr("data-hour",a.hh),t(r).attr("data-minute",a.mn),h(o),f(o,a),v(o,a)}function h(e){taxonomies=[];var a=t(e).attr("class").split(/\s+/);for(i=0;i<a.length;i++)"in-"===a[i].substring(0,3)&&t(e).removeClass(a[i])}function f(e,a){if(a.hasOwnProperty("post_category")){var n=a.post_category;for(i=0;i<n.length;i++){var s="in-category-"+n[i];t(e).addClass(s)}}}function v(e,a){if(a.hasOwnProperty("tax_input")){var n=a.tax_input;t.each(n,function(a,n){for(i=0;i<n.length;i++){var s="in-"+a+"-"+n[i];t(e).addClass(s)}})}}function g(e){t(e).find(".np-save-quickedit").removeAttr("disabled"),t(e).find(".np-qe-loading").hide()}function m(a){var n=t(a).parent(".quick-edit").siblings(".row");t(n).addClass("np-updated"),t(n).show(),t(a).parent(".quick-edit").remove(),e(),setTimeout(function(){t(n).addClass("np-updated-show")},1500)}t(document).ready(function(){s(),e()}),t(document).on("click",".child-toggle a",function(a){a.preventDefault();var n=t(this).parent(".child-toggle").parent(".row").siblings("ol");t(this).find("i").toggleClass("np-icon-arrow-down").toggleClass("np-icon-arrow-right"),t(n).toggle(),e()}),t(document).on("click",".nestedpages-toggleall a",function(a){a.preventDefault(),"closed"==t(this).attr("data-toggle")?(t(".nestedpages ol li ol").show(),t(this).attr("data-toggle","opened"),t(this).text(nestedpages.collapse_text),t(".child-toggle i").removeClass("np-icon-arrow-right").addClass("np-icon-arrow-down"),c(),e()):(t(".nestedpages ol li ol").hide(),t(this).attr("data-toggle","closed"),t(this).text(nestedpages.expand_text),t(".child-toggle i").removeClass("np-icon-arrow-down").addClass("np-icon-arrow-right"),c(),e())}),t(document).on("click",".np-toggle-hidden",function(a){a.preventDefault();var n=t(this).attr("href");"show"===n?(t(this).attr("href","hide"),t(this).text("Show Hidden Pages"),t(".np-hide").removeClass("shown").hide(),e()):(t(this).attr("href","show"),t(this).text("Hide Hidden Pages"),t(".np-hide").addClass("shown").show(),e())}),t(document).on("click",".np-toggle-publish",function(e){e.preventDefault();var a=t(this).attr("href");t(".np-toggle-publish").removeClass("active"),t(this).addClass("active"),"#published"==a?(t(".nplist .page-row").hide(),t(".nplist .published").show()):t(".nplist .page-row").show()}),t(document).on("click",".np-toggle-edit",function(e){e.preventDefault();var a=t(this).siblings(".action-buttons");t(a).is(":visible")?(t(this).removeClass("active"),t(a).hide()):(t(this).addClass("active"),t(a).show())});var w=function(){var t=0;return function(e,a){clearTimeout(t),t=setTimeout(e,a)}}();t(window).resize(function(){w(function(){t(".action-buttons").removeAttr("style"),t(".np-toggle-edit").removeClass("active")},500)}),t(document).ready(function(){t(".sortable").not(".no-sort").nestedSortable({items:"li",toleranceElement:"> .row",handle:".handle",placeholder:"ui-sortable-placeholder",start:function(t,e){e.placeholder.height(e.item.height())},sort:function(t,e){a(e)},stop:function(){setTimeout(function(){s(),e()},100),o()},update:function(){}})}),t(".np-sync-menu").on("change",function(){var e=t(this).is(":checked")?"sync":"nosync";r(e)}),t(document).on("click",".np-quick-edit",function(e){e.preventDefault(),c(),d(t(this))}),t(document).on("click",".np-cancel-quickedit",function(e){var a=t(this).parents(".page-row");c(a),e.preventDefault()}),t(document).on("click",".np-save-quickedit",function(e){e.preventDefault(),t(".row").removeClass("np-updated").removeClass("np-updated-show");var a=t(this).parents("form");t(this).attr("disabled","disabled"),t(a).find(".np-qe-loading").show(),u(a)}),t(document).on("click",".np-toggle-taxonomies",function(){t(this).parents("form").find(".np-taxonomies").toggle()})});
|
1 |
+
jQuery(function(t){function a(){var a=t(".nplist");t(".page-row").removeClass("no-border"),t.each(a,function(){t(this).find(".page-row:visible:first").addClass("no-border")})}function e(a){var e=t(a.placeholder).parents("ol").length,s=t(".sortable").width(),i=40*e-40,r=s-i;t(a.placeholder).width(r).css("margin-left",i+"px"),n(a)}function n(a){var e=t(a.placeholder).parent("ol");t(e).is(":visible")||t(e).show()}function s(){t(".child-toggle").each(function(){var a=t(this).parent(".row").parent("li");if(t(a).children("ol").length>0){var e=t(a).children("ol:visible").length>0?"np-icon-arrow-down":"np-icon-arrow-right";t(this).html('<a href="#"><i class="'+e+'"></i></a>')}else t(this).empty()})}function r(){t("#np-error").hide(),t("#nested-loading").show();var a=t(".np-sync-menu").is(":checked")?"sync":"nosync";list=t("ol.sortable").nestedSortable("toHierarchy",{startDepthCount:0}),t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npsort",nonce:nestedpages.np_nonce,list:list,syncmenu:a},success:function(a){"error"===a.status?(t("#np-error").text(a.message).show(),t("#nested-loading").hide()):t("#nested-loading").hide()}})}function o(a){t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npsyncmenu",nonce:nestedpages.np_nonce,syncmenu:a},success:function(t){"error"===t.status&&alert("There was an error saving the sync setting.")}})}function d(a){var e={id:t(a).attr("data-id"),title:t(a).attr("data-title"),slug:t(a).attr("data-slug"),author:t(a).attr("data-author"),cs:t(a).attr("data-commentstatus"),status:t(a).attr("data-status"),template:t(a).attr("data-template"),month:t(a).attr("data-month"),day:t(a).attr("data-day"),year:t(a).attr("data-year"),hour:t(a).attr("data-hour"),minute:t(a).attr("data-minute"),navstatus:t(a).attr("data-navstatus"),npstatus:t(a).attr("data-np-status"),navtitle:t(a).attr("data-navtitle"),navtitleattr:t(a).attr("data-navtitleattr"),navcss:t(a).attr("data-navcss"),linktarget:t(a).attr("data-linktarget")},n=t(a).closest(".row").parent("li");e.taxonomies=[];var s=t(n).attr("class").split(/\s+/);for(i=0;i<s.length;i++)"in-"===s[i].substring(0,3)&&e.taxonomies.push(s[i]);if(t(n).children("ol").length>0)var r=t(n).children("ol"),o=t(".quick-edit-form").clone().insertBefore(r);else var o=t(".quick-edit-form").clone().appendTo(n);t(o).siblings(".row").hide();l(o,e)}function l(a,e){if(t(a).find(".np_id").val(e.id),t(a).find(".np_title").val(e.title),t(a).find(".np_slug").val(e.slug),t(a).find(".np_author select").val(e.author),t(a).find(".np_template").val(e.template),t(a).find(".np_status").val(e.status),t(a).find(".np_nav_title").val(e.navtitle),t(a).find(".np_title_attribute").val(e.navtitleattr),t(a).find(".np_nav_css_classes").val(e.navcss),"open"===e.cs&&t(a).find(".np_cs").prop("checked","checked"),"hide"===e.npstatus?t(a).find(".np_status").prop("checked","checked"):t(a).find(".np_status").removeAttr("checked"),"hide"===e.navstatus?t(a).find(".np_nav_status").prop("checked","checked"):t(a).find(".np_nav_status").removeAttr("checked"),"_blank"===e.linktarget?t(a).find(".link_target").prop("checked","checked"):t(a).find(".link_target").removeAttr("checked"),t(a).find('select[name="mm"]').val(e.month),t(a).find('input[name="jj"]').val(e.day),t(a).find('input[name="aa"]').val(e.year),t(a).find('input[name="hh"]').val(e.hour),t(a).find('input[name="mn"]').val(e.minute),e.hasOwnProperty("taxonomies")){var n=e.taxonomies;for(i=0;i<n.length;i++){var s="#"+n[i];t(a).find(s).prop("checked","checked")}}t(a).show()}function c(){t(".np-quickedit-error").hide(),t(".sortable .quick-edit").remove(),t(".row").show()}function p(a){t(".np-quickedit-error").hide();var e=t(".np-sync-menu").is(":checked")?"sync":"nosync";t.ajax({url:ajaxurl,type:"post",datatype:"json",data:t(a).serialize()+"&action=npquickedit&nonce="+nestedpages.np_nonce+"&syncmenu="+e,success:function(e){"error"===e.status?(g(a),t(a).find(".np-quickedit-error").text(e.message).show()):(g(a),u(a,e.post_data),m(a))}})}function u(a,e){var n=t(a).parent(".quick-edit").siblings(".row");t(n).find(".title").text(e.post_title);var s=t(n).find(".status");t(s).text("publish"!==e._status&&"future"!==e._status?"("+e._status+")":"");var i=t(n).find(".nav-status");t(i).text("hide"==e.nav_status?"(Hidden)":"");var r=t(n).parent("li");"hide"==e.np_status?(t(r).addClass("np-hide"),t(n).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(r).removeClass("np-hide"),t(n).find(".np-icon-eye-blocked").remove());var o=t(n).find(".np-quick-edit");t(o).attr("data-id",e.post_id),t(o).attr("data-template",e.page_template),t(o).attr("data-title",e.post_title),t(o).attr("data-slug",e.post_name),t(o).attr("data-commentstatus",e.comment_status),t(o).attr("data-status",e._status),t(o).attr("data-author",e.post_author),t(o).attr("data-np-status",e.np_status),t(o).attr("data-navstatus",e.nav_status),t(o).attr("data-navtitle",e.np_nav_title),t(o).attr("data-linktarget",e.link_target),t(o).attr("data-navtitleattr",e.np_title_attribute),t(o).attr("data-navcss",e.np_nav_css_classes),t(o).attr("data-month",e.mm),t(o).attr("data-day",e.jj),t(o).attr("data-year",e.aa),t(o).attr("data-hour",e.hh),t(o).attr("data-minute",e.mn),h(r),v(r,e),f(r,e)}function h(a){taxonomies=[];var e=t(a).attr("class").split(/\s+/);for(i=0;i<e.length;i++)"in-"===e[i].substring(0,3)&&t(a).removeClass(e[i])}function v(a,e){if(e.hasOwnProperty("post_category")){var n=e.post_category;for(i=0;i<n.length;i++){var s="in-category-"+n[i];t(a).addClass(s)}}}function f(a,e){if(e.hasOwnProperty("tax_input")){var n=e.tax_input;t.each(n,function(e,n){for(i=0;i<n.length;i++){var s="in-"+e+"-"+n[i];t(a).addClass(s)}})}}function g(a){t(a).find(".np-save-quickedit, .np-save-quickedit-redirect").removeAttr("disabled"),t(a).find(".np-qe-loading").hide()}function m(e){var n=t(e).parent(".quick-edit").siblings(".row");t(n).addClass("np-updated"),t(n).show(),t(e).parent(".quick-edit").remove(),a(),setTimeout(function(){t(n).addClass("np-updated-show")},1500)}function _(a){var e={id:t(a).attr("data-id"),url:t(a).attr("data-url"),title:t(a).attr("data-title"),status:t(a).attr("data-status"),navstatus:t(a).attr("data-navstatus"),npstatus:t(a).attr("data-np-status"),linktarget:t(a).attr("data-linktarget"),parentid:t(a).attr("data-parentid"),navtitleattr:t(a).attr("data-navtitleattr"),navcss:t(a).attr("data-navcss")},n=t(a).closest(".row").parent("li");if(t(n).children("ol").length>0)var s=t(n).children("ol"),i=t(".quick-edit-form-redirect").clone().insertBefore(s);else var i=t(".quick-edit-form-redirect").clone().appendTo(n);t(i).siblings(".row").hide();t(i).show(),k(i,e)}function k(a,e){t(a).find(".np_id").val(e.id),t(a).find(".np_title").val(e.title),t(a).find(".np_author select").val(e.author),t(a).find(".np_status").val(e.status),t(a).find(".np_content").val(e.url),t(a).find(".np_parent_id").val(e.parentid),t(a).find(".np_title_attribute").val(e.navtitleattr),t(a).find(".np_nav_css_classes").val(e.navcss),"hide"===e.npstatus?t(a).find(".np_status").prop("checked","checked"):t(a).find(".np_status").removeAttr("checked"),"hide"===e.navstatus?t(a).find(".np_nav_status").prop("checked","checked"):t(a).find(".np_nav_status").removeAttr("checked"),"_blank"===e.linktarget?t(a).find(".link_target").prop("checked","checked"):t(a).find(".link_target").removeAttr("checked"),t(a).show()}function w(a){t(".np-quickedit-error").hide();var e=t(".np-sync-menu").is(":checked")?"sync":"nosync";t.ajax({url:ajaxurl,type:"post",datatype:"json",data:t(a).serialize()+"&action=npquickeditredirect&nonce="+nestedpages.np_nonce+"&syncmenu="+e,success:function(e){console.log(e),"error"===e.status?(g(a),t(a).find(".np-quickedit-error").text(e.message).show()):(g(a),y(a,e.post_data),m(a))},error:function(){g(a),t(a).find(".np-quickedit-error").text("The form could not be saved at this time.").show()}})}function y(a,e){var n=t(a).parent(".quick-edit").siblings(".row");t(n).find(".title").html(e.post_title+' <i class="np-icon-link"></i>');var s=t(n).find(".status");t(s).text("publish"!==e._status&&"future"!==e._status?"("+e._status+")":"");var i=t(n).find(".nav-status");t(i).text("hide"==e.nav_status?"(Hidden)":"");var r=t(n).parent("li");"hide"==e.np_status?(t(r).addClass("np-hide"),t(n).find(".status").after('<i class="np-icon-eye-blocked"></i>')):(t(r).removeClass("np-hide"),t(n).find(".np-icon-eye-blocked").remove());var o=t(n).find(".np-quick-edit-redirect");t(o).attr("data-id",e.post_id),t(o).attr("data-title",e.post_title),t(o).attr("data-url",e.post_content),t(o).attr("data-status",e._status),t(o).attr("data-navstatus",e.nav_status),t(o).attr("data-np-status",e.np_status),t(o).attr("data-linktarget",e.link_target),t(o).attr("data-navtitleattr",e.np_title_attribute),t(o).attr("data-navcss",e.np_nav_css_classes)}function b(){t(".np-link-loading").hide(),t(".np-save-link").removeAttr("disabled")}function x(){t(".np-new-link-error").hide();var a=t(".np-new-link-form").serialize(),e=t(".np-sync-menu").is(":checked")?"sync":"nosync";t.ajax({url:ajaxurl,type:"post",datatype:"json",data:a+"&action=npnewredirect&nonce="+nestedpages.np_nonce+"&syncmenu="+e,success:function(a){console.log(a),"error"===a.status?(b(),t(".np-new-link-error").text(a.message).show()):(b(),C(a.post_data))}})}function C(a){var e='<li id="menuItem_'+a.id+'" class="page-row';"publish"===a._status&&(e+=" published"),e+='">',e+='<div class="row"><div class="child-toggle"></div><div class="row-inner"><i class="np-icon-sub-menu"></i><i class="handle np-icon-menu"></i><a href="'+a.np_link_content+'" class="page-link page-title" target="_blank"><span class="title">'+a.np_link_title+' <i class="np-icon-link"></i></span>',e+="publish"!==a._status?'<span class="status">'+a._status+"</span>":'<span class="status"></span>',"hide"===a.np_status&&(e+='<i class="np-icon-eye-blocked"></i>'),e+="hide"===a.nav_status?'<span class="nav-status">(Hidden)</span>':'<span class="nav-status"></span>',e+='</a><a href="#" class="np-toggle-edit"><i class="np-icon-pencil"></i></a><div class="action-buttons"><a href="#" class="np-btn np-quick-edit-redirect" ',e+='data-id="'+a.id+'"',e+='data-parentid="'+a.parent_id+'"',e+='data-title="'+a.np_link_title+'" ',e+='data-url="'+a.np_link_content+'" ',e+='data-status="'+a._status+'" ',e+='data-np-status="'+a.np_status+'" ',e+='data-navstatus="'+a.nav_status+'" ',e+='data-linktarget="'+a.link_target+'">',e+="Quick Edit</a>",e+="</div></div></div></li>","0"===a.parent_id?t(".nplist:first li:first").after(e):q(e,a),t("#np-link-modal").modal("hide");var n=t("#menuItem_"+a.id).find(".row");j(n)}function q(a,e){var n=t("#menuItem_"+e.parent_id);0===t(n).children("ol").length?(a='<ol class="sortable nplist" style="display:block;">'+a+"</ol>",t(n).append(a)):t(n).find("ol:first").prepend(a),s(),T()}function j(e){t(e).addClass("np-updated"),a(),setTimeout(function(){t(e).addClass("np-updated-show")},1500)}function D(){var a=[],e=t(".page-row:visible");return t.each(e,function(){var e=t(this).attr("id");a.push(e.replace("menuItem_",""))}),a}function T(){var a=D();t.ajax({url:ajaxurl,type:"post",datatype:"json",data:{action:"npnesttoggle",nonce:nestedpages.np_nonce,ids:a},success:function(t){"success"!==t.status&&console.log("There was an error saving toggled pages.")}})}t(document).ready(function(){s(),a()}),t(document).on("click",".child-toggle a",function(e){e.preventDefault();var n=t(this).parent(".child-toggle").parent(".row").siblings("ol");t(this).find("i").toggleClass("np-icon-arrow-down").toggleClass("np-icon-arrow-right"),t(n).toggle(),a(),T()}),t(document).on("click",".nestedpages-toggleall a",function(e){e.preventDefault(),"closed"==t(this).attr("data-toggle")?(t(".nestedpages ol li ol").show(),t(this).attr("data-toggle","opened"),t(this).text(nestedpages.collapse_text),t(".child-toggle i").removeClass("np-icon-arrow-right").addClass("np-icon-arrow-down"),c(),a()):(t(".nestedpages ol li ol").hide(),t(this).attr("data-toggle","closed"),t(this).text(nestedpages.expand_text),t(".child-toggle i").removeClass("np-icon-arrow-down").addClass("np-icon-arrow-right"),c(),a()),T()}),t(document).on("click",".np-toggle-hidden",function(e){e.preventDefault();var n=t(this).attr("href");"show"===n?(t(this).attr("href","hide"),t(this).text(nestedpages.show_hidden),t(".np-hide").removeClass("shown").hide(),a()):(t(this).attr("href","show"),t(this).text(nestedpages.hide_hidden),t(".np-hide").addClass("shown").show(),a())}),t(document).on("click",".np-toggle-publish",function(a){a.preventDefault();var e=t(this).attr("href");t(".np-toggle-publish").removeClass("active"),t(this).addClass("active"),"#published"==e?(t(".nplist .page-row").hide(),t(".nplist .published").show()):t(".nplist .page-row").show()}),t(document).on("click",".np-toggle-edit",function(a){a.preventDefault();var e=t(this).siblings(".action-buttons");t(e).is(":visible")?(t(this).removeClass("active"),t(e).hide()):(t(this).addClass("active"),t(e).show())});var A=function(){var t=0;return function(a,e){clearTimeout(t),t=setTimeout(a,e)}}();t(window).resize(function(){A(function(){t(".action-buttons").removeAttr("style"),t(".np-toggle-edit").removeClass("active")},500)}),t(document).ready(function(){t(".sortable").not(".no-sort").nestedSortable({items:"li",toleranceElement:"> .row",handle:".handle",placeholder:"ui-sortable-placeholder",start:function(t,a){a.placeholder.height(a.item.height())},sort:function(t,a){e(a)},stop:function(){setTimeout(function(){s(),a()},100),r()},update:function(){}})}),t(document).ready(function(){"1"===nestedpages.syncmenu&&o("sync")}),t(".np-sync-menu").on("change",function(){var a=t(this).is(":checked")?"sync":"nosync";o(a)}),t(document).on("click",".np-quick-edit",function(a){a.preventDefault(),c(),d(t(this))}),t(document).on("click",".np-cancel-quickedit",function(a){var e=t(this).parents(".page-row");c(e),a.preventDefault()}),t(document).on("click",".np-save-quickedit",function(a){a.preventDefault(),t(".row").removeClass("np-updated").removeClass("np-updated-show");var e=t(this).parents("form");t(this).attr("disabled","disabled"),t(e).find(".np-qe-loading").show(),p(e)}),t(document).on("click",".np-toggle-taxonomies",function(){t(this).parents("form").find(".np-taxonomies").toggle()}),t(document).on("click",".np-toggle-menuoptions",function(){t(this).parents("form").find(".np-menuoptions").toggle()}),t(document).on("click",".np-quick-edit-redirect",function(a){a.preventDefault(),c(),_(t(this))}),t(document).on("click",".np-save-quickedit-redirect",function(a){a.preventDefault(),t(".row").removeClass("np-updated").removeClass("np-updated-show");var e=t(this).parents("form");t(this).attr("disabled","disabled"),t(e).find(".np-qe-loading").show(),w(e)}),t(document).on("click",".open-redirect-modal",function(a){a.preventDefault();var e=t(this).attr("data-parentid");t(".np-modal-form").find("input").val(""),t(".np-modal-form").find(".parent_id").val(e),t("#np-add-link-title").text("0"===e?nestedpages.add_link:nestedpages.add_child_link),t("#np-link-modal").modal("show")}),t(document).on("click",".np-save-link",function(a){a.preventDefault(),t(".np-new-link-error").hide(),t(".np-link-loading").show(),t(this).attr("disabled","disabled"),x()})});
|
assets/screenshot-1.png
CHANGED
Binary file
|
assets/screenshot-2.png
CHANGED
Binary file
|
assets/screenshot-3.gif
CHANGED
Binary file
|
assets/scss/_buttons.scss
CHANGED
@@ -14,7 +14,9 @@
|
|
14 |
background-color: $blue;
|
15 |
color: $white;
|
16 |
transition: all 200ms ease;
|
17 |
-
box-shadow: 0 1px 0 rgba(0,0,0,.08);
|
|
|
|
|
18 |
}
|
19 |
}
|
20 |
|
14 |
background-color: $blue;
|
15 |
color: $white;
|
16 |
transition: all 200ms ease;
|
17 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 0 rgba(0,0,0,.08);
|
18 |
+
border-color: $blue;
|
19 |
+
transition: all 200ms ease;
|
20 |
}
|
21 |
}
|
22 |
|
assets/scss/_icons.scss
CHANGED
@@ -22,6 +22,7 @@
|
|
22 |
-webkit-font-smoothing: antialiased;
|
23 |
-moz-osx-font-smoothing: grayscale;
|
24 |
}
|
|
|
25 |
.np-icon-no:before {
|
26 |
content: "\e601";
|
27 |
}
|
@@ -40,6 +41,9 @@
|
|
40 |
.np-icon-sub-menu:before {
|
41 |
content: "\e600";
|
42 |
}
|
|
|
|
|
|
|
43 |
.np-icon-pencil:before {
|
44 |
content: "\e608";
|
45 |
}
|
@@ -52,12 +56,30 @@
|
|
52 |
.np-icon-remove:before {
|
53 |
content: "\e60a";
|
54 |
}
|
|
|
|
|
|
|
55 |
.np-icon-menu2:before {
|
56 |
content: "\e606";
|
57 |
}
|
|
|
|
|
|
|
58 |
.np-icon-eye:before {
|
59 |
content: "\e60b";
|
60 |
}
|
61 |
.np-icon-eye-blocked:before {
|
62 |
content: "\e60c";
|
63 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
-webkit-font-smoothing: antialiased;
|
23 |
-moz-osx-font-smoothing: grayscale;
|
24 |
}
|
25 |
+
|
26 |
.np-icon-no:before {
|
27 |
content: "\e601";
|
28 |
}
|
41 |
.np-icon-sub-menu:before {
|
42 |
content: "\e600";
|
43 |
}
|
44 |
+
.np-icon-arrows-alt:before {
|
45 |
+
content: "\f0b2";
|
46 |
+
}
|
47 |
.np-icon-pencil:before {
|
48 |
content: "\e608";
|
49 |
}
|
56 |
.np-icon-remove:before {
|
57 |
content: "\e60a";
|
58 |
}
|
59 |
+
.np-icon-list:before {
|
60 |
+
content: "\e60d";
|
61 |
+
}
|
62 |
.np-icon-menu2:before {
|
63 |
content: "\e606";
|
64 |
}
|
65 |
+
.np-icon-link:before {
|
66 |
+
content: "\e612";
|
67 |
+
}
|
68 |
.np-icon-eye:before {
|
69 |
content: "\e60b";
|
70 |
}
|
71 |
.np-icon-eye-blocked:before {
|
72 |
content: "\e60c";
|
73 |
}
|
74 |
+
.np-icon-mail:before {
|
75 |
+
content: "\e60e";
|
76 |
+
}
|
77 |
+
.np-icon-github:before {
|
78 |
+
content: "\e60f";
|
79 |
+
}
|
80 |
+
.np-icon-wordpress:before {
|
81 |
+
content: "\e610";
|
82 |
+
}
|
83 |
+
.np-icon-linkedin:before {
|
84 |
+
content: "\e611";
|
85 |
+
}
|
assets/scss/_mixins.scss
CHANGED
@@ -24,4 +24,18 @@
|
|
24 |
box-shadow: 0 1px 1px rgba(0,0,0,.06);
|
25 |
border: 1px solid $border-light;
|
26 |
border-radius: 3px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
24 |
box-shadow: 0 1px 1px rgba(0,0,0,.06);
|
25 |
border: 1px solid $border-light;
|
26 |
border-radius: 3px;
|
27 |
+
}
|
28 |
+
|
29 |
+
@mixin translate($x, $y) {
|
30 |
+
-webkit-transform: translate($x, $y);
|
31 |
+
-ms-transform: translate($x, $y); // IE9 only
|
32 |
+
-o-transform: translate($x, $y);
|
33 |
+
transform: translate($x, $y);
|
34 |
+
}
|
35 |
+
|
36 |
+
@mixin transition-transform($transition...) {
|
37 |
+
-webkit-transition: -webkit-transform $transition;
|
38 |
+
-moz-transition: -moz-transform $transition;
|
39 |
+
-o-transition: -o-transform $transition;
|
40 |
+
transition: transform $transition;
|
41 |
}
|
assets/scss/_page-listing.scss
CHANGED
@@ -258,7 +258,10 @@
|
|
258 |
float: right;
|
259 |
margin: 0 10px 0 0;
|
260 |
a {
|
261 |
-
margin
|
|
|
|
|
|
|
262 |
}
|
263 |
}
|
264 |
|
258 |
float: right;
|
259 |
margin: 0 10px 0 0;
|
260 |
a {
|
261 |
+
margin: 0 0 0 -5px;
|
262 |
+
&.np-btn-trash {
|
263 |
+
margin-left: 4px;
|
264 |
+
}
|
265 |
}
|
266 |
}
|
267 |
|
assets/scss/_quick-edit.scss
CHANGED
@@ -66,28 +66,21 @@
|
|
66 |
width: 12%;
|
67 |
}
|
68 |
}
|
69 |
-
.np-qe-loading {
|
70 |
-
display: none;
|
71 |
-
float: right;
|
72 |
-
width: 25px;
|
73 |
-
height: 25px;
|
74 |
-
margin: 2px 10px 0 0;
|
75 |
-
background: url('../images/loading-white.gif') no-repeat;
|
76 |
-
}
|
77 |
|
78 |
// Taxonomies
|
79 |
-
.np-toggle-taxonomies {
|
80 |
clear: both;
|
81 |
float: right;
|
82 |
width: 71%;
|
83 |
text-align: center;
|
84 |
}
|
85 |
-
.np-taxonomies {
|
86 |
display: none;
|
87 |
clear: both;
|
88 |
background-color: $gray-lighter;
|
89 |
padding: 8px;
|
90 |
@include clearfix;
|
|
|
91 |
}
|
92 |
.np-taxonomy {
|
93 |
float: left;
|
@@ -103,6 +96,37 @@
|
|
103 |
border: 0;
|
104 |
}
|
105 |
} // .np-taxonomy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
|
108 |
@media (max-width: 767px)
|
66 |
width: 12%;
|
67 |
}
|
68 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
// Taxonomies
|
71 |
+
.np-toggle-taxonomies, .np-toggle-menuoptions {
|
72 |
clear: both;
|
73 |
float: right;
|
74 |
width: 71%;
|
75 |
text-align: center;
|
76 |
}
|
77 |
+
.np-taxonomies, .np-menuoptions {
|
78 |
display: none;
|
79 |
clear: both;
|
80 |
background-color: $gray-lighter;
|
81 |
padding: 8px;
|
82 |
@include clearfix;
|
83 |
+
margin-top: 5px;
|
84 |
}
|
85 |
.np-taxonomy {
|
86 |
float: left;
|
96 |
border: 0;
|
97 |
}
|
98 |
} // .np-taxonomy
|
99 |
+
|
100 |
+
// Menu Items
|
101 |
+
.np-menuoptions {
|
102 |
+
padding: 15px;
|
103 |
+
label, input[type="text"] {
|
104 |
+
display: block;
|
105 |
+
float: none;
|
106 |
+
width: 100%;
|
107 |
+
}
|
108 |
+
.menuoptions-left {
|
109 |
+
float: left;
|
110 |
+
width: 47%;
|
111 |
+
}
|
112 |
+
.menuoptions-right {
|
113 |
+
float: right;
|
114 |
+
width: 47%;
|
115 |
+
padding-top: 18px;
|
116 |
+
label {
|
117 |
+
margin-bottom: 10px;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
} // .np-menuoptions
|
121 |
+
}
|
122 |
+
|
123 |
+
.np-qe-loading {
|
124 |
+
display: none;
|
125 |
+
float: right;
|
126 |
+
width: 25px;
|
127 |
+
height: 25px;
|
128 |
+
margin: 2px 10px 0 0;
|
129 |
+
background: url('../images/loading-white.gif') no-repeat;
|
130 |
}
|
131 |
|
132 |
@media (max-width: 767px)
|
assets/scss/nestedpages.scss
CHANGED
@@ -7,9 +7,11 @@
|
|
7 |
@import "_icons.scss";
|
8 |
@import "_buttons.scss";
|
9 |
@import "_alerts.scss";
|
|
|
10 |
@import "_toggle-all.scss";
|
11 |
|
12 |
@import "_top-tools.scss";
|
13 |
@import "_expand-handle.scss";
|
14 |
@import "_page-listing.scss";
|
15 |
-
@import "_quick-edit.scss";
|
|
7 |
@import "_icons.scss";
|
8 |
@import "_buttons.scss";
|
9 |
@import "_alerts.scss";
|
10 |
+
@import "_modals.scss";
|
11 |
@import "_toggle-all.scss";
|
12 |
|
13 |
@import "_top-tools.scss";
|
14 |
@import "_expand-handle.scss";
|
15 |
@import "_page-listing.scss";
|
16 |
+
@import "_quick-edit.scss";
|
17 |
+
@import "_form-modal.scss";
|
includes/class-nestedpages.php
CHANGED
@@ -5,12 +5,17 @@ require_once('class-np-activate.php');
|
|
5 |
// Form Handlers
|
6 |
require_once('class-np-handler-sort.php');
|
7 |
require_once('class-np-handler-quickedit.php');
|
|
|
|
|
8 |
require_once('class-np-handler-syncmenu.php');
|
|
|
9 |
|
10 |
// Required Classes
|
11 |
require_once('class-np-dependencies.php');
|
12 |
require_once('class-np-pagelisting.php');
|
13 |
require_once('class-np-newpage.php');
|
|
|
|
|
14 |
|
15 |
/**
|
16 |
* Primary Plugin Class
|
@@ -35,6 +40,8 @@ class NestedPages {
|
|
35 |
new NP_Dependencies;
|
36 |
new NP_PageListing;
|
37 |
new NP_NewPage;
|
|
|
|
|
38 |
}
|
39 |
|
40 |
|
@@ -47,6 +54,9 @@ class NestedPages {
|
|
47 |
add_action( 'wp_ajax_npsort', 'nestedpages_sort_handler' );
|
48 |
add_action( 'wp_ajax_npquickedit', 'nestedpages_quickedit_handler' );
|
49 |
add_action( 'wp_ajax_npsyncmenu', 'nestedpages_syncmenu_handler' );
|
|
|
|
|
|
|
50 |
}
|
51 |
}
|
52 |
|
5 |
// Form Handlers
|
6 |
require_once('class-np-handler-sort.php');
|
7 |
require_once('class-np-handler-quickedit.php');
|
8 |
+
require_once('class-np-handler-quickedit-redirect.php');
|
9 |
+
require_once('class-np-handler-newredirect.php');
|
10 |
require_once('class-np-handler-syncmenu.php');
|
11 |
+
require_once('class-np-handler-nesttoggle.php');
|
12 |
|
13 |
// Required Classes
|
14 |
require_once('class-np-dependencies.php');
|
15 |
require_once('class-np-pagelisting.php');
|
16 |
require_once('class-np-newpage.php');
|
17 |
+
require_once('class-np-redirects.php');
|
18 |
+
require_once('class-np-posttypes.php');
|
19 |
|
20 |
/**
|
21 |
* Primary Plugin Class
|
40 |
new NP_Dependencies;
|
41 |
new NP_PageListing;
|
42 |
new NP_NewPage;
|
43 |
+
new NP_Redirects;
|
44 |
+
new NP_PostTypes;
|
45 |
}
|
46 |
|
47 |
|
54 |
add_action( 'wp_ajax_npsort', 'nestedpages_sort_handler' );
|
55 |
add_action( 'wp_ajax_npquickedit', 'nestedpages_quickedit_handler' );
|
56 |
add_action( 'wp_ajax_npsyncmenu', 'nestedpages_syncmenu_handler' );
|
57 |
+
add_action( 'wp_ajax_npnesttoggle', 'nestedpages_nesttoggle_handler' );
|
58 |
+
add_action( 'wp_ajax_npquickeditredirect', 'nestedpages_quickedit_redirect_handler' );
|
59 |
+
add_action( 'wp_ajax_npnewredirect', 'nestedpages_new_redirect');
|
60 |
}
|
61 |
}
|
62 |
|
includes/class-np-activate.php
CHANGED
@@ -14,7 +14,7 @@ class NP_Activate {
|
|
14 |
public function __construct()
|
15 |
{
|
16 |
register_activation_hook( dirname( dirname(__FILE__) ) . '/nestedpages.php', array($this, 'install') );
|
17 |
-
$this->version = 1.
|
18 |
$this->setVersion();
|
19 |
$this->addMenu();
|
20 |
}
|
14 |
public function __construct()
|
15 |
{
|
16 |
register_activation_hook( dirname( dirname(__FILE__) ) . '/nestedpages.php', array($this, 'install') );
|
17 |
+
$this->version = 1.1;
|
18 |
$this->setVersion();
|
19 |
$this->addMenu();
|
20 |
}
|
includes/class-np-dependencies.php
CHANGED
@@ -26,7 +26,7 @@ class NP_Dependencies {
|
|
26 |
'nestedpages',
|
27 |
$this->plugin_dir . '/assets/css/nestedpages.css',
|
28 |
array(),
|
29 |
-
'1.
|
30 |
);
|
31 |
}
|
32 |
|
@@ -39,10 +39,18 @@ class NP_Dependencies {
|
|
39 |
{
|
40 |
$screen = get_current_screen();
|
41 |
if ( strpos( $screen->id, 'nestedpages' ) ) :
|
|
|
42 |
wp_enqueue_script('jquery-ui-core');
|
43 |
|
44 |
wp_enqueue_script('jquery-ui-sortable');
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
wp_enqueue_script(
|
47 |
'ui-touch-punch',
|
48 |
$this->plugin_dir . '/assets/js/lib/jquery.ui.touch-punch.min.js',
|
@@ -64,14 +72,22 @@ class NP_Dependencies {
|
|
64 |
'1.0'
|
65 |
);
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
wp_localize_script(
|
68 |
'nestedpages',
|
69 |
'nestedpages',
|
70 |
-
|
71 |
-
'np_nonce' => wp_create_nonce( 'nestedpages-nonce' ),
|
72 |
-
'expand_text' => __('Expand Pages', 'nestedpages'),
|
73 |
-
'collapse_text' => __('Collapse Pages', 'nestedpages')
|
74 |
-
)
|
75 |
);
|
76 |
endif;
|
77 |
}
|
26 |
'nestedpages',
|
27 |
$this->plugin_dir . '/assets/css/nestedpages.css',
|
28 |
array(),
|
29 |
+
'1.1'
|
30 |
);
|
31 |
}
|
32 |
|
39 |
{
|
40 |
$screen = get_current_screen();
|
41 |
if ( strpos( $screen->id, 'nestedpages' ) ) :
|
42 |
+
wp_enqueue_script('thickbox');
|
43 |
wp_enqueue_script('jquery-ui-core');
|
44 |
|
45 |
wp_enqueue_script('jquery-ui-sortable');
|
46 |
|
47 |
+
wp_enqueue_script(
|
48 |
+
'bootstrap-modal',
|
49 |
+
$this->plugin_dir . '/assets/js/lib/bs-modal.js',
|
50 |
+
array('jquery'),
|
51 |
+
'1.0'
|
52 |
+
);
|
53 |
+
|
54 |
wp_enqueue_script(
|
55 |
'ui-touch-punch',
|
56 |
$this->plugin_dir . '/assets/js/lib/jquery.ui.touch-punch.min.js',
|
72 |
'1.0'
|
73 |
);
|
74 |
|
75 |
+
$localized_data = array(
|
76 |
+
'np_nonce' => wp_create_nonce( 'nestedpages-nonce' ),
|
77 |
+
'expand_text' => __('Expand Pages', 'nestedpages'),
|
78 |
+
'collapse_text' => __('Collapse Pages', 'nestedpages'),
|
79 |
+
'show_hidden' => __('Show Hidden', 'nestedpages'),
|
80 |
+
'hide_hidden' => __('Hide Hidden', 'nestedpages'),
|
81 |
+
'add_link' => __('Add Link', 'nestedpages'),
|
82 |
+
'add_child_link' => __('Add Child Link', 'nestedpages')
|
83 |
+
);
|
84 |
+
$syncmenu = ( get_option('nestedpages_menusync') == 'sync' ) ? true : false;
|
85 |
+
$localized_data['syncmenu'] = $syncmenu;
|
86 |
+
|
87 |
wp_localize_script(
|
88 |
'nestedpages',
|
89 |
'nestedpages',
|
90 |
+
$localized_data
|
|
|
|
|
|
|
|
|
91 |
);
|
92 |
endif;
|
93 |
}
|
includes/class-np-handler-base.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
require_once('class-np-navmenu.php');
|
4 |
-
require_once('class-np-
|
5 |
|
6 |
/**
|
7 |
* Base Form Handler Class
|
1 |
<?php
|
2 |
|
3 |
require_once('class-np-navmenu.php');
|
4 |
+
require_once('class-np-repository-post.php');
|
5 |
|
6 |
/**
|
7 |
* Base Form Handler Class
|
includes/class-np-handler-quickedit.php
CHANGED
@@ -47,6 +47,7 @@ class NP_QuickEdit_Handler extends NP_BaseHandler {
|
|
47 |
{
|
48 |
$this->data['nav_status'] = ( isset($this->data['nav_status']) ) ? 'hide' : 'show';
|
49 |
$this->data['np_status'] = ( isset($this->data['nested_pages_status']) ) ? 'hide' : 'show';
|
|
|
50 |
if ( !isset($_POST['comment_status']) ) $this->data['comment_status'] = 'closed';
|
51 |
}
|
52 |
|
47 |
{
|
48 |
$this->data['nav_status'] = ( isset($this->data['nav_status']) ) ? 'hide' : 'show';
|
49 |
$this->data['np_status'] = ( isset($this->data['nested_pages_status']) ) ? 'hide' : 'show';
|
50 |
+
$this->data['link_target'] = ( isset($this->data['link_target']) ) ? '_blank' : 'none';
|
51 |
if ( !isset($_POST['comment_status']) ) $this->data['comment_status'] = 'closed';
|
52 |
}
|
53 |
|
includes/class-np-navmenu.php
CHANGED
@@ -52,13 +52,26 @@ class NP_NavMenu {
|
|
52 |
}
|
53 |
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/**
|
56 |
* Create the menu with nested pages (Recursive function)
|
57 |
*/
|
58 |
public function sync($parent = 0, $menu_parent = 0)
|
59 |
{
|
60 |
$page_q = new WP_Query(array(
|
61 |
-
'post_type' => 'page',
|
62 |
'posts_per_page' => -1,
|
63 |
'post_status' => 'publish',
|
64 |
'orderby' => 'menu_order',
|
@@ -73,21 +86,50 @@ class NP_NavMenu {
|
|
73 |
// Nested Pages Visibility
|
74 |
$np_status = get_post_meta( get_the_id(), 'nested_pages_status', true );
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
// Nav Title
|
77 |
$nav_title = get_post_meta( get_the_id(), 'np_nav_title', true );
|
78 |
$nav_title = ( $nav_title !== "" ) ? $nav_title : get_the_title();
|
79 |
|
80 |
if ( ($ns == 'show') || ($ns == '') ) {
|
81 |
if ( $np_status !== 'hide' ){
|
82 |
-
|
83 |
-
'
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
$this->sync( get_the_id(), $menu );
|
92 |
}
|
93 |
}
|
52 |
}
|
53 |
|
54 |
|
55 |
+
/**
|
56 |
+
* Verify URL Format
|
57 |
+
* @param string - URL to check
|
58 |
+
* @return string - formatted URL
|
59 |
+
*/
|
60 |
+
private function check_url($url)
|
61 |
+
{
|
62 |
+
$parsed = parse_url($url);
|
63 |
+
if (empty($parsed['scheme'])) $url = 'http://' . ltrim($url, '/');
|
64 |
+
return $url;
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
/**
|
69 |
* Create the menu with nested pages (Recursive function)
|
70 |
*/
|
71 |
public function sync($parent = 0, $menu_parent = 0)
|
72 |
{
|
73 |
$page_q = new WP_Query(array(
|
74 |
+
'post_type' => array('page','np-redirect'),
|
75 |
'posts_per_page' => -1,
|
76 |
'post_status' => 'publish',
|
77 |
'orderby' => 'menu_order',
|
86 |
// Nested Pages Visibility
|
87 |
$np_status = get_post_meta( get_the_id(), 'nested_pages_status', true );
|
88 |
|
89 |
+
// Link Target
|
90 |
+
$link_target = get_post_meta( get_the_id(), 'np_link_target', true );
|
91 |
+
|
92 |
+
// Title Attribue
|
93 |
+
$title_attribute = get_post_meta( get_the_id(), 'np_title_attribute', true );
|
94 |
+
|
95 |
+
// CSS Classes
|
96 |
+
$css_classes = get_post_meta( get_the_id(), 'np_nav_css_classes', true );
|
97 |
+
|
98 |
// Nav Title
|
99 |
$nav_title = get_post_meta( get_the_id(), 'np_nav_title', true );
|
100 |
$nav_title = ( $nav_title !== "" ) ? $nav_title : get_the_title();
|
101 |
|
102 |
if ( ($ns == 'show') || ($ns == '') ) {
|
103 |
if ( $np_status !== 'hide' ){
|
104 |
+
|
105 |
+
if ( get_post_type() == 'page' ){
|
106 |
+
$menu = wp_update_nav_menu_item($this->id, 0, array(
|
107 |
+
'menu-item-title' => $nav_title,
|
108 |
+
'menu-item-url' => get_the_permalink(),
|
109 |
+
'menu-item-attr-title' => $title_attribute,
|
110 |
+
'menu-item-status' => 'publish',
|
111 |
+
'menu-item-classes' => $css_classes,
|
112 |
+
'menu-item-type' => 'post_type',
|
113 |
+
'menu-item-object' => 'page',
|
114 |
+
'menu-item-object-id' => get_the_id(),
|
115 |
+
'menu-item-parent-id' => $menu_parent,
|
116 |
+
'menu-item-target' => $link_target
|
117 |
+
));
|
118 |
+
} else { // redirect
|
119 |
+
$menu = wp_update_nav_menu_item($this->id, 0, array(
|
120 |
+
'menu-item-title' => $nav_title,
|
121 |
+
'menu-item-url' => $this->check_url(get_the_content()),
|
122 |
+
'menu-item-attr-title' => $title_attribute,
|
123 |
+
'menu-item-status' => 'publish',
|
124 |
+
'menu-item-classes' => $css_classes,
|
125 |
+
'menu-item-type' => 'custom',
|
126 |
+
'menu-item-object' => 'page',
|
127 |
+
'menu-item-object-id' => get_the_id(),
|
128 |
+
'menu-item-parent-id' => $menu_parent,
|
129 |
+
'menu-item-target' => $link_target
|
130 |
+
));
|
131 |
+
}
|
132 |
+
|
133 |
$this->sync( get_the_id(), $menu );
|
134 |
}
|
135 |
}
|
includes/class-np-pagelisting.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
3 |
/**
|
4 |
* Primary Listing Class
|
5 |
* Initiates Page Listing screen (overwriting default), and displays primary plugin view.
|
@@ -27,6 +28,13 @@ class NP_PageListing {
|
|
27 |
private $f_taxonomies;
|
28 |
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
public function __construct()
|
31 |
{
|
32 |
$this->post_type = get_post_type_object('page');
|
@@ -86,6 +94,16 @@ class NP_PageListing {
|
|
86 |
return $link;
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
/**
|
91 |
* The Main View
|
@@ -93,7 +111,16 @@ class NP_PageListing {
|
|
93 |
*/
|
94 |
public function pageListing()
|
95 |
{
|
96 |
-
include(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
|
99 |
|
@@ -138,6 +165,103 @@ class NP_PageListing {
|
|
138 |
return $out;
|
139 |
}
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
/**
|
143 |
* Loop through all the pages and create the nested / sortable list
|
@@ -145,74 +269,63 @@ class NP_PageListing {
|
|
145 |
*/
|
146 |
private function loopPages($parent_id = 0, $count = 0)
|
147 |
{
|
|
|
148 |
$pages = new WP_Query(array(
|
149 |
-
'post_type' => 'page',
|
150 |
'posts_per_page' => -1,
|
151 |
'orderby' => 'menu_order',
|
|
|
152 |
'post_parent' => $parent_id,
|
153 |
'order' => 'ASC'
|
154 |
));
|
155 |
if ( $pages->have_posts() ) :
|
156 |
$count++;
|
157 |
|
158 |
-
if ( $
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
echo ( current_user_can('edit_theme_options') )
|
163 |
-
? '<ol class="sortable nplist">'
|
164 |
-
: '<ol class="sortable no-sort nplist">';
|
165 |
-
} else {
|
166 |
-
echo '<ol class="nplist">';
|
167 |
-
}
|
168 |
-
|
169 |
while ( $pages->have_posts() ) : $pages->the_post();
|
170 |
|
171 |
global $post;
|
172 |
-
|
173 |
-
|
174 |
|
175 |
-
|
176 |
-
if ( $post->post_status == 'publish' ) echo ' published';
|
177 |
-
|
178 |
-
// Hidden in Nested Pages?
|
179 |
-
$np_status = get_post_meta( get_the_id(), 'nested_pages_status', true );
|
180 |
-
$np_status = ( $np_status == 'hide' ) ? 'hide' : 'show';
|
181 |
-
if ( $np_status == 'hide' ) echo ' np-hide';
|
182 |
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
echo '">';
|
187 |
-
$count++;
|
188 |
|
189 |
-
|
190 |
-
|
191 |
-
// Show Hide in generated nav menu
|
192 |
-
$ns = get_post_meta( get_the_id(), 'np_nav_status', true);
|
193 |
-
$nav_status = ( $ns == 'hide' ) ? 'hide' : 'show';
|
194 |
|
195 |
-
//
|
196 |
-
|
197 |
|
198 |
-
|
199 |
-
$d = get_the_time('d');
|
200 |
-
$month = get_the_time('m');
|
201 |
-
$y = get_the_time('Y');
|
202 |
-
$h = get_the_time('H');
|
203 |
-
$m = get_the_time('i');
|
204 |
-
|
205 |
-
if ( function_exists('wpseo_translate_score') ) {
|
206 |
-
$yoast_score = get_post_meta(get_the_id(), '_yoast_wpseo_linkdex', true);
|
207 |
-
$score = wpseo_translate_score($yoast_score);
|
208 |
-
};
|
209 |
|
210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
$this->loopPages(get_the_id(), $count);
|
212 |
-
|
|
|
|
|
|
|
213 |
|
214 |
endwhile; // Loop
|
215 |
-
|
|
|
|
|
|
|
|
|
216 |
endif; wp_reset_postdata();
|
217 |
}
|
218 |
|
1 |
<?php
|
2 |
+
require_once('class-np-confirmation.php');
|
3 |
+
require_once('class-np-helpers.php');
|
4 |
/**
|
5 |
* Primary Listing Class
|
6 |
* Initiates Page Listing screen (overwriting default), and displays primary plugin view.
|
28 |
private $f_taxonomies;
|
29 |
|
30 |
|
31 |
+
/**
|
32 |
+
* Post Data
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
private $post_data;
|
36 |
+
|
37 |
+
|
38 |
public function __construct()
|
39 |
{
|
40 |
$this->post_type = get_post_type_object('page');
|
94 |
return $link;
|
95 |
}
|
96 |
|
97 |
+
/**
|
98 |
+
* User's Toggled Pages
|
99 |
+
*/
|
100 |
+
private function visiblePages()
|
101 |
+
{
|
102 |
+
$visible = unserialize(get_user_meta(get_current_user_id(), 'np_visible_pages', true));
|
103 |
+
if ( !$visible ) $visible = array();
|
104 |
+
return $visible;
|
105 |
+
}
|
106 |
+
|
107 |
|
108 |
/**
|
109 |
* The Main View
|
111 |
*/
|
112 |
public function pageListing()
|
113 |
{
|
114 |
+
include( NP_Helpers::view('pages') );
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Get Trash Count (pages)
|
119 |
+
*/
|
120 |
+
private function trashCount()
|
121 |
+
{
|
122 |
+
$trashed = new WP_Query(array('post_type'=>'page','post_status'=>'trash','posts_per_page'=>-1));
|
123 |
+
return $trashed->found_posts;
|
124 |
}
|
125 |
|
126 |
|
165 |
return $out;
|
166 |
}
|
167 |
|
168 |
+
/**
|
169 |
+
* Display Confirmation Message
|
170 |
+
* @todo add styling to clear floats
|
171 |
+
*/
|
172 |
+
private function confirmation()
|
173 |
+
{
|
174 |
+
$confirmation = new NP_Confirmation;
|
175 |
+
return $confirmation->getMessage();
|
176 |
+
}
|
177 |
+
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Opening list tag <ol>
|
181 |
+
* @param array $pages - array of page objects from current query
|
182 |
+
* @param int $count - current count in loop
|
183 |
+
*/
|
184 |
+
private function listOpening($pages, $count)
|
185 |
+
{
|
186 |
+
// Get array of child pages
|
187 |
+
$children = array();
|
188 |
+
$all_children = $pages->posts;
|
189 |
+
foreach($all_children as $child){
|
190 |
+
array_push($children, $child->ID);
|
191 |
+
}
|
192 |
+
// Compare child pages with user's toggled pages
|
193 |
+
$compared = array_intersect($this->visiblePages(), $children);
|
194 |
+
|
195 |
+
if ( $count == 1 ) {
|
196 |
+
echo ( current_user_can('edit_theme_options') )
|
197 |
+
? '<ol class="sortable nplist">'
|
198 |
+
: '<ol class="sortable no-sort nplist">';
|
199 |
+
} else {
|
200 |
+
echo '<ol class="nplist"';
|
201 |
+
if ( count($compared) > 0 ) echo ' style="display:block;"';
|
202 |
+
echo '>';
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Set Post Data
|
209 |
+
*/
|
210 |
+
private function setPostData($post)
|
211 |
+
{
|
212 |
+
$this->post_data['template'] = get_post_meta($post->ID, '_wp_page_template', true);
|
213 |
+
|
214 |
+
// Show Hide in generated nav menu
|
215 |
+
$ns = get_post_meta( get_the_id(), 'np_nav_status', true);
|
216 |
+
$this->post_data['nav_status'] = ( $ns == 'hide' ) ? 'hide' : 'show';
|
217 |
+
|
218 |
+
// Hidden in Nested Pages?
|
219 |
+
$np_status = get_post_meta( get_the_id(), 'nested_pages_status', true );
|
220 |
+
$this->post_data['np_status'] = ( $np_status == 'hide' ) ? 'hide' : 'show';
|
221 |
+
|
222 |
+
// Menu Title
|
223 |
+
$this->post_data['nav_title'] = get_post_meta(get_the_id(), 'np_nav_title', true);
|
224 |
+
|
225 |
+
// Redirect Link Target
|
226 |
+
$this->post_data['link_target'] = get_post_meta(get_the_id(), 'np_link_target', true);
|
227 |
+
|
228 |
+
// Parent ID
|
229 |
+
$this->post_data['parent_id'] = $post->post_parent;
|
230 |
+
|
231 |
+
// Nav Title Attribute
|
232 |
+
$this->post_data['nav_title_attr'] = get_post_meta(get_the_id(), 'np_title_attribute', true);
|
233 |
+
|
234 |
+
// Nav CSS Classes
|
235 |
+
$this->post_data['nav_css'] = get_post_meta(get_the_id(), 'np_nav_css_classes', true);
|
236 |
+
|
237 |
+
// Yoast Score
|
238 |
+
if ( function_exists('wpseo_translate_score') ) {
|
239 |
+
$yoast_score = get_post_meta(get_the_id(), '_yoast_wpseo_linkdex', true);
|
240 |
+
$this->post_data['score'] = wpseo_translate_score($yoast_score);
|
241 |
+
};
|
242 |
+
|
243 |
+
// Date Vars
|
244 |
+
$this->post_data['d'] = get_the_time('d');
|
245 |
+
$this->post_data['month'] = get_the_time('m');
|
246 |
+
$this->post_data['y'] = get_the_time('Y');
|
247 |
+
$this->post_data['h'] = get_the_time('H');
|
248 |
+
$this->post_data['m'] = get_the_time('i');
|
249 |
+
}
|
250 |
+
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Get count of published posts
|
254 |
+
* @param object $pages
|
255 |
+
*/
|
256 |
+
private function publishCount($pages)
|
257 |
+
{
|
258 |
+
$publish_count = 1;
|
259 |
+
foreach ( $pages->posts as $p ){
|
260 |
+
if ( $p->post_status !== 'trash' ) $publish_count++;
|
261 |
+
}
|
262 |
+
return $publish_count;
|
263 |
+
}
|
264 |
+
|
265 |
|
266 |
/**
|
267 |
* Loop through all the pages and create the nested / sortable list
|
269 |
*/
|
270 |
private function loopPages($parent_id = 0, $count = 0)
|
271 |
{
|
272 |
+
$this->setTaxonomies();
|
273 |
$pages = new WP_Query(array(
|
274 |
+
'post_type' => array('page','np-redirect'),
|
275 |
'posts_per_page' => -1,
|
276 |
'orderby' => 'menu_order',
|
277 |
+
'post_status' => array('publish','trash'),
|
278 |
'post_parent' => $parent_id,
|
279 |
'order' => 'ASC'
|
280 |
));
|
281 |
if ( $pages->have_posts() ) :
|
282 |
$count++;
|
283 |
|
284 |
+
if ( $this->publishCount($pages) > 1 ){
|
285 |
+
$this->listOpening($pages, $count);
|
286 |
+
}
|
287 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
while ( $pages->have_posts() ) : $pages->the_post();
|
289 |
|
290 |
global $post;
|
291 |
+
$this->setPostData($post);
|
292 |
+
if ( get_post_status(get_the_id()) !== 'trash' ) :
|
293 |
|
294 |
+
echo '<li id="menuItem_' . get_the_id() . '" class="page-row';
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
|
296 |
+
// Published?
|
297 |
+
if ( $post->post_status == 'publish' ) echo ' published';
|
|
|
|
|
|
|
298 |
|
299 |
+
// Hidden in Nested Pages?
|
300 |
+
if ( $this->post_data['np_status'] == 'hide' ) echo ' np-hide';
|
|
|
|
|
|
|
301 |
|
302 |
+
// Taxonomies
|
303 |
+
echo ' ' . $this->hierarchicalTaxonomies( get_the_id() );
|
304 |
|
305 |
+
echo '">';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
|
307 |
+
$count++;
|
308 |
+
|
309 |
+
if ( get_post_type() == 'page' ){
|
310 |
+
include( NP_Helpers::view('row') );
|
311 |
+
} else {
|
312 |
+
include( NP_Helpers::view('row-redirect') );
|
313 |
+
}
|
314 |
+
|
315 |
+
endif; // trash status
|
316 |
+
|
317 |
$this->loopPages(get_the_id(), $count);
|
318 |
+
|
319 |
+
if ( get_post_status(get_the_id()) !== 'trash' ) {
|
320 |
+
echo '</li>';
|
321 |
+
}
|
322 |
|
323 |
endwhile; // Loop
|
324 |
+
|
325 |
+
if ( $this->publishCount($pages) > 1 ){
|
326 |
+
echo '</ol>';
|
327 |
+
}
|
328 |
+
|
329 |
endif; wp_reset_postdata();
|
330 |
}
|
331 |
|
includes/class-np-validation.php
CHANGED
@@ -67,4 +67,31 @@ class NP_Validation {
|
|
67 |
}
|
68 |
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
67 |
}
|
68 |
|
69 |
|
70 |
+
/**
|
71 |
+
* Validate new redirect/link fields
|
72 |
+
*/
|
73 |
+
public function validateRedirect($data)
|
74 |
+
{
|
75 |
+
if ( (!isset($data['np_link_title'])) || ($data['np_link_title'] == "") ){
|
76 |
+
return wp_send_json(array('status' => 'error', 'message' => __('Please provide a menu title.', 'nestedpages') ));
|
77 |
+
}
|
78 |
+
if ( (!isset($data['np_link_content'])) || ($data['np_link_content'] == "") ){
|
79 |
+
return wp_send_json(array('status' => 'error', 'message' => __('Please provide a valid URL.', 'nestedpages') ));
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Validate a string isn't empty
|
86 |
+
*/
|
87 |
+
public function checkEmpty($var, $title)
|
88 |
+
{
|
89 |
+
if ( $var == "" ){
|
90 |
+
$message = __('Please provide a ', 'nestedpages') . $title;
|
91 |
+
return wp_send_json(array('status' => 'error', 'message' => $message));
|
92 |
+
die();
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
}
|
languages/nestedpages.mo
CHANGED
Binary file
|
languages/nestedpages.pot
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Nested Pages\n"
|
4 |
-
"POT-Creation-Date: 2014-
|
5 |
-
"PO-Revision-Date: 2014-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
-
"Language: es\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -15,42 +14,87 @@ msgstr ""
|
|
15 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
16 |
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
17 |
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
|
21 |
-
#: includes/class-np-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
msgid "Expand Pages"
|
23 |
msgstr ""
|
24 |
|
25 |
-
#: includes/class-np-dependencies.php:
|
26 |
msgid "Collapse Pages"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: includes/class-np-
|
30 |
-
msgid "
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: includes/class-np-
|
34 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/class-np-handler-
|
|
|
|
|
|
|
|
|
38 |
msgid "There was an error updating the page."
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/class-np-handler-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
msgid "Page order successfully updated."
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: includes/class-np-handler-sort.php:
|
46 |
msgid "There was an order updating the page order."
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: includes/class-np-handler-syncmenu.php:
|
50 |
msgid "Menu sync enabled."
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: includes/class-np-handler-syncmenu.php:
|
54 |
msgid "Menu sync disabled."
|
55 |
msgstr ""
|
56 |
|
@@ -58,110 +102,174 @@ msgstr ""
|
|
58 |
msgid "Adding child page under:"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: includes/class-np-pagelisting.php:
|
62 |
msgid "All Pages"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: includes/class-np-pagelisting.php:
|
66 |
msgid "Add New"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: includes/class-np-pagelisting.php:
|
70 |
msgid "Default Pages"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: includes/class-np-
|
74 |
-
msgid "
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: views/
|
78 |
-
msgid "
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: views/
|
82 |
-
msgid "
|
83 |
msgstr ""
|
84 |
|
85 |
-
#:
|
86 |
-
msgid "
|
87 |
msgstr ""
|
88 |
|
89 |
-
#:
|
90 |
-
msgid "
|
91 |
msgstr ""
|
92 |
|
93 |
-
#:
|
94 |
-
msgid "
|
95 |
msgstr ""
|
96 |
|
97 |
-
#:
|
98 |
-
msgid "
|
99 |
msgstr ""
|
100 |
|
101 |
-
#:
|
102 |
-
msgid "
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: views/
|
106 |
-
msgid "
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: views/quickedit.php:
|
110 |
-
msgid "
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: views/quickedit.php:
|
114 |
-
|
|
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: views/quickedit.php:
|
118 |
-
|
|
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: views/quickedit.php:
|
|
|
122 |
msgid "Scheduled"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: views/quickedit.php:
|
|
|
126 |
msgid "Pending Review"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: views/quickedit.php:
|
|
|
130 |
msgid "Draft"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: views/quickedit.php:
|
134 |
-
|
|
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: views/quickedit.php:
|
138 |
-
|
|
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: views/quickedit.php:
|
142 |
-
|
|
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: views/
|
146 |
-
msgid "
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: views/
|
150 |
-
msgid "
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: views/
|
154 |
-
msgid "
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: views/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
msgid "Cancel"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: views/quickedit.php:
|
162 |
msgid "Update"
|
163 |
msgstr ""
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
#: views/row.php:42
|
166 |
msgid "currently editing"
|
167 |
msgstr ""
|
@@ -170,10 +278,10 @@ msgstr ""
|
|
170 |
msgid "Edit"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: views/row.php:
|
174 |
msgid "Add Child"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: views/row.php:
|
178 |
msgid "View"
|
179 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Nested Pages\n"
|
4 |
+
"POT-Creation-Date: 2014-11-08 19:39-0500\n"
|
5 |
+
"PO-Revision-Date: 2014-11-08 19:39-0500\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
|
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
14 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
15 |
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
16 |
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
|
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
+
#: includes/class-np-confirmation.php:57
|
20 |
+
msgid "pages moved to the Trash"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: includes/class-np-confirmation.php:59
|
24 |
+
msgid "page moved to the Trash"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: includes/class-np-confirmation.php:64
|
28 |
+
msgid "Undo"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: includes/class-np-confirmation.php:80
|
32 |
+
msgid "pages"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: includes/class-np-confirmation.php:80
|
36 |
+
msgid "page"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: includes/class-np-confirmation.php:81
|
40 |
+
msgid "restored from trash"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: includes/class-np-dependencies.php:77 views/pages.php:15
|
44 |
msgid "Expand Pages"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: includes/class-np-dependencies.php:78
|
48 |
msgid "Collapse Pages"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: includes/class-np-dependencies.php:79 views/pages.php:31
|
52 |
+
msgid "Show Hidden"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: includes/class-np-dependencies.php:80
|
56 |
+
msgid "Hide Hidden"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: includes/class-np-dependencies.php:81 views/link-form.php:13
|
60 |
+
#: views/pages.php:8
|
61 |
+
msgid "Add Link"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: includes/class-np-dependencies.php:82
|
65 |
+
msgid "Add Child Link"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: includes/class-np-handler-base.php:64
|
69 |
+
msgid "Incorrect Form Field"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: includes/class-np-handler-base.php:94
|
73 |
msgid "There was an error updating the page."
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: includes/class-np-handler-newredirect.php:40
|
77 |
+
#: includes/class-np-handler-quickedit-redirect.php:36
|
78 |
+
msgid "Redirect successfully updated"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: includes/class-np-handler-quickedit.php:37
|
82 |
+
msgid "Post successfully updated"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: includes/class-np-handler-sort.php:36
|
86 |
msgid "Page order successfully updated."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: includes/class-np-handler-sort.php:38
|
90 |
msgid "There was an order updating the page order."
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: includes/class-np-handler-syncmenu.php:32
|
94 |
msgid "Menu sync enabled."
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: includes/class-np-handler-syncmenu.php:35
|
98 |
msgid "Menu sync disabled."
|
99 |
msgstr ""
|
100 |
|
102 |
msgid "Adding child page under:"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: includes/class-np-pagelisting.php:71
|
106 |
msgid "All Pages"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: includes/class-np-pagelisting.php:72
|
110 |
msgid "Add New"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: includes/class-np-pagelisting.php:73
|
114 |
msgid "Default Pages"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: includes/class-np-posttypes.php:21
|
118 |
+
msgid "Redirects"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: includes/class-np-posttypes.php:22 views/quickedit-redirect.php:8
|
122 |
+
msgid "Redirect"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/class-np-repository-post.php:56 views/quickedit.php:20
|
126 |
+
msgid "Title"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/class-np-repository-post.php:256 views/quickedit-redirect.php:17
|
130 |
+
msgid "Label"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: includes/class-np-validation.php:49 includes/class-np-validation.php:64
|
134 |
+
msgid "Please provide a valid date."
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: includes/class-np-validation.php:76
|
138 |
+
msgid "Please provide a menu title."
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: includes/class-np-validation.php:79
|
142 |
+
msgid "Please provide a valid URL."
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: includes/class-np-validation.php:90
|
146 |
+
msgid "Please provide a "
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: views/link-form.php:23
|
150 |
+
msgid "Menu Title"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: views/link-form.php:28 views/quickedit-redirect.php:22
|
154 |
+
msgid "URL"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: views/link-form.php:33 views/quickedit-redirect.php:27
|
158 |
+
#: views/quickedit.php:55
|
159 |
+
msgid "Status"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: views/link-form.php:36 views/pages.php:30 views/quickedit-redirect.php:30
|
163 |
+
#: views/quickedit.php:58
|
164 |
+
msgid "Published"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: views/link-form.php:37 views/quickedit-redirect.php:31
|
168 |
+
#: views/quickedit.php:59
|
169 |
msgid "Scheduled"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: views/link-form.php:39 views/quickedit-redirect.php:33
|
173 |
+
#: views/quickedit.php:61
|
174 |
msgid "Pending Review"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: views/link-form.php:40 views/quickedit-redirect.php:34
|
178 |
+
#: views/quickedit.php:62
|
179 |
msgid "Draft"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: views/link-form.php:51 views/quickedit-redirect.php:54
|
183 |
+
#: views/quickedit.php:141
|
184 |
+
msgid "Hide in Nav Menu"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: views/link-form.php:56 views/quickedit-redirect.php:60
|
188 |
+
#: views/quickedit.php:87
|
189 |
+
msgid "Hide in Nested Pages"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: views/link-form.php:61 views/quickedit-redirect.php:66
|
193 |
+
#: views/quickedit.php:147
|
194 |
+
msgid "Open link in new window"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: views/link-form.php:73
|
198 |
+
msgid "Save Link"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: views/pages.php:21
|
202 |
+
msgid "Sync Menu"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: views/pages.php:29
|
206 |
+
msgid "All"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: views/pages.php:34
|
210 |
+
msgid "Trash"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: views/pages.php:37
|
214 |
+
msgid "Default"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: views/quickedit-redirect.php:44 views/quickedit.php:129
|
218 |
+
msgid "Title Attribute"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: views/quickedit-redirect.php:48 views/quickedit.php:133
|
222 |
+
msgid "CSS Classes"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: views/quickedit-redirect.php:81 views/quickedit.php:161
|
226 |
msgid "Cancel"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: views/quickedit-redirect.php:84 views/quickedit.php:164
|
230 |
msgid "Update"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: views/quickedit.php:11 views/row-redirect.php:53 views/row.php:92
|
234 |
+
msgid "Quick Edit"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: views/quickedit.php:24
|
238 |
+
msgid "Slug"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: views/quickedit.php:28
|
242 |
+
msgid "Date"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: views/quickedit.php:46
|
246 |
+
msgid "Author"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: views/quickedit.php:70
|
250 |
+
msgid "Template"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: views/quickedit.php:72
|
254 |
+
msgid "Default Template"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: views/quickedit.php:79
|
258 |
+
msgid "Allow Comments"
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: views/quickedit.php:94
|
262 |
+
msgid "Menu Options"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: views/quickedit.php:100
|
266 |
+
msgid "Edit Taxonomies"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: views/quickedit.php:125
|
270 |
+
msgid "Navigation Label"
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
#: views/row.php:42
|
274 |
msgid "currently editing"
|
275 |
msgstr ""
|
278 |
msgid "Edit"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: views/row.php:67
|
282 |
msgid "Add Child"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: views/row.php:96
|
286 |
msgid "View"
|
287 |
msgstr ""
|
nestedpages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Nested Pages
|
4 |
Plugin URI: http://nestedpages.com
|
5 |
Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while maintaining quick edit functionality.
|
6 |
-
Version: 1.
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
License: GPLv2 or later.
|
3 |
Plugin Name: Nested Pages
|
4 |
Plugin URI: http://nestedpages.com
|
5 |
Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while maintaining quick edit functionality.
|
6 |
+
Version: 1.1
|
7 |
Author: Kyle Phillips
|
8 |
Author URI: https://github.com/kylephillips
|
9 |
License: GPLv2 or later.
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://nestedpages.com/
|
|
4 |
Tags: pages, admin, nested, tree view, page tree, sort, quick edit
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -22,7 +22,7 @@ Nested Pages provides an intuitive drag and drop interface for managing pages in
|
|
22 |
|
23 |
For more information visit [nestedpages.com](http://nestedpages.com).
|
24 |
|
25 |
-
**Nested Pages requires Wordpress version 3.8 or higher, and PHP version 5.
|
26 |
|
27 |
== Installation ==
|
28 |
|
@@ -66,9 +66,22 @@ Hierarchical taxonomies are currently supported
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
= 1.0 =
|
70 |
* Nested Pages
|
71 |
|
|
|
|
|
|
|
|
|
|
|
72 |
== More Information ==
|
73 |
|
74 |
= Generated Menu =
|
4 |
Tags: pages, admin, nested, tree view, page tree, sort, quick edit
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
22 |
|
23 |
For more information visit [nestedpages.com](http://nestedpages.com).
|
24 |
|
25 |
+
**Nested Pages requires Wordpress version 3.8 or higher, and PHP version 5.3 or higher.**
|
26 |
|
27 |
== Installation ==
|
28 |
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 1.1 =
|
70 |
+
* Expanded/Collapsed states now saved for each user
|
71 |
+
* Trash functionality added
|
72 |
+
* Trashing pages now redirects to Nested Pages view
|
73 |
+
* Trash link added to quickly get to a list of trashed pages
|
74 |
+
* New "Add link" functionality – creates custom link menu items
|
75 |
+
* Additional options added for generated menu items - title attribute, css classes, link target
|
76 |
+
|
77 |
= 1.0 =
|
78 |
* Nested Pages
|
79 |
|
80 |
+
== Upgrade Notice ==
|
81 |
+
|
82 |
+
= 1.1 =
|
83 |
+
Several new features have been added in version 1.1, including: saved toggle states, additional menu options, trash functionality, ability to add "link" menu items, and more.
|
84 |
+
|
85 |
== More Information ==
|
86 |
|
87 |
= Generated Menu =
|
views/pages.php
CHANGED
@@ -1,16 +1,22 @@
|
|
|
|
1 |
<div class="wrap">
|
2 |
|
3 |
<h2>
|
4 |
<?php echo $this->post_type->labels->name; ?>
|
5 |
<a href="<?php echo $this->addNewPageLink(); ?>" class="add-new-h2"><?php echo $this->post_type->labels->add_new; ?></a>
|
|
|
|
|
|
|
6 |
</h2>
|
7 |
|
8 |
-
<
|
|
|
|
|
9 |
<li><a href="#" class="np-btn" data-toggle="closed"><?php _e('Expand Pages'); ?></a></li>
|
10 |
</ul>
|
11 |
|
12 |
<?php if ( current_user_can('edit_theme_options') ) : ?>
|
13 |
-
<div class="np-sync-menu-cont"
|
14 |
<label>
|
15 |
<input type="checkbox" name="np_sync_menu" class="np-sync-menu" value="sync" <?php if ( get_option('nestedpages_menusync') == 'sync' ) echo 'checked'; ?>/> <?php _e('Sync Menu'); ?>
|
16 |
</label>
|
@@ -22,7 +28,12 @@
|
|
22 |
<ul class="subsubsub">
|
23 |
<li><a href="#all" class="np-toggle-publish active"><?php _e('All'); ?></a> | </li>
|
24 |
<li><a href="#published" class="np-toggle-publish"><?php _e('Published'); ?></a> | </li>
|
25 |
-
<li><a href="#show" class="np-toggle-hidden"><?php _e('Show Hidden
|
|
|
|
|
|
|
|
|
|
|
26 |
<li><a href="<?php echo $this->defaultPagesLink(); ?>"><?php _e('Default'); ?> <?php echo $this->post_type->labels->name; ?></a></li>
|
27 |
</ul>
|
28 |
|
@@ -32,8 +43,16 @@
|
|
32 |
<?php $this->loopPages(); ?>
|
33 |
|
34 |
<div class="quick-edit quick-edit-form" style="display:none;">
|
35 |
-
<?php include('quickedit
|
|
|
|
|
|
|
|
|
|
|
36 |
</div>
|
|
|
37 |
</div>
|
38 |
|
39 |
-
</div><!-- .wrap -->
|
|
|
|
1 |
+
<?php add_thickbox(); ?>
|
2 |
<div class="wrap">
|
3 |
|
4 |
<h2>
|
5 |
<?php echo $this->post_type->labels->name; ?>
|
6 |
<a href="<?php echo $this->addNewPageLink(); ?>" class="add-new-h2"><?php echo $this->post_type->labels->add_new; ?></a>
|
7 |
+
<?php if ( current_user_can('publish_pages') ) : ?>
|
8 |
+
<a href="#" class="add-new-h2 open-redirect-modal" title="<?php _e('Add Link', 'nestedpages'); ?>" data-parentid="0"><?php _e('Add Link', 'nestedpages'); ?></a>
|
9 |
+
<?php endif; ?>
|
10 |
</h2>
|
11 |
|
12 |
+
<?php if ( $this->confirmation() ) echo $this->confirmation() . '<div style="clear:both;"></div>'; ?>
|
13 |
+
|
14 |
+
<ul class="nestedpages-toggleall" <?php if ( $this->confirmation() ) echo 'style="margin-top:0"';?>>
|
15 |
<li><a href="#" class="np-btn" data-toggle="closed"><?php _e('Expand Pages'); ?></a></li>
|
16 |
</ul>
|
17 |
|
18 |
<?php if ( current_user_can('edit_theme_options') ) : ?>
|
19 |
+
<div class="np-sync-menu-cont" <?php if ( $this->confirmation() ) echo 'style="margin-top:2px;"';?>>
|
20 |
<label>
|
21 |
<input type="checkbox" name="np_sync_menu" class="np-sync-menu" value="sync" <?php if ( get_option('nestedpages_menusync') == 'sync' ) echo 'checked'; ?>/> <?php _e('Sync Menu'); ?>
|
22 |
</label>
|
28 |
<ul class="subsubsub">
|
29 |
<li><a href="#all" class="np-toggle-publish active"><?php _e('All'); ?></a> | </li>
|
30 |
<li><a href="#published" class="np-toggle-publish"><?php _e('Published'); ?></a> | </li>
|
31 |
+
<li><a href="#show" class="np-toggle-hidden"><?php _e('Show Hidden'); ?></a> | </li>
|
32 |
+
<?php if ( current_user_can('delete_pages') ) : ?>
|
33 |
+
<li><a href="edit.php?post_status=trash&post_type=page">
|
34 |
+
<?php _e('Trash'); ?> (<?php echo $this->trashCount(); ?>)
|
35 |
+
</a></li> | </li>
|
36 |
+
<?php endif; ?>
|
37 |
<li><a href="<?php echo $this->defaultPagesLink(); ?>"><?php _e('Default'); ?> <?php echo $this->post_type->labels->name; ?></a></li>
|
38 |
</ul>
|
39 |
|
43 |
<?php $this->loopPages(); ?>
|
44 |
|
45 |
<div class="quick-edit quick-edit-form" style="display:none;">
|
46 |
+
<?php include( NP_Helpers::view('quickedit') ); ?>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
<?php if ( current_user_can('publish_pages') ) : ?>
|
50 |
+
<div class="quick-edit quick-edit-form-redirect" style="display:none;">
|
51 |
+
<?php include( NP_Helpers::view('quickedit-redirect') ); ?>
|
52 |
</div>
|
53 |
+
<?php endif; ?>
|
54 |
</div>
|
55 |
|
56 |
+
</div><!-- .wrap -->
|
57 |
+
|
58 |
+
<?php include( NP_Helpers::view('link-form') ); ?>
|
views/quickedit.php
CHANGED
@@ -79,17 +79,8 @@
|
|
79 |
<span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
|
80 |
</label>
|
81 |
</div>
|
|
|
82 |
<?php if ( current_user_can('edit_theme_options') ) : ?>
|
83 |
-
<div class="form-control">
|
84 |
-
<label><?php _e( 'Menu Title' ); ?></label>
|
85 |
-
<input type="text" name="np_nav_title" class="np_nav_title" value="" />
|
86 |
-
</div>
|
87 |
-
<div class="comments">
|
88 |
-
<label>
|
89 |
-
<input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
|
90 |
-
<span class="checkbox-title"><?php _e( 'Hide in Nav Menu' ); ?></span>
|
91 |
-
</label>
|
92 |
-
</div>
|
93 |
<div class="comments">
|
94 |
<label>
|
95 |
<input type="checkbox" name="nested_pages_status" class="np_status" value="hide" />
|
@@ -98,9 +89,15 @@
|
|
98 |
</div>
|
99 |
<?php endif; // Edit theme options?>
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
<?php if ( !empty($this->h_taxonomies) ) : ?>
|
102 |
<div class="form-control">
|
103 |
-
<a href="#" class="np-btn np-toggle-taxonomies"><?php _e('Edit Taxonomies'); ?></a>
|
104 |
</div>
|
105 |
<?php endif; ?>
|
106 |
|
@@ -120,6 +117,40 @@
|
|
120 |
</div><!-- .taxonomies -->
|
121 |
<?php endif; // if taxonomies ?>
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
</div><!-- .fields -->
|
124 |
|
125 |
</div><!-- .form-interior -->
|
79 |
<span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
|
80 |
</label>
|
81 |
</div>
|
82 |
+
|
83 |
<?php if ( current_user_can('edit_theme_options') ) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
<div class="comments">
|
85 |
<label>
|
86 |
<input type="checkbox" name="nested_pages_status" class="np_status" value="hide" />
|
89 |
</div>
|
90 |
<?php endif; // Edit theme options?>
|
91 |
|
92 |
+
<?php if ( current_user_can('edit_theme_options') ) : // Menu Options Button ?>
|
93 |
+
<div class="form-control">
|
94 |
+
<a href="#" class="np-btn np-toggle-menuoptions"><?php _e('Menu Options', 'nestedpages'); ?></a>
|
95 |
+
</div>
|
96 |
+
<?php endif; ?>
|
97 |
+
|
98 |
<?php if ( !empty($this->h_taxonomies) ) : ?>
|
99 |
<div class="form-control">
|
100 |
+
<a href="#" class="np-btn np-toggle-taxonomies"><?php _e('Edit Taxonomies', 'nestedpages'); ?></a>
|
101 |
</div>
|
102 |
<?php endif; ?>
|
103 |
|
117 |
</div><!-- .taxonomies -->
|
118 |
<?php endif; // if taxonomies ?>
|
119 |
|
120 |
+
|
121 |
+
<?php if ( current_user_can('edit_theme_options') ) : // Menu Options?>
|
122 |
+
<div class="np-menuoptions">
|
123 |
+
<div class="menuoptions-left">
|
124 |
+
<div class="form-control">
|
125 |
+
<label><?php _e( 'Navigation Label', 'nestedpages' ); ?></label>
|
126 |
+
<input type="text" name="np_nav_title" class="np_nav_title" value="" />
|
127 |
+
</div>
|
128 |
+
<div class="form-control">
|
129 |
+
<label><?php _e( 'Title Attribute', 'nestedpages' ); ?></label>
|
130 |
+
<input type="text" name="np_title_attribute" class="np_title_attribute" value="" />
|
131 |
+
</div>
|
132 |
+
<div class="form-control">
|
133 |
+
<label><?php _e( 'CSS Classes', 'nestedpages' ); ?></label>
|
134 |
+
<input type="text" name="np_nav_css_classes" class="np_nav_css_classes" value="" />
|
135 |
+
</div>
|
136 |
+
</div><!-- .menuoptions-left -->
|
137 |
+
<div class="menuoptions-right">
|
138 |
+
<div class="form-control">
|
139 |
+
<label>
|
140 |
+
<input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
|
141 |
+
<span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'nestedpages' ); ?></span>
|
142 |
+
</label>
|
143 |
+
</div>
|
144 |
+
<div class="form-control">
|
145 |
+
<label>
|
146 |
+
<input type="checkbox" name="link_target" class="link_target" value="_blank" />
|
147 |
+
<span class="checkbox-title"><?php _e( 'Open link in new window', 'nestedpages' ); ?></span>
|
148 |
+
</label>
|
149 |
+
</div>
|
150 |
+
</div><!-- .menuoptions-right -->
|
151 |
+
</div>
|
152 |
+
<?php endif; ?>
|
153 |
+
|
154 |
</div><!-- .fields -->
|
155 |
|
156 |
</div><!-- .form-interior -->
|
views/row.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
<?php
|
16 |
|
17 |
if ( function_exists('wpseo_translate_score') ){
|
18 |
-
echo '<span class="np-seo-indicator ' . $score . '"></span>';
|
19 |
}
|
20 |
|
21 |
// Post Status
|
@@ -26,11 +26,11 @@
|
|
26 |
}
|
27 |
|
28 |
// Nested Pages Status
|
29 |
-
if ( $np_status == 'hide' )
|
30 |
echo '<i class="np-icon-eye-blocked"></i>';
|
31 |
|
32 |
// Nav Status
|
33 |
-
if ( $nav_status == 'hide' ){
|
34 |
echo '<span class="nav-status">(Hidden)</span>';
|
35 |
} else {
|
36 |
echo '<span class="nav-status"></span>';
|
@@ -51,42 +51,56 @@
|
|
51 |
<div class="action-buttons">
|
52 |
|
53 |
<?php if ( $post->comment_status == 'open' ) : $comments = wp_count_comments(get_the_id()); $cs = 'open' ?>
|
|
|
54 |
|
55 |
<a href="<?php echo admin_url( 'edit-comments.php?p=' . get_the_id() ); ?>" class="np-btn">
|
56 |
<i class="np-icon-bubble"></i> <?php echo $comments->total_comments; ?>
|
57 |
</a>
|
58 |
|
59 |
<?php else : $cs = 'closed'; endif; ?>
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
<a href="<?php echo $this->addNewPageLink(); ?>&npparent=<?php echo get_the_id(); ?>" class="np-btn"><?php _e('Add Child', 'nestedpages'); ?></a>
|
62 |
|
|
|
|
|
63 |
<?php if ( !$user = wp_check_post_lock(get_the_id()) ) : ?>
|
64 |
<a href="#"
|
65 |
class="np-btn np-quick-edit"
|
66 |
data-id="<?php echo get_the_id(); ?>"
|
67 |
-
data-template="<?php echo $template; ?>"
|
68 |
data-title="<?php the_title(); ?>"
|
69 |
data-slug="<?php echo $post->post_name; ?>"
|
70 |
data-commentstatus="<?php echo $cs; ?>"
|
71 |
data-status="<?php echo get_post_status(); ?>"
|
72 |
-
data-np-status="<?php echo $np_status; ?>"
|
73 |
-
data-navstatus="<?php echo $nav_status; ?>"
|
74 |
-
data-
|
|
|
|
|
|
|
75 |
data-author="<?php echo $post->post_author; ?>"
|
76 |
-
data-month="<?php echo $month; ?>"
|
77 |
-
data-day="<?php echo $d; ?>"
|
78 |
-
data-year="<?php echo $y; ?>"
|
79 |
-
data-hour="<?php echo $h; ?>"
|
80 |
-
data-minute="<?php echo $m; ?>">
|
81 |
<?php _e('Quick Edit', 'nestedpages'); ?>
|
82 |
</a>
|
83 |
<?php endif; ?>
|
84 |
|
85 |
<a href="<?php echo get_the_permalink(); ?>" class="np-btn"><?php _e('View', 'nestedpages'); ?></a>
|
86 |
-
|
87 |
-
|
|
|
88 |
<i class="np-icon-remove"></i>
|
89 |
-
</a>
|
|
|
|
|
90 |
</div><!-- .action-buttons -->
|
91 |
</div><!-- .row-inner -->
|
92 |
</div><!-- .row -->
|
15 |
<?php
|
16 |
|
17 |
if ( function_exists('wpseo_translate_score') ){
|
18 |
+
echo '<span class="np-seo-indicator ' . $this->post_data['score'] . '"></span>';
|
19 |
}
|
20 |
|
21 |
// Post Status
|
26 |
}
|
27 |
|
28 |
// Nested Pages Status
|
29 |
+
if ( $this->post_data['np_status'] == 'hide' )
|
30 |
echo '<i class="np-icon-eye-blocked"></i>';
|
31 |
|
32 |
// Nav Status
|
33 |
+
if ( $this->post_data['nav_status'] == 'hide' ){
|
34 |
echo '<span class="nav-status">(Hidden)</span>';
|
35 |
} else {
|
36 |
echo '<span class="nav-status"></span>';
|
51 |
<div class="action-buttons">
|
52 |
|
53 |
<?php if ( $post->comment_status == 'open' ) : $comments = wp_count_comments(get_the_id()); $cs = 'open' ?>
|
54 |
+
|
55 |
|
56 |
<a href="<?php echo admin_url( 'edit-comments.php?p=' . get_the_id() ); ?>" class="np-btn">
|
57 |
<i class="np-icon-bubble"></i> <?php echo $comments->total_comments; ?>
|
58 |
</a>
|
59 |
|
60 |
<?php else : $cs = 'closed'; endif; ?>
|
61 |
+
|
62 |
+
|
63 |
+
<?php if ( current_user_can('publish_pages') ) : ?>
|
64 |
+
|
65 |
+
<a href="#" class="np-btn open-redirect-modal" data-parentid="<?php echo get_the_id(); ?>"><i class="np-icon-link"></i></a>
|
66 |
|
67 |
<a href="<?php echo $this->addNewPageLink(); ?>&npparent=<?php echo get_the_id(); ?>" class="np-btn"><?php _e('Add Child', 'nestedpages'); ?></a>
|
68 |
|
69 |
+
<?php endif; ?>
|
70 |
+
|
71 |
<?php if ( !$user = wp_check_post_lock(get_the_id()) ) : ?>
|
72 |
<a href="#"
|
73 |
class="np-btn np-quick-edit"
|
74 |
data-id="<?php echo get_the_id(); ?>"
|
75 |
+
data-template="<?php echo $this->post_data['template']; ?>"
|
76 |
data-title="<?php the_title(); ?>"
|
77 |
data-slug="<?php echo $post->post_name; ?>"
|
78 |
data-commentstatus="<?php echo $cs; ?>"
|
79 |
data-status="<?php echo get_post_status(); ?>"
|
80 |
+
data-np-status="<?php echo $this->post_data['np_status']; ?>"
|
81 |
+
data-navstatus="<?php echo $this->post_data['nav_status']; ?>"
|
82 |
+
data-navtitleattr="<?php echo $this->post_data['nav_title_attr']; ?>"
|
83 |
+
data-navcss="<?php echo $this->post_data['nav_css']; ?>"
|
84 |
+
data-linktarget="<?php echo $this->post_data['link_target']; ?>"
|
85 |
+
data-navtitle="<?php echo $this->post_data['nav_title']; ?>"
|
86 |
data-author="<?php echo $post->post_author; ?>"
|
87 |
+
data-month="<?php echo $this->post_data['month']; ?>"
|
88 |
+
data-day="<?php echo $this->post_data['d']; ?>"
|
89 |
+
data-year="<?php echo $this->post_data['y']; ?>"
|
90 |
+
data-hour="<?php echo $this->post_data['h']; ?>"
|
91 |
+
data-minute="<?php echo $this->post_data['m']; ?>">
|
92 |
<?php _e('Quick Edit', 'nestedpages'); ?>
|
93 |
</a>
|
94 |
<?php endif; ?>
|
95 |
|
96 |
<a href="<?php echo get_the_permalink(); ?>" class="np-btn"><?php _e('View', 'nestedpages'); ?></a>
|
97 |
+
|
98 |
+
<?php if ( current_user_can('delete_pages') ) : ?>
|
99 |
+
<a href="<?php echo get_delete_post_link(get_the_id()); ?>" class="np-btn np-btn-trash">
|
100 |
<i class="np-icon-remove"></i>
|
101 |
+
</a>
|
102 |
+
<?php endif; ?>
|
103 |
+
|
104 |
</div><!-- .action-buttons -->
|
105 |
</div><!-- .row-inner -->
|
106 |
</div><!-- .row -->
|