diff --git a/inc/templates/post-highlighted-single-1-cols.php b/inc/templates/post-highlighted-single-1-cols.php index 87106e6c..9bac7630 100644 --- a/inc/templates/post-highlighted-single-1-cols.php +++ b/inc/templates/post-highlighted-single-1-cols.php @@ -57,9 +57,8 @@ odm_echo_extras(); endif; - if(echo_downloaded_documents()): - echo_downloaded_documents(); - endif; + echo_downloaded_documents(); + endif; ?> diff --git a/inc/templates/post-list-single-1-cols.php b/inc/templates/post-list-single-1-cols.php index c64e48f8..e0bb9d66 100644 --- a/inc/templates/post-list-single-1-cols.php +++ b/inc/templates/post-list-single-1-cols.php @@ -88,9 +88,8 @@ odm_echo_extras(); endif; - if(echo_downloaded_documents()): - echo_downloaded_documents(); - endif; + echo_downloaded_documents(); + endif; ?> diff --git a/inc/templates/post-list-single-2-cols.php b/inc/templates/post-list-single-2-cols.php index a670369c..5b56a5d8 100644 --- a/inc/templates/post-list-single-2-cols.php +++ b/inc/templates/post-list-single-2-cols.php @@ -85,9 +85,8 @@ odm_echo_extras(); endif; - if(echo_downloaded_documents()): - echo_downloaded_documents(); - endif; + echo_downloaded_documents(); + endif; ?> diff --git a/inc/templates/post-list-single-4-cols.php b/inc/templates/post-list-single-4-cols.php index 611b866e..3937dea0 100644 --- a/inc/templates/post-list-single-4-cols.php +++ b/inc/templates/post-list-single-4-cols.php @@ -85,11 +85,10 @@ if ($show_source_meta): odm_echo_extras(); - endif; - - if(echo_downloaded_documents()): - echo_downloaded_documents(); endif; + + echo_downloaded_documents(); + endif; ?> diff --git a/inc/utils/content.php b/inc/utils/content.php index be2f19b3..e791fafe 100644 --- a/inc/utils/content.php +++ b/inc/utils/content.php @@ -538,22 +538,27 @@ function echo_downloaded_documents ($postID = "") { $postID = $postID ? $postID : get_the_ID(); $local_lang = odm_language_manager()->get_the_language_code_by_site(); $current_lang = odm_language_manager()->get_current_language(); - + //Get Download files $get_document = get_post_meta($postID, 'upload_document', true); $get_localized_document = get_post_meta($postID, 'upload_document_'.$local_lang, true); + $document_curent_lang = null; - if (!empty($get_document) || !empty($get_localized_document)): - if (!empty($get_document) && !empty($get_localized_document)): - $document_curent_lang = $current_lang == "en" ? $get_document : $get_localized_document; + if (!empty($get_document) || !empty($get_localized_document)): + if (!empty($get_document) && !empty($get_localized_document)): + $document_curent_lang = $current_lang == "en" ? $get_document : $get_localized_document; else: $document_curent_lang = !empty($get_document) ? $get_document : $get_localized_document; - endif;?> -

- ">pdf -

- + + +

+ ">pdf +

+ get_current_language(), true); if ($get_author != '' || $get_localized_author != ''): @@ -689,13 +694,13 @@ function odm_echo_extras($postID = "") { endif; endif; - if (isset($source) && $source != '') { - if (false === strpos($source, '://')) { - $news_source_info .= 'http://'.$source.''; - } else { - $news_source_info .= ''.$source.''; - } - } + if (isset($source) && $source != ''): + if (false === strpos($source, '://')): + $news_source_info .= 'http://'.$source.''; + else: + $news_source_info .= ''.$source.''; + endif; + endif; endif; diff --git a/single.php b/single.php index 92910347..ff1ea239 100644 --- a/single.php +++ b/single.php @@ -37,13 +37,10 @@ echo "

".get_the_content()."

"; endif; - if(odm_echo_extras()): - odm_echo_extras(); - endif; + odm_echo_extras(); - if(echo_downloaded_documents()): - echo_downloaded_documents(); - endif; + echo_downloaded_documents(); + ?>