在“网络设置”屏幕的标题中打印JavaScript。

原型

network_settings_add_js()

源文件

路径:wp-admin/includes/ms.php

<?php
...
function network_settings_add_js() {
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
	var languageSelect = $( '#WPLANG' );
	$( 'form' ).submit( function() {
		// Don't show a spinner for English and installed languages,
		// as there is nothing to download.
		if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {
			$( '#submit', this ).after( '<span class="spinner language-install-spinner is-active" />' );
		}
	});
});
</script>
<?php
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/network_settings_add_js/