コード例 #1
0
ファイル: functions.php プロジェクト: amptdesign/ampt-2016
 function ut_translate_meta($content)
 {
     if (function_exists('qtrans_useCurrentLanguageIfNotFoundShowAvailable')) {
         return qtrans_useCurrentLanguageIfNotFoundShowAvailable($content);
     }
     if (function_exists('ppqtrans_useCurrentLanguageIfNotFoundShowAvailable')) {
         return ppqtrans_useCurrentLanguageIfNotFoundShowAvailable($content);
     }
     if (function_exists('qtranxf_useCurrentLanguageIfNotFoundShowAvailable')) {
         return qtranxf_useCurrentLanguageIfNotFoundShowAvailable($content);
     }
     return $content;
 }
コード例 #2
0
function ppqtrans_postsFilter($posts)
{
    if (is_array($posts)) {
        foreach ($posts as $post) {
            $post->post_content = ppqtrans_useCurrentLanguageIfNotFoundShowAvailable($post->post_content);
            $post = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($post);
        }
    }
    return $posts;
}