Fix redirect loop with wpml permalink

This commit is contained in:
champsupertramp
2016-02-01 21:10:24 +08:00
parent 0e3a74ae2c
commit a2b78dd5dc
+5 -3
View File
@@ -516,10 +516,12 @@ function um_profile_id() {
return true;
if ( isset($post->ID) && get_post_meta( $post->ID, '_um_wpml_' . $page, true ) == 1 )
return true;
if ( isset( $ultimatemember->permalinks->core[ $page ] )
&& get_post_meta( $post->ID, '_icl_lang_duplicate_of', true ) == $ultimatemember->permalinks->core[ $page ] )
$_icl_lang_duplicate_of = get_post_meta( $post->ID, '_icl_lang_duplicate_of', true );
if ( isset($post->ID) && isset( $ultimatemember->permalinks->core[ $page ] ) && ( ( $_icl_lang_duplicate_of == $ultimatemember->permalinks->core[ $page ] && ! empty( $_icl_lang_duplicate_of ) ) || $ultimatemember->permalinks->core[ $page ] == $post->ID ) )
return true;
return false;
}