mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 21:53:43 +09:00
Fix profile permalink in a multi-site setup
This commit is contained in:
@@ -79,8 +79,8 @@ class UM_Permalinks {
|
||||
$page_url .= '?' . $_SERVER['QUERY_STRING'];
|
||||
}
|
||||
}else {
|
||||
|
||||
if( $_SERVER[ $server_name_method ] == "localhost" ){
|
||||
|
||||
if( um_core_is_local() ){
|
||||
|
||||
$page_url = 'http';
|
||||
|
||||
|
||||
@@ -1726,4 +1726,15 @@ function um_fetch_user( $user_id ) {
|
||||
}
|
||||
|
||||
return $loop;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if running local
|
||||
* @return boolean
|
||||
*/
|
||||
function um_core_is_local() {
|
||||
if( $_SERVER['HTTP_HOST'] == 'localhost'
|
||||
|| substr($_SERVER['HTTP_HOST'],0,3) == '10.'
|
||||
|| substr($_SERVER['HTTP_HOST'],0,7) == '192.168') return true;
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user