View Post button link is getting double language attributes applied
-
Hi,
I’ve been testing out a Polylang, which it appears this plugin has some compatibility with, and noticed that the ‘View Post’ button next to the custom permalink always gets an extra language attribute applied. All other view post links from the standard WordPress editor are NOT affected.
For example, the correct URL might be https://example.com/es/blog/post-name/ but the ‘View Post’ button has https://example.com/es/es/blog/post-name/
I was able to trace the error back to the class-custom-permalinks-form.php file in the get_permalink_html() function. Line 498 – the home url ends in ‘es’ and the $original_permalink starts with ‘es’ resulting in this doubling
} else {
$view_post_link = $home_url . $original_permalink;
}Thank you
The topic ‘View Post button link is getting double language attributes applied’ is closed to new replies.