mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember
This commit is contained in:
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
+119
-119
@@ -7,10 +7,12 @@
|
||||
function um_submit_account_details( $args ) {
|
||||
global $ultimatemember;
|
||||
|
||||
$tab = ( get_query_var('um_tab') ) ? get_query_var('um_tab') : 'general';
|
||||
|
||||
if ( $_POST['user_password'] && $_POST['confirm_user_password'] ) {
|
||||
$changes['user_pass'] = $_POST['user_password'];
|
||||
add_filter('send_password_change_email','um_send_password_change_email');
|
||||
|
||||
|
||||
}
|
||||
|
||||
foreach( $_POST as $k => $v ) {
|
||||
@@ -18,7 +20,7 @@
|
||||
$changes[ $k ] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( isset( $changes['hide_in_members'] ) && $changes['hide_in_members'] == __('No','ultimatemember') ) {
|
||||
delete_user_meta( um_user('ID'), 'hide_in_members' );
|
||||
unset( $changes['hide_in_members'] );
|
||||
@@ -26,11 +28,11 @@
|
||||
|
||||
// fired on account page, just before updating profile
|
||||
do_action('um_account_pre_update_profile', $changes, um_user('ID') );
|
||||
|
||||
|
||||
$ultimatemember->user->update_profile( $changes );
|
||||
|
||||
// delete account
|
||||
if ( $_POST['single_user_password'] && isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account','ultimatemember') ) {
|
||||
if ( $_POST['single_user_password'] && $tab == 'delete' ) {
|
||||
if ( current_user_can('delete_users') || um_user('can_delete_profile') ) {
|
||||
if ( !um_user('super_admin') ) {
|
||||
$ultimatemember->user->delete();
|
||||
@@ -44,17 +46,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
do_action('um_post_account_update');
|
||||
|
||||
|
||||
do_action('um_after_user_account_updated', get_current_user_id() );
|
||||
|
||||
$tab = ( get_query_var('um_tab') ) ? get_query_var('um_tab') : 'general';
|
||||
|
||||
|
||||
$url = $ultimatemember->account->tab_link( $tab );
|
||||
|
||||
|
||||
$url = add_query_arg( 'updated', 'account', $url );
|
||||
|
||||
|
||||
if ( function_exists('icl_get_current_language') ) {
|
||||
if ( icl_get_current_language() != icl_get_default_language() ) {
|
||||
$url = $ultimatemember->permalinks->get_current_url( true );
|
||||
@@ -62,76 +62,76 @@
|
||||
exit( wp_redirect( $url ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
exit( wp_redirect( $url ) );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @validate for errors in account page
|
||||
***/
|
||||
add_action('um_submit_account_errors_hook','um_submit_account_errors_hook');
|
||||
function um_submit_account_errors_hook( $args ) {
|
||||
global $ultimatemember;
|
||||
|
||||
|
||||
// errors on general tab
|
||||
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] != __('Delete Account','ultimatemember') ) {
|
||||
|
||||
|
||||
if ( isset($_POST['first_name']) && strlen(trim( $_POST['first_name'] ) ) == 0 ) {
|
||||
$ultimatemember->form->add_error('first_name', __('You must provide your first name','ultimatemember') );
|
||||
}
|
||||
|
||||
|
||||
if ( isset($_POST['last_name']) && strlen(trim( $_POST['last_name'] ) ) == 0 ) {
|
||||
$ultimatemember->form->add_error('last_name', __('You must provide your last name','ultimatemember') );
|
||||
}
|
||||
|
||||
|
||||
if ( isset($_POST['user_email']) && strlen(trim( $_POST['user_email'] ) ) == 0 ) {
|
||||
$ultimatemember->form->add_error('user_email', __('You must provide your e-mail','ultimatemember') );
|
||||
}
|
||||
|
||||
|
||||
if ( isset($_POST['user_email']) && !is_email( $_POST['user_email'] ) ) {
|
||||
$ultimatemember->form->add_error('user_email', __('Please provide a valid e-mail','ultimatemember') );
|
||||
}
|
||||
|
||||
|
||||
if ( email_exists( $_POST['user_email'] ) && email_exists( $_POST['user_email'] ) != get_current_user_id() ) {
|
||||
$ultimatemember->form->add_error('user_email', __('Email already linked to another account','ultimatemember') );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
$ultimatemember->account->current_tab = 'general';
|
||||
|
||||
|
||||
// change password
|
||||
if ( $_POST['current_user_password'] != '' ) {
|
||||
if ( !wp_check_password( $_POST['current_user_password'], um_user('user_pass'), um_user('ID') ) ) {
|
||||
$ultimatemember->form->add_error('current_user_password', __('This is not your password','ultimatemember') );
|
||||
$ultimatemember->account->current_tab = 'password';
|
||||
} else { // correct password
|
||||
|
||||
|
||||
if ( $_POST['user_password'] != $_POST['confirm_user_password'] && $_POST['user_password'] ) {
|
||||
$ultimatemember->form->add_error('user_password', __('Your new password does not match','ultimatemember') );
|
||||
$ultimatemember->account->current_tab = 'password';
|
||||
}
|
||||
|
||||
|
||||
if ( um_get_option('account_require_strongpass') ) {
|
||||
|
||||
|
||||
if ( strlen( utf8_decode( $_POST['user_password'] ) ) < 8 ) {
|
||||
$ultimatemember->form->add_error('user_password', __('Your password must contain at least 8 characters','ultimatemember') );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( strlen( utf8_decode( $_POST['user_password'] ) ) > 30 ) {
|
||||
$ultimatemember->form->add_error('user_password', __('Your password must contain less than 30 characters','ultimatemember') );
|
||||
}
|
||||
|
||||
|
||||
if ( !$ultimatemember->validation->strong_pass( $_POST['user_password'] ) ) {
|
||||
$ultimatemember->form->add_error('user_password', __('Your password must contain at least one lowercase letter, one capital letter and one number','ultimatemember') );
|
||||
$ultimatemember->account->current_tab = 'password';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// delete account
|
||||
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account','ultimatemember') ) {
|
||||
if ( strlen(trim( $_POST['single_user_password'] ) ) == 0 ) {
|
||||
@@ -143,23 +143,23 @@
|
||||
}
|
||||
$ultimatemember->account->current_tab = 'delete';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @hidden inputs for account page
|
||||
***/
|
||||
add_action('um_account_page_hidden_fields','um_account_page_hidden_fields');
|
||||
function um_account_page_hidden_fields( $args ) {
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<input type="hidden" name="_um_account" id="_um_account" value="1" />
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @display tab "Delete"
|
||||
***/
|
||||
@@ -167,27 +167,27 @@
|
||||
function um_account_tab__delete( $info ) {
|
||||
global $ultimatemember;
|
||||
extract( $info );
|
||||
|
||||
|
||||
$output = $ultimatemember->account->get_tab_output('delete');
|
||||
|
||||
|
||||
if ( $output ) { ?>
|
||||
|
||||
|
||||
<div class="um-account-heading uimob300-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
||||
|
||||
|
||||
<?php echo wpautop( um_get_option('delete_account_text') ); ?>
|
||||
|
||||
|
||||
<?php echo $output; ?>
|
||||
|
||||
|
||||
<?php do_action('um_after_account_delete'); ?>
|
||||
|
||||
|
||||
<div class="um-col-alt um-col-alt-b">
|
||||
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Delete Account','ultimatemember'); ?>" class="um-button" /></div>
|
||||
<?php do_action('um_after_account_delete_button'); ?>
|
||||
<div class="um-clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -199,25 +199,25 @@
|
||||
function um_account_tab__privacy( $info ) {
|
||||
global $ultimatemember;
|
||||
extract( $info );
|
||||
|
||||
|
||||
$output = $ultimatemember->account->get_tab_output('privacy');
|
||||
|
||||
if ( $output ) { ?>
|
||||
|
||||
|
||||
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
||||
|
||||
|
||||
<?php echo $output; ?>
|
||||
|
||||
|
||||
<?php do_action('um_after_account_privacy'); ?>
|
||||
|
||||
|
||||
<div class="um-col-alt um-col-alt-b">
|
||||
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Privacy','ultimatemember'); ?>" class="um-button" /></div>
|
||||
<?php do_action('um_after_account_privacy_button'); ?>
|
||||
<div class="um-clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -231,27 +231,27 @@
|
||||
extract( $info );
|
||||
|
||||
$output = $ultimatemember->account->get_tab_output('general');
|
||||
|
||||
|
||||
if ( $output ) { ?>
|
||||
|
||||
|
||||
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
||||
|
||||
|
||||
<?php echo $output; ?>
|
||||
|
||||
|
||||
<?php do_action('um_after_account_general'); ?>
|
||||
|
||||
|
||||
<div class="um-col-alt um-col-alt-b">
|
||||
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Account','ultimatemember'); ?>" class="um-button" /></div>
|
||||
<?php do_action('um_after_account_general_button'); ?>
|
||||
<div class="um-clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @display tab "Password"
|
||||
***/
|
||||
@@ -259,29 +259,29 @@
|
||||
function um_account_tab__password( $info ) {
|
||||
global $ultimatemember;
|
||||
extract( $info );
|
||||
|
||||
|
||||
$output = $ultimatemember->account->get_tab_output('password');
|
||||
|
||||
|
||||
if ( $output ) { ?>
|
||||
|
||||
|
||||
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
||||
|
||||
|
||||
<?php echo $output; ?>
|
||||
|
||||
|
||||
<?php do_action('um_after_account_password'); ?>
|
||||
|
||||
|
||||
<div class="um-col-alt um-col-alt-b">
|
||||
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Password','ultimatemember'); ?>" class="um-button" /></div>
|
||||
<?php do_action('um_after_account_password_button'); ?>
|
||||
<div class="um-clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @display tab "Notifications"
|
||||
***/
|
||||
@@ -289,35 +289,35 @@
|
||||
function um_account_tab__notifications( $info ) {
|
||||
global $ultimatemember;
|
||||
extract( $info );
|
||||
|
||||
|
||||
$output = $ultimatemember->account->get_tab_output('notifications');
|
||||
|
||||
|
||||
if ( $output ) { ?>
|
||||
|
||||
|
||||
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
||||
|
||||
|
||||
<?php if ( class_exists('UM_Messaging_API') || class_exists('UM_Followers_API') ) { ?>
|
||||
<div class="um-field">
|
||||
<div class="um-field-label"><label for=""><?php _e('Email me when','ultimatemember'); ?></label><div class="um-clear"></div></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php echo $output; ?>
|
||||
|
||||
|
||||
<?php do_action('um_after_account_notifications'); ?>
|
||||
|
||||
|
||||
<div class="um-col-alt um-col-alt-b">
|
||||
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Notifications','ultimatemember'); ?>" class="um-button" /></div>
|
||||
<?php do_action('um_after_account_notifications_button'); ?>
|
||||
<div class="um-clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @display account photo and username
|
||||
***/
|
||||
@@ -325,24 +325,24 @@
|
||||
function um_account_user_photo_hook__mobile( $args ) {
|
||||
global $ultimatemember;
|
||||
extract( $args );
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="um-account-meta radius-<?php echo um_get_option('profile_photocorner'); ?> uimob340-show uimob500-show">
|
||||
|
||||
|
||||
<div class="um-account-meta-img"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
||||
|
||||
|
||||
<div class="um-account-name">
|
||||
<a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name'); ?></a>
|
||||
<div class="um-account-profile-link"><a href="<?php echo um_user_profile_url(); ?>" class="um-link"><?php _e('View profile','ultimatemember'); ?></a></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @display account photo and username
|
||||
***/
|
||||
@@ -350,34 +350,34 @@
|
||||
function um_account_user_photo_hook( $args ) {
|
||||
global $ultimatemember;
|
||||
extract( $args );
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="um-account-meta radius-<?php echo um_get_option('profile_photocorner'); ?>">
|
||||
|
||||
|
||||
<div class="um-account-meta-img uimob800-hide"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
||||
|
||||
|
||||
<?php if ( $ultimatemember->mobile->isMobile() ) { ?>
|
||||
|
||||
|
||||
<div class="um-account-meta-img-b uimob800-show" title="<?php echo um_user('display_name'); ?>"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
||||
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
|
||||
<div class="um-account-meta-img-b uimob800-show um-tip-w" title="<?php echo um_user('display_name'); ?>"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="um-account-name uimob800-hide">
|
||||
<a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name', 'html'); ?></a>
|
||||
<div class="um-account-profile-link"><a href="<?php echo um_user_profile_url(); ?>" class="um-link"><?php _e('View profile','ultimatemember'); ?></a></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @display account page tabs
|
||||
***/
|
||||
@@ -385,49 +385,49 @@
|
||||
function um_account_display_tabs_hook( $args ) {
|
||||
global $ultimatemember;
|
||||
extract( $args );
|
||||
|
||||
|
||||
$ultimatemember->account->tabs = apply_filters('um_account_page_default_tabs_hook', $tabs=array() );
|
||||
|
||||
|
||||
ksort( $ultimatemember->account->tabs );
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
foreach( $ultimatemember->account->tabs as $k => $arr ) {
|
||||
foreach( $arr as $id => $info ) { extract( $info );
|
||||
|
||||
|
||||
foreach( $ultimatemember->account->tabs as $k => $arr ) {
|
||||
foreach( $arr as $id => $info ) { extract( $info );
|
||||
|
||||
$current_tab = $ultimatemember->account->current_tab;
|
||||
|
||||
|
||||
if ( isset($info['custom']) || um_get_option('account_tab_'.$id ) == 1 || $id == 'general' ) { ?>
|
||||
|
||||
|
||||
<li>
|
||||
<a data-tab="<?php echo $id; ?>" href="<?php echo $ultimatemember->account->tab_link($id); ?>" class="um-account-link <?php if ( $id == $current_tab ) echo 'current'; ?>">
|
||||
|
||||
|
||||
<?php if ( $ultimatemember->mobile->isMobile() ) { ?>
|
||||
<span class="um-account-icontip uimob800-show" title="<?php echo $title; ?>"><i class="<?php echo $icon; ?>"></i></span>
|
||||
<?php } else { ?>
|
||||
<span class="um-account-icontip uimob800-show um-tip-w" title="<?php echo $title; ?>"><i class="<?php echo $icon; ?>"></i></span>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<span class="um-account-icon uimob800-hide"><i class="<?php echo $icon; ?>"></i></span>
|
||||
<span class="um-account-title uimob800-hide"><?php echo $title; ?></span>
|
||||
<span class="um-account-arrow uimob800-hide"><?php echo ( is_rtl() ) ? '<i class="um-faicon-angle-left"></i>' : '<i class="um-faicon-angle-right"></i>'; ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
if ( isset( $fields ) && is_array( $fields ) ) {
|
||||
foreach( $fields as $key => $array ) {
|
||||
|
||||
if( !um_user_can( 'can_edit_everyone' ) && !$fields[$key]['editable'] ) continue;
|
||||
|
||||
if ( $fields[$key]['type'] == 'multiselect' || $fields[$key]['type'] == 'checkbox' && !isset($args['submitted'][$key]) ) {
|
||||
delete_user_meta( um_user('ID'), $key );
|
||||
}
|
||||
|
||||
@@ -1050,6 +1050,7 @@ class UM_Builtin {
|
||||
global $ultimatemember;
|
||||
|
||||
$fields_without_metakey = array('block','shortcode','spacing','divider','group');
|
||||
remove_filter('um_fields_without_metakey', 'um_user_tags_requires_no_metakey');
|
||||
$fields_without_metakey = apply_filters('um_fields_without_metakey', $fields_without_metakey );
|
||||
|
||||
if ( !$show_all ) {
|
||||
|
||||
+2
-14
@@ -94,7 +94,7 @@ class UM_Enqueue {
|
||||
|
||||
} else {
|
||||
|
||||
wp_register_script('um_minified', um_url . 'assets/js/um.min.js', array('jquery'), ultimatemember_version, true );
|
||||
wp_register_script('um_minified', um_url . 'assets/js/um.min.js', array('jquery', 'jquery-masonry'), ultimatemember_version, true );
|
||||
wp_enqueue_script('um_minified');
|
||||
|
||||
wp_localize_script( 'um_minified', 'um_scripts', array(
|
||||
@@ -153,8 +153,6 @@ class UM_Enqueue {
|
||||
|
||||
$this->load_imagecrop();
|
||||
|
||||
$this->load_masonry();
|
||||
|
||||
$this->load_tipsy();
|
||||
|
||||
$this->load_functions();
|
||||
@@ -202,7 +200,7 @@ class UM_Enqueue {
|
||||
***/
|
||||
function load_selectjs(){
|
||||
|
||||
wp_register_script('um_select', um_url . 'assets/js/um-select.js', array('jquery') );
|
||||
wp_register_script('um_select', um_url . 'assets/js/um-select.js', array('jquery', 'jquery-masonry') );
|
||||
wp_enqueue_script('um_select');
|
||||
|
||||
wp_register_style('um_select', um_url . 'assets/css/um-select.css' );
|
||||
@@ -348,16 +346,6 @@ class UM_Enqueue {
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Load masonry
|
||||
***/
|
||||
function load_masonry(){
|
||||
|
||||
wp_register_script('um_masonry', um_url . 'assets/js/um-masonry.js' );
|
||||
wp_enqueue_script('um_masonry');
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Load tipsy
|
||||
***/
|
||||
|
||||
+14
-13
@@ -5,18 +5,19 @@
|
||||
***/
|
||||
add_filter('um_profile_tabs', 'um_profile_tabs', 1 );
|
||||
function um_profile_tabs( $tabs ) {
|
||||
|
||||
|
||||
$tabs['main'] = array(
|
||||
'name' => __('About','ultimatemember'),
|
||||
'icon' => 'um-faicon-user'
|
||||
);
|
||||
|
||||
|
||||
return $tabs;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @dynamic profile page title
|
||||
***/
|
||||
add_filter('wp_title', 'um_dynamic_user_profile_pagetitle', 10, 2 );
|
||||
add_filter('pre_get_document_title', 'um_dynamic_user_profile_pagetitle', 100000, 2 );
|
||||
function um_dynamic_user_profile_pagetitle( $title, $sep = '' ) {
|
||||
global $paged, $page, $ultimatemember;
|
||||
@@ -24,27 +25,27 @@
|
||||
$profile_title = um_get_option('profile_title');
|
||||
|
||||
if ( um_is_core_page('user') && um_get_requested_user() ) {
|
||||
|
||||
|
||||
um_fetch_user( um_get_requested_user() );
|
||||
|
||||
|
||||
$profile_title = um_convert_tags( $profile_title );
|
||||
|
||||
|
||||
$title = $profile_title;
|
||||
|
||||
|
||||
um_reset_user();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @try and modify the page title in page
|
||||
***/
|
||||
add_filter('the_title', 'um_dynamic_user_profile_title', 100000, 2 );
|
||||
function um_dynamic_user_profile_title( $title, $id = '' ) {
|
||||
global $ultimatemember;
|
||||
|
||||
|
||||
if( is_admin() )
|
||||
return $title;
|
||||
|
||||
@@ -55,6 +56,6 @@
|
||||
$title = um_get_display_name( get_current_user_id() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (strlen($title)!==strlen(utf8_decode($title))) ? $title : utf8_encode($title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,9 @@ class UM_Members {
|
||||
|
||||
if ( $ultimatemember->builtin->is_dropdown_field( $filter, $attrs ) ) {
|
||||
$type = 'select';
|
||||
} else if ( 'user_tags' == $attrs['type'] ) {
|
||||
$attrs['options'] = apply_filters('um_multiselect_options_user_tags', array(), $attrs);
|
||||
$type = 'select';
|
||||
} else {
|
||||
$type = 'text';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user