diff --git a/wp-admin/import.php b/wp-admin/import.php index 042b7c7d4..ebff014cc 100644 --- a/wp-admin/import.php +++ b/wp-admin/import.php @@ -108,7 +108,7 @@ if (empty ($importers)) { } } if ( empty($action) ) - $action = '' . $data[0] . ''; } else { @@ -130,7 +130,7 @@ if (empty ($importers)) { } if ( current_user_can('install_plugins') ) - echo '

' . sprintf( __('If the importer you need is not listed, search the plugins directory to see if an importer is available.'), esc_url( maybe_network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '

'; + echo '

' . sprintf( __('If the importer you need is not listed, search the plugins directory to see if an importer is available.'), esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '

'; ?> diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 32da39146..e21816da2 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -100,11 +100,11 @@ function core_update_footer( $msg = '' ) { switch ( $cur->response ) { case 'development' : - return sprintf( __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), $GLOBALS['wp_version'], maybe_network_admin_url( 'update-core.php' ) ); + return sprintf( __( 'You are using a development version (%1$s). Cool! Please stay updated.' ), $GLOBALS['wp_version'], network_admin_url( 'update-core.php' ) ); break; case 'upgrade' : - return sprintf( ''.__( 'Get Version %2$s' ).'', maybe_network_admin_url( 'update-core.php' ), $cur->current); + return sprintf( ''.__( 'Get Version %2$s' ).'', network_admin_url( 'update-core.php' ), $cur->current); break; case 'latest' : @@ -130,7 +130,7 @@ function update_nag() { return false; if ( current_user_can('update_core') ) { - $msg = sprintf( __('WordPress %1$s is available! Please update now.'), $cur->current, maybe_network_admin_url( 'update-core.php' ) ); + $msg = sprintf( __('WordPress %1$s is available! Please update now.'), $cur->current, network_admin_url( 'update-core.php' ) ); } else { $msg = sprintf( __('WordPress %1$s is available! Please notify the site administrator.'), $cur->current ); } @@ -148,7 +148,7 @@ function update_right_now_message() { $msg = sprintf( __('You are using WordPress %s.'), $GLOBALS['wp_version'] ); if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) { - $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; + $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; } echo "$msg"; diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 6b9564d11..6b79b97ce 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -274,7 +274,7 @@ function wp_admin_bar_updates_menu() { $update_title .= sprintf( __('Updates %s'), "" . number_format_i18n($update_count) . '' ); $update_title .= ''; - $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => maybe_network_admin_url( 'update-core.php' ) ) ); + $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => network_admin_url( 'update-core.php' ) ) ); } /** diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 5ea766a73..85254a1dc 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -2223,6 +2223,9 @@ function network_home_url( $path = '', $scheme = null ) { * @return string Admin url link with optional path appended */ function network_admin_url( $path = '', $scheme = 'admin' ) { + if ( ! is_multisite() ) + return admin_url( $path, $scheme ); + $url = network_site_url('wp-admin/network/', $scheme); if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) @@ -2269,23 +2272,6 @@ function self_admin_url($path = '', $scheme = 'admin') { return admin_url($path, $scheme); } -/** - * Retrieve the url to the admin area for either the current blog or the network - * depending on whether multisite is enabled. - * - * @since 3.1.0 - * - * @param string $path Optional path relative to the admin url - * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes. - * @return string Admin url link with optional path appended -*/ -function maybe_network_admin_url( $path = '', $scheme = 'admin' ) { - if ( is_multisite() ) - return network_admin_url( $path, $scheme ); - else - return admin_url( $path, $scheme ); -} - /** * Get the URL to the user's dashboard. *