mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Update 1.3.29
This commit is contained in:
+20
-7
@@ -32,7 +32,12 @@ class UM_Permalinks {
|
||||
***/
|
||||
function get_current_url( $no_query_params = false ) {
|
||||
global $post;
|
||||
|
||||
|
||||
$server_name_method = ( um_get_option('current_url_method') ) ? um_get_option('current_url_method') : 'SERVER_NAME';
|
||||
|
||||
if ( !isset( $_SERVER['SERVER_NAME'] ) )
|
||||
return '';
|
||||
|
||||
if ( is_front_page() ) :
|
||||
$page_url = home_url();
|
||||
else :
|
||||
@@ -42,10 +47,10 @@ class UM_Permalinks {
|
||||
$page_url .= "s";
|
||||
$page_url .= "://";
|
||||
|
||||
if ( $_SERVER["SERVER_PORT"] != "80" )
|
||||
$page_url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
if ( isset( $_SERVER["SERVER_PORT"] ) && $_SERVER["SERVER_PORT"] != "80" && $_SERVER["SERVER_PORT"] != "443" )
|
||||
$page_url .= $_SERVER[ $server_name_method ].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
else
|
||||
$page_url .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
$page_url .= $_SERVER[ $server_name_method ].$_SERVER["REQUEST_URI"];
|
||||
endif;
|
||||
|
||||
if ( $no_query_params == true ) {
|
||||
@@ -77,6 +82,8 @@ class UM_Permalinks {
|
||||
$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');
|
||||
|
||||
um_reset_user();
|
||||
|
||||
do_action('um_after_email_confirmation', $user_id );
|
||||
|
||||
exit( wp_redirect( $redirect ) );
|
||||
|
||||
@@ -112,7 +119,7 @@ class UM_Permalinks {
|
||||
*** @add a query param to url
|
||||
***/
|
||||
function add_query( $key, $value ) {
|
||||
$this->current_url = esc_url( add_query_arg( $key, $value, $this->current_url ) );
|
||||
$this->current_url = add_query_arg( $key, $value, $this->current_url );
|
||||
return $this->current_url;
|
||||
}
|
||||
/***
|
||||
@@ -129,8 +136,14 @@ class UM_Permalinks {
|
||||
function profile_url() {
|
||||
global $ultimatemember;
|
||||
|
||||
$profile_url = $this->core['user'];
|
||||
$profile_url = get_permalink($profile_url);
|
||||
$page_id = $this->core['user'];
|
||||
$profile_url = get_permalink( $page_id );
|
||||
|
||||
if ( function_exists('icl_get_current_language') && icl_get_current_language() != icl_get_default_language() ) {
|
||||
if ( get_the_ID() > 0 && get_post_meta( get_the_ID(), '_um_wpml_user', true ) == 1 ) {
|
||||
$profile_url = get_permalink( get_the_ID() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( um_get_option('permalink_base') == 'user_login' ) {
|
||||
$user_in_url = um_user('user_login');
|
||||
|
||||
Reference in New Issue
Block a user