Open
Reported for: WPML Multilingual CMS 4.4.10
Overview of the issue
If you add a language switcher in a widget area, you will notice that the Hover color options are not displayed in front-end.
Workaround
To fix this:
- Please, before proceeding make a full backup of your site.
- Open your /wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-inline-styles.php, LINE 148.
- Replace this:
if ( $slot->get( 'font_other_hover' ) || $slot->get( 'background_other_hover' ) ) { $css .= "$wrapper_class a:hover,$wrapper_class a:focus {"; $css .= $slot->get( 'font_other_hover' ) ? "color:{$slot->get( 'font_other_hover' )};" : ''; $css .= $slot->get( 'background_other_hover' ) ? "background-color:{$slot->get( 'background_other_hover' )};" : ''; $css .= '}'; }
- With:
if ( $slot->get( 'font_other_hover' ) || $slot->get( 'background_other_hover' ) ) { $css .= "$wrapper_class .wpml-ls-item a:hover,$wrapper_class .wpml-ls-item a:focus {"; $css .= $slot->get( 'font_other_hover' ) ? "color:{$slot->get( 'font_other_hover' )};" : ''; $css .= $slot->get( 'background_other_hover' ) ? "background-color:{$slot->get( 'background_other_hover' )};" : ''; $css .= '}'; }
- Then look for line 141.
- Replace this:
if ( $slot->get( 'font_other_normal' ) || $slot->get( 'background_other_normal' ) ) { $css .= "$wrapper_class>a:link {"; $css .= $slot->get( 'font_other_normal' ) ? "color:{$slot->get( 'font_other_normal' )};" : ''; $css .= $slot->get( 'background_other_normal' ) ? "background-color:{$slot->get( 'background_other_normal' )};" : ''; $css .= '}'; }
- With:
if ( $slot->get( 'font_other_normal' ) || $slot->get( 'background_other_normal' ) ) { $css .= "$wrapper_class .wpml-ls-item a:link {"; $css .= $slot->get( 'font_other_normal' ) ? "color:{$slot->get( 'font_other_normal' )};" : ''; $css .= $slot->get( 'background_other_normal' ) ? "background-color:{$slot->get( 'background_other_normal' )};" : ''; $css .= '}'; }