Move network_settings_add_js() from wp-admin/network/settings.php to wp-admin/includes/ms.php.

See #33813.

Built from https://develop.svn.wordpress.org/trunk@34026


git-svn-id: http://core.svn.wordpress.org/trunk@33995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-10 22:24:24 +00:00
parent 2d2e3c911e
commit 5918b30cdd
3 changed files with 23 additions and 22 deletions

View File

@ -1089,4 +1089,26 @@ function confirm_delete_users( $users ) {
</form>
<?php
return true;
}
/**
* Print JavaScript in the header on the Network Settings screen.
*
* @since 4.1.0
*/
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" />' );
}
});
});
</script>
<?php
}

View File

@ -22,27 +22,6 @@ if ( ! current_user_can( 'manage_network_options' ) )
$title = __( 'Network Settings' );
$parent_file = 'settings.php';
/**
* Print JavaScript in the header on the Network Settings screen.
*
* @since 4.1.0
*/
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" />' );
}
});
});
</script>
<?php
}
add_action( 'admin_head', 'network_settings_add_js' );
get_current_screen()->add_help_tab( array(

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34025';
$wp_version = '4.4-alpha-34026';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.