mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 05:33:36 +09:00
- wp-admin assets refactoring (in process);
This commit is contained in:
@@ -1,390 +0,0 @@
|
||||
@-webkit-keyframes um-ajax-spinning {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@-moz-keyframes um-ajax-spinning {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@-ms-keyframes um-ajax-spinning {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@keyframes um-ajax-spinning {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
/*
|
||||
- General
|
||||
*/
|
||||
|
||||
.um-admin-builder * {
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.um-admin-builder i {
|
||||
font-size: 15px !important;
|
||||
height: 100% !important;
|
||||
line-height: 100% !important;
|
||||
margin: 0 5px 0 0 !important;
|
||||
}
|
||||
|
||||
.um-admin-builder .um-admin-drag {margin-top: 40px}
|
||||
|
||||
/*
|
||||
- Add field
|
||||
*/
|
||||
.um-admin-drag-add-field {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
color: #aaa;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.um-admin-drag-add-field:hover {color: #0085ba}
|
||||
|
||||
.um-admin-drag-add-field i {
|
||||
font-size: 23px !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/*
|
||||
- Drag controls
|
||||
*/
|
||||
|
||||
.um-admin-drag-ctrls-demo.um-admin-drag-ctrls {
|
||||
position: absolute;
|
||||
right: 7px;
|
||||
top: -30px;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.um-admin-drag-ctrls {
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.um-admin-drag-ctrls a {
|
||||
float: left;
|
||||
margin: 0 5px 0 0;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background: #eee;
|
||||
color: #888;
|
||||
padding: 0 8px;
|
||||
text-decoration: none;
|
||||
border-radius: 2px 2px 0 0;
|
||||
}
|
||||
|
||||
.um-admin-drag-ctrls a:hover {background-color: #e5e5e5}
|
||||
|
||||
.um-admin-drag-ctrls a.active,
|
||||
.um-admin-drag-ctrls a.active:hover {
|
||||
/*background-color: #3ba1da;*/
|
||||
background-color: #0085ba;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.um-admin-drag-ctrls.columns a {width: 30px !important;background-image: url(../img/1-column.gif); background-repeat: no-repeat; background-position: center;}
|
||||
.um-admin-drag-ctrls.columns a:nth-child(2) {background-image: url(../img/2-columns.gif);}
|
||||
.um-admin-drag-ctrls.columns a:last-child {background-image: url(../img/3-columns.gif);}
|
||||
|
||||
.um-admin-drag-ctrls.columns a.active {background-image: url(../img/1-column-active.gif)}
|
||||
.um-admin-drag-ctrls.columns a.active:nth-child(2) {background-image: url(../img/2-columns-active.gif);}
|
||||
.um-admin-drag-ctrls.columns a.active:last-child {background-image: url(../img/3-columns-active.gif);}
|
||||
|
||||
/*
|
||||
- Drag Area
|
||||
*/
|
||||
|
||||
.um-admin-drag {
|
||||
width: 100%;
|
||||
background: #f1f1f1;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
padding: 60px 20px 20px 20px;
|
||||
}
|
||||
|
||||
.um-admin-drag-row {
|
||||
width: 100%;
|
||||
background: #fefefe;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
padding: 60px 20px 20px 20px;
|
||||
margin: 0 0 60px 0;
|
||||
position: relative;
|
||||
}
|
||||
.um-admin-drag-row:last-child {margin-bottom: 0}
|
||||
|
||||
.um-admin-drag-row-icons {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.um-admin-drag-rowsub {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: #f1f1f1;
|
||||
padding: 20px;
|
||||
margin: 0 0 60px 0;
|
||||
}
|
||||
.um-admin-drag-rowsub:last-child {margin-bottom: 0}
|
||||
|
||||
.um-admin-drag-rowsub-icons {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.um-admin-drag-col {
|
||||
float: left;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border: 1px dashed #bbb;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.um-admin-drag-col.cols-3 {width: 32%;}
|
||||
.um-admin-drag-col.cols-3.cols-last {width: 32%;}
|
||||
.um-admin-drag-col.cols-3.cols-middle {width: 32%;margin: 0 2%;}
|
||||
|
||||
.um-admin-drag-col.cols-1 {width: 100%;}
|
||||
.um-admin-drag-col.cols-1.cols-last {width: 100%;}
|
||||
.um-admin-drag-col.cols-1.cols-middle {}
|
||||
|
||||
.um-admin-drag-col.cols-2 {width: 49%;margin: 0 1% 0 0}
|
||||
.um-admin-drag-col.cols-2.cols-last {width: 49%;margin: 0 0 0 1%;}
|
||||
.um-admin-drag-col.cols-2.cols-middle {}
|
||||
|
||||
.um-admin-drag-addrow {
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
border: 1px dashed #bbb;
|
||||
padding: 10px 0;
|
||||
margin: 20px 0 0 0;
|
||||
}
|
||||
.um-admin-drag-addrow i {
|
||||
font-size: 23px !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.um-admin-drag-addrow:hover {color: #0085ba}
|
||||
|
||||
/*
|
||||
- Fields
|
||||
*/
|
||||
|
||||
.um-admin-drag-fld {
|
||||
display: block;
|
||||
position: relative;
|
||||
border: 1px solid #dddddd;
|
||||
margin: 0 0 15px 0;
|
||||
background: #F5F5F5;
|
||||
cursor: move !important;
|
||||
}
|
||||
|
||||
.um-admin-drag-fld-title i {
|
||||
width: 24px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.um-admin-drag-fld.um-field-type-group {background: #555;border: 0}
|
||||
.um-admin-drag-fld-title.um-field-type-group,.um-admin-drag-fld-type.um-field-type-group {color: #fff}
|
||||
.um-admin-drag-group {background: #FCFCFC;cursor: default;padding: 20px;border: 1px dashed #bbb;}
|
||||
.um-admin-drag-col.cols-3 .um-admin-drag-fld-icons.um-field-type-group{float: left;position: relative;bottom: auto;right: auto;height: 30px;display: block;}
|
||||
.um-admin-drag-fld-icons.um-field-type-group a.um_admin_duplicate_field {display: none !important}
|
||||
|
||||
.um-admin-drag-fld-title,
|
||||
.um-admin-drag-fld-type {
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin: 0 0 0 20px;
|
||||
}
|
||||
|
||||
.um-admin-drag-fld-type {
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.um-admin-drag-fld-icons {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/*
|
||||
- Responsive cols appearance
|
||||
*/
|
||||
|
||||
.um-admin-drag-col.cols-3 .um-admin-drag-fld-title,
|
||||
.um-admin-drag-col.cols-3 .um-admin-drag-fld-type {
|
||||
height: auto;
|
||||
line-height: 18px;
|
||||
margin: 10px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.um-admin-drag-col.cols-3 .um-admin-drag-fld-type {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.um-admin-drag-col.cols-3 .um-admin-drag-fld-icons {
|
||||
float: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
height: 30px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.um-admin-drag-col.cols-3 .um-admin-drag-fld:hover .um-admin-drag-fld-icons{display: block;}
|
||||
|
||||
/*
|
||||
- Icons
|
||||
*/
|
||||
|
||||
.um-admin-drag-row-icons a,
|
||||
.um-admin-drag-row-icons span,
|
||||
.um-admin-drag-rowsub-icons a,
|
||||
.um-admin-drag-rowsub-icons span,
|
||||
.um-admin-drag-fld-icons a{
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
width: 40px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
display: block !important;
|
||||
float: left;
|
||||
/*background: #44b0ec;*/
|
||||
background: #0085ba;
|
||||
padding: 0 4px;
|
||||
transition: all .2s linear;
|
||||
border-left: 1px solid #379dd5;
|
||||
}
|
||||
|
||||
.um-admin-drag-row-icons span,
|
||||
.um-admin-drag-rowsub-icons span
|
||||
{cursor: move!important}
|
||||
|
||||
.um-admin-drag-row-icons a:hover,
|
||||
.um-admin-drag-row-icons span:hover,
|
||||
.um-admin-drag-rowsub-icons a:hover,
|
||||
.um-admin-drag-rowsub-icons span:hover,
|
||||
.um-admin-drag-fld-icons a:hover {background: #008ec2;/*background: #3396cd;*/}
|
||||
|
||||
.um-admin-drag-row-icons i,
|
||||
.um-admin-drag-rowsub-icons i,
|
||||
.um-admin-drag-fld-icons i{
|
||||
font-size: 18px !important;
|
||||
margin: 0 !important;
|
||||
top: 2px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.um-admin-row-loading {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: calc( 100% + 30px );
|
||||
top: -30px;
|
||||
left: 0;
|
||||
background: rgba(241, 241, 241, 0.6);
|
||||
z-index: 999;
|
||||
display: none;
|
||||
}
|
||||
.um-admin-row-loading > span {
|
||||
display: block;
|
||||
-webkit-transition: 0.1s opacity;
|
||||
-moz-transition: 0.1s opacity;
|
||||
-ms-transition: 0.1s opacity;
|
||||
-o-transition: 0.1s opacity;
|
||||
transition: 0.1s opacity;
|
||||
color: #c6c6c6 !important;
|
||||
-webkit-animation: um-ajax-spinning 1.1s infinite linear;
|
||||
animation: um-ajax-spinning 1.1s infinite linear;
|
||||
border-top: 0.2em solid rgba(0, 0, 0, 1);
|
||||
border-right: 0.2em solid rgba(0, 0, 0, 1);
|
||||
border-bottom: 0.2em solid rgba(0, 0, 0, 1);
|
||||
border-left: 0.2em solid #c6c6c6;
|
||||
font-size: 1.75em;
|
||||
filter: alpha(opacity=0);
|
||||
-ms-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: -20px 0 0 -20px;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
vertical-align: baseline;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
/*
|
||||
- UI Placeholders
|
||||
*/
|
||||
.um-row-placeholder {
|
||||
width: 100%;
|
||||
border: 2px dashed #aaa;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.um-rowsub-placeholder {
|
||||
width: 100%;
|
||||
border: 2px dashed #ccc;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.um-fld-placeholder {
|
||||
display: block;
|
||||
border: 1px dashed #dddddd;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.um-admin-preview-overlay {
|
||||
position: absolute;
|
||||
top:0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: rgba(255,255,255,0);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#UM_preview_form .um-admin-modal-body {
|
||||
position: relative;
|
||||
}
|
||||
@@ -2,68 +2,3 @@
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.um-admin.post-type-um_form .manage-column.column-id {width: 60px}
|
||||
.um-admin.post-type-um_form .manage-column.column-mode {width: 100px}
|
||||
.um-admin.post-type-um_form .manage-column.column-is_default {width: 60px}
|
||||
.um-admin.post-type-um_form .manage-column.column-title {width: 200px}
|
||||
.um-admin.post-type-um_form .manage-column.column-shortcode {width: 200px}
|
||||
.um-admin.post-type-um_form .manage-column.column-impressions {width: 100px}
|
||||
.um-admin.post-type-um_form .manage-column.column-conversions {width: 100px}
|
||||
|
||||
.um-admin.post-type-um_directory .manage-column.column-id {width: 60px}
|
||||
.um-admin.post-type-um_directory .manage-column.column-title {width: 250px}
|
||||
.um-admin.post-type-um_directory .manage-column.column-is_default {width: 60px}
|
||||
|
||||
.um-admin.post-type-um_role .manage-column.column-title {width: 200px}
|
||||
.um-admin.post-type-um_role .manage-column.column-count {width: 150px}
|
||||
.um-admin.post-type-um_role .manage-column.column-core {width: 150px}
|
||||
|
||||
.um-admin.post-type-um_form td.column-shortcode,
|
||||
.um-admin.post-type-um_form td.column-id,
|
||||
.um-admin.post-type-um_directory td.column-shortcode,
|
||||
.um-admin.post-type-um_directory td.column-id,
|
||||
.um-admin.post-type-um_role td.column-count
|
||||
{font-size: 14px;}
|
||||
|
||||
.um-admin.users-php td.column-um_actions {padding-top: 12px}
|
||||
|
||||
.um-admin.users-php td.column-um_actions a.button {
|
||||
height: 29px !important;
|
||||
margin: 0 0 0 2px !important;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.um-admin-tag {
|
||||
display: inline-block;
|
||||
border-radius: 2px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
background: #0085ba;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.um-admin-tag.small {font-size: 13px;height:28px;line-height: 28px;display:inline;padding: 4px 10px;background: transparent;color: #666;border-radius:0;}
|
||||
.um-admin-tag.approved {border-left: 2px solid #7ACF58}
|
||||
.um-admin-tag.pending {border-left: 2px solid #C74A4A}
|
||||
|
||||
.um-admin-txtspace {margin: 0 0 0 10px;}
|
||||
|
||||
.um-adm-ico {
|
||||
font-size: 18px;
|
||||
width: 18px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
color: #7ACF58;
|
||||
}
|
||||
|
||||
.um-adm-ico.inactive {color: #C74A4A}
|
||||
.um-adm-ico.pointer {cursor: pointer}
|
||||
|
||||
.um-admin-icontext i {
|
||||
font-size: 18px;
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
@@ -1,295 +0,0 @@
|
||||
#um-extensions-wrap #the-list {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-gap: 10px;
|
||||
grid-auto-rows: minmax(max-content, auto);
|
||||
-ms-grid-template-rows: auto 1fr;
|
||||
-ms-grid-template-columns: repeat(3, 1fr);
|
||||
-ms-grid-gap: 10px;
|
||||
-ms-grid-auto-rows: minmax(max-content, auto);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#um-extensions-wrap .plugin-card {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#um-extensions-wrap .plugin-image-wrapper {
|
||||
color: #fff;
|
||||
height: 70px;
|
||||
width: 70px;
|
||||
margin: 0 auto;
|
||||
border-radius: 60px;
|
||||
box-shadow: 0 2px 9px rgb(50 50 93 / 21%);
|
||||
border: solid 4px #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#um-extensions-wrap .plugin-image-wrapper a {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #7856ff;
|
||||
}
|
||||
|
||||
#um-extensions-wrap a.plugin-image.svg-image {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
#um_bbpress_image {
|
||||
background-color: #fff !important;
|
||||
filter: none !important;
|
||||
width: 70px !important;
|
||||
}
|
||||
|
||||
#um_mycred_image {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#um_groups_image,
|
||||
#um_profile-tabs_image,
|
||||
#um_user-tags_image,
|
||||
#um_friends_image,
|
||||
#um_user-reviews_image,
|
||||
#um_verified-users_image,
|
||||
#um_private-content_image,
|
||||
#um_online-users_image {
|
||||
width: 36px !important;
|
||||
}
|
||||
|
||||
#um_notices_image,
|
||||
#um_social-activity_image,
|
||||
#um_profile-completeness_image,
|
||||
#um_private-messages_image,
|
||||
#um_user-photos_image,
|
||||
#um_terms-conditions_image {
|
||||
width: 29px !important;
|
||||
}
|
||||
|
||||
#um_social-login_image {
|
||||
width: 28px !important;
|
||||
}
|
||||
|
||||
#um_real-time-notifications_image,
|
||||
#um_user-notes_image {
|
||||
width: 26px !important;
|
||||
}
|
||||
|
||||
#um_followers_image,
|
||||
#um_user-locations_image {
|
||||
width: 32px !important;
|
||||
}
|
||||
|
||||
#um_user-bookmarks_image {
|
||||
width: 23px !important;
|
||||
}
|
||||
|
||||
#um-extensions-wrap a.plugin-image.svg-image img {
|
||||
filter: invert(1);
|
||||
background-color: transparent;
|
||||
width: 38px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#um-extensions-wrap a.plugin-image,
|
||||
#um-extensions-wrap a.plugin-image img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#um-extensions-wrap .plugin-image:not(.svg-image) img {
|
||||
width: 70px;
|
||||
margin: 0;
|
||||
height: 70px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#um-extensions-wrap .plugin-card-top {
|
||||
margin: 0;
|
||||
padding: 20px 0 0 0;
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
#um-extensions-wrap .plugin-card-top h3 {
|
||||
text-align: center;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#um-extensions-wrap .plugin-card-top .desc {
|
||||
text-align: center;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
#um-extensions-wrap .plugin-action-links {
|
||||
padding: 20px 0 0 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 1152px) {
|
||||
#um-extensions-wrap .plugin-card-top {
|
||||
min-height: 120px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
#um-extensions-wrap #the-list {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
-ms-grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 782px) {
|
||||
#um-extensions-wrap #the-list {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
-ms-grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
#um-extensions-wrap .plugin-card-top {
|
||||
min-height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
#um-metaboxes-general h1 sup {
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
font-weight: 400;
|
||||
background: #0085ba;
|
||||
color: #fff !important;
|
||||
padding: 2px 4px !important;
|
||||
border-radius: 3px;
|
||||
top: 5px;
|
||||
left: 3px;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.wrap a.red, .wrap span.red {color:#C74A4A}
|
||||
.wrap span.ok {color:#7ACF58}
|
||||
|
||||
/* Misc */
|
||||
|
||||
.um-admin-dash-review {
|
||||
text-decoration: none !important;
|
||||
font-size: 16px;
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
/* Dashboard widgets */
|
||||
|
||||
.p_seperate {
|
||||
margin-top: 12px;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.um-metabox-holder p.sub {
|
||||
padding: 0 4px 2px 4px;
|
||||
margin: 0 0 8px 0;
|
||||
color: #8F8F8F;
|
||||
font-size: 14px;
|
||||
border-bottom: 1px solid #ECECEC;
|
||||
}
|
||||
|
||||
.um-metabox-holder .table {
|
||||
float: left;
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.um-metabox-holder a.warning {
|
||||
color: #C74A4A !important;
|
||||
background: transparent !important;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.um-metabox-holder .table_right {
|
||||
float: right;
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.um-metabox-holder td.b {
|
||||
padding-right: 6px;
|
||||
text-align: right;
|
||||
font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
||||
font-size: 14px;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.um-metabox-holder td.b {
|
||||
text-align: right;
|
||||
font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.um-metabox-holder table td {
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.um-metabox-holder td.b a {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.um-metabox-holder .norm i {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.um-metabox-holder .norm p {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.um-metabox-holder .norm .count {
|
||||
font-size: 16px;
|
||||
font-family: Gerogia;
|
||||
color: #999;
|
||||
width: 40px;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/* Share bar */
|
||||
|
||||
.um-admin-dash-share {
|
||||
margin-top: 11px !important;
|
||||
float: left;
|
||||
line-height: 28px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.um-admin-dash-share a {
|
||||
margin: 0 15px 0 0 !important;
|
||||
text-decoration: none !important;
|
||||
color: #777 !important;
|
||||
font-size: 22px !important;
|
||||
}
|
||||
.um-admin-dash-share a:hover {color: #0085ba !important}
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
- General
|
||||
*/
|
||||
|
||||
.um-admin-metabox * {
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
-moz-osx-font-smoothing: grayscale !important;
|
||||
}
|
||||
|
||||
.um-admin-metabox h6 {
|
||||
font-size: 14px;
|
||||
margin: 12px 0 0 0;
|
||||
}
|
||||
|
||||
/*
|
||||
- Metabox layout
|
||||
*/
|
||||
|
||||
.um-admin.post-type-um_form div#submitdiv,
|
||||
.um-admin.post-type-um_form div#side-sortables
|
||||
{display:none}
|
||||
|
||||
/*
|
||||
- Boxed Links
|
||||
*/
|
||||
|
||||
.um-admin-boxed-links {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.um-admin-boxed-links a {
|
||||
width: 33.3%;
|
||||
float: left;
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #fff;
|
||||
padding: 30px 25px !important;
|
||||
background: #f8f8f8;
|
||||
text-align: center;
|
||||
display: inline-block !important;
|
||||
font-size: 14px;
|
||||
transition: all .2s linear;
|
||||
text-decoration: none;
|
||||
color: #666;
|
||||
margin: 0 !important;
|
||||
box-sizing: border-box !important;
|
||||
border-radius: 2px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.um-admin-boxed-links i {
|
||||
font-size: 28px;
|
||||
vertical-align: middle;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
.um-admin-boxed-links a:hover {
|
||||
background: #eee;
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
.um-admin-notice {
|
||||
border-color: #0085ba !important;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.um-admin-notice.notice-warning {
|
||||
border-color: #dba617 !important;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.um-admin-notice.upgraded {
|
||||
border-color: #0085ba !important;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.um-admin-notice.error {
|
||||
border-color: #dc3232 !important;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.um-admin-notice a.button-primary {
|
||||
background-color: #0085ba !important;
|
||||
border-color: #0085ba !important;
|
||||
}
|
||||
|
||||
.um-admin-notice a.button-primary:hover {
|
||||
background-color: #008ec2 !important;
|
||||
border-color: #008ec2 !important;
|
||||
}
|
||||
|
||||
.um-admin-notice a.button-secondary {opacity: 0.7}
|
||||
.um-admin-notice a.button-secondary:hover {opacity: 0.9}
|
||||
.um-admin-notice a {text-decoration: none;color: #0085ba}
|
||||
.um-admin-notice a:hover {color: #44b0ec}
|
||||
|
||||
.um-filter {
|
||||
padding: 12px;
|
||||
border-color: #ddd !important;
|
||||
margin: 20px 0 0 0 !important;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
/*
|
||||
- General metabox styling
|
||||
*/
|
||||
|
||||
#um-admin-access-settings h3 {
|
||||
padding: 10px 20px 10px 60px;
|
||||
color: #fff;
|
||||
background: #0085ba url(../img/logo-small.png) no-repeat 12px center;
|
||||
font-weight: bold;
|
||||
font-size: 14px !important;
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
-moz-osx-font-smoothing: grayscale !important;
|
||||
}
|
||||
|
||||
#um-admin-access-settings h4 { margin: 10px 0 4px 0!important}
|
||||
|
||||
#um-admin-access-settings div.handlediv {
|
||||
color: #fff !important;
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
-moz-osx-font-smoothing: grayscale !important;
|
||||
}
|
||||
|
||||
#um-admin-access-settings p {font-size: 13px}
|
||||
|
||||
#um-admin-access-settings input[type=text] {font-size: 13px}
|
||||
|
||||
/*
|
||||
- Nav Menu
|
||||
*/
|
||||
|
||||
.um-nav-edit * {
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
-moz-osx-font-smoothing: grayscale !important;
|
||||
}
|
||||
|
||||
.um-nav-edit-h2 {
|
||||
padding: 10px 20px 10px 60px;
|
||||
margin: 14px 12px 0 0;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
background: #0085ba url(../img/logo-small.png) no-repeat 12px center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.um-nav-mode {margin-top:10px}
|
||||
.um-nav-roles {display: none;margin-top:5px}
|
||||
|
||||
/*
|
||||
- jQuery Tooltips
|
||||
*/
|
||||
|
||||
.um-admin-tip {
|
||||
margin: 0 0 0 2px;
|
||||
color: #0085ba !important;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
top: -3px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.um-admin-tip.n {margin-left: 5px}
|
||||
.um-admin-tip i {cursor: pointer; vertical-align: middle; font-size: 20px; line-height: 20px;color: #0085ba !important;}
|
||||
a.um-delete{ color: #a00; }
|
||||
|
||||
|
||||
|
||||
/* Roles metabox + table features */
|
||||
.um-metabox-section .description {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.um-metabox-section th {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.wp-list-table.roles .column-core,
|
||||
.wp-list-table.roles .column-users,
|
||||
.wp-list-table.roles .column-admin_access,
|
||||
.wp-list-table.roles .column-priority {
|
||||
width:15%;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
.wp-list-table.roles .column-core,
|
||||
.wp-list-table.roles .column-users,
|
||||
.wp-list-table.roles .column-admin_access,
|
||||
.wp-list-table.roles .column-priority {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
|
||||
#um-admin-form-wp-capabilities .um-metadata-line th {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#um-admin-form-wp-capabilities .um-metadata-line td {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#um_edit_role #titlewrap > span {
|
||||
width: 40px;
|
||||
font-size: 24px;
|
||||
float:left;
|
||||
display: block;
|
||||
line-height: 37px;
|
||||
}
|
||||
|
||||
#um-roles .row-actions .reset a {
|
||||
color:#a00;
|
||||
}
|
||||
|
||||
#um-roles .row-actions .reset a:hover {
|
||||
color:red;
|
||||
}
|
||||
|
||||
|
||||
/*Tooltip*/
|
||||
.ui-tooltip.um_tooltip {
|
||||
padding: 8px;
|
||||
color: #eeeeee !important;
|
||||
background: #333 !important;
|
||||
position: absolute;
|
||||
z-index: 1000000;
|
||||
max-width: 300px;
|
||||
font-size: 12px;
|
||||
border-radius: 5px;
|
||||
border: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
.ui-tooltip.um_tooltip a {
|
||||
color: #eeeeee !important;
|
||||
}
|
||||
|
||||
.um_tooltip.dashicons,
|
||||
.um_tooltip.dashicons:before {
|
||||
height:22px;
|
||||
}
|
||||
|
||||
.um_tooltip.dashicons-editor-help::before {
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
line-height: 20px;
|
||||
color: #333 !important;
|
||||
}
|
||||
.um_tooltip {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.um_tooltip:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.um_tooltip:hover:before {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
|
||||
.wp-admin p.um-nav-roles label input[type=checkbox] {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.wp-admin p.um-nav-roles label {
|
||||
margin-top: 2px !important;
|
||||
margin-bottom: 2px !important;
|
||||
}
|
||||
|
||||
/*
|
||||
- Restrict access
|
||||
*/
|
||||
|
||||
.um_hidden_notice,
|
||||
.um_block_settings .um_block_settings_hide{
|
||||
display: none;
|
||||
}
|
||||
.um_block_settings .components-select-control .components-select-control__input[multiple]{
|
||||
height: auto;
|
||||
}
|
||||
.um_block_settings .components-select-control .components-select-control__input[multiple] + .components-input-control__suffix{
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after {display: none !important}
|
||||
|
||||
ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{right:-9999999px}
|
||||
@@ -1,163 +1,7 @@
|
||||
/*
|
||||
- Welcome
|
||||
*/
|
||||
|
||||
.um-about-wrap * {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.um-about-wrap a.um-about-icon {
|
||||
margin: 0 0 0 15px !important;
|
||||
padding: 0 !important;
|
||||
text-decoration: none !important;
|
||||
color: #777 !important;
|
||||
font-size: 22px !important;
|
||||
}
|
||||
|
||||
.um-about-wrap a.um-about-icon:hover {color: #0085ba !important}
|
||||
|
||||
.um-badge {
|
||||
color: #fff;
|
||||
background: none !important;
|
||||
background: #0085ba url(../img/logo_small.png) no-repeat center 0px !important;
|
||||
}
|
||||
|
||||
.um-about-wrap .ultimatemember-actions a.button-primary,
|
||||
.um-about-wrap .ultimatemember-actions a.button {
|
||||
vertical-align: top;
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
.changelog a.button-primary {
|
||||
height: 40px;
|
||||
line-height: 38px;
|
||||
}
|
||||
|
||||
.um-about-wrap a {text-decoration: none}
|
||||
|
||||
/*
|
||||
- General
|
||||
*/
|
||||
|
||||
body.um-admin-modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.um-admin #major-publishing-actions{background-color: #fff !important;border-top:0}
|
||||
|
||||
.um-admin-hide {display: none}
|
||||
|
||||
.um-admin-field {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.um-admin-field a.button {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
height: 30px !important;
|
||||
}
|
||||
|
||||
.um-admin-half {
|
||||
float: left;
|
||||
width: 48%;
|
||||
}
|
||||
|
||||
.um-admin-tri {
|
||||
float: left;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.um-admin-left{float: left}
|
||||
.um-admin-right {float: right}
|
||||
.um-admin-clear {clear: both}
|
||||
|
||||
.um-admin a.um-admin-activebg,
|
||||
.um-admin a.um-admin-activebg:hover{
|
||||
/*background: #3ba1da;*/
|
||||
background: #0085ba;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.um-admin a.button i,
|
||||
.um-admin a.button-primary i {
|
||||
font-size: 15px !important;
|
||||
height: 15px !important;
|
||||
width: 15px !important;
|
||||
text-align: center !important;
|
||||
margin: 0 5px 0 0 !important;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.um-admin a.button i:before,
|
||||
.um-admin a.button-primary i:before {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
/*
|
||||
- Form Inputs
|
||||
*/
|
||||
|
||||
.um-admin-metabox h3 {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.um-admin-metabox h4 {
|
||||
font-size: 14px;
|
||||
background: #f5f5f5;
|
||||
padding: 8px 4px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.um-admin-metabox p {margin: 10px 0 0 0}
|
||||
|
||||
.um-admin-metabox label{
|
||||
display: block;
|
||||
cursor: default;
|
||||
margin: 0 0 8px 0 !important;
|
||||
padding: 0!important;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.um-admin-metabox input[type=text]:disabled{
|
||||
opacity: 0.7 !important;
|
||||
color: #aaa !important;
|
||||
}
|
||||
|
||||
.um-admin-metabox input[type=text] {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.um-admin-metabox input[type=text],
|
||||
.um-admin-metabox textarea {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
box-sizing: border-box !important;
|
||||
font-size: 13px !important;
|
||||
line-height: 1.4em !important;
|
||||
padding: 4px 10px !important;
|
||||
}
|
||||
|
||||
.um-admin-metabox textarea {
|
||||
padding: 8px !important;
|
||||
line-height: 1.6em;
|
||||
color: #888 !important;
|
||||
}
|
||||
|
||||
.um-admin-metabox input[type=text].um-admin-error,
|
||||
.um-admin-metabox textarea.um-admin-error
|
||||
{border-color: #C74A4A!important}
|
||||
|
||||
.um-admin-metabox input[type=text].small {width: 54px}
|
||||
|
||||
.um-admin-metabox textarea {min-height: 100px;height: 100px}
|
||||
.um-admin-metabox textarea.tall {min-height: 200px;height: 200px}
|
||||
|
||||
.wp-picker-container input.wp-color-picker[type="text"] {
|
||||
width: 68px !important;
|
||||
float: left !important;
|
||||
@@ -165,102 +9,6 @@ body.um-admin-modal-open {
|
||||
border-width: 1px !important;
|
||||
}
|
||||
|
||||
/*
|
||||
- Error blocks
|
||||
*/
|
||||
|
||||
.um-admin-error-block, .um-admin-success-block{
|
||||
display: none;
|
||||
width: 100%;
|
||||
background: #C74A4A;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
padding: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 1em !important;
|
||||
margin: 0 0 16px 0;
|
||||
}
|
||||
|
||||
.um-admin-success-block {
|
||||
background: #7ACF58;
|
||||
}
|
||||
|
||||
/*
|
||||
- Yes or NO UI
|
||||
*/
|
||||
|
||||
p.disabled-on-off .um-admin-yesno {
|
||||
opacity: 0.5!important;
|
||||
cursor: default !important;
|
||||
}
|
||||
p.disabled-on-off .um-admin-yesno *{
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
.um-admin-yesno {
|
||||
width: 100px !important;
|
||||
height: 26px;
|
||||
display: block;
|
||||
position: relative;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.um-admin-yesno span.btn {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -2px;
|
||||
width: 50px;
|
||||
height: 28px;
|
||||
text-align: center;
|
||||
background: #f9f9f9;
|
||||
z-index: 999;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
border: solid 1px #D0D9DB;
|
||||
margin: 0;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.um-admin-yesno span.btn.pos-1 {left: 48px}
|
||||
|
||||
.um-admin-yesno span.yes, .um-admin-yesno span.no {
|
||||
width: 50px;
|
||||
float: left;
|
||||
line-height: 24px;
|
||||
height: 26px;
|
||||
cursor: default;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
padding: 0 0 0 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.um-admin-yesno .yes {
|
||||
background: #0085ba;
|
||||
border-radius: 3px 0 0 3px;
|
||||
border: 1px solid rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.um-admin-yesno .no {
|
||||
padding: 0 10px 0 0 !important;
|
||||
text-align: right;
|
||||
float: right;
|
||||
background: #fff;
|
||||
color: #222 !important;
|
||||
border-radius: 0 3px 3px 0;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.um-admin.users-php .subsubsub li.subsep {
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.um-admin-cur-condition-template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
.um-admin-yesno span.yes, .um-admin-yesno span.no {
|
||||
padding: 0 10px 0 0;
|
||||
}
|
||||
|
||||
.um-admin-drag-ctrls-demo.um-admin-drag-ctrls {
|
||||
left: 12px;
|
||||
right: auto;
|
||||
@@ -68,4 +64,4 @@
|
||||
|
||||
.um-form-fields-section label input {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,31 +242,6 @@ th.column-email.column-primary {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
.email_template_wrapper .copy_button_overlay {
|
||||
position:absolute;
|
||||
top:0;
|
||||
bottom:0;
|
||||
width:calc( 100% - 30px );
|
||||
z-index: 2;
|
||||
background: rgba( 241, 241, 241, 0.95 );
|
||||
text-align: center;
|
||||
padding-top: 30%;
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.email_template_wrapper .copy_button_overlay > span {
|
||||
color: #444;
|
||||
margin: 0 0 15px 0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.email_template_wrapper.in_theme .copy_button_overlay {
|
||||
display: none !important;
|
||||
}
|
||||
*/
|
||||
|
||||
.um_setting_ajax_button_response.complete {
|
||||
color:darkgreen;
|
||||
font-style: italic;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -28,10 +28,6 @@ function um_builder_delete_field_ajax( callback ) {
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
jQuery(document).ajaxStart( function() {
|
||||
jQuery('.tipsy').hide();
|
||||
});
|
||||
|
||||
jQuery( document.body ).on('click', 'a[data-silent_action^="um_"]', function() {
|
||||
if ( typeof jQuery(this).attr('disabled') !== 'undefined' ) {
|
||||
return false;
|
||||
@@ -54,8 +50,6 @@ jQuery(document).ready(function() {
|
||||
in_group = demon_settings.data('in_group');
|
||||
}
|
||||
|
||||
jQuery('.tipsy').hide();
|
||||
|
||||
um_admin_remove_modal();
|
||||
jQuery.ajax({
|
||||
url: wp.ajax.settings.url,
|
||||
|
||||
@@ -1,197 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var um_components = wp.components,
|
||||
umSelectControl = um_components.SelectControl,
|
||||
umTextareaControl = um_components.TextareaControl;
|
||||
|
||||
|
||||
function um_admin_blocks_custom_fields( um_condition_fields, props ) {
|
||||
return wp.hooks.applyFilters( 'um_admin_blocks_custom_fields', [], um_condition_fields, props );
|
||||
}
|
||||
|
||||
var um_block_restriction = wp.compose.createHigherOrderComponent(
|
||||
function( BlockEdit ) {
|
||||
var um_condition_fields = {
|
||||
um_who_access: 'um_block_settings_hide',
|
||||
um_roles_access: 'um_block_settings_hide',
|
||||
um_message_type: 'um_block_settings_hide',
|
||||
um_message_content: 'um_block_settings_hide'
|
||||
};
|
||||
|
||||
um_condition_fields = wp.hooks.applyFilters( 'um_admin_blocks_condition_fields_default', um_condition_fields );
|
||||
|
||||
return function( props ) {
|
||||
let initialIsRestrict = props.attributes.um_is_restrict !== undefined ? props.attributes.um_is_restrict : false;
|
||||
|
||||
if ( props.attributes.um_is_restrict !== true ) {
|
||||
um_condition_fields['um_who_access'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_roles_access'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_message_type'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_message_content'] = 'um_block_settings_hide';
|
||||
} else {
|
||||
um_condition_fields['um_who_access'] = '';
|
||||
|
||||
if ( parseInt( props.attributes.um_who_access ) === 0 || typeof props.attributes.um_who_access === 'undefined' ) {
|
||||
um_condition_fields['um_roles_access'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_message_type'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_message_content'] = 'um_block_settings_hide';
|
||||
} else if ( parseInt( props.attributes.um_who_access ) === 1 ) {
|
||||
um_condition_fields['um_roles_access'] = '';
|
||||
um_condition_fields['um_message_type'] = '';
|
||||
|
||||
if ( parseInt( props.attributes.um_message_type ) === 2 ) {
|
||||
um_condition_fields['um_message_content'] = '';
|
||||
} else {
|
||||
um_condition_fields['um_message_content'] = 'um_block_settings_hide';
|
||||
}
|
||||
} else {
|
||||
um_condition_fields['um_message_type'] = '';
|
||||
|
||||
if ( parseInt( props.attributes.um_message_type ) === 2 ) {
|
||||
um_condition_fields['um_message_content'] = '';
|
||||
} else {
|
||||
um_condition_fields['um_message_content'] = 'um_block_settings_hide';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
um_condition_fields = wp.hooks.applyFilters( 'um_admin_blocks_condition_fields', um_condition_fields, props );
|
||||
|
||||
return wp.element.createElement(
|
||||
wp.element.Fragment,
|
||||
{},
|
||||
wp.element.createElement( BlockEdit, props ),
|
||||
wp.element.createElement(
|
||||
wp.blockEditor.InspectorControls,
|
||||
{},
|
||||
wp.element.createElement(
|
||||
wp.components.PanelBody,
|
||||
{
|
||||
title: wp.i18n.__( 'Ultimate Member: Content Restriction', 'ultimate-member' ),
|
||||
className: 'um_block_settings'
|
||||
},
|
||||
wp.element.createElement(
|
||||
wp.components.ToggleControl,
|
||||
{
|
||||
label: wp.i18n.__( 'Restrict access?', 'ultimate-member' ),
|
||||
checked: initialIsRestrict,
|
||||
onChange: function onChange( value ) {
|
||||
props.setAttributes( { um_is_restrict: value } );
|
||||
if ( value === false ) {
|
||||
um_condition_fields['um_who_access'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_roles_access'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_message_type'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_message_content'] = 'um_block_settings_hide';
|
||||
} else {
|
||||
um_condition_fields['um_who_access'] = '';
|
||||
}
|
||||
|
||||
um_condition_fields = wp.hooks.applyFilters( 'um_admin_blocks_condition_fields_on_change', um_condition_fields, 'um_is_restrict', value );
|
||||
}
|
||||
}
|
||||
),
|
||||
wp.element.createElement(
|
||||
umSelectControl,
|
||||
{
|
||||
type: 'number',
|
||||
className: um_condition_fields['um_who_access'],
|
||||
label: wp.i18n.__( 'Who can access this block?', 'ultimate-member' ),
|
||||
value: props.attributes.um_who_access,
|
||||
options: [
|
||||
{
|
||||
label: wp.i18n.__( 'Everyone', 'ultimate-member' ),
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: wp.i18n.__( 'Logged in users', 'ultimate-member' ),
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: wp.i18n.__( 'Logged out users', 'ultimate-member' ),
|
||||
value: 2
|
||||
}
|
||||
],
|
||||
onChange: function onChange( value ) {
|
||||
props.setAttributes( { um_who_access: value } );
|
||||
if ( parseInt( value ) === 0 ) {
|
||||
um_condition_fields['um_message_type'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_message_content'] = 'um_block_settings_hide';
|
||||
um_condition_fields['um_roles_access'] = 'um_block_settings_hide';
|
||||
} else if ( parseInt( value ) === 1 ) {
|
||||
um_condition_fields['um_message_type'] = '';
|
||||
um_condition_fields['um_roles_access'] = '';
|
||||
} else {
|
||||
um_condition_fields['um_message_type'] = '';
|
||||
um_condition_fields['um_roles_access'] = 'um_block_settings_hide';
|
||||
}
|
||||
|
||||
um_condition_fields = wp.hooks.applyFilters( 'um_admin_blocks_condition_fields_on_change', um_condition_fields, 'um_who_access', value );
|
||||
}
|
||||
}
|
||||
),
|
||||
wp.element.createElement(
|
||||
umSelectControl,
|
||||
{
|
||||
multiple: true,
|
||||
className: um_condition_fields['um_roles_access'],
|
||||
label: wp.i18n.__( 'What roles can access this block?', 'ultimate-member' ),
|
||||
value: props.attributes.um_roles_access,
|
||||
options: um_restrict_roles,
|
||||
onChange: function onChange( value ) {
|
||||
props.setAttributes( { um_roles_access: value } );
|
||||
}
|
||||
}
|
||||
),
|
||||
wp.element.createElement(
|
||||
umSelectControl,
|
||||
{
|
||||
type: 'number',
|
||||
className: um_condition_fields['um_message_type'],
|
||||
label: wp.i18n.__( 'Restriction action', 'ultimate-member' ),
|
||||
value: props.attributes.um_message_type,
|
||||
options: [
|
||||
{
|
||||
label: wp.i18n.__( 'Hide block', 'ultimate-member' ),
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: wp.i18n.__( 'Show global default message', 'ultimate-member' ),
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: wp.i18n.__( 'Show custom message', 'ultimate-member' ),
|
||||
value: 2
|
||||
}
|
||||
],
|
||||
onChange: function onChange( value ) {
|
||||
props.setAttributes( { um_message_type: value } );
|
||||
if ( parseInt( value ) === 2 ) {
|
||||
um_condition_fields['um_message_content'] = '';
|
||||
} else {
|
||||
um_condition_fields['um_message_content'] = 'um_block_settings_hide';
|
||||
}
|
||||
}
|
||||
}
|
||||
),
|
||||
wp.element.createElement(
|
||||
umTextareaControl,
|
||||
{
|
||||
type: 'number',
|
||||
className: um_condition_fields['um_message_content'],
|
||||
label: wp.i18n.__( 'Custom restricted access message', 'ultimate-member' ),
|
||||
value: props.attributes.um_message_content,
|
||||
onChange: function onChange( value ) {
|
||||
props.setAttributes( { um_message_content: value } );
|
||||
}
|
||||
}
|
||||
),
|
||||
um_admin_blocks_custom_fields( um_condition_fields, props )
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
},
|
||||
'um_block_restriction'
|
||||
);
|
||||
|
||||
wp.hooks.addFilter( 'editor.BlockEdit', 'um-block/um_block_restriction', um_block_restriction );
|
||||
@@ -1,45 +0,0 @@
|
||||
/**
|
||||
* This function updates the builder area with fields
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function um_admin_update_builder() {
|
||||
var form_id = jQuery('.um-admin-builder').data('form_id');
|
||||
|
||||
jQuery('.tipsy').hide();
|
||||
|
||||
jQuery.ajax({
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action:'um_update_builder',
|
||||
form_id: form_id,
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( data ) {
|
||||
jQuery('.um-admin-drag-ajax').html( data );
|
||||
jQuery('.tipsy').hide();
|
||||
|
||||
/* trigger columns at start */
|
||||
allow_update_via_col_click = false;
|
||||
jQuery('.um-admin-drag-ctrls.columns a.active').each( function() {
|
||||
jQuery(this).trigger('click');
|
||||
}).promise().done( function(){
|
||||
allow_update_via_col_click = true;
|
||||
});
|
||||
|
||||
UM_Rows_Refresh();
|
||||
},
|
||||
error: function( data ) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
jQuery( document ).ready( function() {
|
||||
if ( um_admin_builder_data.hide_footer ) {
|
||||
jQuery('#wpfooter').hide();
|
||||
}
|
||||
});
|
||||
@@ -85,7 +85,7 @@ function UM_Drag_and_Drop() {
|
||||
placeholder: "um-row-placeholder",
|
||||
forcePlaceholderSize:true,
|
||||
out: function(){
|
||||
jQuery('.tipsy').remove();
|
||||
UM.common.tipsy.hide();
|
||||
},
|
||||
update: function(){
|
||||
|
||||
@@ -110,7 +110,7 @@ function UM_update_rows() {
|
||||
c++;
|
||||
row = jQuery(this);
|
||||
if ( c != 1 ) {
|
||||
row.find('.um-admin-drag-row-icons').append( '<a href="#" class="um-admin-tipsy-n" title="Delete Row" data-remove_element="um-admin-drag-row"><i class="um-faicon-trash-o"></i></a>' );
|
||||
row.find('.um-admin-drag-row-icons').append( '<a href="#" class="um-tip-n" title="Delete Row" data-remove_element="um-admin-drag-row"><i class="um-faicon-trash-o"></i></a>' );
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -123,7 +123,7 @@ function UM_update_subrows(){
|
||||
c++;
|
||||
row = jQuery(this);
|
||||
if ( c != 1 ) {
|
||||
row.find('.um-admin-drag-rowsub-icons').append('<a href="#" class="um-admin-tipsy-n" title="Delete Row" data-remove_element="um-admin-drag-rowsub"><i class="um-faicon-trash-o"></i></a>');
|
||||
row.find('.um-admin-drag-rowsub-icons').append('<a href="#" class="um-tip-n" title="Delete Row" data-remove_element="um-admin-drag-rowsub"><i class="um-faicon-trash-o"></i></a>');
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -267,7 +267,7 @@ function UM_Rows_Refresh(){
|
||||
|
||||
function UM_Add_Icon(){
|
||||
|
||||
var add_icon_html = '<a href="#" class="um-admin-drag-add-field um-admin-tipsy-n" title="Add Field" data-modal="UM_fields" data-modal-size="normal" data-dynamic-content="um_admin_show_fields" data-arg2="'+jQuery('.um-admin-drag-ajax').data('form_id')+'" data-arg1=""><i class="um-icon-plus"></i></a>';
|
||||
var add_icon_html = '<a href="#" class="um-admin-drag-add-field um-tip-n" title="Add Field" data-modal="UM_fields" data-modal-size="normal" data-dynamic-content="um_admin_show_fields" data-arg2="'+jQuery('.um-admin-drag-ajax').data('form_id')+'" data-arg1=""><i class="um-icon-plus"></i></a>';
|
||||
|
||||
jQuery('.um-admin-drag-col').each(function(){
|
||||
if ( jQuery(this).find('.um-admin-drag-add-field').length == 0 ) {
|
||||
@@ -377,8 +377,8 @@ jQuery(document).ready(function() {
|
||||
|
||||
if ( UM.admin.builder.fieldsToDelete.length > 0 ) {
|
||||
um_builder_delete_field_ajax( function () {
|
||||
UM.common.tipsy.hide();
|
||||
deleteButton.parents('.' +element).remove();
|
||||
jQuery('.tipsy').remove();
|
||||
UM_Rows_Refresh();
|
||||
|
||||
jQuery.each( UM.admin.builder.deleteProcess, function(i) {
|
||||
@@ -391,8 +391,8 @@ jQuery(document).ready(function() {
|
||||
loadingWrapper.hide();
|
||||
} );
|
||||
} else {
|
||||
UM.common.tipsy.hide();
|
||||
jQuery(this).parents('.' +element).remove();
|
||||
jQuery('.tipsy').remove();
|
||||
UM_Rows_Refresh();
|
||||
|
||||
jQuery.each( UM.admin.builder.deleteProcess, function(i) {
|
||||
|
||||
@@ -91,7 +91,7 @@ jQuery(document).ready(function() {
|
||||
um_admin_modal_responsive();
|
||||
} else {
|
||||
jQuery('.um-col-demon-settings').data('in_row', '').data('in_sub_row', '').data('in_column', '').data('in_group', '');
|
||||
jQuery('.tipsy').hide();
|
||||
UM.common.tipsy.hide();
|
||||
um_admin_remove_modal();
|
||||
um_admin_update_builder();
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
function um_form_select_tab( tab, set_val ) {
|
||||
var mode_block = jQuery('input#form__um_mode');
|
||||
tab.parents('.um-admin-boxed-links').find('a').removeClass('um-admin-activebg');
|
||||
tab.addClass('um-admin-activebg');
|
||||
|
||||
jQuery('.um-admin div#side-sortables').show();
|
||||
jQuery('div[id^="um-admin-form"]').hide();
|
||||
jQuery('#submitdiv').show();
|
||||
jQuery('div#um-admin-form-mode,div#um-admin-form-title,div#um-admin-form-builder,div#um-admin-form-shortcode').show();
|
||||
jQuery('div[id^="um-admin-form-' + tab.data('role') + '"]').show();
|
||||
|
||||
if ( set_val ) {
|
||||
mode_block.val( tab.data('role') );
|
||||
}
|
||||
|
||||
jQuery('.empty-container').css({'border' : 'none'});
|
||||
jQuery('.um-admin-builder').removeClass().addClass( 'um-admin-builder ' + mode_block.val() );
|
||||
}
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
/* Default form tab */
|
||||
if ( jQuery('.um-admin-boxed-links').length > 0 ) {
|
||||
var tab = jQuery('.um-admin-boxed-links a[data-role="'+jQuery('input#form__um_mode').val()+'"]');
|
||||
um_form_select_tab( tab, false );
|
||||
}
|
||||
|
||||
|
||||
/* Creating new form button */
|
||||
jQuery('.um-admin-boxed-links:not(.is-core-form) a').on( 'click', function() {
|
||||
um_form_select_tab( jQuery(this), true );
|
||||
});
|
||||
});
|
||||
@@ -1,64 +0,0 @@
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
|
||||
jQuery(document.body).on('click', '#um_add_review_love', function (e) {
|
||||
jQuery(this).parents('#um_start_review_notice').hide();
|
||||
jQuery('.um_hidden_notice[data-key="love"]').show();
|
||||
});
|
||||
|
||||
|
||||
jQuery(document.body).on('click', '#um_add_review_good', function (e) {
|
||||
jQuery(this).parents('#um_start_review_notice').hide();
|
||||
jQuery('.um_hidden_notice[data-key="good"]').show();
|
||||
});
|
||||
|
||||
|
||||
jQuery(document.body).on('click', '#um_add_review_bad', function (e) {
|
||||
jQuery(this).parents('#um_start_review_notice').hide();
|
||||
jQuery('.um_hidden_notice[data-key="bad"]').show();
|
||||
});
|
||||
|
||||
|
||||
jQuery(document.body).on('click', '.um_review_link', function (e) {
|
||||
jQuery(this).parents('.um-admin-notice').find( '.notice-dismiss' ).trigger('click');
|
||||
});
|
||||
|
||||
|
||||
jQuery(document.body).on('click', '.um_secondary_dimiss', function (e) {
|
||||
jQuery(this).parents('.um-admin-notice').find( '.notice-dismiss' ).trigger('click');
|
||||
});
|
||||
|
||||
|
||||
jQuery(document.body).on( 'click', '.um-admin-notice.is-dismissible .notice-dismiss', function(e) {
|
||||
var notice_key = jQuery(this).parents('.um-admin-notice').data('key');
|
||||
|
||||
wp.ajax.send( 'um_dismiss_notice', {
|
||||
data: {
|
||||
key: notice_key,
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( data ) {
|
||||
return true;
|
||||
},
|
||||
error: function( data ) {
|
||||
um_admin_dismiss_notice_fallback( notice_key );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Dismiss fallback of ajax request
|
||||
*/
|
||||
function um_admin_dismiss_notice_fallback( notice_key ) {
|
||||
var href_index = "";
|
||||
if ( window.location.href.indexOf("?") > -1 ) {
|
||||
href_index = window.location.href + "&";
|
||||
} else {
|
||||
href_index = window.location.href + "?";
|
||||
}
|
||||
window.location.href = href_index + "um_dismiss_notice=" + notice_key + "&um_admin_nonce=" + um_admin_scripts.nonce;
|
||||
}
|
||||
@@ -14,7 +14,7 @@ function um_admin_live_update_scripts() {
|
||||
function um_admin_new_modal( id, ajax, size ) {
|
||||
var modal = jQuery('body').find('.um-admin-overlay');
|
||||
|
||||
jQuery('.tipsy').hide();
|
||||
UM.common.tipsy.hide();
|
||||
|
||||
um_admin_remove_modal();
|
||||
|
||||
@@ -146,9 +146,8 @@ function um_admin_modal_ajaxcall( act_id, arg1, arg2, arg3 ) {
|
||||
jQuery('.um-admin-preview-overlay').css('height', jQuery('.um-admin-preview-overlay').siblings('.um').outerHeight(true)*1 + 20 + 'px' );
|
||||
}
|
||||
|
||||
um_init_tooltips();
|
||||
|
||||
um_admin_init_datetimepicker();
|
||||
UM.admin.tooltip.init();
|
||||
UM.admin.datetimePicker.init();
|
||||
},
|
||||
error: function(data) {
|
||||
|
||||
@@ -199,10 +198,8 @@ function um_admin_remove_modal() {
|
||||
jQuery('.um_tiny_placeholder').replaceWith( jQuery( $um_tiny_editor ).html() );
|
||||
}
|
||||
|
||||
if ( 'undefined' !== typeof window.UM.admin.allTooltips && window.UM.admin.allTooltips.length > 0 && 'function' === typeof window.UM.admin.allTooltips.tooltip ) {
|
||||
window.UM.admin.allTooltips.tooltip('close');
|
||||
}
|
||||
jQuery('.tipsy').hide();
|
||||
UM.admin.tooltip.close();
|
||||
UM.common.tipsy.hide();
|
||||
jQuery('body').removeClass('um-admin-modal-open');
|
||||
jQuery('.um-admin-modal div[id^="UM_"]').hide().appendTo('body');
|
||||
jQuery('.um-admin-modal,.um-admin-overlay').remove();
|
||||
@@ -322,7 +319,7 @@ jQuery(document).ready(function() {
|
||||
jQuery(document.body).on('click', '.um-admin-remove-condition', function(){
|
||||
var condition = jQuery(this).parents('.um-admin-cur-condition');
|
||||
jQuery('.um-admin-new-condition').removeClass('disabled');
|
||||
jQuery('.tipsy').remove();
|
||||
UM.common.tipsy.hide();
|
||||
condition.remove();
|
||||
//need fields refactor
|
||||
var conditions = jQuery('.um-admin-cur-condition');
|
||||
@@ -345,7 +342,7 @@ jQuery(document).ready(function() {
|
||||
remove modal via action
|
||||
**/
|
||||
jQuery(document.body).on('click', '.um-admin-overlay, a[data-action="UM_remove_modal"]', function(){
|
||||
jQuery('.tipsy').hide();
|
||||
UM.common.tipsy.hide();
|
||||
um_admin_remove_modal();
|
||||
});
|
||||
|
||||
@@ -406,7 +403,7 @@ jQuery(document).ready(function() {
|
||||
}
|
||||
jQuery(this).attr('data-code', '');
|
||||
if ( v_id == '.postbox' ) {
|
||||
jQuery('.tipsy').hide();
|
||||
UM.common.tipsy.hide();
|
||||
um_admin_remove_modal();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
jQuery(document).ready(function ($) {
|
||||
var template = wp.template( 'um-nav-menus-fields' );
|
||||
|
||||
$( document ).on( 'menu-item-added', function ( e, $menuMarkup ) {
|
||||
var id = $( $menuMarkup ).attr('id').substr(10);
|
||||
|
||||
var template_content = template({
|
||||
menuItemID: id,
|
||||
restriction_data:{
|
||||
um_nav_public:0,
|
||||
um_nav_roles:[]
|
||||
}
|
||||
});
|
||||
|
||||
if ( $( $menuMarkup ).find( 'fieldset.field-move' ).length > 0 ) {
|
||||
$( $menuMarkup ).find( 'fieldset.field-move' ).before( template_content );
|
||||
} else {
|
||||
$( $menuMarkup ).find( '.menu-item-actions' ).before( template_content );
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$( 'ul#menu-to-edit > li' ).each( function(){
|
||||
var id = $(this).attr('id').substr(10);
|
||||
var template_content = template({
|
||||
menuItemID: id,
|
||||
restriction_data: um_menu_restriction_data[ id ]
|
||||
});
|
||||
|
||||
if ( $( this ).find( 'fieldset.field-move' ).length > 0 ) {
|
||||
$( this ).find( 'fieldset.field-move' ).before( template_content );
|
||||
} else {
|
||||
$( this ).find( '.menu-item-actions' ).before( template_content );
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,42 +0,0 @@
|
||||
jQuery( document ).ready( function() {
|
||||
|
||||
jQuery( '#role' ).on('change', function() {
|
||||
|
||||
if ( typeof um_roles == 'object' ) {
|
||||
um_roles = Object.keys( um_roles ).map(function( key ) { return um_roles[ key ]; });
|
||||
}
|
||||
|
||||
if ( jQuery.inArray( jQuery(this).val().substr(3), um_roles ) !== -1 ) {
|
||||
jQuery( '#um_role_selector_wrapper' ).hide();
|
||||
jQuery( '#um-role' ).val('');
|
||||
|
||||
var hide = wp.hooks.applyFilters( 'um_user_screen_block_hiding', true );
|
||||
if ( hide ) {
|
||||
jQuery( '#um_user_screen_block' ).hide();
|
||||
}
|
||||
} else {
|
||||
jQuery( '#um_role_selector_wrapper' ).show();
|
||||
jQuery( '#um_user_screen_block' ).show();
|
||||
}
|
||||
}).trigger('change');
|
||||
|
||||
jQuery( '#adduser-role' ).on('change', function() {
|
||||
if ( typeof um_roles == 'object' ) {
|
||||
um_roles = Object.keys( um_roles ).map(function( key ) { return um_roles[ key ]; });
|
||||
}
|
||||
|
||||
if ( jQuery.inArray( jQuery(this).val().substr(3), um_roles ) !== -1 ) {
|
||||
jQuery( '#um_role_existing_selector_wrapper' ).hide();
|
||||
jQuery( '#um-role' ).val('');
|
||||
|
||||
var hide = wp.hooks.applyFilters( 'um_user_screen_block_hiding', true );
|
||||
if ( hide ) {
|
||||
jQuery( '#um_user_screen_block' ).hide();
|
||||
}
|
||||
} else {
|
||||
jQuery( '#um_role_existing_selector_wrapper' ).show();
|
||||
jQuery( '#um_user_screen_block' ).show();
|
||||
}
|
||||
}).trigger('change');
|
||||
|
||||
});
|
||||
@@ -1,286 +0,0 @@
|
||||
if ( typeof (window.UM) !== 'object' ) {
|
||||
window.UM = {};
|
||||
}
|
||||
|
||||
if ( typeof (window.UM.admin) !== 'object' ) {
|
||||
window.UM.admin = {};
|
||||
}
|
||||
|
||||
function um_admin_init_datetimepicker() {
|
||||
jQuery('.um-datepicker:not(.picker__input)').each(function(){
|
||||
elem = jQuery(this);
|
||||
|
||||
if ( typeof elem.attr('data-disabled_weekdays') != 'undefined' && elem.attr('data-disabled_weekdays') != '' ) {
|
||||
var disable = JSON.parse( elem.attr('data-disabled_weekdays') );
|
||||
} else {
|
||||
var disable = false;
|
||||
}
|
||||
|
||||
var years_n = null;
|
||||
if ( typeof elem.attr('data-years') != 'undefined' ) {
|
||||
years_n = elem.attr('data-years');
|
||||
}
|
||||
|
||||
var minRange = elem.attr('data-date_min');
|
||||
var maxRange = elem.attr('data-date_max');
|
||||
|
||||
var minSplit = [], maxSplit = [];
|
||||
if ( typeof minRange != 'undefined' ) {
|
||||
minSplit = minRange.split(",");
|
||||
}
|
||||
if ( typeof maxRange != 'undefined' ) {
|
||||
maxSplit = maxRange.split(",");
|
||||
}
|
||||
|
||||
var min = minSplit.length ? new Date(minSplit) : null;
|
||||
var max = minSplit.length ? new Date(maxSplit) : null;
|
||||
|
||||
// fix min date for safari
|
||||
if ( min && min.toString() == 'Invalid Date' && minSplit.length == 3 ) {
|
||||
var minDateString = minSplit[1] + '/' + minSplit[2] + '/' + minSplit[0];
|
||||
min = new Date(Date.parse(minDateString));
|
||||
}
|
||||
|
||||
// fix max date for safari
|
||||
if ( max && max.toString() == 'Invalid Date' && maxSplit.length == 3 ) {
|
||||
var maxDateString = maxSplit[1] + '/' + maxSplit[2] + '/' + maxSplit[0];
|
||||
max = new Date(Date.parse(maxDateString));
|
||||
}
|
||||
|
||||
var data = {
|
||||
disable: disable,
|
||||
format: elem.attr( 'data-format' ),
|
||||
formatSubmit: 'yyyy/mm/dd',
|
||||
hiddenName: true,
|
||||
onOpen: function() { elem.blur(); },
|
||||
onClose: function() { elem.blur(); }
|
||||
};
|
||||
|
||||
if ( years_n !== null ) {
|
||||
data.selectYears = years_n;
|
||||
}
|
||||
|
||||
if ( min !== null ) {
|
||||
data.min = min;
|
||||
}
|
||||
|
||||
if ( max !== null ) {
|
||||
data.max = max;
|
||||
}
|
||||
|
||||
elem.pickadate( data );
|
||||
});
|
||||
|
||||
jQuery('.um-timepicker:not(.picker__input)').each(function(){
|
||||
elem = jQuery(this);
|
||||
|
||||
elem.pickatime({
|
||||
format: elem.attr('data-format'),
|
||||
interval: parseInt( elem.attr('data-intervals') ),
|
||||
formatSubmit: 'HH:i',
|
||||
hiddenName: true,
|
||||
onOpen: function() { elem.blur(); },
|
||||
onClose: function() { elem.blur(); }
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function um_init_tooltips() {
|
||||
if ( jQuery( '.um_tooltip' ).length > 0 ) {
|
||||
window.UM.admin.allTooltips = jQuery( '.um_tooltip' ).tooltip({
|
||||
tooltipClass: "um_tooltip",
|
||||
content: function () {
|
||||
return jQuery( this ).attr( 'title' );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
/**
|
||||
clone a field dropdown
|
||||
**/
|
||||
jQuery(document.body).on('click', '.um-admin-clone', function(e){
|
||||
e.preventDefault();
|
||||
var container = jQuery(this).parents('.um-admin-field');
|
||||
var parent = jQuery(this).parents('p').find('.um-admin-field:last-child');
|
||||
container.find('select').select2('destroy');
|
||||
var cloned = container.clone();
|
||||
cloned.find('.um-admin-clone').replaceWith('<a href="#" class="um-admin-clone-remove button um-admin-tipsy-n" title="Remove Field"><i class="um-icon-close" style="margin-right:0!important"></i></a>');
|
||||
cloned.insertAfter( parent );
|
||||
cloned.find('select').val('');
|
||||
jQuery('.um-admin-field select').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: 10
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
remove a field dropdown
|
||||
**/
|
||||
jQuery(document.body).on('click', '.um-admin-clone-remove', function(e){
|
||||
e.preventDefault();
|
||||
var container = jQuery(this).parents('.um-admin-field');
|
||||
jQuery('.tipsy').remove();
|
||||
container.remove();
|
||||
jQuery('.um-admin-field select').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: 10
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
Ajax link
|
||||
**/
|
||||
jQuery('.um-admin-ajaxlink').on('click', function(e){
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
On/Off Buttons
|
||||
**/
|
||||
jQuery(document.body).on('click', '.um-admin-yesno span.btn', function(){
|
||||
if (!jQuery(this).parents('p').hasClass('disabled-on-off')){
|
||||
if ( jQuery(this).parent().find('input[type=hidden]').val() == 0 ){
|
||||
update_val = 1;
|
||||
jQuery(this).animate({'left': '48px'}, 200);
|
||||
jQuery(this).parent().find('input[type=hidden]').val( update_val ).trigger('change');
|
||||
} else {
|
||||
update_val = 0;
|
||||
jQuery(this).animate({'left': '0'}, 200);
|
||||
jQuery(this).parent().find('input[type=hidden]').val( update_val ).trigger('change');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
WP Color Picker
|
||||
**/
|
||||
if ( jQuery('.um-admin-colorpicker').length ) {
|
||||
jQuery('.um-admin-colorpicker').wpColorPicker();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Tooltips
|
||||
**/
|
||||
um_init_tooltips();
|
||||
|
||||
if( typeof tipsy !== 'undefined' ){
|
||||
jQuery('.um-admin-tipsy-n').tipsy({gravity: 'n', opacity: 1, live: 'a.live' });
|
||||
jQuery('.um-admin-tipsy-w').tipsy({gravity: 'w', opacity: 1, live: 'a.live' });
|
||||
jQuery('.um-admin-tipsy-e').tipsy({gravity: 'e', opacity: 1, live: 'a.live' });
|
||||
jQuery('.um-admin-tipsy-s').tipsy({gravity: 's', opacity: 1, live: 'a.live' });
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Conditional fields
|
||||
**/
|
||||
jQuery( document.body ).on('change', '.um-adm-conditional', function(){
|
||||
|
||||
var value;
|
||||
if ( jQuery(this).attr("type") == 'checkbox' ) {
|
||||
value = jQuery(this).is(':checked') ? 1 : 0;
|
||||
} else {
|
||||
value = jQuery(this).val();
|
||||
}
|
||||
|
||||
if ( jQuery(this).data('cond1') ) {
|
||||
if ( value == jQuery(this).data('cond1') ) {
|
||||
jQuery('.' + jQuery(this).data('cond1-show') ).show();
|
||||
jQuery('.' + jQuery(this).data('cond1-hide') ).hide();
|
||||
|
||||
if ( jQuery(this).data('cond1-show') == '_roles' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
jQuery('.' + jQuery(this).data('cond1-show') ).hide();
|
||||
jQuery('.' + jQuery(this).data('cond1-hide') ).show();
|
||||
}
|
||||
}
|
||||
|
||||
if ( jQuery(this).data('cond2') ) {
|
||||
if ( value == jQuery(this).data('cond2') ) {
|
||||
jQuery('.' + jQuery(this).data('cond2-show') ).show();
|
||||
jQuery('.' + jQuery(this).data('cond2-hide') ).hide();
|
||||
|
||||
if ( jQuery(this).data('cond2-show') == '_roles' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
jQuery('.' + jQuery(this).data('cond2-show') ).hide();
|
||||
jQuery('.' + jQuery(this).data('cond2-hide') ).show();
|
||||
}
|
||||
}
|
||||
|
||||
if ( jQuery(this).data('cond3') ) {
|
||||
if ( value == jQuery(this).data('cond3') ) {
|
||||
jQuery('.' + jQuery(this).data('cond3-show') ).show();
|
||||
jQuery('.' + jQuery(this).data('cond3-hide') ).hide();
|
||||
} else {
|
||||
jQuery('.' + jQuery(this).data('cond3-show') ).hide();
|
||||
jQuery('.' + jQuery(this).data('cond3-hide') ).show();
|
||||
}
|
||||
}
|
||||
|
||||
});jQuery('.um-adm-conditional').each(function(){jQuery(this).trigger('change');});
|
||||
|
||||
/**
|
||||
Conditional fields for
|
||||
Radio Group
|
||||
**/
|
||||
jQuery('.um-conditional-radio-group input[type=radio]').on('click', function(){
|
||||
var holder = jQuery('.um-conditional-radio-group');
|
||||
|
||||
var val = jQuery(this).val();
|
||||
var cond1 = holder.data('cond1');
|
||||
var show1 = holder.data('cond1-show');
|
||||
if ( val == cond1 ) { // condition met
|
||||
jQuery('.' + show1).show();
|
||||
} else {
|
||||
jQuery('.' + show1).hide();
|
||||
}
|
||||
|
||||
var val2 = jQuery(this).val();
|
||||
var cond2 = holder.data('cond2');
|
||||
var show2 = holder.data('cond2-show');
|
||||
if ( val2 == cond2 ) { // condition met
|
||||
jQuery('.' + show2).show();
|
||||
} else {
|
||||
jQuery('.' + show2).hide();
|
||||
}
|
||||
|
||||
});jQuery('.um-conditional-radio-group input[type=radio]:checked').each(function(){jQuery(this).trigger('click');});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Conditional fields for
|
||||
nav-menu editor options
|
||||
**/
|
||||
|
||||
jQuery('.um-nav-mode').each( function() {
|
||||
if ( jQuery(this).find('select').val() == 2 ) {
|
||||
jQuery(this).parents('.um-nav-edit').find('.um-nav-roles').show();
|
||||
} else {
|
||||
jQuery(this).parents('.um-nav-edit').find('.um-nav-roles').hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
jQuery( document.body ).on('change', '.um-nav-mode select', function(){
|
||||
if ( jQuery(this).val() == 2 ) {
|
||||
jQuery(this).parents('.um-nav-edit').find('.um-nav-roles').show();
|
||||
} else {
|
||||
jQuery(this).parents('.um-nav-edit').find('.um-nav-roles').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,78 +0,0 @@
|
||||
jQuery(document).on("ready", function(){
|
||||
|
||||
const scan_results_wrapper = jQuery(".um-secure-scan-results");
|
||||
const scan_button_elem = jQuery(".um-secure-scan-content");
|
||||
const scan_capabilities = jQuery("input[data-field_id^='banned_capabilities']");
|
||||
|
||||
var UM_Secure = {
|
||||
init: function() {
|
||||
scan_results_wrapper.css({
|
||||
'margin-top': '10px',
|
||||
'padding': '10px',
|
||||
'padding-bottom': '10px',
|
||||
'background-color': '#fff',
|
||||
'display': 'block',
|
||||
'max-height': '200px',
|
||||
'height': '500px',
|
||||
'overflow-y': 'scroll',
|
||||
});
|
||||
|
||||
scan_button_elem.on("click", function(e){
|
||||
UM_Secure.effect();
|
||||
e.preventDefault();
|
||||
var me = jQuery(this);
|
||||
me.prop("disabled", true);
|
||||
scan_results_wrapper.empty();
|
||||
|
||||
UM_Secure.log( wp.i18n.__( 'Scanning site..', 'ultimate-member' ) );
|
||||
|
||||
UM_Secure.ajax('');
|
||||
|
||||
});
|
||||
scan_capabilities.on("change", function(){
|
||||
scan_button_elem.after( ' <small style="color: red;">' + wp.i18n.__( 'You can start the scan now but you must save the settings to apply the selected capabilities after the scan is complete.', 'ultimate-member' ) + '</small>' );
|
||||
scan_capabilities.off("change");
|
||||
})
|
||||
},
|
||||
ajax: function( last_capability ) {
|
||||
let checkedCaps = [];
|
||||
let checkedCapsInputs = scan_results_wrapper.parents('.um-form-table').find('input[type="checkbox"][data-field_id^="banned_capabilities_"]:checked');
|
||||
checkedCapsInputs.each(function (){
|
||||
checkedCaps.push( jQuery(this).data('field_id').replace('banned_capabilities_', '') );
|
||||
});
|
||||
|
||||
var request = {
|
||||
nonce: um_admin_scripts.nonce,
|
||||
capabilities: checkedCaps,
|
||||
last_scanned_capability: last_capability,
|
||||
};
|
||||
|
||||
wp.ajax.send('um_secure_scan_affected_users', {
|
||||
data: request,
|
||||
success: function (response) {
|
||||
if ( ! response.completed ) {
|
||||
UM_Secure.ajax( response.last_scanned_capability );
|
||||
UM_Secure.log( response.message );
|
||||
} else if ( response.completed ) {
|
||||
scan_results_wrapper.empty();
|
||||
UM_Secure.log( response.recommendations );
|
||||
scan_results_wrapper.find('.current').removeClass('current');
|
||||
scan_button_elem.removeAttr('disabled');
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
log: function( str ) {
|
||||
scan_results_wrapper.find('.current').removeClass('current');
|
||||
scan_results_wrapper.append( '<span class="current">' + str + '</span><br/>' );
|
||||
},
|
||||
effect: function() {
|
||||
var blink = function(){
|
||||
scan_results_wrapper.find(".current").fadeTo(100, 0.1).fadeTo(200, 1.0);
|
||||
};
|
||||
setInterval(blink, 1000);
|
||||
}
|
||||
};
|
||||
|
||||
UM_Secure.init();
|
||||
});
|
||||
@@ -1,33 +1,24 @@
|
||||
<?php
|
||||
namespace um\admin;
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'um\admin\Admin_Functions' ) ) {
|
||||
|
||||
|
||||
/**
|
||||
* Class Admin_Functions
|
||||
* @package um\admin\core
|
||||
*/
|
||||
class Admin_Functions {
|
||||
|
||||
|
||||
/**
|
||||
* Admin_Functions constructor.
|
||||
*/
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check wp-admin nonce
|
||||
*
|
||||
* @param bool $action
|
||||
*/
|
||||
function check_ajax_nonce( $action = false ) {
|
||||
public function check_ajax_nonce( $action = false ) {
|
||||
$nonce = isset( $_REQUEST['nonce'] ) ? sanitize_text_field( $_REQUEST['nonce'] ) : '';
|
||||
$action = empty( $action ) ? 'um-admin-nonce' : $action;
|
||||
|
||||
@@ -36,83 +27,40 @@ if ( ! class_exists( 'um\admin\Admin_Functions' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Boolean check if we're viewing UM backend
|
||||
*
|
||||
* @deprecated 2.7.1
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_um_screen() {
|
||||
global $current_screen;
|
||||
|
||||
$is_um_screen = false;
|
||||
|
||||
if ( ! empty( $current_screen ) ) {
|
||||
$screen_id = $current_screen->id;
|
||||
if ( strstr( $screen_id, 'ultimatemember' ) ||
|
||||
strstr( $screen_id, 'um_' ) ||
|
||||
strstr( $screen_id, 'user' ) ||
|
||||
strstr( $screen_id, 'profile' ) ||
|
||||
$screen_id == 'nav-menus' ) {
|
||||
$is_um_screen = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->is_plugin_post_type() ) {
|
||||
$is_um_screen = true;
|
||||
}
|
||||
|
||||
if ( $this->is_restricted_entity() ) {
|
||||
$is_um_screen = true;
|
||||
}
|
||||
|
||||
return apply_filters( 'um_is_ultimatememeber_admin_screen', $is_um_screen );
|
||||
public function is_um_screen() {
|
||||
_deprecated_function( __METHOD__, '2.7.1', 'UM()->admin()->screen()->is_own_screen()' );
|
||||
return UM()->admin()->screen()->is_own_screen();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if current page load UM post type
|
||||
*
|
||||
* @deprecated 2.7.1
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_plugin_post_type() {
|
||||
$cpt = UM()->cpt_list();
|
||||
|
||||
if ( isset( $_REQUEST['post_type'] ) ) {
|
||||
$post_type = sanitize_key( $_REQUEST['post_type'] );
|
||||
if ( in_array( $post_type, $cpt ) ) {
|
||||
return true;
|
||||
}
|
||||
} elseif ( isset( $_REQUEST['action'] ) && sanitize_key( $_REQUEST['action'] ) == 'edit' ) {
|
||||
$post_type = get_post_type();
|
||||
if ( in_array( $post_type, $cpt ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
public function is_plugin_post_type() {
|
||||
_deprecated_function( __METHOD__, '2.7.1', 'UM()->admin()->screen()->is_own_post_type()' );
|
||||
return UM()->admin()->screen()->is_own_post_type();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If page now show content with restricted post/taxonomy
|
||||
*
|
||||
* @deprecated 2.7.1
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_restricted_entity() {
|
||||
$restricted_posts = UM()->options()->get( 'restricted_access_post_metabox' );
|
||||
$restricted_taxonomies = UM()->options()->get( 'restricted_access_taxonomy_metabox' );
|
||||
|
||||
global $typenow, $taxnow;
|
||||
if ( ! empty( $typenow ) && ! empty( $restricted_posts[ $typenow ] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( ! empty( $taxnow ) && ! empty( $restricted_taxonomies[ $taxnow ] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
public function is_restricted_entity() {
|
||||
_deprecated_function( __METHOD__, '2.7.1', 'UM()->admin()->screen()->is_restricted_entity()' );
|
||||
return UM()->admin()->screen()->is_restricted_entity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,6 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
* Admin constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
|
||||
$this->templates_path = UM_PATH . 'includes/admin/templates/';
|
||||
|
||||
add_action( 'admin_init', array( &$this, 'admin_init' ), 0 );
|
||||
@@ -78,8 +76,6 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
|
||||
add_action( 'um_admin_do_action__install_core_pages', array( &$this, 'install_core_pages' ) );
|
||||
|
||||
add_filter( 'admin_body_class', array( &$this, 'admin_body_class' ), 999 );
|
||||
|
||||
add_action( 'parent_file', array( &$this, 'parent_file' ), 9 );
|
||||
add_filter( 'gettext', array( &$this, 'gettext' ), 10, 4 );
|
||||
add_filter( 'post_updated_messages', array( &$this, 'post_updated_messages' ) );
|
||||
@@ -1590,21 +1586,6 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds class to our admin pages
|
||||
*
|
||||
* @param $classes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function admin_body_class( $classes ) {
|
||||
if ( $this->is_um_screen() ) {
|
||||
return "$classes um-admin";
|
||||
}
|
||||
return $classes;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -2012,9 +1993,9 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function gettext( $translation, $text, $domain ) {
|
||||
public function gettext( $translation, $text, $domain ) {
|
||||
global $post;
|
||||
if ( isset( $post->post_type ) && $this->is_plugin_post_type() ) {
|
||||
if ( isset( $post->post_type ) && $this->screen()->is_own_post_type() ) {
|
||||
$translations = get_translations_for_domain( $domain );
|
||||
if ( $text == 'Publish' ) {
|
||||
return $translations->translate( 'Create' );
|
||||
@@ -2067,6 +2048,18 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
return UM()->classes['admin_notices'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7.1
|
||||
*
|
||||
* @return Screen
|
||||
*/
|
||||
public function screen() {
|
||||
if ( empty( UM()->classes['um\admin\screen'] ) ) {
|
||||
UM()->classes['um\admin\screen'] = new Screen();
|
||||
}
|
||||
return UM()->classes['um\admin\screen'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.6.8
|
||||
*
|
||||
|
||||
+211
-220
@@ -50,7 +50,7 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
|
||||
|
||||
/**
|
||||
* Admin_Enqueue constructor.
|
||||
* Enqueue constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
@@ -63,41 +63,59 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
|
||||
$this->um_cpt_form_screen = false;
|
||||
|
||||
add_filter( 'admin_body_class', array( &$this, 'admin_body_class' ), 999 );
|
||||
|
||||
add_action( 'admin_head', array( &$this, 'admin_head' ), 9 );
|
||||
|
||||
add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
|
||||
|
||||
add_filter( 'enter_title_here', array( &$this, 'enter_title_here' ) );
|
||||
|
||||
add_action( 'load-user-new.php', array( &$this, 'enqueue_role_wrapper' ) );
|
||||
add_action( 'load-user-edit.php', array( &$this, 'enqueue_role_wrapper' ) );
|
||||
add_action( 'load-customize.php', array( &$this, 'navmenu_scripts' ) );
|
||||
add_action( 'load-edit.php', array( &$this, 'posts_page' ) );
|
||||
|
||||
add_action( 'load-post-new.php', array( &$this, 'enqueue_cpt_scripts' ) );
|
||||
add_action( 'load-post.php', array( &$this, 'enqueue_cpt_scripts' ) );
|
||||
|
||||
global $wp_version;
|
||||
if ( version_compare( $wp_version, '5.8', '>=' ) ) {
|
||||
add_filter( 'block_categories_all', array( &$this, 'blocks_category' ), 10, 2 );
|
||||
add_filter( 'block_categories_all', array( &$this, 'blocks_category' ) );
|
||||
} else {
|
||||
add_filter( 'block_categories', array( &$this, 'blocks_category' ), 10, 2 );
|
||||
add_filter( 'block_categories', array( &$this, 'blocks_category' ) );
|
||||
}
|
||||
add_action( 'enqueue_block_assets', array( &$this, 'block_editor' ), 11 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds class to our admin pages
|
||||
*
|
||||
* @since 2.7.1
|
||||
*
|
||||
* @param $classes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function admin_body_class( $classes ) {
|
||||
if ( UM()->admin()->screen()->is_own_screen() ) {
|
||||
return "$classes um um-admin";
|
||||
}
|
||||
return $classes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue Gutenberg Block Editor assets
|
||||
*/
|
||||
public function block_editor() {
|
||||
$suffix = self::get_suffix();
|
||||
$suffix = self::get_suffix();
|
||||
$libs_url = self::get_url( 'libs' );
|
||||
$this->register_jquery_ui();
|
||||
|
||||
wp_register_style( 'um_members', UM_URL . 'assets/css/um-members.css', array( 'um_ui' ), UM_VERSION );
|
||||
if ( is_rtl() ) {
|
||||
wp_register_style( 'um_members_rtl', UM_URL . 'assets/css/um-members-rtl.css', array( 'um_members' ), UM_VERSION );
|
||||
}
|
||||
wp_register_style( 'um_styles', UM_URL . 'assets/css/um-styles.css', array( 'um_ui', 'um_tipsy', 'um_raty', 'um_fonticons_ii', 'um_fonticons_fa', 'select2' ), UM_VERSION );
|
||||
wp_register_style( 'um_profile', UM_URL . 'assets/css/um-profile.css', array(), UM_VERSION );
|
||||
wp_register_style( 'um_crop', UM_URL . 'assets/css/um-crop.css', array(), UM_VERSION );
|
||||
wp_register_style( 'um_responsive', UM_URL . 'assets/css/um-responsive.css', array( 'um_profile', 'um_crop' ), UM_VERSION );
|
||||
wp_register_style( 'um_account', UM_URL . 'assets/css/um-account.css', array(), UM_VERSION );
|
||||
wp_register_style( 'um_default_css', UM_URL . 'assets/css/um-old-default.css', array(), UM_VERSION );
|
||||
@@ -161,9 +179,8 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_register_script( 'um_members', UM_URL . 'assets/js/um-members' . $suffix . '.js', array( 'jquery', 'wp-util', 'jquery-ui-slider', 'um_dropdown', 'wp-hooks', 'jquery-masonry', 'um_scripts' ), UM_VERSION, true );
|
||||
|
||||
wp_register_script( 'um_account', UM_URL . 'assets/js/um-account' . $suffix . '.js', array( 'jquery', 'wp-hooks' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_scrollbar', UM_URL . 'assets/js/simplebar' . $suffix . '.js', array( 'jquery' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_crop', UM_URL . 'assets/js/um-crop' . $suffix . '.js', array( 'jquery' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_functions', UM_URL . 'assets/js/um-functions' . $suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), UM_VERSION, true );
|
||||
|
||||
wp_register_script( 'um_functions', UM_URL . 'assets/js/um-functions' . $suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_responsive', UM_URL . 'assets/js/um-responsive' . $suffix . '.js', array( 'jquery', 'um_functions', 'um_crop' ), UM_VERSION, true );
|
||||
|
||||
// render blocks
|
||||
@@ -174,8 +191,6 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_enqueue_script( 'um_dropdown' );
|
||||
wp_enqueue_script( 'um_members' );
|
||||
wp_enqueue_script( 'um_account' );
|
||||
wp_enqueue_script( 'um_scrollbar' );
|
||||
wp_enqueue_script( 'um_crop' );
|
||||
wp_enqueue_script( 'um_functions' );
|
||||
wp_enqueue_script( 'um_responsive' );
|
||||
|
||||
@@ -183,19 +198,90 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_enqueue_style( 'um_members' );
|
||||
wp_enqueue_style( 'um_styles' );
|
||||
wp_enqueue_style( 'um_profile' );
|
||||
wp_enqueue_style( 'um_crop' );
|
||||
wp_enqueue_style( 'um_responsive' );
|
||||
wp_enqueue_style( 'um_account' );
|
||||
|
||||
$custom_css = '.um{opacity: 1;}.um_request_name {display: none !important;}';
|
||||
|
||||
wp_add_inline_style( 'um_styles', $custom_css );
|
||||
|
||||
$this->load_gutenberg_js();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7.1
|
||||
*/
|
||||
public function navmenu_scripts() {
|
||||
add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_navmenu_scripts' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7.1
|
||||
*/
|
||||
public function posts_page() {
|
||||
if ( isset( $_GET['post_type'] ) && 'um_form' === sanitize_key( $_GET['post_type'] ) ) {
|
||||
add_action( 'admin_enqueue_scripts', array( &$this, 'forms_page_scripts' ) );
|
||||
} elseif ( isset( $_GET['post_type'] ) && 'um_directory' === sanitize_key( $_GET['post_type'] ) ) {
|
||||
add_action( 'admin_enqueue_scripts', array( &$this, 'directories_page_scripts' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7.1
|
||||
*/
|
||||
public function forms_page_scripts() {
|
||||
$suffix = self::get_suffix();
|
||||
$css_url = self::get_url( 'css' );
|
||||
wp_register_style( 'um_admin_forms-screen', $css_url . 'admin/forms-screen' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_forms-screen' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7.1
|
||||
*/
|
||||
public function directories_page_scripts() {
|
||||
$suffix = self::get_suffix();
|
||||
$css_url = self::get_url( 'css' );
|
||||
wp_register_style( 'um_admin_directories-screen', $css_url . 'admin/directories-screen' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_directories-screen' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7.1
|
||||
*/
|
||||
public function enqueue_navmenu_scripts() {
|
||||
$suffix = self::get_suffix();
|
||||
$js_url = self::get_url( 'js' );
|
||||
$css_url = self::get_url( 'css' );
|
||||
|
||||
wp_register_script( 'um_admin_nav_menu', $js_url . 'admin/nav-menu' . $suffix . '.js', array( 'jquery', 'wp-util' ), UM_VERSION, true );
|
||||
$menu_restriction_data = array();
|
||||
$menus = get_posts( 'post_type=nav_menu_item&numberposts=-1' );
|
||||
foreach ( $menus as $data ) {
|
||||
$_nav_roles_meta = get_post_meta( $data->ID, 'menu-item-um_nav_roles', true );
|
||||
|
||||
$um_nav_roles = array();
|
||||
if ( $_nav_roles_meta ) {
|
||||
foreach ( $_nav_roles_meta as $key => $value ) {
|
||||
if ( is_int( $key ) ) {
|
||||
$um_nav_roles[] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$menu_restriction_data[ $data->ID ] = array(
|
||||
'um_nav_public' => get_post_meta( $data->ID, 'menu-item-um_nav_public', true ),
|
||||
'um_nav_roles' => $um_nav_roles,
|
||||
);
|
||||
}
|
||||
wp_localize_script( 'um_admin_nav_menu', 'um_menu_restriction_data', $menu_restriction_data );
|
||||
wp_enqueue_script( 'um_admin_nav_menu' );
|
||||
|
||||
wp_register_style( 'um_admin_nav_menu', $css_url . 'admin/nav-menu' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_nav_menu' );
|
||||
}
|
||||
|
||||
|
||||
public function enqueue_role_wrapper() {
|
||||
add_action( 'admin_enqueue_scripts', array( &$this, 'load_role_wrapper' ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -214,13 +300,16 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
*
|
||||
*/
|
||||
public function enqueue_frontend_preview_assets() {
|
||||
$suffix = self::get_suffix();
|
||||
$suffix = self::get_suffix();
|
||||
$libs_url = self::get_url( 'libs' );
|
||||
|
||||
$this->register_jquery_ui();
|
||||
|
||||
//scripts for FRONTEND PREVIEW
|
||||
wp_register_script( 'um_jquery_form', $this->front_js_baseurl . 'um-jquery-form' . $suffix . '.js', array( 'jquery' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_fileupload', $this->front_js_baseurl . 'um-fileupload.js', array( 'jquery' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_crop', $this->front_js_baseurl . 'um-crop' . $suffix . '.js', array( 'jquery' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_functions', $this->front_js_baseurl . 'um-functions' . $suffix . '.js', array( 'jquery', 'um_tipsy', 'um_scrollbar' ), UM_VERSION, true );
|
||||
|
||||
wp_register_script( 'um_functions', $this->front_js_baseurl . 'um-functions' . $suffix . '.js', array( 'jquery', 'um_tipsy' ), UM_VERSION, true );
|
||||
|
||||
wp_register_script( 'um_datetime', $this->front_js_baseurl . 'pickadate/picker.js', array( 'jquery' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_datetime_date', $this->front_js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
|
||||
@@ -237,40 +326,26 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
}
|
||||
|
||||
wp_register_script( 'um_scripts', $this->front_js_baseurl . 'um-scripts' . $suffix . '.js', array( 'um_functions', 'um_crop', 'um_raty', self::$select2_handle, 'um_jquery_form', 'um_fileupload', 'um_datetime', 'um_datetime_date', 'um_datetime_time'/*, 'um_datetime_legacy'*/ ), UM_VERSION, true );
|
||||
wp_register_script( 'um_responsive', $this->front_js_baseurl . 'um-responsive' . $suffix . '.js', array( 'um_scripts' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_responsive', $this->front_js_baseurl . 'um-responsive' . $suffix . '.js', array( 'um_scripts', 'um_crop' ), UM_VERSION, true );
|
||||
wp_register_script( 'um_modal', $this->front_js_baseurl . 'um-modal' . $suffix . '.js', array( 'um_responsive' ), UM_VERSION, true );
|
||||
|
||||
wp_register_style( 'um_datetime', $this->front_css_baseurl . 'pickadate/default.css', array(), UM_VERSION );
|
||||
wp_register_style( 'um_datetime_date', $this->front_css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), UM_VERSION );
|
||||
wp_register_style( 'um_datetime_time', $this->front_css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
|
||||
wp_register_style( 'um_datetime_time', $this->front_css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), UM_VERSION );
|
||||
|
||||
wp_register_style( 'um_scrollbar', $this->front_css_baseurl . 'simplebar.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_crop', $this->front_css_baseurl . 'um-crop.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_responsive', $this->front_css_baseurl . 'um-responsive.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_responsive', $this->front_css_baseurl . 'um-responsive.css', array(), UM_VERSION );
|
||||
wp_register_style( 'um_modal', $this->front_css_baseurl . 'um-modal.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_styles', $this->front_css_baseurl . 'um-styles.css', array( 'um_ui', 'um_tipsy', 'um_raty', 'um_fonticons_ii', 'um_fonticons_fa', 'select2' ), ultimatemember_version );
|
||||
wp_register_style( 'um_styles', $this->front_css_baseurl . 'um-styles.css', array( 'um_ui', 'um_tipsy', 'um_raty', 'um_fonticons_ii', 'um_fonticons_fa', 'select2' ), UM_VERSION );
|
||||
wp_register_style( 'um_members', $this->front_css_baseurl . 'um-members.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_profile', $this->front_css_baseurl . 'um-profile.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_account', $this->front_css_baseurl . 'um-account.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_misc', $this->front_css_baseurl . 'um-misc.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_default_css', $this->front_css_baseurl . 'um-old-default.css', array( 'um_crop', 'um_tipsy', 'um_raty', 'um_responsive', 'um_modal', 'um_styles', 'um_members', 'um_profile', 'um_account', 'um_misc', 'um_datetime_date', 'um_datetime_time', 'um_scrollbar', 'select2' ), UM_VERSION );
|
||||
wp_register_style( 'um_default_css', $this->front_css_baseurl . 'um-old-default.css', array( 'um_crop', 'um_tipsy', 'um_raty', 'um_responsive', 'um_modal', 'um_styles', 'um_members', 'um_profile', 'um_account', 'um_misc', 'um_datetime_date', 'um_datetime_time', 'select2' ), UM_VERSION );
|
||||
|
||||
wp_enqueue_script( 'um_modal' );
|
||||
wp_enqueue_style( 'um_default_css' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load js for Add/Edit User form
|
||||
*/
|
||||
public function load_role_wrapper() {
|
||||
wp_register_script( 'um_admin_role_wrapper', $this->js_url . 'um-admin-role-wrapper.js', array( 'jquery' ), ultimatemember_version, true );
|
||||
$localize_roles_data = get_option( 'um_roles', array() );
|
||||
wp_localize_script( 'um_admin_role_wrapper', 'um_roles', (array) $localize_roles_data );
|
||||
wp_enqueue_script( 'um_admin_role_wrapper' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Enter title placeholder
|
||||
*
|
||||
@@ -293,7 +368,7 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
* Runs on admin head
|
||||
*/
|
||||
public function admin_head() {
|
||||
if ( UM()->admin()->is_plugin_post_type() ) { ?>
|
||||
if ( UM()->admin()->screen()->is_own_post_type() ) { ?>
|
||||
<style type="text/css">
|
||||
.um-admin.post-type-<?php echo esc_attr( get_post_type() ); ?> div#slugdiv,
|
||||
.um-admin.post-type-<?php echo esc_attr( get_post_type() ); ?> div#minor-publishing,
|
||||
@@ -304,19 +379,6 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load Form
|
||||
*/
|
||||
public function load_form() {
|
||||
wp_register_style( 'um_admin_form', $this->css_url . 'um-admin-form.css', array(), ultimatemember_version );
|
||||
wp_enqueue_style( 'um_admin_form' );
|
||||
|
||||
wp_register_script( 'um_admin_form', $this->js_url . 'um-admin-form.js', array( 'jquery' ), ultimatemember_version, true );
|
||||
wp_enqueue_script( 'um_admin_form' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load Forms
|
||||
*/
|
||||
@@ -326,7 +388,7 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_register_style( 'um_admin_forms', $this->css_url . 'um-admin-forms.css', array( 'wp-color-picker', 'um_ui', 'select2' ), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_forms' );
|
||||
|
||||
wp_register_script( 'um_admin_forms', $this->js_url . 'um-admin-forms.js', array( 'jquery', 'wp-i18n', self::$select2_handle ), UM_VERSION, true );
|
||||
wp_register_script( 'um_admin_forms', $this->js_url . 'um-admin-forms.js', array( 'jquery', 'wp-i18n', self::$select2_handle, 'jquery-ui-draggable', 'jquery-ui-sortable' ), UM_VERSION, true );
|
||||
|
||||
wp_localize_script(
|
||||
'um_admin_forms',
|
||||
@@ -347,28 +409,6 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_enqueue_script( 'um_admin_forms' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load dashboard
|
||||
*/
|
||||
public function load_dashboard() {
|
||||
wp_register_style( 'um_admin_dashboard', $this->css_url . 'um-admin-dashboard.css', array(), ultimatemember_version );
|
||||
wp_enqueue_style( 'um_admin_dashboard' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load settings
|
||||
*/
|
||||
public function load_settings() {
|
||||
wp_register_style( 'um_admin_settings', $this->css_url . 'um-admin-settings.css', array(), ultimatemember_version );
|
||||
wp_enqueue_style( 'um_admin_settings' );
|
||||
|
||||
wp_register_script( 'um_admin_settings', $this->js_url . 'um-admin-settings.js', array( 'jquery', 'wp-i18n' ), ultimatemember_version, true );
|
||||
wp_enqueue_script( 'um_admin_settings' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load modal
|
||||
*/
|
||||
@@ -376,7 +416,7 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_register_style( 'um_admin_modal', $this->css_url . 'um-admin-modal.css', array( 'wp-color-picker' ), ultimatemember_version );
|
||||
wp_enqueue_style( 'um_admin_modal' );
|
||||
|
||||
wp_register_script( 'um_admin_modal', $this->js_url . 'um-admin-modal.js', array( 'jquery', 'editor', 'wp-util', 'wp-color-picker', 'wp-tinymce', 'wp-i18n', 'jquery-ui-tooltip', 'um_admin_scripts' ), ultimatemember_version, true );
|
||||
wp_register_script( 'um_admin_modal', $this->js_url . 'um-admin-modal.js', array( 'jquery', 'editor', 'wp-util', 'wp-color-picker', 'wp-tinymce', 'wp-i18n', 'um_admin_common' ), ultimatemember_version, true );
|
||||
wp_enqueue_script( 'um_admin_modal' );
|
||||
}
|
||||
|
||||
@@ -394,28 +434,19 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
* Load Builder
|
||||
*/
|
||||
public function load_builder() {
|
||||
wp_register_script( 'um_admin_builder', $this->js_url . 'um-admin-builder.js', array( 'jquery', 'wp-util' ), ultimatemember_version, true );
|
||||
$this->enqueue_frontend_preview_assets();
|
||||
|
||||
$suffix = self::get_suffix();
|
||||
$js_url = self::get_url( 'js' );
|
||||
$css_url = self::get_url( 'css' );
|
||||
|
||||
wp_register_script( 'um_admin_builder', $js_url . 'admin/builder' . $suffix . '.js', array( 'um_common', 'jquery-ui-draggable', 'jquery-ui-sortable' ), UM_VERSION, true );
|
||||
wp_enqueue_script( 'um_admin_builder' );
|
||||
|
||||
//hide footer text on add/edit UM Forms
|
||||
//layouts crashed because we load and hide metaboxes
|
||||
//and WP calculate page height
|
||||
$hide_footer = false;
|
||||
global $pagenow, $post;
|
||||
// phpcs:ignore WordPress.Security.NonceVerification
|
||||
if ( ( 'post.php' === $pagenow || 'post-new.php' === $pagenow ) && ( ( isset( $_GET['post_type'] ) && 'um_form' === sanitize_key( $_GET['post_type'] ) ) || ( isset( $post->post_type ) && 'um_form' === $post->post_type ) ) ) {
|
||||
$hide_footer = true;
|
||||
}
|
||||
|
||||
$localize_data = array(
|
||||
'hide_footer' => $hide_footer,
|
||||
);
|
||||
wp_localize_script( 'um_admin_builder', 'um_admin_builder_data', $localize_data );
|
||||
|
||||
wp_register_script( 'um_admin_dragdrop', $this->js_url . 'um-admin-dragdrop.js', array( 'jquery', 'wp-util' ), ultimatemember_version, true );
|
||||
wp_enqueue_script( 'um_admin_dragdrop' );
|
||||
|
||||
wp_register_style( 'um_admin_builder', $this->css_url . 'um-admin-builder.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_admin_builder', $css_url . 'admin/builder' . $suffix . '.css', array( 'um_ui' ), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_builder' );
|
||||
}
|
||||
|
||||
@@ -426,8 +457,6 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
public function load_core_wp() {
|
||||
wp_enqueue_script( 'jquery-ui-draggable' );
|
||||
wp_enqueue_script( 'jquery-ui-sortable' );
|
||||
|
||||
wp_enqueue_script( 'jquery-ui-tooltip' );
|
||||
}
|
||||
|
||||
|
||||
@@ -435,9 +464,6 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
* Load Admin Styles
|
||||
*/
|
||||
public function load_css() {
|
||||
wp_register_style( 'um_admin_menu', $this->css_url . 'um-admin-menu.css', array(), ultimatemember_version );
|
||||
wp_enqueue_style( 'um_admin_menu' );
|
||||
|
||||
wp_register_style( 'um_admin_columns', $this->css_url . 'um-admin-columns.css', array(), ultimatemember_version );
|
||||
wp_enqueue_style( 'um_admin_columns' );
|
||||
|
||||
@@ -450,72 +476,47 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
* Load functions js
|
||||
*/
|
||||
public function load_functions() {
|
||||
wp_register_script( 'um_scrollbar', UM_URL . 'assets/js/simplebar.js', array( 'jquery' ), ultimatemember_version, true );
|
||||
wp_register_script( 'um_functions', UM_URL . 'assets/js/um-functions.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
|
||||
wp_register_script( 'um_functions', UM_URL . 'assets/js/um-functions.js', array( 'jquery', 'jquery-masonry', 'wp-util' ), UM_VERSION, true );
|
||||
wp_enqueue_script( 'um_functions' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load Fonticons
|
||||
*
|
||||
* @depecated 2.7.0
|
||||
*/
|
||||
public function load_fonticons() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load global css
|
||||
*/
|
||||
public function load_global_scripts() {
|
||||
wp_register_script( 'um_admin_global', $this->js_url . 'um-admin-global.js', array( 'jquery' ), ultimatemember_version, true );
|
||||
$suffix = self::get_suffix();
|
||||
$js_url = self::get_url( 'js' );
|
||||
$css_url = self::get_url( 'css' );
|
||||
|
||||
wp_register_script( 'um_admin_global', $js_url . 'admin/global' . $suffix . '.js', array( 'jquery' ), UM_VERSION, true );
|
||||
$localize_data = array(
|
||||
'nonce' => wp_create_nonce( 'um-admin-nonce' ),
|
||||
);
|
||||
/**
|
||||
* Filters data array for localize wp-admin global scripts.
|
||||
*
|
||||
* @since 2.0
|
||||
* @hook um_admin_enqueue_localize_data
|
||||
*
|
||||
* @param {array} $variables Data to localize.
|
||||
*
|
||||
* @return {array} Data to localize.
|
||||
*
|
||||
* @example <caption>Add `my_custom_variable` to wp-admin global scripts to be callable via `um_admin_scripts.my_custom_variable` in JS.</caption>
|
||||
* function um_custom_admin_enqueue_localize_data( $variables ) {
|
||||
* $variables['{my_custom_variable}'] = '{my_custom_variable_value}';
|
||||
* return $variables;
|
||||
* }
|
||||
* add_filter( 'um_admin_enqueue_localize_data', 'um_custom_admin_enqueue_localize_data' );
|
||||
*/
|
||||
$localize_data = apply_filters( 'um_admin_enqueue_localize_data', $localize_data );
|
||||
wp_localize_script( 'um_admin_global', 'um_admin_scripts', $localize_data );
|
||||
wp_enqueue_script( 'um_admin_global' );
|
||||
|
||||
wp_register_style( 'um_admin_global', $this->css_url . 'um-admin-global.css', array( 'um_fonticons_ii', 'um_fonticons_fa' ), ultimatemember_version );
|
||||
wp_register_style( 'um_admin_global', $css_url . 'admin/global' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_global' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load jQuery custom code
|
||||
*/
|
||||
public function load_custom_scripts() {
|
||||
wp_register_script( 'um_datetime', $this->front_js_baseurl . 'pickadate/picker.js', array( 'jquery' ), ultimatemember_version, true );
|
||||
wp_register_script( 'um_datetime_date', $this->front_js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
||||
wp_register_script( 'um_datetime_time', $this->front_js_baseurl . 'pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
||||
//wp_register_script( 'um_datetime_legacy', $this->front_js_baseurl . 'pickadate/legacy.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
||||
// load a localized version for date/time
|
||||
$locale = get_locale();
|
||||
if ( $locale ) {
|
||||
if ( file_exists( WP_LANG_DIR . '/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js' ) ) {
|
||||
wp_register_script( 'um_datetime_locale', content_url() . '/languages/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
||||
} elseif ( file_exists( UM_PATH . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
|
||||
wp_register_script( 'um_datetime_locale', UM_URL . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
||||
}
|
||||
}
|
||||
|
||||
wp_register_style( 'um_datetime', $this->front_css_baseurl . 'pickadate/default.css', array(), ultimatemember_version );
|
||||
wp_register_style( 'um_datetime_date', $this->front_css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), ultimatemember_version );
|
||||
wp_register_style( 'um_datetime_time', $this->front_css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
|
||||
|
||||
wp_enqueue_style( 'um_datetime_date' );
|
||||
wp_enqueue_style( 'um_datetime_time' );
|
||||
|
||||
wp_register_script( 'um_admin_scripts', $this->js_url . 'um-admin-scripts.js', array( 'jquery', 'wp-util', 'wp-color-picker', 'um_datetime', 'um_datetime_date', 'um_datetime_time'/*, 'um_datetime_legacy'*/ ), ultimatemember_version, true );
|
||||
wp_enqueue_script( 'um_admin_scripts' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load jQuery custom code
|
||||
*/
|
||||
public function load_nav_manus_scripts() {
|
||||
wp_register_script( 'um_admin_nav_manus', $this->js_url . 'um-admin-nav-menu.js', array( 'jquery', 'wp-util' ), ultimatemember_version, true );
|
||||
wp_enqueue_script( 'um_admin_nav_manus' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load AJAX
|
||||
*/
|
||||
@@ -540,11 +541,15 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_register_script( 'um_block_js', $this->js_url . 'um-admin-blocks.js', array( 'wp-i18n', 'wp-blocks', 'wp-components', 'wp-hooks' ), ultimatemember_version, true );
|
||||
$suffix = self::get_suffix();
|
||||
$js_url = self::get_url( 'js' );
|
||||
$css_url = self::get_url( 'css' );
|
||||
|
||||
wp_register_script( 'um_block_js', $js_url . 'admin/block' . $suffix . '.js', array( 'wp-i18n', 'wp-blocks', 'wp-components', 'wp-hooks' ), UM_VERSION, true );
|
||||
wp_set_script_translations( 'um_block_js', 'ultimate-member' );
|
||||
|
||||
$restrict_options = array();
|
||||
$roles = UM()->roles()->get_roles( false );
|
||||
$roles = UM()->roles()->get_roles();
|
||||
if ( ! empty( $roles ) ) {
|
||||
foreach ( $roles as $role_key => $title ) {
|
||||
$restrict_options[] = array(
|
||||
@@ -554,22 +559,23 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
}
|
||||
}
|
||||
wp_localize_script( 'um_block_js', 'um_restrict_roles', $restrict_options );
|
||||
|
||||
wp_enqueue_script( 'um_block_js' );
|
||||
|
||||
wp_register_style( 'um_block_css', $css_url . 'admin/block' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_block_css' );
|
||||
|
||||
do_action( 'um_load_gutenberg_js' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add Gutenberg category for UM shortcodes
|
||||
* Add Gutenberg category for UM shortcodes.
|
||||
*
|
||||
* @param array $categories
|
||||
* @param \WP_Block_Editor_Context $context
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function blocks_category( $categories, $context ) {
|
||||
public function blocks_category( $categories ) {
|
||||
$enable_blocks = UM()->options()->get( 'enable_blocks' );
|
||||
if ( empty( $enable_blocks ) ) {
|
||||
return $categories;
|
||||
@@ -587,79 +593,48 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
}
|
||||
|
||||
/**
|
||||
* Load localize scripts
|
||||
* Enqueue scripts and styles.
|
||||
*
|
||||
* @param string $hook wp-admin screen.
|
||||
*/
|
||||
public function load_localize_scripts() {
|
||||
public function admin_enqueue_scripts( $hook ) {
|
||||
$suffix = self::get_suffix();
|
||||
$libs_url = self::get_url( 'libs' );
|
||||
$js_url = self::get_url( 'js' );
|
||||
$css_url = self::get_url( 'css' );
|
||||
|
||||
/**
|
||||
* UM hook
|
||||
*
|
||||
* @type filter
|
||||
* @title um_admin_enqueue_localize_data
|
||||
* @description Extend localize data at wp-admin side
|
||||
* @input_vars
|
||||
* [{"var":"$localize_data","type":"array","desc":"Localize Data"}]
|
||||
* @change_log
|
||||
* ["Since: 2.0"]
|
||||
* @usage add_filter( 'um_admin_enqueue_localize_data', 'function_name', 10, 1 );
|
||||
* @example
|
||||
* <?php
|
||||
* add_filter( 'um_admin_enqueue_localize_data', 'my_admin_enqueue_localize_data', 10, 1 );
|
||||
* function my_admin_enqueue_localize_data( $localize_data ) {
|
||||
* // your code here
|
||||
* return $localize_data;
|
||||
* }
|
||||
* ?>
|
||||
*/
|
||||
$localize_data = apply_filters( 'um_admin_enqueue_localize_data', array( 'nonce' => wp_create_nonce( 'um-admin-nonce' ) ) );
|
||||
$this->load_global_scripts();
|
||||
|
||||
wp_localize_script( 'um_admin_global', 'um_admin_scripts', $localize_data );
|
||||
}
|
||||
if ( UM()->admin()->screen()->is_own_screen() ) {
|
||||
wp_register_script( 'um_admin_common', $js_url . 'admin/common' . $suffix . '.js', array( 'jquery', 'wp-i18n', 'wp-color-picker', 'jquery-ui-tooltip', 'um_datetime', 'um_datetime_date', 'um_datetime_time' ), UM_VERSION, true );
|
||||
wp_enqueue_script( 'um_admin_common' );
|
||||
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles
|
||||
*/
|
||||
public function admin_enqueue_scripts() {
|
||||
if ( UM()->admin()->is_um_screen() ) {
|
||||
$suffix = self::get_suffix();
|
||||
wp_register_style( 'um_admin_common', $css_url . 'admin/common' . $suffix . '.css', array( 'um_common', 'um_ui', 'dashicons', 'um_datetime_date', 'um_datetime_time' ), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_common' );
|
||||
|
||||
/*if ( get_post_type() != 'shop_order' ) {
|
||||
UM()->enqueue()->wp_enqueue_scripts();
|
||||
}*/
|
||||
|
||||
$modal_deps = array( 'um-admin-scripts' );
|
||||
// $modal_deps = array( 'um-admin-scripts' );
|
||||
if ( $this->um_cpt_form_screen ) {
|
||||
$this->enqueue_frontend_preview_assets();
|
||||
$modal_deps[] = 'um-responsive';
|
||||
$this->load_builder();
|
||||
// $modal_deps[] = 'um-responsive';
|
||||
}
|
||||
|
||||
$this->load_functions();
|
||||
$this->load_global_scripts();
|
||||
$this->load_form();
|
||||
$this->load_forms();
|
||||
$this->load_custom_scripts();
|
||||
$this->load_modal();
|
||||
$this->load_dashboard();
|
||||
$this->load_settings();
|
||||
$this->load_field();
|
||||
$this->load_builder();
|
||||
$this->load_css();
|
||||
$this->load_core_wp();
|
||||
$this->load_ajax_js();
|
||||
//$this->load_fonticons();
|
||||
$this->load_localize_scripts();
|
||||
|
||||
//scripts for frontend preview
|
||||
UM()->frontend()->enqueue()->load_imagecrop();
|
||||
// Scripts for frontend preview.
|
||||
UM()->frontend()->enqueue()->load_css();
|
||||
// UM()->frontend()->enqueue()->load_tipsy();
|
||||
UM()->frontend()->enqueue()->load_modal();
|
||||
UM()->frontend()->enqueue()->load_responsive();
|
||||
|
||||
//wp_register_script( 'um_raty', UM_URL . 'assets/js/um-raty' . $suffix . '.js', array( 'jquery', 'wp-i18n' ), ultimatemember_version, true );
|
||||
//wp_register_style( 'um_raty', UM_URL . 'assets/css/um-raty.css', array(), ultimatemember_version );
|
||||
|
||||
wp_register_style( 'um_default_css', UM_URL . 'assets/css/um-old-default.css', '', ultimatemember_version, 'all' );
|
||||
wp_enqueue_style( 'um_default_css' );
|
||||
|
||||
@@ -667,23 +642,40 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_register_style( 'um_admin_rtl', $this->css_url . 'um-admin-rtl.css', array(), ultimatemember_version );
|
||||
wp_enqueue_style( 'um_admin_rtl' );
|
||||
}
|
||||
} else {
|
||||
|
||||
$this->load_global_scripts();
|
||||
$this->load_localize_scripts();
|
||||
|
||||
}
|
||||
|
||||
global $wp_version, $current_screen;
|
||||
|
||||
if ( version_compare( $wp_version, '5.0', '>=' ) ) {
|
||||
if ( isset( $current_screen ) && $current_screen->is_block_editor() ) {
|
||||
$this->load_gutenberg_js();
|
||||
if ( 'users.php' === $hook ) {
|
||||
wp_register_style( 'um_admin_users', $css_url . 'admin/users' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_users' );
|
||||
} elseif ( 'user-new.php' === $hook || 'user-edit.php' === $hook ) {
|
||||
wp_register_script( 'um_admin_role_wrapper', $js_url . 'admin/user' . $suffix . '.js', array( 'jquery', 'wp-hooks' ), UM_VERSION, true );
|
||||
$localize_roles_data = get_option( 'um_roles', array() );
|
||||
wp_localize_script( 'um_admin_role_wrapper', 'um_roles', (array) $localize_roles_data );
|
||||
wp_enqueue_script( 'um_admin_role_wrapper' );
|
||||
} elseif ( 'toplevel_page_ultimatemember' === $hook ) {
|
||||
wp_register_style( 'um_admin_dashboard', $css_url . 'admin/dashboard' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_dashboard' );
|
||||
} elseif ( 'ultimate-member_page_um_roles' === $hook ) {
|
||||
wp_register_style( 'um_admin_roles', $css_url . 'admin/roles' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_roles' );
|
||||
} elseif ( 'ultimate-member_page_um_options' === $hook ) {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification
|
||||
if ( isset( $_GET['tab'] ) && 'secure' === $_GET['tab'] ) {
|
||||
wp_register_script( 'um_admin_secure', $js_url . 'admin/secure' . $suffix . '.js', array( 'jquery', 'wp-i18n' ), UM_VERSION, true );
|
||||
wp_enqueue_script( 'um_admin_secure' );
|
||||
}
|
||||
|
||||
wp_register_style( 'um_admin_settings', $css_url . 'admin/settings' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_settings' );
|
||||
|
||||
wp_register_script( 'um_admin_settings', $js_url . 'admin/settings' . $suffix . '.js', array( 'jquery', 'wp-i18n' ), UM_VERSION, true );
|
||||
wp_enqueue_script( 'um_admin_settings' );
|
||||
} elseif ( 'ultimate-member_page_ultimatemember-extensions' === $hook ) {
|
||||
wp_register_style( 'um_admin_extensions', $css_url . 'admin/extensions' . $suffix . '.css', array(), UM_VERSION );
|
||||
wp_enqueue_style( 'um_admin_extensions' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print editor scripts if they are not printed by default
|
||||
*/
|
||||
@@ -704,12 +696,11 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
}
|
||||
|
||||
if ( ! class_exists( $class, false ) ) {
|
||||
require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
|
||||
require_once ABSPATH . WPINC . '/class-wp-editor.php';
|
||||
}
|
||||
|
||||
$class::force_uncompressed_tinymce();
|
||||
$class::enqueue_scripts();
|
||||
$class::editor_js();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
namespace um\admin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Screen
|
||||
*
|
||||
* @since 2.7.1
|
||||
*
|
||||
* @package um\admin
|
||||
*/
|
||||
class Screen {
|
||||
|
||||
/**
|
||||
* Boolean check if we're viewing UM backend
|
||||
*
|
||||
* @since 2.7.1
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_own_screen() {
|
||||
global $current_screen;
|
||||
|
||||
$is_um_screen = false;
|
||||
if ( ! empty( $current_screen ) && isset( $current_screen->id ) ) {
|
||||
$screen_id = $current_screen->id;
|
||||
if ( strstr( $screen_id, 'ultimatemember' ) ||
|
||||
strstr( $screen_id, 'um_' ) ||
|
||||
strstr( $screen_id, 'user' ) ||
|
||||
strstr( $screen_id, 'profile' ) ||
|
||||
'nav-menus' === $screen_id ) {
|
||||
$is_um_screen = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->is_own_post_type() ) {
|
||||
$is_um_screen = true;
|
||||
}
|
||||
|
||||
if ( $this->is_restricted_entity() ) {
|
||||
$is_um_screen = true;
|
||||
}
|
||||
|
||||
return apply_filters( 'um_is_ultimatememeber_admin_screen', $is_um_screen );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if current page load UM post type.
|
||||
*
|
||||
* @since 2.7.1
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_own_post_type() {
|
||||
$cpt = UM()->common()->cpt()->get_list();
|
||||
|
||||
if ( isset( $_REQUEST['post_type'] ) ) {
|
||||
$post_type = sanitize_key( $_REQUEST['post_type'] );
|
||||
if ( in_array( $post_type, $cpt, true ) ) {
|
||||
return true;
|
||||
}
|
||||
} elseif ( isset( $_REQUEST['action'] ) && 'edit' === sanitize_key( $_REQUEST['action'] ) ) {
|
||||
$post_type = get_post_type();
|
||||
if ( in_array( $post_type, $cpt, true ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* If page now show content with restricted post/taxonomy.
|
||||
*
|
||||
* @since 2.7.1
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_restricted_entity() {
|
||||
$restricted_posts = UM()->options()->get( 'restricted_access_post_metabox' );
|
||||
$restricted_taxonomies = UM()->options()->get( 'restricted_access_taxonomy_metabox' );
|
||||
|
||||
global $typenow, $taxnow;
|
||||
if ( ! empty( $typenow ) && ! empty( $restricted_posts[ $typenow ] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( ! empty( $taxnow ) && ! empty( $restricted_taxonomies[ $taxnow ] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -49,22 +49,9 @@ if ( ! class_exists( 'um\admin\Secure' ) ) {
|
||||
add_action( 'um_settings_before_save', array( $this, 'check_secure_changes' ) );
|
||||
add_action( 'um_settings_save', array( $this, 'on_settings_save' ) );
|
||||
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
|
||||
|
||||
add_action( 'wp_ajax_um_secure_scan_affected_users', array( $this, 'ajax_scanner' ) );
|
||||
}
|
||||
|
||||
public function admin_scripts( $hook ) {
|
||||
// phpcs:disable WordPress.Security.NonceVerification
|
||||
if ( 'ultimate-member_page_um_options' !== $hook || ( isset( $_GET['tab'] ) && 'secure' !== $_GET['tab'] ) ) {
|
||||
return;
|
||||
}
|
||||
// phpcs:enable WordPress.Security.NonceVerification
|
||||
|
||||
wp_register_script( 'um_admin_secure', UM()->admin()->enqueue()->js_url . 'um-admin-secure.js', array( 'jquery' ), UM_VERSION, true );
|
||||
wp_enqueue_script( 'um_admin_secure' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter users by Register Date
|
||||
*
|
||||
|
||||
@@ -656,7 +656,7 @@ class Site_Health {
|
||||
/**
|
||||
* Filters a privacy list extend.
|
||||
*
|
||||
* @since 2.6.13
|
||||
* @since 2.7.0
|
||||
* @hook um_profile_tabs_privacy_list
|
||||
*
|
||||
* @param {array} $privacy_option Add options for profile tabs' privacy.
|
||||
@@ -699,7 +699,7 @@ class Site_Health {
|
||||
/**
|
||||
* Filters appearance settings for Site Health extend.
|
||||
*
|
||||
* @since 2.6.13
|
||||
* @since 2.7.0
|
||||
* @hook um_profile_tabs_site_health
|
||||
*
|
||||
* @param {array} $appearance_settings Appearance settings for Site Health.
|
||||
@@ -716,9 +716,9 @@ class Site_Health {
|
||||
$appearance_settings = apply_filters( 'um_profile_tabs_site_health', $appearance_settings );
|
||||
|
||||
/**
|
||||
* Filters extend user profile tabs
|
||||
* Filters user profile tabs
|
||||
*
|
||||
* @since 2.6.13
|
||||
* @since 2.7.0
|
||||
* @hook um_profile_tabs
|
||||
*
|
||||
* @param {array} $tabs tabs list.
|
||||
@@ -963,7 +963,7 @@ class Site_Health {
|
||||
/**
|
||||
* Filters licenses settings for Site Health.
|
||||
*
|
||||
* @since 2.6.13
|
||||
* @since 2.7.0
|
||||
* @hook um_licenses_site_health
|
||||
*
|
||||
* @param {array} $license_settings licenses settings for Site Health.
|
||||
|
||||
@@ -248,9 +248,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<?php $metabox->field_input( '_conditional_operator', $form_id ); ?>
|
||||
<?php $metabox->field_input( '_conditional_value', $form_id ); ?>
|
||||
|
||||
<p><a href="javascript:void(0);" class="um-admin-remove-condition button um-admin-tipsy-n" title="Remove condition"><i class="um-icon-close" style="margin-right:0!important"></i></a></p>
|
||||
<p><a href="javascript:void(0);" class="um-admin-remove-condition button um-tip-n" title="Remove condition"><i class="um-icon-close" style="margin-right:0!important"></i></a></p>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<p class="um-admin-conditions-notice">
|
||||
<small>
|
||||
@@ -259,10 +259,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<br><?php _e( 'Use the condition operator `contains` if the parent field has multiple options.', 'ultimate-member' ); ?>
|
||||
</small>
|
||||
</p>
|
||||
<p><a href="javascript:void(0);" class="um-admin-new-condition button button-primary um-admin-tipsy-n" title="Add new condition"><?php _e( 'Add new rule', 'ultimate-member' ); ?></a></p>
|
||||
<p><a href="javascript:void(0);" class="um-admin-new-condition button button-primary um-tip-n" title="Add new condition"><?php _e( 'Add new rule', 'ultimate-member' ); ?></a></p>
|
||||
<p class="um-admin-reset-conditions"><a href="javascript:void(0);" class="button"><?php _e( 'Reset all rules', 'ultimate-member' ); ?></a></p>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php if ( isset( $edit_array['conditions'] ) && count( $edit_array['conditions'] ) != 0 ) {
|
||||
|
||||
@@ -277,9 +277,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<?php $metabox->field_input( '_conditional_operator' . $k, $form_id ); ?>
|
||||
<?php $metabox->field_input( '_conditional_value' . $k, $form_id ); ?>
|
||||
|
||||
<p><a href="#" class="um-admin-remove-condition button um-admin-tipsy-n" title="Remove condition"><i class="um-icon-close" style="margin-right:0!important"></i></a></p>
|
||||
<p><a href="#" class="um-admin-remove-condition button um-tip-n" title="Remove condition"><i class="um-icon-close" style="margin-right:0!important"></i></a></p>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@@ -294,9 +294,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<?php $metabox->field_input( '_conditional_operator', $form_id ); ?>
|
||||
<?php $metabox->field_input( '_conditional_value', $form_id ); ?>
|
||||
|
||||
<p><a href="#" class="um-admin-remove-condition button um-admin-tipsy-n" title="Remove condition"><i class="um-icon-close" style="margin-right:0!important"></i></a></p>
|
||||
<p><a href="#" class="um-admin-remove-condition button um-tip-n" title="Remove condition"><i class="um-icon-close" style="margin-right:0!important"></i></a></p>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
@@ -419,11 +419,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<span class="um-admin-row-loading"><span></span></span>
|
||||
<!-- Master Row Actions -->
|
||||
<div class="um-admin-drag-row-icons">
|
||||
<a href="javascript:void(0);" class="um-admin-drag-rowsub-add um-admin-tipsy-n" title="<?php esc_attr_e( 'Add Row', 'ultimate-member' ); ?>" data-row_action="add_subrow"><i class="um-icon-plus"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-row-edit um-admin-tipsy-n" title="<?php esc_attr_e( 'Edit Row', 'ultimate-member' ); ?>" data-modal="UM_edit_row" data-modal-size="normal" data-dynamic-content="um_admin_edit_field_popup" data-arg1="row" data-arg2="<?php echo esc_attr( $this->form_id ); ?>" data-arg3="_um_row_1"><i class="um-faicon-pencil"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-rowsub-add um-tip-n" title="<?php esc_attr_e( 'Add Row', 'ultimate-member' ); ?>" data-row_action="add_subrow"><i class="um-icon-plus"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-row-edit um-tip-n" title="<?php esc_attr_e( 'Edit Row', 'ultimate-member' ); ?>" data-modal="UM_edit_row" data-modal-size="normal" data-dynamic-content="um_admin_edit_field_popup" data-arg1="row" data-arg2="<?php echo esc_attr( $this->form_id ); ?>" data-arg3="_um_row_1"><i class="um-faicon-pencil"></i></a>
|
||||
<span class="um-admin-drag-row-start"><i class="um-icon-arrow-move"></i></span>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<div class="um-admin-drag-rowsubs">
|
||||
<div class="um-admin-drag-rowsub">
|
||||
<span class="um-admin-row-loading"><span></span></span>
|
||||
@@ -436,11 +436,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<!-- Sub Row Actions -->
|
||||
<div class="um-admin-drag-rowsub-icons">
|
||||
<span class="um-admin-drag-rowsub-start"><i class="um-icon-arrow-move"></i></span>
|
||||
</div><div class="um-admin-clear"></div>
|
||||
</div><div class="clear"></div>
|
||||
<!-- Columns -->
|
||||
<div class="um-admin-drag-col"></div>
|
||||
<div class="um-admin-drag-col-dynamic"></div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -473,14 +473,14 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<span class="um-admin-row-loading"><span></span></span>
|
||||
<!-- Master Row Actions -->
|
||||
<div class="um-admin-drag-row-icons">
|
||||
<a href="javascript:void(0);" class="um-admin-drag-rowsub-add um-admin-tipsy-n" title="<?php esc_attr_e( 'Add Row', 'ultimate-member' ); ?>" data-row_action="add_subrow"><i class="um-icon-plus"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-row-edit um-admin-tipsy-n" title="<?php esc_attr_e( 'Edit Row', 'ultimate-member' ); ?>" data-modal="UM_edit_row" data-modal-size="normal" data-dynamic-content="um_admin_edit_field_popup" data-arg1="row" data-arg2="<?php echo esc_attr( $this->form_id ); ?>" data-arg3="<?php echo esc_attr( $row_id ); ?>"><i class="um-faicon-pencil"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-rowsub-add um-tip-n" title="<?php esc_attr_e( 'Add Row', 'ultimate-member' ); ?>" data-row_action="add_subrow"><i class="um-icon-plus"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-row-edit um-tip-n" title="<?php esc_attr_e( 'Edit Row', 'ultimate-member' ); ?>" data-modal="UM_edit_row" data-modal-size="normal" data-dynamic-content="um_admin_edit_field_popup" data-arg1="row" data-arg2="<?php echo esc_attr( $this->form_id ); ?>" data-arg3="<?php echo esc_attr( $row_id ); ?>"><i class="um-faicon-pencil"></i></a>
|
||||
<span class="um-admin-drag-row-start"><i class="um-icon-arrow-move"></i></span>
|
||||
<?php if ( '_um_row_1' !== $row_id ) { ?>
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-row"><i class="um-faicon-trash-o"></i></a>
|
||||
<a href="javascript:void(0);" class="um-tip-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-row"><i class="um-faicon-trash-o"></i></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<div class="um-admin-drag-rowsubs">
|
||||
<?php
|
||||
$row_fields = $this->get_fields_by_row( $row_id );
|
||||
@@ -515,10 +515,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
<div class="um-admin-drag-rowsub-icons">
|
||||
<span class="um-admin-drag-rowsub-start"><i class="um-icon-arrow-move"></i></span>
|
||||
<?php if ( $c > 0 ) { ?>
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-rowsub"><i class="um-faicon-trash-o"></i></a>
|
||||
<a href="javascript:void(0);" class="um-tip-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-rowsub"><i class="um-faicon-trash-o"></i></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<!-- Columns -->
|
||||
<div class="um-admin-drag-col">
|
||||
<?php
|
||||
@@ -550,15 +550,15 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
</div>
|
||||
<div class="um-admin-drag-fld-type um-field-type-<?php echo esc_attr( $field_type ); ?>"><?php echo esc_html( $field_name ); ?></div>
|
||||
<div class="um-admin-drag-fld-icons um-field-type-<?php echo esc_attr( $field_type ); ?>">
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n" title="<?php esc_attr_e( 'Edit', 'ultimate-member' ); ?>" data-modal="UM_edit_field" data-modal-size="normal" data-dynamic-content="um_admin_edit_field_popup" data-arg1="<?php echo esc_attr( $field_type ); ?>" data-arg2="<?php echo esc_attr( $this->form_id ); ?>" data-arg3="<?php echo esc_attr( $key ); ?>"><i class="um-faicon-pencil"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n um_admin_duplicate_field" title="<?php esc_attr_e( 'Duplicate', 'ultimate-member' ); ?>" data-silent_action="um_admin_duplicate_field" data-arg1="<?php echo esc_attr( $key ); ?>" data-arg2="<?php echo esc_attr( $this->form_id ); ?>"><i class="um-faicon-files-o"></i></a>
|
||||
<a href="javascript:void(0);" class="um-tip-n" title="<?php esc_attr_e( 'Edit', 'ultimate-member' ); ?>" data-modal="UM_edit_field" data-modal-size="normal" data-dynamic-content="um_admin_edit_field_popup" data-arg1="<?php echo esc_attr( $field_type ); ?>" data-arg2="<?php echo esc_attr( $this->form_id ); ?>" data-arg3="<?php echo esc_attr( $key ); ?>"><i class="um-faicon-pencil"></i></a>
|
||||
<a href="javascript:void(0);" class="um-tip-n um_admin_duplicate_field" title="<?php esc_attr_e( 'Duplicate', 'ultimate-member' ); ?>" data-silent_action="um_admin_duplicate_field" data-arg1="<?php echo esc_attr( $key ); ?>" data-arg2="<?php echo esc_attr( $this->form_id ); ?>"><i class="um-faicon-files-o"></i></a>
|
||||
<?php if ( 'group' === $field_type ) { ?>
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n" title="<?php esc_attr_e( 'Delete Group', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-fld.um-field-type-group" data-silent_action="um_admin_remove_field" data-arg1="<?php echo esc_attr( $key ); ?>" data-arg2="<?php echo esc_attr( $this->form_id ); ?>"><i class="um-faicon-trash-o"></i></a>
|
||||
<a href="javascript:void(0);" class="um-tip-n" title="<?php esc_attr_e( 'Delete Group', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-fld.um-field-type-group" data-silent_action="um_admin_remove_field" data-arg1="<?php echo esc_attr( $key ); ?>" data-arg2="<?php echo esc_attr( $this->form_id ); ?>"><i class="um-faicon-trash-o"></i></a>
|
||||
<?php } else { ?>
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n" title="<?php esc_attr_e( 'Delete', 'ultimate-member' ); ?>" data-silent_action="um_admin_remove_field" data-arg1="<?php echo esc_attr( $key ); ?>" data-arg2="<?php echo esc_attr( $this->form_id ); ?>"><i class="um-faicon-trash-o"></i></a>
|
||||
<a href="javascript:void(0);" class="um-tip-n" title="<?php esc_attr_e( 'Delete', 'ultimate-member' ); ?>" data-silent_action="um_admin_remove_field" data-arg1="<?php echo esc_attr( $key ); ?>" data-arg2="<?php echo esc_attr( $this->form_id ); ?>"><i class="um-faicon-trash-o"></i></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<?php if ( 'group' === $field_type ) { ?>
|
||||
<div class="um-admin-drag-group"></div>
|
||||
<?php } ?>
|
||||
@@ -569,7 +569,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
?>
|
||||
</div>
|
||||
<div class="um-admin-drag-col-dynamic"></div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@@ -821,10 +821,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
</div>
|
||||
<div class="um-admin-icons">
|
||||
<?php foreach ( UM()->fonticons()->all as $icon ) { ?>
|
||||
<span data-code="<?php echo esc_attr( $icon ); ?>" title="<?php echo esc_attr( $icon ); ?>" class="um-admin-tipsy-n"><i class="<?php echo esc_attr( $icon ); ?>"></i></span>
|
||||
<span data-code="<?php echo esc_attr( $icon ); ?>" title="<?php echo esc_attr( $icon ); ?>" class="um-tip-n"><i class="<?php echo esc_attr( $icon ); ?>"></i></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
$output = ob_get_clean();
|
||||
break;
|
||||
@@ -962,7 +962,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
if ( array_key_exists( 'col3', $field_type_data ) && is_array( $field_type_data['col3'] ) ) {
|
||||
foreach ( $field_type_data['col3'] as $opt ) {
|
||||
@@ -970,7 +970,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
if ( array_key_exists( 'col_full', $field_type_data ) && is_array( $field_type_data['col_full'] ) ) {
|
||||
foreach ( $field_type_data['col_full'] as $opt ) {
|
||||
@@ -1022,7 +1022,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
if ( array_key_exists( 'col3', $field_type_data ) && is_array( $field_type_data['col3'] ) ) {
|
||||
foreach ( $field_type_data['col3'] as $opt ) {
|
||||
@@ -1030,7 +1030,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
<?php
|
||||
if ( array_key_exists( 'col_full', $field_type_data ) && is_array( $field_type_data['col_full'] ) ) {
|
||||
foreach ( $field_type_data['col_full'] as $opt ) {
|
||||
|
||||
@@ -80,7 +80,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Columns' ) ) {
|
||||
* @return array;
|
||||
*/
|
||||
function remove_bulk_actions_um_form_inline( $actions ) {
|
||||
if ( UM()->admin()->is_plugin_post_type() ) {
|
||||
if ( UM()->admin()->screen()->is_own_post_type() ) {
|
||||
unset( $actions['inline hide-if-no-js'] );
|
||||
return $actions;
|
||||
}
|
||||
|
||||
@@ -178,12 +178,12 @@ if ( ! class_exists( 'um\admin\core\Admin_DragDrop' ) ) {
|
||||
<span class="um-admin-row-loading"><span></span></span>
|
||||
|
||||
<div class="um-admin-drag-row-icons">
|
||||
<a href="javascript:void(0);" class="um-admin-drag-rowsub-add um-admin-tipsy-n" title="<?php esc_attr_e( 'Add Row', 'ultimate-member' ); ?>" data-row_action="add_subrow"><i class="um-icon-plus"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-row-edit um-admin-tipsy-n" title="<?php esc_attr_e( 'Edit Row', 'ultimate-member' ); ?>" data-modal="UM_edit_row" data-modal-size="normal" data-dynamic-content="um_admin_edit_field_popup" data-arg1="row" data-arg2="<?php echo esc_attr( get_the_ID() ); ?>"><i class="um-faicon-pencil"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-rowsub-add um-tip-n" title="<?php esc_attr_e( 'Add Row', 'ultimate-member' ); ?>" data-row_action="add_subrow"><i class="um-icon-plus"></i></a>
|
||||
<a href="javascript:void(0);" class="um-admin-drag-row-edit um-tip-n" title="<?php esc_attr_e( 'Edit Row', 'ultimate-member' ); ?>" data-modal="UM_edit_row" data-modal-size="normal" data-dynamic-content="um_admin_edit_field_popup" data-arg1="row" data-arg2="<?php echo esc_attr( get_the_ID() ); ?>"><i class="um-faicon-pencil"></i></a>
|
||||
<span class="um-admin-drag-row-start"><i class="um-icon-arrow-move"></i></span>
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-row"><i class="um-faicon-trash-o"></i></a>
|
||||
<a href="javascript:void(0);" class="um-tip-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-row"><i class="um-faicon-trash-o"></i></a>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="um-admin-drag-rowsubs">
|
||||
<div class="um-admin-drag-rowsub">
|
||||
@@ -197,15 +197,15 @@ if ( ! class_exists( 'um\admin\core\Admin_DragDrop' ) ) {
|
||||
|
||||
<div class="um-admin-drag-rowsub-icons">
|
||||
<span class="um-admin-drag-rowsub-start"><i class="um-icon-arrow-move"></i></span>
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-rowsub"><i class="um-faicon-trash-o"></i></a>
|
||||
</div><div class="um-admin-clear"></div>
|
||||
<a href="javascript:void(0);" class="um-tip-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-rowsub"><i class="um-faicon-trash-o"></i></a>
|
||||
</div><div class="clear"></div>
|
||||
|
||||
<div class="um-admin-drag-col">
|
||||
</div>
|
||||
|
||||
<div class="um-admin-drag-col-dynamic"></div>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -222,15 +222,15 @@ if ( ! class_exists( 'um\admin\core\Admin_DragDrop' ) ) {
|
||||
|
||||
<div class="um-admin-drag-rowsub-icons">
|
||||
<span class="um-admin-drag-rowsub-start"><i class="um-icon-arrow-move"></i></span>
|
||||
<a href="javascript:void(0);" class="um-admin-tipsy-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-rowsub"><i class="um-faicon-trash-o"></i></a>
|
||||
</div><div class="um-admin-clear"></div>
|
||||
<a href="javascript:void(0);" class="um-tip-n" title="<?php esc_attr_e( 'Delete Row', 'ultimate-member' ); ?>" data-remove_element="um-admin-drag-rowsub"><i class="um-faicon-trash-o"></i></a>
|
||||
</div><div class="clear"></div>
|
||||
|
||||
<div class="um-admin-drag-col">
|
||||
</div>
|
||||
|
||||
<div class="um-admin-drag-col-dynamic"></div>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) )
|
||||
$html .= '<div class="um-admin-clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
$html .= '<div class="clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
|
||||
$html .= '</td></tr>';
|
||||
|
||||
@@ -256,7 +256,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) )
|
||||
$html .= '<div class="um-admin-clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
$html .= '<div class="clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
|
||||
$html .= '</td></tr>';
|
||||
|
||||
@@ -277,7 +277,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) )
|
||||
$html .= '<div class="um-admin-clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
$html .= '<div class="clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
|
||||
$html .= '</td></tr>';
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
namespace um\admin\core;
|
||||
|
||||
|
||||
use \RecursiveDirectoryIterator;
|
||||
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
|
||||
@@ -74,7 +73,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery( 'a.um-admin-rating-link' ).click(function() {
|
||||
jQuery( document.body ).on('click', 'a.um-admin-rating-link', function() {
|
||||
jQuery.ajax({
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'post',
|
||||
@@ -82,8 +81,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
action: 'um_rated',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function(){
|
||||
|
||||
success: function() {
|
||||
}
|
||||
});
|
||||
jQuery(this).parent().text( jQuery( this ).data( 'rated' ) );
|
||||
@@ -322,7 +320,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
@@ -144,18 +144,16 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs on admin head
|
||||
*/
|
||||
function admin_head(){
|
||||
public function admin_head() {
|
||||
global $post;
|
||||
if ( UM()->admin()->is_plugin_post_type() && isset($post->ID) ){
|
||||
$this->postmeta = $this->get_custom_post_meta($post->ID);
|
||||
if ( isset( $post->ID ) && UM()->admin()->screen()->is_own_post_type() ) {
|
||||
$this->postmeta = $this->get_custom_post_meta( $post->ID );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Init the metaboxes
|
||||
*/
|
||||
@@ -1267,8 +1265,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
*/
|
||||
public function field_input( $attribute, $form_id = null, $field_args = array() ) {
|
||||
|
||||
if ( $this->in_edit == true ) { // we're editing a field
|
||||
$real_attr = substr( $attribute, 1 );
|
||||
if ( $this->in_edit ) {
|
||||
// We're editing a field.
|
||||
$real_attr = substr( $attribute, 1 );
|
||||
$this->edit_mode_value = isset( $this->edit_array[ $real_attr ] ) ? $this->edit_array[ $real_attr ] : null;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Navmenu' ) ) {
|
||||
);
|
||||
|
||||
add_action( 'customize_controls_print_footer_scripts', array( &$this, '_wp_template' ) );
|
||||
add_action( 'load-customize.php', array( &$this, 'enqueue_nav_menus_scripts' ) );
|
||||
|
||||
add_action( 'wp_update_nav_menu_item', array( &$this, '_save' ), 10, 3 );
|
||||
|
||||
add_action( 'wp_nav_menu_item_custom_fields', array( $this, 'wp_nav_menu_item_custom_fields' ), 20, 5 );
|
||||
@@ -149,46 +147,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Navmenu' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function enqueue_nav_menus_scripts() {
|
||||
add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function admin_enqueue_scripts() {
|
||||
UM()->admin()->enqueue()->load_nav_manus_scripts();
|
||||
|
||||
$menu_restriction_data = array();
|
||||
|
||||
$menus = get_posts( 'post_type=nav_menu_item&numberposts=-1' );
|
||||
foreach ( $menus as $data ) {
|
||||
$_nav_roles_meta = get_post_meta( $data->ID, 'menu-item-um_nav_roles', true );
|
||||
|
||||
$um_nav_roles = array();
|
||||
if ( $_nav_roles_meta ) {
|
||||
foreach ( $_nav_roles_meta as $key => $value ) {
|
||||
if ( is_int( $key ) ) {
|
||||
$um_nav_roles[] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$menu_restriction_data[ $data->ID ] = array(
|
||||
'um_nav_public' => get_post_meta( $data->ID, 'menu-item-um_nav_public', true ),
|
||||
'um_nav_roles' => $um_nav_roles,
|
||||
);
|
||||
}
|
||||
|
||||
wp_localize_script( 'um_admin_nav_manus', 'um_menu_restriction_data', $menu_restriction_data );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -55,7 +55,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
|
||||
$this->child_theme_required();
|
||||
|
||||
// removed for now to avoid the bad reviews
|
||||
// Removed for now to avoid the bad reviews.
|
||||
//$this->reviews_notice();
|
||||
|
||||
//$this->future_changed();
|
||||
@@ -83,7 +83,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
}
|
||||
|
||||
public function create_list_for_screen() {
|
||||
if ( UM()->admin()->is_um_screen() ) {
|
||||
if ( UM()->admin()->screen()->is_own_screen() ) {
|
||||
$this->secure_settings();
|
||||
}
|
||||
}
|
||||
@@ -403,7 +403,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
<p>
|
||||
<a href="<?php echo esc_url( $url ); ?>" class="button button-primary"><?php esc_html_e( 'Create Pages', 'ultimate-member' ); ?></a>
|
||||
|
||||
<a href="javascript:void(0);" class="button-secondary um_secondary_dimiss"><?php esc_html_e( 'No thanks', 'ultimate-member' ); ?></a>
|
||||
<a href="javascript:void(0);" class="button-secondary um_secondary_dismiss"><?php esc_html_e( 'No thanks', 'ultimate-member' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
@@ -682,23 +682,23 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @note Removed for now to avoid the bad reviews.
|
||||
* @deprecated 2.7.1
|
||||
*/
|
||||
function reviews_notice() {
|
||||
|
||||
private function reviews_notice() {
|
||||
$first_activation_date = get_option( 'um_first_activation_date', false );
|
||||
|
||||
if ( empty( $first_activation_date ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $first_activation_date + 2*WEEK_IN_SECONDS > time() ) {
|
||||
if ( $first_activation_date + 2 * WEEK_IN_SECONDS > time() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
ob_start(); ?>
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<div id="um_start_review_notice">
|
||||
<p>
|
||||
@@ -713,7 +713,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
<a href="javascript:void(0);" id="um_add_review_bad"><?php _e('I don\'t like the plugin', 'ultimate-member' ) ?></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="um_hidden_notice" data-key="love">
|
||||
<div class="um-hidden-notice" data-key="love">
|
||||
<p>
|
||||
<?php printf( __( 'Great! We\'re happy to hear that you love the plugin. It would be amazing if you could let others know why you like %s by leaving a review of the plugin. This will help %s to grow and become more popular and would be massively appreciated by us!' ), UM_PLUGIN_NAME, UM_PLUGIN_NAME ); ?>
|
||||
</p>
|
||||
@@ -722,7 +722,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
<a href="https://wordpress.org/support/plugin/ultimate-member/reviews/?rate=5#new-post" target="_blank" class="button button-primary um_review_link"><?php _e( 'Leave Review', 'ultimate-member' ) ?></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="um_hidden_notice" data-key="good">
|
||||
<div class="um-hidden-notice" data-key="good">
|
||||
<p>
|
||||
<?php _e( 'We\'re glad to hear that you like the plugin but we would love to get your feedback so we can make the plugin better.' ); ?>
|
||||
</p>
|
||||
@@ -731,7 +731,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
<a href="https://ultimatemember.com/feedback/" target="_blank" class="button button-primary um_review_link"><?php _e( 'Provide Feedback', 'ultimate-member' ) ?></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="um_hidden_notice" data-key="bad">
|
||||
<div class="um-hidden-notice" data-key="bad">
|
||||
<p>
|
||||
<?php printf( __( 'We\'re sorry to hear that. If you\'re having the issue with the plugin you can create a topic on our <a href="%s" target="_blank">support forum</a> and we will try and help you out with the issue. Alternatively if you have an idea on how we can make the plugin better or want to tell us what you don\'t like about the plugin you can tell us know by giving us feedback.' ), 'https://wordpress.org/support/plugin/ultimate-member' ); ?>
|
||||
</p>
|
||||
|
||||
@@ -90,4 +90,4 @@
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -129,5 +129,5 @@ $fields = apply_filters( 'um_admin_extend_directory_options_general', $fields );
|
||||
)->render_form();
|
||||
?>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -70,5 +70,5 @@ global $post_id; ?>
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -116,5 +116,5 @@ $fields = apply_filters( 'um_admin_extend_directory_options_profile', $fields );
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -96,5 +96,5 @@ $_um_search_filters = get_post_meta( $post_id, '_um_search_filters', true ); ?>
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
)
|
||||
) )->render_form();*/ ?>
|
||||
|
||||
<!-- <div class="um-admin-clear"></div>-->
|
||||
<!-- <div class="clear"></div>-->
|
||||
|
||||
<p><?php echo UM()->shortcodes()->get_shortcode( get_the_ID() ); ?></p>
|
||||
<!-- <p>--><?php //echo UM()->shortcodes()->get_default_shortcode( get_the_ID() ); ?><!--</p>-->
|
||||
|
||||
@@ -82,5 +82,5 @@ $fields = array(
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -278,4 +278,4 @@ if ( ! isset( $_REQUEST['filter'] ) || 'premium' === sanitize_key( $_REQUEST['fi
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -17,7 +17,7 @@ if ( empty( UM()->builder()->form_id ) ) {
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="um-admin-drag">
|
||||
|
||||
@@ -25,7 +25,7 @@ if ( empty( UM()->builder()->form_id ) ) {
|
||||
<?php UM()->builder()->show_builder(); ?>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-drag-addrow um-admin-tipsy-n" title="<?php esc_attr_e( 'Add Master Row', 'ultimate-member' ); ?>"
|
||||
<div class="um-admin-drag-addrow um-tip-n" title="<?php esc_attr_e( 'Add Master Row', 'ultimate-member' ); ?>"
|
||||
data-row_action="add_row">
|
||||
<i class="um-icon-plus"></i>
|
||||
</div>
|
||||
|
||||
@@ -110,5 +110,5 @@ $login_show_rememberme = ! isset( $post_id ) ? UM()->options()->get( 'login_sho
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -34,5 +34,5 @@
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -26,4 +26,4 @@ $is_core = get_post_meta( get_the_ID(), '_um_core', true ); ?>
|
||||
|
||||
<input type="hidden" name="form[_um_mode]" id="form__um_mode" value="<?php echo esc_attr( UM()->query()->get_meta_value( '_um_mode', null, 'register' ) ); ?>" />
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -221,5 +221,5 @@ $profile_show_bio = ! isset( $post_id ) ? true : get_post_meta( $pos
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -33,5 +33,5 @@ $_um_search_fields = empty( $_um_search_fields ) ? array() : $_um_search_fields;
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -102,5 +102,5 @@ $register_secondary_btn = ! isset( $post_id ) ? UM()->options()->get( 'register_
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -76,5 +76,5 @@ $register_use_gdpr = ! isset( $post_id ) ? false : get_post_meta( $post_id, '_um
|
||||
)
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
)
|
||||
) )->render_form();*/ ?>
|
||||
|
||||
<!-- <div class="um-admin-clear"></div>-->
|
||||
<!-- <div class="clear"></div>-->
|
||||
|
||||
<p><?php echo UM()->shortcodes()->get_shortcode( get_the_ID() ); ?></p>
|
||||
<!-- <p>--><?php //echo UM()->shortcodes()->get_default_shortcode( get_the_ID() ); ?><!--</p>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user