當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TranslationManagement::icanlocalize_service_info方法代碼示例

本文整理匯總了PHP中TranslationManagement::icanlocalize_service_info方法的典型用法代碼示例。如果您正苦於以下問題:PHP TranslationManagement::icanlocalize_service_info方法的具體用法?PHP TranslationManagement::icanlocalize_service_info怎麽用?PHP TranslationManagement::icanlocalize_service_info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TranslationManagement的用法示例。


在下文中一共展示了TranslationManagement::icanlocalize_service_info方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

        }
    }
}
$active_languages = $sitepress->get_active_languages();
foreach ($active_languages as $lang) {
    if (empty($icl_selected_translators[$lang['code']]) && !empty($sitepress_settings['icl_lang_status']) && is_array($sitepress_settings['icl_lang_status'])) {
        foreach ($sitepress_settings['icl_lang_status'] as $lpair) {
            if ($lpair['from'] == $icl_translation_filter['from_lang'] && $lpair['to'] == $lang['code'] && !empty($lpair['translators'])) {
                $icl_selected_translators[$lang['code']] = $lpair['translators']['0']['id'] . '-icanlocalize';
            }
        }
    }
}
if (!defined('ICL_DONT_PROMOTE') || !ICL_DONT_PROMOTE) {
    $icl_translation_services = apply_filters('icl_translation_services', array());
    $icl_translation_services = array_merge($icl_translation_services, TranslationManagement::icanlocalize_service_info());
    if (!empty($icl_translation_services)) {
        $icls_output = '';
        if (empty($icl_dashboard_settings['hide_icl_promo'])) {
            $exp_hidden = '';
            $col_hidden = ' hidden';
        } else {
            $exp_hidden = ' hidden';
            $col_hidden = '';
        }
        $icls_output .= '<div class="icl-translation-services' . $exp_hidden . '">';
        foreach ($icl_translation_services as $key => $service) {
            $icls_output .= '<div class="icl-translation-services-inner">';
            $icls_output .= '<p class="icl-translation-services-logo"><span><img src="' . $service['logo'] . '" alt="' . $service['name'] . '" /></span></p>';
            $icls_output .= '<h3 class="icl-translation-services-header">  ' . $service['header'] . '</h3>';
            $icls_output .= '<div class="icl-translation-desc"> ' . $service['description'] . '</div>';
開發者ID:Calraiser,項目名稱:flux,代碼行數:31,代碼來源:dashboard.php


注:本文中的TranslationManagement::icanlocalize_service_info方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。