mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
CSS conflicts fixed
This commit is contained in:
@@ -1327,9 +1327,11 @@
|
||||
|
||||
add_submenu_page( $this->slug, __('Forms', $this->slug), __('Forms', $this->slug), 'manage_options', 'edit.php?post_type=um_form', '', '' );
|
||||
|
||||
add_submenu_page( $this->slug, __('Member Levels', $this->slug), __('Member Levels', $this->slug), 'manage_options', 'edit.php?post_type=um_role', '', '' );
|
||||
add_submenu_page( $this->slug, __('User Roles', $this->slug), __('User Roles', $this->slug), 'manage_options', 'edit.php?post_type=um_role', '', '' );
|
||||
|
||||
if ( um_get_option('members_page' ) ){
|
||||
add_submenu_page( $this->slug, __('Member Directories', $this->slug), __('Member Directories', $this->slug), 'manage_options', 'edit.php?post_type=um_directory', '', '' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
$save[ $_metakey ]['icon'] = '';
|
||||
foreach( $array['post'] as $key => $val){
|
||||
|
||||
if ( substr( $key, 0, 1) === '_' ) { // field attribute
|
||||
if ( substr( $key, 0, 1) === '_' && $val != '' ) { // field attribute
|
||||
$new_key = ltrim ($key,'_');
|
||||
|
||||
if ( $new_key == 'options' ) {
|
||||
|
||||
@@ -23,11 +23,6 @@ class UM_Admin_Enqueue {
|
||||
***/
|
||||
function admin_footer_text() {
|
||||
$copyright = sprintf(__('Thank you for creating with <a href="http://ultimatemember.com">Ultimate Member</a> and <a href="https://wordpress.org">WordPress</a>.','ultimatemember'));
|
||||
|
||||
if ( um_get_option('admin_load_time') == 1 ) {
|
||||
$copyright .= '<br />' . sprintf(__('%1$s queries made in %2$s seconds','ultimatemember'), get_num_queries(), timer_stop(0) );
|
||||
}
|
||||
|
||||
return '<span id="footer-thankyou">' . $copyright . '</span>';
|
||||
}
|
||||
|
||||
|
||||
@@ -309,6 +309,7 @@ class UM_Admin_Metabox {
|
||||
// save
|
||||
delete_post_meta( $post_id, '_um_can_view_roles' );
|
||||
delete_post_meta( $post_id, '_um_can_edit_roles' );
|
||||
delete_post_meta( $post_id, '_um_can_delete_roles' );
|
||||
foreach( $_POST as $k => $v ) {
|
||||
if (strstr($k, '_um_')){
|
||||
update_post_meta( $post_id, $k, $v);
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<label class="um-admin-half"><?php _e('Results Text','ultimatemember'); ?> <?php $this->tooltip('Customize the search result text . e.g. Found 3,000 Members. Leave this blank to not show result text'); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" name="_um_directory_header" id="_um_directory_header" value="<?php echo $ultimatemember->query->get_meta_value('_um_directory_header', null, um_get_option('directory_header') ); ?>" />
|
||||
<input type="text" name="_um_directory_header" id="_um_directory_header" value="<?php echo $ultimatemember->query->get_meta_value('_um_directory_header', null, __('{total_users} Members','ultimatemember') ); ?>" />
|
||||
|
||||
</span>
|
||||
</p><div class="um-admin-clear"></div>
|
||||
@@ -85,7 +85,7 @@
|
||||
<label class="um-admin-half"><?php _e('Custom text If no users were found','ultimatemember'); ?> <?php $this->tooltip('This is the text that is displayed if no users are found during a search'); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" name="_um_directory_no_users" id="_um_directory_no_users" value="<?php echo $ultimatemember->query->get_meta_value('_um_directory_no_users', null, um_get_option('directory_no_users') ); ?>" />
|
||||
<input type="text" name="_um_directory_no_users" id="_um_directory_no_users" value="<?php echo $ultimatemember->query->get_meta_value('_um_directory_no_users', null, __('We are sorry. We cannot find any users who match your search criteria.','ultimatemember') ); ?>" />
|
||||
|
||||
</span>
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="">
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after account is deleted','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after account is deleted','ultimatemember'); ?> <?php $this->tooltip( __('Select what happens when a user with this role deletes their own account','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<select name="_um_after_delete" id="_um_after_delete" class="umaf-selectjs um-adm-conditional" style="width: 300px" data-cond1="redirect_url" data-cond1-show="_um_after_delete">
|
||||
@@ -15,7 +15,7 @@
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="_um_after_delete">
|
||||
<label class="um-admin-half" for="_um_delete_redirect_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half" for="_um_delete_redirect_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip( __('Set a url to redirect this user role to after they delete account','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_delete_redirect_url', null, 'na'); ?>" name="_um_delete_redirect_url" id="_um_delete_redirect_url" />
|
||||
|
||||
@@ -6,17 +6,7 @@
|
||||
<label class="um-admin-half"><?php _e('Can edit their profile?','ultimatemember'); ?> <?php $this->tooltip('Can this role edit his own profile?'); ?></label>
|
||||
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_edit_profile', 1); ?></span>
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Can upload pictures?','ultimatemember'); ?> <?php $this->tooltip('Can upload pictures, and photos to his profile'); ?></label>
|
||||
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_upload_pics', 1); ?></span>
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Can upload files?','ultimatemember'); ?> <?php $this->tooltip('Can this role upload files and documents in his profile'); ?></label>
|
||||
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_upload_files', 1); ?></span>
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Can delete their account?','ultimatemember'); ?> <?php $this->tooltip('Allow this role to delete their account and end their membership on your site'); ?></label>
|
||||
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_delete_profile', 1); ?></span>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="">
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Can view default homepage?','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Can view default homepage?','ultimatemember'); ?> <?php $this->tooltip( __('Allow this user role to view your site\'s homepage','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<?php $this->ui_on_off('_um_default_homepage', 1, true, 1, 'xxx', 'redirect-home-url'); ?>
|
||||
@@ -12,7 +12,7 @@
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="redirect-home-url">
|
||||
<label class="um-admin-half" for="_um_redirect_homepage"><?php _e('Custom Homepage Redirect','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half" for="_um_redirect_homepage"><?php _e('Custom Homepage Redirect','ultimatemember'); ?> <?php $this->tooltip( __('Set a url to redirect this user role to if they try to view your site\'s homepage ','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_redirect_homepage', null, 'na'); ?>" name="_um_redirect_homepage" id="_um_redirect_homepage" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="">
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after login','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after login','ultimatemember'); ?> <?php $this->tooltip( __('Select what happens when a user with this role logins to your site','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<select name="_um_after_login" id="_um_after_login" class="umaf-selectjs um-adm-conditional" style="width: 300px" data-cond1="redirect_url" data-cond1-show="_um_after_login">
|
||||
@@ -17,7 +17,7 @@
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="_um_after_login">
|
||||
<label class="um-admin-half" for="_um_login_redirect_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half" for="_um_login_redirect_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip( __('Set a url to redirect this user role to after they login with their account','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_login_redirect_url', null, 'na'); ?>" name="_um_login_redirect_url" id="_um_login_redirect_url" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="">
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after logout','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after logout','ultimatemember'); ?> <?php $this->tooltip( __('Select what happens when a user with this role logouts of your site','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<select name="_um_after_logout" id="_um_after_logout" class="umaf-selectjs um-adm-conditional" style="width: 300px" data-cond1="redirect_url" data-cond1-show="_um_after_logout">
|
||||
@@ -15,7 +15,7 @@
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="_um_after_logout">
|
||||
<label class="um-admin-half" for="_um_logout_redirect_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half" for="_um_logout_redirect_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip( __('Set a url to redirect this user role to after they logout from site','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_logout_redirect_url', null, 'na'); ?>" name="_um_logout_redirect_url" id="_um_logout_redirect_url" />
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Can view/access private profiles?','ultimatemember'); ?> <?php $this->tooltip( __('Can this role edit his own profile?','ultimatemember') ); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Can view/access private profiles?','ultimatemember'); ?> <?php $this->tooltip( __('Can this role view private profiles?','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_access_private_profile'); ?></span>
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="">
|
||||
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Registration Status','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Registration Status','ultimatemember'); ?> <?php $this->tooltip( __('Select the status you would like this user role to have after they register on your site','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<select name="_um_status" id="_um_status" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<div class="approved">
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<select name="_um_auto_approve_act" id="_um_auto_approve_act" class="umaf-selectjs um-adm-conditional" style="width: 300px" data-cond1="redirect_url" data-cond1-show="_um_auto_approve_act">
|
||||
@@ -34,7 +34,7 @@
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="_um_auto_approve_act">
|
||||
<label class="um-admin-half" for="_um_auto_approve_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half" for="_um_auto_approve_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_auto_approve_url', null, 'na'); ?>" name="_um_auto_approve_url" id="_um_auto_approve_url" />
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<div class="checkmail">
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<select name="_um_checkmail_action" id="_um_checkmail_action" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
||||
@@ -63,16 +63,16 @@
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="_um_checkmail_action-1">
|
||||
<label class="um-admin-half"><?php _e('Personalize the custom message','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Personalize the custom message','ultimatemember'); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<textarea name="_um_checkmail_message" id="_um_checkmail_message"><?php echo $ultimatemember->query->get_meta_value('_um_checkmail_message', null, 'na'); ?></textarea>
|
||||
<textarea name="_um_checkmail_message" id="_um_checkmail_message"><?php echo $ultimatemember->query->get_meta_value('_um_checkmail_message', null, __('Thank you for registering. Before you can login we need you to activate your account by clicking the activation link in the email we just sent you.','ultimatemember') ); ?></textarea>
|
||||
|
||||
</span>
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="_um_checkmail_action-2">
|
||||
<label class="um-admin-half" for="_um_checkmail_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half" for="_um_checkmail_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_checkmail_url', null, 'na'); ?>" name="_um_checkmail_url" id="_um_checkmail_url" />
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
<div class="pending">
|
||||
<p>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<select name="_um_pending_action" id="_um_pending_action" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
||||
@@ -101,16 +101,16 @@
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="_um_pending_action-1">
|
||||
<label class="um-admin-half"><?php _e('Personalize the custom message','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half"><?php _e('Personalize the custom message','ultimatemember'); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<textarea name="_um_pending_message" id="_um_pending_message"><?php echo $ultimatemember->query->get_meta_value('_um_pending_message', null, 'na'); ?></textarea>
|
||||
<textarea name="_um_pending_message" id="_um_pending_message"><?php echo $ultimatemember->query->get_meta_value('_um_pending_message', null, __('Thank you for applying for membership to our site. We will review your details and send you an email letting you know whether your application has been successful or not.','ultimatemember') ); ?></textarea>
|
||||
|
||||
</span>
|
||||
</p><div class="um-admin-clear"></div>
|
||||
|
||||
<p class="_um_pending_action-2">
|
||||
<label class="um-admin-half" for="_um_pending_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?> <?php $this->tooltip('', 'e'); ?></label>
|
||||
<label class="um-admin-half" for="_um_pending_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
||||
<span class="um-admin-half">
|
||||
|
||||
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_pending_url', null, 'na'); ?>" name="_um_pending_url" id="_um_pending_url" />
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
outline: 0 !important;
|
||||
background: none !important;
|
||||
border-radius: 0 0 2px 2px;
|
||||
color: #fff !important;
|
||||
}
|
||||
.picker--time .picker__button--clear:hover,
|
||||
.picker--time .picker__button--clear:focus {
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.um-account-main div.um-account-heading i {
|
||||
@@ -65,6 +65,8 @@
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.um-account-meta img {margin: 0 !important}
|
||||
|
||||
.um-account-meta.radius-1 img { border-radius: 999px }
|
||||
.um-account-meta.radius-2 img { border-radius: 4px }
|
||||
.um-account-meta.radius-3 img { border-radius: 0 }
|
||||
|
||||
@@ -185,6 +185,8 @@
|
||||
position: relative;
|
||||
top: -35px;
|
||||
margin-bottom: -45px !important;
|
||||
float: none;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.um-member-photo.radius-1 img { border-radius: 999px !important }
|
||||
@@ -276,13 +278,13 @@
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.um-member-connect a{
|
||||
.um-member-connect a {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
border-radius: 999px;
|
||||
color: #fff;
|
||||
color: #fff !important;
|
||||
opacity: 0.85;
|
||||
margin: 0 1px;
|
||||
font-size: 16px;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
.um-profile {
|
||||
box-sizing: border-box;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.um-profile .um-cover-overlay {
|
||||
@@ -104,6 +103,7 @@
|
||||
vertical-align: middle;
|
||||
height: 100%;
|
||||
text-decoration: none !important;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.um-cover-overlay i {
|
||||
@@ -131,7 +131,7 @@
|
||||
font-size: 30px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
z-index: 666;
|
||||
z-index: 66;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -153,7 +153,6 @@
|
||||
float: none !important;
|
||||
margin: 0 auto !important;
|
||||
text-align: center !important;
|
||||
padding-top: 20px !important;
|
||||
}
|
||||
|
||||
.um-header.no-cover a.um-profile-photo-img {
|
||||
@@ -161,8 +160,6 @@
|
||||
top: auto !important;
|
||||
left: auto !important;
|
||||
float: none !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
display: inline-block !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
@@ -223,6 +220,7 @@
|
||||
vertical-align: middle;
|
||||
height: 100%;
|
||||
text-decoration: none !important;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.um-profile-photo-overlay i {
|
||||
@@ -236,6 +234,9 @@
|
||||
|
||||
.um-profile-meta {
|
||||
padding-right: 30px;
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-word;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.um-main-meta {
|
||||
@@ -247,12 +248,17 @@
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
margin-right: 30px;
|
||||
line-height: 1.7em;
|
||||
}
|
||||
|
||||
.um-meta {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.um-meta span a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.um-meta span:first-child {margin: 0 5px 0 0}
|
||||
.um-meta span {
|
||||
margin: 0 5px;
|
||||
|
||||
@@ -102,6 +102,12 @@ div.uimob340 .um-profile-photo {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
div.uimob340 .um-header.no-cover .um-profile-photo {
|
||||
position: static;
|
||||
top: auto;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
div.uimob340 .um-profile-photo a.um-profile-photo-img {
|
||||
width: 100px !important;
|
||||
height: 100px !important;
|
||||
@@ -113,13 +119,20 @@ div.uimob340 .um-profile-photo a.um-profile-photo-img {
|
||||
left: auto !important;
|
||||
}
|
||||
|
||||
div.uimob340 .um-header.no-cover .um-profile-photo a.um-profile-photo-img {
|
||||
width: 120px !important;
|
||||
height: 120px !important;
|
||||
}
|
||||
|
||||
div.uimob340 .um-header .um-profile-meta {
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
text-align: center !important;
|
||||
padding-top: 70px !important;
|
||||
padding-top: 60px !important;
|
||||
}
|
||||
|
||||
div.uimob340 .um-header.no-cover .um-profile-meta {padding-top: 0 !important}
|
||||
|
||||
div.uimob340 .um-header .um-name {
|
||||
float: none !important;
|
||||
margin-right: 0 !important;
|
||||
@@ -280,6 +293,12 @@ div.uimob500 .um-profile-photo {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
div.uimob500 .um-header.no-cover .um-profile-photo {
|
||||
position: static;
|
||||
top: auto;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
div.uimob500 .um-profile-photo a.um-profile-photo-img {
|
||||
width: 100px !important;
|
||||
height: 100px !important;
|
||||
@@ -291,13 +310,20 @@ div.uimob500 .um-profile-photo a.um-profile-photo-img {
|
||||
left: auto !important;
|
||||
}
|
||||
|
||||
div.uimob500 .um-header.no-cover .um-profile-photo a.um-profile-photo-img {
|
||||
width: 120px !important;
|
||||
height: 120px !important;
|
||||
}
|
||||
|
||||
div.uimob500 .um-header .um-profile-meta {
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
text-align: center !important;
|
||||
padding-top: 70px !important;
|
||||
padding-top: 60px !important;
|
||||
}
|
||||
|
||||
div.uimob500 .um-header.no-cover .um-profile-meta {padding-top: 0 !important}
|
||||
|
||||
div.uimob500 .um-header .um-name {
|
||||
float: none !important;
|
||||
margin-right: 0 !important;
|
||||
@@ -445,6 +471,10 @@ div.uimob800 .um-profile-photo a.um-profile-photo-img {
|
||||
top: -70px !important;
|
||||
}
|
||||
|
||||
div.uimob800 .um-header.no-cover .um-profile-photo a.um-profile-photo-img {
|
||||
top: auto !important;
|
||||
}
|
||||
|
||||
div.uimob800 .um-header .um-profile-meta {
|
||||
padding-left: 200px;
|
||||
}
|
||||
|
||||
@@ -536,6 +536,7 @@ html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice
|
||||
text-decoration: none !important;
|
||||
width: 21px !important;
|
||||
text-align: center !important;
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.select2-container-multi .select2-search-choice-close:before {
|
||||
|
||||
@@ -25,6 +25,21 @@
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.um-header a,
|
||||
.um-cover a,
|
||||
.um-member-photo a,
|
||||
.um-member-name a,
|
||||
.um-member-more a,
|
||||
.um-member-less a,
|
||||
.um-members a,
|
||||
.um-account-side li a,
|
||||
.um-members-pagi span,
|
||||
.um-members-pagi a,
|
||||
.um-field-value a
|
||||
{
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.um a:focus,
|
||||
.um-modal a:focus {
|
||||
outline: 0 !important;
|
||||
@@ -238,12 +253,19 @@ p.um-notice.err {
|
||||
.um-field-label {
|
||||
display: block;
|
||||
margin: 0 0 8px 0;
|
||||
font-weight: bold;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.um-field-label .um-field-label-icon { float: left; margin: 0 8px 0 0; vertical-align: middle !important; height: 22px; }
|
||||
.um-field-label .um-field-label-icon i { font-size: 22px; height: 22px; line-height: 22px; vertical-align: middle; }
|
||||
.um-field-label label { display: inline-block; height: 22px; font-size: 16px; line-height: 22px !important; }
|
||||
|
||||
.um-field-label label {
|
||||
display: inline-block;
|
||||
height: 22px;
|
||||
font-size: 15px;
|
||||
line-height: 22px !important;
|
||||
font-weight: bold;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.um-field-area {
|
||||
position: relative;
|
||||
@@ -276,6 +298,7 @@ p.um-notice.err {
|
||||
left: 0;
|
||||
width: 44px;
|
||||
font-size: 22px;
|
||||
line-height: 1.7em;
|
||||
}
|
||||
|
||||
.um-form input[type=text],
|
||||
@@ -291,6 +314,7 @@ p.um-notice.err {
|
||||
box-sizing: border-box;
|
||||
box-shadow: none !important;
|
||||
margin: 0;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.um-form input[type=text]:focus ,
|
||||
@@ -317,6 +341,7 @@ p.um-notice.err {
|
||||
border-radius: 2px;
|
||||
box-sizing: border-box;
|
||||
min-height: 80px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -441,6 +466,9 @@ input[type=submit].um-button:focus {
|
||||
height: auto !important;
|
||||
font-size: 15px;
|
||||
cursor: pointer !important;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.um-button {
|
||||
@@ -493,7 +521,7 @@ a.um-link-alt:hover {text-decoration: underline !important;}
|
||||
height: auto;
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
z-index: 555555;
|
||||
z-index: 1;
|
||||
display: none;
|
||||
border: 1px solid #e5e5e5;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -118,8 +118,11 @@ print "
|
||||
.select2-drop-active,
|
||||
.select2-drop.select2-drop-above
|
||||
{
|
||||
border: $form_border;
|
||||
border: $form_border !important;
|
||||
}
|
||||
|
||||
.um-$form_id.um .um-form .select2-container-multi .select2-choices .select2-search-field input[type=text] {border: none !important}
|
||||
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ print "
|
||||
";
|
||||
|
||||
print "
|
||||
.um-$form_id.um .um-header.no-cover a.um-profile-photo-img img,
|
||||
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
|
||||
width: ".$photosize."px;
|
||||
height: ".$photosize."px;
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ class UM_Account {
|
||||
|
||||
switch( $id ) {
|
||||
case 'privacy' :
|
||||
$args = 'profile_privacy,show_in_members';
|
||||
$args = 'profile_privacy,hide_in_members';
|
||||
break;
|
||||
case 'delete' :
|
||||
$args = 'single_user_password';
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
$changes[ $k ] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $changes['hide_in_members'] ) && $changes['hide_in_members'] == 'No' ){
|
||||
delete_user_meta( um_user('ID'), 'hide_in_members' );
|
||||
unset( $changes['hide_in_members'] );
|
||||
}
|
||||
|
||||
$ultimatemember->user->update_profile( $changes );
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
global $ultimatemember;
|
||||
extract($_REQUEST);
|
||||
|
||||
if ( !um_can_edit_profile( $user_id ) ) die( __('You can not edit this user') );
|
||||
if ( !um_current_user_can('edit', $user_id ) ) die( __('You can not edit this user') );
|
||||
|
||||
$ultimatemember->files->delete_core_user_photo( $user_id, 'profile_photo' );
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
global $ultimatemember;
|
||||
extract($_REQUEST);
|
||||
|
||||
if ( !um_can_edit_profile( $user_id ) ) die( __('You can not edit this user') );
|
||||
if ( !um_current_user_can('edit', $user_id ) ) die( __('You can not edit this user') );
|
||||
|
||||
$ultimatemember->files->delete_core_user_photo( $user_id, 'cover_photo' );
|
||||
|
||||
|
||||
+11
-15
@@ -8,20 +8,16 @@
|
||||
global $ultimatemember;
|
||||
|
||||
if ( is_admin() ) return false;
|
||||
|
||||
if ( !isset( $_REQUEST['um_action'] ) ) return false;
|
||||
|
||||
if ( isset( $_REQUEST['uid'] ) && !$ultimatemember->user->user_exists_by_id( $_REQUEST['uid'] ) ) return false;
|
||||
|
||||
if ( isset( $_REQUEST['uid'] ) ) {
|
||||
|
||||
if ( is_super_admin( $_REQUEST['uid'] ) )
|
||||
wp_die('Super administrators can not be modified.');
|
||||
|
||||
if ( !current_user_can('edit_users') ){
|
||||
wp_die('You do not have permissions to do this.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( isset($_REQUEST['uid'])){
|
||||
$uid = $_REQUEST['uid'];
|
||||
}
|
||||
|
||||
switch( $_REQUEST['um_action'] ) {
|
||||
@@ -35,44 +31,44 @@
|
||||
break;
|
||||
|
||||
case 'um_reject_membership':
|
||||
um_fetch_user( $_REQUEST['uid'] );
|
||||
um_fetch_user( $uid );
|
||||
$ultimatemember->user->reject();
|
||||
exit( wp_redirect( $ultimatemember->permalinks->get_current_url( true ) ) );
|
||||
break;
|
||||
|
||||
case 'um_approve_membership':
|
||||
case 'um_reenable':
|
||||
um_fetch_user( $_REQUEST['uid'] );
|
||||
um_fetch_user( $uid );
|
||||
$ultimatemember->user->approve();
|
||||
exit( wp_redirect( $ultimatemember->permalinks->get_current_url( true ) ) );
|
||||
break;
|
||||
|
||||
case 'um_put_as_pending':
|
||||
um_fetch_user( $_REQUEST['uid'] );
|
||||
um_fetch_user( $uid );
|
||||
$ultimatemember->user->pending();
|
||||
exit( wp_redirect( $ultimatemember->permalinks->get_current_url( true ) ) );
|
||||
break;
|
||||
|
||||
case 'um_resend_activation':
|
||||
um_fetch_user( $_REQUEST['uid'] );
|
||||
um_fetch_user( $uid );
|
||||
$ultimatemember->user->email_pending();
|
||||
exit( wp_redirect( $ultimatemember->permalinks->get_current_url( true ) ) );
|
||||
break;
|
||||
|
||||
case 'um_deactivate':
|
||||
um_fetch_user( $_REQUEST['uid'] );
|
||||
um_fetch_user( $uid );
|
||||
$ultimatemember->user->deactivate();
|
||||
exit( wp_redirect( $ultimatemember->permalinks->get_current_url( true ) ) );
|
||||
break;
|
||||
|
||||
case 'um_delete':
|
||||
um_fetch_user( $_REQUEST['uid'] );
|
||||
if ( !um_current_user_can( 'delete', $uid ) ) wp_die( __('You do not have permission to delete this user.','ultimatemember') );
|
||||
um_fetch_user( $uid );
|
||||
$ultimatemember->user->delete();
|
||||
exit( wp_redirect( $ultimatemember->permalinks->get_current_url( true ) ) );
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
@@ -43,18 +43,6 @@
|
||||
|
||||
<?php }
|
||||
|
||||
/***
|
||||
*** @debug: load time and queries
|
||||
***/
|
||||
add_action('wp_footer', 'um_add_load_time_and_queries_num', 1111 );
|
||||
function um_add_load_time_and_queries_num() {
|
||||
|
||||
if ( um_get_option('load_time') == 1 ) {
|
||||
echo sprintf(__('%1$s queries made in %2$s seconds','ultimatemember'), get_num_queries(), timer_stop(0) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @empty the honeypot value
|
||||
***/
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
?>
|
||||
|
||||
<div class="um-members-pagidrop uimob500-show">
|
||||
<div class="um-members-pagidrop uimob340-show uimob500-show">
|
||||
|
||||
<?php _e('Jump to page:','ultimatemember'); ?>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-members-pagi uimob500-hide">
|
||||
<div class="um-members-pagi uimob340-hide uimob500-hide">
|
||||
|
||||
<?php if ( um_members('page') != 1 ) { ?>
|
||||
<a href="<?php echo $ultimatemember->permalinks->add_query( 'members_page', 1 ); ?>" class="pagi pagi-arrow um-tip-n" title="First Page"><i class="um-icon-angle-double-left"></i></a>
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
|
||||
if ( um_get_requested_user() ) {
|
||||
if ( !um_can_view_profile( um_get_requested_user() ) ) um_redirect_home();
|
||||
if ( !um_can_edit_profile( um_get_requested_user() ) ) $ultimatemember->user->cannot_edit = 1;
|
||||
if ( !um_current_user_can('edit', um_get_requested_user() ) ) $ultimatemember->user->cannot_edit = 1;
|
||||
um_fetch_user( um_get_requested_user() );
|
||||
} else {
|
||||
if ( !is_user_logged_in() ) um_redirect_home();
|
||||
@@ -254,7 +254,7 @@
|
||||
$ultimatemember->fields->editing = 1;
|
||||
|
||||
if ( um_get_requested_user() ) {
|
||||
if ( !um_can_edit_profile( um_get_requested_user() ) ) um_redirect_home();
|
||||
if ( !um_current_user_can('edit', um_get_requested_user() ) ) um_redirect_home();
|
||||
um_fetch_user( um_get_requested_user() );
|
||||
}
|
||||
|
||||
@@ -304,6 +304,7 @@
|
||||
|
||||
$actions = $ultimatemember->user->get_admin_actions();
|
||||
|
||||
unset( $items['myaccount'] );
|
||||
unset( $items['cancel'] );
|
||||
$items = array_merge( $items, $actions );
|
||||
$items['cancel'] = $cancel;
|
||||
@@ -339,7 +340,7 @@
|
||||
$files = null;
|
||||
|
||||
if ( isset( $args['user_id'] ) ) {
|
||||
if ( um_can_edit_profile( $args['user_id'] ) ) {
|
||||
if ( um_current_user_can('edit', $args['user_id'] ) ) {
|
||||
$ultimatemember->user->set( $args['user_id'] );
|
||||
} else {
|
||||
wp_die( __('You are not allowed to edit this user.','ultimatemember') );
|
||||
|
||||
@@ -128,6 +128,8 @@
|
||||
|
||||
if ( !is_admin() ) {
|
||||
|
||||
do_action("track_{$status}_user_registration");
|
||||
|
||||
if ( $status == 'approved' ) {
|
||||
|
||||
$ultimatemember->user->auto_login($user_id);
|
||||
@@ -149,9 +151,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
do_action("track_{$status}_user_registration");
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
-7
@@ -799,17 +799,17 @@ class UM_Builtin {
|
||||
'required_perm' => 'can_make_private_profile',
|
||||
),
|
||||
|
||||
'show_in_members' => array(
|
||||
'title' => __('Show me in the Directory','ultimatemember'),
|
||||
'metakey' => 'show_in_members',
|
||||
'hide_in_members' => array(
|
||||
'title' => __('Hide my profile from directory','ultimatemember'),
|
||||
'metakey' => 'hide_in_members',
|
||||
'type' => 'radio',
|
||||
'label' => __('Show me in the Directory','ultimatemember'),
|
||||
'help' => __('Choose whether you want to appear in public member directories or not','ultimatemember'),
|
||||
'label' => __('Hide my profile from directory','ultimatemember'),
|
||||
'help' => __('Here you can hide yourself from appearing in public directory','ultimatemember'),
|
||||
'required' => 0,
|
||||
'public' => 1,
|
||||
'editable' => 1,
|
||||
'default' => 'Yes',
|
||||
'options' => array('Yes','No'),
|
||||
'default' => 'No',
|
||||
'options' => array('No','Yes'),
|
||||
'account_only' => true,
|
||||
'required_opt' => array( 'members_page', 1 ),
|
||||
),
|
||||
|
||||
@@ -5,22 +5,30 @@
|
||||
***/
|
||||
add_filter('um_prepare_user_query_args', 'um_prepare_user_query_args', 10, 2);
|
||||
add_filter('um_prepare_user_query_args', 'um_add_search_to_query', 50, 2);
|
||||
add_filter('um_prepare_user_query_args', 'um_remove_unwanted_users_from_list', 99, 2);
|
||||
add_filter('um_prepare_user_query_args', 'um_remove_special_users_from_list', 99, 2);
|
||||
|
||||
/***
|
||||
*** @Remove users we do not need to show in directory
|
||||
***/
|
||||
function um_remove_unwanted_users_from_list( $query_args, $args ) {
|
||||
function um_remove_special_users_from_list( $query_args, $args ) {
|
||||
global $ultimatemember;
|
||||
extract( $args );
|
||||
|
||||
if ( !current_user_can('manage_options') )
|
||||
if ( !current_user_can('manage_options') ) {
|
||||
|
||||
$query_args['meta_query'][] = array(
|
||||
'key' => 'account_status',
|
||||
'value' => 'approved',
|
||||
'compare' => '='
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
$query_args['meta_query'][] = array(
|
||||
'key' => 'hide_in_members',
|
||||
'value' => '',
|
||||
'compare' => 'NOT EXISTS'
|
||||
);
|
||||
|
||||
return $query_args;
|
||||
}
|
||||
|
||||
@@ -54,9 +54,13 @@
|
||||
$actions['um_reenable'] = array( 'label' => __('Reactivate this account') );
|
||||
}
|
||||
|
||||
$actions['um_delete'] = array( 'label' => __('Delete this user') );
|
||||
if ( um_current_user_can( 'delete', um_profile_id() ) ) {
|
||||
$actions['um_delete'] = array( 'label' => __('Delete this user') );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
um_fetch_user( um_profile_id() );
|
||||
|
||||
return $actions;
|
||||
}
|
||||
@@ -40,8 +40,6 @@ class UM_Setup {
|
||||
'_um_show_tagline' => 0,
|
||||
'_um_search' => 0,
|
||||
'_um_userinfo_animate' => '1',
|
||||
'_um_directory_header' => __('{total_users} Members','ultimatemember'),
|
||||
'_um_directory_no_users' => __('Sorry, we cannot find any users who match your search criteria.','ultimatemember'),
|
||||
'_um_sortby' => 'user_registered_desc',
|
||||
'_um_profile_photo' => '1',
|
||||
'_um_cover_photos' => '1',
|
||||
@@ -140,8 +138,6 @@ class UM_Setup {
|
||||
'_um_login_secondary_btn_hover' => '#e5e5e5',
|
||||
'_um_login_secondary_btn_text' => '#666',
|
||||
'_um_directory_template' => 'members',
|
||||
'_um_directory_header' => __('{total_users} Members','ultimatemember'),
|
||||
'_um_directory_no_users' => __('We are sorry. We cannot find any users who match your search criteria.','ultimatemember'),
|
||||
);
|
||||
|
||||
$this->core_form_meta_all = apply_filters('um_core_form_meta_all', $this->core_form_meta_all );
|
||||
@@ -176,8 +172,6 @@ class UM_Setup {
|
||||
'can_delete_everyone' => 1,
|
||||
'can_delete_roles' => 1,
|
||||
'can_edit_profile' => 1,
|
||||
'can_upload_pics' => 1,
|
||||
'can_upload_files' => 1,
|
||||
'can_delete_profile' => 1,
|
||||
'can_view_all' => 1,
|
||||
'can_make_private_profile' => 1,
|
||||
|
||||
+41
-48
@@ -244,15 +244,6 @@
|
||||
$ultimatemember->user->reset();
|
||||
}
|
||||
|
||||
/***
|
||||
*** @boolean if viewing his own profile
|
||||
***/
|
||||
function um_is_my_profile() {
|
||||
if ( !is_user_logged_in() ) return false;
|
||||
if ( um_is_core_page('user') && get_current_user_id() == um_get_requested_user() ) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @gets the queried user
|
||||
***/
|
||||
@@ -353,19 +344,6 @@
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Tests for current user
|
||||
***/
|
||||
function um_user_can( $permission ) {
|
||||
global $ultimatemember;
|
||||
$user_id = get_current_user_id();
|
||||
$role = get_user_meta( $user_id, 'role', true );
|
||||
$permissions = $ultimatemember->query->role_data( $role );
|
||||
if ( $permissions[ $permission ] == 1 )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @boolean check for not same user
|
||||
***/
|
||||
@@ -395,23 +373,54 @@
|
||||
}
|
||||
|
||||
/***
|
||||
*** @checks if user can edit profile
|
||||
*** @User can (role settings )
|
||||
***/
|
||||
function um_can_edit_profile( $user_id ){
|
||||
function um_user_can( $permission ) {
|
||||
global $ultimatemember;
|
||||
$user_id = get_current_user_id();
|
||||
$role = get_user_meta( $user_id, 'role', true );
|
||||
$permissions = $ultimatemember->query->role_data( $role );
|
||||
if ( $permissions[ $permission ] == 1 )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Check if user is in his profile
|
||||
***/
|
||||
function um_is_myprofile(){
|
||||
global $ultimatemember;
|
||||
if ( get_current_user_id() && get_current_user_id() == um_get_requested_user() )return true;
|
||||
if ( !um_get_requested_user() && um_is_core_page('user') && get_current_user_id() ) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Current user can
|
||||
***/
|
||||
function um_current_user_can( $cap, $user_id ){
|
||||
global $ultimatemember;
|
||||
|
||||
if ( !is_user_logged_in() ) return false;
|
||||
um_fetch_user( get_current_user_id() );
|
||||
|
||||
if ( um_user('can_edit_everyone') ) return true;
|
||||
|
||||
if ( get_current_user_id() == $user_id && um_user('can_edit_profile') ) return true;
|
||||
|
||||
if ( get_current_user_id() == $user_id && !um_user('can_edit_profile') ) return false;
|
||||
|
||||
if ( !um_user('can_edit_everyone') ) return false;
|
||||
switch($cap) {
|
||||
|
||||
case 'edit':
|
||||
if ( get_current_user_id() == $user_id && um_user('can_edit_profile') ) return true;
|
||||
if ( !um_user('can_edit_everyone') ) return false;
|
||||
if ( get_current_user_id() == $user_id && !um_user('can_edit_profile') ) return false;
|
||||
if ( um_user('can_edit_roles') && !in_array( $ultimatemember->query->get_role_by_userid( $user_id ), um_user('can_edit_roles') ) ) return false;
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
if ( !um_user('can_delete_everyone') ) return false;
|
||||
if ( um_user('can_delete_roles') && !in_array( $ultimatemember->query->get_role_by_userid( $user_id ), um_user('can_delete_roles') ) ) return false;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -419,25 +428,9 @@
|
||||
***/
|
||||
function um_can_edit_my_profile(){
|
||||
global $ultimatemember;
|
||||
|
||||
if ( !is_user_logged_in() ) return false;
|
||||
if ( !um_user('can_edit_profile') ) return false;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @quick test if the user's is on his profile
|
||||
***/
|
||||
function um_is_myprofile(){
|
||||
global $ultimatemember;
|
||||
|
||||
if ( get_current_user_id() && get_current_user_id() == um_get_requested_user() )return true;
|
||||
|
||||
if ( !um_get_requested_user() && um_is_core_page('user') && get_current_user_id() ) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
+10
-6
@@ -33,14 +33,14 @@ class UM_Taxonomies {
|
||||
|
||||
register_post_type( 'um_role', array(
|
||||
'labels' => array(
|
||||
'name' => __( 'Member Levels' ),
|
||||
'singular_name' => __( 'Member Level' ),
|
||||
'name' => __( 'User Roles' ),
|
||||
'singular_name' => __( 'User Role' ),
|
||||
'add_new' => __( 'Add New' ),
|
||||
'add_new_item' => __('Add New Member Level' ),
|
||||
'edit_item' => __('Edit Member Level'),
|
||||
'not_found' => __('You did not create any member levels yet'),
|
||||
'add_new_item' => __('Add New User Role' ),
|
||||
'edit_item' => __('Edit User Role'),
|
||||
'not_found' => __('You did not create any user roles yet'),
|
||||
'not_found_in_trash' => __('Nothing found in Trash'),
|
||||
'search_items' => __('Search Member Levels')
|
||||
'search_items' => __('Search User Roles')
|
||||
),
|
||||
'show_ui' => true,
|
||||
'show_in_menu' => false,
|
||||
@@ -49,6 +49,8 @@ class UM_Taxonomies {
|
||||
)
|
||||
);
|
||||
|
||||
if ( um_get_option('members_page') ){
|
||||
|
||||
register_post_type( 'um_directory', array(
|
||||
'labels' => array(
|
||||
'name' => __( 'Member Directories' ),
|
||||
@@ -67,6 +69,8 @@ class UM_Taxonomies {
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+48
-144
@@ -2,16 +2,17 @@
|
||||
|
||||
global $ultimatemember;
|
||||
|
||||
|
||||
/***
|
||||
*** @
|
||||
***/
|
||||
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-user-add-1',
|
||||
'title' => __( 'Registration'),
|
||||
'icon' => 'um-icon-user-1',
|
||||
'title' => __( 'Users'),
|
||||
'fields' => array(
|
||||
|
||||
|
||||
array(
|
||||
'id' => 'default_role',
|
||||
'type' => 'select',
|
||||
@@ -22,20 +23,6 @@ $this->sections[] = array(
|
||||
'options' => $ultimatemember->query->get_roles( ),
|
||||
'placeholder' => __('Choose user role...'),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
/***
|
||||
*** @
|
||||
***/
|
||||
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-user-1',
|
||||
'title' => __( 'User Profile'),
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
'id' => 'permalink_base',
|
||||
@@ -81,6 +68,16 @@ $this->sections[] = array(
|
||||
'required' => array( 'display_name', '=', 'field' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'members_page',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Members Directory' ),
|
||||
'default' => 1,
|
||||
'desc' => 'Control whether to enable or disable member directories on this site',
|
||||
'on' => __('Enable'),
|
||||
'off' => __('Disable'),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
@@ -153,54 +150,14 @@ $this->sections[] = array(
|
||||
|
||||
);
|
||||
|
||||
/***
|
||||
*** @
|
||||
***/
|
||||
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-group',
|
||||
'title' => __( 'Members Directory'),
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
'id' => 'members_page',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Members page status' ),
|
||||
'default' => 1,
|
||||
'desc' => 'Control whether to enable or disable the core Members directory page',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'directory_header',
|
||||
'type' => 'text',
|
||||
'title' => __( 'General Results Text' ),
|
||||
'default' => um_get_metadefault('directory_header'),
|
||||
'desc' => __('Customize the search result text . e.g. Found 3,000 Members. Leave this blank to not show result text','ultimatemember'),
|
||||
'required' => array( 'members_page', '=', '1' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'directory_no_users',
|
||||
'type' => 'text',
|
||||
'title' => __( 'Custom text If no users were found' ),
|
||||
'default' => um_get_metadefault('directory_no_users'),
|
||||
'desc' => __('This is the text that is displayed if no users are found during a search','ultimatemember'),
|
||||
'required' => array( 'members_page', '=', '1' ),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
/***
|
||||
*** @
|
||||
***/
|
||||
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-lock-3',
|
||||
'title' => __( 'Site Access'),
|
||||
'icon' => 'um-icon-key-3',
|
||||
'title' => __( 'Access'),
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
@@ -233,21 +190,7 @@ $this->sections[] = array(
|
||||
'add_text' => __('Add New URL'),
|
||||
'required' => array( 'accessible', '=', 2 ),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
/***
|
||||
*** @
|
||||
***/
|
||||
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-wordpress-alt',
|
||||
'title' => __( 'Backend'),
|
||||
'fields' => array(
|
||||
|
||||
|
||||
array(
|
||||
'id' => 'panic_key',
|
||||
'type' => 'text',
|
||||
@@ -320,21 +263,7 @@ $this->sections[] = array(
|
||||
'desc' => 'Enter an alternate url here to redirect a user If they try to access the backend register screen',
|
||||
'required' => array( 'wpadmin_register_redirect', '=', 'custom_url' ),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
/***
|
||||
*** @
|
||||
***/
|
||||
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-denied-block',
|
||||
'title' => __( 'Restrictions'),
|
||||
'fields' => array(
|
||||
|
||||
|
||||
array(
|
||||
'id' => 'blocked_ips',
|
||||
'type' => 'textarea',
|
||||
@@ -371,7 +300,7 @@ $this->sections[] = array(
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-envelope-2',
|
||||
'title' => __( 'Email Templates'),
|
||||
'title' => __( 'Emails'),
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
@@ -662,7 +591,7 @@ $this->sections[] = array(
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-bell-1',
|
||||
'title' => __( 'Admin Notifications' ),
|
||||
'title' => __( 'Notifications' ),
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
@@ -775,7 +704,7 @@ $this->sections[] = array(
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-photo-2',
|
||||
'title' => __( 'Image & File Uploads'),
|
||||
'title' => __( 'Uploads'),
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
@@ -867,7 +796,7 @@ $this->sections[] = array(
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-brush-1',
|
||||
'title' => __( 'Styling & Appearance'),
|
||||
'title' => __( 'Appearance'),
|
||||
'fields' => array(
|
||||
|
||||
)
|
||||
@@ -880,6 +809,17 @@ $this->sections[] = array(
|
||||
'title' => __( 'General'),
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
'id' => 'directory_template',
|
||||
'type' => 'select',
|
||||
'select2' => array( 'allowClear' => 0, 'minimumResultsForSearch' => -1 ),
|
||||
'title' => __( 'Members Default Template' ),
|
||||
'desc' => __( 'This will be the default template to output member directory' ),
|
||||
'default' => um_get_metadefault('directory_template'),
|
||||
'options' => $ultimatemember->shortcodes->get_templates( 'members' ),
|
||||
'required' => array( 'xxxxxxxxxxxxx', '=', 'sssssssssssssssss' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'active_color',
|
||||
'type' => 'color',
|
||||
@@ -900,18 +840,6 @@ $this->sections[] = array(
|
||||
'transparent' => false,
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'default_avatar',
|
||||
'type' => 'media',
|
||||
'width' => '150',
|
||||
'height' => '150',
|
||||
'title' => __('Default Profile Picture', 'ultimatemember'),
|
||||
'desc' => __('You can change the default profile picture globally here. Please make sure that the photo is 300x300px.', 'ultimatemember'),
|
||||
'default' => array(
|
||||
'url' => um_url . 'assets/img/default_avatar.jpg',
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'primary_btn_color',
|
||||
'type' => 'color',
|
||||
@@ -1147,6 +1075,18 @@ $this->sections[] = array(
|
||||
'transparent' => false,
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'default_avatar',
|
||||
'type' => 'media',
|
||||
'width' => '150',
|
||||
'height' => '150',
|
||||
'title' => __('Default Profile Photo', 'ultimatemember'),
|
||||
'desc' => __('You can change the default profile picture globally here. Please make sure that the photo is 300x300px.', 'ultimatemember'),
|
||||
'default' => array(
|
||||
'url' => um_url . 'assets/img/default_avatar.jpg',
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'profile_photosize',
|
||||
'type' => 'text',
|
||||
@@ -1438,61 +1378,25 @@ $this->sections[] = array(
|
||||
|
||||
);
|
||||
|
||||
$this->sections[] = array(
|
||||
|
||||
'subsection' => true,
|
||||
'title' => __( 'Member Directory'),
|
||||
'fields' => array(
|
||||
|
||||
array(
|
||||
'id' => 'directory_template',
|
||||
'type' => 'select',
|
||||
'select2' => array( 'allowClear' => 0, 'minimumResultsForSearch' => -1 ),
|
||||
'title' => __( 'Members Default Template' ),
|
||||
'desc' => __( 'This will be the default template to output member directory' ),
|
||||
'default' => um_get_metadefault('directory_template'),
|
||||
'options' => $ultimatemember->shortcodes->get_templates( 'members' ),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
/***
|
||||
*** @
|
||||
***/
|
||||
|
||||
$this->sections[] = array(
|
||||
|
||||
'icon' => 'um-icon-tools',
|
||||
'icon' => 'um-icon-cog-2',
|
||||
'title' => __( 'Advanced'),
|
||||
'fields' => array(
|
||||
|
||||
|
||||
array(
|
||||
'id' => 'allow_tracking',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Allow anonymous tracking' ),
|
||||
'title' => __( 'Allow Tracking' ),
|
||||
'default' => 0,
|
||||
'desc' => 'Help us improve Ultimate Member’s compatibility with other plugins and themes by allowing us to track non-sensitive data on your site. Click <a href="http://ultimatemember.com/tracking/">here</a> to see what data we track.',
|
||||
'on' => 'Allow tracking',
|
||||
'off' => 'Do not allow',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'admin_load_time',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Show load time in admin footer' ),
|
||||
'default' => 0,
|
||||
'desc' => __('Display the number of queries and load time in backend','ultimatemember'),
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'load_time',
|
||||
'type' => 'switch',
|
||||
'title' => __( 'Show load time in frontend' ),
|
||||
'default' => 0,
|
||||
'desc' => __('Display the number of queries and load time in frontend','ultimatemember'),
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user