fixes for pll

This commit is contained in:
Vasil Kolev 2014-10-09 21:23:38 +03:00 committed by Openfest
parent 97953773be
commit d1e9184e8b
3 changed files with 32 additions and 16 deletions

View File

@ -9,19 +9,19 @@
</p>
</div>
<div class="col4">
<h3><?php pll_e('Програма')?></h3>
<h3><?php e_('Програма')?></h3>
<p>
<?php wp_nav_menu(array('theme_location' => 'footer-schedule', 'items_wrap' => '%3$s<br/>' )); ?>
</p>
</div>
<div class="col4">
<h3><?php pll_e('Други')?></h3>
<h3><?php e_('Други')?></h3>
<p>
<?php wp_nav_menu(array('theme_location' => 'footer-others', 'items_wrap' => '%3$s<br/>' )); ?>
</p>
</div>
<div class="col4">
<h3><?php pll_e('Последвайте ни в:')?></h3>
<h3><?php e_('Последвайте ни в:')?></h3>
<p>
<?php wp_nav_menu(array('theme_location' => 'footer-followus', 'items_wrap' => '%3$s<br/>' )); ?>
</p>

View File

@ -222,7 +222,23 @@ function openfest_home_page() {
return !($wp->query_vars['pagename']=='home' || $wp->query_vars['pagename']=='home-2');
}
function of_get_lang() {
if (function_exists("pll_current_language"))
return pll_current_language('slug');
else
return 'bg';
}
function e_($word) {
if (function_exists("pll_e"))
return pll_e($word);
else
echo $word;
}
add_action( 'init', 'transportation_posttype' );
if (function_exists("pll_register_string")) {
pll_register_string('Schedule','Програма');
pll_register_string('Others','Други');
pll_register_string('follow','Последвайте ни в:');
@ -234,7 +250,7 @@ pll_register_string('publishedon','Публикувано на');
pll_register_string('by_w','От');
pll_register_string('see_whole_news','виж цялата новина');
pll_register_string('news','Новини');
}
?>

View File

@ -32,6 +32,6 @@
</nav>
<?php
if(openfest_home_page()){
echo '<section class="banner cf"><img src="'.get_template_directory_uri().'/img/banner-'.pll_current_language('slug').'.png" alt="" /></section>';
echo '<section class="banner cf"><img src="'.get_template_directory_uri().'/img/banner-'.of_get_lang().'.png" alt="" /></section>';
}
?>