本文整理汇总了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>';