本文整理汇总了PHP中TranslationProxy::get_service_dashboard_info方法的典型用法代码示例。如果您正苦于以下问题:PHP TranslationProxy::get_service_dashboard_info方法的具体用法?PHP TranslationProxy::get_service_dashboard_info怎么用?PHP TranslationProxy::get_service_dashboard_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TranslationProxy
的用法示例。
在下文中一共展示了TranslationProxy::get_service_dashboard_info方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_content_dashboard_remote_translations_controls
private function build_content_dashboard_remote_translations_controls()
{
// shows only when translation polling is on and there are translations in progress
$this->build_content_dashboard_fetch_translations_box();
$active_service = icl_do_not_promote() ? false : TranslationProxy::get_current_service();
$service_dashboard_info = TranslationProxy::get_service_dashboard_info();
if ($active_service && $service_dashboard_info) {
?>
<div class="icl_cyan_box">
<h3><?php
echo $active_service->name . ' ' . __('account status', 'wpml-translation-management');
?>
</h3>
<?php
echo $service_dashboard_info;
?>
</div>
<?php
}
}
示例2: sprintf
<?php
/* included from WPML_Translation_Management::icl_dashboard_widget_content */
global $sitepress, $ICL_Pro_Translation, $sitepress_settings, $sitepress, $current_user;
//Todo: handle TS URLs
$service = TranslationProxy::get_current_service();
//Todo: implement custom text
if ($service) {
$dashboard_text_url = sprintf(__('%s offers affordable professional translation via a streamlined process.', 'wpml-translation-management'), '<a target="_blank" href="' . esc_attr($service->url) . '">' . $service->name . '</a>');
} else {
$dashboard_text_url = TranslationProxy::get_service_dashboard_info();
}
?>
<p>
<?php
if ($docs_sent) {
printf(__('%d documents sent to translation.<br />%d are complete, %d waiting for translation.', 'wpml-translation-management'), $docs_sent, $docs_completed, $docs_waiting);
}
?>
</p>
<p>
<a href="admin.php?page=<?php
echo WPML_TM_FOLDER;
?>
/menu/main.php" class="button secondary">
<strong><?php
_e('Translate content', 'wpml-translation-management');
?>
</strong>
</a>