本文整理匯總了PHP中ICL_AdminNotifier::display_messages方法的典型用法代碼示例。如果您正苦於以下問題:PHP ICL_AdminNotifier::display_messages方法的具體用法?PHP ICL_AdminNotifier::display_messages怎麽用?PHP ICL_AdminNotifier::display_messages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ICL_AdminNotifier
的用法示例。
在下文中一共展示了ICL_AdminNotifier::display_messages方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: display_basket_notification
function display_basket_notification($position)
{
if (class_exists('ICL_AdminNotifier') && class_exists('TranslationProxy_Basket')) {
$positions = TranslationProxy_Basket::get_basket_notification_positions();
if (isset($positions[$position])) {
ICL_AdminNotifier::display_messages('translation-basket-notification');
}
}
}
示例2: build_content_dashboard_documents_options
//.........這裏部分代碼省略.........
<?php
if ($lang['code'] == $this->translation_filter['from_lang']) {
continue;
}
$radio_prefix_html = '<input type="radio" name="tr_action[' . $lang['code'] . ']" ';
?>
<tr>
<td><strong><?php
echo $lang['display_name'];
?>
</strong></td>
<td>
<label>
<?php
echo $radio_prefix_html;
?>
value="1" <?php
echo $translate_checked;
?>
/>
<?php
_e('Translate', 'wpml-translation-management');
?>
</label>
</td>
<td>
<label>
<?php
echo $radio_prefix_html;
?>
value="2" <?php
echo $duplicate_checked;
?>
/>
<?php
_e('Duplicate content', 'wpml-translation-management');
?>
</label>
</td>
<td>
<label>
<?php
echo $radio_prefix_html;
?>
value="0" <?php
echo $do_nothing_checked;
?>
/>
<?php
_e('Do nothing', 'wpml-translation-management');
?>
</label>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<br/>
<input name="iclnonce" type="hidden" value="<?php
echo wp_create_nonce('pro-translation-icl');
?>
"/>
<?php
$tm_jobs_submit_disabled = disabled(empty($this->selected_languages) && empty($this->selected_posts), true, false);
$tm_jobs_submit_caption = __('Add to translation basket', 'wpml-translation-management');
?>
<input id="icl_tm_jobs_submit" class="button-primary" type="submit" value="<?php
echo $tm_jobs_submit_caption;
?>
" <?php
echo $tm_jobs_submit_disabled;
?>
/>
<div id="icl_dup_ovr_warn" class="icl_dup_ovr_warn" style="display:none;">
<?php
$dup_message = '<p>';
$dup_message .= __('Any existing content (translations) will be overwritten when creating duplicates.', 'wpml-translation-management');
$dup_message .= '</p>';
$dup_message .= '<p>';
$dup_message .= __("When duplicating content, please first duplicate parent pages to maintain the site's hierarchy.", 'wpml-translation-management');
$dup_message .= '</p>';
ICL_AdminNotifier::display_instant_message($dup_message, 'error');
?>
</div>
<div style="width: 45%; margin: auto; position: relative; top: -30px;">
<?php
ICL_AdminNotifier::display_messages('translation-dashboard-under-translation-options');
ICL_AdminNotifier::remove_message('items_added_to_basket');
?>
</div>
</td>
</tr>
</tbody>
</table>
<?php
}
示例3: display_basket_items_notification
/**
* Displays div with number of items in basket and link to basket
* Removes notification if basket is empty
*/
public static function display_basket_items_notification()
{
ICL_AdminNotifier::display_messages('translation-basket-notification');
}
示例4: display_string_menu
//.........這裏部分代碼省略.........
?>
]"
name="translate_to[<?php
echo $lang['code'];
?>
]"
value="1"
id="icl_st_translate_to_<?php
echo $lang['code'];
?>
" <?php
echo $checked;
?>
data-language="<?php
echo $lang['code'];
?>
"
/>
<label
for="translate_to[<?php
echo $lang['code'];
?>
]"
class="<?php
echo $label_class;
?>
">
<?php
printf(__('Translate to %s', 'wpml-translation-management'), $lang['display_name']);
?>
</label>
<?php
if (isset($target_status[$lang['code']]) && $target_status[$lang['code']]) {
?>
<span style="display: none;"
id="icl_st_max_rate_<?php
echo $lang['code'];
?>
"><?php
echo $target_rate[$lang['code']];
?>
</span>
<span style="display: none;"
id="icl_st_estimate_<?php
echo $lang['code'];
?>
_wrap"
class="icl_st_estimate_wrap">
(<?php
printf(__('Estimated cost: %s USD', 'wpml-translation-management'), '<span id="icl_st_estimate_' . $lang['code'] . '">0</span>');
?>
)</span>
<?php
}
?>
</li>
<?php
}
?>
</ul>
<?php
echo wpml_nonce_field('icl-string-translation');
?>
<input id="icl_send_strings" class="button-primary"
type="submit"
value="<?php
_e('Add to translation basket', 'wpml-translation-management');
?>
"
disabled="disabled"
data-lang-not-active-message="<?php
_e('One of the selected strings is in a language that is not activate. It can not be added to the translation basket.', 'wpml-translation-management');
?>
"
data-more-than-one-lang-message="<?php
_e('Strings in different languages are selected. They can not be added to the translation basket.', 'wpml-translation-management');
?>
"
data-translation-basket-lang-message="<?php
_e('You cannot add strings in this language to the basket since it already contains posts or strings of another source language! Either submit the current basket or delete the posts of differing language in the current basket', 'wpml-translation-management');
?>
"
/>
<div class="update-nag js-translation-message"
style="display:none"></div>
<div style="width: 45%; margin: auto">
<?php
ICL_AdminNotifier::display_messages('string-translation-under-translation-options');
ICL_AdminNotifier::remove_message('items_added_to_basket');
?>
</div>
</td>
</tr>
</tbody>
</table>
</form>
<?php
}
示例5: display_string_menu
//.........這裏部分代碼省略.........
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul id="icl_tm_languages">
<?php
foreach ($strings_target_languages as $lang) {
if ($lang['code'] == $lang_filter) {
continue;
}
$is_active_language = $sitepress->is_active_language($lang['code']);
$checked = checked(true, $is_active_language, false);
$label_class = $is_active_language ? 'active' : 'non-active';
?>
<li>
<input type="checkbox"
id="translate_to[<?php
echo $lang['code'];
?>
]"
name="translate_to[<?php
echo $lang['code'];
?>
]"
value="1"
id="icl_st_translate_to_<?php
echo $lang['code'];
?>
" <?php
echo $checked;
?>
/>
<label for="translate_to[<?php
echo $lang['code'];
?>
]"
class="<?php
echo $label_class;
?>
">
<?php
printf(__('Translate to %s', 'wpml-translation-management'), $lang['display_name']);
?>
</label>
<?php
if (isset($target_status[$lang['code']]) && $target_status[$lang['code']]) {
?>
<span style="display: none;"
id="icl_st_max_rate_<?php
echo $lang['code'];
?>
"><?php
echo $target_rate[$lang['code']];
?>
</span>
<span style="display: none;"
id="icl_st_estimate_<?php
echo $lang['code'];
?>
_wrap"
class="icl_st_estimate_wrap">
(<?php
printf(__('Estimated cost: %s USD', 'wpml-translation-management'), '<span id="icl_st_estimate_' . $lang['code'] . '">0</span>');
?>
)</span>
<?php
}
?>
</li>
<?php
}
?>
</ul>
<input name="iclnonce" type="hidden"
value="<?php
echo wp_create_nonce('icl-string-translation');
?>
"/>
<input id="icl_send_strings" class="button-primary" type="submit"
value="<?php
_e('Add to translation basket', 'wpml-translation-management');
?>
"
disabled="disabled"/>
<div style="width: 45%; margin: auto">
<?php
ICL_AdminNotifier::display_messages('string-translation-under-translation-options');
ICL_AdminNotifier::remove_message('items_added_to_basket');
?>
</div>
</td>
</tr>
</tbody>
</table>
</form>
<?php
}