本文整理匯總了PHP中TranslationProxy::has_preferred_translation_service方法的典型用法代碼示例。如果您正苦於以下問題:PHP TranslationProxy::has_preferred_translation_service方法的具體用法?PHP TranslationProxy::has_preferred_translation_service怎麽用?PHP TranslationProxy::has_preferred_translation_service使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TranslationProxy
的用法示例。
在下文中一共展示了TranslationProxy::has_preferred_translation_service方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: get_model
public function get_model()
{
$translation_service_name = TranslationProxy::get_current_service_name();
$alert_1 = 'Use this feature when you want to reset your translation process. All your existing translations will remain unchanged. Any translation work that is currently in progress will be stopped.';
$alert_2 = '';
if (!$translation_service_name) {
$translation_service_name = 'PRO';
$alert_2 = 'Only select this option if you have no pending jobs or you are sure of what you are doing.';
} else {
if (!TranslationProxy::has_preferred_translation_service()) {
$alert_2 = 'If you have sent content to %1$s, you should cancel the projects in %1$s system.';
}
$alert_2 .= 'Any work that completes after you do this reset cannot be received by your site.';
}
$model = array('strings' => array('title' => __('Reset professional translation state', 'wpml-translation-management'), 'alert1' => sprintf(__($alert_1, 'wpml-translation-management'), $translation_service_name), 'alert2' => sprintf(__($alert_2, 'wpml-translation-management'), $translation_service_name), 'checkBoxLabel' => sprintf(__('I am about to stop any ongoing work done by %1$s.', 'wpml-translation-management'), $translation_service_name), 'button' => __('Reset professional translation state', 'wpml-translation-management')), 'placeHolder' => 'icl_reset_pro');
return $model;
}
開發者ID:aarongillett,項目名稱:B22-151217,代碼行數:17,代碼來源:class-wpml-tm-troubleshooting-reset-pro-trans-config-ui.php
示例2: has_preferred_translation_service
public function has_preferred_translation_service()
{
return TranslationProxy::has_preferred_translation_service();
}