Merge pull request #1379 from ultimatemember/development/2.8.x

Version 2.8.1
This commit is contained in:
Mykyta Synelnikov
2023-12-20 22:39:39 +02:00
committed by GitHub
17 changed files with 176 additions and 125 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ GNU Version 2 or Any Later Version
### IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSION 2.6.7 PATCHES SECURITY PRIVILEGE ESCALATION VULNERABILITY. PLEASE SEE [THIS ARTICLE](https://docs.ultimatemember.com/article/1866-security-incident-update-and-recommended-actions) FOR MORE INFORMATION
[Official Release Version: 2.8.0](https://github.com/ultimatemember/ultimatemember/releases/tag/2.8.0).
[Official Release Version: 2.8.1](https://github.com/ultimatemember/ultimatemember/releases/tag/2.8.1).
## Changelog
+6
View File
@@ -191,3 +191,9 @@ th.column-email.column-primary {
.um_setting_ajax_button_response.complete {
color: #7acf58;
font-style: italic; }
.wp-core-ui .button.um_license_activate, .wp-core-ui .button.um_license_deactivate, .wp-core-ui .button.um_license_reactivate {
margin-top: 5px; }
.um-media-upload .um-media-upload-url {
margin-bottom: 5px; }
+1 -1
View File
@@ -1 +1 @@
#um-settings-wrap .subsubsub{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;flex-wrap:wrap;margin-left:-3px;margin-right:-3px}#um-settings-wrap .subsubsub a{margin:0 3px}.um-settings-section .description{font-style:italic}.um-notification-status{margin-right:18px;font-size:28px;line-height:22px;color:#c74a4a;float:left;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.um-notification-status.um-notification-is-active{color:#7acf58}.um-email-configure span{line-height:24px}.um-long-field{width:100%}.um-medium-field{width:50%}.um-small-field{width:25%}.column-configure{width:60px;text-align:center}th.column-email.column-primary{padding-left:48px}.um-form-table .um-forms-line td{padding-right:0}#um-settings-template-versions .wp-list-table .column-core_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-theme_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-status{width:260px}#um-settings-form{float:left;width:100%;margin:0}#um-settings-form .subsubsub{float:left;width:100%}.um-settings-line .multi-checkbox-line{float:left;width:100%;clear:both;margin:0 0 10px 0;padding:0}.um-settings-line .multi-checkbox-column{float:left;margin:0;padding:0}.um-settings-line .multi-checkbox-column label{float:left;width:100%}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:240px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-expired a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-valid{background-color:#5abc55;color:#fff;border-color:#5abc55}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses~p.submit{clear:both}@media screen and (max-width:980px){.wrap-licenses .form-table tr{width:calc(50% - 15px);max-width:none}}@media screen and (max-width:782px){#um-settings-template-versions .wp-list-table .column-core_version,#um-settings-template-versions .wp-list-table .column-theme_version{width:auto;text-align:left}.wrap-licenses .form-table tr{width:100%;margin-right:0;max-width:none}.um-settings-line .multi-checkbox-column{width:100%!important}.um-settings-line .multi-checkbox-column label{line-height:30px!important}.um-medium-field{width:100%}.um-small-field{width:50%}}.um_setting_ajax_button_response.complete{color:#7acf58;font-style:italic}
#um-settings-wrap .subsubsub{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;flex-wrap:wrap;margin-left:-3px;margin-right:-3px}#um-settings-wrap .subsubsub a{margin:0 3px}.um-settings-section .description{font-style:italic}.um-notification-status{margin-right:18px;font-size:28px;line-height:22px;color:#c74a4a;float:left;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.um-notification-status.um-notification-is-active{color:#7acf58}.um-email-configure span{line-height:24px}.um-long-field{width:100%}.um-medium-field{width:50%}.um-small-field{width:25%}.column-configure{width:60px;text-align:center}th.column-email.column-primary{padding-left:48px}.um-form-table .um-forms-line td{padding-right:0}#um-settings-template-versions .wp-list-table .column-core_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-theme_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-status{width:260px}#um-settings-form{float:left;width:100%;margin:0}#um-settings-form .subsubsub{float:left;width:100%}.um-settings-line .multi-checkbox-line{float:left;width:100%;clear:both;margin:0 0 10px 0;padding:0}.um-settings-line .multi-checkbox-column{float:left;margin:0;padding:0}.um-settings-line .multi-checkbox-column label{float:left;width:100%}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:240px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-expired a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-valid{background-color:#5abc55;color:#fff;border-color:#5abc55}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses~p.submit{clear:both}@media screen and (max-width:980px){.wrap-licenses .form-table tr{width:calc(50% - 15px);max-width:none}}@media screen and (max-width:782px){#um-settings-template-versions .wp-list-table .column-core_version,#um-settings-template-versions .wp-list-table .column-theme_version{width:auto;text-align:left}.wrap-licenses .form-table tr{width:100%;margin-right:0;max-width:none}.um-settings-line .multi-checkbox-column{width:100%!important}.um-settings-line .multi-checkbox-column label{line-height:30px!important}.um-medium-field{width:100%}.um-small-field{width:50%}}.um_setting_ajax_button_response.complete{color:#7acf58;font-style:italic}.wp-core-ui .button.um_license_activate,.wp-core-ui .button.um_license_deactivate,.wp-core-ui .button.um_license_reactivate{margin-top:5px}.um-media-upload .um-media-upload-url{margin-bottom:5px}
+12
View File
@@ -210,3 +210,15 @@ th.column-email.column-primary
.um_setting_ajax_button_response.complete
color: #{$admin-ok}
font-style: italic
.wp-core-ui
.button
&.um_license_activate,
&.um_license_deactivate,
&.um_license_reactivate
margin-top: 5px
.#{$prefix}media-upload
.#{$prefix}media-upload-url
margin-bottom: 5px
+1 -1
View File
@@ -112,7 +112,7 @@ jQuery(document).ready(function() {
mode = $formWrapper.attr('data-mode');
}
if ( jQuery('.cropper-hidden').length > 0 ) {
if ( jQuery('.cropper-hidden').length > 0 && UM.frontend.cropper.obj ) {
var data = UM.frontend.cropper.obj.getData();
var coord = Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height);
+1 -1
View File
@@ -1 +1 @@
jQuery(document).ready(function(){jQuery(document).on("click",".um-popup-overlay",function(){remove_Modal()}),jQuery(document).on("click",'.um-modal-overlay, a[data-action="um_remove_modal"]',function(){um_remove_modal()}),jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"], .um-modal:not(:has(.um-form)) a',function(e){return e.preventDefault(),!1}),jQuery(document).on("click",".um-finish-upload.file:not(.disabled)",function(){var e=jQuery(this).attr("data-key"),a=jQuery(this).parents(".um-modal-body").find(".um-single-file-preview").html(),a=(um_remove_modal(),jQuery(".um-single-file-preview[data-key="+e+"]").fadeIn().html(a),jQuery(".um-field[data-key="+e+"]").find(".um-single-fileinfo a").data("file"));jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find(".um-btn-auto-width").html(jQuery(this).attr("data-change")),jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find('input[type="hidden"]').val(a)}),jQuery(document).on("click",".um-finish-upload.image:not(.disabled)",function(){var a,e,t=jQuery(this),i=jQuery(this).attr("data-key"),r=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview"),u=r.find("img").attr("src"),r=r.find("img").data("file"),d=0,m=(jQuery(this).parents("#um_upload_single").data("user_id")&&(d=jQuery(this).parents("#um_upload_single").data("user_id")),0),n="";1===jQuery('div.um-field-image[data-key="'+i+'"]').length&&(m=(e=jQuery('div.um-field-image[data-key="'+i+'"]').closest(".um-form")).find('input[name="form_id"]').val(),n=e.attr("data-mode")),0<jQuery(".cropper-hidden").length?(e=UM.frontend.cropper.obj.getData(),e=Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height),jQuery(this).html(jQuery(this).attr("data-processing")).addClass("disabled"),jQuery.ajax({url:wp.ajax.settings.url,type:"POST",dataType:"json",data:{action:"um_resize_image",src:u,coord:e,user_id:d,key:i,set_id:m,set_mode:n,nonce:um_scripts.nonce},success:function(e){e.success&&(a=new Date,"profile_photo"===i?jQuery(".um-profile-photo-img img").attr("src",e.data.image.source_url+"?"+a.getTime()):"cover_photo"===i&&(jQuery(".um-cover-e").empty().html('<img src="'+e.data.image.source_url+"?"+a.getTime()+'" alt="" />'),jQuery(".um").hasClass("um-editing"))&&jQuery(".um-cover-overlay").show(),jQuery(".um-single-image-preview[data-key="+i+"]").fadeIn().find("img").attr("src",e.data.image.source_url+"?"+a.getTime()),um_remove_modal(),jQuery("img.cropper-invisible").remove(),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find(".um-btn-auto-width").html(t.attr("data-change")),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find('input[type="hidden"]').val(e.data.image.filename))}})):(a=new Date,jQuery(".um-single-image-preview[data-key="+i+"]").fadeIn().find("img").attr("src",u+"?"+a.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find(".um-btn-auto-width").html(t.attr("data-change")),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find("input[type=hidden]").val(r))}),jQuery(document.body).on("click",'a[data-modal^="um_"], span[data-modal^="um_"]',function(e){var a=jQuery(this).attr("data-modal"),t="normal";jQuery(this).data("modal-size")&&(t=jQuery(this).data("modal-size")),jQuery(this).data("modal-copy")&&(jQuery("#"+a).html(jQuery(this).parents(".um-field").find(".um-modal-hidden-content").html()),jQuery(this).parents(".um-profile-photo").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-profile-photo").attr("data-user_id")),jQuery(this).parents(".um-cover").attr("data-ratio")&&jQuery("#"+a).attr("data-ratio",jQuery(this).parents(".um-cover").attr("data-ratio")),jQuery(this).parents(".um-cover").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-cover").attr("data-user_id")),0<jQuery('input[type="hidden"][name="user_id"]').length)&&jQuery("#"+a).attr("data-user_id",jQuery('input[type="hidden"][name="user_id"]').val()),um_new_modal(a,t)})});
jQuery(document).ready(function(){jQuery(document).on("click",".um-popup-overlay",function(){remove_Modal()}),jQuery(document).on("click",'.um-modal-overlay, a[data-action="um_remove_modal"]',function(){um_remove_modal()}),jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"], .um-modal:not(:has(.um-form)) a',function(e){return e.preventDefault(),!1}),jQuery(document).on("click",".um-finish-upload.file:not(.disabled)",function(){var e=jQuery(this).attr("data-key"),a=jQuery(this).parents(".um-modal-body").find(".um-single-file-preview").html(),a=(um_remove_modal(),jQuery(".um-single-file-preview[data-key="+e+"]").fadeIn().html(a),jQuery(".um-field[data-key="+e+"]").find(".um-single-fileinfo a").data("file"));jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find(".um-btn-auto-width").html(jQuery(this).attr("data-change")),jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find('input[type="hidden"]').val(a)}),jQuery(document).on("click",".um-finish-upload.image:not(.disabled)",function(){var a,e,t=jQuery(this),i=jQuery(this).attr("data-key"),r=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview"),u=r.find("img").attr("src"),r=r.find("img").data("file"),d=0,m=(jQuery(this).parents("#um_upload_single").data("user_id")&&(d=jQuery(this).parents("#um_upload_single").data("user_id")),0),n="";1===jQuery('div.um-field-image[data-key="'+i+'"]').length&&(m=(e=jQuery('div.um-field-image[data-key="'+i+'"]').closest(".um-form")).find('input[name="form_id"]').val(),n=e.attr("data-mode")),0<jQuery(".cropper-hidden").length&&UM.frontend.cropper.obj?(e=UM.frontend.cropper.obj.getData(),e=Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height),jQuery(this).html(jQuery(this).attr("data-processing")).addClass("disabled"),jQuery.ajax({url:wp.ajax.settings.url,type:"POST",dataType:"json",data:{action:"um_resize_image",src:u,coord:e,user_id:d,key:i,set_id:m,set_mode:n,nonce:um_scripts.nonce},success:function(e){e.success&&(a=new Date,"profile_photo"===i?jQuery(".um-profile-photo-img img").attr("src",e.data.image.source_url+"?"+a.getTime()):"cover_photo"===i&&(jQuery(".um-cover-e").empty().html('<img src="'+e.data.image.source_url+"?"+a.getTime()+'" alt="" />'),jQuery(".um").hasClass("um-editing"))&&jQuery(".um-cover-overlay").show(),jQuery(".um-single-image-preview[data-key="+i+"]").fadeIn().find("img").attr("src",e.data.image.source_url+"?"+a.getTime()),um_remove_modal(),jQuery("img.cropper-invisible").remove(),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find(".um-btn-auto-width").html(t.attr("data-change")),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find('input[type="hidden"]').val(e.data.image.filename))}})):(a=new Date,jQuery(".um-single-image-preview[data-key="+i+"]").fadeIn().find("img").attr("src",u+"?"+a.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find(".um-btn-auto-width").html(t.attr("data-change")),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find("input[type=hidden]").val(r))}),jQuery(document.body).on("click",'a[data-modal^="um_"], span[data-modal^="um_"]',function(e){var a=jQuery(this).attr("data-modal"),t="normal";jQuery(this).data("modal-size")&&(t=jQuery(this).data("modal-size")),jQuery(this).data("modal-copy")&&(jQuery("#"+a).html(jQuery(this).parents(".um-field").find(".um-modal-hidden-content").html()),jQuery(this).parents(".um-profile-photo").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-profile-photo").attr("data-user_id")),jQuery(this).parents(".um-cover").attr("data-ratio")&&jQuery("#"+a).attr("data-ratio",jQuery(this).parents(".um-cover").attr("data-ratio")),jQuery(this).parents(".um-cover").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-cover").attr("data-user_id")),0<jQuery('input[type="hidden"][name="user_id"]').length)&&jQuery("#"+a).attr("data-user_id",jQuery('input[type="hidden"][name="user_id"]').val()),um_new_modal(a,t)})});
+1 -1
View File
@@ -1796,7 +1796,7 @@ class Site_Health {
'role_radio' => __( 'Roles (Radio)', 'ultimate-member' ),
'whatsapp' => __( 'WhatsApp number', 'ultimate-member' ),
'facebook' => __( 'Facebook', 'ultimate-member' ),
'twitter' => __( 'Twitter', 'ultimate-member' ),
'twitter' => __( 'X (formerly Twitter)', 'ultimate-member' ),
'viber' => __( 'Viber number', 'ultimate-member' ),
'skype' => __( 'Skype ID', 'ultimate-member' ),
'telegram' => __( 'Telegram', 'ultimate-member' ),
+12 -5
View File
@@ -1368,13 +1368,20 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
$upload_frame_title = ! empty( $field_data['upload_frame_title'] ) ? $field_data['upload_frame_title'] : __( 'Select media', 'ultimate-member' );
$image_id = ! empty( $value['id'] ) ? $value['id'] : '';
$image_width = ! empty( $value['width'] ) ? $value['width'] : '';
$image_height = ! empty( $value['height'] ) ? $value['height'] : '';
$image_id = ! empty( $value['id'] ) ? $value['id'] : '';
$image_width = ! empty( $value['width'] ) ? $value['width'] : '';
$image_height = ! empty( $value['height'] ) ? $value['height'] : '';
$image_thumbnail = ! empty( $value['thumbnail'] ) ? $value['thumbnail'] : '';
$image_url = ! empty( $value['url'] ) ? $value['url'] : '';
$image_url = ! empty( $value['url'] ) ? $value['url'] : '';
$html = "<div class=\"um-media-upload\">" .
$wrapper_classes = array();
if ( ! isset( $field_data['preview'] ) || false !== $field_data['preview'] ) {
$wrapper_classes[] = 'um-media-preview-enabled';
}
$wrapper_classes = implode( ' ', $wrapper_classes );
$wrapper_classes = ! empty( $wrapper_classes ) ? ' ' . $wrapper_classes : '';
$html = '<div class="um-media-upload' . $wrapper_classes . '">' .
"<input type=\"hidden\" class=\"um-media-upload-data-id\" name=\"{$name}[id]\" id=\"{$id}_id\" value=\"$image_id\">" .
"<input type=\"hidden\" class=\"um-media-upload-data-width\" name=\"{$name}[width]\" id=\"{$id}_width\" value=\"$image_width\">" .
"<input type=\"hidden\" class=\"um-media-upload-data-height\" name=\"{$name}[height]\" id=\"{$id}_height\" value=\"$image_height\">" .
+8 -6
View File
@@ -640,17 +640,19 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
$url = add_query_arg( array( 'page' => 'um_upgrade' ), admin_url( 'admin.php' ) );
ob_start(); ?>
ob_start();
?>
<p>
<?php
// translators: %1$s is a plugin name; %2$s is a plugin version; %3$s is a plugin name; %4$s is a plugin version; %5$s is a upgrade link.
echo wp_kses( sprintf( __( '<strong>%1$s version %2$s</strong> needs to be updated to work correctly.<br />It is necessary to update the structure of the database and options that are associated with <strong>%3$s %4$s</strong>.<br />Please visit <a href="%5$s">"Upgrade"</a> page and run the upgrade process.', 'ultimate-member' ), UM_PLUGIN_NAME, UM_VERSION, UM_PLUGIN_NAME, UM_VERSION, $url ), UM()->get_allowed_html( 'admin_notice' ) );
?>
<strong><?php echo esc_html( UM_PLUGIN_NAME . ' ' . UM_VERSION . ' ' . __( 'version needs to be updated to work correctly.', 'ultimate-member' ) ); ?></strong>
<br />
<?php esc_html_e( 'It is necessary to update the structure of the database and options that are associated with current version', 'ultimate-member' ); ?>
<br />
<?php esc_html_e( 'Please run the upgrade process on this ', 'ultimate-member' ); ?><a href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'page', 'ultimate-member' ); ?></a>
</p>
<p>
<a href="<?php echo esc_url( $url ) ?>" class="button button-primary"><?php _e( 'Visit Upgrade Page', 'ultimate-member' ) ?></a>
<a href="<?php echo esc_url( $url ) ?>" class="button button-primary"><?php esc_html_e( 'Visit Upgrade Page', 'ultimate-member' ); ?></a>
&nbsp;
</p>
+31 -18
View File
@@ -2754,7 +2754,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
<input type="hidden" name="__umnonce" value="<?php echo esc_attr( $um_settings_nonce ); ?>" />
<table class="form-table um-settings-section">
<tbody>
<?php foreach ( $section_fields as $field_data ) {
<?php
foreach ( $section_fields as $field_data ) {
$option_value = UM()->options()->get( $field_data['id'] );
$value = isset( $option_value ) && ! empty( $option_value ) ? $option_value : ( isset( $field_data['default'] ) ? $field_data['default'] : '' );
@@ -2985,27 +2986,39 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
<input type="hidden" name="licenses_settings" value="1" />
<?php $um_settings_nonce = wp_create_nonce( 'um-settings-nonce' ); ?>
<input type="hidden" name="__umnonce" value="<?php echo esc_attr( $um_settings_nonce ); ?>" />
<input type="text" id="um_options_<?php echo esc_attr( $field_data['id'] ); ?>" name="um_options[<?php echo esc_attr( $field_data['id'] ); ?>]" value="<?php echo $value ?>" class="um-option-field um-long-field" data-field_id="<?php echo esc_attr( $field_data['id'] ); ?>" />
<?php if ( ! empty( $field_data['description'] ) ) { ?>
<div class="description"><?php echo $field_data['description']; ?></div>
<?php } ?>
<input type="text" id="um_options_<?php echo esc_attr( $field_data['id'] ); ?>" name="um_options[<?php echo esc_attr( $field_data['id'] ); ?>]" value="<?php echo esc_attr( $value ); ?>" class="um-option-field um-long-field" data-field_id="<?php echo esc_attr( $field_data['id'] ); ?>" />
<?php
if ( ! empty( $field_data['description'] ) ) {
?>
<div class="description"><?php echo esc_html( $field_data['description'] ); ?></div>
<?php
}
<?php if ( ! empty( $value ) && ( ( is_object( $license ) && 'valid' === $license->license ) || 'valid' === $license ) ) { ?>
<input type="button" class="button um_license_deactivate" id="<?php echo esc_attr( $field_data['id'] ) ?>_deactivate" value="<?php esc_attr_e( 'Clear License', 'ultimate-member' ) ?>"/>
<?php } elseif ( empty( $value ) ) { ?>
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e( 'Activate', 'ultimate-member' ) ?>" />
<?php } else { ?>
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e( 'Re-Activate', 'ultimate-member' ) ?>" />
<input type="button" class="button um_license_deactivate" id="<?php echo esc_attr( $field_data['id'] ) ?>_deactivate" value="<?php esc_attr_e( 'Clear License', 'ultimate-member' ) ?>"/>
<?php }
if ( ! empty( $value ) && ( ( is_object( $license ) && 'valid' === $license->license ) || 'valid' === $license ) ) {
?>
<input type="button" class="button um_license_deactivate" id="<?php echo esc_attr( $field_data['id'] ); ?>_deactivate" value="<?php esc_attr_e( 'Clear License', 'ultimate-member' ); ?>"/>
<?php
} elseif ( empty( $value ) ) {
?>
<input type="submit" name="submit" id="submit" class="button button-primary um_license_activate" value="<?php esc_attr_e( 'Activate', 'ultimate-member' ); ?>" />
<?php
} else {
?>
<input type="submit" name="submit" id="submit" class="button button-primary um_license_reactivate" value="<?php esc_attr_e( 'Re-Activate', 'ultimate-member' ); ?>" />
<input type="button" class="button um_license_deactivate" id="<?php echo esc_attr( $field_data['id'] ); ?>_deactivate" value="<?php esc_attr_e( 'Clear License', 'ultimate-member' ); ?>"/>
<?php
}
if ( ! empty( $messages ) ) {
foreach ( $messages as $message ) { ?>
<div class="edd-license-data edd-license-<?php echo esc_attr( $class . ' ' . $license_status ) ?>">
<p><?php echo $message ?></p>
foreach ( $messages as $message ) {
?>
<div class="edd-license-data edd-license-<?php echo esc_attr( $class . ' ' . $license_status ); ?>">
<p><?php echo wp_kses( $message, UM()->get_allowed_html( 'admin_notice' ) ); ?></p>
</div>
<?php }
} ?>
<?php
}
}
?>
</form>
</td>
</tr>
+1 -1
View File
@@ -77,7 +77,7 @@ $premium['social-login'] = array(
'url' => 'https://ultimatemember.com/extensions/social-login/',
'img' => 'social-login.svg',
'name' => 'Social Login',
'desc' => 'Let users register & login to your site via Facebook, Twitter, G+, LinkedIn, and more',
'desc' => 'Let users register & login to your site via Facebook, X (formerly Twitter), G+, LinkedIn, and more',
);
$premium['user-tags'] = array(
+18
View File
@@ -76,6 +76,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
// check the site's accessible more priority have Individual Post/Term Restriction settings
add_action( 'template_redirect', array( &$this, 'template_redirect' ), 1000 );
add_action( 'template_redirect', array( &$this, 'send_frame_options_header' ), 1010 );
add_action( 'um_access_check_blog_page_settings', array( &$this, 'um_access_check_blog_page_settings' ) );
add_action( 'um_access_check_individual_term_settings', array( &$this, 'um_access_check_individual_term_settings' ) );
add_action( 'um_access_check_global_settings', array( &$this, 'um_access_check_global_settings' ) );
@@ -1795,6 +1796,23 @@ if ( ! class_exists( 'um\core\Access' ) ) {
}
/**
* Sends a HTTP header to limit rendering of pages to same origin iframes when loading sensitive pages.
*
* Can be disabled with: remove_action( 'template_redirect', array( UM()->access(), 'send_frame_options_header' ), 1010 );
*
* @since 2.8.0
*/
public function send_frame_options_header() {
if ( um_is_core_page( 'account' )
|| um_is_core_page( 'login' )
|| um_is_core_page( 'password-reset' )
|| um_is_core_page( 'register' ) ) {
send_frame_options_header();
}
}
/**
* Sets a custom access referer in a redirect URL
*
+16 -16
View File
@@ -961,22 +961,22 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
'match' => 'https://facebook.com/',
),
'twitter' => array(
'title' => __('Twitter','ultimate-member'),
'metakey' => 'twitter',
'type' => 'url',
'label' => __('Twitter','ultimate-member'),
'required' => 0,
'public' => 1,
'editable' => true,
'twitter' => array(
'title' => __( 'X (formerly Twitter)', 'ultimate-member' ),
'metakey' => 'twitter',
'type' => 'url',
'label' => __( 'X', 'ultimate-member' ),
'required' => 0,
'public' => 1,
'editable' => true,
'url_target' => '_blank',
'url_rel' => 'nofollow',
'icon' => 'um-faicon-twitter',
'validate' => 'twitter_url',
'url_text' => 'Twitter',
'advanced' => 'social',
'color' => '#4099FF',
'match' => 'https://twitter.com/',
'url_rel' => 'nofollow',
'icon' => 'um-faicon-twitter', // 'fa-brands fa-x-twitter' for new FA styles
'validate' => 'twitter_url',
'url_text' => 'X',
'advanced' => 'social',
'color' => '#4099FF', // #0f1419 for X symbol
'match' => 'https://twitter.com/',
),
'linkedin' => array(
@@ -1557,7 +1557,7 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
$array['phone_number'] = __('Phone Number','ultimate-member');
$array['skype'] = __('Skype ID','ultimate-member');
$array['soundcloud'] = __( 'SoundCloud Profile', 'ultimate-member' );
$array['twitter_url'] = __('Twitter URL','ultimate-member');
$array['twitter_url'] = __( 'X (formerly Twitter) URL', 'ultimate-member' );
$array['is_email'] = __('E-mail( Not Unique )','ultimate-member');
$array['unique_email'] = __('Unique E-mail','ultimate-member');
$array['unique_value'] = __('Unique Metakey value','ultimate-member');
+47 -69
View File
@@ -1,13 +1,14 @@
<?php
namespace um\core;
use WP_User_Query;
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'um\core\Setup' ) ) {
/**
* Class Setup
*
@@ -15,18 +16,10 @@ if ( ! class_exists( 'um\core\Setup' ) ) {
*/
class Setup {
/**
* Setup constructor.
* Run setup.
*/
function __construct() {
}
/**
* Run setup
*/
function run_setup() {
public function run_setup() {
$this->create_db();
$this->install_basics();
$this->install_default_forms();
@@ -35,11 +28,10 @@ if ( ! class_exists( 'um\core\Setup' ) ) {
$this->set_default_user_status();
}
/**
* Create custom DB tables
* Create custom DB tables.
*/
function create_db() {
public function create_db() {
global $wpdb;
$charset_collate = $wpdb->get_charset_collate();
@@ -55,25 +47,23 @@ KEY meta_key_indx (um_key),
KEY meta_value_indx (um_value(191))
) $charset_collate;";
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
dbDelta( $sql );
}
/**
* Basics
* Basics.
*/
function install_basics() {
public function install_basics() {
if ( ! get_option( '__ultimatemember_sitekey' ) ) {
update_option( '__ultimatemember_sitekey', str_replace( array( 'http://', 'https://' ), '', sanitize_user( get_bloginfo('url') ) ) . '-' . wp_generate_password( 20, false ) );
update_option( '__ultimatemember_sitekey', str_replace( array( 'http://', 'https://' ), '', sanitize_user( get_bloginfo( 'url' ) ) ) . '-' . wp_generate_password( 20, false ) );
}
}
/**
* Default Forms
* Default Forms.
*/
function install_default_forms() {
public function install_default_forms() {
if ( current_user_can( 'manage_options' ) && ! get_option( 'um_is_installed' ) ) {
$options = get_option( 'um_options', array() );
@@ -81,39 +71,35 @@ KEY meta_value_indx (um_value(191))
//Install default options
foreach ( UM()->config()->settings_defaults as $key => $value ) {
$options[$key] = $value;
$options[ $key ] = $value;
}
// Install Core Forms
// Install Core Forms.
foreach ( UM()->config()->core_forms as $id ) {
/**
If page does not exist
Create it
**/
// If page does not exist - create it.
$page_exists = UM()->query()->find_post_id( 'um_form', '_um_core', $id );
if ( ! $page_exists ) {
if ( $id == 'register' ) {
if ( 'register' === $id ) {
$title = 'Default Registration';
} else if ( $id == 'login' ) {
} elseif ( 'login' === $id ) {
$title = 'Default Login';
} else {
$title = 'Default Profile';
}
$form = array(
'post_type' => 'um_form',
'post_title' => $title,
'post_status' => 'publish',
'post_author' => get_current_user_id(),
'post_type' => 'um_form',
'post_title' => $title,
'post_status' => 'publish',
'post_author' => get_current_user_id(),
);
$form_id = wp_insert_post( $form );
foreach( UM()->config()->core_form_meta[$id] as $key => $value ) {
if ( $key == '_um_custom_fields' ) {
$array = unserialize( $value );
foreach ( UM()->config()->core_form_meta[ $id ] as $key => $value ) {
if ( '_um_custom_fields' === $key ) {
$array = maybe_unserialize( $value );
update_post_meta( $form_id, $key, $array );
} else {
update_post_meta( $form_id, $key, $value );
@@ -129,40 +115,35 @@ KEY meta_value_indx (um_value(191))
update_option( 'um_core_forms', $core_forms );
}
// Install Core Directories
// Install Core Directories.
foreach ( UM()->config()->core_directories as $id ) {
/**
If page does not exist
Create it
**/
// If page does not exist - create it.
$page_exists = UM()->query()->find_post_id( 'um_directory', '_um_core', $id );
if ( ! $page_exists ) {
$title = 'Members';
$form = array(
'post_type' => 'um_directory',
'post_title' => $title,
'post_status' => 'publish',
'post_author' => get_current_user_id(),
'post_type' => 'um_directory',
'post_title' => $title,
'post_status' => 'publish',
'post_author' => get_current_user_id(),
);
$form_id = wp_insert_post( $form );
foreach ( UM()->config()->core_directory_meta[ $id ] as $key => $value ) {
if ( $key == '_um_custom_fields' ) {
$array = unserialize( $value );
if ( '_um_custom_fields' === $key ) {
$array = maybe_unserialize( $value );
update_post_meta( $form_id, $key, $array );
} else {
update_post_meta($form_id, $key, $value);
update_post_meta( $form_id, $key, $value );
}
}
$core_directories[ $id ] = $form_id;
}
/** DONE **/
}
if ( isset( $core_directories ) ) {
@@ -173,9 +154,8 @@ KEY meta_value_indx (um_value(191))
}
}
/**
* Install Pre-defined pages with shortcodes
* Install Pre-defined pages with shortcodes.
*/
public function install_default_pages() {
if ( ! current_user_can( 'manage_options' ) ) {
@@ -187,7 +167,7 @@ KEY meta_value_indx (um_value(191))
$setup_shortcodes = array_merge( $core_forms, $core_directories );
//Install Core Pages
// Install Core Pages.
$core_pages = array();
foreach ( UM()->config()->core_pages as $slug => $array ) {
@@ -197,7 +177,8 @@ KEY meta_value_indx (um_value(191))
continue;
}
//If page does not exist - create it
// If page does not exist - create it.
$content = '';
if ( 'logout' === $slug ) {
$content = '';
} elseif ( 'account' === $slug ) {
@@ -206,7 +187,7 @@ KEY meta_value_indx (um_value(191))
$content = '[ultimatemember_password]';
} elseif ( 'user' === $slug ) {
$content = '[ultimatemember form_id="' . $setup_shortcodes['profile'] . '"]';
} else {
} elseif ( ! empty( $setup_shortcodes[ $slug ] ) ) {
$content = '[ultimatemember form_id="' . $setup_shortcodes[ $slug ] . '"]';
}
@@ -262,11 +243,10 @@ KEY meta_value_indx (um_value(191))
UM()->rewrite()->reset_rules();
}
/**
* Set default UM settings
* Set default UM settings.
*/
function set_default_settings() {
public function set_default_settings() {
$options = get_option( 'um_options', array() );
foreach ( UM()->config()->settings_defaults as $key => $value ) {
@@ -279,23 +259,21 @@ KEY meta_value_indx (um_value(191))
update_option( 'um_options', $options );
}
/**
* Set UM roles meta to Default WP roles
* Set UM roles meta to Default WP roles.
*/
function set_default_role_meta() {
public function set_default_role_meta() {
foreach ( UM()->config()->default_roles_metadata as $role => $meta ) {
add_option( "um_role_{$role}_meta", $meta );
}
}
/**
* Set accounts without account_status meta to 'approved' status
* Set accounts without account_status meta to 'approved' status.
*
* @since 2.4.2
*/
function set_default_user_status() {
public function set_default_user_status() {
$result = get_transient( 'um_count_users_unassigned' );
if ( false === $result ) {
$args = array(
@@ -310,7 +288,7 @@ KEY meta_value_indx (um_value(191))
'um_custom_user_query' => true,
);
$users = new \WP_User_Query( $args );
$users = new WP_User_Query( $args );
if ( empty( $users ) || is_wp_error( $users ) ) {
$result = array();
} else {
+3 -3
View File
@@ -72,9 +72,9 @@ if ( ! is_admin() ) {
$visible = true;
// Hide any item that is the child of a hidden item.
if ( isset( $item->menu_item_parent ) && in_array( $item->menu_item_parent, $hide_children_of, true ) ) {
if ( isset( $item->menu_item_parent ) && in_array( absint( $item->menu_item_parent ), $hide_children_of, true ) ) {
$visible = false;
$hide_children_of[] = $item->ID; // for nested menus
$hide_children_of[] = absint( $item->ID ); // for nested menus
}
if ( isset( $mode ) && $visible ) {
@@ -118,7 +118,7 @@ if ( ! is_admin() ) {
// unset non-visible item
if ( ! $visible ) {
$hide_children_of[] = $item->ID; // store ID of item
$hide_children_of[] = absint( $item->ID ); // store ID of item
} else {
$filtered_items[] = $item;
}
+16 -1
View File
@@ -7,7 +7,7 @@ Tags: community, member, membership, user-profile, user-registration
Requires PHP: 5.6
Requires at least: 5.5
Tested up to: 6.4
Stable tag: 2.8.0
Stable tag: 2.8.1
License: GNU Version 2 or Any Later Version
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -166,6 +166,21 @@ No specific extensions are needed. But we highly recommended keep active these P
IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSION 2.6.7 PATCHES SECURITY PRIVILEGE ESCALATION VULNERABILITY. PLEASE SEE [THIS ARTICLE](https://docs.ultimatemember.com/article/1866-security-incident-update-and-recommended-actions) FOR MORE INFORMATION
= 2.8.1: December 20, 2023 =
* Enhancements:
- Updated: Twitter texts to X
- Added: Safeguards against clickjacking attacks on UM Forms
* Bugfixes:
- Fixed: Displaying notice to avoid using wrong symbols
- Fixed: UM > Settings button styles
- Fixed: Error notice when creating page via extensions
- Fixed: Workaround for Cropper.JS if UM.frontend.cropper.obj undefined (Cropper hasn't been properly inited for UM objects)
- Fixed: The visibility of sub-items of hidden menu items
= 2.8.0: December 11, 2023 =
* Enhancements:
+1 -1
View File
@@ -3,7 +3,7 @@
* Plugin Name: Ultimate Member
* Plugin URI: http://ultimatemember.com/
* Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
* Version: 2.8.0
* Version: 2.8.1
* Author: Ultimate Member
* Author URI: http://ultimatemember.com/
* Text Domain: ultimate-member