WPML
Status
Aberto
Relatado para
WPML Multilingual CMS 4.4.10

Visão geral do problema

Se você adicionar um seletor de idiomas em uma área de widget, notará que as opções de cor de Hover não são exibidas no front-end.

Solução alternativa

Para corrigir isso:


  • Antes de prosseguir, faça um backup completo do seu site.

  • Abra o arquivo /wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-inline-styles.php, LINHA 148.

  • Substitua isto:
    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 .= '}';
    }


  • Por:
    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 .= '}';
    }


  • Em seguida, procure a linha 141.

  • Substitua isto:
    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 .= '}';
    }


  • Por:
    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 .= '}';
    }

Todos os problemas conhecidos →