list_translation_updates() - WordPress 函数参考中文文档

返回介绍

list_translation_updates()

发布于 2017-09-11 字数1883 浏览 902 评论 0

list_translation_updates()

描述


源代码

File: wp-admin/update-core.php

function list_translation_updates() {
	$updates = wp_get_translation_updates();
	if ( ! $updates ) {
		if ( 'en_US' != get_locale() ) {
			echo '<h2>' . __( 'Translations' ) . '</h2>';
			echo '<p>' . __( 'Your translations are all up to date.' ) . '</p>';
		}
		return;
	}

	$form_action = 'update-core.php?action=do-translation-upgrade';
	?>
	<h2><?php _e( 'Translations' ); ?></h2>
	<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-translations" class="upgrade">
		<p><?php _e( 'New translations are available.' ); ?></p>
		<?php wp_nonce_field( 'upgrade-translations' ); ?>
		<p><input class="button" type="submit" value="<?php esc_attr_e( 'Update Translations' ); ?>" name="upgrade" /></p>
	</form>
	<?php
}

更新日志

Version 描述
3.7.0 Introduced.

相关函数

Uses

  • wp-includes/l10n.php:
    __()
  • wp-includes/l10n.php:
    _e()
  • wp-includes/l10n.php:
    esc_attr_e()
  • wp-includes/l10n.php:
    get_locale()
  • wp-includes/formatting.php:
    esc_url()
  • wp-includes/functions.php:
    wp_nonce_field()
  • wp-includes/update.php:
    wp_get_translation_updates()
  • Show 2 more uses
    Hide more uses


User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!