Use maybe_network_admin_url. see #15840.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-16 06:12:55 +00:00
parent bba5e919af
commit 6f1016586f
3 changed files with 8 additions and 15 deletions

View File

@ -44,7 +44,6 @@ if ( ! empty( $_GET['invalid'] ) && !empty($popular_importers[$_GET['invalid']][
add_thickbox();
require_once ('admin-header.php');
$parent_file = 'tools.php';
$href = is_multisite() ? network_admin_url( 'plugin-install.php' ) : admin_url( 'plugin-install.php' );
?>
<div class="wrap">
@ -109,8 +108,8 @@ if (empty ($importers)) {
}
}
if ( empty($action) )
$action = '<a href="' . esc_url( $href . '?tab=plugin-information&plugin=' . $plugin_slug .
'&from=import&TB_iframe=true&width=600&height=550' ) . '" class="thickbox" title="' .
$action = '<a href="' . esc_url( maybe_network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug .
'&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox" title="' .
esc_attr__('Install importer') . '">' . $data[0] . '</a>';
} else {
$action = "<a href='" . esc_url("admin.php?import=$id") . "' title='" . esc_attr( wptexturize(strip_tags($data[1])) ) ."'>{$data[0]}</a>";
@ -131,7 +130,7 @@ if (empty ($importers)) {
}
if ( current_user_can('install_plugins') )
echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugins directory</a> to see if an importer is available.'), esc_url( $href . '?tab=search&type=tag&s=importer' ) ) . '</p>';
echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugins directory</a> to see if an importer is available.'), esc_url( maybe_network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '</p>';
?>
</div>

View File

@ -98,15 +98,13 @@ function core_update_footer( $msg = '' ) {
if ( ! isset( $cur->response ) )
$cur->response = '';
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
switch ( $cur->response ) {
case 'development' :
return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], $href );
return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], maybe_network_admin_url( 'update-core.php' ) );
break;
case 'upgrade' :
return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', $href, $cur->current);
return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', maybe_network_admin_url( 'update-core.php' ), $cur->current);
break;
case 'latest' :
@ -132,8 +130,7 @@ function update_nag() {
return false;
if ( current_user_can('update_core') ) {
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, $href );
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, maybe_network_admin_url( 'update-core.php' ) );
} else {
$msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
}
@ -151,8 +148,7 @@ function update_right_now_message() {
$msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version'] );
if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) {
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
$msg .= " <a href='" . $href . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
$msg .= " <a href='" . maybe_network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
}
echo "<span id='wp-version-message'>$msg</span>";

View File

@ -274,9 +274,7 @@ function wp_admin_bar_updates_menu() {
$update_title .= sprintf( __('Updates %s'), "<span id='ab-updates' class='update-count'>" . number_format_i18n($update_count) . '</span>' );
$update_title .= '</span>';
$href = is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' );
$wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => $href ) );
$wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => maybe_network_admin_url( 'update-core.php' ) ) );
}
/**