wp-multilang
wp-multilang copied to clipboard
Proper Edit link in Admin bar
When you click Edit link in Admin bar, the editor does not always open in the language of the article.
For example, you are viewing an article in Russian language and click 'Edit post', the editor can open English version. To fix this, add the following to you functions.php of the theme.
// Fix post edit link
if ( function_exists('wpm_get_language') ) add_filter('get_edit_post_link', function ($link, $post_id, $context) {
return strpos($link, '&edit_lang=') ? $link : $link.'&edit_lang='.wpm_get_language();
}, 99, 3);
Thank you ram108 for this contribution. Hope Valentyn will update soon. Cheers,
Hope Valentyn will update soon. It were no updates since 1y already. I dont think this project is alive.