- fixed canonical link in profile translated with WPML

This commit is contained in:
dbaranov
2021-11-30 23:12:36 +02:00
parent 7fac6d81c3
commit 2e95891c3c
+1 -1
View File
@@ -79,7 +79,7 @@ add_filter( 'the_title', 'um_dynamic_user_profile_title', 100000, 2 );
* @return string|false The canonical URL, or false if current URL is canonical.
*/
function um_get_canonical_url( $canonical_url, $post ) {
if ( UM()->config()->permalinks['user'] == $post->ID ) {
if ( UM()->config()->permalinks['user'] == $post->ID || (UM()->external_integrations()->is_wpml_active() && UM()->config()->permalinks['user'] == wpml_object_id_filter( $post->ID, 'page', true, icl_get_default_language() )) ) {
/**
* UM hook