diff --git a/core/um-fields.php b/core/um-fields.php index 1e7701e2..55674576 100644 --- a/core/um-fields.php +++ b/core/um-fields.php @@ -482,8 +482,6 @@ class UM_Fields { if ( isset( $ultimatemember->form->post_form[$key] ) && is_array( $ultimatemember->form->post_form[$key] ) ) { - echo ""; - if ( in_array( $value, $ultimatemember->form->post_form[$key] ) ){ return true; } @@ -500,6 +498,10 @@ class UM_Fields { $um_user_value = um_user( $key ); + if( $key == 'role' ){ + $um_user_value = strtolower( $um_user_value ); + } + if ( $um_user_value == $value ) { return true; } diff --git a/core/um-short-functions.php b/core/um-short-functions.php index 4edf9195..69fbde5c 100644 --- a/core/um-short-functions.php +++ b/core/um-short-functions.php @@ -203,8 +203,8 @@ ); $replace = apply_filters('um_template_tags_replaces_hook', $replace); - - $content = wp_kses_decode_entities( str_replace($search, $replace, $content) ); + + $content = wp_kses_decode_entities( str_replace($search, $replace, $content) ); if ( isset( $args['tags'] ) && isset( $args['tags_replace'] ) ) { $content = str_replace($args['tags'], $args['tags_replace'], $content); @@ -1363,11 +1363,11 @@ function um_fetch_user( $user_id ) { $value = unserialize( $value ); } - if( $data == 'role' ){ + if( in_array( $data, array('role','gender') ) ){ if( is_array( $value ) ){ $value = implode(",", $value ); } - return strtolower($value); + return $value; } return $value; @@ -1597,6 +1597,7 @@ function um_fetch_user( $user_id ) { break; + } }