- ステータス
- 未解決
- 報告対象
- WPML Multilingual CMS 4.4.10
問題の概要
ウィジェットエリアに言語スイッチャーを追加すると、フロントエンドでHoverカラーオプションが表示されないことがわかります。
回避策
この問題を修正するには:
- 続行する前に、サイトの完全なバックアップを作成してください。
- /wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-inline-styles.phpの148行目を開きます。
- 以下のコードを:
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 .= '}'; } - 次のコードに置き換えます:
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 .= '}'; } - 次に、141行目を探します。
- 以下のコードを:
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 .= '}'; } - 次のコードに置き換えます:
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 .= '}'; }