admin管理员组文章数量:1415100
I would like to change the logged in user's language (if someone is logged in) when they change the language in front-end.
I'm using the WPML Multilingual CMS plugin in my Wordpress website.
I've tried to add this code in my custom plugin:
add_action('wpml_language_has_switched', 'change_user_language_in_database');
function change_user_language_in_database()
{
die("test function");
}
The problem is that this function is always triggered. Also when the language isn't switched.
The version of WPML Multilingual CMS plugin is 4.2.7.1.
What am I doing wrong?
本文标签: pluginsWPMLHook when language is switched (change user language)
版权声明:本文标题:plugins - WPML - Hook when language is switched (change user language) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745153651a2645036.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论