From d1e9184e8b93b13c6ef643e98a5f95459d586d31 Mon Sep 17 00:00:00 2001
From: Vasil Kolev
Date: Thu, 9 Oct 2014 21:23:38 +0300
Subject: [PATCH] fixes for pll
---
footer.php | 6 +++---
functions.php | 40 ++++++++++++++++++++++++++++------------
header.php | 2 +-
3 files changed, 32 insertions(+), 16 deletions(-)
diff --git a/footer.php b/footer.php
index 0f8eb4c..580c779 100644
--- a/footer.php
+++ b/footer.php
@@ -9,19 +9,19 @@
-
+
'footer-followus', 'items_wrap' => '%3$s
' )); ?>
diff --git a/functions.php b/functions.php
index d734b26..2f2d521 100644
--- a/functions.php
+++ b/functions.php
@@ -222,19 +222,35 @@ function openfest_home_page() {
return !($wp->query_vars['pagename']=='home' || $wp->query_vars['pagename']=='home-2');
}
-add_action( 'init', 'transportation_posttype' );
-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','Новини');
+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','Последвайте ни в:');
+ 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','Новини');
+}
?>
diff --git a/header.php b/header.php
index 28b9512..d142a0e 100644
--- a/header.php
+++ b/header.php
@@ -32,6 +32,6 @@
';
+ echo '
';
}
?>