Dudaevskiy
12/21/2019 - 1:19 PM

WPML - Стандартный щорт код с текстом через CSS без текста и текущего языка

span#SDStudio-WPML-CSS-Switcher {
    display: inline-block;
    height: 38px;
    position: relative;
    margin-top: 0px;
}

span#SDStudio-WPML-CSS-Switcher .wpml-ls-statics-footer.wpml-ls.wpml-ls-legacy-list-horizontal {
    margin-bottom: 0px;
    padding: 0px;
}

div#SDStudio_Custom_Buttons_for_Astra_mobile ul {
    line-height: 15px;
    margin-top: -21px;
}

li.wpml-ls-item-ru a.wpml-ls-link:before {
    content: 'RU';
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    font-family: 'Roboto Slab',serif;
    font-size:25px;
    text-transform:uppercase !important;
    font-weight: bold;
    color: white;
    padding: 5px;
    top: -12px;
    border-radius: 3px;
    margin-bottom: 21px;
}

li.wpml-ls-item-uk a.wpml-ls-link:before {
    content: 'UK';
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    font-family: 'Roboto Slab',serif;
    font-size:25px;
    text-transform:uppercase !important;
    font-weight: bold;
    color: white;
    padding: 5px;
    top: -12px;
    border-radius: 3px;
    margin-bottom: 21px;
}


.ast-sticky-active li.wpml-ls-item-ru a.wpml-ls-link:before {
    color: #4470ff !important;
}


li.wpml-ls-item-ru a.wpml-ls-link img {
    opacity: 0;
    display: none;
}


<?php 
/**
 * Astra - добавление кнопок перед бутером
 */
add_action('astra_masthead_toggle_buttons_before', 'callback_function_name');
function callback_function_name()
{ ?>
    <!--
    Страница хуков Astra:
    https://developers.wpastra.com/theme-visual-hooks/?_ga=2.84071833.1431396652.1575083614-335385242.1575083614

    Примеры рабоыт с хуками:
    https://wpastra.com/docs/using-hooks/
    // Вставить содержимое хука сюда. -->
    <div id="SDStudio_Custom_Buttons_for_Astra_mobile" class="animated fadeIn">
<span class="SDStudio_custom-buttons-mobile-menu" id="SDStudio-WPML-CSS-Switcher">
  <?php echo do_shortcode('[wpml_language_selector_footer display_link_for_current_lang=0 display_names_in_native_lang=0 display_names_in_current_lang=0]');?> 
  </span>
        <a href="tel:+38 050 30 70 972" class="SDStudio_custom-buttons-mobile-menu" target="_blank"><span class="menu-text"><i class="fa fa-phone-square fa-3x" aria-hidden="true"></i></span><span class="sub-arrow"></span></a>

        <a href="#" class="SDStudio_custom-buttons-mobile-menu AddToAny_View"><span class="menu-text"><i class="fa fa-share-alt-square fa-3x" aria-hidden="true"></i></span><span class="sub-arrow"></span></a>
    </div>
        <!--  -->
    <?php
}