Problem with dashboard class on multilanguage page
-
then switching between languages having active dashboard open then on some other languages it open broken dashboard page, i found out that “dokan-dashboard” class was missing on others languages neither on default one. looking deeply found that dokan-wpml plugin function add_dashboard_template_class_if_wpml had some incorrect logic, it always takes default translated page and compares to current page and it is always false, but should take default page, find out related translation id and validate.
was
if ( ( $current_page_id == $page_id ) ) { //default language page compares with current translated page and always false only if current languge !== default language
became
if ( ( $current_page_id == $post->ID ) ) { // translated page == current page
- The topic ‘Problem with dashboard class on multilanguage page’ is closed to new replies.