Version Description
Download this release
Release Info
Developer | nsinelnikov |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.17 to 2.0.5
- assets/css/um-profile.css +13 -25
- assets/css/um-responsive.css +0 -8
- assets/js/um-functions.js +1 -1
- assets/js/um-functions.min.js +1 -1
- assets/js/um-gdpr.js +0 -22
- assets/js/um-gdpr.min.js +0 -1
- assets/js/um-members.js +1 -1
- assets/js/um-members.min.js +1 -1
- assets/js/um-scripts.js +0 -4
- includes/admin/class-admin.php +0 -24
- includes/admin/core/class-admin-gdpr.php +0 -316
- includes/admin/core/class-admin-menu.php +0 -15
- includes/admin/core/class-admin-notices.php +3 -34
- includes/admin/core/class-admin-settings.php +3 -21
- includes/admin/core/class-admin-upgrade.php +6 -72
- includes/admin/core/class-admin-users.php +55 -48
- includes/admin/core/packages/2.0-beta1/email_templates.php +2 -2
- includes/admin/core/packages/2.0-beta1/menus.php +1 -7
- includes/admin/core/packages/2.0.10/functions.php +0 -18
- includes/admin/core/packages/2.0.10/hooks.php +0 -6
- includes/admin/core/packages/2.0.10/init.php +0 -54
- includes/admin/core/packages/2.0.10/styles.php +0 -89
- includes/admin/templates/dashboard/cache.php +7 -6
- includes/admin/templates/dashboard/upgrade-request.php +0 -6
- includes/admin/templates/form/login_customize.php +1 -1
- includes/admin/templates/form/profile_customize.php +1 -1
- includes/admin/templates/form/register_customize.php +1 -1
- includes/admin/templates/form/register_gdpr.php +0 -71
- includes/admin/templates/gdpr.php +0 -40
- includes/class-dependencies.php +0 -1
- includes/class-init.php +44 -50
- includes/core/class-access.php +8 -78
- includes/core/class-account.php +3 -2
- includes/core/class-builtin.php +1 -1
- includes/core/class-enqueue.php +1 -3
- includes/core/class-fields.php +36 -91
- includes/core/class-form.php +14 -2
- includes/core/class-gdpr.php +0 -86
- includes/core/class-mail.php +18 -6
- includes/core/class-permalinks.php +18 -4
- includes/core/class-profile.php +0 -7
- includes/core/class-rest-api.php +9 -9
- includes/core/class-rewrite.php +54 -76
- includes/core/class-roles-capabilities.php +4 -11
- includes/core/class-shortcodes.php +5 -11
- includes/core/class-user.php +63 -104
- includes/core/um-actions-account.php +1 -1
- includes/core/um-actions-core.php +1 -3
- includes/core/um-actions-form.php +5 -6
- includes/core/um-actions-password.php +19 -0
- includes/core/um-actions-profile.php +24 -35
- includes/core/um-actions-register.php +8 -47
- includes/core/um-filters-avatars.php +59 -0
- includes/core/um-filters-fields.php +11 -63
- includes/core/um-filters-navmenu.php +10 -25
- includes/core/um-navmenu.php +2 -3
- includes/um-short-functions.php +146 -175
- readme.txt +2 -96
- templates/gdpr-register.php +0 -44
- templates/members-grid.php +2 -2
- ultimate-member.php +1 -1
assets/css/um-profile.css
CHANGED
@@ -53,6 +53,7 @@
|
|
53 |
background-color: #eee;
|
54 |
box-sizing: border-box;
|
55 |
position: relative;
|
|
|
56 |
}
|
57 |
|
58 |
.um-cover-add {
|
@@ -74,7 +75,6 @@
|
|
74 |
.um-cover-e {
|
75 |
text-align: center;
|
76 |
box-sizing: border-box;
|
77 |
-
overflow: hidden;
|
78 |
}
|
79 |
|
80 |
.um-cover-e img {width: 100% !important}
|
@@ -393,31 +393,13 @@ font-weight: normal;
|
|
393 |
border-bottom: 0 !important;
|
394 |
}
|
395 |
|
396 |
-
.um-profile-nav-item.without-icon a {
|
397 |
-
|
398 |
-
}
|
399 |
-
.um-profile-nav-item.without-icon span.title {
|
400 |
-
padding-left: 0;
|
401 |
-
}
|
402 |
-
.um-profile-nav-item.without-icon i {
|
403 |
-
display: none;
|
404 |
-
}
|
405 |
|
406 |
-
.um-profile-nav-item a:hover {
|
407 |
-
|
408 |
-
}
|
409 |
-
.um-profile-nav-item i {
|
410 |
-
font-size: 18px;
|
411 |
-
height: 18px;
|
412 |
-
line-height: 18px;
|
413 |
-
position: absolute;
|
414 |
-
display: block;
|
415 |
-
top: 8px;
|
416 |
-
left: 10px;
|
417 |
-
}
|
418 |
-
.um-profile-nav-item span.title {
|
419 |
-
padding-left: 5px;
|
420 |
-
}
|
421 |
.um-profile-nav-item span.count {
|
422 |
font-size: 12px;
|
423 |
font-weight: 300;
|
@@ -563,4 +545,10 @@ font-weight: normal;
|
|
563 |
|
564 |
.um-profile.um-viewing .um-field-checkbox, .um-profile.um-viewing .um-field-radio{
|
565 |
cursor: default !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
566 |
}
|
53 |
background-color: #eee;
|
54 |
box-sizing: border-box;
|
55 |
position: relative;
|
56 |
+
overflow: hidden;
|
57 |
}
|
58 |
|
59 |
.um-cover-add {
|
75 |
.um-cover-e {
|
76 |
text-align: center;
|
77 |
box-sizing: border-box;
|
|
|
78 |
}
|
79 |
|
80 |
.um-cover-e img {width: 100% !important}
|
393 |
border-bottom: 0 !important;
|
394 |
}
|
395 |
|
396 |
+
.um-profile-nav-item.without-icon a {padding-left: 10px}
|
397 |
+
.um-profile-nav-item.without-icon span.title {padding-left: 0}
|
398 |
+
.um-profile-nav-item.without-icon i {display: none}
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
|
400 |
+
.um-profile-nav-item a:hover {background: #555}
|
401 |
+
.um-profile-nav-item i {font-size: 18px;height: 18px;line-height: 18px;position: absolute;display: block;top: 8px;left: 10px}
|
402 |
+
.um-profile-nav-item span.title {padding-left: 5px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
.um-profile-nav-item span.count {
|
404 |
font-size: 12px;
|
405 |
font-weight: 300;
|
545 |
|
546 |
.um-profile.um-viewing .um-field-checkbox, .um-profile.um-viewing .um-field-radio{
|
547 |
cursor: default !important;
|
548 |
+
}
|
549 |
+
|
550 |
+
@media (min-width: 880px) {
|
551 |
+
.um-profile-nav-item .um-tip-n {
|
552 |
+
display: none;
|
553 |
+
}
|
554 |
}
|
assets/css/um-responsive.css
CHANGED
@@ -6,14 +6,6 @@
|
|
6 |
display: none;
|
7 |
}
|
8 |
|
9 |
-
.um-profile-nav-item a.uimob340-show,
|
10 |
-
.um-profile-nav-item a.uimob500-show,
|
11 |
-
.um-profile-nav-item a.uimob800-show,
|
12 |
-
.um-profile-nav-item a.uimob960-show
|
13 |
-
{
|
14 |
-
display: none;
|
15 |
-
}
|
16 |
-
|
17 |
div.uimob340 .uimob340-show,
|
18 |
div.uimob500 .uimob500-show,
|
19 |
div.uimob800 .uimob800-show,
|
6 |
display: none;
|
7 |
}
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
div.uimob340 .uimob340-show,
|
10 |
div.uimob500 .uimob500-show,
|
11 |
div.uimob800 .uimob800-show,
|
assets/js/um-functions.js
CHANGED
@@ -184,7 +184,7 @@ function um_responsive(){
|
|
184 |
|
185 |
});
|
186 |
|
187 |
-
jQuery('.um-cover, .um-member-cover
|
188 |
|
189 |
var elem = jQuery(this);
|
190 |
var ratio = elem.data('ratio');
|
184 |
|
185 |
});
|
186 |
|
187 |
+
jQuery('.um-cover, .um-member-cover').each(function(){
|
188 |
|
189 |
var elem = jQuery(this);
|
190 |
var ratio = elem.data('ratio');
|
assets/js/um-functions.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function UM_check_password_matched(){jQuery(document).on("keyup","input[data-key=user_password],input[data-key=confirm_user_password]",function(e){var t=jQuery("input[data-key=user_password]").val(),a=jQuery("input[data-key=confirm_user_password]").val(),o=jQuery("input[data-key=user_password],input[data-key=confirm_user_password]");t||a?t!==a?o.removeClass("um-validate-matched").addClass("um-validate-not-matched"):o.removeClass("um-validate-not-matched").addClass("um-validate-matched"):o.removeClass("um-validate-matched").removeClass("um-validate-not-matched")})}function UM_hide_menus(){menu=jQuery(".um-dropdown"),menu.parents("div").find("a").removeClass("active"),menu.hide()}function UM_domenus(){jQuery(".um-dropdown").each(function(){var e=jQuery(this),t=jQuery(this).attr("data-element"),a=jQuery(this).attr("data-position");jQuery(t).addClass("um-trigger-menu-on-"+e.attr("data-trigger")),jQuery(window).width()<=1200&&"div.um-profile-edit"==t&&(a="lc"),"lc"==a&&(200>jQuery(t).find("img").width()?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),gap_right=jQuery(t).width()+17,e.css({top:0,width:200,left:"auto",right:gap_right+"px","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-right-b"),e.find(".um-dropdown-arr").css({top:"4px",left:"auto",right:"-17px"})),"bc"==a&&(200>jQuery(t).find("img").width()?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),e.css({top:top_p,width:200,left:left_p+left_gap,right:"auto","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-up-b"),e.find(".um-dropdown-arr").css({top:"-17px",left:e.width()/2-12,right:"auto"}))})}function um_responsive(){jQuery(".um").each(function(){element_width=jQuery(this).width(),element_width<=340?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob340")):element_width<=500?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob500")):element_width<=800?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob800")):element_width<=960?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob960")):element_width>960&&(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960")),jQuery(".um-account-nav").length>0&&jQuery(".um-account-side").is(":visible")&&0==jQuery(".um-account-tab:visible").length&&jQuery(".um-account-side li a.current").trigger("click"),jQuery(this).css("opacity",1)}),jQuery(".um-cover, .um-member-cover, .um-cover-e").each(function(){var e=jQuery(this),t=e.data("ratio"),a=e.width(),o=t.split(":");calcHeight=Math.round(a/o[0])+"px",e.height(calcHeight),e.find(".um-cover-add").height(calcHeight)}),jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),UM_domenus()}function UM_Member_Grid(e){e.masonry({itemSelector:".um-member",columnWidth:".um-member",gutter:".um-gutter-sizer"})}function initImageUpload_UM(e){e.data("upload_help_text")?upload_help_text='<span class="help">'+e.data("upload_help_text")+"</span>":upload_help_text="",e.data("icon")?icon='<span class="icon"><i class="'+e.data("icon")+'"></i></span>':icon="",e.data("upload_text")?upload_text='<span class="str">'+e.data("upload_text")+"</span>":upload_text="",e.uploadFile({url:um_scripts.imageupload,method:"POST",multiple:!1,formData:{key:e.data("key"),set_id:e.data("set_id"),set_mode:e.data("set_mode"),_wpnonce:e.data("nonce"),timestamp:e.data("timestamp")},fileName:e.data("key"),allowedTypes:e.data("allowed_types"),maxFileSize:e.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:e.data("max_size_error"),extErrorStr:e.data("extension_error"),maxFileCountErrorStr:e.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(t){e.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(t,a,o){e.selectedFiles=0;try{a=jQuery.parseJSON(a)}catch(e){return void console.log(e,a)}a.error&&""!=a.error?(e.parents(".um-modal-body").append('<div class="um-error-block">'+a.error+"</div>"),e.parents(".um-modal-body").find(".upload-statusbar").hide(0),um_modal_responsive()):jQuery.each(a,function(t,a){var o=e.parents(".um-modal-body").find(".um-single-image-preview img"),i=e.parents(".um-modal-body").find(".um-single-image-preview");o.attr("src",a),o.load(function(){e.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),e.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),i.show(0),um_modal_responsive()})})}})}function initFileUpload_UM(e){e.data("upload_help_text")?upload_help_text='<span class="help">'+e.data("upload_help_text")+"</span>":upload_help_text="",e.data("icon")?icon='<span class="icon"><i class="'+e.data("icon")+'"></i></span>':icon="",e.data("upload_text")?upload_text='<span class="str">'+e.data("upload_text")+"</span>":upload_text="",e.uploadFile({url:um_scripts.fileupload,method:"POST",multiple:!1,formData:{key:e.data("key"),set_id:e.data("set_id"),set_mode:e.data("set_mode"),_wpnonce:e.data("nonce"),timestamp:e.data("timestamp")},fileName:e.data("key"),allowedTypes:e.data("allowed_types"),maxFileSize:e.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:e.data("max_size_error"),extErrorStr:e.data("extension_error"),maxFileCountErrorStr:e.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(t){e.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(t,a,o){e.selectedFiles=0,a=jQuery.parseJSON(a),a.error&&""!=a.error?(e.parents(".um-modal-body").append('<div class="um-error-block">'+a.error+"</div>"),e.parents(".um-modal-body").find(".upload-statusbar").hide(0),setTimeout(function(){um_modal_responsive()},1e3)):(jQuery.each(a,function(t,a){e.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),e.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),e.parents(".um-modal-body").find(".um-single-file-preview").show(0),"icon"==t?e.parents(".um-modal-body").find(".um-single-fileinfo i").removeClass().addClass(a):"icon_bg"==t?e.parents(".um-modal-body").find(".um-single-fileinfo span.icon").css({"background-color":a}):"filename"==t?e.parents(".um-modal-body").find(".um-single-fileinfo span.filename").html(a):e.parents(".um-modal-body").find(".um-single-fileinfo a").attr("href",a)}),setTimeout(function(){um_modal_responsive()},1e3))}})}function initCrop_UM(){var e=jQuery(".um-modal .um-single-image-preview img").first(),t=jQuery(".um-modal .um-single-image-preview"),a=e.parent().attr("data-crop"),o=e.parent().attr("data-min_width"),i=e.parent().attr("data-min_height"),r=e.parent().attr("data-ratio");if(jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"))var r=jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"),u=r.split(":"),r=u[0];if(e.length&&""!=e.attr("src")){var d=jQuery(window).height()-(jQuery(".um-modal-footer a").height()+20)-50-jQuery(".um-modal-header:visible").height();if(e.css({height:"auto"}),t.css({height:"auto"}),jQuery(window).height()<=400?(t.css({height:d+"px","max-height":d+"px"}),e.css({height:"auto"})):(e.css({height:"auto","max-height":d+"px"}),t.css({height:e.height(),"max-height":d+"px"})),"square"==a)var s={minWidth:o,minHeight:i,dragCrop:!1,aspectRatio:1,zoomable:!1,rotatable:!1,dashed:!1,done:function(t){e.parent().attr("data-coord",Math.round(t.x)+","+Math.round(t.y)+","+Math.round(t.width)+","+Math.round(t.height))}};else if("cover"==a){Math.round(o/r)>0&&(i=Math.round(o/r));var s={minWidth:o,minHeight:i,dragCrop:!1,aspectRatio:r,zoomable:!1,rotatable:!1,dashed:!1,done:function(t){e.parent().attr("data-coord",Math.round(t.x)+","+Math.round(t.y)+","+Math.round(t.width)+","+Math.round(t.height))}}}else if("user"==a)var s={minWidth:o,minHeight:i,dragCrop:!0,aspectRatio:"auto",zoomable:!1,rotatable:!1,dashed:!1,done:function(t){e.parent().attr("data-coord",Math.round(t.x)+","+Math.round(t.y)+","+Math.round(t.width)+","+Math.round(t.height))}};0!=a&&(e.cropper(s),jQuery(".um-single-image-preview img.cropper-hidden").cropper("destroy"),jQuery(".um-single-image-preview img.lazyloaded").addClass("cropper-hidden"),jQuery(".um-single-image-preview img.lazyloaded").removeClass("lazyloaded"),jQuery(".um-single-image-preview .cropper-container").append('<div class="um-clear"></div>'))}}function um_new_modal(e,t,a,o){var i=jQuery("body").find(".um-modal-overlay");if(0==i.length)if(jQuery(".tipsy").hide(),UM_hide_menus(),jQuery("body,html,textarea").css("overflow","hidden"),jQuery(document).bind("touchmove",function(e){e.preventDefault()}),jQuery(".um-modal").on("touchmove",function(e){e.stopPropagation()}),a?jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal is-photo"></div>'):jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal no-photo"></div>'),jQuery("#"+e).prependTo(".um-modal"),a){jQuery(".um-modal").find(".um-modal-photo").html("<img />");var r=jQuery(".um-modal-photo img"),u=jQuery(window).width()-60,d=jQuery(window).height()-.25*jQuery(window).height();r.attr("src",o),r.load(function(){jQuery("#"+e).show(),jQuery(".um-modal").show(),r.css({opacity:0}),r.css({"max-width":u}),r.css({"max-height":d}),jQuery(".um-modal").css({width:r.width(),"margin-left":"-"+r.width()/2+"px"}),r.animate({opacity:1},1e3),um_modal_responsive()})}else jQuery("#"+e).show(),jQuery(".um-modal").show(),um_modal_size(t),initImageUpload_UM(jQuery(".um-modal:visible").find(".um-single-image-upload")),initFileUpload_UM(jQuery(".um-modal:visible").find(".um-single-file-upload")),um_modal_responsive()}function um_modal_responsive(){var e=jQuery(".um-modal:visible"),t=jQuery(".um-modal-body.photo:visible");if(t.length){e.removeClass("uimob340"),e.removeClass("uimob500");var a=jQuery(".um-modal-photo img"),o=jQuery(window).width()-60,i=jQuery(window).height()-.25*jQuery(window).height();a.css({opacity:0}),a.css({"max-width":o}),a.css({"max-height":i}),jQuery(".um-modal").css({width:a.width(),"margin-left":"-"+a.width()/2+"px"}),a.animate({opacity:1},1e3);var r=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:r},300)}else if(e.length){var u=jQuery(window).width();if(e.removeClass("uimob340"),e.removeClass("uimob500"),u<=340)e.addClass("uimob340"),initCrop_UM(),e.animate({bottom:0},300);else if(u<=500)e.addClass("uimob500"),initCrop_UM(),e.animate({bottom:0},300);else if(u<=800){initCrop_UM();var r=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:r},300)}else if(u<=960){initCrop_UM();var r=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:r},300)}else if(u>960){initCrop_UM();var r=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:r},300)}}}function um_remove_modal(){jQuery("img.cropper-hidden").cropper("destroy"),jQuery("body,html,textarea").css("overflow","auto"),jQuery(document).unbind("touchmove"),jQuery('.um-modal div[id^="um_"]').hide().appendTo("body"),jQuery(".um-modal,.um-modal-overlay").remove()}function um_modal_size(e){jQuery(".um-modal:visible").addClass(e)}function um_modal_add_attr(e,t){jQuery(".um-modal:visible").data(e,t)}function prepare_Modal(){0==jQuery(".um-popup-overlay").length&&(jQuery("body").append('<div class="um-popup-overlay"></div>'),jQuery("body").append('<div class="um-popup"></div>'),jQuery(".um-popup").addClass("loading"),jQuery("body,html").css({overflow:"hidden"}))}function remove_Modal(){jQuery(".um-popup-overlay").length&&(jQuery(".tipsy").remove(),jQuery(".um-popup").empty().remove(),jQuery(".um-popup-overlay").empty().remove(),jQuery("body,html").css({overflow:"auto"}))}function show_Modal(e){jQuery(".um-popup-overlay").length&&(jQuery(".um-popup").removeClass("loading").html(e),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,offset:3}))}function responsive_Modal(){jQuery(".um-popup-overlay").length&&(ag_height=jQuery(window).height()-jQuery(".um-popup um-popup-header").outerHeight()-jQuery(".um-popup .um-popup-footer").outerHeight()-80,ag_height>350&&(ag_height=350),jQuery(".um-popup-autogrow:visible").length?(jQuery(".um-popup-autogrow:visible").css({height:ag_height+"px"}),jQuery(".um-popup-autogrow:visible").mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500}).mCustomScrollbar("scrollTo","bottom",{scrollInertia:0})):jQuery(".um-popup-autogrow2:visible").length&&(jQuery(".um-popup-autogrow2:visible").css({"max-height":ag_height+"px"}),jQuery(".um-popup-autogrow2:visible").mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500})))}function um_reset_field(e){jQuery(e).find("div.um-field-area").find("input,textarea,select").not(":button, :submit, :reset, :hidden").val("").removeAttr("checked").removeAttr("selected")}function um_selected(e,t){if(e==t)return"selected='selected'"}jQuery(function(){jQuery(".um-search form *").keypress(function(e){if(13==e.which)return jQuery(".um-search form").submit(),!1}),2==jQuery("input[data-key=user_password],input[data-key=confirm_user_password]").length&&UM_check_password_matched()});
|
1 |
+
function UM_check_password_matched(){jQuery(document).on("keyup","input[data-key=user_password],input[data-key=confirm_user_password]",function(e){var t=jQuery("input[data-key=user_password]").val(),a=jQuery("input[data-key=confirm_user_password]").val(),o=jQuery("input[data-key=user_password],input[data-key=confirm_user_password]");t||a?t!==a?o.removeClass("um-validate-matched").addClass("um-validate-not-matched"):o.removeClass("um-validate-not-matched").addClass("um-validate-matched"):o.removeClass("um-validate-matched").removeClass("um-validate-not-matched")})}function UM_hide_menus(){menu=jQuery(".um-dropdown"),menu.parents("div").find("a").removeClass("active"),menu.hide()}function UM_domenus(){jQuery(".um-dropdown").each(function(){var e=jQuery(this),t=jQuery(this).attr("data-element"),a=jQuery(this).attr("data-position");jQuery(t).addClass("um-trigger-menu-on-"+e.attr("data-trigger")),jQuery(window).width()<=1200&&"div.um-profile-edit"==t&&(a="lc"),"lc"==a&&(200>jQuery(t).find("img").width()?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),gap_right=jQuery(t).width()+17,e.css({top:0,width:200,left:"auto",right:gap_right+"px","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-right-b"),e.find(".um-dropdown-arr").css({top:"4px",left:"auto",right:"-17px"})),"bc"==a&&(200>jQuery(t).find("img").width()?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),e.css({top:top_p,width:200,left:left_p+left_gap,right:"auto","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-up-b"),e.find(".um-dropdown-arr").css({top:"-17px",left:e.width()/2-12,right:"auto"}))})}function um_responsive(){jQuery(".um").each(function(){element_width=jQuery(this).width(),element_width<=340?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob340")):element_width<=500?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob500")):element_width<=800?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob800")):element_width<=960?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob960")):element_width>960&&(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960")),jQuery(".um-account-nav").length>0&&jQuery(".um-account-side").is(":visible")&&0==jQuery(".um-account-tab:visible").length&&jQuery(".um-account-side li a.current").trigger("click"),jQuery(this).css("opacity",1)}),jQuery(".um-cover, .um-member-cover").each(function(){var e=jQuery(this),t=e.data("ratio"),a=e.width(),o=t.split(":");calcHeight=Math.round(a/o[0])+"px",e.height(calcHeight),e.find(".um-cover-add").height(calcHeight)}),jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),UM_domenus()}function UM_Member_Grid(e){e.masonry({itemSelector:".um-member",columnWidth:".um-member",gutter:".um-gutter-sizer"})}function initImageUpload_UM(e){e.data("upload_help_text")?upload_help_text='<span class="help">'+e.data("upload_help_text")+"</span>":upload_help_text="",e.data("icon")?icon='<span class="icon"><i class="'+e.data("icon")+'"></i></span>':icon="",e.data("upload_text")?upload_text='<span class="str">'+e.data("upload_text")+"</span>":upload_text="",e.uploadFile({url:um_scripts.imageupload,method:"POST",multiple:!1,formData:{key:e.data("key"),set_id:e.data("set_id"),set_mode:e.data("set_mode"),_wpnonce:e.data("nonce"),timestamp:e.data("timestamp")},fileName:e.data("key"),allowedTypes:e.data("allowed_types"),maxFileSize:e.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:e.data("max_size_error"),extErrorStr:e.data("extension_error"),maxFileCountErrorStr:e.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(t){e.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(t,a,o){e.selectedFiles=0;try{a=jQuery.parseJSON(a)}catch(e){return void console.log(e,a)}a.error&&""!=a.error?(e.parents(".um-modal-body").append('<div class="um-error-block">'+a.error+"</div>"),e.parents(".um-modal-body").find(".upload-statusbar").hide(0),um_modal_responsive()):jQuery.each(a,function(t,a){var o=e.parents(".um-modal-body").find(".um-single-image-preview img"),i=e.parents(".um-modal-body").find(".um-single-image-preview");o.attr("src",a),o.load(function(){e.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),e.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),i.show(0),um_modal_responsive()})})}})}function initFileUpload_UM(e){e.data("upload_help_text")?upload_help_text='<span class="help">'+e.data("upload_help_text")+"</span>":upload_help_text="",e.data("icon")?icon='<span class="icon"><i class="'+e.data("icon")+'"></i></span>':icon="",e.data("upload_text")?upload_text='<span class="str">'+e.data("upload_text")+"</span>":upload_text="",e.uploadFile({url:um_scripts.fileupload,method:"POST",multiple:!1,formData:{key:e.data("key"),set_id:e.data("set_id"),set_mode:e.data("set_mode"),_wpnonce:e.data("nonce"),timestamp:e.data("timestamp")},fileName:e.data("key"),allowedTypes:e.data("allowed_types"),maxFileSize:e.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:e.data("max_size_error"),extErrorStr:e.data("extension_error"),maxFileCountErrorStr:e.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(t){e.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(t,a,o){e.selectedFiles=0,a=jQuery.parseJSON(a),a.error&&""!=a.error?(e.parents(".um-modal-body").append('<div class="um-error-block">'+a.error+"</div>"),e.parents(".um-modal-body").find(".upload-statusbar").hide(0),setTimeout(function(){um_modal_responsive()},1e3)):(jQuery.each(a,function(t,a){e.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),e.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),e.parents(".um-modal-body").find(".um-single-file-preview").show(0),"icon"==t?e.parents(".um-modal-body").find(".um-single-fileinfo i").removeClass().addClass(a):"icon_bg"==t?e.parents(".um-modal-body").find(".um-single-fileinfo span.icon").css({"background-color":a}):"filename"==t?e.parents(".um-modal-body").find(".um-single-fileinfo span.filename").html(a):e.parents(".um-modal-body").find(".um-single-fileinfo a").attr("href",a)}),setTimeout(function(){um_modal_responsive()},1e3))}})}function initCrop_UM(){var e=jQuery(".um-modal .um-single-image-preview img").first(),t=jQuery(".um-modal .um-single-image-preview"),a=e.parent().attr("data-crop"),o=e.parent().attr("data-min_width"),i=e.parent().attr("data-min_height"),r=e.parent().attr("data-ratio");if(jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"))var r=jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"),u=r.split(":"),r=u[0];if(e.length&&""!=e.attr("src")){var d=jQuery(window).height()-(jQuery(".um-modal-footer a").height()+20)-50-jQuery(".um-modal-header:visible").height();if(e.css({height:"auto"}),t.css({height:"auto"}),jQuery(window).height()<=400?(t.css({height:d+"px","max-height":d+"px"}),e.css({height:"auto"})):(e.css({height:"auto","max-height":d+"px"}),t.css({height:e.height(),"max-height":d+"px"})),"square"==a)var s={minWidth:o,minHeight:i,dragCrop:!1,aspectRatio:1,zoomable:!1,rotatable:!1,dashed:!1,done:function(t){e.parent().attr("data-coord",Math.round(t.x)+","+Math.round(t.y)+","+Math.round(t.width)+","+Math.round(t.height))}};else if("cover"==a){Math.round(o/r)>0&&(i=Math.round(o/r));var s={minWidth:o,minHeight:i,dragCrop:!1,aspectRatio:r,zoomable:!1,rotatable:!1,dashed:!1,done:function(t){e.parent().attr("data-coord",Math.round(t.x)+","+Math.round(t.y)+","+Math.round(t.width)+","+Math.round(t.height))}}}else if("user"==a)var s={minWidth:o,minHeight:i,dragCrop:!0,aspectRatio:"auto",zoomable:!1,rotatable:!1,dashed:!1,done:function(t){e.parent().attr("data-coord",Math.round(t.x)+","+Math.round(t.y)+","+Math.round(t.width)+","+Math.round(t.height))}};0!=a&&(e.cropper(s),jQuery(".um-single-image-preview img.cropper-hidden").cropper("destroy"),jQuery(".um-single-image-preview img.lazyloaded").addClass("cropper-hidden"),jQuery(".um-single-image-preview img.lazyloaded").removeClass("lazyloaded"),jQuery(".um-single-image-preview .cropper-container").append('<div class="um-clear"></div>'))}}function um_new_modal(e,t,a,o){var i=jQuery("body").find(".um-modal-overlay");if(0==i.length)if(jQuery(".tipsy").hide(),UM_hide_menus(),jQuery("body,html,textarea").css("overflow","hidden"),jQuery(document).bind("touchmove",function(e){e.preventDefault()}),jQuery(".um-modal").on("touchmove",function(e){e.stopPropagation()}),a?jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal is-photo"></div>'):jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal no-photo"></div>'),jQuery("#"+e).prependTo(".um-modal"),a){jQuery(".um-modal").find(".um-modal-photo").html("<img />");var r=jQuery(".um-modal-photo img"),u=jQuery(window).width()-60,d=jQuery(window).height()-.25*jQuery(window).height();r.attr("src",o),r.load(function(){jQuery("#"+e).show(),jQuery(".um-modal").show(),r.css({opacity:0}),r.css({"max-width":u}),r.css({"max-height":d}),jQuery(".um-modal").css({width:r.width(),"margin-left":"-"+r.width()/2+"px"}),r.animate({opacity:1},1e3),um_modal_responsive()})}else jQuery("#"+e).show(),jQuery(".um-modal").show(),um_modal_size(t),initImageUpload_UM(jQuery(".um-modal:visible").find(".um-single-image-upload")),initFileUpload_UM(jQuery(".um-modal:visible").find(".um-single-file-upload")),um_modal_responsive()}function um_modal_responsive(){var e=jQuery(".um-modal:visible"),t=jQuery(".um-modal-body.photo:visible");if(t.length){e.removeClass("uimob340"),e.removeClass("uimob500");var a=jQuery(".um-modal-photo img"),o=jQuery(window).width()-60,i=jQuery(window).height()-.25*jQuery(window).height();a.css({opacity:0}),a.css({"max-width":o}),a.css({"max-height":i}),jQuery(".um-modal").css({width:a.width(),"margin-left":"-"+a.width()/2+"px"}),a.animate({opacity:1},1e3);var r=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:r},300)}else if(e.length){var u=jQuery(window).width();if(e.removeClass("uimob340"),e.removeClass("uimob500"),u<=340)e.addClass("uimob340"),initCrop_UM(),e.animate({bottom:0},300);else if(u<=500)e.addClass("uimob500"),initCrop_UM(),e.animate({bottom:0},300);else if(u<=800){initCrop_UM();var r=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:r},300)}else if(u<=960){initCrop_UM();var r=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:r},300)}else if(u>960){initCrop_UM();var r=(jQuery(window).height()-e.innerHeight())/2+"px";e.animate({bottom:r},300)}}}function um_remove_modal(){jQuery("img.cropper-hidden").cropper("destroy"),jQuery("body,html,textarea").css("overflow","auto"),jQuery(document).unbind("touchmove"),jQuery('.um-modal div[id^="um_"]').hide().appendTo("body"),jQuery(".um-modal,.um-modal-overlay").remove()}function um_modal_size(e){jQuery(".um-modal:visible").addClass(e)}function um_modal_add_attr(e,t){jQuery(".um-modal:visible").data(e,t)}function prepare_Modal(){0==jQuery(".um-popup-overlay").length&&(jQuery("body").append('<div class="um-popup-overlay"></div>'),jQuery("body").append('<div class="um-popup"></div>'),jQuery(".um-popup").addClass("loading"),jQuery("body,html").css({overflow:"hidden"}))}function remove_Modal(){jQuery(".um-popup-overlay").length&&(jQuery(".tipsy").remove(),jQuery(".um-popup").empty().remove(),jQuery(".um-popup-overlay").empty().remove(),jQuery("body,html").css({overflow:"auto"}))}function show_Modal(e){jQuery(".um-popup-overlay").length&&(jQuery(".um-popup").removeClass("loading").html(e),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,offset:3}))}function responsive_Modal(){jQuery(".um-popup-overlay").length&&(ag_height=jQuery(window).height()-jQuery(".um-popup um-popup-header").outerHeight()-jQuery(".um-popup .um-popup-footer").outerHeight()-80,ag_height>350&&(ag_height=350),jQuery(".um-popup-autogrow:visible").length?(jQuery(".um-popup-autogrow:visible").css({height:ag_height+"px"}),jQuery(".um-popup-autogrow:visible").mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500}).mCustomScrollbar("scrollTo","bottom",{scrollInertia:0})):jQuery(".um-popup-autogrow2:visible").length&&(jQuery(".um-popup-autogrow2:visible").css({"max-height":ag_height+"px"}),jQuery(".um-popup-autogrow2:visible").mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500})))}function um_reset_field(e){jQuery(e).find("div.um-field-area").find("input,textarea,select").not(":button, :submit, :reset, :hidden").val("").removeAttr("checked").removeAttr("selected")}function um_selected(e,t){if(e==t)return"selected='selected'"}jQuery(function(){jQuery(".um-search form *").keypress(function(e){if(13==e.which)return jQuery(".um-search form").submit(),!1}),2==jQuery("input[data-key=user_password],input[data-key=confirm_user_password]").length&&UM_check_password_matched()});
|
assets/js/um-gdpr.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
(function( $ ) {
|
2 |
-
'use strict';
|
3 |
-
|
4 |
-
$(document).on('click', "a.um-toggle-gdpr" ,function() {
|
5 |
-
|
6 |
-
var me = jQuery(this);
|
7 |
-
|
8 |
-
$( ".um-gdpr-content" ).toggle( "fast", function() {
|
9 |
-
if( $( ".um-gdpr-content" ).is(':visible') ){
|
10 |
-
me.text( me.data('toggle-hide') );
|
11 |
-
}
|
12 |
-
|
13 |
-
if( $( ".um-gdpr-content" ).is(':hidden') ){
|
14 |
-
me.text( me.data('toggle-show') );
|
15 |
-
}
|
16 |
-
|
17 |
-
});
|
18 |
-
|
19 |
-
});
|
20 |
-
|
21 |
-
|
22 |
-
})( jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/um-gdpr.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(t){"use strict";t(document).on("click","a.um-toggle-gdpr",function(){var e=jQuery(this);t(".um-gdpr-content").toggle("fast",function(){t(".um-gdpr-content").is(":visible")&&e.text(e.data("toggle-hide")),t(".um-gdpr-content").is(":hidden")&&e.text(e.data("toggle-show"))})})}(jQuery);
|
|
assets/js/um-members.js
CHANGED
@@ -4,7 +4,7 @@ jQuery(document).ready(function() {
|
|
4 |
UM_Member_Grid( jQuery(this) );
|
5 |
});
|
6 |
|
7 |
-
jQuery('.um-
|
8 |
if ( jQuery(this).find('a').length == 0 ) {
|
9 |
jQuery(this).remove();
|
10 |
}
|
4 |
UM_Member_Grid( jQuery(this) );
|
5 |
});
|
6 |
|
7 |
+
jQuery('.um-member-connect').each(function(){
|
8 |
if ( jQuery(this).find('a').length == 0 ) {
|
9 |
jQuery(this).remove();
|
10 |
}
|
assets/js/um-members.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),jQuery(".um-
|
1 |
+
jQuery(document).ready(function(){jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),jQuery(".um-member-connect").each(function(){0==jQuery(this).find("a").length&&jQuery(this).remove()}),jQuery(".um-member-meta-main").each(function(){0==jQuery(this).find(".um-member-metaline").length&&0==jQuery(this).find(".um-member-connect").find("a").length&&jQuery(this).remove()}),jQuery(document).on("click",".um-member-more a",function(e){e.preventDefault();var r=jQuery(this).parents(".um-member"),m=jQuery(this).parents(".um-members");return r.find(".um-member-more").hide(),r.find(".um-member-meta").slideDown(function(){UM_Member_Grid(m)}),r.find(".um-member-less").fadeIn(),setTimeout(function(){UM_Member_Grid(m)},100),!1}),jQuery(document).on("click",".um-member-less a",function(e){e.preventDefault();var r=jQuery(this).parents(".um-member"),m=jQuery(this).parents(".um-members");return r.find(".um-member-less").hide(),r.find(".um-member-meta").slideUp(function(){r.find(".um-member-more").fadeIn(),UM_Member_Grid(m)}),!1}),jQuery(document).on("click",".um-do-search",function(e){return e.preventDefault(),jQuery(this).parents("form").find("input").filter(function(e){if(0===this.value.length)return!0}).prop("disabled",!0),jQuery(this).parents("form").find("select").filter(function(e){if(0===this.value.length)return!0}).prop("disabled",!0),jQuery(this).parents("form").submit(),!1})});
|
assets/js/um-scripts.js
CHANGED
@@ -1,7 +1,3 @@
|
|
1 |
-
/*jQuery('body').on('error', '.um-avatar', function() {
|
2 |
-
if( jQuery(this).data('load-error') != undefined ) return;
|
3 |
-
jQuery(this).data('load-error', '1').attr('src', jQuery(this).data('default'));
|
4 |
-
});*/
|
5 |
jQuery(document).ready(function() {
|
6 |
|
7 |
jQuery(document).on('click', '.um-dropdown a', function(e){
|
|
|
|
|
|
|
|
|
1 |
jQuery(document).ready(function() {
|
2 |
|
3 |
jQuery(document).on('click', '.um-dropdown a', function(e){
|
includes/admin/class-admin.php
CHANGED
@@ -35,7 +35,6 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
|
35 |
|
36 |
add_action( 'um_admin_do_action__user_cache', array( &$this, 'user_cache' ) );
|
37 |
add_action( 'um_admin_do_action__purge_temp', array( &$this, 'purge_temp' ) );
|
38 |
-
add_action( 'um_admin_do_action__manual_upgrades_request', array( &$this, 'manual_upgrades_request' ) );
|
39 |
add_action( 'um_admin_do_action__duplicate_form', array( &$this, 'duplicate_form' ) );
|
40 |
add_action( 'um_admin_do_action__um_language_downloader', array( &$this, 'um_language_downloader' ) );
|
41 |
add_action( 'um_admin_do_action__um_hide_locale_notice', array( &$this, 'um_hide_notice' ) );
|
@@ -49,29 +48,6 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
|
49 |
}
|
50 |
|
51 |
|
52 |
-
function manual_upgrades_request() {
|
53 |
-
if ( ! is_admin() || ! current_user_can( 'manage_options' ) ) {
|
54 |
-
die();
|
55 |
-
}
|
56 |
-
|
57 |
-
$last_request = get_option( 'um_last_manual_upgrades_request', false );
|
58 |
-
|
59 |
-
if ( empty( $last_request ) || time() > $last_request + DAY_IN_SECONDS ) {
|
60 |
-
|
61 |
-
delete_transient( 'update_plugins' );
|
62 |
-
delete_site_transient( 'update_plugins' );
|
63 |
-
|
64 |
-
UM()->plugin_updater()->um_checklicenses();
|
65 |
-
|
66 |
-
update_option( 'um_last_manual_upgrades_request', time() );
|
67 |
-
|
68 |
-
$url = add_query_arg( array( 'page' => 'ultimatemember', 'update' => 'got_updates' ), admin_url( 'admin.php' ) );
|
69 |
-
} else {
|
70 |
-
$url = add_query_arg( array( 'page' => 'ultimatemember', 'update' => 'often_updates' ), admin_url( 'admin.php' ) );
|
71 |
-
}
|
72 |
-
exit( wp_redirect( $url ) );
|
73 |
-
}
|
74 |
-
|
75 |
|
76 |
/**
|
77 |
* Clear all users cache
|
35 |
|
36 |
add_action( 'um_admin_do_action__user_cache', array( &$this, 'user_cache' ) );
|
37 |
add_action( 'um_admin_do_action__purge_temp', array( &$this, 'purge_temp' ) );
|
|
|
38 |
add_action( 'um_admin_do_action__duplicate_form', array( &$this, 'duplicate_form' ) );
|
39 |
add_action( 'um_admin_do_action__um_language_downloader', array( &$this, 'um_language_downloader' ) );
|
40 |
add_action( 'um_admin_do_action__um_hide_locale_notice', array( &$this, 'um_hide_notice' ) );
|
48 |
}
|
49 |
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
/**
|
53 |
* Clear all users cache
|
includes/admin/core/class-admin-gdpr.php
DELETED
@@ -1,316 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace um\admin\core;
|
3 |
-
|
4 |
-
// Exit if accessed directly.
|
5 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
-
|
7 |
-
|
8 |
-
if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) {
|
9 |
-
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class Admin_GDPR
|
13 |
-
* @package um\admin\core
|
14 |
-
*/
|
15 |
-
class Admin_GDPR {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var array
|
19 |
-
*/
|
20 |
-
var $meta_associations = array();
|
21 |
-
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Admin_GDPR constructor.
|
25 |
-
*/
|
26 |
-
function __construct() {
|
27 |
-
add_action( 'init', array( &$this, 'init_fields' ), 10 );
|
28 |
-
add_action( 'admin_init', array( &$this, 'plugin_add_suggested_privacy_content' ), 20 );
|
29 |
-
add_filter( 'wp_privacy_personal_data_exporters', array( &$this, 'plugin_register_exporters' ) );
|
30 |
-
add_filter( 'wp_privacy_personal_data_erasers', array( &$this, 'plugin_register_erasers' ) );
|
31 |
-
|
32 |
-
add_action( 'um_admin_custom_register_metaboxes', array( &$this, 'add_metabox_register' ) );
|
33 |
-
}
|
34 |
-
|
35 |
-
|
36 |
-
/**
|
37 |
-
*
|
38 |
-
*/
|
39 |
-
function add_metabox_register() {
|
40 |
-
add_meta_box(
|
41 |
-
"um-admin-form-register_gdpr",
|
42 |
-
__( 'Privacy Policy', 'ultimate-member' ),
|
43 |
-
array( UM()->metabox(), 'load_metabox_form' ),
|
44 |
-
'um_form',
|
45 |
-
'side',
|
46 |
-
'default'
|
47 |
-
);
|
48 |
-
}
|
49 |
-
|
50 |
-
|
51 |
-
/**
|
52 |
-
*
|
53 |
-
*/
|
54 |
-
function init_fields() {
|
55 |
-
$this->meta_associations = array(
|
56 |
-
|
57 |
-
'account_status' => __( 'Account Status', 'ultimate-member' ),
|
58 |
-
'submitted' => __( 'Submitted data on Registration', 'ultimate-member' ),
|
59 |
-
'form_id' => __( 'Registration Form ID', 'ultimate-member' ),
|
60 |
-
'timestamp' => __( 'Registration Timestamp', 'ultimate-member' ),
|
61 |
-
'request' => __( 'Registration Request', 'ultimate-member' ),
|
62 |
-
'_wpnonce' => __( 'Registration Nonce', 'ultimate-member' ),
|
63 |
-
'_wp_http_referer' => __( 'Registration HTTP referer', 'ultimate-member' ),
|
64 |
-
'role' => __( 'Community Role', 'ultimate-member' ),
|
65 |
-
'um_user_profile_url_slug_user_login' => __( 'Profile Slug "Username"', 'ultimate-member' ),
|
66 |
-
'um_user_profile_url_slug_name' => __( 'Profile Slug "First and Last Name with \'.\'"', 'ultimate-member' ),
|
67 |
-
'um_user_profile_url_slug_name_dash' => __( 'Profile Slug "First and Last Name with \'-\'"', 'ultimate-member' ),
|
68 |
-
'um_user_profile_url_slug_name_plus' => __( 'Profile Slug "First and Last Name with \'+\'"', 'ultimate-member' ),
|
69 |
-
'um_user_profile_url_slug_user_id' => __( 'Profile Slug "User ID"', 'ultimate-member' ),
|
70 |
-
'_um_last_login' => __( 'Last Login Timestamp', 'ultimate-member' ),
|
71 |
-
|
72 |
-
//Private content extension
|
73 |
-
'_um_private_content_post_id' => __( 'Private Content Post ID', 'ultimate-member' ),
|
74 |
-
|
75 |
-
//Verified Users extension
|
76 |
-
'_um_verified' => __( 'Verified Account', 'ultimate-member' ),
|
77 |
-
|
78 |
-
//Terms & Conditions extension
|
79 |
-
'use_terms_conditions_agreement' => __( 'Terms&Conditions Agreement', 'ultimate-member' ),
|
80 |
-
|
81 |
-
//GDPR extension
|
82 |
-
'use_gdpr_agreement' => __( 'Privacy Policy Agreement', 'ultimate-member' ),
|
83 |
-
|
84 |
-
|
85 |
-
);
|
86 |
-
|
87 |
-
$all_fields = UM()->builtin()->all_user_fields( null, true );
|
88 |
-
unset( $all_fields[0] );
|
89 |
-
|
90 |
-
$all_fields = array_map( function( $value ) {
|
91 |
-
return $value['title'];
|
92 |
-
}, $all_fields );
|
93 |
-
|
94 |
-
$this->meta_associations = array_merge( $this->meta_associations, $all_fields );
|
95 |
-
|
96 |
-
/**
|
97 |
-
* UM hook
|
98 |
-
*
|
99 |
-
* @type filter
|
100 |
-
* @title um_gdpr_meta_associations
|
101 |
-
* @description Exclude taxonomies for UM
|
102 |
-
* @input_vars
|
103 |
-
* [{"var":"$meta_associations","type":"array","desc":"Meta Keys Titles"}]
|
104 |
-
* @change_log
|
105 |
-
* ["Since: 2.0.14"]
|
106 |
-
* @usage
|
107 |
-
* <?php add_filter( 'um_gdpr_meta_associations', 'function_name', 10, 1 ); ?>
|
108 |
-
* @example
|
109 |
-
* <?php
|
110 |
-
* add_filter( 'um_gdpr_meta_associations', 'my_gdpr_meta_associations', 10, 1 );
|
111 |
-
* function my_gdpr_meta_associations( $meta_associations ) {
|
112 |
-
* // your code here
|
113 |
-
* return $meta_associations;
|
114 |
-
* }
|
115 |
-
* ?>
|
116 |
-
*/
|
117 |
-
$this->meta_associations = apply_filters( 'um_gdpr_meta_associations', $this->meta_associations );
|
118 |
-
}
|
119 |
-
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Return the default suggested privacy policy content.
|
123 |
-
*
|
124 |
-
* @return string The default policy content.
|
125 |
-
*/
|
126 |
-
function plugin_get_default_privacy_content() {
|
127 |
-
ob_start();
|
128 |
-
|
129 |
-
include UM()->admin()->templates_path . 'gdpr.php';
|
130 |
-
|
131 |
-
return ob_get_clean();
|
132 |
-
}
|
133 |
-
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Add the suggested privacy policy text to the policy postbox.
|
137 |
-
*/
|
138 |
-
function plugin_add_suggested_privacy_content() {
|
139 |
-
$content = $this->plugin_get_default_privacy_content();
|
140 |
-
wp_add_privacy_policy_content( ultimatemember_plugin_name, $content );
|
141 |
-
}
|
142 |
-
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Register exporter for Plugin user data.
|
146 |
-
*
|
147 |
-
* @see https://github.com/allendav/wp-privacy-requests/blob/master/EXPORT.md
|
148 |
-
*
|
149 |
-
* @param $exporters
|
150 |
-
*
|
151 |
-
* @return array
|
152 |
-
*/
|
153 |
-
function plugin_register_exporters( $exporters ) {
|
154 |
-
$exporters[] = array(
|
155 |
-
'exporter_friendly_name' => ultimatemember_plugin_name,
|
156 |
-
'callback' => array( &$this, 'data_exporter' )
|
157 |
-
);
|
158 |
-
return $exporters;
|
159 |
-
}
|
160 |
-
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Get user metadata in key => value array
|
164 |
-
*
|
165 |
-
*
|
166 |
-
* @param $user_id
|
167 |
-
*
|
168 |
-
* @return array
|
169 |
-
*/
|
170 |
-
function get_metadata( $user_id ) {
|
171 |
-
global $wpdb;
|
172 |
-
|
173 |
-
$metadata = $wpdb->get_results( $wpdb->prepare(
|
174 |
-
"SELECT meta_key, meta_value
|
175 |
-
FROM {$wpdb->usermeta}
|
176 |
-
WHERE user_id = %d",
|
177 |
-
$user_id
|
178 |
-
), ARRAY_A );
|
179 |
-
|
180 |
-
$filtered = array();
|
181 |
-
foreach ( $metadata as $data ) {
|
182 |
-
if ( in_array( $data['meta_key'], array_keys( $this->meta_associations ) ) ) {
|
183 |
-
$filtered[] = array(
|
184 |
-
'key' => $data['meta_key'],
|
185 |
-
'name' => $this->meta_associations[ $data['meta_key'] ],
|
186 |
-
//'value' => maybe_unserialize( $data['meta_value'] ),
|
187 |
-
'value' => $data['meta_value'],
|
188 |
-
);
|
189 |
-
}
|
190 |
-
}
|
191 |
-
|
192 |
-
return $filtered;
|
193 |
-
}
|
194 |
-
|
195 |
-
|
196 |
-
/**
|
197 |
-
* Exporter for Plugin user data.
|
198 |
-
*
|
199 |
-
* @see https://github.com/allendav/wp-privacy-requests/blob/master/EXPORT.md
|
200 |
-
*
|
201 |
-
* @param $email_address
|
202 |
-
* @param int $page
|
203 |
-
*
|
204 |
-
* @return array
|
205 |
-
*/
|
206 |
-
function data_exporter( $email_address, $page = 1 ) {
|
207 |
-
$export_items = array();
|
208 |
-
$user = get_user_by( 'email', $email_address );
|
209 |
-
|
210 |
-
if ( $user && $user->ID ) {
|
211 |
-
// Most item IDs should look like postType-postID
|
212 |
-
// If you don't have a post, comment or other ID to work with,
|
213 |
-
// use a unique value to avoid having this item's export
|
214 |
-
// combined in the final report with other items of the same id
|
215 |
-
$item_id = "ultimate-member-{$user->ID}";
|
216 |
-
|
217 |
-
// Core group IDs include 'comments', 'posts', etc.
|
218 |
-
// But you can add your own group IDs as needed
|
219 |
-
$group_id = 'ultimate-member';
|
220 |
-
|
221 |
-
// Optional group label. Core provides these for core groups.
|
222 |
-
// If you define your own group, the first exporter to
|
223 |
-
// include a label will be used as the group label in the
|
224 |
-
// final exported report
|
225 |
-
$group_label = ultimatemember_plugin_name;
|
226 |
-
|
227 |
-
// Plugins can add as many items in the item data array as they want
|
228 |
-
//$data = array();
|
229 |
-
|
230 |
-
$data = $this->get_metadata( $user->ID );
|
231 |
-
|
232 |
-
if ( ! empty( $data ) ) {
|
233 |
-
// Add this group of items to the exporters data array.
|
234 |
-
$export_items[] = array(
|
235 |
-
'group_id' => $group_id,
|
236 |
-
'group_label' => $group_label,
|
237 |
-
'item_id' => $item_id,
|
238 |
-
'data' => $data,
|
239 |
-
);
|
240 |
-
}
|
241 |
-
}
|
242 |
-
// Returns an array of exported items for this pass, but also a boolean whether this exporter is finished.
|
243 |
-
//If not it will be called again with $page increased by 1.
|
244 |
-
return array(
|
245 |
-
'data' => $export_items,
|
246 |
-
'done' => true,
|
247 |
-
);
|
248 |
-
}
|
249 |
-
|
250 |
-
|
251 |
-
/**
|
252 |
-
* Register eraser for Plugin user data.
|
253 |
-
*
|
254 |
-
* @param array $erasers
|
255 |
-
*
|
256 |
-
* @return array
|
257 |
-
*/
|
258 |
-
function plugin_register_erasers( $erasers = array() ) {
|
259 |
-
$erasers[] = array(
|
260 |
-
'eraser_friendly_name' => ultimatemember_plugin_name,
|
261 |
-
'callback' => array( &$this, 'data_eraser' )
|
262 |
-
);
|
263 |
-
return $erasers;
|
264 |
-
}
|
265 |
-
|
266 |
-
|
267 |
-
/**
|
268 |
-
* Eraser for Plugin user data.
|
269 |
-
*
|
270 |
-
* @param $email_address
|
271 |
-
* @param int $page
|
272 |
-
*
|
273 |
-
* @return array
|
274 |
-
*/
|
275 |
-
function data_eraser( $email_address, $page = 1 ) {
|
276 |
-
if ( empty( $email_address ) ) {
|
277 |
-
return array(
|
278 |
-
'items_removed' => false,
|
279 |
-
'items_retained' => false,
|
280 |
-
'messages' => array(),
|
281 |
-
'done' => true,
|
282 |
-
);
|
283 |
-
}
|
284 |
-
|
285 |
-
$user = get_user_by( 'email', $email_address );
|
286 |
-
$messages = array();
|
287 |
-
$items_removed = false;
|
288 |
-
$items_retained = false;
|
289 |
-
|
290 |
-
if ( $user && $user->ID ) {
|
291 |
-
$data = $this->get_metadata( $user->ID );
|
292 |
-
|
293 |
-
foreach ( $data as $metadata ) {
|
294 |
-
$deleted = delete_user_meta( $user->ID, $metadata['key'] );
|
295 |
-
if ( $deleted ) {
|
296 |
-
$items_removed = true;
|
297 |
-
} else {
|
298 |
-
$messages[] = sprintf( __( 'Your %s was unable to be removed at this time.', 'ultimate-member' ), $metadata['name'] );
|
299 |
-
$items_retained = true;
|
300 |
-
}
|
301 |
-
}
|
302 |
-
}
|
303 |
-
|
304 |
-
// Returns an array of exported items for this pass, but also a boolean whether this exporter is finished.
|
305 |
-
//If not it will be called again with $page increased by 1.
|
306 |
-
return array(
|
307 |
-
'items_removed' => $items_removed,
|
308 |
-
'items_retained' => $items_retained,
|
309 |
-
'messages' => $messages,
|
310 |
-
'done' => true,
|
311 |
-
);
|
312 |
-
}
|
313 |
-
|
314 |
-
}
|
315 |
-
|
316 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/core/class-admin-menu.php
CHANGED
@@ -206,7 +206,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
|
206 |
add_meta_box( 'um-metaboxes-mainbox-1', __( 'Latest from our blog', 'ultimate-member' ), array( &$this, 'um_news' ), $this->pagehook, 'normal', 'core' );
|
207 |
|
208 |
add_meta_box( 'um-metaboxes-sidebox-1', __( 'Purge Temp Files', 'ultimate-member' ), array( &$this, 'purge_temp' ), $this->pagehook, 'side', 'core' );
|
209 |
-
|
210 |
add_meta_box( 'um-metaboxes-sidebox-2', __( 'User Cache', 'ultimate-member' ), array( &$this, 'user_cache' ), $this->pagehook, 'side', 'core' );
|
211 |
|
212 |
if ( $this->language_avaialable_not_installed() ) {
|
@@ -216,12 +215,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
|
216 |
} else if ( $this->language_not_available() ) {
|
217 |
add_meta_box( 'um-metaboxes-sidebox-2', __( 'Language', 'ultimate-member' ), array( &$this, 'ct_language' ), $this->pagehook, 'side', 'core' );
|
218 |
}
|
219 |
-
|
220 |
-
//If there are active and licensed extensions - show metabox for upgrade it
|
221 |
-
$exts = UM()->plugin_updater()->um_get_active_plugins();
|
222 |
-
if ( 0 < count( $exts ) ) {
|
223 |
-
add_meta_box( 'um-metaboxes-sidebox-3', __( 'Upgrade\'s Manual Request', 'ultimate-member' ), array( &$this, 'upgrade_request' ), $this->pagehook, 'side', 'core' );
|
224 |
-
}
|
225 |
}
|
226 |
|
227 |
|
@@ -276,14 +269,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
|
276 |
}
|
277 |
|
278 |
|
279 |
-
/**
|
280 |
-
*
|
281 |
-
*/
|
282 |
-
function upgrade_request() {
|
283 |
-
include_once UM()->admin()->templates_path . 'dashboard/upgrade-request.php';
|
284 |
-
}
|
285 |
-
|
286 |
-
|
287 |
/**
|
288 |
*
|
289 |
*/
|
206 |
add_meta_box( 'um-metaboxes-mainbox-1', __( 'Latest from our blog', 'ultimate-member' ), array( &$this, 'um_news' ), $this->pagehook, 'normal', 'core' );
|
207 |
|
208 |
add_meta_box( 'um-metaboxes-sidebox-1', __( 'Purge Temp Files', 'ultimate-member' ), array( &$this, 'purge_temp' ), $this->pagehook, 'side', 'core' );
|
|
|
209 |
add_meta_box( 'um-metaboxes-sidebox-2', __( 'User Cache', 'ultimate-member' ), array( &$this, 'user_cache' ), $this->pagehook, 'side', 'core' );
|
210 |
|
211 |
if ( $this->language_avaialable_not_installed() ) {
|
215 |
} else if ( $this->language_not_available() ) {
|
216 |
add_meta_box( 'um-metaboxes-sidebox-2', __( 'Language', 'ultimate-member' ), array( &$this, 'ct_language' ), $this->pagehook, 'side', 'core' );
|
217 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
219 |
|
220 |
|
269 |
}
|
270 |
|
271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
/**
|
273 |
*
|
274 |
*/
|
includes/admin/core/class-admin-notices.php
CHANGED
@@ -38,7 +38,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
|
38 |
$this->localize_note();
|
39 |
$this->show_update_messages();
|
40 |
$this->check_wrong_install_folder();
|
41 |
-
|
42 |
$this->need_upgrade();
|
43 |
$this->check_wrong_licenses();
|
44 |
|
@@ -225,32 +225,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
|
225 |
function old_extensions_notice() {
|
226 |
$show = false;
|
227 |
|
228 |
-
$old_extensions = array(
|
229 |
-
'bbpress',
|
230 |
-
'followers',
|
231 |
-
'friends',
|
232 |
-
'instagram',
|
233 |
-
'mailchimp',
|
234 |
-
'messaging',
|
235 |
-
'mycred',
|
236 |
-
'notices',
|
237 |
-
'notifications',
|
238 |
-
'online',
|
239 |
-
'private-content',
|
240 |
-
'profile-completeness',
|
241 |
-
'recaptcha',
|
242 |
-
'reviews',
|
243 |
-
'social-activity',
|
244 |
-
'social-login',
|
245 |
-
'terms-conditions',
|
246 |
-
'user-tags',
|
247 |
-
'verified-users',
|
248 |
-
'woocommerce',
|
249 |
-
);
|
250 |
-
|
251 |
$slugs = array_map( function( $item ) {
|
252 |
return 'um-' . $item . '/um-' . $item . '.php';
|
253 |
-
},
|
254 |
|
255 |
$active_plugins = UM()->dependencies()->get_active_plugins();
|
256 |
foreach ( $slugs as $slug ) {
|
@@ -420,14 +397,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
|
420 |
$messages[0]['content'] = __( 'Your user cache is now removed.', 'ultimate-member' );
|
421 |
break;
|
422 |
|
423 |
-
case 'got_updates':
|
424 |
-
$messages[0]['content'] = __( 'You got the latest upgrades.', 'ultimate-member' );
|
425 |
-
break;
|
426 |
-
|
427 |
-
case 'often_updates':
|
428 |
-
$messages[0]['err_content'] = __( 'Try again later. You can run this action once daily.', 'ultimate-member' );
|
429 |
-
break;
|
430 |
-
|
431 |
case 'form_duplicated':
|
432 |
$messages[0]['content'] = __( 'The form has been duplicated successfully.', 'ultimate-member' );
|
433 |
break;
|
@@ -571,7 +540,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
|
571 |
ob_start(); ?>
|
572 |
|
573 |
<p>
|
574 |
-
<?php printf( __( '<strong>%s version %s</strong> needs to be updated
|
575 |
</p>
|
576 |
|
577 |
<p>
|
38 |
$this->localize_note();
|
39 |
$this->show_update_messages();
|
40 |
$this->check_wrong_install_folder();
|
41 |
+
$this->admin_notice_tracking();
|
42 |
$this->need_upgrade();
|
43 |
$this->check_wrong_licenses();
|
44 |
|
225 |
function old_extensions_notice() {
|
226 |
$show = false;
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
$slugs = array_map( function( $item ) {
|
229 |
return 'um-' . $item . '/um-' . $item . '.php';
|
230 |
+
}, array_keys( UM()->dependencies()->ext_required_version ) );
|
231 |
|
232 |
$active_plugins = UM()->dependencies()->get_active_plugins();
|
233 |
foreach ( $slugs as $slug ) {
|
397 |
$messages[0]['content'] = __( 'Your user cache is now removed.', 'ultimate-member' );
|
398 |
break;
|
399 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
case 'form_duplicated':
|
401 |
$messages[0]['content'] = __( 'The form has been duplicated successfully.', 'ultimate-member' );
|
402 |
break;
|
540 |
ob_start(); ?>
|
541 |
|
542 |
<p>
|
543 |
+
<?php printf( __( '<strong>%s version %s</strong> needs to be updated for correct working.<br />It is necessary to update the structure of the database and options that are associated with <strong>%s %s</strong>.<br />Please visit <a href="%s">"Upgrade"</a> page and run the upgrade process.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, ultimatemember_version, $url ); ?>
|
544 |
</p>
|
545 |
|
546 |
<p>
|
includes/admin/core/class-admin-settings.php
CHANGED
@@ -1197,14 +1197,12 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1197 |
do_action( "um_settings_page_" . $current_tab . "_" . $current_subtab . "_before_section" );
|
1198 |
|
1199 |
$section_fields = $this->get_section_fields( $current_tab, $current_subtab );
|
1200 |
-
$settings_section = $this->render_settings_section( $section_fields, $current_tab, $current_subtab );
|
1201 |
|
1202 |
/**
|
1203 |
* UM hook
|
1204 |
*
|
1205 |
* @type filter
|
1206 |
* @title um_settings_section_{$current_tab}_{$current_subtab}_content
|
1207 |
-
*
|
1208 |
* @description Render settings section
|
1209 |
* @input_vars
|
1210 |
* [{"var":"$content","type":"string","desc":"Section content"},
|
@@ -1222,7 +1220,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1222 |
* ?>
|
1223 |
*/
|
1224 |
echo apply_filters( 'um_settings_section_' . $current_tab . '_' . $current_subtab . '_content',
|
1225 |
-
$
|
1226 |
$section_fields
|
1227 |
);
|
1228 |
|
@@ -1260,7 +1258,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1260 |
do_action( "um_settings_page_" . $current_tab . "_" . $current_subtab . "_before_section" );
|
1261 |
|
1262 |
$section_fields = $this->get_section_fields( $current_tab, $current_subtab );
|
1263 |
-
$settings_section = $this->render_settings_section( $section_fields, $current_tab, $current_subtab );
|
1264 |
|
1265 |
/**
|
1266 |
* UM hook
|
@@ -1284,16 +1281,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1284 |
* ?>
|
1285 |
*/
|
1286 |
echo apply_filters( 'um_settings_section_' . $current_tab . '_' . $current_subtab . '_content',
|
1287 |
-
$
|
1288 |
$section_fields
|
1289 |
);
|
1290 |
?>
|
1291 |
|
1292 |
-
|
1293 |
<p class="submit">
|
1294 |
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e( 'Save Changes', 'ultimate-member' ) ?>" />
|
1295 |
-
<?php $um_settings_nonce = wp_create_nonce( 'um-settings-nonce' ); ?>
|
1296 |
-
<input type="hidden" name="__umnonce" value="<?php echo $um_settings_nonce; ?>" />
|
1297 |
</p>
|
1298 |
</form>
|
1299 |
|
@@ -1403,16 +1397,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1403 |
*
|
1404 |
*/
|
1405 |
function save_settings_handler() {
|
1406 |
-
|
1407 |
if ( isset( $_POST['um-settings-action'] ) && 'save' == $_POST['um-settings-action'] && ! empty( $_POST['um_options'] ) ) {
|
1408 |
-
|
1409 |
-
$nonce = ! empty( $_POST['__umnonce'] ) ? $_POST['__umnonce'] : '';
|
1410 |
-
|
1411 |
-
if ( ( ! wp_verify_nonce( $nonce, 'um-settings-nonce' ) || empty( $nonce ) ) || ! current_user_can('manage_options') ) {
|
1412 |
-
// This nonce is not valid.
|
1413 |
-
wp_die( 'Security Check' );
|
1414 |
-
}
|
1415 |
-
|
1416 |
/**
|
1417 |
* UM hook
|
1418 |
*
|
@@ -1771,8 +1756,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1771 |
|
1772 |
<div class="wrap-licenses">
|
1773 |
<input type="hidden" id="licenses_settings" name="licenses_settings" value="1">
|
1774 |
-
<?php $um_settings_nonce = wp_create_nonce( 'um-settings-nonce' ); ?>
|
1775 |
-
<input type="hidden" name="__umnonce" value="<?php echo $um_settings_nonce; ?>" />
|
1776 |
<table class="form-table um-settings-section">
|
1777 |
<tbody>
|
1778 |
<?php foreach ( $section_fields as $field_data ) {
|
@@ -2024,8 +2007,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
2024 |
<form method="post" action="" name="um-settings-form" class="um-settings-form">
|
2025 |
<input type="hidden" value="save" name="um-settings-action" />
|
2026 |
<input type="hidden" name="licenses_settings" value="1" />
|
2027 |
-
<?php $um_settings_nonce = wp_create_nonce( 'um-settings-nonce' ); ?>
|
2028 |
-
<input type="hidden" name="__umnonce" value="<?php echo $um_settings_nonce; ?>" />
|
2029 |
<input type="text" id="um_options_<?php echo $field_data['id'] ?>" name="um_options[<?php echo $field_data['id'] ?>]" value="<?php echo $value ?>" class="um-option-field um-long-field" data-field_id="<?php echo $field_data['id'] ?>" />
|
2030 |
<?php if ( ! empty( $field_data['description'] ) ) { ?>
|
2031 |
<div class="description"><?php echo $field_data['description'] ?></div>
|
@@ -2184,6 +2165,7 @@ Cache User Profile: <?php if( UM()->options()->get( 'um_profile_object_cache_s
|
|
2184 |
Generate Slugs on Directories: <?php if( UM()->options()->get( 'um_generate_slug_in_directory' ) == 1 ){ echo "No"; }else{ echo "Yes"; } echo "\n"; ?>
|
2185 |
Rewrite Rules: <?php if( UM()->options()->get( 'um_flush_stop' ) == 1 ){ echo "No"; }else{ echo "Yes"; } echo "\n"; ?>
|
2186 |
Force UTF-8 Encoding: <?php if( UM()->options()->get( 'um_force_utf8_strings' ) == 1 ){ echo "Yes"; }else{ echo "No"; } echo "\n"; ?>
|
|
|
2187 |
JS/CSS Compression: <?php if ( defined('SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { echo "Yes"; }else{ echo "No"; } echo "\n"; ?>
|
2188 |
<?php if( is_multisite() ): ?>
|
2189 |
Network Structure: <?php echo UM()->options()->get( 'network_permalink_structure' ). "\n"; ?>
|
1197 |
do_action( "um_settings_page_" . $current_tab . "_" . $current_subtab . "_before_section" );
|
1198 |
|
1199 |
$section_fields = $this->get_section_fields( $current_tab, $current_subtab );
|
|
|
1200 |
|
1201 |
/**
|
1202 |
* UM hook
|
1203 |
*
|
1204 |
* @type filter
|
1205 |
* @title um_settings_section_{$current_tab}_{$current_subtab}_content
|
|
|
1206 |
* @description Render settings section
|
1207 |
* @input_vars
|
1208 |
* [{"var":"$content","type":"string","desc":"Section content"},
|
1220 |
* ?>
|
1221 |
*/
|
1222 |
echo apply_filters( 'um_settings_section_' . $current_tab . '_' . $current_subtab . '_content',
|
1223 |
+
$this->render_settings_section( $section_fields, $current_tab, $current_subtab ),
|
1224 |
$section_fields
|
1225 |
);
|
1226 |
|
1258 |
do_action( "um_settings_page_" . $current_tab . "_" . $current_subtab . "_before_section" );
|
1259 |
|
1260 |
$section_fields = $this->get_section_fields( $current_tab, $current_subtab );
|
|
|
1261 |
|
1262 |
/**
|
1263 |
* UM hook
|
1281 |
* ?>
|
1282 |
*/
|
1283 |
echo apply_filters( 'um_settings_section_' . $current_tab . '_' . $current_subtab . '_content',
|
1284 |
+
$this->render_settings_section( $section_fields, $current_tab, $current_subtab ),
|
1285 |
$section_fields
|
1286 |
);
|
1287 |
?>
|
1288 |
|
|
|
1289 |
<p class="submit">
|
1290 |
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e( 'Save Changes', 'ultimate-member' ) ?>" />
|
|
|
|
|
1291 |
</p>
|
1292 |
</form>
|
1293 |
|
1397 |
*
|
1398 |
*/
|
1399 |
function save_settings_handler() {
|
|
|
1400 |
if ( isset( $_POST['um-settings-action'] ) && 'save' == $_POST['um-settings-action'] && ! empty( $_POST['um_options'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1401 |
/**
|
1402 |
* UM hook
|
1403 |
*
|
1756 |
|
1757 |
<div class="wrap-licenses">
|
1758 |
<input type="hidden" id="licenses_settings" name="licenses_settings" value="1">
|
|
|
|
|
1759 |
<table class="form-table um-settings-section">
|
1760 |
<tbody>
|
1761 |
<?php foreach ( $section_fields as $field_data ) {
|
2007 |
<form method="post" action="" name="um-settings-form" class="um-settings-form">
|
2008 |
<input type="hidden" value="save" name="um-settings-action" />
|
2009 |
<input type="hidden" name="licenses_settings" value="1" />
|
|
|
|
|
2010 |
<input type="text" id="um_options_<?php echo $field_data['id'] ?>" name="um_options[<?php echo $field_data['id'] ?>]" value="<?php echo $value ?>" class="um-option-field um-long-field" data-field_id="<?php echo $field_data['id'] ?>" />
|
2011 |
<?php if ( ! empty( $field_data['description'] ) ) { ?>
|
2012 |
<div class="description"><?php echo $field_data['description'] ?></div>
|
2165 |
Generate Slugs on Directories: <?php if( UM()->options()->get( 'um_generate_slug_in_directory' ) == 1 ){ echo "No"; }else{ echo "Yes"; } echo "\n"; ?>
|
2166 |
Rewrite Rules: <?php if( UM()->options()->get( 'um_flush_stop' ) == 1 ){ echo "No"; }else{ echo "Yes"; } echo "\n"; ?>
|
2167 |
Force UTF-8 Encoding: <?php if( UM()->options()->get( 'um_force_utf8_strings' ) == 1 ){ echo "Yes"; }else{ echo "No"; } echo "\n"; ?>
|
2168 |
+
Time Check Security: <?php if( UM()->options()->get( 'enable_timebot' ) == 1 ){ echo "Yes"; }else{ echo "No"; } echo "\n"; ?>
|
2169 |
JS/CSS Compression: <?php if ( defined('SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { echo "Yes"; }else{ echo "No"; } echo "\n"; ?>
|
2170 |
<?php if( is_multisite() ): ?>
|
2171 |
Network Structure: <?php echo UM()->options()->get( 'network_permalink_structure' ). "\n"; ?>
|
includes/admin/core/class-admin-upgrade.php
CHANGED
@@ -17,12 +17,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
|
17 |
class Admin_Upgrade {
|
18 |
|
19 |
|
20 |
-
/**
|
21 |
-
* @var null
|
22 |
-
*/
|
23 |
-
protected static $instance = null;
|
24 |
-
|
25 |
-
|
26 |
/**
|
27 |
* @var
|
28 |
*/
|
@@ -37,25 +31,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
|
37 |
var $packages_dir;
|
38 |
|
39 |
|
40 |
-
/**
|
41 |
-
* Main Admin_Upgrade Instance
|
42 |
-
*
|
43 |
-
* Ensures only one instance of UM is loaded or can be loaded.
|
44 |
-
*
|
45 |
-
* @since 1.0
|
46 |
-
* @static
|
47 |
-
* @see UM()
|
48 |
-
* @return Admin_Upgrade - Main instance
|
49 |
-
*/
|
50 |
-
static public function instance() {
|
51 |
-
if ( is_null( self::$instance ) ) {
|
52 |
-
self::$instance = new self();
|
53 |
-
}
|
54 |
-
|
55 |
-
return self::$instance;
|
56 |
-
}
|
57 |
-
|
58 |
-
|
59 |
/**
|
60 |
* Admin_Upgrade constructor.
|
61 |
*/
|
@@ -64,55 +39,14 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
|
64 |
$this->necessary_packages = $this->need_run_upgrades();
|
65 |
|
66 |
if ( ! empty( $this->necessary_packages ) ) {
|
|
|
67 |
add_action( 'admin_menu', array( $this, 'admin_menu' ), 0 );
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
add_action( 'wp_ajax_um_run_package', array( $this, 'ajax_run_package' ) );
|
73 |
-
add_action( 'wp_ajax_um_get_packages', array( $this, 'ajax_get_packages' ) );
|
74 |
-
}
|
75 |
}
|
76 |
-
|
77 |
-
//add_action( 'in_plugin_update_message-' . um_plugin, array( $this, 'in_plugin_update_message' ) );
|
78 |
}
|
79 |
|
80 |
-
/**
|
81 |
-
* Function for major updates
|
82 |
-
*
|
83 |
-
*/
|
84 |
-
/*function in_plugin_update_message( $args ) {
|
85 |
-
|
86 |
-
$lastversion = get_option( '%UNIQUE_ID%_last_version', false );
|
87 |
-
if ( $lastversion && version_compare( $lastversion, %UNIQUE_ID%_current_version, '>' ) ) {
|
88 |
-
$upgrade_notice = get_option( '%UNIQUE_ID%_major_update' . $lastversion );
|
89 |
-
|
90 |
-
echo '<style type="text/css">
|
91 |
-
.%UNIQUE_ID%_plugin_upgrade_notice {
|
92 |
-
font-weight: 400;
|
93 |
-
color: #fff;
|
94 |
-
background: #d53221;
|
95 |
-
padding: 1em;
|
96 |
-
margin: 9px 0;
|
97 |
-
display: block;
|
98 |
-
box-sizing: border-box;
|
99 |
-
-webkit-box-sizing: border-box;
|
100 |
-
-moz-box-sizing: border-box;
|
101 |
-
}
|
102 |
-
.%UNIQUE_ID%_plugin_upgrade_notice:before {
|
103 |
-
content: "\f348";
|
104 |
-
display: inline-block;
|
105 |
-
font: 400 18px/1 dashicons;
|
106 |
-
speak: none;
|
107 |
-
margin: 0 8px 0 -2px;
|
108 |
-
-webkit-font-smoothing: antialiased;
|
109 |
-
-moz-osx-font-smoothing: grayscale;
|
110 |
-
vertical-align: top;
|
111 |
-
}
|
112 |
-
</style>' . wp_kses_post( $upgrade_notice );
|
113 |
-
}
|
114 |
-
}*/
|
115 |
-
|
116 |
|
117 |
/**
|
118 |
* Get array of necessary upgrade packages
|
@@ -171,7 +105,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
|
171 |
foreach ( $this->necessary_packages as $package ) {
|
172 |
$hooks_file = $this->packages_dir . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR . 'hooks.php';
|
173 |
if ( file_exists( $hooks_file ) ) {
|
174 |
-
$pack_ajax_hooks =
|
175 |
|
176 |
foreach ( $pack_ajax_hooks as $action => $function ) {
|
177 |
add_action( 'wp_ajax_um_' . $action, "um_upgrade_$function" );
|
@@ -188,7 +122,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
|
188 |
foreach ( $this->necessary_packages as $package ) {
|
189 |
$handlers_file = $this->packages_dir . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR . 'functions.php';
|
190 |
if ( file_exists( $handlers_file ) ) {
|
191 |
-
|
192 |
}
|
193 |
}
|
194 |
}
|
@@ -318,7 +252,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
|
318 |
exit('');
|
319 |
} else {
|
320 |
ob_start();
|
321 |
-
|
322 |
ob_get_flush();
|
323 |
exit;
|
324 |
}
|
17 |
class Admin_Upgrade {
|
18 |
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* @var
|
22 |
*/
|
31 |
var $packages_dir;
|
32 |
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* Admin_Upgrade constructor.
|
36 |
*/
|
39 |
$this->necessary_packages = $this->need_run_upgrades();
|
40 |
|
41 |
if ( ! empty( $this->necessary_packages ) ) {
|
42 |
+
$this->init_packages_ajax();
|
43 |
add_action( 'admin_menu', array( $this, 'admin_menu' ), 0 );
|
44 |
|
45 |
+
add_action( 'wp_ajax_um_run_package', array( $this, 'ajax_run_package' ) );
|
46 |
+
add_action( 'wp_ajax_um_get_packages', array( $this, 'ajax_get_packages' ) );
|
|
|
|
|
|
|
|
|
47 |
}
|
|
|
|
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
/**
|
52 |
* Get array of necessary upgrade packages
|
105 |
foreach ( $this->necessary_packages as $package ) {
|
106 |
$hooks_file = $this->packages_dir . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR . 'hooks.php';
|
107 |
if ( file_exists( $hooks_file ) ) {
|
108 |
+
$pack_ajax_hooks = include $hooks_file;
|
109 |
|
110 |
foreach ( $pack_ajax_hooks as $action => $function ) {
|
111 |
add_action( 'wp_ajax_um_' . $action, "um_upgrade_$function" );
|
122 |
foreach ( $this->necessary_packages as $package ) {
|
123 |
$handlers_file = $this->packages_dir . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR . 'functions.php';
|
124 |
if ( file_exists( $handlers_file ) ) {
|
125 |
+
include $handlers_file;
|
126 |
}
|
127 |
}
|
128 |
}
|
252 |
exit('');
|
253 |
} else {
|
254 |
ob_start();
|
255 |
+
include $this->packages_dir . DIRECTORY_SEPARATOR . $_POST['pack'] . DIRECTORY_SEPARATOR . 'init.php';
|
256 |
ob_get_flush();
|
257 |
exit;
|
258 |
}
|
includes/admin/core/class-admin-users.php
CHANGED
@@ -44,6 +44,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Users' ) ) {
|
|
44 |
*/
|
45 |
function user_action_hook( $action ) {
|
46 |
switch ( $action ) {
|
|
|
47 |
default:
|
48 |
/**
|
49 |
* UM hook
|
@@ -73,7 +74,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Users' ) ) {
|
|
73 |
|
74 |
case 'um_approve_membership':
|
75 |
case 'um_reenable':
|
76 |
-
|
77 |
UM()->user()->approve();
|
78 |
break;
|
79 |
|
@@ -362,6 +362,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Users' ) ) {
|
|
362 |
* Bulk user editing actions
|
363 |
*/
|
364 |
function um_bulk_users_edit() {
|
|
|
|
|
365 |
// bulk edit users
|
366 |
if ( ! empty( $_REQUEST['users'] ) && ! empty( $_REQUEST['um_bulkedit'] ) && ! empty( $_REQUEST['um_bulk_action'] ) ) {
|
367 |
|
@@ -375,61 +377,66 @@ if ( ! class_exists( 'um\admin\core\Admin_Users' ) ) {
|
|
375 |
|
376 |
foreach ( $users as $user_id ) {
|
377 |
UM()->user()->set( $user_id );
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
|
|
|
|
|
|
|
|
|
|
418 |
}
|
419 |
|
420 |
// Finished. redirect now
|
421 |
-
|
422 |
|
423 |
-
|
424 |
-
|
425 |
|
426 |
-
|
427 |
-
exit;
|
428 |
|
429 |
-
|
|
|
430 |
wp_redirect( admin_url( 'users.php?update=err_users_updated' ) );
|
431 |
exit;
|
432 |
-
}
|
433 |
|
434 |
} else if ( ! empty( $_REQUEST['um_bulkedit'] ) ) {
|
435 |
|
44 |
*/
|
45 |
function user_action_hook( $action ) {
|
46 |
switch ( $action ) {
|
47 |
+
|
48 |
default:
|
49 |
/**
|
50 |
* UM hook
|
74 |
|
75 |
case 'um_approve_membership':
|
76 |
case 'um_reenable':
|
|
|
77 |
UM()->user()->approve();
|
78 |
break;
|
79 |
|
362 |
* Bulk user editing actions
|
363 |
*/
|
364 |
function um_bulk_users_edit() {
|
365 |
+
$admin_err = 0;
|
366 |
+
|
367 |
// bulk edit users
|
368 |
if ( ! empty( $_REQUEST['users'] ) && ! empty( $_REQUEST['um_bulkedit'] ) && ! empty( $_REQUEST['um_bulk_action'] ) ) {
|
369 |
|
377 |
|
378 |
foreach ( $users as $user_id ) {
|
379 |
UM()->user()->set( $user_id );
|
380 |
+
if ( ! um_user( 'super_admin' ) ) {
|
381 |
+
|
382 |
+
/**
|
383 |
+
* UM hook
|
384 |
+
*
|
385 |
+
* @type action
|
386 |
+
* @title um_admin_user_action_hook
|
387 |
+
* @description Action on bulk user action
|
388 |
+
* @input_vars
|
389 |
+
* [{"var":"$bulk_action","type":"string","desc":"Bulk Action"}]
|
390 |
+
* @change_log
|
391 |
+
* ["Since: 2.0"]
|
392 |
+
* @usage add_action( 'um_admin_user_action_hook{$action}', 'function_name', 10, 1 );
|
393 |
+
* @example
|
394 |
+
* <?php
|
395 |
+
* add_action( 'um_admin_user_action_hook', 'my_admin_user_action', 10, 1 );
|
396 |
+
* function my_admin_user_action( $bulk_action ) {
|
397 |
+
* // your code here
|
398 |
+
* }
|
399 |
+
* ?>
|
400 |
+
*/
|
401 |
+
do_action( "um_admin_user_action_hook", $bulk_action );
|
402 |
+
|
403 |
+
/**
|
404 |
+
* UM hook
|
405 |
+
*
|
406 |
+
* @type action
|
407 |
+
* @title um_admin_user_action_{$bulk_action}_hook
|
408 |
+
* @description Action on bulk user action
|
409 |
+
* @change_log
|
410 |
+
* ["Since: 2.0"]
|
411 |
+
* @usage add_action( 'um_admin_user_action_{$bulk_action}_hook', 'function_name', 10 );
|
412 |
+
* @example
|
413 |
+
* <?php
|
414 |
+
* add_action( 'um_admin_user_action_{$bulk_action}_hook', 'my_admin_user_action', 10 );
|
415 |
+
* function my_admin_user_action() {
|
416 |
+
* // your code here
|
417 |
+
* }
|
418 |
+
* ?>
|
419 |
+
*/
|
420 |
+
do_action( "um_admin_user_action_{$bulk_action}_hook" );
|
421 |
+
|
422 |
+
} else {
|
423 |
+
$admin_err = 1;
|
424 |
+
}
|
425 |
}
|
426 |
|
427 |
// Finished. redirect now
|
428 |
+
if ( $admin_err == 0 ) {
|
429 |
|
430 |
+
$uri = $this->set_redirect_uri( admin_url( 'users.php' ) );
|
431 |
+
$uri = add_query_arg( 'update', 'users_updated', $uri );
|
432 |
|
433 |
+
wp_redirect( $uri );
|
|
|
434 |
|
435 |
+
exit;
|
436 |
+
} else {
|
437 |
wp_redirect( admin_url( 'users.php?update=err_users_updated' ) );
|
438 |
exit;
|
439 |
+
}
|
440 |
|
441 |
} else if ( ! empty( $_REQUEST['um_bulkedit'] ) ) {
|
442 |
|
includes/admin/core/packages/2.0-beta1/email_templates.php
CHANGED
@@ -25,8 +25,8 @@ foreach ( $emails as $email_key => $value ) {
|
|
25 |
} else {
|
26 |
$setting_value = UM()->options()->get( $email_key );
|
27 |
|
28 |
-
$fp =
|
29 |
-
$result =
|
30 |
fclose( $fp );
|
31 |
}
|
32 |
} else {
|
25 |
} else {
|
26 |
$setting_value = UM()->options()->get( $email_key );
|
27 |
|
28 |
+
$fp = fopen( $theme_template_path, "w" );
|
29 |
+
$result = fputs( $fp, $setting_value );
|
30 |
fclose( $fp );
|
31 |
}
|
32 |
} else {
|
includes/admin/core/packages/2.0-beta1/menus.php
CHANGED
@@ -18,15 +18,9 @@ $menus = get_posts( array(
|
|
18 |
foreach ( $menus as $menu ) {
|
19 |
$menu_roles = get_post_meta( $menu->ID, 'menu-item-um_nav_roles', true );
|
20 |
|
21 |
-
if( !is_array( $menu_roles ) ) {
|
22 |
-
$menu_roles = array();
|
23 |
-
}
|
24 |
foreach ( $menu_roles as $i => $role_k ) {
|
25 |
-
|
26 |
-
$menu_roles[ $i ] = $roles_associations[ $role_k ];
|
27 |
-
}
|
28 |
}
|
29 |
|
30 |
-
|
31 |
update_post_meta( $menu->ID, 'menu-item-um_nav_roles', $menu_roles );
|
32 |
}
|
18 |
foreach ( $menus as $menu ) {
|
19 |
$menu_roles = get_post_meta( $menu->ID, 'menu-item-um_nav_roles', true );
|
20 |
|
|
|
|
|
|
|
21 |
foreach ( $menu_roles as $i => $role_k ) {
|
22 |
+
$menu_roles[ $i ] = $roles_associations[ $role_k ];
|
|
|
|
|
23 |
}
|
24 |
|
|
|
25 |
update_post_meta( $menu->ID, 'menu-item-um_nav_roles', $menu_roles );
|
26 |
}
|
includes/admin/core/packages/2.0.10/functions.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
function um_upgrade_styles2010() {
|
3 |
-
um_maybe_unset_time_limit();
|
4 |
-
|
5 |
-
include 'styles.php';
|
6 |
-
wp_send_json_success( array( 'message' => __( 'Styles was upgraded successfully', 'ultimate-member' ) ) );
|
7 |
-
}
|
8 |
-
|
9 |
-
|
10 |
-
function um_upgrade_cache2010() {
|
11 |
-
um_maybe_unset_time_limit();
|
12 |
-
|
13 |
-
UM()->user()->remove_cache_all_users();
|
14 |
-
|
15 |
-
update_option( 'um_last_version_upgrade', '2.0.10' );
|
16 |
-
|
17 |
-
wp_send_json_success( array( 'message' => __( 'Users cache was cleared successfully', 'ultimate-member' ) ) );
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/core/packages/2.0.10/hooks.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
return array(
|
4 |
-
'styles2010' => 'styles2010',
|
5 |
-
'cache2010' => 'cache2010',
|
6 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/core/packages/2.0.10/init.php
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
<?php ?>
|
2 |
-
|
3 |
-
<script type="text/javascript">
|
4 |
-
jQuery( document ).ready( function() {
|
5 |
-
//upgrade styles
|
6 |
-
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Styles...', 'ultimate-member' ) ) ?>' );
|
7 |
-
|
8 |
-
jQuery.ajax({
|
9 |
-
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
10 |
-
type: 'POST',
|
11 |
-
dataType: 'json',
|
12 |
-
data: {
|
13 |
-
action: 'um_styles2010'
|
14 |
-
},
|
15 |
-
success: function( response ) {
|
16 |
-
if ( typeof response.data != 'undefined' ) {
|
17 |
-
um_add_upgrade_log( response.data.message );
|
18 |
-
um_clear_cache2010();
|
19 |
-
} else {
|
20 |
-
um_wrong_ajax();
|
21 |
-
}
|
22 |
-
},
|
23 |
-
error: function() {
|
24 |
-
um_something_wrong();
|
25 |
-
}
|
26 |
-
});
|
27 |
-
|
28 |
-
|
29 |
-
//clear users cache
|
30 |
-
function um_clear_cache2010() {
|
31 |
-
um_add_upgrade_log( '<?php echo esc_js( __( 'Clear Users Cache...', 'ultimate-member' ) ) ?>' );
|
32 |
-
jQuery.ajax({
|
33 |
-
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
34 |
-
type: 'POST',
|
35 |
-
dataType: 'json',
|
36 |
-
data: {
|
37 |
-
action: 'um_cache2010'
|
38 |
-
},
|
39 |
-
success: function( response ) {
|
40 |
-
if ( typeof response.data != 'undefined' ) {
|
41 |
-
um_add_upgrade_log( response.data.message );
|
42 |
-
//switch to the next package
|
43 |
-
um_run_upgrade();
|
44 |
-
} else {
|
45 |
-
um_wrong_ajax();
|
46 |
-
}
|
47 |
-
},
|
48 |
-
error: function() {
|
49 |
-
um_something_wrong();
|
50 |
-
}
|
51 |
-
});
|
52 |
-
}
|
53 |
-
});
|
54 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/core/packages/2.0.10/styles.php
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$css = '';
|
4 |
-
$custom_css = UM()->options()->get( 'custom_css' );
|
5 |
-
$enable_css = UM()->options()->get( 'enable_custom_css' );
|
6 |
-
|
7 |
-
if ( ! empty( $enable_css ) && ! empty( $custom_css ) ) {
|
8 |
-
$css .= $custom_css;
|
9 |
-
}
|
10 |
-
|
11 |
-
$forms_query = new WP_Query;
|
12 |
-
$registration_forms = $forms_query->query( array(
|
13 |
-
'post_type' => 'um_form',
|
14 |
-
'meta_query' => array(
|
15 |
-
array(
|
16 |
-
'key' => '_um_mode',
|
17 |
-
'value' => 'register'
|
18 |
-
),
|
19 |
-
),
|
20 |
-
'posts_per_page' => -1,
|
21 |
-
'fields' => 'ids'
|
22 |
-
) );
|
23 |
-
|
24 |
-
$forms_query = new WP_Query;
|
25 |
-
$login_forms = $forms_query->query( array(
|
26 |
-
'post_type' => 'um_form',
|
27 |
-
'meta_query' => array(
|
28 |
-
array(
|
29 |
-
'key' => '_um_mode',
|
30 |
-
'value' => 'login'
|
31 |
-
)
|
32 |
-
),
|
33 |
-
'posts_per_page' => -1,
|
34 |
-
'fields' => 'ids'
|
35 |
-
) );
|
36 |
-
|
37 |
-
$forms_query = new WP_Query;
|
38 |
-
$profile_forms = $forms_query->query( array(
|
39 |
-
'post_type' => 'um_form',
|
40 |
-
'meta_query' => array(
|
41 |
-
array(
|
42 |
-
'key' => '_um_mode',
|
43 |
-
'value' => 'profile'
|
44 |
-
)
|
45 |
-
),
|
46 |
-
'posts_per_page' => -1,
|
47 |
-
'fields' => 'ids'
|
48 |
-
) );
|
49 |
-
|
50 |
-
|
51 |
-
foreach ( $registration_forms as $form_id ) {
|
52 |
-
$register_custom_css = get_post_meta( $form_id, '_um_register_custom_css', true );
|
53 |
-
if ( ! empty( $register_custom_css ) ) {
|
54 |
-
$css .= '
|
55 |
-
/* registration form ID=' . $form_id . ' */
|
56 |
-
' . $register_custom_css;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
|
61 |
-
foreach ( $login_forms as $form_id ) {
|
62 |
-
$login_custom_css = get_post_meta( $form_id, '_um_login_custom_css', true );
|
63 |
-
if ( ! empty( $login_custom_css ) ) {
|
64 |
-
$css .= '
|
65 |
-
/* login form ID=' . $form_id . ' */
|
66 |
-
' . $login_custom_css;
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
foreach ( $profile_forms as $form_id ) {
|
72 |
-
$profile_custom_css = get_post_meta( $form_id, '_um_profile_custom_css', true );
|
73 |
-
if ( ! empty( $profile_custom_css ) ) {
|
74 |
-
$css .= '
|
75 |
-
/* profile form ID=' . $form_id . ' */
|
76 |
-
' . $profile_custom_css;
|
77 |
-
}
|
78 |
-
}
|
79 |
-
|
80 |
-
|
81 |
-
if ( ! empty( $css ) ) {
|
82 |
-
$uploads = wp_upload_dir();
|
83 |
-
$upload_dir = $uploads['basedir'] . DIRECTORY_SEPARATOR . 'ultimatemember' . DIRECTORY_SEPARATOR;
|
84 |
-
if ( file_exists( $upload_dir. 'um_old_settings.css' ) ) {
|
85 |
-
$css_doc_file = fopen( $upload_dir. 'um_old_settings.css', 'a' );
|
86 |
-
fwrite( $css_doc_file, "\r\n" . $css );
|
87 |
-
fclose( $css_doc_file );
|
88 |
-
}
|
89 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/templates/dashboard/cache.php
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
-
$count =
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
8 |
|
9 |
<p><?php _e( 'Run this task from time to time to keep your DB clean.', 'ultimate-member' ) ?></p>
|
10 |
<p>
|
1 |
+
<?php $all_options = wp_load_alloptions();
|
2 |
|
3 |
+
$count = 0;
|
4 |
+
foreach ( $all_options as $k => $v ) {
|
5 |
+
if ( strstr( $k, 'um_cache_userdata_' ) !== false ) {
|
6 |
+
$count++;
|
7 |
+
}
|
8 |
+
} ?>
|
9 |
|
10 |
<p><?php _e( 'Run this task from time to time to keep your DB clean.', 'ultimate-member' ) ?></p>
|
11 |
<p>
|
includes/admin/templates/dashboard/upgrade-request.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<p><?php _e( 'Run this task from time to time if you have issues with WP Cron and need to get UM extension updates.', 'ultimate-member' ) ?></p>
|
2 |
-
<p>
|
3 |
-
<a href="<?php echo add_query_arg( 'um_adm_action', 'manual_upgrades_request' ); ?>" class="button">
|
4 |
-
<?php _e( 'Get latest versions', 'ultimate-member' ) ?>
|
5 |
-
</a>
|
6 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/templates/form/login_customize.php
CHANGED
@@ -65,7 +65,7 @@
|
|
65 |
array(
|
66 |
'id' => '_um_login_secondary_btn_word',
|
67 |
'type' => 'text',
|
68 |
-
'label' => __( '
|
69 |
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
70 |
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn_word', null, UM()->options()->get( 'login_secondary_btn_word' ) ),
|
71 |
'conditional' => array( '_um_login_secondary_btn', '=', 1 )
|
65 |
array(
|
66 |
'id' => '_um_login_secondary_btn_word',
|
67 |
'type' => 'text',
|
68 |
+
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
69 |
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
70 |
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn_word', null, UM()->options()->get( 'login_secondary_btn_word' ) ),
|
71 |
'conditional' => array( '_um_login_secondary_btn', '=', 1 )
|
includes/admin/templates/form/profile_customize.php
CHANGED
@@ -90,7 +90,7 @@
|
|
90 |
array(
|
91 |
'id' => '_um_profile_secondary_btn_word',
|
92 |
'type' => 'text',
|
93 |
-
'label' => __( '
|
94 |
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
95 |
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn_word', null, UM()->options()->get( 'profile_secondary_btn_word' ) ),
|
96 |
'conditional' => array( '_um_profile_secondary_btn', '=', 1 )
|
90 |
array(
|
91 |
'id' => '_um_profile_secondary_btn_word',
|
92 |
'type' => 'text',
|
93 |
+
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
94 |
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
95 |
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn_word', null, UM()->options()->get( 'profile_secondary_btn_word' ) ),
|
96 |
'conditional' => array( '_um_profile_secondary_btn', '=', 1 )
|
includes/admin/templates/form/register_customize.php
CHANGED
@@ -80,7 +80,7 @@
|
|
80 |
array(
|
81 |
'id' => '_um_register_secondary_btn_word',
|
82 |
'type' => 'text',
|
83 |
-
'label' => __( '
|
84 |
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
85 |
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn_word', null, UM()->options()->get( 'register_secondary_btn_word' ) ),
|
86 |
'conditional' => array( '_um_register_secondary_btn', '=', 1 )
|
80 |
array(
|
81 |
'id' => '_um_register_secondary_btn_word',
|
82 |
'type' => 'text',
|
83 |
+
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
84 |
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
85 |
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn_word', null, UM()->options()->get( 'register_secondary_btn_word' ) ),
|
86 |
'conditional' => array( '_um_register_secondary_btn', '=', 1 )
|
includes/admin/templates/form/register_gdpr.php
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
<div class="um-admin-metabox">
|
2 |
-
|
3 |
-
<?php
|
4 |
-
$options = array(
|
5 |
-
'' => __( 'Select page', 'ultimate-member' )
|
6 |
-
);
|
7 |
-
|
8 |
-
$pages = get_pages();
|
9 |
-
foreach ( $pages as $page ) {
|
10 |
-
$options[$page->ID] = $page->post_title;
|
11 |
-
}
|
12 |
-
|
13 |
-
UM()->admin_forms( array(
|
14 |
-
'class' => 'um-form-register-gdpr um-top-label',
|
15 |
-
'prefix_id' => 'form',
|
16 |
-
'fields' => array(
|
17 |
-
array(
|
18 |
-
'id' => '_um_register_use_gdpr',
|
19 |
-
'type' => 'select',
|
20 |
-
'label' => __( 'Enable on this form', 'ultimate-member' ),
|
21 |
-
'value' => UM()->query()->get_meta_value( '_um_register_use_gdpr', null, '' ),
|
22 |
-
'options' => array(
|
23 |
-
'0' => __( 'No', 'ultimate-member' ),
|
24 |
-
'1' => __( 'Yes', 'ultimate-member' )
|
25 |
-
),
|
26 |
-
),
|
27 |
-
array(
|
28 |
-
'id' => '_um_register_use_gdpr_content_id',
|
29 |
-
'type' => 'select',
|
30 |
-
'label' => __( 'Content', 'ultimate-member' ),
|
31 |
-
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_content_id', null, '' ),
|
32 |
-
'options' => $options,
|
33 |
-
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
34 |
-
),
|
35 |
-
array(
|
36 |
-
'id' => '_um_register_use_gdpr_toggle_show',
|
37 |
-
'type' => 'text',
|
38 |
-
'label' => __( 'Toggle Show text', 'ultimate-member' ),
|
39 |
-
'placeholder' => __( 'Show privacy policy', 'ultimate-member' ),
|
40 |
-
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_toggle_show', null, __( 'Show privacy policy', 'ultimate-member' ) ),
|
41 |
-
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
42 |
-
),
|
43 |
-
array(
|
44 |
-
'id' => '_um_register_use_gdpr_toggle_hide',
|
45 |
-
'type' => 'text',
|
46 |
-
'label' => __( 'Toggle Hide text', 'ultimate-member' ),
|
47 |
-
'placeholder' => __( 'Hide privacy policy', 'ultimate-member' ),
|
48 |
-
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_toggle_hide', null, __( 'Hide privacy policy', 'ultimate-member' ) ),
|
49 |
-
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
50 |
-
),
|
51 |
-
array(
|
52 |
-
'id' => '_um_register_use_gdpr_agreement',
|
53 |
-
'type' => 'text',
|
54 |
-
'label' => __( 'Checkbox agreement description', 'ultimate-member' ),
|
55 |
-
'placeholder' => __( 'Please confirm that you agree to our privacy policy', 'ultimate-member' ),
|
56 |
-
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_agreement', null, __( 'Please confirm that you agree to our privacy policy', 'ultimate-member' ) ),
|
57 |
-
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
58 |
-
),
|
59 |
-
array(
|
60 |
-
'id' => '_um_register_use_gdpr_error_text',
|
61 |
-
'type' => 'text',
|
62 |
-
'label' => __( 'Error Text', 'ultimate-member' ),
|
63 |
-
'placeholder' => __( 'Please confirm your acceptance of our privacy policy', 'ultimate-member' ),
|
64 |
-
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_error_text', null, __( 'Please confirm your acceptance of our privacy policy', 'ultimate-member' ) ),
|
65 |
-
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
66 |
-
)
|
67 |
-
)
|
68 |
-
) )->render_form(); ?>
|
69 |
-
|
70 |
-
<div class="um-admin-clear"></div>
|
71 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/templates/gdpr.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. ?>
|
2 |
-
|
3 |
-
<h2>
|
4 |
-
<?php _e( 'What personal data we collect and why we collect it', 'ultimate-member' ); ?>
|
5 |
-
</h2>
|
6 |
-
<h3>
|
7 |
-
<?php _e( 'Forms', 'ultimate-member' ); ?>
|
8 |
-
</h3>
|
9 |
-
<p>
|
10 |
-
<?php printf( __( '%s provides you with forms for user registration, login and profiles.', 'ultimate-member' ), ultimatemember_plugin_name ); ?>
|
11 |
-
</p>
|
12 |
-
<p>
|
13 |
-
<?php _e( 'Via these forms you are collecting personal data from your users.', 'ultimate-member' ); ?>
|
14 |
-
</p>
|
15 |
-
<p>
|
16 |
-
<?php _e( 'You should include in your privacy policy what personal data is captured when someone submits/fills in one of the forms, why you collect it and what you do with this data and how long you keep it.', 'ultimate-member' ); ?>
|
17 |
-
</p>
|
18 |
-
|
19 |
-
<h2>
|
20 |
-
<?php _e( 'How long we retain your data', 'ultimate-member' ); ?>
|
21 |
-
</h2>
|
22 |
-
<p>
|
23 |
-
<?php _e( 'Registered user information is retained in your website’s database indefinitely.', 'ultimate-member' ); ?>
|
24 |
-
</p>
|
25 |
-
<p>
|
26 |
-
<?php _e( 'Data can be exported or removed upon users request via the existing WordPress data exporter or eraser.', 'ultimate-member' ); ?>
|
27 |
-
</p>
|
28 |
-
<p>
|
29 |
-
<?php _e( 'If syncing data to a 3rd party service (e.g Mailchimp via our MailChimp extension), data is retained there until unsubscribed or deleted.', 'ultimate-member' ); ?>
|
30 |
-
</p>
|
31 |
-
|
32 |
-
<h2>
|
33 |
-
<?php _e( 'Where we send your data', 'ultimate-member' ); ?>
|
34 |
-
</h2>
|
35 |
-
<p>
|
36 |
-
<?php printf( __( '%s does not send any user data outside of your site by default.', 'ultimate-member' ), ultimatemember_plugin_name ); ?>
|
37 |
-
</p>
|
38 |
-
<p>
|
39 |
-
<?php _e( 'If you have extended the functionality of the plugin (e.g sending registered user data to MailChimp via our MailChimp extension, this user info may be passed to these external services. These services may be located abroad and outwith the EU.', 'ultimate-member' ); ?>
|
40 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-dependencies.php
CHANGED
@@ -57,7 +57,6 @@ if ( ! class_exists( 'um\Dependencies' ) ) {
|
|
57 |
'woocommerce' => '2.0.1',
|
58 |
'restrict-content' => '2.0',
|
59 |
'beaver-builder' => '2.0',
|
60 |
-
'gdpr' => '1.0.0',
|
61 |
);
|
62 |
|
63 |
|
57 |
'woocommerce' => '2.0.1',
|
58 |
'restrict-content' => '2.0',
|
59 |
'beaver-builder' => '2.0',
|
|
|
60 |
);
|
61 |
|
62 |
|
includes/class-init.php
CHANGED
@@ -30,7 +30,6 @@ if ( ! class_exists( 'UM' ) ) {
|
|
30 |
* @method UM_Terms_Conditions_API Terms_Conditions_API()
|
31 |
* @method UM_Private_Content_API Private_Content_API()
|
32 |
* @method UM_User_Location_API User_Location_API()
|
33 |
-
* @method UM_GDPR_API GDPR_API()
|
34 |
*
|
35 |
*/
|
36 |
final class UM extends UM_Functions {
|
@@ -386,6 +385,47 @@ if ( ! class_exists( 'UM' ) ) {
|
|
386 |
}
|
387 |
|
388 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|