This code checks if the WordPress multilingual plugin “WPML” is installed on the website. If it is, it sets the current language to English. icl_object_id is a function of WPML used to retrieve the translated version of an object or post. icl_get_current_language retrieves the current language of the page and icl_set_current_language sets the current language of the page to the specified language.
Was this code snippet helpful?
YesNo