- fixed user permalinks on fresh install;

This commit is contained in:
nikitozzzzzzz
2018-03-06 17:54:40 +02:00
parent 6f97449626
commit 3ba053dc16
2 changed files with 9 additions and 4 deletions
+6 -1
View File
@@ -230,10 +230,15 @@ if ( ! class_exists( 'Rewrite' ) ) {
$query = UM()->permalinks()->get_query_array();
$url = um_user_profile_url();
if ( empty( $url ) ) {
//if empty profile slug - generate it and re-get profile URL
UM()->user()->generate_profile_slug( um_user( 'ID' ) );
$url = um_user_profile_url();
}
if ( $query ) {
foreach ( $query as $key => $val ) {
$url = add_query_arg( $key, $val, $url );
$url = add_query_arg( $key, $val, $url );
}
}