예제 #1
0
function display_language_menu($button_style, $style, $display = false)
{
    $menu = "";
    $languages = icl_get_languages('skip_missing=0&orderby=code');
    if (!empty($languages)) {
        $menu .= "<div class='ui dropdown language-menu " . $button_style . ' menu-link ' . Header::scroll_menu_class() . " button' style='" . $style . "'>";
        $menu .= '<i class="translate icon"></i>';
        $menu .= "<div class=\"text\">" . __('Languages', 'sage') . "</div>";
        $menu .= "<div class=\"menu\">";
        foreach ($languages as $lang) {
            if ($lang['active']) {
                $menu .= "<div class='item active'>" . $lang['native_name'] . "</div>";
            } else {
                $menu .= "<a class='item' href='" . $lang['url'] . "'>" . icl_disp_language($lang['native_name'], $lang['translated_name']) . "</a>";
            }
        }
        $menu .= "</div>";
        $menu .= "</div>";
    }
    if (!$display) {
        return $menu;
    }
    echo $menu;
}
예제 #2
0
<?php

$logo_url = Header::get_header_logo_url();
$logo_size = Header::get_header_logo_size();
?>
<header class="ui grid">
    <div class="computer tablet only row">
        <div class="ui <?php 
echo Header::get_menu_style();
?>
 fixed menu navbar">
            <a href="" class="brand item menu-link borderless <?php 
echo Header::scroll_menu_class();
?>
" href="<?php 
echo bloginfo('url');
?>
">
                <img class="ui image <?php 
echo $logo_size;
?>
 logo" src="<?php 
echo $logo_url;
?>
" style='display: block;margin-left: auto;margin-right: auto;'>
            </a>
            <div class="right menu">
                <?php 
echo Menu::get_menu($page_id);
?>
            </div>