From 80a1dee4b03121139bef740af1c3f19050ae041a Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Wed, 23 May 2018 23:01:48 +0300 Subject: [PATCH] shortcode_attrs got changed in this version --- functions.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 41c624f..086f5d3 100644 --- a/functions.php +++ b/functions.php @@ -27,10 +27,14 @@ add_action( 'init', 'register_shortcodes'); function sh_latest_posts($atts){ - $atts = shortcode_atts( array( - 'cat' => 'news', + if (of_get_lang()=='bg') + $ncat = "news-bg"; + else + $ncat = "news"; + $atts = array( + 'cat' => $ncat, 'label' => __('News', 'initfest') - ), $atts ); + ); $result = '

'.$atts['label'].' | '.__('see all', 'initfest').'

';