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

View File

@ -222,19 +222,35 @@ function openfest_home_page() {
return !($wp->query_vars['pagename']=='home' || $wp->query_vars['pagename']=='home-2'); return !($wp->query_vars['pagename']=='home' || $wp->query_vars['pagename']=='home-2');
} }
add_action( 'init', 'transportation_posttype' ); function of_get_lang() {
pll_register_string('Schedule','Програма'); if (function_exists("pll_current_language"))
pll_register_string('Others','Други'); return pll_current_language('slug');
pll_register_string('follow','Последвайте ни в:'); else
pll_register_string('venue','Интерпред, София, България'); return 'bg';
pll_register_string('venue_w','Място'); }
pll_register_string('sponsors_w','Спонсори');
pll_register_string('time','1-ви и 2-ри ноември 2014 г.');
pll_register_string('publishedon','Публикувано на');
pll_register_string('by_w','От');
pll_register_string('see_whole_news','виж цялата новина');
pll_register_string('news','Новини');
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','Последвайте ни в:');
pll_register_string('venue','Интерпред, София, България');
pll_register_string('venue_w','Място');
pll_register_string('sponsors_w','Спонсори');
pll_register_string('time','1-ви и 2-ри ноември 2014 г.');
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> </nav>
<?php <?php
if(openfest_home_page()){ 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>';
} }
?> ?>