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


PHP TranslationProxy::get_service_dashboard_info方法代碼示例

本文整理匯總了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 
        }
    }
開發者ID:tlandn,項目名稱:akvo-sites-zz-template,代碼行數:20,代碼來源:wpml-tm-menus.class.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>
開發者ID:aarongillett,項目名稱:B22-151217,代碼行數:31,代碼來源:_icl_dashboard_widget.php


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