if (get_the_ID() == $staticVars['lithuanianFilmsSearchPageId'] || get_post_type() == $g_lithuanianFilms->cptSlug) { echo do_shortcode('[lithuanian_films_paieskos_forma]'); } the_widget('TribeEventsListWidget', array("title" => pll__('Artimiausi renginiai')), array('before_title' => '<header class="upcoming-events-header"><h3 class="widget-title">', 'after_title' => '</h3></header>', 'before_widget' => '<aside class="widget clearfix upcoming-events">', 'after_widget' => '</aside>')); ?> <hr class="double-hr" /> <?php kcsite_sidebar_poll(); ?> <ul class="sidebar-right-banners widget"> <?php $lang_slug = kcsite_get_lang_slug(); $banners_number_option = of_get_option('kcsite_right_sidebar_banners_number' . $lang_slug); $banners_number = intval(is_numeric($banners_number_option) && $banners_number_option > 0 ? $banners_number_option : 0); for ($i = 0; $i < $banners_number; $i++) { ?> <?php if (!of_get_option('kcsite_rb_hide_' . $lang_slug . $i)) { ?> <li> <a href="<?php echo esc_url(of_get_option('right_sidebar_banner_link_' . $lang_slug . $i)); ?> " <?php if (of_get_option('right_sidebar_banner_link_new_window_' . $lang_slug . $i) == 1) { echo 'target="_blank"'; }
/** * If we have static url without locale, make it have corresponding to the language locale in the url * ex. localhost/lkc/renginiai => localhost/lkc/en/renginiai */ function kcsite_multilingualizeUrl($url) { //$url = 'http://www.lkc.srv7.321.lt/renginiai/2013-02/'; $locale = kcsite_get_lang_slug(); if ($locale == '') { return $url; } $siteUrl = get_bloginfo('siteurl'); //$siteUrl = 'http://www.lkc.srv7.321.lt'; $secondPart = substr($url, strlen($siteUrl) - 3); //bloginfo return url with locale already /* echo $siteUrl; echo '---'; echo $secondPart; echo '---'; echo $url; exit;*/ //return $siteUrl . '/' . kcsite_get_lang_slug() . $secondPart; return $siteUrl . $secondPart; //return $siteUrl; }